use self actions to spawn plot radius, fixes #1566

This commit is contained in:
icomrade
2016-05-02 23:06:50 -04:00
parent 3c0573258a
commit 3c27f76c7c
3 changed files with 24 additions and 22 deletions

View File

@@ -441,9 +441,9 @@ if (_canBuild select 0) then {
format[localize "str_build_01",_text] call dayz_rollingMessages;
if (_canBuild select 1) then { //if item was a plotpole, build a visual radius around it
[] spawn player_plotPreview;
};
//if (_canBuild select 1) then { //if item was a plotpole, build a visual radius around it
//[] spawn player_plotPreview; //handled in fn_SelfActions now
//};
_tmpbuilt setVariable ["OEMPos",_location,true]; //store original location as a variable

View File

@@ -382,9 +382,9 @@ if (_canBuild select 0) then {
format[localize "str_build_01",_text] call dayz_rollingMessages;
if (_canBuild select 1) then {
[] spawn player_plotPreview;
};
//if (_canBuild select 1) then {
//[] spawn player_plotPreview;
//};
_tmpbuilt setVariable ["OEMPos",_location,true];

View File

@@ -655,19 +655,19 @@ if (!isNull _cursorTarget && !_inVehicle && !_isPZombie && (player distance _cur
s_player_maintain_area_preview = player addAction [format["<t color='#ff0000'>%1</t>",localize "STR_EPOCH_ACTIONS_MAINTPREV"], "\z\addons\dayz_code\actions\maintain_area.sqf", "preview", 5, false];
};
};
if (DZE_plotforLife) then {
_plotDistance = (DZE_PlotPole select 0);
_PlotsmarkersNear = count (_cursorTarget nearEntities ["Land_coneLight", _PlotDistance]);
if (s_player_plot_boundary_on < 0) then {
If (_PlotsmarkersNear == 0 ) then{
s_player_plot_boundary_on = player addAction ["Show plot boundary", "\z\addons\dayz_code\actions\A_Plot_for_Life\object_showPlotRadius.sqf", "", 1, false];
};
};
if (s_player_plot_boundary_off < 0) then {
If (_PlotsmarkersNear > 0 ) then{
s_player_plot_boundary_off = player addAction ["Remove plot boundary", "\z\addons\dayz_code\actions\A_Plot_for_Life\object_removePlotRadius.sqf", "", 1, false];
};
_plotDistance = (DZE_PlotPole select 0);
_PlotsmarkersNear = count (_cursorTarget nearEntities ["Land_coneLight", _PlotDistance]);
if (s_player_plot_boundary_on < 0) then {
If (_PlotsmarkersNear == 0 ) then{
s_player_plot_boundary_on = player addAction ["Show plot boundary", "\z\addons\dayz_code\actions\A_Plot_for_Life\object_showPlotRadius.sqf", "", 1, false];
};
};
if (s_player_plot_boundary_off < 0) then {
If (_PlotsmarkersNear > 0 ) then{
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 (s_player_plot_take_ownership < 0) then {
if (DZE_PlotOwnership) then {
_isowner = [player, _cursorTarget, DZE_plotManagement] call FNC_check_owner; //compile also calls dze_getPlotFriends and lists s_player_plotManagement friendlies
@@ -1054,12 +1054,14 @@ if (!isNull _cursorTarget && !_inVehicle && !_isPZombie && (player distance _cur
};
} else {
//Engineering
// plotManagement //
player removeAction s_player_plot_boundary_on;
s_player_plot_boundary_on = -1;
player removeAction s_player_plot_boundary_off;
s_player_plot_boundary_off = -1;
player removeAction s_player_plot_take_ownership;
s_player_plot_take_ownership = -1;
player removeAction s_player_plotManagement;
s_player_plotManagement = -1;
// plotManagement //
{dayz_myCursorTarget removeAction _x} count s_player_repairActions;s_player_repairActions = [];
player removeAction s_player_repair_crtl;
s_player_repair_crtl = -1;