diff --git a/SQF/dayz_code/actions/plotManagement/maintain_area.sqf b/SQF/dayz_code/actions/plotManagement/maintain_area.sqf index 764cf0fce..a9d6ab2fc 100644 --- a/SQF/dayz_code/actions/plotManagement/maintain_area.sqf +++ b/SQF/dayz_code/actions/plotManagement/maintain_area.sqf @@ -1,4 +1,4 @@ -private ["_objectID","_objectUID","_target","_objectClasses","_range","_objects","_requirements","_count","_objects_filtered","_ctrl","_itemText","_type","_amount","_success","_theCost","_wealth","_message1","_message2"]; +private ["_objectID","_objectUID","_target","_objectClasses","_range","_objects","_requirements","_count","_objects_filtered","_ctrl","_itemText","_type","_amount","_success","_theCost","_wealth","_message1","_message2","_option"]; disableSerialization; if (DZE_ActionInProgress) exitWith {localize "STR_EPOCH_ACTIONS_2" call dayz_rollingMessages;}; @@ -10,7 +10,6 @@ player removeAction s_player_maintain_area_preview; s_player_maintain_area_preview = 1; _target = nearestObject [[player] call FNC_getPos,"Plastic_Pole_EP1_DZ"]; - _objectClasses = DZE_maintainClasses; _range = DZE_maintainRange; // set the max range for the maintain area _objects = nearestObjects [_target, _objectClasses, _range]; @@ -76,7 +75,9 @@ if (Z_SingleCurrency) then { }; }; -switch _this do { +_option = if (typeName _this == "ARRAY") then {_this select 3} else {_this}; + +switch _option do { case "maintain": { _success = if (Z_SingleCurrency) then {_theCost <= _wealth} else {[[[_type, _amount]],0] call epoch_returnChange}; diff --git a/SQF/dayz_code/compile/fn_selfActions.sqf b/SQF/dayz_code/compile/fn_selfActions.sqf index 05da1d855..6f8b23548 100644 --- a/SQF/dayz_code/compile/fn_selfActions.sqf +++ b/SQF/dayz_code/compile/fn_selfActions.sqf @@ -646,8 +646,8 @@ if (!isNull _cursorTarget && !_inVehicle && !_isPZombie && (player distance _cur }; } else { if (s_player_maintain_area < 0) then { - s_player_maintain_area = player addAction [format["%1",localize "STR_EPOCH_ACTIONS_MAINTAREA"], "'maintain' call MaintainPlot", [], 5, false]; - s_player_maintain_area_preview = player addAction [format["%1",localize "STR_EPOCH_ACTIONS_MAINTPREV"], "'preview' call MaintainPlot", [], 5, false]; + s_player_maintain_area = player addAction [format["%1",localize "STR_EPOCH_ACTIONS_MAINTAREA"], "\z\addons\dayz_code\actions\plotManagement\maintain_area.sqf", "maintain", 5, false]; + s_player_maintain_area_preview = player addAction [format["%1",localize "STR_EPOCH_ACTIONS_MAINTPREV"], "\z\addons\dayz_code\actions\plotManagement\maintain_area.sqf", "preview", 5, false]; }; }; _PlotsmarkersNear = count (_cursorTarget nearEntities ["Land_coneLight", DZE_PlotPole select 0]);