added plotManagement by DevZupa

This commit is contained in:
Bruce
2016-04-29 23:02:25 +02:00
parent 89eea668f5
commit 98bfee8bdf
19 changed files with 843 additions and 18 deletions

View File

@@ -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",[]]);

View File

@@ -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];