mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
fix pushBack capitalization
This commit is contained in:
parent
d9b90258bc
commit
5e41643cff
@ -24,7 +24,7 @@ private ["_loaded", "_space", "_itemSize"];
|
||||
if !([_item, _vehicle] call FUNC(canLoadItemIn)) exitWith {false};
|
||||
|
||||
_loaded = _vehicle getVariable [QGVAR(loaded), []];
|
||||
_loaded pushback _item;
|
||||
_loaded pushBack _item;
|
||||
_vehicle setVariable [QGVAR(loaded), _loaded, true];
|
||||
|
||||
TRACE_1("added to loaded array",_loaded);
|
||||
|
@ -25,7 +25,7 @@ _newLoaded = [];
|
||||
_totalSpaceOccupied = 0;
|
||||
{
|
||||
if ((typeName _x == "STRING") || {!isNull _x}) then {
|
||||
_newLoaded pushback _x;
|
||||
_newLoaded pushBack _x;
|
||||
_totalSpaceOccupied = _totalSpaceOccupied + ([_x] call FUNC(getSizeItem));
|
||||
};
|
||||
true
|
||||
|
@ -32,7 +32,7 @@ if (isServer) then {
|
||||
|
||||
private "_eventLog";
|
||||
_eventLog = _internalData select 1;
|
||||
_eventLog pushback [ACE_diagTime, _args, _ttl];
|
||||
_eventLog pushBack [ACE_diagTime, _args, _ttl];
|
||||
};
|
||||
};
|
||||
|
||||
|
@ -25,8 +25,8 @@ _elements = [];
|
||||
|
||||
{
|
||||
_theElement = toArray (_x select _elementN);
|
||||
_indexes pushback _foreachIndex;
|
||||
_elements pushback _theElement;
|
||||
_indexes pushBack _foreachIndex;
|
||||
_elements pushBack _theElement;
|
||||
} forEach _array;
|
||||
|
||||
for "_i" from 1 to (count _elements) - 1 do {
|
||||
@ -45,7 +45,7 @@ for "_i" from 1 to (count _elements) - 1 do {
|
||||
_returnArray = [];
|
||||
|
||||
{
|
||||
_returnArray pushback (_array select _x);
|
||||
_returnArray pushBack (_array select _x);
|
||||
} forEach _indexes;
|
||||
|
||||
_returnArray
|
||||
|
@ -21,25 +21,25 @@ _genericMessages = [LSTRING(diagnoseMessage)];
|
||||
|
||||
_genericMessages pushBack ([_target] call EFUNC(common,getName));
|
||||
if (alive _target) then {
|
||||
_genericMessages pushback LSTRING(diagnoseAlive);
|
||||
_genericMessages pushBack LSTRING(diagnoseAlive);
|
||||
} else {
|
||||
_genericMessages pushback LSTRING(diagnoseDead);
|
||||
_genericMessages pushBack LSTRING(diagnoseDead);
|
||||
};
|
||||
if (_target getvariable[QGVAR(hasLostBlood), 0] > 0) then {
|
||||
if (_target getvariable[QGVAR(hasLostBlood), 0] > 1) then {
|
||||
_genericMessages pushback LSTRING(lostBloodALot);
|
||||
_genericMessages pushBack LSTRING(lostBloodALot);
|
||||
} else {
|
||||
_genericMessages pushback LSTRING(lostBlood);
|
||||
_genericMessages pushBack LSTRING(lostBlood);
|
||||
};
|
||||
} else {
|
||||
_genericMessages pushback LSTRING(noBloodloss);
|
||||
_genericMessages pushBack LSTRING(noBloodloss);
|
||||
};
|
||||
|
||||
if (alive _target) then {
|
||||
if (_target getvariable[QGVAR(hasPain), false]) then {
|
||||
_genericMessages pushback LSTRING(inPain);
|
||||
_genericMessages pushBack LSTRING(inPain);
|
||||
} else {
|
||||
_genericMessages pushback LSTRING(noPain);
|
||||
_genericMessages pushBack LSTRING(noPain);
|
||||
};
|
||||
};
|
||||
|
||||
|
@ -20,6 +20,6 @@
|
||||
params [["_unit", objNull, [objNull]], ["_value", 0, [0]], ["_time", 1, [0]], ["_callBack", {}, [{}]]];
|
||||
|
||||
_adjustment = _unit getvariable [QGVAR(heartRateAdjustments), []];
|
||||
_adjustment pushback [_value, _time, _callBack];
|
||||
_adjustment pushBack [_value, _time, _callBack];
|
||||
_unit setvariable [QGVAR(heartRateAdjustments), _adjustment ];
|
||||
["Medical_onHeartRateAdjustmentAdded", [_unit, _value, _time]] call EFUNC(common,localEvent);
|
||||
|
@ -35,18 +35,18 @@ if (count _log >= 8) then {
|
||||
{
|
||||
// ensure the first element will not be added
|
||||
if (_foreachIndex > 0) then {
|
||||
_newLog pushback _x;
|
||||
_newLog pushBack _x;
|
||||
};
|
||||
} foreach _log;
|
||||
_log = _newLog;
|
||||
};
|
||||
_log pushback [_message, _moment, _type, _arguments];
|
||||
_log pushBack [_message, _moment, _type, _arguments];
|
||||
|
||||
_unit setvariable [_logVarName, _log, true];
|
||||
["medical_onLogEntryAdded", [_unit, _type, _message, _arguments]] call EFUNC(common,localEvent);
|
||||
|
||||
_logs = _unit getvariable [QGVAR(allLogs), []];
|
||||
if !(_logVarName in _logs) then {
|
||||
_logs pushback _logVarName;
|
||||
_logs pushBack _logVarName;
|
||||
_unit setvariable [QGVAR(allLogs), _logs, true];
|
||||
};
|
||||
|
@ -38,7 +38,7 @@ _amount = 1;
|
||||
} foreach _log;
|
||||
|
||||
if (!_inList) then {
|
||||
_log pushback [_newItem, 1, ACE_gameTime];
|
||||
_log pushBack [_newItem, 1, ACE_gameTime];
|
||||
};
|
||||
_unit setvariable [QGVAR(triageCard), _log, true];
|
||||
["Medical_onItemAddedToTriageCard", [_unit, _newItem, _amount]] call EFUNC(common,localEvent);
|
||||
|
@ -18,7 +18,7 @@ if (isnil QGVAR(unconsciousConditions)) then {
|
||||
if (typeName _this == typeName []) then {
|
||||
{
|
||||
if (typeName _x == typeName {}) then {
|
||||
GVAR(unconsciousConditions) pushback _x;
|
||||
GVAR(unconsciousConditions) pushBack _x;
|
||||
};
|
||||
} foreach _this;
|
||||
};
|
||||
|
@ -56,21 +56,21 @@ if (_show) then {
|
||||
|
||||
if (GVAR(level) >= 2 && {([_unit] call FUNC(hasMedicalEnabled))}) then {
|
||||
_partText = [LSTRING(Head), LSTRING(Torso), LSTRING(LeftArm) ,LSTRING(RightArm) ,LSTRING(LeftLeg), LSTRING(RightLeg)] select _selectionN;
|
||||
_genericMessages pushback [localize _partText, [1, 1, 1, 1]];
|
||||
_genericMessages pushBack [localize _partText, [1, 1, 1, 1]];
|
||||
};
|
||||
|
||||
if (_target getvariable[QGVAR(isBleeding), false]) then {
|
||||
_genericMessages pushback [localize LSTRING(Status_Bleeding), [1, 0.1, 0.1, 1]];
|
||||
_genericMessages pushBack [localize LSTRING(Status_Bleeding), [1, 0.1, 0.1, 1]];
|
||||
};
|
||||
if (_target getvariable[QGVAR(hasLostBlood), 0] > 1) then {
|
||||
_genericMessages pushback [localize LSTRING(Status_Lost_Blood), [1, 0.1, 0.1, 1]];
|
||||
_genericMessages pushBack [localize LSTRING(Status_Lost_Blood), [1, 0.1, 0.1, 1]];
|
||||
};
|
||||
|
||||
if (((_target getvariable [QGVAR(tourniquets), [0,0,0,0,0,0]]) select _selectionN) > 0) then {
|
||||
_genericMessages pushback [localize LSTRING(Status_Tourniquet_Applied), [0.77, 0.51, 0.08, 1]];
|
||||
_genericMessages pushBack [localize LSTRING(Status_Tourniquet_Applied), [0.77, 0.51, 0.08, 1]];
|
||||
};
|
||||
if (_target getvariable[QGVAR(hasPain), false]) then {
|
||||
_genericMessages pushback [localize LSTRING(Status_Pain), [1, 1, 1, 1]];
|
||||
_genericMessages pushBack [localize LSTRING(Status_Pain), [1, 1, 1, 1]];
|
||||
};
|
||||
|
||||
_totalIvVolume = 0;
|
||||
@ -82,7 +82,7 @@ if (_show) then {
|
||||
};
|
||||
} foreach GVAR(IVBags);
|
||||
if (_totalIvVolume >= 1) then {
|
||||
_genericMessages pushback [format[localize LSTRING(receivingIvVolume), floor _totalIvVolume], [1, 1, 1, 1]];
|
||||
_genericMessages pushBack [format[localize LSTRING(receivingIvVolume), floor _totalIvVolume], [1, 1, 1, 1]];
|
||||
};
|
||||
|
||||
_damaged = [false, false, false, false, false, false];
|
||||
@ -101,10 +101,10 @@ if (_show) then {
|
||||
// Collect the text to be displayed for this injury [ Select injury class type definition - select the classname DisplayName (6th), amount of injuries for this]
|
||||
if (_amountOf >= 1) then {
|
||||
// TODO localization
|
||||
_allInjuryTexts pushback [format["%2x %1", (GVAR(AllWoundInjuryTypes) select _x1) select 6, _amountOf], [1,1,1,1]];
|
||||
_allInjuryTexts pushBack [format["%2x %1", (GVAR(AllWoundInjuryTypes) select _x1) select 6, _amountOf], [1,1,1,1]];
|
||||
} else {
|
||||
// TODO localization
|
||||
_allInjuryTexts pushback [format["Partial %1", (GVAR(AllWoundInjuryTypes) select _x1) select 6], [1,1,1,1]];
|
||||
_allInjuryTexts pushBack [format["Partial %1", (GVAR(AllWoundInjuryTypes) select _x1) select 6], [1,1,1,1]];
|
||||
};
|
||||
};
|
||||
};
|
||||
@ -122,10 +122,10 @@ if (_show) then {
|
||||
if (_amountOf > 0) then {
|
||||
if (_amountOf >= 1) then {
|
||||
// TODO localization
|
||||
_allInjuryTexts pushback [format["[B] %2x %1", (GVAR(AllWoundInjuryTypes) select (_x select 1)) select 6, _amountOf], [0.88,0.7,0.65,1]];
|
||||
_allInjuryTexts pushBack [format["[B] %2x %1", (GVAR(AllWoundInjuryTypes) select (_x select 1)) select 6, _amountOf], [0.88,0.7,0.65,1]];
|
||||
} else {
|
||||
// TODO localization
|
||||
_allInjuryTexts pushback [format["[B] Partial %1", (GVAR(AllWoundInjuryTypes) select (_x select 1)) select 6], [0.88,0.7,0.65,1]];
|
||||
_allInjuryTexts pushBack [format["[B] Partial %1", (GVAR(AllWoundInjuryTypes) select (_x select 1)) select 6], [0.88,0.7,0.65,1]];
|
||||
};
|
||||
};
|
||||
};
|
||||
|
@ -54,7 +54,7 @@ if (_show) then {
|
||||
_message = localize _message;
|
||||
};
|
||||
};
|
||||
_triageCardTexts pushback format["%1x - %2", _amount, _message];
|
||||
_triageCardTexts pushBack format["%1x - %2", _amount, _message];
|
||||
} foreach _log;
|
||||
|
||||
if (count _triageCardTexts == 0) then {
|
||||
|
@ -69,7 +69,7 @@ _bandagedInjury = [];
|
||||
if !(_exist) then {
|
||||
// [ID, classID, bodypart, percentage treated, bloodloss rate]
|
||||
_bandagedInjury = [_injury select 0, _injury select 1, _injury select 2, _impact, _injury select 4];
|
||||
_bandagedWounds pushback _bandagedInjury;
|
||||
_bandagedWounds pushBack _bandagedInjury;
|
||||
};
|
||||
|
||||
_target setvariable [QGVAR(bandagedWounds), _bandagedWounds, true];
|
||||
|
@ -65,6 +65,6 @@ if (_amountOfDamage > 0.05) then {
|
||||
if (_amountOf > 0) then {
|
||||
_fractureID = (_fractures select (_amountOf - 1) select 0) + 1;
|
||||
};
|
||||
_fractures pushback [_fractureID, _fractureType, _bodyPartn, 1 /* percentage treated */];
|
||||
_fractures pushBack [_fractureID, _fractureType, _bodyPartn, 1 /* percentage treated */];
|
||||
_unit setvariable [QGVAR(fractures), _fractures, true];
|
||||
};
|
||||
|
@ -44,7 +44,7 @@ _foundIndex = -1;
|
||||
|
||||
if (_foundIndex < 0) then {
|
||||
// Since it is a new injury, we will have to add it to the open wounds array to store it
|
||||
_openWounds pushback _x;
|
||||
_openWounds pushBack _x;
|
||||
} else {
|
||||
// We already have one of these, so we are just going to increase the number that we have of it with a new one.
|
||||
_injury = _openWounds select _foundIndex;
|
||||
|
@ -64,7 +64,7 @@ _allPossibleInjuries = [];
|
||||
};
|
||||
|
||||
// Store the valid possible injury for the damage type, damage amount and selection
|
||||
_allPossibleInjuries pushback _x;
|
||||
_allPossibleInjuries pushBack _x;
|
||||
};
|
||||
};
|
||||
} foreach _allInjuriesForDamageType;
|
||||
@ -104,7 +104,7 @@ _woundsCreated = [];
|
||||
_injury = [_woundID, _toAddInjury select 0, _bodyPartNToAdd, 1, _toAddInjury select 2];
|
||||
|
||||
// Since it is a new injury, we will have to add it to the open wounds array to store it
|
||||
_openWounds pushback _injury;
|
||||
_openWounds pushBack _injury;
|
||||
|
||||
// New injuries will also increase the wound ID
|
||||
_woundID = _woundID + 1;
|
||||
@ -114,7 +114,7 @@ _woundsCreated = [];
|
||||
_injury set [3, (_injury select 3) + 1];
|
||||
};
|
||||
// Store the injury so we can process it later correctly.
|
||||
_woundsCreated pushback _injury;
|
||||
_woundsCreated pushBack _injury;
|
||||
|
||||
// Collect the pain that is caused by this injury
|
||||
_painToAdd = _painToAdd + (_toAddInjury select 3);
|
||||
|
@ -27,7 +27,7 @@ _allUsedMedication = _target getvariable [QGVAR(allUsedMedication), []];
|
||||
_x params ["_variableX", "_allMedsFromClassname"];
|
||||
if (_variableX== _variable) exitWith {
|
||||
if !(_className in _allMedsFromClassname) then {
|
||||
_allMedsFromClassname pushback _className;
|
||||
_allMedsFromClassname pushBack _className;
|
||||
_x set [1, _allMedsFromClassname];
|
||||
_allUsedMedication set [_foreachIndex, _x];
|
||||
_target setvariable [QGVAR(allUsedMedication), _allUsedMedication];
|
||||
@ -37,7 +37,7 @@ _allUsedMedication = _target getvariable [QGVAR(allUsedMedication), []];
|
||||
} foreach _allUsedMedication;
|
||||
|
||||
if (!_foundEntry) then {
|
||||
_allUsedMedication pushback [_variable, [_className]];
|
||||
_allUsedMedication pushBack [_variable, [_className]];
|
||||
_target setvariable [QGVAR(allUsedMedication), _allUsedMedication];
|
||||
};
|
||||
|
||||
|
@ -30,7 +30,7 @@ if (!local _unit) then {
|
||||
} foreach _openWounds;
|
||||
|
||||
if (!_exists) then {
|
||||
_openWounds pushback _injury;
|
||||
_openWounds pushBack _injury;
|
||||
};
|
||||
_unit setvariable [QGVAR(openWounds), _openWounds];
|
||||
};
|
||||
|
@ -25,14 +25,14 @@ GVAR(minLethalDamages) = [];
|
||||
for "_i" from 0 to (count _configDamageTypes -1) /* step +1 */ do {
|
||||
// Only get the subclasses in damageType class
|
||||
if (isClass(_configDamageTypes select _i)) then {
|
||||
_allFoundDamageTypes pushback (configName (_configDamageTypes select _i));
|
||||
_allFoundDamageTypes pushBack (configName (_configDamageTypes select _i));
|
||||
_minLethalDamage = if (isNumber((_configDamageTypes select _i) >> "lethalDamage")) then {
|
||||
getNumber((_configDamageTypes select _i) >> "lethalDamage");
|
||||
} else {
|
||||
_defaultMinLethalDamage
|
||||
};
|
||||
|
||||
GVAR(minLethalDamages) pushback _minLethalDamage;
|
||||
GVAR(minLethalDamages) pushBack _minLethalDamage;
|
||||
};
|
||||
};
|
||||
GVAR(allAvailableDamageTypes) = _allFoundDamageTypes;
|
||||
@ -54,8 +54,8 @@ _parseForSubClassWounds = {
|
||||
_subClasscauses = if (isArray(_subClassConfig >> "causes")) then { getArray(_subClassConfig >> "causes");} else { _causes };
|
||||
_subClassDisplayName = if (isText(_subClassConfig >> "name")) then { getText(_subClassConfig >> "name");} else {_classDisplayName + " " + _subClass};
|
||||
if (count _selections > 0 && {count _causes > 0}) then {
|
||||
GVAR(woundClassNames) pushback _subClasstype;
|
||||
_allWoundClasses pushback [_classID, _subClassselections, _subClassbloodLoss, _subClasspain, [_subClassminDamage, _subClassmaxDamage], _subClasscauses, _subClassDisplayName];
|
||||
GVAR(woundClassNames) pushBack _subClasstype;
|
||||
_allWoundClasses pushBack [_classID, _subClassselections, _subClassbloodLoss, _subClasspain, [_subClassminDamage, _subClassmaxDamage], _subClasscauses, _subClassDisplayName];
|
||||
_classID = _classID + 1;
|
||||
};
|
||||
true;
|
||||
@ -86,8 +86,8 @@ if (isClass _woundsConfig) then {
|
||||
|
||||
// There were no subclasses, so we will add this one instead.
|
||||
if (count _selections > 0 && count _causes > 0) then {
|
||||
GVAR(woundClassNames) pushback _classType;
|
||||
_allWoundClasses pushback [_classID, _selections, _bloodLoss, _pain, [_minDamage, _maxDamage], _causes, _classDisplayName];
|
||||
GVAR(woundClassNames) pushBack _classType;
|
||||
_allWoundClasses pushBack [_classID, _selections, _bloodLoss, _pain, [_minDamage, _maxDamage], _causes, _classDisplayName];
|
||||
_classID = _classID + 1;
|
||||
};
|
||||
true;
|
||||
@ -107,7 +107,7 @@ _selectionSpecific = getNumber(_damageTypesConfig >> "selectionSpecific");
|
||||
{
|
||||
// Check if this type is in the causes of a wound class, if so, we will store the wound types for this damage type
|
||||
if (_type in (_x select 5)) then {
|
||||
_woundTypes pushback _x;
|
||||
_woundTypes pushBack _x;
|
||||
};
|
||||
} foreach _allWoundClasses;
|
||||
_typeThresholds = _thresholds;
|
||||
|
@ -38,6 +38,6 @@ _varName = format["ACE_Medical_IVVolume_%1",_typeOf];
|
||||
_target setvariable [_varName, (_target getvariable [_varName, 0]) + _volumeAdded, true];
|
||||
|
||||
if !(_varName in GVAR(IVBags)) then {
|
||||
GVAR(IVBags) pushback _varName;
|
||||
GVAR(IVBags) pushBack _varName;
|
||||
publicVariable QGVAR(IVBags);
|
||||
};
|
||||
|
@ -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;
|
||||
|
||||
|
@ -77,7 +77,7 @@ if (_name isEqualTo "triage") exitWith {
|
||||
_message = localize _message;
|
||||
};
|
||||
};
|
||||
_triageCardTexts pushback format["%1x - %2 (%3m)", _amount, _message, round((ACE_gameTime - _time) / 60)];
|
||||
_triageCardTexts pushBack format["%1x - %2 (%3m)", _amount, _message, round((ACE_gameTime - _time) / 60)];
|
||||
nil;
|
||||
} count _log;
|
||||
|
||||
|
@ -15,5 +15,5 @@
|
||||
#include "script_component.hpp"
|
||||
|
||||
if ((_this select 0) isKindOf "Module_F") then {
|
||||
GVAR(moduleInitCollection) pushback (_this select 0);
|
||||
GVAR(moduleInitCollection) pushBack (_this select 0);
|
||||
};
|
||||
|
@ -2,10 +2,10 @@
|
||||
#include "script_component.hpp"
|
||||
|
||||
["SettingsInitialized", {
|
||||
GVAR(categories) pushback ""; //Ensure All Catagories is at top
|
||||
GVAR(categories) pushBack ""; //Ensure All Catagories is at top
|
||||
{
|
||||
if !(_x select 8 in GVAR(categories)) then {
|
||||
GVAR(categories) pushback (_x select 8);
|
||||
GVAR(categories) pushBack (_x select 8);
|
||||
};
|
||||
}foreach EGVAR(common,settings);
|
||||
}] call EFUNC(common,addEventHandler);
|
||||
|
@ -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;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user