mirror of
https://github.com/EpochModTeam/DayZ-Epoch.git
synced 2025-12-14 04:02:37 +03:00
Plot management fixes (#1735)
* Plot management fixes This hopefully adds a few more items to the maintain list (@icomrade) Uses epoch_returnChange to accurately and tidily return change and handle money. Localize maintain_area.sqf for single currency servers * Plot Management tidyness Fixing tidy issues * Plot management changes Fix maintenance variables as per @ebaydayz * Plot management Missed one * Plot management fixes and default maintain_area fixes. Convert original maintain_area.sqf to epoch_returnChange, I used the plot management localization strings since I liked them better, the epoch ones don't make a lot of sense really. Makes no difference if plot management is turned off anyway. Change the single currency version to work a lot better than it did, I put the cost per item to 100 to be more in line with what I would expect on a server Changed _range to use DZE_maintainRange (DZE_plotPole select 0 + 20)
This commit is contained in:
@@ -2,14 +2,18 @@ private ["_pos","_plots","_thePlot","_inList","_toAdd","_friends"];
|
||||
|
||||
_pos = _this select 0;
|
||||
if (_pos < 0) exitWith {};
|
||||
|
||||
_toAdd = (Humans select _pos);
|
||||
_plots = nearestObjects [[player] call FNC_getPos, ["Plastic_Pole_EP1_DZ"],15];
|
||||
|
||||
_thePlot = _plots select 0;
|
||||
_friends = _thePlot getVariable ["plotfriends",[]];
|
||||
_inList = false;
|
||||
|
||||
{ if ((_x select 0) == (_toAdd select 0)) exitWith { _inList = true; }; } count _friends;
|
||||
if (_inList) exitWith {localize "STR_EPOCH_PLOTMANAGEMENT_ADDFRIEND_ALREADYONTHELIST" call dayz_rollingMessages};
|
||||
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"];
|
||||
@@ -18,6 +22,5 @@ if (isServer) then {
|
||||
} else {
|
||||
publicVariableServer "PVDZ_veh_Save";
|
||||
};
|
||||
|
||||
call PlotGetFriends;
|
||||
call PlotNearbyHumans;
|
||||
call PlotNearbyHumans;
|
||||
|
||||
Reference in New Issue
Block a user