Skip to content

Commit

Permalink
General - Fix command case (#591)
Browse files Browse the repository at this point in the history
**When merged this pull request will:**
- Title

### IMPORTANT

- [Development Guidelines](https://ace3.acemod.org/wiki/development/)
are read, understood and applied.
- Title of this PR uses our standard template `Component -
Add|Fix|Improve|Change|Make|Remove {changes}`.
  • Loading branch information
MiszczuZPolski authored Sep 3, 2024
1 parent 07a86c7 commit 9895729
Show file tree
Hide file tree
Showing 41 changed files with 122 additions and 122 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -21,5 +21,5 @@
params ["_ctrl", "_target", "_selectionN", "_entries"];

if (_target getVariable [QGVAR(recovery), false]) then {
_entries pushback [LLSTRING(RecoveryPosition), [0.1, 1, 1, 1]];
_entries pushBack [LLSTRING(RecoveryPosition), [0.1, 1, 1, 1]];
};
2 changes: 1 addition & 1 deletion addons/airway/functions/fnc_gui_updateInjuryListPart.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,6 @@ if (_target getVariable [QGVAR(airway), false] && _selectionN isEqualTo 0) then
private _a = _target getVariable [QGVAR(airway_item), ""];
if !(_a isEqualTo "") then {
private _text = format [LSTRING(%1_Display), _a];
_entries pushback [localize _text, [0.1, 1, 1, 1]];
_entries pushBack [localize _text, [0.1, 1, 1, 1]];
};
};
2 changes: 1 addition & 1 deletion addons/airway/functions/fnc_handlePuking.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ _unit setVariable ["kat_pukeActive_PFH", true];
if !(_unit getVariable [QGVAR(occluded), false]) then {
_unit setVariable [QGVAR(occluded), true, true];
if (GVAR(checkbox_puking_sound)) then {
playsound3D [selectRandom [QPATHTOF_SOUND(sounds\puking1.wav),QPATHTOF_SOUND(sounds\puking2.wav),QPATHTOF_SOUND(sounds\puking3.wav)], _unit, false, getPosASL _unit, 8, 1, 15];
playSound3D [selectRandom [QPATHTOF_SOUND(sounds\puking1.wav),QPATHTOF_SOUND(sounds\puking2.wav),QPATHTOF_SOUND(sounds\puking3.wav)], _unit, false, getPosASL _unit, 8, 1, 15];
};
};
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ if (_item isEqualTo "Larynxtubus") then {
_patient call FUNC(handlePuking);
};

if !(GVAR(ReusableAirwayItems)) exitwith {};
if !(GVAR(ReusableAirwayItems)) exitWith {};

if (_item isEqualTo "Larynxtubus") then {
[_medic, "kat_larynx"] call ACEFUNC(common,addToInventory);
Expand Down
10 changes: 5 additions & 5 deletions addons/breathing/functions/fnc_gui_updateInjuryListPart.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -46,12 +46,12 @@ if (GVAR(showCyanosis) && _selectionN in [0,2,3]) then {

if (_target getVariable [QGVAR(pulseoximeter), false] && _selectionN in [2,3]) then {
if((_target getVariable [QGVAR(PulseOximeter_Attached), [0,0]] select (_selectionN - 2)) > 0) then {
_entries pushback [LLSTRING(Pulseoximeter), [0.3, 0.8, 0.8, 1]];
_entries pushBack [LLSTRING(Pulseoximeter), [0.3, 0.8, 0.8, 1]];
};
};

if (_target getVariable [QGVAR(nasalCannula), false] && _selectionN isEqualTo 0) then {
_entries pushback [LLSTRING(NasalCannula_Display), [0.3, 0.8, 0.8, 1]];
_entries pushBack [LLSTRING(NasalCannula_Display), [0.3, 0.8, 0.8, 1]];
};

private _ptxEntry = [];
Expand All @@ -70,7 +70,7 @@ if (_selectionN isEqualTo 1) then {

if (GVAR(PneumothoraxAlwaysVisible)) then {
if ((_target getVariable [QGVAR(pneumothorax), 0] > 0) && !(_tensionhemothorax)) then {
_ptxEntry pushback [LLSTRING(pneumothorax_mm), [1,1,1,1]];
_ptxEntry pushBack [LLSTRING(pneumothorax_mm), [1,1,1,1]];
};
} else {
if (_target getVariable [QGVAR(deepPenetratingInjury), false]) then {
Expand All @@ -80,11 +80,11 @@ if (_selectionN isEqualTo 1) then {

if (GVAR(TensionHemothoraxAlwaysVisible)) then {
if (_target getVariable [QGVAR(hemopneumothorax), false]) then {
_ptxEntry pushback [LLSTRING(hemopneumothorax_mm), [1,1,1,1]];
_ptxEntry pushBack [LLSTRING(hemopneumothorax_mm), [1,1,1,1]];
};

if (_target getVariable [QGVAR(tensionpneumothorax), false]) then {
_ptxEntry pushback [LLSTRING(tensionpneumothorax_mm), [1,1,1,1]];
_ptxEntry pushBack [LLSTRING(tensionpneumothorax_mm), [1,1,1,1]];
};
};
};
Expand Down
4 changes: 2 additions & 2 deletions addons/breathing/functions/fnc_handlePulmoHit.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
params ["_unit", "_allDamages", "", "_ammo"];
_allDamages select 0 params ["_damage", "_bodyPart"];

if (!(GVAR(enable)) || !(_bodyPart isEqualTo "Body") || !(_ammo isKindOF "BulletBase")) exitWith {};
if (!(GVAR(enable)) || !(_bodyPart isEqualTo "Body") || !(_ammo isKindOf "BulletBase")) exitWith {};
//Other mods can utilise KAT_Pneumothorax_Exclusion variable to prevent Pneumothorax from happening
if ((_damage < GVAR(pneumothoraxDamageThreshold)) || (_unit getVariable ["KAT_Pneumothorax_Exclusion", false])) exitWith {};

Expand All @@ -33,7 +33,7 @@ if (GVAR(pneumothoraxDamageThreshold_TakenDamage)) then {
};

if (floor (random 100) < (GVAR(pneumothoraxChance) + _chanceIncrease)) then {
if (_unit getVariable [QGVAR(pneumothorax), 0] isEqualto 0 && !(_unit getVariable [QGVAR(tensionpneumothorax), false])) then { // Initial pneumothorax
if (_unit getVariable [QGVAR(pneumothorax), 0] isEqualTo 0 && !(_unit getVariable [QGVAR(tensionpneumothorax), false])) then { // Initial pneumothorax
// add breathing sound
[_unit, 0.2] call ACEFUNC(medical_status,adjustPainLevel);
_unit setVariable [QGVAR(pneumothorax), 1, true];
Expand Down
2 changes: 1 addition & 1 deletion addons/breathing/functions/fnc_useBVM.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@ GVAR(BVM_timeOut) = true;
_patient setVariable [QGVAR(oxygenTankConnected), false, true];
};

playsound3D [QPATHTOF_SOUND(audio\squeeze_BVM.ogg), _patient, false, getPosASL _patient, 8, 1, 15];
playSound3D [QPATHTOF_SOUND(audio\squeeze_BVM.ogg), _patient, false, getPosASL _patient, 8, 1, 15];

[{ // Squeeze BVM every 5 seconds
params ["_patient"];
Expand Down
4 changes: 2 additions & 2 deletions addons/chemical/functions/fnc_afterWait.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -32,13 +32,13 @@ if ((goggles _unit) in (missionNamespace getVariable [QGVAR(availGasmaskList), [
params ["_args", "_pfhHandler"];
_args params["_unit", "_logic", "_gastype", "_radius_max", "_isinGas"];

if !(_isinGas) exitwith {
if !(_isinGas) exitWith {
[_pfhHandler] call CBA_fnc_removePerFrameHandler;
};

private _timeleft = _unit getVariable [QGVAR(gasmask_durability), 10];
_pos = _logic getVariable [QGVAR(gas_position), [0, 0, 0]];
if (_unit distance _pos > _radius_max || !(_logic getVariable[QGVAR(gas_active), false]) || isNull _logic) exitwith {
if (_unit distance _pos > _radius_max || !(_logic getVariable[QGVAR(gas_active), false]) || isNull _logic) exitWith {
_unit setVariable [QGVAR(enteredPoison), false, true];
_isinGas = false;
};
Expand Down
4 changes: 2 additions & 2 deletions addons/chemical/functions/fnc_chemDetector.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ params ["_unit"];
private _ui = GETUVAR(RscWeaponChemicalDetector,displayNull);
private _obj = _ui displayCtrl 101;

if ("ChemicalDetector_01_watch_F" in (assigneditems _unit)) then
if ("ChemicalDetector_01_watch_F" in (assignedItems _unit)) then
{
private _percent = _unit getVariable [QGVAR(gasPercentage),0];
private _thread = parseNumber (_percent toFixed 1);
Expand All @@ -48,7 +48,7 @@ params ["_unit"];
params["_args", "_pfhHandler"];
_args params ["_unit"];

if (_unit getVariable [QGVAR(chemDetectorState), false] && _unit getVariable [QGVAR(gasPercentage), 0] >= 0.1 && "ChemicalDetector_01_watch_F" in (assigneditems _unit)) then {
if (_unit getVariable [QGVAR(chemDetectorState), false] && _unit getVariable [QGVAR(gasPercentage), 0] >= 0.1 && "ChemicalDetector_01_watch_F" in (assignedItems _unit)) then {
playSound3D [QPATHTOF(audio\chemDetector.ogg), _unit, false, getPosASL _unit, 4, 1, 10];
};

Expand Down
12 changes: 6 additions & 6 deletions addons/chemical/functions/fnc_gasAI.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -54,15 +54,15 @@ if (!isDamageAllowed _unit) exitWith {
private _fnc_afterwait = {
params ["_unit", "_gastype", "_pos", "_skill"];

if !((goggles _unit) in (missionNamespace getVariable [QGVAR(availGasmaskList), []])) exitwith {
if !((goggles _unit) in (missionNamespace getVariable [QGVAR(availGasmaskList), []])) exitWith {
if (_gastype isEqualTo 1) then {
if (_unit distance _pos < 10 && _unit getVariable [QGVAR(enteredPoison), false]) then {
_unit say3D QGVAR(cough_1);
_unit setskill ["aimingAccuracy", 0.001];
_unit setSkill ["aimingAccuracy", 0.001];
[
{
params["_unit", "_skill"];
_unit setskill ["aimingAccuracy", _skill];
_unit setSkill ["aimingAccuracy", _skill];
},
[_unit, _skill],
30
Expand Down Expand Up @@ -92,16 +92,16 @@ if (!isDamageAllowed _unit) exitWith {
private _timeleft = 30;
for "_i" from 0 to 1 step 0 do {
_timeleft = _timeleft - 1;
if (_timeleft <= 0) exitwith {
if (_timeleft <= 0) exitWith {
[_unit, _gastype, _pos, _skill] call _fnc_afterwait;
_i = 2;
};
if (_gastype isEqualTo 1) exitwith {
if (_gastype isEqualTo 1) exitWith {
[_unit, _gastype, _pos, _skill] call _fnc_afterwait;
_i = 2;
};
_pos = _logic getVariable [QGVAR(gas_position), [0, 0, 0]];
if (_unit distance _pos > _radius_max || !(_logic getVariable [QGVAR(gas_active), false]) || isNull _logic) exitwith {
if (_unit distance _pos > _radius_max || !(_logic getVariable [QGVAR(gas_active), false]) || isNull _logic) exitWith {
_unit setVariable [QGVAR(enteredPoison), false, true];
_i = 2;
};
Expand Down
4 changes: 2 additions & 2 deletions addons/chemical/functions/fnc_gasCheck.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
* NONE
*
* Example:
* [logic, getpos player, 50, 20, 1] call kat_chemical_fnc_gasCheck;
* [logic, getPos player, 50, 20, 1] call kat_chemical_fnc_gasCheck;
*
* Public: No
*/
Expand Down Expand Up @@ -42,7 +42,7 @@ private _checkPlayers = {
continue;
};

_position = if ((toString (_position) != toString (getpos _logic))) then {getpos _logic} else {_position};
_position = if ((toString (_position) != toString (getPos _logic))) then {getPos _logic} else {_position};
_logic setVariable [QGVAR(gas_position), _position, true];

private _distance = _x distance _position;
Expand Down
2 changes: 1 addition & 1 deletion addons/chemical/functions/fnc_getChemDetectorState.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,4 @@ params ["_unit", "_isOnOff"];

private _currentState = _unit getVariable [QGVAR(chemDetectorState), false];

[false, true] select ("ChemicalDetector_01_watch_F" in (assigneditems _unit) && _currentState == _isOnOff);
[false, true] select ("ChemicalDetector_01_watch_F" in (assignedItems _unit) && _currentState == _isOnOff);
4 changes: 2 additions & 2 deletions addons/chemical/functions/fnc_getList.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,10 @@
*/
params ["_str", ["_cfg", "", [""]]];

private _clipstring = _str splitstring ", ""[]()'";
private _clipstring = _str splitString ", ""[]()'";
private _array = [];
{
if (isClass(configFile >> _cfg >> _x) || _cfg isEqualto "") then {
if (isClass(configFile >> _cfg >> _x) || _cfg isEqualTo "") then {
_array pushBackUnique _x
};
nil
Expand Down
6 changes: 3 additions & 3 deletions addons/chemical/functions/fnc_handleFired.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,9 @@
params ["_vehicle", "", "", "", "_ammo", "_magazine", "_projectile"];

// Large enough distance to not simulate any wind deflection
if (_vehicle distance ACE_player > 8000) exitwith {};
if (_vehicle distance ACE_player > 8000) exitWith {};

if !(_ammo in KAT_ProjectileCache) exitwith {};
if !(_ammo in KAT_ProjectileCache) exitWith {};

private _configClass = (configFile >> "CfgAmmo" >> _ammo);

Expand All @@ -40,7 +40,7 @@ private _gasLvL = [_configClass, "KAT_toxicLvL", 1] call BIS_fnc_returnConfigEnt
_args params ["_projectile", "_posArr", "_gasInfo"];
_gasInfo params ["_lifetime", "_radius", "_gasLvL"];

if (!isNull _projectile) exitwith {
if (!isNull _projectile) exitWith {
_args set [1, getPos _projectile];
};

Expand Down
4 changes: 2 additions & 2 deletions addons/chemical/functions/fnc_init.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,9 @@ if (!local _unit) exitWith {};
params ["_args", "_pfhID"];
_args params ["_unit"];
private _playertime = _unit getVariable [QGVAR(timeleft), 60];
private _maxtime = missionnamespace getVariable [QGVAR(infectionTime), 60];
private _maxtime = missionNamespace getVariable [QGVAR(infectionTime), 60];
if (!(_unit getVariable [QGVAR(enteredPoison), false])) then {
if (_playertime < missionnamespace getVariable [QGVAR(infectionTime), 60]) then {
if (_playertime < missionNamespace getVariable [QGVAR(infectionTime), 60]) then {
_playertime = _playertime + 1;
if (_playertime >= _maxtime) then {
_playertime = _maxtime;
Expand Down
2 changes: 1 addition & 1 deletion addons/chemical/functions/fnc_throwGrenade.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@

private _config = configFile >> "CfgAmmo" >> _ammo;

if (getNumber (_config >> "KAT_csGas") != 1) exitwith {};
if (getNumber (_config >> "KAT_csGas") != 1) exitWith {};

private _timeToLive = getNumber (_config >> "timeToLive");
private _fuzeTimeBase = getNumber (_config >> "explosionTime");
Expand Down
6 changes: 3 additions & 3 deletions addons/circulation/defines.hpp
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
// UI stuff
#define KAT_GUI_GRID_W (safezoneW * 0.55)
#define KAT_GUI_GRID_W (safeZoneW * 0.55)
#define KAT_GUI_GRID_H (KAT_GUI_GRID_W * 4/3)
#define KAT_GUI_GRID_X (safezoneX + (safezoneW - KAT_GUI_GRID_W) / 2)
#define KAT_GUI_GRID_Y (safezoneY + (safezoneH - KAT_GUI_GRID_H) / 2)
#define KAT_GUI_GRID_X (safeZoneX + (safeZoneW - KAT_GUI_GRID_W) / 2)
#define KAT_GUI_GRID_Y (safeZoneY + (safeZoneH - KAT_GUI_GRID_H) / 2)

#define KAT_pxToScreen_X(X) (X / 2048 * KAT_GUI_GRID_W + KAT_GUI_GRID_X)
#define KAT_pxToScreen_Y(X) (X / 2048 * KAT_GUI_GRID_H + KAT_GUI_GRID_Y)
Expand Down
16 changes: 8 additions & 8 deletions addons/circulation/functions/fnc_AEDX_VitalsMonitor.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -157,10 +157,10 @@ if (_patient getVariable [QGVAR(DefibrillatorPads_Connected), false] && {((_pati
private _delay = 1.46; // standard on no heartrate delay

if (_hr <= 0) then {
playsound3D [QPATHTOF_SOUND(sounds\noheartrate.wav), _soundSource, false, getPosASL _soundSource, 2, 1, 15];
playSound3D [QPATHTOF_SOUND(sounds\noheartrate.wav), _soundSource, false, getPosASL _soundSource, 2, 1, 15];
} else {
_delay = 60 / _hr;
playsound3D [QPATHTOF_SOUND(sounds\heartrate.wav), _soundSource, false, getPosASL _soundSource, 5, 1, 15];
playSound3D [QPATHTOF_SOUND(sounds\heartrate.wav), _soundSource, false, getPosASL _soundSource, 5, 1, 15];
};
[{
params ["_patient"];
Expand Down Expand Up @@ -212,7 +212,7 @@ if (_patient getVariable [QGVAR(DefibrillatorPads_Connected), false] && {((_pati
if (alive _patient && (_cardiacState in [0,2] || (_cardiacState isEqualTo 4 && !(GVAR(analyzeDelay))))) then {
GVAR(AEDBeepPlaying) = true;
private _delay = 60 / _hr;
playsound3D [QPATHTOF_SOUND(sounds\heartrate_AED.wav), _soundSource, false, getPosASL _soundSource, 5, 1, 15];
playSound3D [QPATHTOF_SOUND(sounds\heartrate_AED.wav), _soundSource, false, getPosASL _soundSource, 5, 1, 15];
[{
params ["_patient"];

Expand All @@ -225,10 +225,10 @@ if (_patient getVariable [QGVAR(DefibrillatorPads_Connected), false] && {((_pati
GVAR(AEDBeepPlaying) = true;
private _delayAEDBeepPlaying = 1.835;
if (!(GVAR(playedAudio))) then {
playsound3D [QPATHTOF_SOUND(sounds\checkpatient.wav), _soundSource, false, getPosASL _soundSource, 5, 1, 15];
playSound3D [QPATHTOF_SOUND(sounds\checkpatient.wav), _soundSource, false, getPosASL _soundSource, 5, 1, 15];
GVAR(playedAudio) = true;
} else {
playsound3D [QPATHTOF_SOUND(sounds\alarm.wav), _soundSource, false, getPosASL _soundSource, 5, 1, 15];
playSound3D [QPATHTOF_SOUND(sounds\alarm.wav), _soundSource, false, getPosASL _soundSource, 5, 1, 15];
_delayAEDBeepPlaying = 0.526;
};
[{
Expand All @@ -243,7 +243,7 @@ if (_patient getVariable [QGVAR(DefibrillatorPads_Connected), false] && {((_pati

if (_hr > 0) then {
private _delay = 60 / _hr;
playsound3D [QPATHTOF_SOUND(sounds\heartrate_AED.wav), _soundSource, false, getPosASL _soundSource, 5, 1, 15];
playSound3D [QPATHTOF_SOUND(sounds\heartrate_AED.wav), _soundSource, false, getPosASL _soundSource, 5, 1, 15];
[{
params ["_patient"];

Expand All @@ -254,10 +254,10 @@ if (_patient getVariable [QGVAR(DefibrillatorPads_Connected), false] && {((_pati
private _delayAEDBeepPlaying = 1.835;

if (!(GVAR(playedAudio))) then {
playsound3D [QPATHTOF_SOUND(sounds\checkpatient.wav), _soundSource, false, getPosASL _soundSource, 5, 1, 15];
playSound3D [QPATHTOF_SOUND(sounds\checkpatient.wav), _soundSource, false, getPosASL _soundSource, 5, 1, 15];
GVAR(playedAudio) = true;
} else {
playsound3D [QPATHTOF_SOUND(sounds\alarm.wav), _soundSource, false, getPosASL _soundSource, 5, 1, 15];
playSound3D [QPATHTOF_SOUND(sounds\alarm.wav), _soundSource, false, getPosASL _soundSource, 5, 1, 15];
_delayAEDBeepPlaying = 0.526;
};
[{
Expand Down
Loading

0 comments on commit 9895729

Please sign in to comment.