From 1a238d1719a7dcaaa4eaf238b6a7b45b16c6f429 Mon Sep 17 00:00:00 2001 From: ebaydayz Date: Wed, 18 May 2016 20:20:20 -0400 Subject: [PATCH] Fix wrong buildables count displayed in plot management --- SQF/dayz_code/actions/plotManagement/plotAddFriend.sqf | 3 +-- SQF/dayz_code/actions/plotManagement/plotObjects.sqf | 5 +++-- SQF/dayz_code/actions/plotManagement/plotRemoveFriend.sqf | 3 +-- 3 files changed, 5 insertions(+), 6 deletions(-) diff --git a/SQF/dayz_code/actions/plotManagement/plotAddFriend.sqf b/SQF/dayz_code/actions/plotManagement/plotAddFriend.sqf index 248d731b3..6904802a7 100644 --- a/SQF/dayz_code/actions/plotManagement/plotAddFriend.sqf +++ b/SQF/dayz_code/actions/plotManagement/plotAddFriend.sqf @@ -11,11 +11,10 @@ if (_inList) exitWith {localize "STR_EPOCH_PLOTMANAGEMENT_ADDFRIEND_ALREADYONTHE if ((count _friends) == DZE_MaxPlotFriends) exitWith { format[localize "STR_EPOCH_PLOTMANAGEMENT_ADDFRIEND_FRIENDLIMIT", DZE_MaxPlotFriends] call dayz_rollingMessages;}; _friends set [(count _friends), _toAdd]; _thePlot setVariable ["plotfriends", _friends, true]; - +PVDZ_veh_Save = [_thePlot,"gear"]; if (isServer) then { PVDZ_veh_Save call server_updateObject; } else { - PVDZ_veh_Save = [_thePlot,"gear"]; publicVariableServer "PVDZ_veh_Save"; }; diff --git a/SQF/dayz_code/actions/plotManagement/plotObjects.sqf b/SQF/dayz_code/actions/plotManagement/plotObjects.sqf index 4c95d8449..c909257ac 100644 --- a/SQF/dayz_code/actions/plotManagement/plotObjects.sqf +++ b/SQF/dayz_code/actions/plotManagement/plotObjects.sqf @@ -1,8 +1,9 @@ -private ["_newWealth","_missing","_missingQty","_proceed","_itemIn","_countIn","_target","_objectClasses","_range","_objects","_requirements","_count","_cost","_option"]; +private ["_newWealth","_missing","_missingQty","_proceed","_itemIn","_countIn","_target","_objectClasses","_range","_objects","_requirements","_count","_cost","_option","_buildables"]; disableSerialization; _range = DZE_PlotPole select 0; -_count = count ((getPosATL player) nearObjects ["All",_range]); +_buildables = DZE_maintainClasses + DZE_LockableStorage + ["DZ_buildables","DZ_storage_base"]; +_count = count (nearestObjects [[player] call FNC_getPos,_buildables,_range]); _colour = "#ffffff"; diff --git a/SQF/dayz_code/actions/plotManagement/plotRemoveFriend.sqf b/SQF/dayz_code/actions/plotManagement/plotRemoveFriend.sqf index def1c6da9..91e20a435 100644 --- a/SQF/dayz_code/actions/plotManagement/plotRemoveFriend.sqf +++ b/SQF/dayz_code/actions/plotManagement/plotRemoveFriend.sqf @@ -13,11 +13,10 @@ _newList = []; }; } count _friends; _thePlot setVariable ["plotfriends", _newList, true]; - +PVDZ_veh_Save = [_thePlot,"gear"]; if (isServer) then { PVDZ_veh_Save call server_updateObject; } else { - PVDZ_veh_Save = [_thePlot,"gear"]; publicVariableServer "PVDZ_veh_Save"; };