mirror of
https://github.com/EpochModTeam/DayZ-Epoch.git
synced 2025-12-25 01:49:19 +03:00
modular build code optimization + some extras
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
if(!DZE_ActionInProgress) exitWith {};
|
||||
//disallow building if these conditions are not met
|
||||
private ["_isFine","_onLadder","_vehicle","_inVehicle"];
|
||||
|
||||
@@ -10,24 +11,28 @@ if (dayz_isSwimming) exitWith { //end script if player is swimming
|
||||
DZE_ActionInProgress = false;
|
||||
cutText [localize "str_player_26", "PLAIN DOWN"];
|
||||
_isFine = "Swimming";
|
||||
_isFine
|
||||
};
|
||||
|
||||
if (_inVehicle) exitWith { //end script if player is in vehicle
|
||||
DZE_ActionInProgress = false;
|
||||
cutText [(localize "str_epoch_player_42"), "PLAIN DOWN"];
|
||||
_isFine = "In vehicle";
|
||||
_isFine
|
||||
};
|
||||
|
||||
if (_onLadder) exitWith { //end script if player is climbing on ladder
|
||||
DZE_ActionInProgress = false;
|
||||
cutText [localize "str_player_21", "PLAIN DOWN"];
|
||||
_isFine = "On ladder";
|
||||
_isFine
|
||||
};
|
||||
|
||||
if (player getVariable["combattimeout", 0] >= time) exitWith { //end script if player is in combat
|
||||
DZE_ActionInProgress = false;
|
||||
cutText [(localize "str_epoch_player_43"), "PLAIN DOWN"];
|
||||
_isFine = "In combat";
|
||||
_isFine
|
||||
};
|
||||
|
||||
_isFine //returns string to caller, default is "ok" if conditions were not met
|
||||
|
||||
Reference in New Issue
Block a user