mirror of
https://github.com/EpochModTeam/DayZ-Epoch.git
synced 2025-12-15 13:26:39 +03:00
+ [FIXED] Battleye kick when calling dog. Thanks to @kikyou2 + [FIXED] Moved vehicle event handler to server side with a call to all connected clients. Before it was just set on only the owner and the server. This should fix issues with damage/repair handling of just purchased vehicles. + [FIXED] Fixed case sensitivity in building loot generation. This was only a problem on new maps that share the same buildings as others yet have differing case in the classnames. + [ADDED] New build-ables: Fence_corrugated_DZ, M240Nest_DZ, CanvasHut_DZ, ParkBench_DZ, MetalGate_DZ, OutHouse_DZ, Wooden_shed_DZ, WoodShack_DZ, StorageShed_DZ. + [ADDED] New crafting items: ItemCanvas, PartWoodLumber, PartWoodPlywood, ItemCorrugated, ItemPole + [ADDED] 55 gallon (210 liter) Fuel Barrel that can only be used on helicopters or fuel trucks. + [ADDED] All DayZ specific magazine items now only take one slot, this also makes it easier to become over burdened so be careful about blacking out. + [ADDED] More building loot spawn positions for Namalsk. + [FIXED] When packing tent get classname of new weapon_holder from config. + [CHANGED] Totally reworked player building system. Preview and placement accuracy has been significantly improved. Building now requires X number of stages to complete. Players cannot build while in combat. + [CHANGED] Added required tools array and is nearby checking for fire, etc. Also, each item can now have 5 separate crafting options. + [CHANGED] Reworked refuel and siphon code to support more can types. + [CHANGED] Removed all infinite fueling sources and added (KamazRefuel_DZ, UralRefuel_TK_EP1_DZ,MtvrRefuel_DES_EP1_DZ) variants of the fuel trucks to remove auto refuel and increase siphon-able fuel capacity to 10000. Old style refuel can still be used if the variable dayz_oldrefuel = true is set in the missions init.sqf. + [CHANGED] Remove object code now uses config variables instead of hard coded into sqf (default: constructioncount = 5) + [CHANGED] Moved most arrays for revealing objects, allowed objects, update objects, disallowed combat roll to arrays within variables.sqf. So that these arrays are unified and easier to change. + [CHANGED] New vehicle spawns now have a new fuel system using a random percent between min and max variables. Defaults: (DynamicVehicleFuelLow = 0; DynamicVehicleFuelHigh = 100;) + [CHANGED] New vehicle spawns now damage all parts and without a limiter on fuel and engine parts, this could cause a vehicle to be very close to blowing up. + [CHANGED] Disabled simulation server side of all road debris and crashes.
66 lines
2.2 KiB
Plaintext
66 lines
2.2 KiB
Plaintext
private["_cfgCount","_config","_i","_itemChances","_itemCount","_weighted","_j","_weight","_l","_k","_type","_canZombie","_canLoot"];
|
|
dayz_CBLChances = [];
|
|
dayz_CBLBase = [];
|
|
|
|
_config = configFile >> "CfgBuildingLoot";
|
|
for "_i" from 0 to ((count _config) - 1) do {
|
|
_classname = toLower(configName (_config select _i));
|
|
_itemChances = [] + getArray (_config >> _classname >> "ItemChance");
|
|
_itemCount = count _itemChances;
|
|
if (_itemCount > 0) then {
|
|
if (dayz_CBLBase find _classname < 0) then {
|
|
_weighted = [];
|
|
_j = 0;
|
|
for "_l" from 0 to ((count _itemChances) - 1) do {
|
|
_weight = round ((_itemChances select _l) * 100);
|
|
for "_k" from 0 to _weight - 1 do {
|
|
_weighted set [_j + _k, _l];
|
|
};
|
|
_j = _j + _weight;
|
|
};
|
|
dayz_CBLChances set [count dayz_CBLChances, _weighted];
|
|
dayz_CBLBase set [count dayz_CBLBase, _classname];
|
|
};
|
|
} else {
|
|
dayz_CBLChances set [count dayz_CBLChances, [0]];
|
|
dayz_CBLBase set [count dayz_CBLBase, _classname];
|
|
};
|
|
};
|
|
|
|
dayz_CLChances = [];
|
|
dayz_CLBase = [];
|
|
_config = configFile >> "cfgLoot";
|
|
for "_i" from 0 to ((count (_config)) - 1) do {
|
|
_itemChances = (getArray (_config select _i)) select 1;
|
|
_weighted = [];
|
|
_j = 0;
|
|
for "_l" from 0 to ((count _itemChances) - 1) do {
|
|
_weight = round ((_itemChances select _l) * 100);
|
|
for "_k" from 0 to _weight - 1 do {
|
|
_weighted set [_j + _k, _l];
|
|
};
|
|
_j = _j + _weight;
|
|
};
|
|
dayz_CLBase set [count dayz_CLBase, configName (_config select _i)];
|
|
dayz_CLChances set [count dayz_CLChances, _weighted];
|
|
};
|
|
|
|
private["_i","_type","_config","_canZombie","_canLoot"];
|
|
dayz_ZombieBuildings = [];
|
|
dayz_LootBuildings = [];
|
|
for "_i" from 0 to (count (configFile >> "CfgBuildingLoot") - 1) do {
|
|
_type = (configFile >> "CfgBuildingLoot") select _i;
|
|
_canZombie = getNumber (_type >> "zombieChance") > 0;
|
|
_canLoot = getNumber (_type >> "lootChance") > 0;
|
|
if(_canZombie) then {
|
|
if(!((configName _type) in dayz_ZombieBuildings)) then {
|
|
dayz_ZombieBuildings set [count dayz_ZombieBuildings, configName _type];
|
|
};
|
|
};
|
|
if(_canLoot) then {
|
|
if(!((configName _type) in dayz_LootBuildings)) then {
|
|
dayz_LootBuildings set [count dayz_LootBuildings, configName _type];
|
|
};
|
|
};
|
|
};
|