Use single config variable for Plot for Life and Plot Management

Plot for Life and Plot Management work best together. They essentially
provide the same functionality. Both let you keep your plot after death
by using UID instead of CharacterID. Plot Management doesn't even have
an option to save characterID, so by default it is always keeping all
friends and the owner permanently until they are removed. The only major
difference between them is Plot For Life also adds permanent ownership
of built items on the plot, which is behavior most people expect. It
doesn't make sense to keep ownership of the plot after death but not the
other objects built on it. The other functionality it adds (take
ownership) can be toggled with a config variable.

It is rare that someone would want Plot For Life enabled, but Plot
Management disabled or vice versa. If they really want that they can
still do it manually, but consolidating them to a single config option
greatly simplifies things for everyone else.

I removed links to mod githubs because many changes have been made to
the 1.0.6 versions, so outdated information there will likely confuse
people. Authors are already credited in the README and change log.

In variables.sqf "DZ_storage_base" is now the parent class which
includes all tents and stashes. DZE_checkNearbyRadius variable is not
used (identical to DZE_PlotPole select 0).
This commit is contained in:
ebaydayz
2016-06-12 12:54:46 -04:00
parent 16c1e9d205
commit 835d750c0c
24 changed files with 90 additions and 104 deletions

View File

@@ -29,14 +29,14 @@
[NEW] With config based traders categories can be reused by setting the duplicate=#; value. # is the category number to copy. @ebaydayz
[NEW] Gems are now treated as variable value currency (Advanced Trading only). configure gem values using DZE_GemWorthArray =[]; see ConfigVariables.sqf for more info @icomrade
[NEW] Gem rarity is now configurable for mining using DZE_GemOccurance =[]; see ConfigVariables.sqf for more info @icomrade
[NEW] Plot Management v2.1 by Zupa is now included and enabled by default with variable DZE_plotManagement, see ConfigVariables.sqf @DevZupa @Bruce-LXXVI @icomrade
[NEW] A Plot For Life v2.5 by RimBlock is now included and enabled by default with variable DZE_plotforLife, see configVariables.sqf @RimBlock @icomrade
[NEW] A Plot For Life v2.5 by RimBlock is now included and enabled by default with variable DZE_permanentPlot, see configVariables.sqf @RimBlock @icomrade
[NEW] Build Vectors v4 by Striker is now included, only enabled with Snap building. Note there is no option to turn off Vector Building with Snap Building enabled @strikerforce @icomrade
[NEW] Plot Management v2.1 by Zupa is now included and enabled by default with variable DZE_permanentPlot, see configVariables.sqf @DevZupa @Bruce-LXXVI @icomrade
[NEW] Precise Base Building v1.0.5 by Mikeeeyy is now included. @Mikeeeyy @icomrade @ebaydayz
[NEW] You may toggle vehicle destruction effects to prevent damage from vehicle explosions (useful to prevent griefing from ramming) use DZE_NoVehicleExplosions = true; to enable #1198 @icomrade
[NEW] Temperature factors are now configurable with DZE_TempVars see ConfigVariables.sqf for more info @icomrade
[NEW] Weather effects are now configurable with DZE_WeatherVariables See DynamicWeatherEffects.sqf for info on these values @icomrade
[NEW] Full height cinderblock wall kits are now in game, classname "full_cinder_wall_kit" #1172 @icomrade
[NEW] Vector Building is now part of Epoch, only enabled with Snap Building DZE_modularBuild = true; Note there is no option to turn off Vector Building with Snap Building enabled @strikerforce @icomrade
[NEW] You can exclude built items from the god mode base function using DZE_GodModeBaseExclude = []; which is an array of item classnames
[CHANGED] Many duplicate functions and variables were renamed. See Documents\1.0.6 Variable Name Changes.txt @ebaydayz

View File

@@ -44,7 +44,7 @@ if (_hasMeat) then {
_fsmid setFSMVariable ["_isTamed", true];
player setVariable ["dogID", _fsmid];
if (DZE_plotforLife) then {
if (DZE_permanentPlot) then {
_dog setVariable ["ownerPUID", dayz_playerUID, true];
} else {
_dog setVariable ["CharacterID", dayz_characterID, true];

View File

@@ -525,7 +525,7 @@ if (_canBuild select 0) then {
//call publish precompiled function with given args and send public variable to server to save item to database
PVDZ_obj_Publish = [_combination,_tmpbuilt,[_dir,_location, _vector],[]];
if (DZE_plotforLife) then {
if (DZE_permanentPlot) then {
_tmpbuilt setVariable ["ownerPUID",_playerUID,true];
PVDZ_obj_Publish = [_combination,_tmpbuilt,[_dir,_location,_playerUID, _vector], []];
};
@@ -536,7 +536,7 @@ if (_canBuild select 0) then {
} else { //if not lockable item
_tmpbuilt setVariable ["CharacterID",dayz_characterID,true];
if (DZE_plotforLife) then {
if (DZE_permanentPlot) then {
_tmpbuilt setVariable ["ownerPUID",_playerUID,true];
};
@@ -545,7 +545,7 @@ if (_canBuild select 0) then {
_tmpbuilt spawn player_fireMonitor;
} else {
PVDZ_obj_Publish = [dayz_characterID,_tmpbuilt,[_dir,_location, _vector],[]];
if (DZE_plotforLife) then {
if (DZE_permanentPlot) then {
PVDZ_obj_Publish = [dayz_characterID,_tmpbuilt,[_dir,_location,_playerUID, _vector], []];
};
publicVariableServer "PVDZ_obj_Publish";

View File

@@ -434,7 +434,7 @@ if (_canBuild select 0) then {
_tmpbuilt setVariable ["CharacterID",_combination,true];
PVDZ_obj_Publish = [_combination,_tmpbuilt,[_dir,_location],[]];
if (DZE_plotforLife) then {
if (DZE_permanentPlot) then {
_tmpbuilt setVariable ["ownerPUID",_playerUID,true];
PVDZ_obj_Publish = [_combination,_tmpbuilt,[_dir,_location,_playerUID],_classname];
};
@@ -445,7 +445,7 @@ if (_canBuild select 0) then {
} else {
_tmpbuilt setVariable ["CharacterID",dayz_characterID,true];
if (DZE_plotforLife) then {
if (DZE_permanentPlot) then {
_tmpbuilt setVariable ["ownerPUID",_playerUID,true];
};
// fire?
@@ -453,7 +453,7 @@ if (_canBuild select 0) then {
_tmpbuilt spawn player_fireMonitor;
} else {
PVDZ_obj_Publish = [dayz_characterID,_tmpbuilt,[_dir,_location],[]];
if (DZE_plotforLife) then {
if (DZE_permanentPlot) then {
PVDZ_obj_Publish = [dayz_characterID,_tmpbuilt,[_dir,_location,_playerUID],_classname];
};
publicVariableServer "PVDZ_obj_Publish";

View File

@@ -26,7 +26,7 @@ if(_IsNearPlot == 0) then {
if(dayz_characterID == _ownerID) then {
_canBuildOnPlot = true;
} else {
if (DZE_plotManagement || DZE_plotforLife) then {
if (DZE_permanentPlot) then {
_buildcheck = [player, _nearestPole] call FNC_check_owner;
_isowner = _buildcheck select 0;
_isfriendly = _buildcheck select 1;
@@ -140,7 +140,7 @@ if ((count _upgrade) > 0) then {
format[localize "str_epoch_player_142",_text] call dayz_rollingMessages;
PVDZE_obj_Swap = [_objectCharacterID,_object,[_dir,_location, _vector],_classname,_obj,player];
if (DZE_plotforLife) then {
if (DZE_permanentPlot) then {
PVDZE_obj_Swap = [_objectCharacterID,_object,[_dir,_location,_playerUID, _vector],_classname,_obj,player];
};
publicVariableServer "PVDZE_obj_Swap";

View File

@@ -5,7 +5,7 @@ _caller = _this select 1;
call fnc_usec_medic_removeActions;
r_action = false;
if (DZE_plotforLife) then {
if (DZE_permanentPlot) then {
_callerID = [_caller] call FNC_GetPlayerUID;
_targetID = [_target] call FNC_GetPlayerUID;
} else {

View File

@@ -25,7 +25,7 @@ if(_IsNearPlot == 0) then {
if(dayz_characterID == _ownerID) then {
_canBuildOnPlot = true;
} else {
if (DZE_plotManagement || DZE_plotforLife) then {
if (DZE_permanentPlot) then {
_buildcheck = [player, _nearestPole] call FNC_check_owner;
_isowner = _buildcheck select 0;
_isfriendly = _buildcheck select 1;
@@ -144,7 +144,7 @@ if ((count _upgrade) > 0) then {
// Set location
_object setPosATL _location;
if (DZE_plotforLife) then {
if (DZE_permanentPlot) then {
_ownerID = _obj getVariable["ownerPUID","0"];
_object setVariable ["ownerPUID",_ownerID,true];
};

View File

@@ -15,7 +15,7 @@ _objOwnerID = "0";
_playerUID = "1";
_isOwnerOfObj = false;
if (DZE_plotforLife) then {
if (DZE_permanentPlot) then {
_objOwnerID = _obj getVariable["ownerPUID","0"];
_playerUID = [player] call FNC_GetPlayerUID;
_isOwnerOfObj = (_objOwnerID == _playerUID);

View File

@@ -1,32 +1,56 @@
// Check Ownership by RimBlock (http://epochmod.com/forum/index.php?/user/12612-rimblock/)
/*
Check object's ownership and friends
Original concept by RimBlock (github.com/RimBlock)
Parameters:
_this select 0: object - player calling this function
_this select 1: object - target to check ownership and friendlies of
Returns:
_return select 0: bool - player is owner of target object
_return select 1: bool - player is friends with owner of target object
*/
private ["_player","_object","_playerUID","_ObjectOwner","_owner","_friendlies","_friendly"];
private ["_player","_target","_playerUID","_targetOwner","_owner","_friendlies","_friendly","_findNearestPoles","_IsNearPlot","_pole","_friendUID","_ownerID","_friends"];
_player = _this select 0;
_Object = _this select 1;
_Owner = false;
_target = _this select 1;
_owner = false;
_friendly = false;
_friendlies = [];
_ObjectOwner = "0";
_targetOwner = "0";
if (DZE_plotManagement) then {
_friendlies = [_Object, true] call dze_getPlotFriends;
if (DZE_permanentPlot) then {
_pole = _target;
_IsNearPlot = 0;
_findNearestPoles = nearestObjects [[player] call FNC_getPos, ["Plastic_Pole_EP1_DZ"], DZE_PlotPole select 0];
_IsNearPlot = count _findNearestPoles;
_pole = _findNearestPoles select 0;
if (_IsNearPlot > 0) then {
_ownerID = _pole getVariable ["ownerPUID","0"];
_friendlies = [_ownerID];
_friends = _pole getVariable ["plotfriends", []];
{
_friendUID = _x select 0;
_friendlies set [count _friendlies, _friendUID];
} count _friends;
if (count DZE_PlotManagementAdmins > 0) then {
_friendlies = _friendlies + DZE_PlotManagementAdmins;
};
};
_playerUID = [_player] call FNC_GetPlayerUID;
_targetOwner = _target getVariable ["ownerPUID","0"];
_owner = (_playerUID == _targetOwner);
} else {
_friendlies = _player getVariable ["friendlyTo",[]];
_targetOwner = _target getVariable ["CharacterID","0"];
_owner = (_targetOwner == dayz_characterID);
};
if (DZE_plotforLife) then {
_playerUID = [_player] call FNC_GetPlayerUID;
_ObjectOwner = _object getVariable ["ownerPUID","0"];
_owner = (_playerUID == _ObjectOwner);
} else {
_ObjectOwner = _object getVariable["CharacterID","0"];
_owner = (_ObjectOwner == dayz_characterID);
};
if (_ObjectOwner in _friendlies) then {
if (_targetOwner in _friendlies) then {
_friendly = true;
};
[_owner, _friendly];
[_owner, _friendly]

View File

@@ -41,7 +41,7 @@ if(_IsNearPlot == 0) then {
if(dayz_characterID == _ownerID) then {
_canBuild = true;
} else {
if (DZE_plotManagement || DZE_plotforLife) then {
if (DZE_permanentPlot) then {
_buildcheck = [player, _nearestPole] call FNC_check_owner;
_isowner = _buildcheck select 0;
_isfriendly = _buildcheck select 1;

View File

@@ -1,30 +0,0 @@
/************************************************************************************************************************************************
This file is used to obtain plot pole owners and friends, which includes plot management admins.
You should NOT call this file directly, you should call FNC_check_owner as below to obtain a list of the plot owner and friends.
[player, _cursorTarget] call FNC_check_owner;
************************************************************************************************************************************************/
private ["_findNearestPoles","_IsNearPlot","_pole","_friendUID","_owner","_allowed","_friends","_FindNearestPole"];
_pole = _this select 0;
_FindNearestPole = _this select 1;
_IsNearPlot = 0;
_allowed = [];
if (_FindNearestPole) then {
_findNearestPoles = nearestObjects[[player] call FNC_getPos, ["Plastic_Pole_EP1_DZ"], DZE_PlotPole select 0];
_IsNearPlot = count (_findNearestPoles);
_pole = _findNearestPoles select 0;
};
if(!_FindNearestPole || {_IsNearPlot > 0}) then {
_owner = if(DZE_plotforLife) then { _pole getVariable ["ownerPUID","0"]; } else { _pole getVariable ["characterID","0"]; };
_allowed = [_owner];
_friends = _pole getVariable ["plotfriends", []];
{
_friendUID = _x select 0;
_allowed set [(count _allowed), _friendUID];
} count _friends;
if (count DZE_PlotManagementAdmins > 0) then {
_allowed = _allowed + DZE_PlotManagementAdmins;
};
};
_allowed;

View File

@@ -212,7 +212,7 @@ if (isPlayer cursorTarget) then {
if (_unit isKindOf "Man") then {
// should only fire if cursor target is man and not vehicle
_charID = _unit getVariable ["CharacterID", "0"];
if (DZE_plotforLife) then {
if (DZE_permanentPlot) then {
_charID = [_unit] call FNC_GetPlayerUID;
};
_friendlies = [player, _unit] call FNC_check_owner;

View File

@@ -250,7 +250,7 @@ if (!isNull _cursorTarget && !_inVehicle && !_isPZombie && (player distance _cur
_ownerID = _cursorTarget getVariable ["characterID","0"];
_playerUID = dayz_characterID;
if (DZE_plotforLife) then {
if (DZE_permanentPlot) then {
_playerUID = [player] call FNC_GetPlayerUID;
_ownerID = _cursorTarget getVariable ["ownerPUID","0"];
};
@@ -420,7 +420,7 @@ if (!isNull _cursorTarget && !_inVehicle && !_isPZombie && (player distance _cur
if(_isModular || _isModularDoor || {_typeOfCursorTarget in DZE_isDestroyableStorage}) then {
if(_hasToolbox && "ItemCrowbar" in _itemsPlayer) then {
_isowner = [player, _cursorTarget] call FNC_check_owner; //compile also calls dze_getPlotFriends and lists s_player_plotManagement friendlies
_isowner = [player, _cursorTarget] call FNC_check_owner;
If ((_isowner select 0) || (_isowner select 1)) then {
_player_deleteBuild = true;
};
@@ -631,9 +631,9 @@ if (!isNull _cursorTarget && !_inVehicle && !_isPZombie && (player distance _cur
};
if ((_cursorTarget isKindOf "Plastic_Pole_EP1_DZ") && {_canDo && speed player <= 1}) then {
if( DZE_plotManagement || DZE_plotforLife) then {
if (DZE_permanentPlot) then {
if (s_player_plotManagement < 0) then {
_isowner = [player, _cursorTarget] call FNC_check_owner; //compile also calls dze_getPlotFriends and lists s_player_plotManagement friendlies
_isowner = [player, _cursorTarget] call FNC_check_owner;
If ((_isowner select 0) || (_isowner select 1)) then {
s_player_plot_take_ownership = player addAction ["Take plot items ownership", "\z\addons\dayz_code\actions\A_Plot_for_Life\plot_take_ownership.sqf", "", 1, false];
};
@@ -657,10 +657,10 @@ if (!isNull _cursorTarget && !_inVehicle && !_isPZombie && (player distance _cur
s_player_plot_boundary_off = player addAction ["Remove plot boundary", "\z\addons\dayz_code\actions\A_Plot_for_Life\object_removePlotRadius.sqf", "", 1, false];
};
};
if (DZE_plotforLife) then {
if (DZE_permanentPlot) then {
if (s_player_plot_take_ownership < 0) then {
if (DZE_PlotOwnership) then {
_isowner = [player, _cursorTarget] call FNC_check_owner; //compile also calls dze_getPlotFriends and lists s_player_plotManagement friendlies
_isowner = [player, _cursorTarget] call FNC_check_owner;
If (_isowner select 0) then {
s_player_plot_take_ownership = player addAction ["Take plot items ownership", "\z\addons\dayz_code\actions\A_Plot_for_Life\plot_take_ownership.sqf", "", 1, false];
};

View File

@@ -32,7 +32,7 @@ _charID = _ownerID;
_objectID = _obj getVariable["ObjectID","0"];
_objectUID = _obj getVariable["ObjectUID","0"];
_ComboMatch = (_ownerID == dayz_combination);
if (DZE_plotforLife) then {
if (DZE_permanentPlot) then {
_combination = _obj getVariable["characterID","0"];
_ownerID = _obj getVariable["ownerPUID","0"];
_ComboMatch = (_combination == dayz_combination);
@@ -66,7 +66,7 @@ if (!isNull _obj) then {
_holder setVariable["ObjectID",_objectID,true];
_holder setVariable["ObjectUID",_objectUID,true];
_holder setVariable ["OEMPos", _pos, true];
if (DZE_plotforLife) then {
if (DZE_permanentPlot) then {
_holder setVariable ["ownerPUID", _ownerID , true];
};

View File

@@ -7,7 +7,7 @@ _obj = _this;
_ownerID = _obj getVariable["CharacterID","0"];
_objectID = _obj getVariable["ObjectID","0"];
_objectUID = _obj getVariable["ObjectUID","0"];
if (DZE_plotforLife) then {
if (DZE_permanentPlot) then {
_ownerID = _obj getVariable["ownerPUID","0"];
};
_pickup = false;

View File

@@ -25,7 +25,7 @@ _ownerID = _obj getVariable["CharacterID","0"];
_objectID = _obj getVariable["ObjectID","0"];
_objectUID = _obj getVariable["ObjectUID","0"];
_ComboMatch = (_ownerID == dayz_combination);
if (DZE_plotforLife) then {
if (DZE_permanentPlot) then {
_combination = _obj getVariable["characterID","0"];
_ownerID = _obj getVariable["ownerPUID","0"];
_ComboMatch = (_combination == dayz_combination);

View File

@@ -34,7 +34,7 @@ _claimedBy = _obj getVariable["claimed","0"];
_ownerID = _obj getVariable["CharacterID","0"];
_characterID = _ownerID;
_ComboMatch = (_ownerID == dayz_combination);
if (DZE_plotforLife) then {
if (DZE_permanentPlot) then {
_combination = _obj getVariable["characterID","0"];
_ownerID = _obj getVariable["ownerPUID","0"];
_ComboMatch = (_combination == dayz_combination);
@@ -96,7 +96,7 @@ if (_ComboMatch || (_ownerID == dayz_playerUID)) then {
_holder setVariable["ObjectID",_objectID,true];
_holder setVariable["ObjectUID",_objectUID,true];
_holder setVariable ["OEMPos", _pos, true];
if (DZE_plotforLife) then {
if (DZE_permanentPlot) then {
_holder setVariable ["ownerPUID", _ownerID , true];
};

View File

@@ -185,7 +185,7 @@ if (!isNull _humanityTarget && {isPlayer _humanityTarget} && {alive _humanityTar
_friendlies = player getVariable ["friendlies", []];
_charID = player getVariable ["CharacterID", "0"];
_rcharID = _humanityTarget getVariable ["CharacterID", "0"];
if (DZE_plotforLife) then {
if (DZE_permanentPlot) then {
_charID = [player] call FNC_GetPlayerUID;
_rcharID = [_humanityTarget] call FNC_GetPlayerUID;
};

View File

@@ -31,8 +31,6 @@ DZE_DeathMsgDynamicText = false; // Display death messages as dynamicText in the
DZE_DeathMsgCutText = false; // Display death messages as cutText
DZE_DeathScreen = true; // True=Use Epoch death screen (Trade city obituaries have been amended) False=Use DayZ death screen (You are dead)
DZE_HaloJump = true; // Enable halo jumping out of air vehicles above 400m
DZE_modularBuild = true; // Enable Snap building by @raymix
DZE_snapExtraRange = 0; // Increase the default range from which objects can snap by this many meters.
DZE_NameTags = 1; // Name displays when looking at player up close 0 = Off, 1= On, 2 = Player choice
DZE_ForceNameTagsInTrader = false; // Force name display when looking at player up close in traders. Overrides player choice.
DZE_HumanityTargetDistance = 25; // Distance to show name tags (red for bandit, blue for hero, green for friend)
@@ -47,10 +45,8 @@ timezoneswitch = 0; // Changes murderMenu times with this offset in hours.
DZE_SafeZonePosArray = []; //Prevent players in safeZones from being killed if their vehicle is destroyed. Format is [[[3D POS], RADIUS],[[3D POS], RADIUS]]; Ex. DZE_SafeZonePosArray = [[[6325.6772,7807.7412,0],150],[[4063.4226,11664.19,0],150]];
DZE_GemOccurance = [["ItemTopaz",10], ["ItemObsidian",8], ["ItemSapphire",6], ["ItemAmethyst",4], ["ItemEmerald",3], ["ItemCitrine",2], ["ItemRuby",1]]; //Sets how rare each gem is in the order shown when mining (whole numbers only)
DZE_GodModeBaseExclude = []; //Array of object class names excluded from the god mode bases feature
DZE_buildMaxMoveDistance = 10; // Max distance player can walk from start position when building. Anything >= the differnce between DZE_PlotPole values is not recommended (allows walking into other plots).
DZE_buildMaxHeightDistance = 10; // Max distance player can raise or lower object from start position when building.
/****** Advanced Trading Variables ***********/
// Advanced Trading
DZE_advancedTrading = true; //Use advanced trading system. WARNING: set to false if you use database traders, you should use config-traders anyway!
DZE_serverLogTrades = true; // Log trades to server RPT (sent with publicVariableServer on every trade)
DZE_GemWorthArray = [["ItemTopaz",15000], ["ItemObsidian",20000], ["ItemSapphire",25000], ["ItemAmethyst",30000], ["ItemEmerald",35000], ["ItemCitrine",40000], ["ItemRuby",45000]]; //array of gem prices, works only in advanced trading
@@ -60,26 +56,24 @@ Z_SingleCurrency = false; // Does your server use a single currency system.
Z_AllowTakingMoneyFromBackpack = true; // When buying items with DEFAULT CURRENCY to any inventory. Do you allow the trader to take money from your backpack.
Z_AllowTakingMoneyFromVehicle = true; // When buying items with DEFAULT CURRENCY to any inventory. Do you allow the trader to take money from your vehicle.
Z_MoneyVariable = "cashMoney"; // If using a Single currency system, change this to whatever currency you are using.
/**********************************************/
/////////// plotManagement Variables ///////////
// see also: https://github.com/DevZupa/PlotManagement
DZE_plotManagement = true;
// 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_plotManagementMustBeClose = true; //Players must be within 10m of pole to be added as a plot friend.
DZE_PlotManagementAdmins = []; //Array of admin PlayerUIDs enclosed in quotations, UIDs in this list are able to access every pole's management menu and delete or build any buildable with a pole nearby
DZE_MaxPlotFriends = 6; //Maximum number of friends allowed on a plot pole. (default 6)
// see also: https://github.com/RimBlock/Epoch/tree/master/A%20Plot%20for%20Life
DZE_plotforLife = true; //Enable or disable a plot for life mod
DZE_PlotOwnership = true; //allows plot owner to take ownership of buildables (excluding lockable items) near a plot pole. Useful for servers that allow base capturing so the new owner can modify/delete/upgrade existing structures
/////////// Vector Building Variables ///////////
// ENABLED ONLY WITH SNAP BUILDING ENABLED - DZE_modularBuild = true;
// Currently no switch to enable or disable due to continginces that may arise from various aspects of gameplay while switching between off/on
DZE_noRotate = []; //Objects that cannot be rotated. Ex: DZE_noRotate = ["ItemVault"] (NOTE: The objects magazine classname)
// Snap Build and Build Vectors
DZE_modularBuild = true; // Enable Snap Building by @raymix and Build Vectors by @strikerforce.
DZE_snapExtraRange = 0; // Increase the default range from which objects can snap by this many meters.
DZE_noRotate = []; // Objects that cannot be rotated. Ex: DZE_noRotate = ["ItemVault"] (NOTE: The objects magazine classname)
DZE_vectorDegrees = [0.01, 0.1, 1, 5, 15, 45, 90];
DZE_curDegree = 45; //Starting rotation angle. //Prefered any value in array above
DZE_dirWithDegrees = true; //When rotating objects with Q&E, use the custom degrees
////////////////////////////////////////////////
DZE_curDegree = 45; // Starting rotation angle. Prefered any value in array above
DZE_dirWithDegrees = true; // When rotating objects with Q&E, use the custom degrees
DZE_buildMaxMoveDistance = 10; // Max distance player can walk from start position when building. Anything >= the differnce between DZE_PlotPole values is not recommended (allows walking into other plots).
DZE_buildMaxHeightDistance = 10; // Max distance player can raise or lower object from start position when building.
/*
Developers:

View File

@@ -152,7 +152,6 @@ if (!isDedicated) then {
dog_findTargetAgent = compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\dog_findTargetAgent.sqf";
dze_isnearest_player = compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\dze_isNearestPlayer.sqf";
dze_buildChecks = compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\dze_buildChecks.sqf";
dze_getPlotFriends = compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\dze_getPlotFriends.sqf";
dze_requiredItemsCheck = compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\dze_requiredItemsCheck.sqf";
dze_surrender_off = {player setVariable ["DZE_Surrendered",false,true]; DZE_Surrender = false;};
epoch_generateKey = compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\epoch_generateKey.sqf";

View File

@@ -76,7 +76,6 @@ if (isServer) then {
"PVDZ_plr_Save" addPublicVariableEventHandler {_id = (_this select 1) call server_playerSync;};
"PVDZ_plr_SwitchMove" addPublicVariableEventHandler {((_this select 1) select 0) switchMove ((_this select 1) select 1);}; //Needed to execute switchMove on server machine. rSwitchMove only executes on other clients
"PVDZ_obj_Publish" addPublicVariableEventHandler {(_this select 1) call server_publishObj}; //Used by built items (Epoch and Vanilla)
"PVDZE_fullobj_Publish" addPublicVariableEventHandler {(_this select 1) call server_publishFullObject};
"PVDZ_veh_Save" addPublicVariableEventHandler {(_this select 1) call server_updateObject};
"PVDZ_plr_Login1" addPublicVariableEventHandler {_id = (_this select 1) call server_playerLogin};
"PVDZ_plr_Login2" addPublicVariableEventHandler {(_this select 1) call server_playerSetup};
@@ -96,6 +95,7 @@ if (isServer) then {
"PVDZE_plr_TradeMenu" addPublicVariableEventHandler {(_this select 1) spawn server_traders};
"PVDZE_plr_DeathB" addPublicVariableEventHandler {(_this select 1) spawn server_deaths};
"PVDZE_log_lockUnlock" addPublicVariableEventHandler {(_this select 1) spawn server_logUnlockLockEvent};
"PVDZE_fullobj_Publish" addPublicVariableEventHandler {(_this select 1) call server_publishFullObject}; // PlotForLife take base ownership
//Added as part of the maintenance system to allow the server to replace the damaged model with a normal model.
"PVDZ_object_replace" addPublicVariableEventHandler {

View File

@@ -501,7 +501,7 @@ DZE_isDestroyableStorage = ["OutHouse_DZ","Wooden_shed_DZ","WoodShack_DZ","Stora
helperDetach = false;
DZE_snapExtraRange = 0;
if (isNil "DZE_plotOwnershipExclusions") then {
DZE_plotTakeOwnershipItems = DayZ_SafeObjects - (DZE_LockableStorage + ["Plastic_Pole_EP1_DZ","TentStorage","TentStorageDomed","TentStorageDomed2"]);
DZE_plotTakeOwnershipItems = DayZ_SafeObjects - (DZE_LockableStorage + ["Plastic_Pole_EP1_DZ","DZ_storage_base"]);
};
isInTraderCity = false;
PlayerDeaths = [];
@@ -523,7 +523,6 @@ if (isNil "DZE_MissionLootTable") then {DZE_MissionLootTable = false;};
if (isNil "DZE_SelfTransfuse") then {DZE_SelfTransfuse = false;};
if (isNil "DZE_selfTransfuse_Values") then {DZE_selfTransfuse_Values = [12000,15,120];};
if (isNil "DZE_PlotPole") then {DZE_PlotPole = [30,45];};
DZE_checkNearbyRadius = DZE_PlotPole select 0;
DZE_maintainRange = ((DZE_PlotPole select 0)+20);
if (isNil "DZE_slowZombies") then {DZE_slowZombies = false;};

View File

@@ -69,7 +69,7 @@ _object_inventory = {
if (_object isKindOf "TrapItems") then {
_inventory = [["armed",_object getVariable ["armed",false]]];
} else {
if( DZE_plotManagement && (typeOf (_object) == "Plastic_Pole_EP1_DZ") ) then {
if (DZE_permanentPlot && (typeOf _object == "Plastic_Pole_EP1_DZ")) then {
_inventory = _object getVariable ["plotfriends", []]; //We're replacing the inventory with UIDs for this item
} else {
_inventory = [getWeaponCargo _object, getMagazineCargo _object, getBackpackCargo _object];

View File

@@ -176,7 +176,7 @@ if (_status == "ObjectStreamStart") then {
_object setVariable ["ObjectID", _idKey, true];
_object setVariable ["OwnerPUID", _ownerPUID, true];
if( DZE_plotManagement && (typeOf (_object) == "Plastic_Pole_EP1_DZ") ) then {
if (DZE_permanentPlot && (typeOf _object == "Plastic_Pole_EP1_DZ")) then {
_object setVariable ["plotfriends", _inventory, true];
};