mirror of
https://github.com/EpochModTeam/DayZ-Epoch.git
synced 2026-04-18 02:06:39 +03:00
small change
This commit is contained in:
@@ -4,11 +4,11 @@
|
||||
*/
|
||||
private ["_location","_dir","_classname","_item","_hasrequireditem","_missing","_hastoolweapon","_cancel","_reason","_started","_finished","_animState","_isMedic","_dis","_sfx","_hasbuilditem","_tmpbuilt","_onLadder","_isWater","_require","_text","_offset","_IsNearPlot","_isOk","_location1","_location2","_counter","_limit","_proceed","_num_removed","_position","_object","_canBuildOnPlot","_friendlies","_nearestPole","_ownerID","_findNearestPoles","_findNearestPole","_distance","_classnametmp","_ghost","_isPole","_needText","_lockable","_zheightchanged","_rotate","_combination_1","_combination_2","_combination_3","_combination_4","_combination","_combination_1_Display","_combinationDisplay","_zheightdirection","_abort","_isNear","_need","_objHupDiff","_needNear","_vehicle","_inVehicle","_previewCounter","_requireplot","_objHDiff","_isLandFireDZ","_isTankTrap"];
|
||||
|
||||
if(TradeInprogress) exitWith { cutText [(localize "str_epoch_player_40") , "PLAIN DOWN"]; };
|
||||
TradeInprogress = true;
|
||||
if(DZE_ActionInProgress) exitWith { cutText [(localize "str_epoch_player_40") , "PLAIN DOWN"]; };
|
||||
DZE_ActionInProgress = true;
|
||||
|
||||
// disallow building if too many objects are found within 30m
|
||||
if((count ((position player) nearObjects ["All",30])) >= DZE_BuildingLimit) exitWith {TradeInprogress = false; cutText [(localize "str_epoch_player_41"), "PLAIN DOWN"];};
|
||||
if((count ((position player) nearObjects ["All",30])) >= DZE_BuildingLimit) exitWith {DZE_ActionInProgress = false; cutText [(localize "str_epoch_player_41"), "PLAIN DOWN"];};
|
||||
|
||||
_onLadder = (getNumber (configFile >> "CfgMovesMaleSdr" >> "States" >> (animationState player) >> "onLadder")) == 1;
|
||||
_isWater = dayz_isSwimming;
|
||||
@@ -37,10 +37,10 @@ DZE_cancelBuilding = false;
|
||||
call gear_ui_init;
|
||||
closeDialog 1;
|
||||
|
||||
if (_isWater) exitWith {TradeInprogress = false; cutText [localize "str_player_26", "PLAIN DOWN"];};
|
||||
if (_inVehicle) exitWith {TradeInprogress = false; cutText [(localize "str_epoch_player_42"), "PLAIN DOWN"];};
|
||||
if (_onLadder) exitWith {TradeInprogress = false; cutText [localize "str_player_21", "PLAIN DOWN"];};
|
||||
if (player getVariable["combattimeout", 0] >= time) exitWith {TradeInprogress = false; cutText [(localize "str_epoch_player_43"), "PLAIN DOWN"];};
|
||||
if (_isWater) exitWith {DZE_ActionInProgress = false; cutText [localize "str_player_26", "PLAIN DOWN"];};
|
||||
if (_inVehicle) exitWith {DZE_ActionInProgress = false; cutText [(localize "str_epoch_player_42"), "PLAIN DOWN"];};
|
||||
if (_onLadder) exitWith {DZE_ActionInProgress = false; cutText [localize "str_player_21", "PLAIN DOWN"];};
|
||||
if (player getVariable["combattimeout", 0] >= time) exitWith {DZE_ActionInProgress = false; cutText [(localize "str_epoch_player_43"), "PLAIN DOWN"];};
|
||||
|
||||
_item = _this;
|
||||
|
||||
@@ -85,7 +85,7 @@ _needNear = getArray (configFile >> "CfgMagazines" >> _item >> "ItemActions" >>
|
||||
|
||||
if(_abort) exitWith {
|
||||
cutText [format[(localize "str_epoch_player_135"),_reason,_distance], "PLAIN DOWN"];
|
||||
TradeInprogress = false;
|
||||
DZE_ActionInProgress = false;
|
||||
};
|
||||
|
||||
_classname = getText (configFile >> "CfgMagazines" >> _item >> "ItemActions" >> "Build" >> "create");
|
||||
@@ -137,7 +137,7 @@ _findNearestPole = [];
|
||||
_IsNearPlot = count (_findNearestPole);
|
||||
|
||||
// If item is plot pole and another one exists within 45m
|
||||
if(_isPole and _IsNearPlot > 0) exitWith { TradeInprogress = false; cutText [(localize "str_epoch_player_44") , "PLAIN DOWN"]; };
|
||||
if(_isPole and _IsNearPlot > 0) exitWith { DZE_ActionInProgress = false; cutText [(localize "str_epoch_player_44") , "PLAIN DOWN"]; };
|
||||
|
||||
if(_IsNearPlot == 0) then {
|
||||
|
||||
@@ -177,7 +177,7 @@ if(_IsNearPlot == 0) then {
|
||||
};
|
||||
|
||||
// _message
|
||||
if(!_canBuildOnPlot) exitWith { TradeInprogress = false; cutText [format[(localize "STR_EPOCH_PLAYER_135"),_needText,_distance] , "PLAIN DOWN"]; };
|
||||
if(!_canBuildOnPlot) exitWith { DZE_ActionInProgress = false; cutText [format[(localize "STR_EPOCH_PLAYER_135"),_needText,_distance] , "PLAIN DOWN"]; };
|
||||
|
||||
_missing = "";
|
||||
_hasrequireditem = true;
|
||||
@@ -187,9 +187,9 @@ _hasrequireditem = true;
|
||||
} forEach _require;
|
||||
|
||||
_hasbuilditem = _this in magazines player;
|
||||
if (!_hasbuilditem) exitWith {TradeInprogress = false; cutText [format[(localize "str_player_31"),_text,"build"] , "PLAIN DOWN"]; };
|
||||
if (!_hasbuilditem) exitWith {DZE_ActionInProgress = false; cutText [format[(localize "str_player_31"),_text,"build"] , "PLAIN DOWN"]; };
|
||||
|
||||
if (!_hasrequireditem) exitWith {TradeInprogress = false; cutText [format[(localize "str_epoch_player_137"),_missing] , "PLAIN DOWN"]; };
|
||||
if (!_hasrequireditem) exitWith {DZE_ActionInProgress = false; cutText [format[(localize "str_epoch_player_137"),_missing] , "PLAIN DOWN"]; };
|
||||
if (_hasrequireditem) then {
|
||||
|
||||
_location = [0,0,0];
|
||||
@@ -561,4 +561,4 @@ if (_hasrequireditem) then {
|
||||
};
|
||||
};
|
||||
|
||||
TradeInprogress = false;
|
||||
DZE_ActionInProgress = false;
|
||||
|
||||
Reference in New Issue
Block a user