mirror of
https://github.com/EpochModTeam/DayZ-Epoch.git
synced 2025-12-17 09:10:27 +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:
@@ -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;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
@@ -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
|
||||
]
|
||||
]
|
||||
@@ -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;
|
||||
|
||||
@@ -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["<t color='#b3e6ff'>%1</t>",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["<t color='#ff0000'>%1</t>",localize "STR_EPOCH_ACTIONS_MAINTAREA"], "\z\addons\dayz_code\actions\maintain_area.sqf", "maintain", 5, false];
|
||||
s_player_maintain_area_force = player addAction [format["<t color='#ff0000'>%1</t>",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["<t color='#ff0000'>%1</t>",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["<t color='#b3e6ff'>%1</t>",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];
|
||||
|
||||
@@ -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;};
|
||||
|
||||
|
||||
@@ -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];
|
||||
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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;};
|
||||
|
||||
@@ -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 = "";
|
||||
|
||||
Reference in New Issue
Block a user