mirror of
https://github.com/EpochModTeam/DayZ-Epoch.git
synced 2025-12-14 12:12:34 +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:
@@ -1,19 +1,19 @@
|
||||
private ["_range","_buildables","_count","_colour","_result","_ctrl"];
|
||||
private ["_range","_buildables","_count","_colour","_ctrl","_target"];
|
||||
disableSerialization;
|
||||
|
||||
_range = DZE_PlotPole select 0;
|
||||
_buildables = DZE_maintainClasses + DZE_LockableStorage + ["DZ_buildables","DZ_storage_base"];
|
||||
_count = count (nearestObjects [[player] call FNC_getPos,_buildables,_range]);
|
||||
_target = nearestObject [[player] call FNC_getPos,"Plastic_Pole_EP1_DZ"];
|
||||
_buildables = DZE_maintainClasses;
|
||||
_count = count (nearestObjects [_target,_buildables,_range]);
|
||||
|
||||
_colour = "#ffffff";
|
||||
|
||||
if (_count / DZE_BuildingLimit * 100 < 40) then {
|
||||
_colour = "#00ff00";
|
||||
_colour = "#00ff00";
|
||||
};
|
||||
if (_count / DZE_BuildingLimit * 100 > 75) then {
|
||||
_colour = "#ff0000";
|
||||
_colour = "#ff0000";
|
||||
};
|
||||
|
||||
_ctrl = ((uiNamespace getVariable "PlotManagement") displayCtrl 7014);
|
||||
_result = format["<t color='%3'>%1 / %2</t>" , _count, DZE_BuildingLimit,_colour];
|
||||
_ctrl ctrlSetStructuredText parseText _result;
|
||||
_ctrl ctrlSetStructuredText parseText format["<t color='%3'>%1 / %2</t>" , _count, DZE_BuildingLimit,_colour];
|
||||
Reference in New Issue
Block a user