mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
fix exitWith capitalization
This commit is contained in:
parent
0b84bb514b
commit
34d351c652
@ -19,7 +19,7 @@
|
||||
params ["_unit","_state"];
|
||||
TRACE_2("params",_unit,_state);
|
||||
|
||||
if (!local _unit) exitwith {
|
||||
if (!local _unit) exitWith {
|
||||
ERROR("running setHandcuffed on remote unit");
|
||||
};
|
||||
if ((_unit getVariable [QGVAR(isHandcuffed), false]) isEqualTo _state) exitWith {
|
||||
|
@ -19,7 +19,7 @@
|
||||
params ["_unit","_state"];
|
||||
TRACE_2("params",_unit,_state);
|
||||
|
||||
if (!local _unit) exitwith {
|
||||
if (!local _unit) exitWith {
|
||||
ERROR("running surrender on remote unit");
|
||||
};
|
||||
|
||||
|
@ -22,7 +22,7 @@ private ["_defaultLoglevel", "_defaultLogDisplayLevel"];
|
||||
|
||||
_defaultLoglevel = [GVAR(LOGLEVEL), DEFAULT_LOGGING_LEVEL] select isNil QGVAR(LOGLEVEL);
|
||||
|
||||
if (_defaultLoglevel < 0) exitwith {false};
|
||||
if (_defaultLoglevel < 0) exitWith {false};
|
||||
|
||||
_defaultLogDisplayLevel = [GVAR(LOGDISPLAY_LEVEL), DEFAULT_TEXT_DISPLAY] select isNil QGVAR(LOGDISPLAY_LEVEL);
|
||||
|
||||
|
@ -21,7 +21,7 @@ params ["_name", "_value", "_defaultGlobal", "_category", ["_code", 0], ["_persi
|
||||
|
||||
if (isNil "_defaultGlobal") exitWith {};
|
||||
|
||||
if (typeName _name != "STRING") exitwith {
|
||||
if (typeName _name != "STRING") exitWith {
|
||||
[format ["Tried to the deinfe a variable with an invalid name: %1 Arguments: %2", _name, _this]] call FUNC(debug);
|
||||
};
|
||||
|
||||
|
@ -97,7 +97,7 @@ if (_show) then {
|
||||
_list pushBack [_iconId, _icon, _color, ACE_time];
|
||||
} else {
|
||||
{
|
||||
if (_x select 0 == _iconId) exitwith {
|
||||
if (_x select 0 == _iconId) exitWith {
|
||||
_list set [_forEachIndex, [_iconId, _icon, _color, ACE_time]];
|
||||
};
|
||||
} forEach _list;
|
||||
|
@ -20,7 +20,7 @@
|
||||
|
||||
params ["_object", ["_category", ""]];
|
||||
|
||||
if (isNil QGVAR(OBJECT_VARIABLES_STORAGE)) exitwith {[]};
|
||||
if (isNil QGVAR(OBJECT_VARIABLES_STORAGE)) exitWith {[]};
|
||||
|
||||
private ["_return", "_val"];
|
||||
|
||||
|
@ -17,7 +17,7 @@ params ["_varName"];
|
||||
private "_variableDefinition";
|
||||
_variableDefinition = [_varName] call FUNC(getDefinedVariableInfo);
|
||||
|
||||
if !(_variableDefinition isEqualTo []) exitwith {
|
||||
if !(_variableDefinition isEqualTo []) exitWith {
|
||||
_variableDefinition select 1;
|
||||
};
|
||||
|
||||
|
@ -21,7 +21,7 @@ private ["_vehicle", "_loadcar", "_loadair", "_loadtank", "_loadboat"];
|
||||
|
||||
_vehicle = objNull;
|
||||
|
||||
if (!([_caller, _unit, ["isNotDragging", "isNotCarrying"]] call FUNC(canInteractWith)) || {_caller == _unit}) exitwith {_vehicle};
|
||||
if (!([_caller, _unit, ["isNotDragging", "isNotCarrying"]] call FUNC(canInteractWith)) || {_caller == _unit}) exitWith {_vehicle};
|
||||
|
||||
_loadcar = nearestObject [_unit, "Car"];
|
||||
|
||||
|
@ -16,7 +16,7 @@ private "_fnc_parseConfigForDisplayNames";
|
||||
_fnc_parseConfigForDisplayNames = {
|
||||
params ["_optionEntry"];
|
||||
|
||||
if !(isClass _optionEntry) exitwith {false};
|
||||
if !(isClass _optionEntry) exitWith {false};
|
||||
|
||||
private "_values";
|
||||
_values = getArray (_optionEntry >> "values");
|
||||
|
@ -23,7 +23,7 @@ if (isNil "_global") then {
|
||||
_definedVariable params ["", "", ["_global", false]];
|
||||
};
|
||||
|
||||
if (!isNil "_value") exitwith {
|
||||
if (!isNil "_value") exitWith {
|
||||
_unit setVariable [_variable, _value, _global];
|
||||
};
|
||||
|
||||
|
@ -27,7 +27,7 @@ if (_switch) then {
|
||||
_previousGroup = group _unit;
|
||||
_originalSide = side group _unit;
|
||||
|
||||
if (count units _previousGroup == 1 && _originalSide == _side) exitwith {
|
||||
if (count units _previousGroup == 1 && _originalSide == _side) exitWith {
|
||||
[format ["Current group has only 1 member and is of same side as switch. Not switching unit %1", _id]] call FUNC(debug);
|
||||
};
|
||||
|
||||
@ -41,7 +41,7 @@ if (_switch) then {
|
||||
private ["_currentGroup", "_newGroup"];
|
||||
|
||||
{
|
||||
if (_id == (_x select 2)) exitwith {
|
||||
if (_id == (_x select 2)) exitWith {
|
||||
_x set [ 3, false];
|
||||
_previousGroupsList set [_forEachIndex, _x];
|
||||
[format["found group with ID: %1", _id]] call FUNC(debug);
|
||||
@ -51,7 +51,7 @@ if (_switch) then {
|
||||
reverse _previousGroupsList;
|
||||
|
||||
{
|
||||
if (_x select 3) exitwith {}; // stop at first id set to true
|
||||
if (_x select 3) exitWith {}; // stop at first id set to true
|
||||
if !(_x select 3) then {
|
||||
_currentGroup = group _unit;
|
||||
if (!isNull (_x select 0)) then {
|
||||
|
@ -51,12 +51,12 @@ if (_vehicle isKindOf "Ship") then {
|
||||
|
||||
TRACE_1("getPosASL Vehicle Check", getPosASL _vehicle);
|
||||
|
||||
if !(_validVehiclestate) exitwith {
|
||||
if !(_validVehiclestate) exitWith {
|
||||
ACE_LOGWARNING_4("Unable to unload patient because invalid (%1) vehicle state. Either moving or Not close enough on the ground. position: %2 isTouchingGround: %3 Speed: %4",_vehicle,getPos _vehicle,isTouchingGround _vehicle,speed _vehicle);
|
||||
false
|
||||
};
|
||||
|
||||
if (count _emptyPos == 0) exitwith {
|
||||
if (count _emptyPos == 0) exitWith {
|
||||
ACE_LOGWARNING_1("No safe empty spots to unload patient. %1",_emptyPos);
|
||||
false
|
||||
}; //consider displaying text saying there are no safe places to exit the vehicle
|
||||
|
@ -15,7 +15,7 @@
|
||||
#include "script_component.hpp"
|
||||
|
||||
// If the cursorMenu is open, the loading bar will fail. If we execute the function one frame later, it will work fine
|
||||
if (uiNamespace getVariable [QEGVAR(interact_menu,cursorMenuOpened),false]) exitwith {
|
||||
if (uiNamespace getVariable [QEGVAR(interact_menu,cursorMenuOpened),false]) exitWith {
|
||||
[{
|
||||
_this call FUNC(dismount);
|
||||
}, _this] call EFUNC(common,execNextFrame);
|
||||
|
@ -29,7 +29,7 @@ private ["_xGrid", "_yGrid", "_dagrGrid", "_bearing", "_dagrDist", "_dagrElevati
|
||||
|
||||
__background ctrlSetText QUOTE(PATHTOF(UI\dagr_vector.paa));
|
||||
|
||||
if (GVAR(noVectorData)) exitwith {};
|
||||
if (GVAR(noVectorData)) exitWith {};
|
||||
GVAR(LAZPOS) params ["_lazPosX", "_lazPosY", "_lazPosZ"];
|
||||
|
||||
// Incase grids go neg due to 99-00 boundry
|
||||
|
@ -20,7 +20,7 @@ params ["_caller", "_target"];
|
||||
private "_display";
|
||||
#define DEFUALTPATH "\A3\Ui_f\data\GUI\Cfg\Ranks\%1_gs.paa"
|
||||
//Sanity Checks
|
||||
if (_caller != ACE_player) exitwith {ERROR("Player isn't caller?");};
|
||||
if (_caller != ACE_player) exitWith {ERROR("Player isn't caller?");};
|
||||
if (!([_player, _target] call FUNC(canPlayerDisarmUnit))) exitWith {ERROR("Can't Disarm Unit");};
|
||||
if (dialog) then {ERROR("Dialog open when trying to open disarm dialog"); closeDialog 0;};
|
||||
|
||||
|
@ -57,7 +57,7 @@ _startingAmmoCounts = [];
|
||||
};
|
||||
} forEach (magazinesAmmoFull _player);
|
||||
|
||||
if ((count _startingAmmoCounts) < 2) exitwith {ERROR("Not Enough Mags to Repack");};
|
||||
if ((count _startingAmmoCounts) < 2) exitWith {ERROR("Not Enough Mags to Repack");};
|
||||
|
||||
_simEvents = [_fullMagazineCount, _startingAmmoCounts, _isBelt] call FUNC(simulateRepackEvents);
|
||||
_totalTime = (_simEvents select ((count _simEvents) - 1) select 0);
|
||||
|
@ -160,7 +160,7 @@ GVAR(lastHeartBeatSound) = ACE_time;
|
||||
if (GVAR(level) == 1) then {
|
||||
_heartRate = 60 + 40 * _pain;
|
||||
};
|
||||
if (_heartRate <= 0) exitwith {};
|
||||
if (_heartRate <= 0) exitWith {};
|
||||
_interval = 60 / (_heartRate min 40);
|
||||
|
||||
if ((ACE_player getVariable ["ACE_isUnconscious", false])) then {
|
||||
@ -246,7 +246,7 @@ GVAR(lastHeartBeatSound) = ACE_time;
|
||||
};
|
||||
|
||||
["SettingsInitialized", {
|
||||
if (GVAR(level) == 2) exitwith {
|
||||
if (GVAR(level) == 2) exitWith {
|
||||
[
|
||||
{(((_this select 0) getvariable [QGVAR(bloodVolume), 100]) < 65)},
|
||||
{(((_this select 0) getvariable [QGVAR(pain), 0]) - ((_this select 0) getvariable [QGVAR(painSuppress), 0])) > 0.9},
|
||||
|
@ -17,7 +17,7 @@
|
||||
private "_vehicle";
|
||||
params ["_caller", "_target"];
|
||||
|
||||
if ([_target] call EFUNC(common,isAwake)) exitwith {
|
||||
if ([_target] call EFUNC(common,isAwake)) exitWith {
|
||||
["displayTextStructured", [_caller], [[LSTRING(CanNotLoaded), [_target] call EFUNC(common,getName)], 1.5, _caller]] call EFUNC(common,targetEvent);
|
||||
};
|
||||
if ([_target] call FUNC(isBeingCarried)) then {
|
||||
|
@ -23,7 +23,7 @@ _part = [_selectionName] call FUNC(selectionNameToNumber);
|
||||
_tourniquets = _target getvariable [QGVAR(tourniquets), [0,0,0,0,0,0]];
|
||||
|
||||
// Check if there is a tourniquet on this bodypart
|
||||
if ((_tourniquets select _part) == 0) exitwith {
|
||||
if ((_tourniquets select _part) == 0) exitWith {
|
||||
_output = LSTRING(noTourniquetOnBodyPart);
|
||||
["displayTextStructured", [_caller], [_output, 1.5, _caller]] call EFUNC(common,targetEvent);
|
||||
};
|
||||
|
@ -18,7 +18,7 @@
|
||||
params ["_caller", "_target", ["_drag", false]];
|
||||
|
||||
// cannot unload a unit not in a vehicle.
|
||||
if (vehicle _target == _target) exitwith {};
|
||||
if (([_target] call EFUNC(common,isAwake))) exitwith {};
|
||||
if (vehicle _target == _target) exitWith {};
|
||||
if (([_target] call EFUNC(common,isAwake))) exitWith {};
|
||||
|
||||
["unloadPersonEvent", _target, [_target, vehicle _target]] call EFUNC(common,targetEvent)
|
||||
|
@ -17,11 +17,11 @@ params ["_unit", ["_force", false]];
|
||||
|
||||
if ([_unit] call FUNC(hasMedicalEnabled) || _force) then {
|
||||
|
||||
if !(local _unit) exitwith {
|
||||
if !(local _unit) exitWith {
|
||||
[[_unit, _force], QUOTE(DFUNC(addToInjuredCollection)), _unit] call EFUNC(common,execRemoteFnc); /* TODO Replace by event system */
|
||||
};
|
||||
|
||||
if ((_unit getvariable[QGVAR(addedToUnitLoop),false] || !alive _unit) && !_force) exitwith{};
|
||||
if ((_unit getvariable[QGVAR(addedToUnitLoop),false] || !alive _unit) && !_force) exitWith{};
|
||||
_unit setvariable [QGVAR(addedToUnitLoop), true, true];
|
||||
|
||||
[{
|
||||
|
@ -19,7 +19,7 @@
|
||||
private ["_moment", "_logVarName", "_log","_newLog", "_logs"];
|
||||
params ["_unit", "_type", "_message", "_arguments"];
|
||||
|
||||
if (!local _unit) exitwith {
|
||||
if (!local _unit) exitWith {
|
||||
[_this, QFUNC(addToLog), _unit] call EFUNC(common,execRemoteFnc); /* TODO Replace by event system */
|
||||
};
|
||||
|
||||
|
@ -17,7 +17,7 @@
|
||||
private ["_log", "_inList", "_amount"];
|
||||
params ["_unit", "_newItem"];
|
||||
|
||||
if (!local _unit) exitwith {
|
||||
if (!local _unit) exitWith {
|
||||
[_this, QUOTE(DFUNC(addToTriageCard)), _unit] call EFUNC(common,execRemoteFnc); /* TODO Replace by event system */
|
||||
};
|
||||
|
||||
@ -25,7 +25,7 @@ _log = _unit getvariable [QGVAR(triageCard), []];
|
||||
_inList = false;
|
||||
_amount = 1;
|
||||
{
|
||||
if ((_x select 0) == _newItem) exitwith {
|
||||
if ((_x select 0) == _newItem) exitWith {
|
||||
private "_info";
|
||||
_info = _log select _foreachIndex;
|
||||
_info set [1,(_info select 1) + 1];
|
||||
|
@ -22,9 +22,9 @@ _accessLevel = _target getvariable [QGVAR(allowSharedEquipmentAccess), -1];
|
||||
_return = false;
|
||||
|
||||
if (_accessLevel >= 0) then {
|
||||
if (_accessLevel == 0) exitwith { _return = true; };
|
||||
if (_accessLevel == 1) exitwith { _return = (side _target == side _caller); };
|
||||
if (_accessLevel == 2) exitwith { _return = (group _target == group _caller); };
|
||||
if (_accessLevel == 0) exitWith { _return = true; };
|
||||
if (_accessLevel == 1) exitWith { _return = (side _target == side _caller); };
|
||||
if (_accessLevel == 2) exitWith { _return = (group _target == group _caller); };
|
||||
};
|
||||
|
||||
_return;
|
||||
|
@ -27,27 +27,27 @@ if !(_target isKindOf "CAManBase") exitWith { false };
|
||||
|
||||
_config = (ConfigFile >> "ACE_Medical_Actions" >> (["Basic", "Advanced"] select (GVAR(level)>=2)) >> _className);
|
||||
|
||||
if !(isClass _config) exitwith {false};
|
||||
if !(isClass _config) exitWith {false};
|
||||
|
||||
// Allow self treatment check
|
||||
if (_caller == _target && {getNumber (_config >> "allowSelfTreatment") == 0}) exitwith {false};
|
||||
if (_caller == _target && {getNumber (_config >> "allowSelfTreatment") == 0}) exitWith {false};
|
||||
|
||||
_medicRequired = if (isNumber (_config >> "requiredMedic")) then {
|
||||
getNumber (_config >> "requiredMedic");
|
||||
} else {
|
||||
// Check for required class
|
||||
if (isText (_config >> "requiredMedic")) exitwith {
|
||||
if (isText (_config >> "requiredMedic")) exitWith {
|
||||
missionNamespace getvariable [(getText (_config >> "requiredMedic")), 0]
|
||||
};
|
||||
0;
|
||||
};
|
||||
if !([_caller, _medicRequired] call FUNC(isMedic)) exitwith { false };
|
||||
if !([_caller, _medicRequired] call FUNC(isMedic)) exitWith { false };
|
||||
|
||||
_items = getArray (_config >> "items");
|
||||
if (count _items > 0 && {!([_caller, _target, _items] call FUNC(hasItems))}) exitwith { false };
|
||||
if (count _items > 0 && {!([_caller, _target, _items] call FUNC(hasItems))}) exitWith { false };
|
||||
|
||||
_allowedSelections = getArray (_config >> "allowedSelections");
|
||||
if !("All" in _allowedSelections || {(_selectionName in _allowedSelections)}) exitwith { false };
|
||||
if !("All" in _allowedSelections || {(_selectionName in _allowedSelections)}) exitWith { false };
|
||||
|
||||
_return = true;
|
||||
if (getText (_config >> "condition") != "") then {
|
||||
@ -63,27 +63,27 @@ if (getText (_config >> "condition") != "") then {
|
||||
_return = [_caller, _target, _selectionName, _className] call _condition;
|
||||
};
|
||||
};
|
||||
if (!_return) exitwith { false };
|
||||
if (!_return) exitWith { false };
|
||||
|
||||
_patientStateCondition = if (isText(_config >> "patientStateCondition")) then {
|
||||
missionNamespace getvariable [getText(_config >> "patientStateCondition"), 0]
|
||||
} else {
|
||||
getNumber(_config >> "patientStateCondition")
|
||||
};
|
||||
if (_patientStateCondition == 1 && {!([_target] call FUNC(isInStableCondition))}) exitwith {false};
|
||||
if (_patientStateCondition == 1 && {!([_target] call FUNC(isInStableCondition))}) exitWith {false};
|
||||
|
||||
_locations = getArray (_config >> "treatmentLocations");
|
||||
if ("All" in _locations) exitwith { true };
|
||||
if ("All" in _locations) exitWith { true };
|
||||
|
||||
private [ "_medFacility", "_medVeh"];
|
||||
_medFacility = {([_caller] call FUNC(isInMedicalFacility)) || ([_target] call FUNC(isInMedicalFacility))};
|
||||
_medVeh = {([_caller] call FUNC(isInMedicalVehicle)) || ([_target] call FUNC(isInMedicalVehicle))};
|
||||
|
||||
{
|
||||
if (_x == "field") exitwith {_return = true;};
|
||||
if (_x == "MedicalFacility" && _medFacility) exitwith {_return = true;};
|
||||
if (_x == "MedicalVehicle" && _medVeh) exitwith {_return = true;};
|
||||
if !(isnil _x) exitwith {
|
||||
if (_x == "field") exitWith {_return = true;};
|
||||
if (_x == "MedicalFacility" && _medFacility) exitWith {_return = true;};
|
||||
if (_x == "MedicalVehicle" && _medVeh) exitWith {_return = true;};
|
||||
if !(isnil _x) exitWith {
|
||||
private "_val";
|
||||
_val = missionNamespace getvariable _x;
|
||||
if (typeName _val == "SCALAR") then {
|
||||
|
@ -17,7 +17,7 @@
|
||||
private ["_newUnit", "_class", "_group", "_position", "_side", "_name"];
|
||||
params ["_oldBody", "_caller"];
|
||||
|
||||
if (alive _oldBody) exitwith {_oldBody}; // we only want to do this for dead bodies
|
||||
if (alive _oldBody) exitWith {_oldBody}; // we only want to do this for dead bodies
|
||||
|
||||
_name = _oldBody getvariable ["ACE_name", "unknown"];
|
||||
_class = typeof _oldBody;
|
||||
|
@ -24,17 +24,17 @@
|
||||
private ["_config", "_litter", "_createLitter", "_position", "_createdLitter"];
|
||||
params ["_caller", "_target", "_selectionName", "_className", "", "_usersOfItems", "_previousDamage"];
|
||||
|
||||
if !(GVAR(allowLitterCreation)) exitwith {};
|
||||
if (vehicle _caller != _caller || vehicle _target != _target) exitwith {};
|
||||
if !(GVAR(allowLitterCreation)) exitWith {};
|
||||
if (vehicle _caller != _caller || vehicle _target != _target) exitWith {};
|
||||
|
||||
_config = (configFile >> "ACE_Medical_Actions" >> "Basic" >> _className);
|
||||
if (GVAR(level) >= 2) then {
|
||||
_config = (configFile >> "ACE_Medical_Actions" >> "Advanced" >> _className);
|
||||
};
|
||||
if !(isClass _config) exitwith {false};
|
||||
if !(isClass _config) exitWith {false};
|
||||
|
||||
|
||||
if !(isArray (_config >> "litter")) exitwith {};
|
||||
if !(isArray (_config >> "litter")) exitWith {};
|
||||
_litter = getArray (_config >> "litter");
|
||||
|
||||
_createLitter = {
|
||||
@ -60,7 +60,7 @@ _createLitter = {
|
||||
_createdLitter = [];
|
||||
{
|
||||
if (typeName _x == "ARRAY") then {
|
||||
if (count _x < MIN_ENTRIES_LITTER_CONFIG) exitwith {};
|
||||
if (count _x < MIN_ENTRIES_LITTER_CONFIG) exitWith {};
|
||||
|
||||
_x params ["_selection", "_litterCondition", "_litterOptions"];
|
||||
|
||||
@ -72,7 +72,7 @@ _createdLitter = [];
|
||||
_litterCondition = missionNamespace getvariable _litterCondition;
|
||||
if (typeName _litterCondition != "CODE") then {_litterCondition = {false}};
|
||||
};
|
||||
if !([_caller, _target, _selectionName, _className, _usersOfItems, _previousDamage] call _litterCondition) exitwith {};
|
||||
if !([_caller, _target, _selectionName, _className, _usersOfItems, _previousDamage] call _litterCondition) exitWith {};
|
||||
|
||||
if (typeName _litterOptions == "ARRAY") then {
|
||||
// Loop through through the litter options and place the litter
|
||||
|
@ -25,9 +25,9 @@
|
||||
private ["_damageThreshold", "_damageBodyPart", "_chanceFatal"];
|
||||
params ["_unit", "_part", ["_withDamage", 0]];
|
||||
|
||||
if (!alive _unit) exitwith {true};
|
||||
if (_part < 0 || _part > 5) exitwith {false};
|
||||
if ((vehicle _unit != _unit) && {!alive (vehicle _unit)}) exitwith { true };
|
||||
if (!alive _unit) exitWith {true};
|
||||
if (_part < 0 || _part > 5) exitWith {false};
|
||||
if ((vehicle _unit != _unit) && {!alive (vehicle _unit)}) exitWith { true };
|
||||
|
||||
// Find the correct Damage threshold for unit.
|
||||
_damageThreshold = [1,1,1];
|
||||
@ -41,13 +41,13 @@ _damageThreshold params ["_thresholdHead", "_thresholdTorso", "_thresholdLimbs"
|
||||
_damageBodyPart = ((_unit getvariable [QGVAR(bodyPartStatus),[0, 0, 0, 0, 0, 0]]) select _part) + _withDamage;
|
||||
|
||||
// Check if damage to body part is higher as damage head
|
||||
if (_part == 0) exitwith {
|
||||
if (_part == 0) exitWith {
|
||||
_chanceFatal = CHANGE_FATAL_HEAD + ((INCREASE_CHANCE_HEAD * (_damageBodyPart - _thresholdHead)) * 10);
|
||||
(_damageBodyPart >= _thresholdHead && {(_chanceFatal >= random(1))});
|
||||
};
|
||||
|
||||
// Check if damage to body part is higher as damage torso
|
||||
if (_part == 1) exitwith {
|
||||
if (_part == 1) exitWith {
|
||||
_chanceFatal = CHANGE_FATAL_TORSO + ((INCREASE_CHANCE_TORSO * (_damageBodyPart - _thresholdTorso)) * 10);
|
||||
(_damageBodyPart >= _thresholdTorso && {(_chanceFatal >= random(1))});
|
||||
};
|
||||
|
@ -36,10 +36,10 @@ if (_show) then {
|
||||
params ["_args", "_idPFH"];
|
||||
_args params ["_target", "_selectionN"];
|
||||
|
||||
if (GVAR(displayPatientInformationTarget) != _target || GVAR(currentSelectedSelectionN) != _selectionN) exitwith {
|
||||
if (GVAR(displayPatientInformationTarget) != _target || GVAR(currentSelectedSelectionN) != _selectionN) exitWith {
|
||||
[_idPFH] call CBA_fnc_removePerFrameHandler;
|
||||
};
|
||||
if (ACE_player distance _target > MAX_DISTANCE) exitwith {
|
||||
if (ACE_player distance _target > MAX_DISTANCE) exitWith {
|
||||
("ACE_MedicalRscDisplayInformation" call BIS_fnc_rscLayer) cutText ["","PLAIN"];
|
||||
[_idPFH] call CBA_fnc_removePerFrameHandler;
|
||||
["displayTextStructured", [ACE_player], [[LSTRING(DistanceToFar), [_target] call EFUNC(common,getName)], 1.75, ACE_player]] call EFUNC(common,targetEvent);
|
||||
@ -47,7 +47,7 @@ if (_show) then {
|
||||
|
||||
disableSerialization;
|
||||
_display = uiNamespace getvariable QGVAR(DisplayInformation);
|
||||
if (isnil "_display") exitwith {
|
||||
if (isnil "_display") exitWith {
|
||||
[_idPFH] call CBA_fnc_removePerFrameHandler;
|
||||
};
|
||||
|
||||
|
@ -27,13 +27,13 @@ if (_show) then {
|
||||
private ["_target", "_display", "_alphaLevel", "_alphaLevel", "_lbCtrl"];
|
||||
params ["_args", "_idPFH"];
|
||||
_args params ["_target"];
|
||||
if (GVAR(TriageCardTarget) != _target) exitwith {
|
||||
if (GVAR(TriageCardTarget) != _target) exitWith {
|
||||
[_idPFH] call CBA_fnc_removePerFrameHandler;
|
||||
};
|
||||
|
||||
disableSerialization;
|
||||
_display = uiNamespace getvariable QGVAR(triageCard);
|
||||
if (isnil "_display") exitwith {
|
||||
if (isnil "_display") exitWith {
|
||||
[_idPFH] call CBA_fnc_removePerFrameHandler;
|
||||
};
|
||||
|
||||
|
@ -18,7 +18,7 @@ params ["_show"];
|
||||
disableSerialization;
|
||||
|
||||
_display = uiNamespace getvariable QGVAR(triageCard);
|
||||
if (isnil "_display") exitwith {};
|
||||
if (isnil "_display") exitWith {};
|
||||
|
||||
_pos = [0,0,0,0];
|
||||
if (_show) then {
|
||||
|
@ -17,7 +17,7 @@ params ["_typeOfProjectile"];
|
||||
|
||||
|
||||
if (_typeOfProjectile isKindOf "BulletBase") exitWith {"bullet"};
|
||||
if (_typeOfProjectile isKindOf "ShotgunBase") exitwith {"bullet"};
|
||||
if (_typeOfProjectile isKindOf "ShotgunBase") exitWith {"bullet"};
|
||||
if (_typeOfProjectile isKindOf "GrenadeCore") exitWith {"grenade"};
|
||||
if (_typeOfProjectile isKindOf "TimeBombCore") exitWith {"explosive"};
|
||||
if (_typeOfProjectile isKindOf "MineCore") exitWith {"explosive"};
|
||||
|
@ -22,7 +22,7 @@ if (isnil QGVAR(unconsciousConditions)) then {
|
||||
|
||||
_return = false;
|
||||
{
|
||||
if (typeName _x == typeName {} && {([_unit] call _x)}) exitwith {
|
||||
if (typeName _x == typeName {} && {([_unit] call _x)}) exitWith {
|
||||
_return = true;
|
||||
};
|
||||
} foreach GVAR(unconsciousConditions);
|
||||
|
@ -56,7 +56,7 @@ _injuryType = _injury select 1;
|
||||
_exist = false;
|
||||
_bandagedInjury = [];
|
||||
{
|
||||
if ((_x select 1) == _injuryType && (_x select 2) == (_injury select 2)) exitwith {
|
||||
if ((_x select 1) == _injuryType && (_x select 2) == (_injury select 2)) exitWith {
|
||||
_exist = true;
|
||||
_existingInjury = _x;
|
||||
_existingInjury set [3, (_existingInjury select 3) + _impact];
|
||||
@ -83,7 +83,7 @@ if (random(1) <= _reopeningChance) then {
|
||||
|
||||
//if (alive _target) then {
|
||||
_openWounds = _target getvariable [QGVAR(openWounds), []];
|
||||
if ((count _openWounds)-1 < _injuryIndex) exitwith {};
|
||||
if ((count _openWounds)-1 < _injuryIndex) exitWith {};
|
||||
_selectedInjury = _openWounds select _injuryIndex;
|
||||
if (_selectedInjury select 1 == _injury select 1 && (_selectedInjury select 2) == (_injury select 2)) then { // matching the IDs
|
||||
_selectedInjury set [3, (_selectedInjury select 3) + _impact];
|
||||
@ -93,7 +93,7 @@ if (random(1) <= _reopeningChance) then {
|
||||
_exist = false;
|
||||
_injuryId = _injury select 1;
|
||||
{
|
||||
if ((_x select 1) == _injuryId && (_x select 2) == (_injury select 2)) exitwith {
|
||||
if ((_x select 1) == _injuryId && (_x select 2) == (_injury select 2)) exitWith {
|
||||
_exist = true;
|
||||
_existingInjury = _x;
|
||||
_existingInjury set [3, ((_existingInjury select 3) - _impact) max 0];
|
||||
|
@ -57,7 +57,7 @@ if(!GVAR(litterPFHRunning) && {GVAR(litterCleanUpDelay) > 0}) then {
|
||||
} forEach GVAR(allCreatedLitter);
|
||||
GVAR(allCreatedLitter) = GVAR(allCreatedLitter) - [objNull];
|
||||
|
||||
if ( (count GVAR(allCreatedLitter)) == 0) exitwith {
|
||||
if ( (count GVAR(allCreatedLitter)) == 0) exitWith {
|
||||
[(_this select 1)] call CBA_fnc_removePerFrameHandler;
|
||||
GVAR(litterPFHRunning) = false;
|
||||
};
|
||||
|
@ -82,7 +82,7 @@ if (vehicle _unit != _unit && {!(vehicle _unit isKindOf "StaticWeapon")} && {isN
|
||||
};
|
||||
|
||||
if ((_minLethalDamage <= _newDamage) && {[_unit, [_selection] call FUNC(selectionNameToNumber), _newDamage] call FUNC(determineIfFatal)}) then {
|
||||
if ((_unit getVariable [QGVAR(preventInstaDeath), GVAR(preventInstaDeath)])) exitwith {
|
||||
if ((_unit getVariable [QGVAR(preventInstaDeath), GVAR(preventInstaDeath)])) exitWith {
|
||||
_damageReturn = 0.9;
|
||||
};
|
||||
if ([_unit] call FUNC(setDead)) then {
|
||||
@ -109,7 +109,7 @@ if (_unit getVariable [QGVAR(preventInstaDeath), GVAR(preventInstaDeath)]) exitW
|
||||
};
|
||||
|
||||
if (_damageReturn >= 0.9 && {_selection in ["", "head", "body"]}) exitWith {
|
||||
if (_unit getvariable ["ACE_isUnconscious", false]) exitwith {
|
||||
if (_unit getvariable ["ACE_isUnconscious", false]) exitWith {
|
||||
[_unit] call FUNC(setDead);
|
||||
0.89;
|
||||
};
|
||||
|
@ -23,7 +23,7 @@ private ["_typeOfProjectile", "_part", "_damageBodyParts", "_hitPoints"];
|
||||
params ["_unit", "_selectionName", "_amountOfDamage", "_sourceOfDamage", "_typeOfProjectile", "_hitPointNumber", "_newDamage"];
|
||||
|
||||
_part = [_selectionName] call FUNC(selectionNameToNumber);
|
||||
if (_part < 0) exitwith {};
|
||||
if (_part < 0) exitWith {};
|
||||
|
||||
_hitPoints = ["HitHead", "HitBody", "HitLeftArm", "HitRightArm", "HitLeftLeg", "HitRightLeg"];
|
||||
// Sorting out the damage
|
||||
|
@ -15,7 +15,7 @@
|
||||
|
||||
params ["_unit"];
|
||||
|
||||
if (!local _unit) exitwith {};
|
||||
if (!local _unit) exitWith {};
|
||||
|
||||
private "_bodyStatus";
|
||||
|
||||
|
@ -21,7 +21,7 @@ private "_bodyPartn";
|
||||
params ["_unit", "_selectionName", "_amountOfDamage", "_sourceOfDamage", "_typeOfDamage"];
|
||||
_bodyPartn = [_selectionName] call FUNC(selectionNameToNumber);
|
||||
|
||||
if (_bodyPartn > 1) exitwith {};
|
||||
if (_bodyPartn > 1) exitWith {};
|
||||
|
||||
if (_amountOfDamage > 0.5) then {
|
||||
if (random(1) >= 0.8) then {
|
||||
|
@ -26,7 +26,7 @@ TRACE_4("ACE_DEBUG: HandleDamage BASIC",_unit, _damageBodyParts,_cache_params,_c
|
||||
_x params ["_unit","_selectionName","_amountOfDamage","_sourceOfDamage","_typeOfProjectile","_typeOfDamage"];
|
||||
if !(isNull _sourceOfDamage && {_typeOfProjectile == ""} && {vehicle _unit == _unit} && {(_selectionName == "head" || isBurning _unit)}) then {
|
||||
_part = [_selectionName] call FUNC(selectionNameToNumber);
|
||||
if (_part < 0) exitwith {};
|
||||
if (_part < 0) exitWith {};
|
||||
|
||||
private ["_newDamage", "_pain"];
|
||||
_newDamage = (_cache_damages select _foreachIndex);
|
||||
|
@ -106,7 +106,7 @@ if (_selectionName != "") then {
|
||||
private ["_index","_otherDamage"];
|
||||
_index = _cache_projectiles find _projectile;
|
||||
// Check if the current projectile has already been handled once
|
||||
if (_index >= 0 && {_projectile != "falling"}) exitwith {
|
||||
if (_index >= 0 && {_projectile != "falling"}) exitWith {
|
||||
_cache_damages = _unit getVariable QGVAR(cachedDamages);
|
||||
// Find the previous damage this projectile has done
|
||||
_otherDamage = (_cache_damages select _index);
|
||||
|
@ -37,7 +37,7 @@ _foundIndex = -1;
|
||||
_bodyPartNToAdd = _x select 2;
|
||||
{
|
||||
// Check if we have an id of the given class on the given bodypart already
|
||||
if (_x select 1 == _toAddClassID && {_x select 2 == _bodyPartNToAdd}) exitwith {
|
||||
if (_x select 1 == _toAddClassID && {_x select 2 == _bodyPartNToAdd}) exitWith {
|
||||
_foundIndex = _foreachIndex;
|
||||
};
|
||||
} foreach _openWounds;
|
||||
|
@ -23,7 +23,7 @@ TRACE_6("ACE_DEBUG: HandleDamage_WoundsOLD Called",_unit, _selectionName, _damag
|
||||
|
||||
// Convert the selectionName to a number and ensure it is a valid selection.
|
||||
_bodyPartn = [_selectionName] call FUNC(selectionNameToNumber);
|
||||
if (_bodyPartn < 0) exitwith {};
|
||||
if (_bodyPartn < 0) exitWith {};
|
||||
|
||||
// Get the injury type information. Format: [typeDamage thresholds, selectionSpecific, woundTypes]
|
||||
_injuryTypeInfo = missionNamespace getvariable [format[QGVAR(woundInjuryType_%1), _typeOfDamage],[[], false, []]];
|
||||
@ -70,7 +70,7 @@ _allPossibleInjuries = [];
|
||||
} foreach _allInjuriesForDamageType;
|
||||
|
||||
// No possible wounds available for this damage type or damage amount.
|
||||
if (_highestPossibleSpot < 0) exitwith {};
|
||||
if (_highestPossibleSpot < 0) exitWith {};
|
||||
|
||||
// Administration for open wounds and ids
|
||||
_openWounds = _unit getvariable[QGVAR(openWounds), []];
|
||||
@ -79,7 +79,7 @@ _woundID = _unit getvariable[QGVAR(lastUniqueWoundID), 1];
|
||||
_painToAdd = 0;
|
||||
_woundsCreated = [];
|
||||
{
|
||||
if (_x select 0 <= _damage) exitwith {
|
||||
if (_x select 0 <= _damage) exitWith {
|
||||
for "_i" from 0 to (1+ floor(random(_x select 1)-1)) /* step +1 */ do {
|
||||
|
||||
// Find the injury we are going to add. Format [ classID, allowdSelections, bloodloss, painOfInjury, minimalDamage]
|
||||
@ -92,7 +92,7 @@ _woundsCreated = [];
|
||||
if ((_injuryTypeInfo select 1)) then {
|
||||
{
|
||||
// Check if we have an id of the given class on the given bodypart already
|
||||
if (_x select 1 == _toAddClassID && {_x select 2 == _bodyPartNToAdd}) exitwith {
|
||||
if (_x select 1 == _toAddClassID && {_x select 2 == _bodyPartNToAdd}) exitWith {
|
||||
_foundIndex = _foreachIndex;
|
||||
};
|
||||
} foreach _openWounds;
|
||||
|
@ -15,7 +15,7 @@
|
||||
|
||||
private "_openWounds";
|
||||
params ["_unit"];
|
||||
if (!local _unit) exitwith {};
|
||||
if (!local _unit) exitWith {};
|
||||
|
||||
_unit setvariable [QGVAR(pain), 0];
|
||||
if (GVAR(level) >= 2) then {
|
||||
|
@ -98,7 +98,7 @@ if (GVAR(level) == 1) then {
|
||||
// handle advanced medical, with vitals
|
||||
if (GVAR(level) >= 2) then {
|
||||
TRACE_6("ACE_DEBUG_ADVANCED_VITALS",_painStatus,_bloodVolume, _unit getVariable QGVAR(hasPain),_unit getVariable QGVAR(morphine),_syncValues,_unit);
|
||||
if (_bloodVolume < 30) exitwith {
|
||||
if (_bloodVolume < 30) exitWith {
|
||||
[_unit] call FUNC(setDead);
|
||||
};
|
||||
|
||||
|
@ -21,11 +21,11 @@ params ["_medic", "_patient", "_item"];
|
||||
if (isnil QGVAR(setting_allowSharedEquipment)) then {
|
||||
GVAR(setting_allowSharedEquipment) = true;
|
||||
};
|
||||
if (GVAR(setting_allowSharedEquipment) && {[_patient, _item] call EFUNC(common,hasItem)}) exitwith {
|
||||
if (GVAR(setting_allowSharedEquipment) && {[_patient, _item] call EFUNC(common,hasItem)}) exitWith {
|
||||
true
|
||||
};
|
||||
|
||||
if ([_medic, _item] call EFUNC(common,hasItem)) exitwith {
|
||||
if ([_medic, _item] call EFUNC(common,hasItem)) exitWith {
|
||||
true
|
||||
};
|
||||
|
||||
@ -33,7 +33,7 @@ _return = false;
|
||||
if ((vehicle _medic != _medic) && {[vehicle _medic] call FUNC(isMedicalVehicle)}) then {
|
||||
_crew = crew vehicle _medic;
|
||||
{
|
||||
if ([_medic, _x] call FUNC(canAccessMedicalEquipment) && {([_x, _item] call EFUNC(common,hasItem))}) exitwith {
|
||||
if ([_medic, _x] call FUNC(canAccessMedicalEquipment) && {([_x, _item] call EFUNC(common,hasItem))}) exitWith {
|
||||
_return = true;
|
||||
};
|
||||
} foreach _crew;
|
||||
|
@ -21,10 +21,10 @@ params ["_medic", "_patient", "_items"];
|
||||
_return = true;
|
||||
{
|
||||
//
|
||||
if (typeName _x == "ARRAY" && {({[_medic, _patient, _x] call FUNC(hasItem)}count _x == 0)}) exitwith {
|
||||
if (typeName _x == "ARRAY" && {({[_medic, _patient, _x] call FUNC(hasItem)}count _x == 0)}) exitWith {
|
||||
_return = false;
|
||||
};
|
||||
if (typeName _x == "STRING" && {!([_medic, _patient, _x] call FUNC(hasItem))}) exitwith {
|
||||
if (typeName _x == "STRING" && {!([_medic, _patient, _x] call FUNC(hasItem))}) exitWith {
|
||||
_return = false;
|
||||
};
|
||||
}foreach _items;
|
||||
|
@ -20,7 +20,7 @@ private "_medicalEnabled";
|
||||
params ["_unit"];
|
||||
|
||||
_medicalEnabled = _unit getvariable QGVAR(enableMedical);
|
||||
if (isnil "_medicalEnabled") exitwith {
|
||||
if (isnil "_medicalEnabled") exitWith {
|
||||
(((GVAR(enableFor) == 0 && (isPlayer _unit || (_unit getvariable [QEGVAR(common,isDeadPlayer), false])))) || (GVAR(enableFor) == 1) || GVAR(level) == 1)
|
||||
};
|
||||
|
||||
|
@ -39,14 +39,14 @@ _medicalFacility =
|
||||
|
||||
_objects = (lineIntersectsWith [_unit modelToWorldVisual [0, 0, (_eyePos select 2)], _unit modelToWorldVisual [0, 0, (_eyePos select 2) +10], _unit]);
|
||||
{
|
||||
if (((typeOf _x) in _medicalFacility) || (_x getVariable [QGVAR(isMedicalFacility),false])) exitwith {
|
||||
if (((typeOf _x) in _medicalFacility) || (_x getVariable [QGVAR(isMedicalFacility),false])) exitWith {
|
||||
_isInBuilding = true;
|
||||
};
|
||||
} foreach _objects;
|
||||
if (!_isInBuilding) then {
|
||||
_objects = position _unit nearObjects 7.5;
|
||||
{
|
||||
if (((typeOf _x) in _medicalFacility) || (_x getVariable [QGVAR(isMedicalFacility),false])) exitwith {
|
||||
if (((typeOf _x) in _medicalFacility) || (_x getVariable [QGVAR(isMedicalFacility),false])) exitWith {
|
||||
_isInBuilding = true;
|
||||
};
|
||||
} foreach _objects;
|
||||
|
@ -16,7 +16,7 @@
|
||||
private ["_openWounds", "_openWounds"];
|
||||
params ["_unit"];
|
||||
|
||||
if (GVAR(level) <= 1) exitwith {
|
||||
if (GVAR(level) <= 1) exitWith {
|
||||
([_unit] call FUNC(getBloodloss)) == 0;
|
||||
};
|
||||
|
||||
|
@ -19,7 +19,7 @@
|
||||
|
||||
params ["_target", "_player", "_selectionN", "_actionData"];
|
||||
|
||||
if (GVAR(level) < 2 || {!([_target] call FUNC(hasMedicalEnabled))}) exitwith {
|
||||
if (GVAR(level) < 2 || {!([_target] call FUNC(hasMedicalEnabled))}) exitWith {
|
||||
private ["_pointDamage"];
|
||||
_pointDamage = (_target getvariable [QGVAR(bodyPartStatus), [0,0,0,0,0,0]]) select _selectionN;
|
||||
|
||||
@ -35,7 +35,7 @@ private ["_openWounds", "_amountOf"];
|
||||
_openWounds = _target getvariable [QGVAR(openWounds), []];
|
||||
{
|
||||
_x params ["", "", "_selectionX", "_amountOf", "_x4"];
|
||||
if (_amountOf > 0 && {(_selectionN == _selectionX)} && {_x4 > 0}) exitwith {
|
||||
if (_amountOf > 0 && {(_selectionN == _selectionX)} && {_x4 > 0}) exitWith {
|
||||
_actionData set [2, QUOTE(PATHTOF(UI\icons\medical_crossRed.paa))];
|
||||
};
|
||||
} foreach _openWounds;
|
||||
|
@ -25,7 +25,7 @@ _foundEntry = false;
|
||||
_allUsedMedication = _target getvariable [QGVAR(allUsedMedication), []];
|
||||
{
|
||||
_x params ["_variableX", "_allMedsFromClassname"];
|
||||
if (_variableX== _variable) exitwith {
|
||||
if (_variableX== _variable) exitWith {
|
||||
if !(_className in _allMedsFromClassname) then {
|
||||
_allMedsFromClassname pushback _className;
|
||||
_x set [1, _allMedsFromClassname];
|
||||
|
@ -23,7 +23,7 @@ if (!local _unit) then {
|
||||
|
||||
_exists = false;
|
||||
{
|
||||
if (_x select 0 == _injuryID) exitwith {
|
||||
if (_x select 0 == _injuryID) exitWith {
|
||||
_exists = true;
|
||||
_openWounds set [_foreachIndex, _injury];
|
||||
};
|
||||
|
@ -43,7 +43,7 @@ GVAR(fractureClassNames) = [];
|
||||
// function for parsing a sublcass of an injury
|
||||
_parseForSubClassWounds = {
|
||||
_subClass = _this select 0;
|
||||
if (isClass (_entry >> _subClass)) exitwith {
|
||||
if (isClass (_entry >> _subClass)) exitWith {
|
||||
_subClassConfig = (_entry >> _subClass);
|
||||
_subClasstype = _classType + (configName _subClassConfig);
|
||||
_subClassselections = if (isArray(_subClassConfig >> "selections")) then { getArray(_subClassConfig >> "selections");} else { _selections };
|
||||
@ -82,7 +82,7 @@ if (isClass _woundsConfig) then {
|
||||
_classDisplayName = if (isText(_entry >> "name")) then { getText(_entry >> "name");} else {_classType};
|
||||
|
||||
// TODO instead of hardcoding minor, medium and large just go through all sub classes recursively until none are found
|
||||
if (["Minor"] call _parseForSubClassWounds || ["Medium"] call _parseForSubClassWounds || ["Large"] call _parseForSubClassWounds) exitwith {}; // continue to the next one
|
||||
if (["Minor"] call _parseForSubClassWounds || ["Medium"] call _parseForSubClassWounds || ["Large"] call _parseForSubClassWounds) exitWith {}; // continue to the next one
|
||||
|
||||
// There were no subclasses, so we will add this one instead.
|
||||
if (count _selections > 0 && count _causes > 0) then {
|
||||
|
@ -18,14 +18,14 @@
|
||||
|
||||
private ["_unit","_availableSounds_A","_availableSounds_B","_availableSounds_C","_sound", "_pain"];
|
||||
params ["_unit", "_pain"];
|
||||
if (!local _unit || !GVAR(enableScreams)) exitwith{};
|
||||
if (!local _unit || !GVAR(enableScreams)) exitWith{};
|
||||
|
||||
// Lock if the unit is already playing a sound.
|
||||
if ((_unit getvariable [QGVAR(playingInjuredSound),false])) exitwith {};
|
||||
if ((_unit getvariable [QGVAR(playingInjuredSound),false])) exitWith {};
|
||||
_unit setvariable [QGVAR(playingInjuredSound),true];
|
||||
|
||||
// Play the sound if there is any damage present.
|
||||
if (_pain > 0 && {[_unit] call EFUNC(common,isAwake)}) exitwith {
|
||||
if (_pain > 0 && {[_unit] call EFUNC(common,isAwake)}) exitWith {
|
||||
// Classnames of the available sounds.
|
||||
_availableSounds_A = [
|
||||
"WoundedGuyA_01",
|
||||
|
@ -16,7 +16,7 @@
|
||||
|
||||
params [ "_target", "_caller"];
|
||||
|
||||
if (local _target || GVAR(level) < 2) exitwith {}; // if the target is local, we already got the most update to date information
|
||||
if (_target getvariable [QGVAR(isWoundSynced), false]) exitwith {};
|
||||
if (local _target || GVAR(level) < 2) exitWith {}; // if the target is local, we already got the most update to date information
|
||||
if (_target getvariable [QGVAR(isWoundSynced), false]) exitWith {};
|
||||
_target setvariable [QGVAR(isWoundSynced), true];
|
||||
["medical_woundUpdateRequest", [_target], [_target, _caller]] call EFUNC(common,targetEvent);
|
||||
|
@ -17,7 +17,7 @@
|
||||
private "_timeInCardiacArrest";
|
||||
params ["_unit"];
|
||||
|
||||
if (_unit getvariable [QGVAR(inCardiacArrest),false]) exitwith {};
|
||||
if (_unit getvariable [QGVAR(inCardiacArrest),false]) exitWith {};
|
||||
_unit setvariable [QGVAR(inCardiacArrest), true,true];
|
||||
_unit setvariable [QGVAR(heartRate), 0];
|
||||
|
||||
@ -32,11 +32,11 @@ _timeInCardiacArrest = 120 + round(random(600));
|
||||
_args params ["_unit", "_startTime", "_timeInCardiacArrest"];
|
||||
|
||||
_heartRate = _unit getvariable [QGVAR(heartRate), 80];
|
||||
if (_heartRate > 0 || !alive _unit) exitwith {
|
||||
if (_heartRate > 0 || !alive _unit) exitWith {
|
||||
[_idPFH] call CBA_fnc_removePerFrameHandler;
|
||||
_unit setvariable [QGVAR(inCardiacArrest), nil,true];
|
||||
};
|
||||
if (ACE_time - _startTime >= _timeInCardiacArrest) exitwith {
|
||||
if (ACE_time - _startTime >= _timeInCardiacArrest) exitWith {
|
||||
[_idPFH] call CBA_fnc_removePerFrameHandler;
|
||||
_unit setvariable [QGVAR(inCardiacArrest), nil,true];
|
||||
[_unit] call FUNC(setDead);
|
||||
|
@ -16,15 +16,15 @@
|
||||
private ["_unit", "_force", "_reviveVal", "_lifesLeft"];
|
||||
params ["_unit", ["_force", false]];
|
||||
|
||||
if (!alive _unit) exitwith{true};
|
||||
if (!local _unit) exitwith {
|
||||
if (!alive _unit) exitWith{true};
|
||||
if (!local _unit) exitWith {
|
||||
[[_unit, _force], QUOTE(DFUNC(setDead)), _unit, false] call EFUNC(common,execRemoteFnc); /* TODO Replace by event system */
|
||||
false;
|
||||
};
|
||||
|
||||
_reviveVal = _unit getVariable [QGVAR(enableRevive), GVAR(enableRevive)];
|
||||
if (((_reviveVal == 1 && {[_unit] call EFUNC(common,isPlayer)} || _reviveVal == 2)) && !_force) exitwith {
|
||||
if (_unit getvariable [QGVAR(inReviveState), false]) exitwith {
|
||||
if (((_reviveVal == 1 && {[_unit] call EFUNC(common,isPlayer)} || _reviveVal == 2)) && !_force) exitWith {
|
||||
if (_unit getvariable [QGVAR(inReviveState), false]) exitWith {
|
||||
if (GVAR(amountOfReviveLives) > 0) then {
|
||||
_lifesLeft = _unit getvariable[QGVAR(amountOfReviveLives), GVAR(amountOfReviveLives)];
|
||||
if (_lifesLeft == 0) then {
|
||||
@ -45,14 +45,14 @@ if (((_reviveVal == 1 && {[_unit] call EFUNC(common,isPlayer)} || _reviveVal ==
|
||||
_args params ["_unit"];
|
||||
_startTime = _unit getvariable [QGVAR(reviveStartTime), 0];
|
||||
|
||||
if (GVAR(maxReviveTime) > 0 && {ACE_time - _startTime > GVAR(maxReviveTime)}) exitwith {
|
||||
if (GVAR(maxReviveTime) > 0 && {ACE_time - _startTime > GVAR(maxReviveTime)}) exitWith {
|
||||
[_idPFH] call CBA_fnc_removePerFrameHandler;
|
||||
_unit setvariable [QGVAR(inReviveState), nil, true];
|
||||
_unit setvariable [QGVAR(reviveStartTime), nil];
|
||||
[_unit, true] call FUNC(setDead);
|
||||
};
|
||||
|
||||
if !(_unit getvariable [QGVAR(inReviveState), false]) exitwith {
|
||||
if !(_unit getvariable [QGVAR(inReviveState), false]) exitWith {
|
||||
// revived without dieing, so in case we have lifes, remove one.
|
||||
if (GVAR(amountOfReviveLives) > 0) then {
|
||||
_lifesLeft = _unit getvariable[QGVAR(amountOfReviveLives), GVAR(amountOfReviveLives)];
|
||||
|
@ -32,13 +32,13 @@ params ["_unit", ["_set", true], ["_minWaitingTime", DEFAULT_DELAY], ["_force",
|
||||
// No change, fuck off. (why is there no xor?)
|
||||
if (_set isEqualTo (_unit getVariable ["ACE_isUnconscious", false])) exitWith {};
|
||||
|
||||
if !(_set) exitwith {
|
||||
if !(_set) exitWith {
|
||||
_unit setvariable ["ACE_isUnconscious", false, true];
|
||||
};
|
||||
|
||||
if !(!(isNull _unit) && {(_unit isKindOf "CAManBase") && ([_unit] call EFUNC(common,isAwake))}) exitwith{};
|
||||
if !(!(isNull _unit) && {(_unit isKindOf "CAManBase") && ([_unit] call EFUNC(common,isAwake))}) exitWith{};
|
||||
|
||||
if (!local _unit) exitwith {
|
||||
if (!local _unit) exitWith {
|
||||
[[_unit, _set, _minWaitingTime, _force], QUOTE(DFUNC(setUnconscious)), _unit, false] call EFUNC(common,execRemoteFnc); /* TODO Replace by event system */
|
||||
};
|
||||
|
||||
|
@ -39,10 +39,10 @@ if (_selection in HEAD_SELECTIONS) exitWith {"head"};
|
||||
if (_selection in TORSO_SELECTIONS) exitWith {"body"};
|
||||
|
||||
// Not necessary unless we get more hitpoints variants in an next arma update
|
||||
/*if (_selection in L_ARM_SELECTIONS) exitwith {"hand_l"};
|
||||
if (_selection in R_ARM_SELECTIONS) exitwith {"hand_r"};
|
||||
if (_selection in L_LEG_SELECTIONS) exitwith {"leg_l"};
|
||||
if (_selection in R_LEG_SELECTIONS) exitwith {"leg_r"};*/
|
||||
/*if (_selection in L_ARM_SELECTIONS) exitWith {"hand_l"};
|
||||
if (_selection in R_ARM_SELECTIONS) exitWith {"hand_r"};
|
||||
if (_selection in L_LEG_SELECTIONS) exitWith {"leg_l"};
|
||||
if (_selection in R_LEG_SELECTIONS) exitWith {"leg_r"};*/
|
||||
|
||||
//Backup method to detect weird selections/hitpoints
|
||||
if ((_selection == "?") || {!(_selection in GVAR(SELECTIONS))}) exitWith {
|
||||
|
@ -20,7 +20,7 @@ private ["_config", "_medicRequired", "_items", "_locations", "_return", "_callb
|
||||
params ["_caller", "_target", "_selectionName", "_className"];
|
||||
|
||||
// If the cursorMenu is open, the loading bar will fail. If we execute the function one frame later, it will work fine
|
||||
if (uiNamespace getVariable [QEGVAR(interact_menu,cursorMenuOpened),false]) exitwith {
|
||||
if (uiNamespace getVariable [QEGVAR(interact_menu,cursorMenuOpened),false]) exitWith {
|
||||
[{
|
||||
_this call FUNC(treatment);
|
||||
}, _this] call EFUNC(common,execNextFrame);
|
||||
@ -32,29 +32,29 @@ _config = (configFile >> "ACE_Medical_Actions" >> "Basic" >> _className);
|
||||
if (GVAR(level) >= 2) then {
|
||||
_config = (configFile >> "ACE_Medical_Actions" >> "Advanced" >> _className);
|
||||
};
|
||||
if !(isClass _config) exitwith {false};
|
||||
if !(isClass _config) exitWith {false};
|
||||
|
||||
// Allow self treatment check
|
||||
if (_caller == _target && {getNumber (_config >> "allowSelfTreatment") == 0}) exitwith {false};
|
||||
if (_caller == _target && {getNumber (_config >> "allowSelfTreatment") == 0}) exitWith {false};
|
||||
|
||||
_medicRequired = if (isNumber (_config >> "requiredMedic")) then {
|
||||
getNumber (_config >> "requiredMedic");
|
||||
} else {
|
||||
// Check for required class
|
||||
if (isText (_config >> "requiredMedic")) exitwith {
|
||||
if (isText (_config >> "requiredMedic")) exitWith {
|
||||
missionNamespace getvariable [(getText (_config >> "requiredMedic")), 0];
|
||||
};
|
||||
0;
|
||||
};
|
||||
|
||||
if !([_caller, _medicRequired] call FUNC(isMedic)) exitwith {false};
|
||||
if !([_caller, _medicRequired] call FUNC(isMedic)) exitWith {false};
|
||||
|
||||
_allowedSelections = getArray (_config >> "allowedSelections");
|
||||
if !("All" in _allowedSelections || {(_selectionName in _allowedSelections)}) exitwith {false};
|
||||
if !("All" in _allowedSelections || {(_selectionName in _allowedSelections)}) exitWith {false};
|
||||
|
||||
// Check item
|
||||
_items = getArray (_config >> "items");
|
||||
if (count _items > 0 && {!([_caller, _target, _items] call FUNC(hasItems))}) exitwith {false};
|
||||
if (count _items > 0 && {!([_caller, _target, _items] call FUNC(hasItems))}) exitWith {false};
|
||||
|
||||
_return = true;
|
||||
if (isText (_config >> "Condition")) then {
|
||||
@ -72,14 +72,14 @@ if (isText (_config >> "Condition")) then {
|
||||
};
|
||||
};
|
||||
};
|
||||
if (!_return) exitwith {false};
|
||||
if (!_return) exitWith {false};
|
||||
|
||||
_patientStateCondition = if (isText(_config >> "patientStateCondition")) then {
|
||||
missionNamespace getvariable [getText(_config >> "patientStateCondition"), 0]
|
||||
} else {
|
||||
getNumber(_config >> "patientStateCondition")
|
||||
};
|
||||
if (_patientStateCondition == 1 && {!([_target] call FUNC(isInStableCondition))}) exitwith {false};
|
||||
if (_patientStateCondition == 1 && {!([_target] call FUNC(isInStableCondition))}) exitWith {false};
|
||||
|
||||
// Check allowed locations
|
||||
_locations = getArray (_config >> "treatmentLocations");
|
||||
@ -92,10 +92,10 @@ if ("All" in _locations) then {
|
||||
_medVeh = {([_caller] call FUNC(isInMedicalVehicle)) || ([_target] call FUNC(isInMedicalVehicle))};
|
||||
|
||||
{
|
||||
if (_x == "field") exitwith {_return = true;};
|
||||
if (_x == "MedicalFacility" && _medFacility) exitwith {_return = true;};
|
||||
if (_x == "MedicalVehicle" && _medVeh) exitwith {_return = true;};
|
||||
if !(isnil _x) exitwith {
|
||||
if (_x == "field") exitWith {_return = true;};
|
||||
if (_x == "MedicalFacility" && _medFacility) exitWith {_return = true;};
|
||||
if (_x == "MedicalVehicle" && _medVeh) exitWith {_return = true;};
|
||||
if !(isnil _x) exitWith {
|
||||
private "_val";
|
||||
_val = missionNamespace getvariable _x;
|
||||
if (typeName _val == "SCALAR") then {
|
||||
@ -111,14 +111,14 @@ if ("All" in _locations) then {
|
||||
} foreach _locations;
|
||||
};
|
||||
|
||||
if !(_return) exitwith {false};
|
||||
if !(_return) exitWith {false};
|
||||
|
||||
_usersOfItems = [];
|
||||
_consumeItems = if (isNumber (_config >> "itemConsumed")) then {
|
||||
getNumber (_config >> "itemConsumed");
|
||||
} else {
|
||||
// Check for required class
|
||||
if (isText (_config >> "itemConsumed")) exitwith {
|
||||
if (isText (_config >> "itemConsumed")) exitWith {
|
||||
missionNamespace getvariable [(getText (_config >> "itemConsumed")), 0];
|
||||
};
|
||||
0;
|
||||
@ -198,14 +198,14 @@ if (vehicle _caller == _caller && {_callerAnim != ""}) then {
|
||||
_treatmentTime = if (isNumber (_config >> "treatmentTime")) then {
|
||||
getNumber (_config >> "treatmentTime");
|
||||
} else {
|
||||
if (isText (_config >> "treatmentTime")) exitwith {
|
||||
if (isText (_config >> "treatmentTime")) exitWith {
|
||||
_treatmentTimeConfig = getText(_config >> "treatmentTime");
|
||||
if (isnil _treatmentTimeConfig) then {
|
||||
_treatmentTimeConfig = compile _treatmentTimeConfig;
|
||||
} else {
|
||||
_treatmentTimeConfig = missionNamespace getvariable _treatmentTimeConfig;
|
||||
};
|
||||
if (typeName _treatmentTimeConfig == "SCALAR") exitwith {
|
||||
if (typeName _treatmentTimeConfig == "SCALAR") exitWith {
|
||||
_treatmentTimeConfig;
|
||||
};
|
||||
[_caller, _target, _selectionName, _className] call _treatmentTimeConfig;
|
||||
|
@ -22,7 +22,7 @@ params ["_caller", "_target", "_selectionName", "_className", "_items", "", ["_s
|
||||
[_target, "activity", LSTRING(Activity_bandagedPatient), [[_caller] call EFUNC(common,getName)]] call FUNC(addToLog);
|
||||
[_target, "activity_view", LSTRING(Activity_bandagedPatient), [[_caller] call EFUNC(common,getName)]] call FUNC(addToLog); // TODO expand message
|
||||
|
||||
if !([_target] call FUNC(hasMedicalEnabled)) exitwith {
|
||||
if !([_target] call FUNC(hasMedicalEnabled)) exitWith {
|
||||
_this call FUNC(treatmentBasic_bandage);
|
||||
};
|
||||
|
||||
|
@ -20,11 +20,11 @@ params ["_target", "_bandage", "_selectionName", ["_specificClass", -1]];
|
||||
|
||||
// Ensure it is a valid bodypart
|
||||
_part = [_selectionName] call FUNC(selectionNameToNumber);
|
||||
if (_part < 0) exitwith {false};
|
||||
if (_part < 0) exitWith {false};
|
||||
|
||||
// Get the open wounds for this unit
|
||||
_openWounds = _target getvariable [QGVAR(openWounds), []];
|
||||
if (count _openWounds == 0) exitwith {false}; // nothing to do here!
|
||||
if (count _openWounds == 0) exitWith {false}; // nothing to do here!
|
||||
|
||||
// Get the default effectiveness for the used bandage
|
||||
_config = (ConfigFile >> "ACE_Medical_Advanced" >> "Treatment" >> "Bandaging");
|
||||
@ -58,7 +58,7 @@ _exit = false;
|
||||
};
|
||||
|
||||
TRACE_2("Wound classes: ", _specificClass, _classID);
|
||||
if (_specificClass == _classID) exitwith {
|
||||
if (_specificClass == _classID) exitWith {
|
||||
_effectivenessFound = _woundEffectivenss;
|
||||
_mostEffectiveSpot = _foreachIndex;
|
||||
_mostEffectiveInjury = _x;
|
||||
@ -72,10 +72,10 @@ _exit = false;
|
||||
_mostEffectiveInjury = _x;
|
||||
};
|
||||
};
|
||||
if (_exit) exitwith {};
|
||||
if (_exit) exitWith {};
|
||||
} foreach _openWounds;
|
||||
|
||||
if (_effectivenessFound == -1) exitwith {}; // Seems everything is patched up on this body part already..
|
||||
if (_effectivenessFound == -1) exitWith {}; // Seems everything is patched up on this body part already..
|
||||
|
||||
|
||||
// TODO refactor this part
|
||||
|
@ -13,7 +13,7 @@
|
||||
private "_allUsedMedication";
|
||||
params ["_caller", "_target"];
|
||||
|
||||
if (alive _target) exitwith {
|
||||
if (alive _target) exitWith {
|
||||
|
||||
_target setVariable [QGVAR(pain), 0, true];
|
||||
_target setVariable [QGVAR(morphine), 0, true];
|
||||
|
@ -22,7 +22,7 @@ _damageBodyParts = _target getvariable [QGVAR(bodyPartStatus), [0,0,0,0,0,0]];
|
||||
|
||||
// Ensure it is a valid bodypart
|
||||
_part = [_selectionName] call FUNC(selectionNameToNumber);
|
||||
if (_part < 0) exitwith {false};
|
||||
if (_part < 0) exitWith {false};
|
||||
|
||||
if ((_damageBodyParts select _part) > 0) then {
|
||||
_damageOnPart = (_damageBodyParts select _part);
|
||||
|
@ -19,7 +19,7 @@
|
||||
private "_removeItem";
|
||||
params ["_caller", "_target", "_selectionName", "_className", "_items"];
|
||||
|
||||
if (count _items == 0) exitwith {false};
|
||||
if (count _items == 0) exitWith {false};
|
||||
|
||||
_removeItem = _items select 0;
|
||||
[[_target, _className], QUOTE(DFUNC(treatmentIVLocal)), _target] call EFUNC(common,execRemoteFnc); /* TODO Replace by event system */
|
||||
|
@ -19,7 +19,7 @@ private ["_config", "_volumeAdded", "_typeOf", "_varName", "_bloodVolume"];
|
||||
params ["_target", "_treatmentClassname"];
|
||||
|
||||
_bloodVolume = _target getvariable [QGVAR(bloodVolume), 100];
|
||||
if (_bloodVolume >= 100) exitwith {};
|
||||
if (_bloodVolume >= 100) exitWith {};
|
||||
|
||||
// Find the proper attributes for the used IV
|
||||
_config = (configFile >> "ACE_Medical_Advanced" >> "Treatment" >> "IV");
|
||||
|
@ -24,16 +24,16 @@ _selectionName = _this select 2;
|
||||
_className = _this select 3;
|
||||
_items = _this select 4;
|
||||
|
||||
if (count _items == 0) exitwith {false};
|
||||
if (count _items == 0) exitWith {false};
|
||||
|
||||
_part = [_selectionName] call FUNC(selectionNameToNumber);
|
||||
if (_part == 0 || _part == 1) exitwith {
|
||||
if (_part == 0 || _part == 1) exitWith {
|
||||
// ["displayTextStructured", [_caller], ["You cannot apply a CAT on this body part!"]] call EFUNC(common,targetEvent);
|
||||
false;
|
||||
};
|
||||
|
||||
_tourniquets = _target getvariable [QGVAR(tourniquets), [0,0,0,0,0,0]];
|
||||
if ((_tourniquets select _part) > 0) exitwith {
|
||||
if ((_tourniquets select _part) > 0) exitWith {
|
||||
_output = "There is already a tourniquet on this body part!"; // TODO localization
|
||||
["displayTextStructured", [_caller], [_output, 1.5, _caller]] call EFUNC(common,targetEvent);
|
||||
false;
|
||||
|
@ -30,12 +30,12 @@ _target setvariable [QGVAR(tourniquets), _tourniquets, true];
|
||||
params ["_args", "_idPFH"];
|
||||
_args params ["_target", "_applyingTo", "_part", "_time"];
|
||||
|
||||
if (!alive _target) exitwith {
|
||||
if (!alive _target) exitWith {
|
||||
[_idPFH] call CBA_fnc_removePerFrameHandler;
|
||||
};
|
||||
|
||||
_tourniquets = _target getvariable [QGVAR(tourniquets), [0,0,0,0,0,0]];
|
||||
if !((_tourniquets select _part) == _applyingTo) exitwith {
|
||||
if !((_tourniquets select _part) == _applyingTo) exitWith {
|
||||
// Tourniquet has been removed
|
||||
[_idPFH] call CBA_fnc_removePerFrameHandler;
|
||||
};
|
||||
|
@ -25,7 +25,7 @@ _args params ["_unit", "_originalPos", "_startingTime", "_minWaitingTime", "_has
|
||||
|
||||
TRACE_6("ACE_DEBUG_Unconscious_PFH",_unit, _originalPos, _startingTime, _minWaitingTime, _hasMovedOut, _parachuteCheck);
|
||||
|
||||
if (!alive _unit) exitwith {
|
||||
if (!alive _unit) exitWith {
|
||||
if ("ACE_FakePrimaryWeapon" in (weapons _unit)) then {
|
||||
TRACE_1("Removing fake weapon [on death]",_unit);
|
||||
_unit removeWeapon "ACE_FakePrimaryWeapon";
|
||||
@ -47,7 +47,7 @@ if (!alive _unit) exitwith {
|
||||
};
|
||||
|
||||
// In case the unit is no longer in an unconscious state, we are going to check if we can already reset the animation
|
||||
if !(_unit getvariable ["ACE_isUnconscious",false]) exitwith {
|
||||
if !(_unit getvariable ["ACE_isUnconscious",false]) exitWith {
|
||||
TRACE_7("ACE_DEBUG_Unconscious_PFH",_unit, _args, [_unit] call FUNC(isBeingCarried), [_unit] call FUNC(isBeingDragged), _idPFH, _unit getvariable QGVAR(unconsciousArguments),animationState _unit);
|
||||
// TODO, handle this with carry instead, so we can remove the PFH here.
|
||||
// Wait until the unit isn't being carried anymore, so we won't end up with wierd animations
|
||||
@ -128,7 +128,7 @@ if (_parachuteCheck) then {
|
||||
};
|
||||
};
|
||||
|
||||
if (!local _unit) exitwith {
|
||||
if (!local _unit) exitWith {
|
||||
TRACE_6("ACE_DEBUG_Unconscious_PFH",_unit, _args, _startingTime, _minWaitingTime, _idPFH, _unit getvariable QGVAR(unconsciousArguments));
|
||||
_args set [3, _minWaitingTime - (ACE_time - _startingTime)];
|
||||
_unit setvariable [QGVAR(unconsciousArguments), _args, true];
|
||||
@ -136,7 +136,7 @@ if (!local _unit) exitwith {
|
||||
};
|
||||
|
||||
// Ensure we are waiting at least a minimum period before checking if we can wake up the unit again, allows for temp knock outs
|
||||
if ((ACE_time - _startingTime) >= _minWaitingTime) exitwith {
|
||||
if ((ACE_time - _startingTime) >= _minWaitingTime) exitWith {
|
||||
TRACE_2("ACE_DEBUG_Unconscious_Temp knock outs",_unit, [_unit] call FUNC(getUnconsciousCondition));
|
||||
if (!([_unit] call FUNC(getUnconsciousCondition))) then {
|
||||
_unit setvariable ["ACE_isUnconscious", false, true];
|
||||
|
@ -23,12 +23,12 @@ if (isnil QGVAR(setting_allowSharedEquipment)) then {
|
||||
GVAR(setting_allowSharedEquipment) = true;
|
||||
};
|
||||
|
||||
if (GVAR(setting_allowSharedEquipment) && {[_patient, _item] call EFUNC(common,hasItem)}) exitwith {
|
||||
if (GVAR(setting_allowSharedEquipment) && {[_patient, _item] call EFUNC(common,hasItem)}) exitWith {
|
||||
[[_patient, _item], QUOTE(EFUNC(common,useItem)), _patient] call EFUNC(common,execRemoteFnc); /* TODO Replace by event system */
|
||||
[true, _patient];
|
||||
};
|
||||
|
||||
if ([_medic, _item] call EFUNC(common,hasItem)) exitwith {
|
||||
if ([_medic, _item] call EFUNC(common,hasItem)) exitWith {
|
||||
[[_medic, _item], QUOTE(EFUNC(common,useItem)), _medic] call EFUNC(common,execRemoteFnc); /* TODO Replace by event system */
|
||||
[true, _medic];
|
||||
};
|
||||
@ -37,7 +37,7 @@ _return = [false, objNull];
|
||||
if ([vehicle _medic] call FUNC(isMedicalVehicle) && {vehicle _medic != _medic}) then {
|
||||
_crew = crew vehicle _medic;
|
||||
{
|
||||
if ([_medic, _x] call FUNC(canAccessMedicalEquipment) && {([_x, _item] call EFUNC(common,hasItem))}) exitwith {
|
||||
if ([_medic, _x] call FUNC(canAccessMedicalEquipment) && {([_x, _item] call EFUNC(common,hasItem))}) exitWith {
|
||||
_return = [true, _x];
|
||||
[[_x, _item], QUOTE(EFUNC(common,useItem)), _x] call EFUNC(common,execRemoteFnc); /* TODO Replace by event system */
|
||||
};
|
||||
|
@ -24,14 +24,14 @@ _itemsUsedBy = [];
|
||||
if (typeName _x == "ARRAY") then {
|
||||
{
|
||||
_itemUsedInfo = [_medic, _patient, _x] call FUNC(useItem);
|
||||
if (_itemUsedInfo select 0) exitwith { _itemsUsedBy pushback [(_itemUsedInfo select 1), _x]};
|
||||
if (_itemUsedInfo select 0) exitWith { _itemsUsedBy pushback [(_itemUsedInfo select 1), _x]};
|
||||
} foreach _x;
|
||||
};
|
||||
|
||||
// handle required item
|
||||
if (typeName _x == "STRING") then {
|
||||
_itemUsedInfo = [_medic, _patient, _x] call FUNC(useItem);
|
||||
if (_itemUsedInfo select 0) exitwith { _itemsUsedBy pushback [(_itemUsedInfo select 1), _x]};
|
||||
if (_itemUsedInfo select 0) exitWith { _itemsUsedBy pushback [(_itemUsedInfo select 1), _x]};
|
||||
};
|
||||
} foreach _items;
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
#include "script_component.hpp"
|
||||
|
||||
if (!hasInterface) exitwith {};
|
||||
if (!hasInterface) exitWith {};
|
||||
|
||||
GVAR(MenuPFHID) = -1;
|
||||
GVAR(lastOpenedOn) = -1;
|
||||
@ -24,7 +24,7 @@ GVAR(pendingReopen) = false;
|
||||
|
||||
// Conditions: canInteract
|
||||
if !([ACE_player, _target, ["isNotInside"]] call EFUNC(common,canInteractWith)) exitWith {false};
|
||||
if !([ACE_player, _target] call FUNC(canOpenMenu)) exitwith {false};
|
||||
if !([ACE_player, _target] call FUNC(canOpenMenu)) exitWith {false};
|
||||
|
||||
// Statement
|
||||
[_target] call FUNC(openMenu);
|
||||
|
@ -21,7 +21,7 @@ params ["_player", "_target", "_name"];
|
||||
|
||||
private ["_actions", "_collectedActions", "_bodyPart"];
|
||||
|
||||
if (!([ACE_player, _target, ["isNotInside"]] call EFUNC(common,canInteractWith))) exitwith {[]};
|
||||
if (!([ACE_player, _target, ["isNotInside"]] call EFUNC(common,canInteractWith))) exitWith {[]};
|
||||
|
||||
_actions = if (EGVAR(medical,level) == 2) then {
|
||||
GVAR(actionsAdvanced);
|
||||
|
@ -19,7 +19,7 @@
|
||||
#define END_IDC 27
|
||||
#define AMOUNT_OF_ENTRIES (count _entries)
|
||||
|
||||
if (!hasInterface) exitwith{};
|
||||
if (!hasInterface) exitWith{};
|
||||
|
||||
private ["_entries", "_display", "_newTarget", "_ctrl", "_code"];
|
||||
|
||||
@ -28,9 +28,9 @@ params ["_name"];
|
||||
disableSerialization;
|
||||
|
||||
_display = uiNamespace getVariable QGVAR(medicalMenu);
|
||||
if (isNil "_display") exitwith {}; // no valid dialog present
|
||||
if (isNil "_display") exitWith {}; // no valid dialog present
|
||||
|
||||
if (_name isEqualTo "toggle") exitwith {
|
||||
if (_name isEqualTo "toggle") exitWith {
|
||||
_newTarget = ACE_player;
|
||||
//If we are on the player, and only if our old target is still valid, switch to it:
|
||||
if ((GVAR(INTERACTION_TARGET) == ACE_player) &&
|
||||
@ -61,7 +61,7 @@ GVAR(LatestDisplayOptionMenu) = _name;
|
||||
|
||||
// The triage card has no options available
|
||||
lbClear 212;
|
||||
if (_name isEqualTo "triage") exitwith {
|
||||
if (_name isEqualTo "triage") exitWith {
|
||||
|
||||
ctrlEnable [212, true];
|
||||
private ["_log", "_triageCardTexts", "_message"];
|
||||
@ -81,7 +81,7 @@ if (_name isEqualTo "triage") exitwith {
|
||||
nil;
|
||||
} count _log;
|
||||
|
||||
if (count _triageCardTexts == 0) exitwith {
|
||||
if (count _triageCardTexts == 0) exitWith {
|
||||
lbAdd [212,(localize ELSTRING(medical,TriageCard_NoEntry))];
|
||||
};
|
||||
{
|
||||
@ -96,7 +96,7 @@ _entries = [ACE_player, GVAR(INTERACTION_TARGET), _name] call FUNC(getTreatmentO
|
||||
|
||||
{
|
||||
//player sidechat format["TRIGGERED: %1",_x];
|
||||
if (_forEachIndex > END_IDC) exitwith {};
|
||||
if (_forEachIndex > END_IDC) exitWith {};
|
||||
_ctrl = (_display displayCtrl (START_IDC + _forEachIndex));
|
||||
if (!(_forEachIndex > AMOUNT_OF_ENTRIES)) then {
|
||||
_ctrl ctrlSetText (_x select 0);
|
||||
|
@ -20,7 +20,7 @@ private "_target";
|
||||
|
||||
params ["_display"];
|
||||
|
||||
if (isNil "_display") exitwith {};
|
||||
if (isNil "_display") exitWith {};
|
||||
|
||||
if (EGVAR(interact_menu,menuBackground)==1) then {[QGVAR(id), true] call EFUNC(common,blurScreen);};
|
||||
if (EGVAR(interact_menu,menuBackground)==2) then {0 cutRsc[QEGVAR(interact_menu,menuBackground), "PLAIN", 1, false];};
|
||||
|
@ -17,7 +17,7 @@
|
||||
|
||||
params ["_interactionTarget"];
|
||||
|
||||
if (dialog || {isNull _interactionTarget}) exitwith {
|
||||
if (dialog || {isNull _interactionTarget}) exitWith {
|
||||
disableSerialization;
|
||||
|
||||
private ["_display", "_handled"];
|
||||
|
@ -23,7 +23,7 @@ private["_allInjuryTexts", "_bandagedwounds", "_damaged", "_genericMessages", "_
|
||||
if (isNil "_display" || {isNull _display}) exitWith {ERROR("No display");};
|
||||
|
||||
_selectionN = GVAR(selectedBodyPart);
|
||||
if (_selectionN < 0 || {_selectionN > 5}) exitwith {};
|
||||
if (_selectionN < 0 || {_selectionN > 5}) exitWith {};
|
||||
|
||||
_genericMessages = [];
|
||||
_partText = [ELSTRING(medical,Head), ELSTRING(medical,Torso), ELSTRING(medical,LeftArm) ,ELSTRING(medical,RightArm) ,ELSTRING(medical,LeftLeg), ELSTRING(medical,RightLeg)] select _selectionN;
|
||||
|
@ -59,7 +59,7 @@ if (_newMuzzleVelocityCoefficent != 1) then {
|
||||
PARAMS_2(_args,_pfID);
|
||||
EXPLODE_4_PVT(_args,_shell,_airFriction,_time,_relativeDensity);
|
||||
|
||||
if (isNull _shell || {!alive _shell}) exitwith {
|
||||
if (isNull _shell || {!alive _shell}) exitWith {
|
||||
[_pfID] call CBA_fnc_removePerFrameHandler;
|
||||
};
|
||||
|
||||
|
@ -12,9 +12,9 @@
|
||||
private _logicType = typeof _logic;
|
||||
_logic hideobject true;
|
||||
|
||||
if (_logic getvariable [QGVAR(initalized), false]) exitwith {};
|
||||
if (_logic getvariable [QGVAR(initalized), false]) exitWith {};
|
||||
private _config = (configFile >> "CfgVehicles" >> _logicType);
|
||||
if !(isClass _config) exitwith {};
|
||||
if !(isClass _config) exitWith {};
|
||||
|
||||
private _isGlobal = getNumber (_config >> "isGlobal") > 0;
|
||||
private _isDisposable = getNumber (_config >> "isDisposable") > 0;
|
||||
|
@ -16,7 +16,7 @@
|
||||
private ["_logic"];
|
||||
_logic = _this select 0;
|
||||
|
||||
if (isMultiplayer) exitwith {};
|
||||
if (isMultiplayer) exitWith {};
|
||||
|
||||
if (_logic getvariable ["allowconfigurationExport", false]) then {
|
||||
GVAR(serverConfigGeneration) = 1;
|
||||
|
@ -18,7 +18,7 @@
|
||||
|
||||
private ["_name", "_typeName", "_isClientSetable", "_localizedName", "_localizedDescription", "_possibleValues", "_defaultValue", "_setting", "_menu", "_settingsMenu"];
|
||||
|
||||
if (GVAR(serverConfigGeneration) == 0 || isMultiplayer) exitwith {closeDialog 145246;};
|
||||
if (GVAR(serverConfigGeneration) == 0 || isMultiplayer) exitWith {closeDialog 145246;};
|
||||
|
||||
// Filter only user setable setting
|
||||
GVAR(serverSideOptions) = [];
|
||||
|
@ -24,19 +24,19 @@ TRACE_4("params",_caller,_target,_hitPoint,_className);
|
||||
private ["_config", "_engineerRequired", "_items", "_locations", "_return", "_condition", "_vehicleStateCondition", "_settingName", "_settingItemsArray"];
|
||||
|
||||
_config = (ConfigFile >> "ACE_Repair" >> "Actions" >> _className);
|
||||
if !(isClass _config) exitwith {false}; // or go for a default?
|
||||
if(isEngineOn _target) exitwith {false};
|
||||
if !(isClass _config) exitWith {false}; // or go for a default?
|
||||
if(isEngineOn _target) exitWith {false};
|
||||
|
||||
_engineerRequired = if (isNumber (_config >> "requiredEngineer")) then {
|
||||
getNumber (_config >> "requiredEngineer");
|
||||
} else {
|
||||
// Check for required class
|
||||
if (isText (_config >> "requiredEngineer")) exitwith {
|
||||
if (isText (_config >> "requiredEngineer")) exitWith {
|
||||
missionNamespace getVariable [(getText (_config >> "requiredEngineer")), 0];
|
||||
};
|
||||
0;
|
||||
};
|
||||
if !([_caller, _engineerRequired] call FUNC(isEngineer)) exitwith {false};
|
||||
if !([_caller, _engineerRequired] call FUNC(isEngineer)) exitWith {false};
|
||||
|
||||
//Items can be an array of required items or a string to a ACE_Setting array
|
||||
_items = if (isArray (_config >> "items")) then {
|
||||
@ -49,7 +49,7 @@ _items = if (isArray (_config >> "items")) then {
|
||||
};
|
||||
_settingItemsArray select (missionNamespace getVariable _settingName);
|
||||
};
|
||||
if (count _items > 0 && {!([_caller, _items] call FUNC(hasItems))}) exitwith {false};
|
||||
if (count _items > 0 && {!([_caller, _items] call FUNC(hasItems))}) exitWith {false};
|
||||
|
||||
_return = true;
|
||||
if (getText (_config >> "condition") != "") then {
|
||||
@ -66,27 +66,27 @@ if (getText (_config >> "condition") != "") then {
|
||||
};
|
||||
};
|
||||
|
||||
if (!_return) exitwith {false};
|
||||
if (!_return) exitWith {false};
|
||||
|
||||
_vehicleStateCondition = if (isText(_config >> "vehicleStateCondition")) then {
|
||||
missionNamespace getVariable [getText(_config >> "vehicleStateCondition"), 0]
|
||||
} else {
|
||||
getNumber(_config >> "vehicleStateCondition")
|
||||
};
|
||||
// if (_vehicleStateCondition == 1 && {!([_target] call FUNC(isInStableCondition))}) exitwith {false};
|
||||
// if (_vehicleStateCondition == 1 && {!([_target] call FUNC(isInStableCondition))}) exitWith {false};
|
||||
|
||||
_locations = getArray (_config >> "repairLocations");
|
||||
if ("All" in _locations) exitwith {true};
|
||||
if ("All" in _locations) exitWith {true};
|
||||
|
||||
private ["_repairFacility", "_repairVeh"];
|
||||
_repairFacility = {([_caller] call FUNC(isInRepairFacility)) || ([_target] call FUNC(isInRepairFacility))};
|
||||
_repairVeh = {([_caller] call FUNC(isNearRepairVehicle)) || ([_target] call FUNC(isNearRepairVehicle))};
|
||||
|
||||
{
|
||||
if (_x == "field") exitwith {_return = true;};
|
||||
if (_x == "RepairFacility" && _repairFacility) exitwith {_return = true;};
|
||||
if (_x == "RepairVehicle" && _repairVeh) exitwith {_return = true;};
|
||||
if !(isnil _x) exitwith {
|
||||
if (_x == "field") exitWith {_return = true;};
|
||||
if (_x == "RepairFacility" && _repairFacility) exitWith {_return = true;};
|
||||
if (_x == "RepairVehicle" && _repairVeh) exitWith {_return = true;};
|
||||
if !(isnil _x) exitWith {
|
||||
private "_val";
|
||||
_val = missionNamespace getVariable _x;
|
||||
if (typeName _val == "SCALAR") then {
|
||||
|
@ -21,7 +21,7 @@
|
||||
params ["_unit", "_target", "_hitPoint", ["_wheel", false]];
|
||||
TRACE_4("params",_unit,_target,_hitPoint,_wheel);
|
||||
// TODO [_unit, _wheel] call EFUNC(common,claim); on start of action
|
||||
//if !([_unit, _target, _hitpoint, "ReplaceWheel"] call FUNC(canRepair)) exitwith {false};
|
||||
//if !([_unit, _target, _hitpoint, "ReplaceWheel"] call FUNC(canRepair)) exitWith {false};
|
||||
|
||||
if !([_unit, _target, ["isNotDragging", "isNotCarrying", "isNotOnLadder"]] call EFUNC(common,canInteractWith)) exitWith {false};
|
||||
|
||||
|
@ -31,7 +31,7 @@ _wheel = objNull;
|
||||
_wheel = _x;
|
||||
};
|
||||
} forEach nearestObjects [_unit, ["ACE_Track"], 5];
|
||||
if (isNull _wheel) exitwith {};
|
||||
if (isNull _wheel) exitWith {};
|
||||
|
||||
// get current hitpoint damage
|
||||
|
||||
|
@ -31,7 +31,7 @@ _wheel = objNull;
|
||||
_wheel = _x;
|
||||
};
|
||||
} forEach nearestObjects [_unit, ["ACE_Track"], 5];
|
||||
if (isNull _wheel) exitwith {};
|
||||
if (isNull _wheel) exitWith {};
|
||||
|
||||
// get current hitpoint damage
|
||||
_hitPointDamage = _vehicle getHitPointDamage _hitPoint;
|
||||
|
@ -31,7 +31,7 @@ _wheel = objNull;
|
||||
_wheel = _x;
|
||||
};
|
||||
} forEach nearestObjects [_unit, ["ACE_Wheel"], 5];
|
||||
if (isNull _wheel) exitwith {};
|
||||
if (isNull _wheel) exitWith {};
|
||||
|
||||
// get current hitpoint damage
|
||||
_hitPointDamage = _vehicle getHitPointDamage _hitPoint;
|
||||
|
@ -19,7 +19,7 @@ params ["_unit"];
|
||||
TRACE_1("params",_unit);
|
||||
// TODO when near repair station, full repair?
|
||||
|
||||
if (([_unit] call FUNC(isInRepairFacility) || {[_unit] call FUNC(isNearRepairVehicle)})) exitwith {0};
|
||||
if (([_unit] call FUNC(isInRepairFacility) || {[_unit] call FUNC(isNearRepairVehicle)})) exitWith {0};
|
||||
|
||||
if ([_unit, GVAR(engineerSetting_Repair) + 1] call FUNC(isEngineer)) exitWith {GVAR(repairDamageThreshold_Engineer)};
|
||||
if ([_unit, GVAR(engineerSetting_Repair)] call FUNC(isEngineer)) exitWith {GVAR(repairDamageThreshold)};
|
||||
|
@ -23,10 +23,10 @@ private ["_return"];
|
||||
|
||||
_return = true;
|
||||
{
|
||||
if (typeName _x == "ARRAY" && {({[_unit, _x] call EFUNC(common,hasItem)} count _x == 0)}) exitwith {
|
||||
if (typeName _x == "ARRAY" && {({[_unit, _x] call EFUNC(common,hasItem)} count _x == 0)}) exitWith {
|
||||
_return = false;
|
||||
};
|
||||
if (typeName _x == "STRING" && {!([_unit, _x] call EFUNC(common,hasItem))}) exitwith {
|
||||
if (typeName _x == "STRING" && {!([_unit, _x] call EFUNC(common,hasItem))}) exitWith {
|
||||
_return = false;
|
||||
};
|
||||
} forEach _items;
|
||||
|
@ -26,7 +26,7 @@ _repairFacility = [];
|
||||
|
||||
_objects = (lineIntersectsWith [_object modelToWorldVisual [0, 0, (_position select 2)], _object modelToWorldVisual [0, 0, (_position select 2) +10], _object]);
|
||||
{
|
||||
if (((typeOf _x) in _repairFacility) || (_x getVariable ["ACE_isRepairFacility",0]) > 0) exitwith {
|
||||
if (((typeOf _x) in _repairFacility) || (_x getVariable ["ACE_isRepairFacility",0]) > 0) exitWith {
|
||||
_isInBuilding = true;
|
||||
};
|
||||
} forEach _objects;
|
||||
@ -34,7 +34,7 @@ _objects = (lineIntersectsWith [_object modelToWorldVisual [0, 0, (_position sel
|
||||
if (!_isInBuilding) then {
|
||||
_objects = position _object nearObjects 7.5;
|
||||
{
|
||||
if (((typeOf _x) in _repairFacility) || (_x getVariable ["ACE_isRepairFacility",0]) > 0) exitwith {
|
||||
if (((typeOf _x) in _repairFacility) || (_x getVariable ["ACE_isRepairFacility",0]) > 0) exitWith {
|
||||
_isInBuilding = true;
|
||||
};
|
||||
} forEach _objects;
|
||||
|
@ -24,7 +24,7 @@ _nearObjects = nearestObjects [_unit, ["Air","LandVehicle"], 20];
|
||||
|
||||
_return = false;
|
||||
{
|
||||
if ([_x] call FUNC(isRepairVehicle)) exitwith {_return = true;};
|
||||
if ([_x] call FUNC(isRepairVehicle)) exitWith {_return = true;};
|
||||
} forEach _nearObjects;
|
||||
|
||||
_return;
|
||||
|
@ -18,6 +18,6 @@
|
||||
params ["_vehicle"];
|
||||
TRACE_1("params",_vehicle);
|
||||
|
||||
if (_vehicle isKindOf "CAManBase") exitwith {false};
|
||||
if (_vehicle isKindOf "CAManBase") exitWith {false};
|
||||
|
||||
((_vehicle getVariable ["ACE_isRepairVehicle", getNumber (configFile >> "CfgVehicles" >> typeOf _vehicle >> QGVAR(canRepair))]) > 0);
|
||||
|
@ -24,19 +24,19 @@ TRACE_4("params",_calller,_target,_hitPoint,_className);
|
||||
private["_callbackProgress", "_callerAnim", "_calller", "_condition", "_config", "_consumeItems", "_displayText", "_engineerRequired", "_iconDisplayed", "_items", "_locations", "_repairTime", "_repairTimeConfig", "_return", "_usersOfItems", "_vehicleStateCondition", "_wpn", "_settingName", "_settingItemsArray"];
|
||||
|
||||
_config = (ConfigFile >> "ACE_Repair" >> "Actions" >> _className);
|
||||
if !(isClass _config) exitwith {false}; // or go for a default?
|
||||
if !(isClass _config) exitWith {false}; // or go for a default?
|
||||
|
||||
_engineerRequired = if (isNumber (_config >> "requiredEngineer")) then {
|
||||
getNumber (_config >> "requiredEngineer");
|
||||
} else {
|
||||
// Check for required class
|
||||
if (isText (_config >> "requiredEngineer")) exitwith {
|
||||
if (isText (_config >> "requiredEngineer")) exitWith {
|
||||
missionNamespace getVariable [(getText (_config >> "requiredEngineer")), 0];
|
||||
};
|
||||
0;
|
||||
};
|
||||
if !([_caller, _engineerRequired] call FUNC(isEngineer)) exitwith {false};
|
||||
if (isEngineOn _target) exitwith {false};
|
||||
if !([_caller, _engineerRequired] call FUNC(isEngineer)) exitWith {false};
|
||||
if (isEngineOn _target) exitWith {false};
|
||||
|
||||
//Items can be an array of required items or a string to a ACE_Setting array
|
||||
_items = if (isArray (_config >> "items")) then {
|
||||
@ -49,7 +49,7 @@ _items = if (isArray (_config >> "items")) then {
|
||||
};
|
||||
_settingItemsArray select (missionNamespace getVariable _settingName);
|
||||
};
|
||||
if (count _items > 0 && {!([_caller, _items] call FUNC(hasItems))}) exitwith {false};
|
||||
if (count _items > 0 && {!([_caller, _items] call FUNC(hasItems))}) exitWith {false};
|
||||
|
||||
_return = true;
|
||||
if (getText (_config >> "condition") != "") then {
|
||||
@ -65,27 +65,27 @@ if (getText (_config >> "condition") != "") then {
|
||||
_return = [_caller, _target, _hitPoint, _className] call _condition;
|
||||
};
|
||||
};
|
||||
if (!_return) exitwith {false};
|
||||
if (!_return) exitWith {false};
|
||||
|
||||
_vehicleStateCondition = if (isText(_config >> "vehicleStateCondition")) then {
|
||||
missionNamespace getVariable [getText(_config >> "vehicleStateCondition"), 0]
|
||||
} else {
|
||||
getNumber(_config >> "vehicleStateCondition")
|
||||
};
|
||||
// if (_vehicleStateCondition == 1 && {!([_target] call FUNC(isInStableCondition))}) exitwith {false};
|
||||
// if (_vehicleStateCondition == 1 && {!([_target] call FUNC(isInStableCondition))}) exitWith {false};
|
||||
|
||||
_locations = getArray (_config >> "repairLocations");
|
||||
if ("All" in _locations) exitwith {true};
|
||||
if ("All" in _locations) exitWith {true};
|
||||
|
||||
private ["_repairFacility", "_repairVeh"];
|
||||
_repairFacility = {([_caller] call FUNC(isInRepairFacility)) || ([_target] call FUNC(isInRepairFacility))};
|
||||
_repairVeh = {([_caller] call FUNC(isNearRepairVehicle)) || ([_target] call FUNC(isNearRepairVehicle))};
|
||||
|
||||
{
|
||||
if (_x == "field") exitwith {_return = true;};
|
||||
if (_x == "RepairFacility" && _repairFacility) exitwith {_return = true;};
|
||||
if (_x == "RepairVehicle" && _repairVeh) exitwith {_return = true;};
|
||||
if !(isnil _x) exitwith {
|
||||
if (_x == "field") exitWith {_return = true;};
|
||||
if (_x == "RepairFacility" && _repairFacility) exitWith {_return = true;};
|
||||
if (_x == "RepairVehicle" && _repairVeh) exitWith {_return = true;};
|
||||
if !(isnil _x) exitWith {
|
||||
private "_val";
|
||||
_val = missionNamespace getVariable _x;
|
||||
if (typeName _val == "SCALAR") then {
|
||||
@ -100,13 +100,13 @@ _repairVeh = {([_caller] call FUNC(isNearRepairVehicle)) || ([_target] call FUNC
|
||||
};
|
||||
} forEach _locations;
|
||||
|
||||
if !(_return && alive _target) exitwith {false};
|
||||
if !(_return && alive _target) exitWith {false};
|
||||
|
||||
_consumeItems = if (isNumber (_config >> "itemConsumed")) then {
|
||||
getNumber (_config >> "itemConsumed");
|
||||
} else {
|
||||
// Check for required class
|
||||
if (isText (_config >> "itemConsumed")) exitwith {
|
||||
if (isText (_config >> "itemConsumed")) exitWith {
|
||||
missionNamespace getVariable [(getText (_config >> "itemConsumed")), 0];
|
||||
};
|
||||
0;
|
||||
@ -160,14 +160,14 @@ if (vehicle _caller == _caller && {_callerAnim != ""}) then {
|
||||
_repairTime = if (isNumber (_config >> "repairingTime")) then {
|
||||
getNumber (_config >> "repairingTime");
|
||||
} else {
|
||||
if (isText (_config >> "repairingTime")) exitwith {
|
||||
if (isText (_config >> "repairingTime")) exitWith {
|
||||
_repairTimeConfig = getText(_config >> "repairingTime");
|
||||
if (isnil _repairTimeConfig) then {
|
||||
_repairTimeConfig = compile _repairTimeConfig;
|
||||
} else {
|
||||
_repairTimeConfig = missionNamespace getVariable _repairTimeConfig;
|
||||
};
|
||||
if (typeName _repairTimeConfig == "SCALAR") exitwith {
|
||||
if (typeName _repairTimeConfig == "SCALAR") exitWith {
|
||||
_repairTimeConfig;
|
||||
};
|
||||
[_caller, _target, _hitPoint, _className] call _repairTimeConfig;
|
||||
|
@ -19,7 +19,7 @@
|
||||
params ["_unit", "_item"];
|
||||
TRACE_2("params",_unit,_item);
|
||||
|
||||
if ([_unit, _item] call EFUNC(common,hasItem)) exitwith {
|
||||
if ([_unit, _item] call EFUNC(common,hasItem)) exitWith {
|
||||
[[_unit, _item], QUOTE(EFUNC(common,useItem)), _unit] call EFUNC(common,execRemoteFnc); /* TODO Replace by event system */
|
||||
[true, _unit];
|
||||
};
|
||||
|
@ -27,14 +27,14 @@ _itemsUsedBy = [];
|
||||
if (typeName _x == "ARRAY") then {
|
||||
{
|
||||
_itemUsedInfo = [_unit, _x] call FUNC(useItem);
|
||||
if (_itemUsedInfo select 0) exitwith { _itemsUsedBy pushback [(_itemUsedInfo select 1), _x]};
|
||||
if (_itemUsedInfo select 0) exitWith { _itemsUsedBy pushback [(_itemUsedInfo select 1), _x]};
|
||||
} forEach _x;
|
||||
};
|
||||
|
||||
// handle required item
|
||||
if (typeName _x == "STRING") then {
|
||||
_itemUsedInfo = [_unit, _x] call FUNC(useItem);
|
||||
if (_itemUsedInfo select 0) exitwith { _itemsUsedBy pushback [(_itemUsedInfo select 1), _x]};
|
||||
if (_itemUsedInfo select 0) exitWith { _itemsUsedBy pushback [(_itemUsedInfo select 1), _x]};
|
||||
};
|
||||
} forEach _items;
|
||||
|
||||
|
@ -177,7 +177,7 @@ switch (toLower _mode) do {
|
||||
};
|
||||
|
||||
// Handle held keys (prevent repeat calling)
|
||||
if (GVAR(heldKeys) param [_dik,false]) exitwith {};
|
||||
if (GVAR(heldKeys) param [_dik,false]) exitWith {};
|
||||
// Exclude movement/adjustment keys so that speed can be adjusted on fly
|
||||
if !(_dik in [16,17,30,31,32,44,74,78]) then {
|
||||
GVAR(heldKeys) set [_dik,true];
|
||||
|
@ -27,7 +27,7 @@ params [["_set",true,[true]], ["_force",true,[true]]];
|
||||
if (!hasInterface) exitWith {};
|
||||
|
||||
// Exit if no change
|
||||
if (_set isEqualTo GVAR(isSet)) exitwith {};
|
||||
if (_set isEqualTo GVAR(isSet)) exitWith {};
|
||||
|
||||
// Handle common addon audio
|
||||
if (["ace_hearing"] call EFUNC(common,isModLoaded)) then {
|
||||
|
@ -26,7 +26,7 @@ params [["_unit",player,[objNull]], ["_set",true,[true]]];
|
||||
// No change, no service (but allow spectators to be reset)
|
||||
if !(_set || (GETVAR(_unit,GVAR(isStaged),false))) exitWith {};
|
||||
|
||||
if !(local _unit) exitwith {
|
||||
if !(local _unit) exitWith {
|
||||
[[_unit, _set], QFUNC(stageSpectator), _unit] call EFUNC(common,execRemoteFnc);
|
||||
};
|
||||
|
||||
|
@ -16,7 +16,7 @@
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
|
||||
if !(GVAR(DisplayText)) exitwith {};
|
||||
if !(GVAR(DisplayText)) exitWith {};
|
||||
|
||||
params ["_magazine", "_numberofGrenades"];
|
||||
|
||||
|
@ -13,11 +13,11 @@
|
||||
|
||||
#include "script_component.hpp"
|
||||
|
||||
if (!isServer) exitwith {};
|
||||
if (!isServer) exitWith {};
|
||||
|
||||
params ["_object"];
|
||||
|
||||
if (!(_object getvariable [QGVAR(addObject), GVAR(autoAddObjects)])) exitwith {};
|
||||
if (!(_object getvariable [QGVAR(addObject), GVAR(autoAddObjects)])) exitWith {};
|
||||
|
||||
{
|
||||
_x addCuratorEditableObjects [[_object], true];
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user