Skip to content

Commit

Permalink
Tabs to Spaces
Browse files Browse the repository at this point in the history
  • Loading branch information
mazinskihenry committed Dec 15, 2024
1 parent 26ea073 commit c865b39
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 15 deletions.
28 changes: 14 additions & 14 deletions addons/chemical/functions/fnc_enableChemDetector.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -29,21 +29,21 @@ _unit setVariable [QGVAR(detectorEnabled), true, true];
[_idPFH] call CBA_fnc_removePerFrameHandler;
};

if !("KAT_ChemicalDetector" in assignedItems _unit) exitWith {
_unit setVariable [QGVAR(detectorEnabled), false, true];
if !("KAT_ChemicalDetector" in assignedItems _unit) exitWith {
_unit setVariable [QGVAR(detectorEnabled), false, true];
_pfhID call CBA_fnc_removePerFrameHandler;
};

private _detectorSound = _unit getVariable [QGVAR(detectorSound), false];
private _intensity = _unit getVariable [QGVAR(areaIntensity), 0];

if (_detectorSound) then {
switch true do {
case (_intensity > 0.9): { [QGVAR(playTone), [_unit, QGVAR(chemTone)], _unit] call CBA_fnc_targetEvent; };
case (_intensity > 0.7): { [QGVAR(playTone), [_unit, QGVAR(chemRapidChime)], _unit] call CBA_fnc_targetEvent; };
case (_intensity > 0.5): { [QGVAR(playTone), [_unit, QGVAR(chemFastChime)], _unit] call CBA_fnc_targetEvent; };
case (_intensity > 0.3): { [QGVAR(playTone), [_unit, QGVAR(chemNormalChime)], _unit] call CBA_fnc_targetEvent; };
case (_intensity > 0.1): { [QGVAR(playTone), [_unit, QGVAR(chemSlowChime)], _unit] call CBA_fnc_targetEvent; };
};
};
private _detectorSound = _unit getVariable [QGVAR(detectorSound), false];
private _intensity = _unit getVariable [QGVAR(areaIntensity), 0];

if (_detectorSound) then {
switch true do {
case (_intensity > 0.9): { [QGVAR(playTone), [_unit, QGVAR(chemTone)], _unit] call CBA_fnc_targetEvent; };
case (_intensity > 0.7): { [QGVAR(playTone), [_unit, QGVAR(chemRapidChime)], _unit] call CBA_fnc_targetEvent; };
case (_intensity > 0.5): { [QGVAR(playTone), [_unit, QGVAR(chemFastChime)], _unit] call CBA_fnc_targetEvent; };
case (_intensity > 0.3): { [QGVAR(playTone), [_unit, QGVAR(chemNormalChime)], _unit] call CBA_fnc_targetEvent; };
case (_intensity > 0.1): { [QGVAR(playTone), [_unit, QGVAR(chemSlowChime)], _unit] call CBA_fnc_targetEvent; };
};
};
}, 5, [_unit]] call CBA_fnc_addPerFrameHandler;
2 changes: 1 addition & 1 deletion addons/chemical/functions/fnc_hasDetector.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
params ["_unit"];

if ("KAT_ChemicalDetector" in assignedItems _unit) exitWith {
true
true
};

false

0 comments on commit c865b39

Please sign in to comment.