Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Chemical/Watch - Change keybind category names #704

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading