diff --git a/CHANGE LOG 1.0.6.txt b/CHANGE LOG 1.0.6.txt index dae4a0032..4c7b84c5b 100644 --- a/CHANGE LOG 1.0.6.txt +++ b/CHANGE LOG 1.0.6.txt @@ -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 diff --git a/SQF/dayz_code/actions/dog/tame_dog.sqf b/SQF/dayz_code/actions/dog/tame_dog.sqf index eacc64e68..c1f32c676 100644 --- a/SQF/dayz_code/actions/dog/tame_dog.sqf +++ b/SQF/dayz_code/actions/dog/tame_dog.sqf @@ -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]; diff --git a/SQF/dayz_code/actions/modular_build.sqf b/SQF/dayz_code/actions/modular_build.sqf index cac2a68db..26b72d050 100644 --- a/SQF/dayz_code/actions/modular_build.sqf +++ b/SQF/dayz_code/actions/modular_build.sqf @@ -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"; diff --git a/SQF/dayz_code/actions/player_build.sqf b/SQF/dayz_code/actions/player_build.sqf index 8e31f03ff..c78c9841b 100644 --- a/SQF/dayz_code/actions/player_build.sqf +++ b/SQF/dayz_code/actions/player_build.sqf @@ -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"; diff --git a/SQF/dayz_code/actions/player_buildingDowngrade.sqf b/SQF/dayz_code/actions/player_buildingDowngrade.sqf index 2ce3541c0..f4dd1446a 100644 --- a/SQF/dayz_code/actions/player_buildingDowngrade.sqf +++ b/SQF/dayz_code/actions/player_buildingDowngrade.sqf @@ -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"; diff --git a/SQF/dayz_code/actions/player_tagFriendly.sqf b/SQF/dayz_code/actions/player_tagFriendly.sqf index 5a6f76b24..282ab0a7e 100644 --- a/SQF/dayz_code/actions/player_tagFriendly.sqf +++ b/SQF/dayz_code/actions/player_tagFriendly.sqf @@ -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 { diff --git a/SQF/dayz_code/actions/player_upgrade.sqf b/SQF/dayz_code/actions/player_upgrade.sqf index 0eec99eb1..b86b49d65 100644 --- a/SQF/dayz_code/actions/player_upgrade.sqf +++ b/SQF/dayz_code/actions/player_upgrade.sqf @@ -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]; }; diff --git a/SQF/dayz_code/actions/remove.sqf b/SQF/dayz_code/actions/remove.sqf index aa073f683..6423a4037 100644 --- a/SQF/dayz_code/actions/remove.sqf +++ b/SQF/dayz_code/actions/remove.sqf @@ -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); diff --git a/SQF/dayz_code/compile/A_Plot_for_Life/fn_check_owner.sqf b/SQF/dayz_code/compile/A_Plot_for_Life/fn_check_owner.sqf index ef53718a6..98d4f6ad4 100644 --- a/SQF/dayz_code/compile/A_Plot_for_Life/fn_check_owner.sqf +++ b/SQF/dayz_code/compile/A_Plot_for_Life/fn_check_owner.sqf @@ -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]; \ No newline at end of file +[_owner, _friendly] \ No newline at end of file diff --git a/SQF/dayz_code/compile/dze_buildChecks.sqf b/SQF/dayz_code/compile/dze_buildChecks.sqf index 7b76035eb..29a46a9f9 100644 --- a/SQF/dayz_code/compile/dze_buildChecks.sqf +++ b/SQF/dayz_code/compile/dze_buildChecks.sqf @@ -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; diff --git a/SQF/dayz_code/compile/dze_getPlotFriends.sqf b/SQF/dayz_code/compile/dze_getPlotFriends.sqf deleted file mode 100644 index a07d7c170..000000000 --- a/SQF/dayz_code/compile/dze_getPlotFriends.sqf +++ /dev/null @@ -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; \ No newline at end of file diff --git a/SQF/dayz_code/compile/fn_damageActions.sqf b/SQF/dayz_code/compile/fn_damageActions.sqf index 9a1d5f895..720c28baf 100644 --- a/SQF/dayz_code/compile/fn_damageActions.sqf +++ b/SQF/dayz_code/compile/fn_damageActions.sqf @@ -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; diff --git a/SQF/dayz_code/compile/fn_selfActions.sqf b/SQF/dayz_code/compile/fn_selfActions.sqf index b1ae5cc2e..82a29a82c 100644 --- a/SQF/dayz_code/compile/fn_selfActions.sqf +++ b/SQF/dayz_code/compile/fn_selfActions.sqf @@ -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]; }; diff --git a/SQF/dayz_code/compile/player_lockVault.sqf b/SQF/dayz_code/compile/player_lockVault.sqf index f1bfba18f..6c770a624 100644 --- a/SQF/dayz_code/compile/player_lockVault.sqf +++ b/SQF/dayz_code/compile/player_lockVault.sqf @@ -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]; }; diff --git a/SQF/dayz_code/compile/player_packTent.sqf b/SQF/dayz_code/compile/player_packTent.sqf index 9372f4d11..755bced51 100644 --- a/SQF/dayz_code/compile/player_packTent.sqf +++ b/SQF/dayz_code/compile/player_packTent.sqf @@ -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; diff --git a/SQF/dayz_code/compile/player_packVault.sqf b/SQF/dayz_code/compile/player_packVault.sqf index 7b7e45237..50e6479b8 100644 --- a/SQF/dayz_code/compile/player_packVault.sqf +++ b/SQF/dayz_code/compile/player_packVault.sqf @@ -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); diff --git a/SQF/dayz_code/compile/player_unlockVault.sqf b/SQF/dayz_code/compile/player_unlockVault.sqf index 2f48c5e23..2d5a6b991 100644 --- a/SQF/dayz_code/compile/player_unlockVault.sqf +++ b/SQF/dayz_code/compile/player_unlockVault.sqf @@ -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]; }; diff --git a/SQF/dayz_code/compile/player_updateGuiEpoch.sqf b/SQF/dayz_code/compile/player_updateGuiEpoch.sqf index f63082499..3685e8e22 100644 --- a/SQF/dayz_code/compile/player_updateGuiEpoch.sqf +++ b/SQF/dayz_code/compile/player_updateGuiEpoch.sqf @@ -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; }; diff --git a/SQF/dayz_code/configVariables.sqf b/SQF/dayz_code/configVariables.sqf index f51122e03..6abd95265 100644 --- a/SQF/dayz_code/configVariables.sqf +++ b/SQF/dayz_code/configVariables.sqf @@ -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: diff --git a/SQF/dayz_code/init/compiles.sqf b/SQF/dayz_code/init/compiles.sqf index a15f189d2..5774262ae 100644 --- a/SQF/dayz_code/init/compiles.sqf +++ b/SQF/dayz_code/init/compiles.sqf @@ -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"; diff --git a/SQF/dayz_code/init/publicEH.sqf b/SQF/dayz_code/init/publicEH.sqf index 1bed69193..ed2e0533d 100644 --- a/SQF/dayz_code/init/publicEH.sqf +++ b/SQF/dayz_code/init/publicEH.sqf @@ -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 { diff --git a/SQF/dayz_code/init/variables.sqf b/SQF/dayz_code/init/variables.sqf index 37469b836..7450e46d4 100644 --- a/SQF/dayz_code/init/variables.sqf +++ b/SQF/dayz_code/init/variables.sqf @@ -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;}; diff --git a/SQF/dayz_server/compile/server_updateObject.sqf b/SQF/dayz_server/compile/server_updateObject.sqf index 1a013ccdd..43ab31b37 100644 --- a/SQF/dayz_server/compile/server_updateObject.sqf +++ b/SQF/dayz_server/compile/server_updateObject.sqf @@ -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]; diff --git a/SQF/dayz_server/system/server_monitor.sqf b/SQF/dayz_server/system/server_monitor.sqf index 0f1642906..5f25e4686 100644 --- a/SQF/dayz_server/system/server_monitor.sqf +++ b/SQF/dayz_server/system/server_monitor.sqf @@ -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]; };