diff --git a/addons/watch/CfgSounds.hpp b/addons/watch/CfgSounds.hpp
new file mode 100644
index 000000000..7c40585af
--- /dev/null
+++ b/addons/watch/CfgSounds.hpp
@@ -0,0 +1,24 @@
+class CfgSounds {
+ class GVAR(watchAlarm) {
+ name = QGVAR(watchAlarm);
+ sound[] =
+ {
+ QPATHTOF(audio\watchAlarm.ogg),
+ 5,
+ 1,
+ 10
+ };
+ titles[] = {};
+ };
+ class GVAR(watchVibrate) {
+ name = QGVAR(watchVibrate);
+ sound[] =
+ {
+ QPATHTOF(audio\watchVibrate.ogg),
+ 5,
+ 1,
+ 10
+ };
+ titles[] = {};
+ };
+};
diff --git a/addons/watch/CfgWeapons.hpp b/addons/watch/CfgWeapons.hpp
index 88d16c14b..bd888acde 100644
--- a/addons/watch/CfgWeapons.hpp
+++ b/addons/watch/CfgWeapons.hpp
@@ -21,4 +21,11 @@ class CfgWeapons {
displayName = CSTRING(STSDisplayName);
picture = QPATHTOF(UI\watch_sts.paa);
};
+ class KAT_Ranger: ItemWatch {
+ ACE_hideItemType = "Watch";
+ author = "Mazinski";
+ descriptionShort = CSTRING(RangerDescription);
+ displayName = CSTRING(RangerDisplayName);
+ picture = QPATHTOF(UI\RangerWatchFace.paa);
+ };
};
diff --git a/addons/watch/RscTitles.hpp b/addons/watch/RscTitles.hpp
index 45979fbf9..7a31f4fc5 100644
--- a/addons/watch/RscTitles.hpp
+++ b/addons/watch/RscTitles.hpp
@@ -418,4 +418,141 @@ class RscTitles
};
};
};
+ class KAT_Ranger
+ {
+ idd = 22935;
+ enableSimulation = 1;
+ movingEnable = 0;
+ fadeIn=0;
+ fadeOut=1;
+ duration = 10e10;
+ onLoad = "uiNamespace setVariable ['KAT_Ranger', _this select 0];";
+ class controls
+ {
+ class RangerImage: RscPicture
+ {
+ idc = 22800;
+ text = "\x\kat\addons\watch\UI\RangerWatchFace.paa";
+ x = QUOTE(SAFEZONE_X_RIGHTEDGE - FRAME_W(25) - FRAME_W(15.07));
+ y = QUOTE(SAFEZONE_Y_LOWEDGE - FRAME_H(20));
+ w = QUOTE(FRAME_W(28));
+ h = QUOTE(FRAME_H(28));
+ };
+ class RangerTime: RscText
+ {
+ idc = 22806;
+ style = ST_RIGHT;
+ shadow = 0;
+ font = "EtelkaMonospacePro";
+ text = "22:22:22"; //--- ToDo: Localize;
+ x = QUOTE(SAFEZONE_X_RIGHTEDGE - FRAME_W(25) - FRAME_W(4.7));
+ y = QUOTE(SAFEZONE_Y_LOWEDGE - FRAME_H(5.9));
+ w = QUOTE(FRAME_W(7.5));
+ h = QUOTE(FRAME_H(4));
+ colorBackground[] = {0,0,0,0};
+ colorText[] = {0.8,0.8,0.8,0.9};
+ sizeEx = QUOTE(FRAME_H(1.9));
+ };
+ class RangerTimer: RscText
+ {
+ idc = 22807;
+ style = ST_RIGHT;
+ valign = "middle";
+ shadow = 0;
+ font = "EtelkaMonospacePro";
+ text = ""; //--- ToDo: Localize;
+ x = QUOTE(SAFEZONE_X_RIGHTEDGE - FRAME_W(24.6));
+ y = QUOTE(SAFEZONE_Y_LOWEDGE - FRAME_H(7.5));
+ w = QUOTE(FRAME_W(3));
+ h = QUOTE(FRAME_H(1.5));
+ colorBackground[] = {0,0,0,0};
+ colorText[] = {0.8,0.8,0.8,0.9};
+ sizeEx = QUOTE(FRAME_H(1.8));
+ };
+ class RangerAltitude: RscText
+ {
+ idc = 22808;
+ style = ST_RIGHT;
+ valign = "middle";
+ shadow = 0;
+ font = "EtelkaMonospacePro";
+ text = "1000";
+ x = QUOTE(SAFEZONE_X_RIGHTEDGE - FRAME_W(25) - FRAME_W(5.5));
+ y = QUOTE(SAFEZONE_Y_LOWEDGE - FRAME_H(7.5));
+ w = QUOTE(FRAME_W(4));
+ h = QUOTE(FRAME_H(1.5));
+ colorBackground[] = {0,0,0,0};
+ colorText[] = {0.8,0.8,0.8,0.9};
+ sizeEx = QUOTE(FRAME_H(1.8));
+ };
+ class RangerHR: RscText
+ {
+ idc = 22809;
+ style = ST_CENTER;
+ valign = "middle";
+ shadow = 0;
+ font = "EtelkaMonospacePro";
+ text = "111";
+ x = QUOTE(SAFEZONE_X_RIGHTEDGE - FRAME_W(25) - FRAME_W(4.3));
+ y = QUOTE(SAFEZONE_Y_LOWEDGE - FRAME_H(10.1));
+ w = QUOTE(FRAME_W(4));
+ h = QUOTE(FRAME_H(1.5));
+ colorBackground[] = {0,0,0,0};
+ colorText[] = {0.8,0.8,0.8,0.9};
+ sizeEx = QUOTE(FRAME_H(1.4));
+ };
+ class RangerO2: RscText
+ {
+ idc = 22810;
+ style = ST_CENTER;
+ valign = "middle";
+ shadow = 0;
+ font = "EtelkaMonospacePro";
+ text = "97";
+ x = QUOTE(SAFEZONE_X_RIGHTEDGE - FRAME_W(25) - FRAME_W(1.2));
+ y = QUOTE(SAFEZONE_Y_LOWEDGE - FRAME_H(10.1));
+ w = QUOTE(FRAME_W(3));
+ h = QUOTE(FRAME_H(1.5));
+ colorBackground[] = {0,0,0,0};
+ colorText[] = {0.8,0.8,0.8,0.9};
+ sizeEx = QUOTE(FRAME_H(1.4));
+ };
+ class RangerWatchMinute: RscPicture
+ {
+ idc = 22802;
+ text = "\x\kat\addons\watch\UI\RangerWatchMinute.paa";
+ x = QUOTE(SAFEZONE_X_RIGHTEDGE - FRAME_W(25) - FRAME_W(15));
+ y = QUOTE(SAFEZONE_Y_LOWEDGE - FRAME_H(20));
+ w = QUOTE(FRAME_W(28));
+ h = QUOTE(FRAME_H(28));
+ };
+ class RangerWatchHour: RangerWatchMinute
+ {
+ idc = 22803;
+ text = "\x\kat\addons\watch\UI\RangerWatchHour.paa";
+ x = QUOTE(SAFEZONE_X_RIGHTEDGE - FRAME_W(25) - FRAME_W(15));
+ y = QUOTE(SAFEZONE_Y_LOWEDGE - FRAME_H(20));
+ w = QUOTE(FRAME_W(28));
+ h = QUOTE(FRAME_H(28));
+ };
+ class RangerWatchSecond: RangerWatchMinute
+ {
+ idc = 22804;
+ text = "\x\kat\addons\watch\UI\RangerWatchSecond.paa";
+ x = QUOTE(SAFEZONE_X_RIGHTEDGE - FRAME_W(25) - FRAME_W(15));
+ y = QUOTE(SAFEZONE_Y_LOWEDGE - FRAME_H(20));
+ w = QUOTE(FRAME_W(28));
+ h = QUOTE(FRAME_H(28));
+ };
+ class RangerWatchCaps: RangerImage
+ {
+ idc = 22805;
+ text = "\x\kat\addons\watch\UI\RangerWatchCaps.paa";
+ x = QUOTE(SAFEZONE_X_RIGHTEDGE - FRAME_W(25) - FRAME_W(15.07));
+ y = QUOTE(SAFEZONE_Y_LOWEDGE - FRAME_H(20));
+ w = QUOTE(FRAME_W(28));
+ h = QUOTE(FRAME_H(28));
+ };
+ };
+ };
};
\ No newline at end of file
diff --git a/addons/watch/UI/RangerWatchCaps.paa b/addons/watch/UI/RangerWatchCaps.paa
new file mode 100644
index 000000000..d196807f4
Binary files /dev/null and b/addons/watch/UI/RangerWatchCaps.paa differ
diff --git a/addons/watch/UI/RangerWatchCompass.paa b/addons/watch/UI/RangerWatchCompass.paa
new file mode 100644
index 000000000..a5a1e1107
Binary files /dev/null and b/addons/watch/UI/RangerWatchCompass.paa differ
diff --git a/addons/watch/UI/RangerWatchDarkSheet.paa b/addons/watch/UI/RangerWatchDarkSheet.paa
new file mode 100644
index 000000000..19cfa283a
Binary files /dev/null and b/addons/watch/UI/RangerWatchDarkSheet.paa differ
diff --git a/addons/watch/UI/RangerWatchFace.paa b/addons/watch/UI/RangerWatchFace.paa
new file mode 100644
index 000000000..312964228
Binary files /dev/null and b/addons/watch/UI/RangerWatchFace.paa differ
diff --git a/addons/watch/UI/RangerWatchHour.paa b/addons/watch/UI/RangerWatchHour.paa
new file mode 100644
index 000000000..6450892e6
Binary files /dev/null and b/addons/watch/UI/RangerWatchHour.paa differ
diff --git a/addons/watch/UI/RangerWatchMinute.paa b/addons/watch/UI/RangerWatchMinute.paa
new file mode 100644
index 000000000..32f46f970
Binary files /dev/null and b/addons/watch/UI/RangerWatchMinute.paa differ
diff --git a/addons/watch/UI/RangerWatchNVGSheet.paa b/addons/watch/UI/RangerWatchNVGSheet.paa
new file mode 100644
index 000000000..e6950afd8
Binary files /dev/null and b/addons/watch/UI/RangerWatchNVGSheet.paa differ
diff --git a/addons/watch/UI/RangerWatchSecond.paa b/addons/watch/UI/RangerWatchSecond.paa
new file mode 100644
index 000000000..de9b08c63
Binary files /dev/null and b/addons/watch/UI/RangerWatchSecond.paa differ
diff --git a/addons/watch/XEH_PREP.hpp b/addons/watch/XEH_PREP.hpp
index 7335c72c5..d97090421 100644
--- a/addons/watch/XEH_PREP.hpp
+++ b/addons/watch/XEH_PREP.hpp
@@ -1,6 +1,11 @@
+PREP(closeWatchTimer);
+PREP(handleRespawn);
PREP(hideKWatch);
PREP(hideCWatch);
PREP(hideSWatch);
+PREP(hideRWatch);
+PREP(init);
PREP(showKWatch);
PREP(showCWatch);
-PREP(showSWatch);
\ No newline at end of file
+PREP(showSWatch);
+PREP(showRWatch);
\ No newline at end of file
diff --git a/addons/watch/XEH_postInit.sqf b/addons/watch/XEH_postInit.sqf
index e065b019c..fc4683fb8 100644
--- a/addons/watch/XEH_postInit.sqf
+++ b/addons/watch/XEH_postInit.sqf
@@ -2,41 +2,107 @@
if (!hasInterface) exitWith {};
-["KAT Watch", QGVAR(showKatmin), "Show Katmin", {
+[QGVAR(closeWatchTimer), LINKFUNC(closeWatchTimer)] call CBA_fnc_addEventHandler;
+[QEGVAR(misc,handleRespawn), LINKFUNC(handleRespawn)] call CBA_fnc_addEventHandler;
+
+[QGVAR(playWatchTone), {
+ params ["_unit", "_tone"];
+ _unit say3D [_tone, 5];
+}] call CBA_fnc_addEventHandler;
+
+["KAT Watch", QGVAR(showKatmin), CSTRING(ShowKATWatch_Setting), {
// Conditions: canInteract
- if (!([ACE_player, objNull, ["isNotEscorting", "isNotInside"]] call ACEFUNC(common,canInteractWith)) || {!('KAT_Katmin' in assignedItems ACE_player)}) exitWith { false };
+ if (!([ACE_player, objNull, ["isNotEscorting", "isNotInside"]] call ACEFUNC(common,canInteractWith))) exitWith { false };
+
+ private _return = false;
+
+ switch true do{
+ case (('KAT_Katmin' in assignedItems ACE_player)): {
+ _return = true;
+
+ if !(GETMVAR(GVAR(KatminActive),false)) then {
+ [ACE_player] call FUNC(showKWatch);
+ } else {
+ call FUNC(hideKWatch);
+ };
+ };
+ case (('KAT_Cavmin' in assignedItems ACE_player)): {
+ _return = true;
+
+ if !(GETMVAR(GVAR(CavminActive),false)) then {
+ [ACE_player] call FUNC(showCWatch);
+ } else {
+ call FUNC(hideCWatch);
+ };
+ };
+ case (('KAT_STS' in assignedItems ACE_player)): {
+ _return = true;
- if !(GETMVAR(GVAR(KatminActive),false)) then {
- [ACE_player] call FUNC(showKWatch);
- } else {
- call FUNC(hideKWatch);
+ if !(GETMVAR(GVAR(STSActive),false)) then {
+ [ACE_player] call FUNC(showSWatch);
+ } else {
+ call FUNC(hideSWatch);
+ };
+ };
+ case (('KAT_Ranger' in assignedItems ACE_player)): {
+ _return = true;
+
+ if !(GETMVAR(GVAR(RangerActive),false)) then {
+ [ACE_player] call FUNC(showRWatch);
+ } else {
+ call FUNC(hideRWatch);
+ };
+ };
};
- true
+ _return
}, { false }, [24, [false, false, false]], false] call CBA_fnc_addKeybind;
-["KAT Cav Watch", QGVAR(showCavmin), "Show Cavmin", {
- // Conditions: canInteract
- if (!([ACE_player, objNull, ["isNotEscorting", "isNotInside"]] call ACEFUNC(common,canInteractWith)) || {!('KAT_Cavmin' in assignedItems ACE_player)}) exitWith { false };
+["KAT Watch", 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(CavminActive),false)) then {
- [ACE_player] call FUNC(showCWatch);
- } else {
- call FUNC(hideCWatch);
+ if !(GETMVAR(GVAR(RangerActive),false)) exitWith { false };
+
+ private _timerLength = ACE_player getVariable [QGVAR(rangerTimer), 0];
+
+ if (_timerLength < 999) then {
+ ACE_player setVariable [QGVAR(rangerTimer), ((_timerLength + 15) min 999), false];
};
true
-}, { false }, [24, [false, false, false]], false] call CBA_fnc_addKeybind;
+}, { false }, [38, [false, false, true]], false] call CBA_fnc_addKeybind;
-["KAT STS Watch", QGVAR(showSTS), "Show STS", {
- // Conditions: canInteract
- if (!([ACE_player, objNull, ["isNotEscorting", "isNotInside"]] call ACEFUNC(common,canInteractWith)) || {!('KAT_STS' in assignedItems ACE_player)}) exitWith { false };
+["KAT Watch", 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 };
+
+ private _timerLength = ACE_player getVariable [QGVAR(rangerTimer), 0];
- if !(GETMVAR(GVAR(STSActive),false)) then {
- [ACE_player] call FUNC(showSWatch);
- } else {
- call FUNC(hideSWatch);
+ if (_timerLength > 0) then {
+ ACE_player setVariable [QGVAR(rangerTimer), ((_timerLength - 15) max 0), false];
};
true
-}, { false }, [24, [false, false, false]], false] call CBA_fnc_addKeybind;
+}, { false }, [36, [false, false, true]], false] call CBA_fnc_addKeybind;
+
+["KAT Watch", 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];
+ private _timerActive = ACE_player getVariable [QGVAR(rangerStart), false];
+
+ if (_timerLength > 0) then {
+ if (_timerActive) then {
+ ACE_player setVariable [QGVAR(rangerStart), false, false];
+ } else {
+ if !(GETMVAR(GVAR(RangerActive),false)) then {
+ [QGVAR(closeWatchTimer), [ACE_player], ACE_player] call CBA_fnc_targetEvent;
+ };
+
+ ACE_player setVariable [QGVAR(rangerStart), true, false];
+ };
+ };
+
+ true
+}, { false }, [37, [false, false, true]], false] call CBA_fnc_addKeybind;
\ No newline at end of file
diff --git a/addons/watch/audio/watchAlarm.ogg b/addons/watch/audio/watchAlarm.ogg
new file mode 100644
index 000000000..84ce0fc1d
Binary files /dev/null and b/addons/watch/audio/watchAlarm.ogg differ
diff --git a/addons/watch/audio/watchAlarm.xmp b/addons/watch/audio/watchAlarm.xmp
new file mode 100644
index 000000000..f63c73244
--- /dev/null
+++ b/addons/watch/audio/watchAlarm.xmp
@@ -0,0 +1,83 @@
+
+
+
+
+
+
+
+ CuePoint Markers
+ Cue
+ f44100
+
+
+ CD Track Markers
+ Track
+ f44100
+
+
+ Subclip Markers
+ InOut
+ f44100
+
+
+
+ 2024-12-15T22:21:16-08:00
+ 2024-12-15T22:21:16-08:00
+ xmp.iid:30e9deb5-bfc0-2b4d-abc4-d09b0f084d7f
+ xmp.did:30e9deb5-bfc0-2b4d-abc4-d09b0f084d7f
+ xmp.did:2c460e27-80bc-444a-9ec5-e861f49bb36a
+
+
+
+ saved
+ xmp.iid:2c460e27-80bc-444a-9ec5-e861f49bb36a
+ 2024-12-15T22:21:16-08:00
+ Adobe Audition 25.0 (Windows)
+ /metadata
+
+
+ saved
+ xmp.iid:30e9deb5-bfc0-2b4d-abc4-d09b0f084d7f
+ 2024-12-15T22:21:16-08:00
+ Adobe Audition 25.0 (Windows)
+ /
+
+
+
+
+ xmp.iid:2c460e27-80bc-444a-9ec5-e861f49bb36a
+ xmp.did:2c460e27-80bc-444a-9ec5-e861f49bb36a
+ xmp.did:2c460e27-80bc-444a-9ec5-e861f49bb36a
+
+ audio/ogg; codec="vorbis"
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/addons/watch/audio/watchVibrate.ogg b/addons/watch/audio/watchVibrate.ogg
new file mode 100644
index 000000000..c85f5d063
Binary files /dev/null and b/addons/watch/audio/watchVibrate.ogg differ
diff --git a/addons/watch/audio/watchVibrate.xmp b/addons/watch/audio/watchVibrate.xmp
new file mode 100644
index 000000000..4d1d46b92
--- /dev/null
+++ b/addons/watch/audio/watchVibrate.xmp
@@ -0,0 +1,83 @@
+
+
+
+
+
+
+
+ CuePoint Markers
+ Cue
+ f44100
+
+
+ CD Track Markers
+ Track
+ f44100
+
+
+ Subclip Markers
+ InOut
+ f44100
+
+
+
+ 2024-12-15T22:22:22-08:00
+ 2024-12-15T22:22:22-08:00
+ xmp.iid:80a61fff-aa5c-fe4d-bbdc-0664eb47dd8c
+ xmp.did:80a61fff-aa5c-fe4d-bbdc-0664eb47dd8c
+ xmp.did:c29c979e-f990-0849-a1e0-1012ebd43b5d
+
+
+
+ saved
+ xmp.iid:c29c979e-f990-0849-a1e0-1012ebd43b5d
+ 2024-12-15T22:22:22-08:00
+ Adobe Audition 25.0 (Windows)
+ /metadata
+
+
+ saved
+ xmp.iid:80a61fff-aa5c-fe4d-bbdc-0664eb47dd8c
+ 2024-12-15T22:22:22-08:00
+ Adobe Audition 25.0 (Windows)
+ /
+
+
+
+
+ xmp.iid:c29c979e-f990-0849-a1e0-1012ebd43b5d
+ xmp.did:c29c979e-f990-0849-a1e0-1012ebd43b5d
+ xmp.did:c29c979e-f990-0849-a1e0-1012ebd43b5d
+
+ audio/ogg; codec="vorbis"
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/addons/watch/config.cpp b/addons/watch/config.cpp
index 8d171b1e6..b8cdf2b4e 100644
--- a/addons/watch/config.cpp
+++ b/addons/watch/config.cpp
@@ -8,7 +8,8 @@ class CfgPatches {
weapons[] = {
"KAT_Katmin",
"KAT_Cavmin",
- "KAT_STS"
+ "KAT_STS",
+ "KAT_Ranger"
};
magazines[] = { };
requiredAddons[] = {
@@ -36,4 +37,5 @@ class CfgPatches {
#include "CfgEventHandlers.hpp"
#include "CfgWeapons.hpp"
+#include "CfgSounds.hpp"
#include "RscTitles.hpp"
\ No newline at end of file
diff --git a/addons/watch/functions/fnc_closeWatchTimer.sqf b/addons/watch/functions/fnc_closeWatchTimer.sqf
new file mode 100644
index 000000000..657ec0cbb
--- /dev/null
+++ b/addons/watch/functions/fnc_closeWatchTimer.sqf
@@ -0,0 +1,51 @@
+#include "..\script_component.hpp"
+/*
+ * Author: Katalam
+ * Initializes unit variables.
+ *
+ * Arguments:
+ * 0: Unit