Skip to content

Commit

Permalink
Chemical/Watch - Change keybind category names (#704)
Browse files Browse the repository at this point in the history
**When merged this pull request will:**
- Change KAT_ChemicalDetector and KAT Watch category name to "KAT - ADV
Medical: Chemical" and "KAT - ADV Medical: Watch"
- Make consistency with add-on option settings and improves the
appearance.
- Please merge after #700

### 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}`.

---------

Co-authored-by: mazinskihenry <[email protected]>
  • Loading branch information
Apricot-ale and mazinskihenry authored Jan 15, 2025
1 parent b9d4721 commit c759d45
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 6 deletions.
4 changes: 3 additions & 1 deletion addons/chemical/XEH_postInit.sqf
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
#include "script_component.hpp"

#define CBA_KEYBIND_CAT "KAT - ADV Medical: Chemical"

//Events
["ace_glassesChanged", LINKFUNC(breathing)] call CBA_fnc_addEventHandler;
[QGVAR(poison), LINKFUNC(poison)] call CBA_fnc_addEventHandler;
Expand Down Expand Up @@ -33,7 +35,7 @@ private _items = missionNamespace getVariable [QGVAR(availGasmask), "'G_AirPurif
private _array = [_items, "CfgGlasses"] call FUNC(getList);
missionNamespace setVariable [QGVAR(availGasmaskList), _array, true];

["KAT_ChemicalDetector", QGVAR(showChemDetector), "Show Chemical Detector", {
[CBA_KEYBIND_CAT, QGVAR(showChemDetector), "Show Chemical Detector", {
// Conditions: canInteract
if (!([ACE_player, objNull, ["isNotEscorting", "isNotInside"]] call ACEFUNC(common,canInteractWith)) || {!('KAT_ChemicalDetector' in assignedItems ACE_player)}) exitWith { false };

Expand Down
12 changes: 7 additions & 5 deletions addons/watch/XEH_postInit.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

if (!hasInterface) exitWith {};

#define CBA_KEYBIND_CAT "KAT - ADV Medical: Watch"

[QGVAR(startWatchTimer), LINKFUNC(startWatchTimer)] call CBA_fnc_addEventHandler;
[QEGVAR(misc,handleRespawn), LINKFUNC(handleRespawn)] call CBA_fnc_addEventHandler;

Expand All @@ -10,7 +12,7 @@ if (!hasInterface) exitWith {};
_unit say3D [_tone, 5];
}] call CBA_fnc_addEventHandler;

["KAT Watch", QGVAR(showKatmin), CSTRING(ShowKATWatch_Setting), {
[CBA_KEYBIND_CAT, QGVAR(showKatmin), CSTRING(ShowKATWatch_Setting), {
// Conditions: canInteract
if (!([ACE_player, objNull, ["isNotEscorting", "isNotInside"]] call ACEFUNC(common,canInteractWith))) exitWith { false };

Expand Down Expand Up @@ -58,7 +60,7 @@ if (!hasInterface) exitWith {};
_return
}, { false }, [24, [false, false, false]], false] call CBA_fnc_addKeybind;

["KAT Watch", QGVAR(increaseTimer), CSTRING(AddTimer_Setting), {
[CBA_KEYBIND_CAT, QGVAR(increaseTimer), CSTRING(AddTimer_Setting), {
if (!([ACE_player, objNull, ["isNotEscorting", "isNotInside"]] call ACEFUNC(common,canInteractWith)) || {!('KAT_Ranger' in assignedItems ACE_player)}) exitWith { false };

if !(GETMVAR(GVAR(RangerActive),false)) exitWith { false };
Expand All @@ -72,7 +74,7 @@ if (!hasInterface) exitWith {};
true
}, { false }, [38, [false, false, true]], false] call CBA_fnc_addKeybind;

["KAT Watch", QGVAR(decreaseTimer), CSTRING(SubtractTimer_Setting), {
[CBA_KEYBIND_CAT, QGVAR(decreaseTimer), CSTRING(SubtractTimer_Setting), {
if (!([ACE_player, objNull, ["isNotEscorting", "isNotInside"]] call ACEFUNC(common,canInteractWith)) || {!('KAT_Ranger' in assignedItems ACE_player)}) exitWith { false };

if !(GETMVAR(GVAR(RangerActive),false)) exitWith { false };
Expand All @@ -86,7 +88,7 @@ if (!hasInterface) exitWith {};
true
}, { false }, [36, [false, false, true]], false] call CBA_fnc_addKeybind;

["KAT Watch", QGVAR(startTimer), CSTRING(StartStopTimer_Setting), {
[CBA_KEYBIND_CAT, QGVAR(startTimer), CSTRING(StartStopTimer_Setting), {
if (!([ACE_player, objNull, ["isNotEscorting", "isNotInside"]] call ACEFUNC(common,canInteractWith)) || {!('KAT_Ranger' in assignedItems ACE_player)}) exitWith { false };

private _timerLength = ACE_player getVariable [QGVAR(rangerTimer), 0];
Expand All @@ -104,7 +106,7 @@ if (!hasInterface) exitWith {};
true
}, { false }, [37, [false, false, true]], false] call CBA_fnc_addKeybind;

["KAT Watch", QGVAR(katminTimeKey), CSTRING(TimeModifier_Settings), {
[CBA_KEYBIND_CAT, QGVAR(katminTimeKey), CSTRING(TimeModifier_Settings), {
switch true do {
case (('KAT_Katmin' in assignedItems ACE_player)): {
private _katminSeconds = ACE_player getVariable [QGVAR(katminSeconds), false];
Expand Down

0 comments on commit c759d45

Please sign in to comment.