mirror of
https://github.com/EpochModTeam/DayZ-Epoch.git
synced 2025-12-24 09:29:21 +03:00
added plotManagement by DevZupa
This commit is contained in:
@@ -68,7 +68,15 @@ _object_inventory = {
|
||||
if (_object isKindOf "TrapItems") then {
|
||||
_inventory = [["armed",_object getVariable ["armed",false]]];
|
||||
} else {
|
||||
_inventory = [getWeaponCargo _object,getMagazineCargo _object,getBackpackCargo _object];
|
||||
// plotManagement //
|
||||
if( DZE_plotManagement && (typeOf (_object) == "Plastic_Pole_EP1_DZ") ) then {
|
||||
_inventory = _object getVariable ["plotfriends", []]; //We're replacing the inventory with UIDs for this item
|
||||
} else {
|
||||
// plotManagement //
|
||||
_inventory = [getWeaponCargo _object, getMagazineCargo _object, getBackpackCargo _object];
|
||||
// plotManagement //
|
||||
};
|
||||
// plotManagement //
|
||||
};
|
||||
|
||||
_previous = str(_object getVariable["lastInventory",[]]);
|
||||
|
||||
@@ -120,6 +120,13 @@ if (_status == "ObjectStreamStart") then {
|
||||
// prevent immediate hive write when vehicle parts are set up
|
||||
_object setVariable ["lastUpdate",diag_ticktime];
|
||||
_object setVariable ["ObjectID", _idKey, true];
|
||||
|
||||
// plotManagement //
|
||||
if( DZE_plotManagement && (typeOf (_object) == "Plastic_Pole_EP1_DZ") ) then {
|
||||
_object setVariable ["plotfriends", _inventory, true];
|
||||
};
|
||||
// plotManagement //
|
||||
|
||||
dayz_serverIDMonitor set [count dayz_serverIDMonitor,_idKey];
|
||||
// Fix for leading zero issues on safe codes after restart
|
||||
_lockable = if (isNumber (configFile >> "CfgVehicles" >> _type >> "lockable")) then {getNumber (configFile >> "CfgVehicles" >> _type >> "lockable")} else {0};
|
||||
@@ -146,7 +153,9 @@ if (_status == "ObjectStreamStart") then {
|
||||
clearWeaponCargoGlobal _object;
|
||||
clearMagazineCargoGlobal _object;
|
||||
clearBackpackCargoGlobal _object;
|
||||
if (count _inventory > 0) then {
|
||||
// plotManagement //
|
||||
if( (count _inventory > 0) && !(typeOf( _object) == "Plastic_Pole_EP1_DZ") ) then {
|
||||
// plotManagement //
|
||||
if (_type in DZE_LockedStorage) then {
|
||||
_object setVariable ["WeaponCargo",(_inventory select 0),true];
|
||||
_object setVariable ["MagazineCargo",(_inventory select 1),true];
|
||||
|
||||
Reference in New Issue
Block a user