mirror of
https://github.com/EpochModTeam/Epoch.git
synced 2024-08-30 18:22:13 +00:00
New syntax for Trader items (old one can also still be used)
This commit is contained in:
parent
e984b1cf00
commit
f6da952cb5
@ -147,10 +147,26 @@ forceRestartTime = 14400; // 4 hour restarts
|
||||
|
||||
// Traders
|
||||
taxRate = 0.1; // controls the price increase for purchases
|
||||
/*
|
||||
starterTraderItems[] = { // Starter Items for fresh spawned trader first array is classnames second is quantity.
|
||||
{"ItemSodaBurst","meatballs_epoch","MortarBucket","CinderBlocks","VehicleRepair","CircuitParts","ItemCorrugated","PartPlankPack","ItemRock","ItemRope","ItemStick"},
|
||||
{5,5,5,5,5,5,5,5,5,5,5}
|
||||
};
|
||||
*/
|
||||
starterTraderItems[] = { // Starter Items for fresh spawned trader (old / above variant is also still working!)
|
||||
{"ItemSodaBurst",5},
|
||||
{"meatballs_epoch",5},
|
||||
{"MortarBucket",5},
|
||||
{"CinderBlocks",5},
|
||||
{"VehicleRepair",5},
|
||||
{"CircuitParts",5},
|
||||
{"ItemCorrugated",5},
|
||||
{"PartPlankPack",5},
|
||||
{"ItemRock",5},
|
||||
{"ItemRope",5},
|
||||
{"ItemStick",5}
|
||||
};
|
||||
|
||||
NPCSlotsLimit = 30; // Max number of traders static or dynamic. Warning! Higher the number lower performance.
|
||||
forceStaticTraders = "true"; // disables traders moving from work to home
|
||||
TraderGodMode = "false"; // If true, Trader can not be killed by Players
|
||||
|
@ -89,6 +89,21 @@ private _serverSettingsConfig = configFile >> "CfgEpochServer";
|
||||
missionNamespace setVariable[format["EPOCH_%1", _x select 0], _varData];
|
||||
}forEach _configArray;
|
||||
|
||||
// Convert Starter Trader items from alternative syntax
|
||||
if (count EPOCH_starterTraderItems == 0) then {
|
||||
EPOCH_starterTraderItems = [[],[]];
|
||||
};
|
||||
if ((EPOCH_starterTraderItems select 0) isEqualTypeArray ["",0]) then {
|
||||
private _EPOCH_starterTraderItems = [[],[]];
|
||||
{
|
||||
if (_x isEqualTypeArray ["",0]) then {
|
||||
(_EPOCH_starterTraderItems select 0) pushback (_x select 0);
|
||||
(_EPOCH_starterTraderItems select 1) pushback (_x select 1);
|
||||
};
|
||||
} foreach EPOCH_starterTraderItems;
|
||||
EPOCH_starterTraderItems = _EPOCH_starterTraderItems;
|
||||
};
|
||||
|
||||
// Convert Starter Trader Magazines from mags to rounds
|
||||
{
|
||||
_maxrnd = 1;
|
||||
|
Loading…
Reference in New Issue
Block a user