diff --git a/SQF/dayz_code/actions/changeCode.sqf b/SQF/dayz_code/actions/changeCode.sqf
index d9d34329a..8af805b98 100644
--- a/SQF/dayz_code/actions/changeCode.sqf
+++ b/SQF/dayz_code/actions/changeCode.sqf
@@ -77,18 +77,13 @@ if (_isStorage) then {
_object setVectorDirAndUp _vector;
_object setPosATL _location;
_object setVariable ["memDir",_dir,true];
-
- if (DZE_permanentPlot) then {
- _ownerID = _cursorTarget getVariable["ownerPUID","0"];
- _object setVariable ["ownerPUID",_ownerID,true];
- _doorFriends = _cursorTarget getVariable ["doorfriends",[]];
- if (isNil "_ownerID" || _ownerID == "0") then {_ownerID = dayz_playerUID;};
- if (count _doorFriends == 0) then {_doorFriends = [[dayz_playerUID,toArray (name player)]];};
- _object setVariable ["doorfriends",_doorFriends,true];
- PVDZE_obj_Swap = [DZE_Lock_Door,_object,[_dir,_location,_ownerID,_vector],_typeOf,_cursorTarget,player,_doorFriends,dayz_authKey];
- } else {
- PVDZE_obj_Swap = [DZE_Lock_Door,_object,[_dir,_location,_vector],_typeOf,_cursorTarget,player,[],dayz_authKey];
- };
+ _ownerID = _cursorTarget getVariable["ownerPUID","0"];
+ _object setVariable ["ownerPUID",_ownerID,true];
+ _doorFriends = _cursorTarget getVariable ["doorfriends",[]];
+ if (isNil "_ownerID" || _ownerID == "0") then {_ownerID = dayz_playerUID;};
+ if (count _doorFriends == 0) then {_doorFriends = [[dayz_playerUID,toArray (name player)]];};
+ _object setVariable ["doorfriends",_doorFriends,true];
+ PVDZE_obj_Swap = [DZE_Lock_Door,_object,[_dir,_location,_ownerID,_vector],_typeOf,_cursorTarget,player,_doorFriends,dayz_authKey];
publicVariableServer "PVDZE_obj_Swap";
};
diff --git a/SQF/dayz_code/actions/dog/tame_dog.sqf b/SQF/dayz_code/actions/dog/tame_dog.sqf
index 78b47b6b4..67058ed07 100644
--- a/SQF/dayz_code/actions/dog/tame_dog.sqf
+++ b/SQF/dayz_code/actions/dog/tame_dog.sqf
@@ -44,11 +44,7 @@ if (_hasMeat) then {
_fsmid setFSMVariable ["_isTamed", true];
player setVariable ["dogID", _fsmid];
- if (DZE_permanentPlot) then {
- _dog setVariable ["ownerPUID", dayz_playerUID, true];
- } else {
- _dog setVariable ["CharacterID", dayz_characterID, true];
- };
+ _dog setVariable ["ownerPUID", dayz_playerUID, true];
format[localize "str_epoch_player_173",_textRemoved] call dayz_rollingMessages;
} else {
diff --git a/SQF/dayz_code/actions/maintain_area.sqf b/SQF/dayz_code/actions/maintain_area.sqf
index 8cf514afb..df1951e78 100644
--- a/SQF/dayz_code/actions/maintain_area.sqf
+++ b/SQF/dayz_code/actions/maintain_area.sqf
@@ -106,18 +106,14 @@ _maintain = {
_message1 = format[localize "STR_EPOCH_PLOTMANAGEMENT_OBJECTS_MAINTAINED_FAILED",_count,_itemText,""];
};
- if (DZE_permanentPlot) then {
- disableSerialization;
+ disableSerialization;
- _plotDialog = findDisplay 711194;
- _line1 = _plotDialog displayCtrl 7012;
- _line2 = _plotDialog displayCtrl 7013;
- _message2 = " ";
- _line1 ctrlSetText _message1;
- _line2 ctrlSetText _message2;
- } else {
- _message1 call dayz_rollingMessages;
- };
+ _plotDialog = findDisplay 711194;
+ _line1 = _plotDialog displayCtrl 7012;
+ _line2 = _plotDialog displayCtrl 7013;
+ _message2 = " ";
+ _line1 ctrlSetText _message1;
+ _line2 ctrlSetText _message2;
};
};
diff --git a/SQF/dayz_code/actions/modular_build.sqf b/SQF/dayz_code/actions/modular_build.sqf
index 36f67ab90..624ad3724 100644
--- a/SQF/dayz_code/actions/modular_build.sqf
+++ b/SQF/dayz_code/actions/modular_build.sqf
@@ -530,19 +530,11 @@ if (_canBuild) then {
_ownerID = _nearestPole getVariable["CharacterID","0"];
if (dayz_characterID != _ownerID) then { // not the owner
-
- if (DZE_permanentPlot) then {
- _buildcheck = [player, _nearestPole] call FNC_check_access;
- _isowner = _buildcheck select 0;
- _isfriendly = ((_buildcheck select 1) || (_buildcheck select 3));
- if (!_isowner && !_isfriendly) then {
- _cancel = true;
- };
- } else {
- _friendlies = player getVariable ["friendlyTo",[]];
- if !(_ownerID in _friendlies) then {
- _cancel = true;
- };
+ _buildcheck = [player, _nearestPole] call FNC_check_access;
+ _isowner = _buildcheck select 0;
+ _isfriendly = ((_buildcheck select 1) || (_buildcheck select 3));
+ if (!_isowner && !_isfriendly) then {
+ _cancel = true;
};
if (_cancel) then {
_reason = localize "STR_EPOCH_PLAYER_134"; // You do not have access to build on this plot.
@@ -804,23 +796,17 @@ if (_canBuild) then {
_tmpbuilt setVariable ["CharacterID", _combination, true]; // set combination as a character ID
// call publish precompiled function with given args and send public variable to server to save item to database
- if (DZE_permanentPlot) then {
- _tmpbuilt setVariable ["ownerPUID", dayz_playerUID, true];
+ _tmpbuilt setVariable ["ownerPUID", dayz_playerUID, true];
- PVDZ_obj_Publish = [_combination, _tmpbuilt, [_dir, _position, dayz_playerUID, _vector], [], player, dayz_authKey];
+ PVDZ_obj_Publish = [_combination, _tmpbuilt, [_dir, _position, dayz_playerUID, _vector], [], player, dayz_authKey];
- if (_lockable == 3) then {
+ if (_lockable == 3) then {
+ _friendsArr = [[dayz_playerUID, toArray (name player)]];
+ _tmpbuilt setVariable ["doorfriends", _friendsArr, true];
- _friendsArr = [[dayz_playerUID, toArray (name player)]];
- _tmpbuilt setVariable ["doorfriends", _friendsArr, true];
-
- PVDZ_obj_Publish = [_combination, _tmpbuilt, [_dir, _position, dayz_playerUID, _vector], _friendsArr, player, dayz_authKey];
- };
- } else {
- PVDZ_obj_Publish = [_combination, _tmpbuilt, [_dir, _position, _vector], [], player, dayz_authKey];
+ PVDZ_obj_Publish = [_combination, _tmpbuilt, [_dir, _position, dayz_playerUID, _vector], _friendsArr, player, dayz_authKey];
};
-
publicVariableServer "PVDZ_obj_Publish";
[format[localize "str_epoch_player_140", _combinationDisplay, _text], 1] call dayz_rollingMessages; // display new combination
@@ -836,23 +822,17 @@ if (_canBuild) then {
[_tmpbuilt, true] call dayz_inflame;
_tmpbuilt spawn player_fireMonitor;
} else {
- if (DZE_permanentPlot) then {
+ _tmpbuilt setVariable ["ownerPUID", dayz_playerUID, true];
- _tmpbuilt setVariable ["ownerPUID", dayz_playerUID, true];
+ if (_isPole) then {
- if (_isPole) then {
+ _friendsArr = [[dayz_playerUID, toArray (name player)]];
+ _tmpbuilt setVariable ["plotfriends", _friendsArr, true];
- _friendsArr = [[dayz_playerUID, toArray (name player)]];
- _tmpbuilt setVariable ["plotfriends", _friendsArr, true];
-
- PVDZ_obj_Publish = [dayz_characterID, _tmpbuilt, [_dir, _position, dayz_playerUID, _vector], _friendsArr, player, dayz_authKey];
- } else {
- PVDZ_obj_Publish = [dayz_characterID, _tmpbuilt, [_dir, _position, dayz_playerUID, _vector], [], player, dayz_authKey];
- };
+ PVDZ_obj_Publish = [dayz_characterID, _tmpbuilt, [_dir, _position, dayz_playerUID, _vector], _friendsArr, player, dayz_authKey];
} else {
- PVDZ_obj_Publish = [dayz_characterID, _tmpbuilt, [_dir, _position, _vector], [], player, dayz_authKey];
+ PVDZ_obj_Publish = [dayz_characterID, _tmpbuilt, [_dir, _position, dayz_playerUID, _vector], [], player, dayz_authKey];
};
-
publicVariableServer "PVDZ_obj_Publish";
};
};
diff --git a/SQF/dayz_code/actions/player_build.sqf b/SQF/dayz_code/actions/player_build.sqf
index aac47ccaa..7de3da374 100644
--- a/SQF/dayz_code/actions/player_build.sqf
+++ b/SQF/dayz_code/actions/player_build.sqf
@@ -436,17 +436,14 @@ if (_canBuild select 0) then {
};
_tmpbuilt setVariable ["CharacterID",_combination,true];
- if (DZE_permanentPlot) then {
- _tmpbuilt setVariable ["ownerPUID",dayz_playerUID,true];
- PVDZ_obj_Publish = [_combination,_tmpbuilt,[_dir,_location,dayz_playerUID],[],player,dayz_authKey];
- if (_lockable == 3) then {
- _friendsArr = [[dayz_playerUID,toArray (name player)]];
- _tmpbuilt setVariable ["doorfriends", _friendsArr, true];
- PVDZ_obj_Publish = [_combination,_tmpbuilt,[_dir,_location,dayz_playerUID,_vector],_friendsArr,player,dayz_authKey];
- };
- } else {
- PVDZ_obj_Publish = [_combination,_tmpbuilt,[_dir,_location],[],player,dayz_authKey];
+ _tmpbuilt setVariable ["ownerPUID",dayz_playerUID,true];
+ PVDZ_obj_Publish = [_combination,_tmpbuilt,[_dir,_location,dayz_playerUID],[],player,dayz_authKey];
+ if (_lockable == 3) then {
+ _friendsArr = [[dayz_playerUID,toArray (name player)]];
+ _tmpbuilt setVariable ["doorfriends", _friendsArr, true];
+ PVDZ_obj_Publish = [_combination,_tmpbuilt,[_dir,_location,dayz_playerUID,_vector],_friendsArr,player,dayz_authKey];
};
+
publicVariableServer "PVDZ_obj_Publish";
[format[localize "str_epoch_player_140",_combinationDisplay,_text],1] call dayz_rollingMessages;
@@ -459,17 +456,13 @@ if (_canBuild select 0) then {
[_tmpbuilt,true] call dayz_inflame;
_tmpbuilt spawn player_fireMonitor;
} else {
- if (DZE_permanentPlot) then {
- _tmpbuilt setVariable ["ownerPUID",dayz_playerUID,true];
- if (_canBuild select 1) then {
- _friendsArr = [[dayz_playerUID,toArray (name player)]];
- _tmpbuilt setVariable ["plotfriends", _friendsArr, true];
- PVDZ_obj_Publish = [dayz_characterID,_tmpbuilt,[_dir,_location,dayz_playerUID],_friendsArr,player,dayz_authKey];
- } else {
- PVDZ_obj_Publish = [dayz_characterID,_tmpbuilt,[_dir,_location,dayz_playerUID],[],player,dayz_authKey];
- };
+ _tmpbuilt setVariable ["ownerPUID",dayz_playerUID,true];
+ if (_canBuild select 1) then {
+ _friendsArr = [[dayz_playerUID,toArray (name player)]];
+ _tmpbuilt setVariable ["plotfriends", _friendsArr, true];
+ PVDZ_obj_Publish = [dayz_characterID,_tmpbuilt,[_dir,_location,dayz_playerUID],_friendsArr,player,dayz_authKey];
} else {
- PVDZ_obj_Publish = [dayz_characterID,_tmpbuilt,[_dir,_location],[],player,dayz_authKey];
+ PVDZ_obj_Publish = [dayz_characterID,_tmpbuilt,[_dir,_location,dayz_playerUID],[],player,dayz_authKey];
};
publicVariableServer "PVDZ_obj_Publish";
};
diff --git a/SQF/dayz_code/actions/player_buildingDowngrade.sqf b/SQF/dayz_code/actions/player_buildingDowngrade.sqf
index 9fb0bb2cd..47b5552c9 100644
--- a/SQF/dayz_code/actions/player_buildingDowngrade.sqf
+++ b/SQF/dayz_code/actions/player_buildingDowngrade.sqf
@@ -135,16 +135,9 @@ if (count _upgrade > 0) then {
_object setDamage _damageNew;
};
- if (DZE_permanentPlot) then {
-
- local _ownerID = _obj getVariable["ownerPUID", "0"];
- _object setVariable ["ownerPUID", _ownerID, true];
-
- PVDZE_obj_Swap = [_objectCharacterID, _object, [_dir, _position, dayz_playerUID, _vector], _classname, _obj, player, [], dayz_authKey];
- } else {
- PVDZE_obj_Swap = [_objectCharacterID, _object, [_dir, _position, _vector], _classname, _obj, player, [], dayz_authKey];
- };
-
+ local _ownerID = _obj getVariable["ownerPUID", "0"];
+ _object setVariable ["ownerPUID", _ownerID, true];
+ PVDZE_obj_Swap = [_objectCharacterID, _object, [_dir, _position, dayz_playerUID, _vector], _classname, _obj, player, [], dayz_authKey];
publicVariableServer "PVDZE_obj_Swap";
player reveal _object;
diff --git a/SQF/dayz_code/actions/player_sleep.sqf b/SQF/dayz_code/actions/player_sleep.sqf
index 79765008c..1248fd9af 100644
--- a/SQF/dayz_code/actions/player_sleep.sqf
+++ b/SQF/dayz_code/actions/player_sleep.sqf
@@ -30,11 +30,7 @@ _blood = 0;
_cureAttempt = 0;
_lastRest = player getVariable ["lastRest", 0];
_tent = _this select 3;
-if (DZE_permanentPlot) then {
- _isOwner = (_tent getVariable ["ownerPUID","0"]) == dayz_playerUID;
-} else {
- _isOwner = (_tent getVariable ["characterID","0"]) == dayz_characterID;
-};
+_isOwner = (_tent getVariable ["ownerPUID","0"]) == dayz_playerUID;
while {r_doLoop} do {
_isAsleep = (animationState player) in _sleepArray;
diff --git a/SQF/dayz_code/actions/player_tagFriendly.sqf b/SQF/dayz_code/actions/player_tagFriendly.sqf
index 54ebba0f2..adf730aa1 100644
--- a/SQF/dayz_code/actions/player_tagFriendly.sqf
+++ b/SQF/dayz_code/actions/player_tagFriendly.sqf
@@ -5,13 +5,9 @@ _caller = _this select 1;
call fnc_usec_medic_removeActions;
r_action = false;
-if (DZE_permanentPlot) then {
- _callerID = getPlayerUID _caller;
- _targetID = getPlayerUID _target;
-} else {
- _callerID = _caller getVariable ["CharacterID", "0"];
- _targetID = _target getVariable ["CharacterID", "0"];
-};
+_callerID = getPlayerUID _caller;
+_targetID = getPlayerUID _target;
+
if ((_callerID != "0") && (_targetID != "0")) then {
_friendlies = _caller getVariable ["friendlies", []];
_friendlies set [count _friendlies, _targetID];
diff --git a/SQF/dayz_code/actions/player_upgrade.sqf b/SQF/dayz_code/actions/player_upgrade.sqf
index c169e56ce..82c95d769 100644
--- a/SQF/dayz_code/actions/player_upgrade.sqf
+++ b/SQF/dayz_code/actions/player_upgrade.sqf
@@ -210,31 +210,25 @@ if ((count _upgrade) > 0) then {
_object setDamage _damageNew;
};
- if (DZE_permanentPlot) then {
+ local _ownerID = _obj getVariable["ownerPUID","0"];
- local _ownerID = _obj getVariable["ownerPUID","0"];
+ if (_ownerID == "0") then {
+ _ownerID = dayz_playerUID; // APFL is on but UID is 0 so we will claim it to record the ownership.
+ };
- if (_ownerID == "0") then {
- _ownerID = dayz_playerUID; // APFL is on but UID is 0 so we will claim it to record the ownership.
- };
+ _object setVariable ["ownerPUID", _ownerID, true];
- _object setVariable ["ownerPUID", _ownerID, true];
+ if (_lockable == 3) then {
- if (_lockable == 3) then {
+ local _friendsArr = [[dayz_playerUID, toArray (name player)]];
+ _object setVariable ["doorfriends", _friendsArr, true];
- local _friendsArr = [[dayz_playerUID, toArray (name player)]];
- _object setVariable ["doorfriends", _friendsArr, true];
-
- PVDZE_obj_Swap = [_objectCharacterID, _object, [_dir, _location, _ownerID, _vector], _classname, _obj, player, _friendsArr, dayz_authKey];
- } else {
- PVDZE_obj_Swap = [_objectCharacterID, _object, [_dir, _location, _ownerID, _vector], _classname, _obj, player, [], dayz_authKey];
- };
+ PVDZE_obj_Swap = [_objectCharacterID, _object, [_dir, _location, _ownerID, _vector], _classname, _obj, player, _friendsArr, dayz_authKey];
} else {
- PVDZE_obj_Swap = [_objectCharacterID, _object, [_dir, _location, _vector], _classname, _obj, player, [], dayz_authKey];
+ PVDZE_obj_Swap = [_objectCharacterID, _object, [_dir, _location, _ownerID, _vector], _classname, _obj, player, [], dayz_authKey];
};
publicVariableServer "PVDZE_obj_Swap";
-
player reveal _object;
} else {
diff --git a/SQF/dayz_code/actions/remove.sqf b/SQF/dayz_code/actions/remove.sqf
index 76814500d..527be59e9 100644
--- a/SQF/dayz_code/actions/remove.sqf
+++ b/SQF/dayz_code/actions/remove.sqf
@@ -71,11 +71,6 @@ s_player_maint_build = 1;
local _objOwnerID = _obj getVariable["ownerPUID","0"];
local _isOwnerOfObj = (_objOwnerID == dayz_playerUID);
-if (!DZE_permanentPlot) then {
- _objOwnerID = _obj getVariable["CharacterID","0"];
- _isOwnerOfObj = (_objOwnerID == dayz_characterID);
-};
-
local _objectID = _obj getVariable ["ObjectID","0"];
local _objectUID = _obj getVariable ["ObjectUID","0"];
local _hasNoID = (_objectID == "0" && _objectUID == "0");
diff --git a/SQF/dayz_code/compile/dze_buildChecks.sqf b/SQF/dayz_code/compile/dze_buildChecks.sqf
index fbb99ddac..40480fabf 100644
--- a/SQF/dayz_code/compile/dze_buildChecks.sqf
+++ b/SQF/dayz_code/compile/dze_buildChecks.sqf
@@ -121,18 +121,11 @@ if (_isNearPlot > 0) then {
if (dayz_characterID == _ownerID) then {
_canBuild = true;
} else {
- if (DZE_permanentPlot) then {
- local _accessCheck = [player, _nearestPole] call FNC_check_access;
- local _isowner = _accessCheck select 0;
- local _isfriendly = ((_accessCheck select 1) || (_accessCheck select 3));
- if (_isowner || _isfriendly) then {
- _canBuild = true;
- };
- } else {
- local _friendlies = player getVariable ["friendlyTo",[]];
- if (_ownerID in _friendlies) then {
- _canBuild = true;
- };
+ local _accessCheck = [player, _nearestPole] call FNC_check_access;
+ local _isowner = _accessCheck select 0;
+ local _isfriendly = ((_accessCheck select 1) || (_accessCheck select 3));
+ if (_isowner || _isfriendly) then {
+ _canBuild = true;
};
};
};
diff --git a/SQF/dayz_code/compile/fn_check_access.sqf b/SQF/dayz_code/compile/fn_check_access.sqf
index 267e96d65..bde8e3229 100644
--- a/SQF/dayz_code/compile/fn_check_access.sqf
+++ b/SQF/dayz_code/compile/fn_check_access.sqf
@@ -70,14 +70,8 @@ _targetType = if(typeOf _target in DZE_DoorsLocked) then { "DOOR"; } else { "GEN
// and check if player is owner of target object
_playerUID = getPlayerUID _player;
_characterID = player getVariable ["CharacterID","0"];
-if (DZE_permanentPlot) then {
- _targetOwnerUID = if (isPlayer _target) then { getPlayerUID _target } else { _target getVariable ["ownerPUID","0"] };
- _isOwner = (_playerUID == _targetOwnerUID);
-} else {
- _targetOwnerUID = _target getVariable ["characterID","0"];
- _isOwner = (_characterID == _targetOwnerUID);
-};
-
+_targetOwnerUID = if (isPlayer _target) then { getPlayerUID _target } else { _target getVariable ["ownerPUID","0"] };
+_isOwner = (_playerUID == _targetOwnerUID);
// determine _players friends (tagged)
// and check if owner of _target is tagged friendly
@@ -92,14 +86,8 @@ _nearestPlot = _plotcheck select 2;
if(_isNearPlot) then {
// determine plot owner
// and check if player is owner of plot
- if (DZE_permanentPlot) then {
- _plotOwnerUID = _nearestPlot getVariable ["ownerPUID","0"];
- _isPlotOwner = (_playerUID == _plotOwnerUID);
- } else {
- _plotOwnerUID = _nearestPlot getVariable ["characterID","0"];
- _isPlotOwner = (_characterID == _plotOwnerUID);
- };
-
+ _plotOwnerUID = _nearestPlot getVariable ["ownerPUID","0"];
+ _isPlotOwner = (_playerUID == _plotOwnerUID);
// determine plot friends
// and check if player is one of them
@@ -142,4 +130,4 @@ if(_targetType == "DOOR") then {
, _isDoorFriend
, _isDoorAdmin
, _targetType
-]
+]
\ No newline at end of file
diff --git a/SQF/dayz_code/compile/fn_gearMenuChecks.sqf b/SQF/dayz_code/compile/fn_gearMenuChecks.sqf
index 2100a8fc2..e8c3fb399 100644
--- a/SQF/dayz_code/compile/fn_gearMenuChecks.sqf
+++ b/SQF/dayz_code/compile/fn_gearMenuChecks.sqf
@@ -32,7 +32,7 @@ if ((vehicle player) == player) then {
};
if (DZE_BackpackAntiTheft) then {
_friendlyTo = player getvariable ["friendlyTo",[]];
- _rID = if (DZE_permanentPlot) then { getPlayerUID _cTarget } else { _cTarget getVariable ["CharacterID","0"] };
+ _rID = getPlayerUID _cTarget;
if ((isInTraderCity || {DZE_PVE_Mode} || {!canbuild}) && {alive _cTarget} && {isPlayer _cTarget} && {!(_rID in _friendlyTo) && !(_cTarget in (units group player))} && {(player distance _cTarget) < 12}) then {
localize "STR_EPOCH_PLAYER_316" call dayz_rollingMessages;
_display closeDisplay 2;
diff --git a/SQF/dayz_code/compile/fn_selfActions.sqf b/SQF/dayz_code/compile/fn_selfActions.sqf
index 60f23702b..7017dbedf 100644
--- a/SQF/dayz_code/compile/fn_selfActions.sqf
+++ b/SQF/dayz_code/compile/fn_selfActions.sqf
@@ -246,18 +246,9 @@ if (!isNull _cursorTarget && _noChange && !_inVehicle && !_isPZombie && _canDo &
local _isPlant = _typeOfCursorTarget in Dayz_plants;
local _istypeTent = (_cursorTarget isKindOf "TentStorage_base") or (_cursorTarget isKindOf "IC_Tent");
local _characterID = _cursorTarget getVariable ["CharacterID","0"];
- local _id = "";
- local _ownerID = "";
- local _hasAccess = [];
-
- if (DZE_permanentPlot) then {
- _id = _uid;
- _ownerID = _cursorTarget getVariable ["ownerPUID","0"];
- } else {
- _id = _myCharID;
- _ownerID = _characterID;
- };
-
+ local _id = _uid;
+ local _ownerID = _cursorTarget getVariable ["ownerPUID","0"];
+ local _hasAccess = [];
local _isDog = (_cursorTarget isKindOf "Pastor" || _cursorTarget isKindOf "Fin");
local _isModular = (_cursorTarget isKindOf "ModularItems" || {_typeOfCursorTarget in DZE_modularDoors});
local _hasDeconstructAccess = false;
@@ -521,16 +512,8 @@ if (!isNull _cursorTarget && _noChange && !_inVehicle && !_isPZombie && _canDo &
if ((_typeOfCursorTarget == "Plastic_Pole_EP1_DZ") && {speed player <= 1}) then {
_hasAccess = [player, _cursorTarget] call FNC_check_access;
local _allowed = ((_hasAccess select 0) || _hasAccess select 2 || _hasAccess select 3 || _hasAccess select 4);
- if (DZE_permanentPlot) then {
- if (s_player_plotManagement < 0 && _allowed) then {
- s_player_plotManagement = player addAction [format["%1",localize "STR_EPOCH_ACTIONS_MANAGEPLOT"], "\z\addons\dayz_code\actions\plotManagement\initPlotManagement.sqf", [], 5, false];
- };
- } else {
- if (s_player_maintain_area < 0) then {
- s_player_maintain_area = player addAction [format["%1",localize "STR_EPOCH_ACTIONS_MAINTAREA"], "\z\addons\dayz_code\actions\maintain_area.sqf", "maintain", 5, false];
- s_player_maintain_area_force = player addAction [format["%1",localize "STR_EPOCH_ACTIONS_FORCE_MAINTAREA"], "\z\addons\dayz_code\actions\maintain_area.sqf", "force", 5, false];
- s_player_maintain_area_preview = player addAction [format["%1",localize "STR_EPOCH_ACTIONS_MAINTPREV"], "\z\addons\dayz_code\actions\maintain_area.sqf", "preview", 5, false];
- };
+ if (s_player_plotManagement < 0 && _allowed) then {
+ s_player_plotManagement = player addAction [format["%1",localize "STR_EPOCH_ACTIONS_MANAGEPLOT"], "\z\addons\dayz_code\actions\plotManagement\initPlotManagement.sqf", [], 5, false];
};
if (s_player_plot_boundary < 0 && {_allowed || (_hasAccess select 1)}) then {
s_player_plot_boundary = player addAction [localize "STR_EPOCH_PLOTMANAGEMENT_SHOW_BOUNDARY", "\z\addons\dayz_code\actions\plotManagement\plotToggleMarkers.sqf", "", 1, false];
diff --git a/SQF/dayz_code/compile/player_lockVault.sqf b/SQF/dayz_code/compile/player_lockVault.sqf
index 02c697209..079df83f4 100644
--- a/SQF/dayz_code/compile/player_lockVault.sqf
+++ b/SQF/dayz_code/compile/player_lockVault.sqf
@@ -21,7 +21,7 @@ if (isNull _obj) exitWith {dayz_actionInProgress = false;};
_ownerID = _obj getVariable["CharacterID","0"];
_ComboMatch = (_ownerID == dayz_combination);
-if (DZE_permanentPlot) then {_ownerID = _obj getVariable["ownerPUID","0"];};
+_ownerID = _obj getVariable["ownerPUID","0"];
if (!_ComboMatch && (_ownerID != dayz_playerUID)) exitWith {dayz_actionInProgress = false; s_player_lockvault = -1; format[localize "str_epoch_player_115",_text] call dayz_rollingMessages;};
diff --git a/SQF/dayz_code/compile/player_packTent.sqf b/SQF/dayz_code/compile/player_packTent.sqf
index 7c1f958cc..693dc0b74 100644
--- a/SQF/dayz_code/compile/player_packTent.sqf
+++ b/SQF/dayz_code/compile/player_packTent.sqf
@@ -15,13 +15,9 @@ dayz_actionInProgress = true;
local _obj = _this;
local _objType = typeOf _obj;
-local _ownerID = _obj getVariable["CharacterID","0"];
local _objectID = _obj getVariable["ObjectID","0"];
local _objectUID = _obj getVariable["ObjectUID","0"];
-
-if (DZE_permanentPlot) then {
- _ownerID = _obj getVariable["ownerPUID","0"];
-};
+local _ownerID = _obj getVariable["ownerPUID","0"];
local _playerNear = {isPlayer _x} count (([_obj] call FNC_GetPos) nearEntities ["CAManBase", 12]) > 1;
if (_playerNear) exitWith {
@@ -36,7 +32,7 @@ s_player_packtent = -1;
player removeAction s_player_packtentinfected;
s_player_packtentinfected = -1;
-if (_ownerID in [dayz_characterID, dayz_playerUID] || {_objType in ["IC_DomeTent","IC_Tent"]}) then { // if player is the owner, or infected camp items
+if ((_ownerID == dayz_playerUID) || {_objType in ["IC_DomeTent","IC_Tent"]}) then { // if player is the owner, or infected camp items
local _alreadyPacking = _obj getVariable["packing", 0];
diff --git a/SQF/dayz_code/compile/player_packVault.sqf b/SQF/dayz_code/compile/player_packVault.sqf
index c81e2efab..ecc397c0f 100644
--- a/SQF/dayz_code/compile/player_packVault.sqf
+++ b/SQF/dayz_code/compile/player_packVault.sqf
@@ -29,8 +29,7 @@ local _ownerID = _obj getVariable["CharacterID","0"];
local _objectID = _obj getVariable["ObjectID","0"];
local _objectUID = _obj getVariable["ObjectUID","0"];
local _ComboMatch = (_ownerID == dayz_combination);
-
-if (DZE_permanentPlot) then {_ownerID = _obj getVariable["ownerPUID","0"];};
+_ownerID = _obj getVariable["ownerPUID","0"];
if (_objectID == "0" && _objectUID == "0") exitWith {
dayz_actionInProgress = false;
diff --git a/SQF/dayz_code/compile/player_unlockVault.sqf b/SQF/dayz_code/compile/player_unlockVault.sqf
index c0a20f74f..55c44331d 100644
--- a/SQF/dayz_code/compile/player_unlockVault.sqf
+++ b/SQF/dayz_code/compile/player_unlockVault.sqf
@@ -24,7 +24,7 @@ _text = getText (configFile >> "CfgVehicles" >> _objType >> "displayName");
_ownerID = _obj getVariable["CharacterID","0"];
_ComboMatch = (_ownerID == dayz_combination);
-if (DZE_permanentPlot) then {_ownerID = _obj getVariable["ownerPUID","0"];};
+_ownerID = _obj getVariable["ownerPUID","0"];
if (isNil "dayz_UnlockTime") then {dayz_UnlockTime = 5;};
if (DZE_lockablesHarderPenalty && {((diag_tickTime - dayz_lastCodeFail) + dayz_unlockTime / 2) > 120}) then {dayz_UnlockTime = 5;};
diff --git a/SQF/dayz_code/compile/player_updateGui.sqf b/SQF/dayz_code/compile/player_updateGui.sqf
index 6a29284d5..13ef9cfaf 100644
--- a/SQF/dayz_code/compile/player_updateGui.sqf
+++ b/SQF/dayz_code/compile/player_updateGui.sqf
@@ -290,16 +290,9 @@ if (!isNull _humanityTarget && {isPlayer _humanityTarget} && {alive _humanityTar
// Display name if player opt-in or if friend
local _friendlies = player getVariable ["friendlies", []];
- local _id = "";
- local _rID = "";
-
- if (DZE_permanentPlot) then {
- _id = dayz_playerUID;
- _rID = getPlayerUID _humanityTarget;
- } else {
- _id = dayz_characterID;
- _rID = _humanityTarget getVariable ["CharacterID","0"];
- };
+ local _id = dayz_playerUID;
+ local _rID = getPlayerUID _humanityTarget;
+
local _rfriendlies = _humanityTarget getVariable ["friendlies", []];
local _rfriendlyTo = _humanityTarget getVariable ["friendlyTo", []];
local _color = "";
diff --git a/SQF/dayz_code/configVariables.sqf b/SQF/dayz_code/configVariables.sqf
index dc7d1e31b..80eb99e8e 100644
--- a/SQF/dayz_code/configVariables.sqf
+++ b/SQF/dayz_code/configVariables.sqf
@@ -43,7 +43,6 @@ DZE_VehicleKey_Changer = false; // Enable Vehicle Key Changer. Create or change
DZE_Virtual_Garage = false; // Enable the Virtual Garage to store vehicles.
// Plot Management and Plot for Life
-DZE_permanentPlot = true; // Plot ownership saves after death. Enables Plot for Life by @RimBlock and Plot Management by @DevZupa.
DZE_isRemovable = ["Plastic_Pole_EP1_DZ"]; //Items that can be removed with a crowbar with no ownership or access required. To forbid base take overs remove plot pole from this list and add it to DZE_restrictRemoval. It is not necessary to add wrecks or items that inherit from 'BuiltItems' to this list.
// Door Management
diff --git a/SQF/dayz_code/init/compiles.sqf b/SQF/dayz_code/init/compiles.sqf
index dc5b273b5..2161d4c29 100644
--- a/SQF/dayz_code/init/compiles.sqf
+++ b/SQF/dayz_code/init/compiles.sqf
@@ -177,15 +177,13 @@ if (!isDedicated) then {
player_unlockVault = compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\player_unlockVault.sqf";
player_upgradeVehicle = compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\player_upgradeVehicle.sqf";
fn_displayHelpers = compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\fn_displayHelpers.sqf";
-
- if (DZE_permanentPlot) then {
- PlotGetFriends = compile preprocessFileLineNumbers "\z\addons\dayz_code\actions\plotManagement\plotGetFriends.sqf";
- PlotNearbyHumans = compile preprocessFileLineNumbers "\z\addons\dayz_code\actions\plotManagement\plotNearbyHumans.sqf";
- PlotAddFriend = compile preprocessFileLineNumbers "\z\addons\dayz_code\actions\plotManagement\plotAddFriend.sqf";
- PlotRemoveFriend = compile preprocessFileLineNumbers "\z\addons\dayz_code\actions\plotManagement\plotRemoveFriend.sqf";
- PlotObjects = compile preprocessFileLineNumbers "\z\addons\dayz_code\actions\plotManagement\plotObjects.sqf";
- PlotPreview = compile preprocessFileLineNumbers "\z\addons\dayz_code\actions\plotManagement\plotToggleMarkers.sqf";
- };
+ PlotGetFriends = compile preprocessFileLineNumbers "\z\addons\dayz_code\actions\plotManagement\plotGetFriends.sqf";
+ PlotNearbyHumans = compile preprocessFileLineNumbers "\z\addons\dayz_code\actions\plotManagement\plotNearbyHumans.sqf";
+ PlotAddFriend = compile preprocessFileLineNumbers "\z\addons\dayz_code\actions\plotManagement\plotAddFriend.sqf";
+ PlotRemoveFriend = compile preprocessFileLineNumbers "\z\addons\dayz_code\actions\plotManagement\plotRemoveFriend.sqf";
+ PlotObjects = compile preprocessFileLineNumbers "\z\addons\dayz_code\actions\plotManagement\plotObjects.sqf";
+ PlotPreview = compile preprocessFileLineNumbers "\z\addons\dayz_code\actions\plotManagement\plotToggleMarkers.sqf";
+
if (DZE_doorManagement) then {
DoorGetFriends = compile preprocessFileLineNumbers "\z\addons\dayz_code\actions\doorManagement\doorGetFriends.sqf";
DoorNearbyHumans = compile preprocessFileLineNumbers "\z\addons\dayz_code\actions\doorManagement\doorNearbyHumans.sqf";
diff --git a/SQF/dayz_server/compile/server_changeCode.sqf b/SQF/dayz_server/compile/server_changeCode.sqf
index 044baaad2..067eac5b9 100644
--- a/SQF/dayz_server/compile/server_changeCode.sqf
+++ b/SQF/dayz_server/compile/server_changeCode.sqf
@@ -51,13 +51,10 @@ _holder setPosATL _pos;
_holder setVariable ["CharacterID",_characterID,true];
_holder setVariable ["OEMPos",_pos,true];
-if (DZE_permanentPlot) then {
- _ownerPUID = if (_charID == "0000" || _charID == "10000") then {_playerUID} else {_ownerID};
- _worldSpace = [_dir,_pos,_ownerPUID,_vector];
- _holder setVariable ["ownerPUID",_ownerPUID,true];
-} else {
- _worldSpace = [_dir,_pos];
-};
+_ownerPUID = if (_charID == "0000" || _charID == "10000") then {_playerUID} else {_ownerID};
+_worldSpace = [_dir,_pos,_ownerPUID,_vector];
+_holder setVariable ["ownerPUID",_ownerPUID,true];
+
if (_isZSC) then {_holder setVariable ["cashMoney",_coins,true];};
diff --git a/SQF/dayz_server/compile/server_handleSafeGear.sqf b/SQF/dayz_server/compile/server_handleSafeGear.sqf
index 280127d13..66f77395e 100644
--- a/SQF/dayz_server/compile/server_handleSafeGear.sqf
+++ b/SQF/dayz_server/compile/server_handleSafeGear.sqf
@@ -74,7 +74,7 @@ call {
_holder setVariable ["ObjectUID",_objectUID,true];
_holder setVariable ["OEMPos",_pos,true];
_holder setDamage _damage;
- if (DZE_permanentPlot) then {_holder setVariable ["ownerPUID",_ownerID,true];};
+ _holder setVariable ["ownerPUID",_ownerID,true];
if (_isZSC && {_unlockedClass in DZE_MoneyStorageClasses}) then {_holder setVariable ["cashMoney",_coins,true];};
deleteVehicle _obj;
@@ -102,7 +102,7 @@ call {
_holder setVariable ["ObjectUID",_objectUID,true];
_holder setVariable ["OEMPos",_pos,true];
_holder setDamage _damage;
- if (DZE_permanentPlot) then {_holder setVariable ["ownerPUID",_ownerID,true];};
+ _holder setVariable ["ownerPUID",_ownerID,true];
if (_isZSC && {_lockedClass in DZE_MoneyStorageClasses}) then {_holder setVariable ["cashMoney",_coins,true];};
deleteVehicle _obj;
@@ -172,4 +172,4 @@ diag_log _message;
if (_status < 3) then {
dze_waiting = "success";
_clientID publicVariableClient "dze_waiting";
-};
+};
\ No newline at end of file
diff --git a/SQF/dayz_server/compile/updateObject_functions.sqf b/SQF/dayz_server/compile/updateObject_functions.sqf
index 0292747ce..166f3c32a 100644
--- a/SQF/dayz_server/compile/updateObject_functions.sqf
+++ b/SQF/dayz_server/compile/updateObject_functions.sqf
@@ -25,7 +25,7 @@ server_obj_inv = {
local _class = _this select 3;
local _inventory = call {
- if (DZE_permanentPlot && {_class == "Plastic_Pole_EP1_DZ"}) exitwith {
+ if (_class == "Plastic_Pole_EP1_DZ") exitwith {
_object getVariable ["plotfriends", []] //We're replacing the inventory with UIDs for this item
};
if (DZE_doorManagement && {_class in DZE_DoorsLocked}) exitwith {
diff --git a/SQF/dayz_server/system/server_monitor.sqf b/SQF/dayz_server/system/server_monitor.sqf
index 27342b672..c01923e4b 100644
--- a/SQF/dayz_server/system/server_monitor.sqf
+++ b/SQF/dayz_server/system/server_monitor.sqf
@@ -236,7 +236,7 @@ if ((playersNumber west + playersNumber civilian) == 0) exitWith {
{_object addBackpackCargoGlobal [_x, _backpackqty select _foreachindex];} foreach _backpackcargo;
};
} else {
- if (DZE_permanentPlot && _isPlot) then {
+ if (_isPlot) then {
_object setVariable ["plotfriends", _inventory, true];
};
if (DZE_doorManagement && _doorLocked) then {