mirror of
https://github.com/EpochModTeam/DayZ-Epoch.git
synced 2026-02-18 22:22:57 +03:00
Remove DZE_permanentPlot variable
There is no longer a need for the DZE_permanentPlot variable since all servers use plot management and plot for life.
This commit is contained in:
@@ -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";
|
||||
};
|
||||
|
||||
@@ -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 {
|
||||
|
||||
@@ -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;
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
@@ -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";
|
||||
};
|
||||
};
|
||||
|
||||
@@ -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";
|
||||
};
|
||||
|
||||
@@ -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;
|
||||
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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];
|
||||
|
||||
@@ -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 {
|
||||
|
||||
@@ -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");
|
||||
|
||||
Reference in New Issue
Block a user