From c101b2fffced811fdbf2bff88f166fd695ee5be9 Mon Sep 17 00:00:00 2001 From: McDiod Date: Fri, 21 Dec 2018 19:43:01 +0100 Subject: [PATCH 1/9] add grad help to diary --- addons/ui/XEH_postClientInit.sqf | 19 +++++++++++++++++++ addons/ui/cfgEventhandlers.hpp | 5 +++++ addons/ui/cfgFunctions.hpp | 4 ++++ addons/ui/config.cpp | 1 + addons/ui/functions/help/fn_addHelpRecord.sqf | 9 +++++++++ addons/ui/functions/help/script_component.hpp | 1 + 6 files changed, 39 insertions(+) create mode 100644 addons/ui/XEH_postClientInit.sqf create mode 100644 addons/ui/cfgEventhandlers.hpp create mode 100644 addons/ui/functions/help/fn_addHelpRecord.sqf create mode 100644 addons/ui/functions/help/script_component.hpp diff --git a/addons/ui/XEH_postClientInit.sqf b/addons/ui/XEH_postClientInit.sqf new file mode 100644 index 00000000..78c5b5ad --- /dev/null +++ b/addons/ui/XEH_postClientInit.sqf @@ -0,0 +1,19 @@ +#include "script_component.hpp" + +if (!hasInterface) exitWith {}; + +player createDiarySubject [QGVAR(helpSubject),"Gruppe Adler"]; + +private _helpRecords = missionNamespace getVariable [QGVAR(helpRecords),[]]; +{ + _x params ["_title","_text"]; + + player createDiaryRecord [QGVAR(helpSubject),[ + _title, + format [" %1

%2",_title,_text] + ]]; + +} forEach _helpRecords; + +_helpRecords resize 0; +GVAR(helpRecords) = nil; diff --git a/addons/ui/cfgEventhandlers.hpp b/addons/ui/cfgEventhandlers.hpp new file mode 100644 index 00000000..f6defae7 --- /dev/null +++ b/addons/ui/cfgEventhandlers.hpp @@ -0,0 +1,5 @@ +class Extended_PostInit_EventHandlers { + class ADDON { + clientInit = QUOTE(call COMPILE_FILE(XEH_postClientInit)); + }; +}; diff --git a/addons/ui/cfgFunctions.hpp b/addons/ui/cfgFunctions.hpp index 640aa588..92a19f86 100644 --- a/addons/ui/cfgFunctions.hpp +++ b/addons/ui/cfgFunctions.hpp @@ -8,5 +8,9 @@ class CfgFunctions { class onButtonPortOK {}; class onLoadButtonConnect {}; }; + class help { + file = QPATHTOF(functions\help); + class addHelpRecord {}; + }; }; }; diff --git a/addons/ui/config.cpp b/addons/ui/config.cpp index db14431c..84671c73 100644 --- a/addons/ui/config.cpp +++ b/addons/ui/config.cpp @@ -18,4 +18,5 @@ class CfgPatches { }; #include "cfgFunctions.hpp" +#include "cfgEventhandlers.hpp" #include "dialog\directConnect.hpp" diff --git a/addons/ui/functions/help/fn_addHelpRecord.sqf b/addons/ui/functions/help/fn_addHelpRecord.sqf new file mode 100644 index 00000000..6848db19 --- /dev/null +++ b/addons/ui/functions/help/fn_addHelpRecord.sqf @@ -0,0 +1,9 @@ +#include "script_component.hpp" + +params [["_title","ERROR: NO TITLE"],["_text","ERROR: NO TEXT"]]; + +if (isNil QGVAR(helpRecords)) then { + GVAR(helpRecords) = []; +}; + +GVAR(helpRecords) pushBack [_title,_text]; diff --git a/addons/ui/functions/help/script_component.hpp b/addons/ui/functions/help/script_component.hpp new file mode 100644 index 00000000..fcf9da98 --- /dev/null +++ b/addons/ui/functions/help/script_component.hpp @@ -0,0 +1 @@ +#include "..\script_component.hpp" From 5ac614bfb8b134ebbcc198232e2e4dae286c8578 Mon Sep 17 00:00:00 2001 From: McDiod Date: Fri, 21 Dec 2018 19:43:12 +0100 Subject: [PATCH 2/9] add screenshotMode to help --- addons/screenshotMode/XEH_preClientInit.sqf | 6 ++++++ addons/screenshotMode/cfgEventHandlers.hpp | 6 ++++++ 2 files changed, 12 insertions(+) create mode 100644 addons/screenshotMode/XEH_preClientInit.sqf diff --git a/addons/screenshotMode/XEH_preClientInit.sqf b/addons/screenshotMode/XEH_preClientInit.sqf new file mode 100644 index 00000000..86b5fb8f --- /dev/null +++ b/addons/screenshotMode/XEH_preClientInit.sqf @@ -0,0 +1,6 @@ +#include "script_component.hpp" + +private _title = "Screenshot Mode"; +private _helpText = "Adds a keybind to hide all UI elements for prettier screenshots. Has no default keybind. Check Controls >> Configure Addons >> Gruppe Adler."; + +[_title,_helpText] call EFUNC(ui,addHelpRecord); diff --git a/addons/screenshotMode/cfgEventHandlers.hpp b/addons/screenshotMode/cfgEventHandlers.hpp index b0cfab83..7ac76ba0 100644 --- a/addons/screenshotMode/cfgEventHandlers.hpp +++ b/addons/screenshotMode/cfgEventHandlers.hpp @@ -1,3 +1,9 @@ class Extended_PostInit_EventHandlers { GRAD_screenshotMode="[] call GRAD_screenshotMode_fnc_postInit;"; }; + +class Extended_PreInit_EventHandlers { + class ADDON { + clientInit = QUOTE(call COMPILE_FILE(XEH_preClientInit)); + }; +}; From 62a982237a1c008ce690b3a2b7c69aba2463d955 Mon Sep 17 00:00:00 2001 From: McDiod Date: Fri, 21 Dec 2018 21:05:42 +0100 Subject: [PATCH 3/9] change screenshotMode description --- addons/screenshotMode/README.md | 2 +- addons/screenshotMode/XEH_preClientInit.sqf | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/addons/screenshotMode/README.md b/addons/screenshotMode/README.md index 2e7ee7c0..1a958d83 100644 --- a/addons/screenshotMode/README.md +++ b/addons/screenshotMode/README.md @@ -1,5 +1,5 @@ ### screenshotMode -Adds a keybind to hide all UI elements for prettier screenshots. Has no default binding. Check *Controls* >> *Configure Addons* >> *Gruppe Adler*. +Adds a keybind to hide all UI elements for prettier screenshots. This does not have a default keybind, so if you want to use it, check *Controls* >> *Configure Addons* >> *Gruppe Adler*. diff --git a/addons/screenshotMode/XEH_preClientInit.sqf b/addons/screenshotMode/XEH_preClientInit.sqf index 86b5fb8f..65fec5a3 100644 --- a/addons/screenshotMode/XEH_preClientInit.sqf +++ b/addons/screenshotMode/XEH_preClientInit.sqf @@ -1,6 +1,6 @@ #include "script_component.hpp" private _title = "Screenshot Mode"; -private _helpText = "Adds a keybind to hide all UI elements for prettier screenshots. Has no default keybind. Check Controls >> Configure Addons >> Gruppe Adler."; +private _helpText = "Adds a keybind to hide all UI elements for prettier screenshots. This does not have a default keybind, so if you want to use it, check Controls >> Configure Addons >> Gruppe Adler."; [_title,_helpText] call EFUNC(ui,addHelpRecord); From 14b7c295938ff865741c9271fc0c45d16561710c Mon Sep 17 00:00:00 2001 From: McDiod Date: Fri, 21 Dec 2018 21:05:48 +0100 Subject: [PATCH 4/9] add adminMessages to help --- addons/adminMessages/README.md | 2 +- addons/adminMessages/XEH_preClientInit.sqf | 6 ++++++ addons/adminMessages/cfgEventHandlers.hpp | 6 ++++++ 3 files changed, 13 insertions(+), 1 deletion(-) create mode 100644 addons/adminMessages/XEH_preClientInit.sqf diff --git a/addons/adminMessages/README.md b/addons/adminMessages/README.md index 8bfdef5d..545069de 100644 --- a/addons/adminMessages/README.md +++ b/addons/adminMessages/README.md @@ -1,5 +1,5 @@ ### adminMessages -Adds message box to escape menu. Allows players to send message to all admins and curators. Can be used to ask for tech support without ruining immersion by using global chat. +This adds a message box to the escape menu. Allows players to send message to all admins and curators. You can use this to ask for tech support without ruining immersion by using global chat. #### Maintainer(s) * McDiod diff --git a/addons/adminMessages/XEH_preClientInit.sqf b/addons/adminMessages/XEH_preClientInit.sqf new file mode 100644 index 00000000..4443f8a3 --- /dev/null +++ b/addons/adminMessages/XEH_preClientInit.sqf @@ -0,0 +1,6 @@ +#include "script_component.hpp" + +private _title = "Admin Messages"; +private _helpText = "This adds a message box to the escape menu. Allows players to send message to all admins and curators. You can use this to ask for tech support without ruining immersion by using global chat."; + +[_title,_helpText] call EFUNC(ui,addHelpRecord); diff --git a/addons/adminMessages/cfgEventHandlers.hpp b/addons/adminMessages/cfgEventHandlers.hpp index 0ca5fb5c..4b1157c5 100644 --- a/addons/adminMessages/cfgEventHandlers.hpp +++ b/addons/adminMessages/cfgEventHandlers.hpp @@ -3,3 +3,9 @@ class Extended_PostInit_EventHandlers { serverInit = QUOTE(call COMPILE_FILE(XEH_postInit)); }; }; + +class Extended_PreInit_EventHandlers { + class ADDON { + clientInit = QUOTE(call COMPILE_FILE(XEH_preClientInit)); + }; +}; From 58529aa1539564b3c1df5914e06f199620b1a989 Mon Sep 17 00:00:00 2001 From: McDiod Date: Fri, 21 Dec 2018 21:07:50 +0100 Subject: [PATCH 5/9] add ALK to help --- addons/alk/XEH_preClientInit.sqf | 6 ++++++ addons/alk/cfgEventHandlers.hpp | 5 +++++ addons/alk/config.cpp | 1 + 3 files changed, 12 insertions(+) create mode 100644 addons/alk/XEH_preClientInit.sqf create mode 100644 addons/alk/cfgEventHandlers.hpp diff --git a/addons/alk/XEH_preClientInit.sqf b/addons/alk/XEH_preClientInit.sqf new file mode 100644 index 00000000..a29a0def --- /dev/null +++ b/addons/alk/XEH_preClientInit.sqf @@ -0,0 +1,6 @@ +#include "script_component.hpp" + +private _title = "Arm Leg Kit"; +private _helpText = "The Arm Leg Kit is an item which allows medic to fix broken limbs. If your aim is unsteady or you cannot run anymore, ask for an ALK."; + +[_title,_helpText] call EFUNC(ui,addHelpRecord); diff --git a/addons/alk/cfgEventHandlers.hpp b/addons/alk/cfgEventHandlers.hpp new file mode 100644 index 00000000..f6efba84 --- /dev/null +++ b/addons/alk/cfgEventHandlers.hpp @@ -0,0 +1,5 @@ +class Extended_PreInit_EventHandlers { + class ADDON { + clientInit = QUOTE(call COMPILE_FILE(XEH_preClientInit)); + }; +}; diff --git a/addons/alk/config.cpp b/addons/alk/config.cpp index 17f7a969..1543d991 100644 --- a/addons/alk/config.cpp +++ b/addons/alk/config.cpp @@ -15,6 +15,7 @@ class CfgPatches }; }; +#include "cfgEventHandlers.hpp" #include "ACE_Treatments.hpp" #include "CfgFunctions.hpp" #include "CfgVehicles.hpp" From 794d5a3feb01fdc6bf828ef1c4248863a6ac8c8d Mon Sep 17 00:00:00 2001 From: McDiod Date: Fri, 21 Dec 2018 21:11:49 +0100 Subject: [PATCH 6/9] add AMS to help --- addons/ams/XEH_preClientInit.sqf | 6 ++++++ addons/ams/cfgEventHandlers.hpp | 6 ++++++ 2 files changed, 12 insertions(+) create mode 100644 addons/ams/XEH_preClientInit.sqf diff --git a/addons/ams/XEH_preClientInit.sqf b/addons/ams/XEH_preClientInit.sqf new file mode 100644 index 00000000..9c63c58d --- /dev/null +++ b/addons/ams/XEH_preClientInit.sqf @@ -0,0 +1,6 @@ +#include "script_component.hpp" + +private _title = "Advanced Medical"; +private _helpText = "Gruppe Adler Mod brings some changes to ACE's advanced medical system. The most prominent are:
* increased IV transfusion rate
* chance for CPR to revive patient, even if in critical condition"; + +[_title,_helpText] call EFUNC(ui,addHelpRecord); diff --git a/addons/ams/cfgEventHandlers.hpp b/addons/ams/cfgEventHandlers.hpp index a8f11a6a..ff7618fc 100644 --- a/addons/ams/cfgEventHandlers.hpp +++ b/addons/ams/cfgEventHandlers.hpp @@ -3,3 +3,9 @@ class Extended_PostInit_EventHandlers { init = "['wil_ace_cpr_fnc_treatmentAdvanced_CPRLocal', wil_ace_cpr_fnc_treatmentAdvanced_CPRLocal] call CBA_fnc_addEventHandler;"; }; }; + +class Extended_PreInit_EventHandlers { + class ADDON { + clientInit = QUOTE(call COMPILE_FILE(XEH_preClientInit)); + }; +}; From b026e8e6156c4deae7b096e12cc74578d0357f6b Mon Sep 17 00:00:00 2001 From: McDiod Date: Fri, 21 Dec 2018 21:17:23 +0100 Subject: [PATCH 7/9] add cinematicSpec to help --- addons/cinematicSpec/XEH_preClientInit.sqf | 21 +++++++++++++++++++++ addons/cinematicSpec/XEH_preInit.sqf | 15 --------------- addons/cinematicSpec/cfgEventHandlers.hpp | 5 +++++ addons/cinematicSpec/config.cpp | 7 +------ 4 files changed, 27 insertions(+), 21 deletions(-) create mode 100644 addons/cinematicSpec/XEH_preClientInit.sqf delete mode 100644 addons/cinematicSpec/XEH_preInit.sqf create mode 100644 addons/cinematicSpec/cfgEventHandlers.hpp diff --git a/addons/cinematicSpec/XEH_preClientInit.sqf b/addons/cinematicSpec/XEH_preClientInit.sqf new file mode 100644 index 00000000..7ea1c72c --- /dev/null +++ b/addons/cinematicSpec/XEH_preClientInit.sqf @@ -0,0 +1,21 @@ +#include "\a3\editor_f\Data\Scripts\dikCodes.h" +#include "script_component.hpp" + +SCRIPT(XEH_preInit); + +[ + "Gruppe Adler", + QGVAR(toggle), + "Enter Cinematic Spectator", + "", + "" +] call CBA_fnc_addKeybind; + +GVAR(registered) = false; +GVAR(warned) = false; + + +private _title = "Cinematic Spec"; +private _helpText = "Cinematic Spectator mode brings the old school BI spectator cam with inertia enabled back to life. This does not have a default keybind, so if you want to use it, check Controls >> Configure Addons >> Gruppe Adler. Once you are in spectator, use your assigned key to switch between the default spectator mode and Cinematic Spec."; + +[_title,_helpText] call EFUNC(ui,addHelpRecord); diff --git a/addons/cinematicSpec/XEH_preInit.sqf b/addons/cinematicSpec/XEH_preInit.sqf deleted file mode 100644 index b5410154..00000000 --- a/addons/cinematicSpec/XEH_preInit.sqf +++ /dev/null @@ -1,15 +0,0 @@ -#include "\a3\editor_f\Data\Scripts\dikCodes.h" -#include "script_component.hpp" - -SCRIPT(XEH_preInit); - -[ - "Gruppe Adler", - QGVAR(toggle), - "Enter Cinematic Spectator", - "", - "" -] call CBA_fnc_addKeybind; - -GVAR(registered) = false; -GVAR(warned) = false; diff --git a/addons/cinematicSpec/cfgEventHandlers.hpp b/addons/cinematicSpec/cfgEventHandlers.hpp new file mode 100644 index 00000000..f6efba84 --- /dev/null +++ b/addons/cinematicSpec/cfgEventHandlers.hpp @@ -0,0 +1,5 @@ +class Extended_PreInit_EventHandlers { + class ADDON { + clientInit = QUOTE(call COMPILE_FILE(XEH_preClientInit)); + }; +}; diff --git a/addons/cinematicSpec/config.cpp b/addons/cinematicSpec/config.cpp index 0975652c..fc5df8a2 100644 --- a/addons/cinematicSpec/config.cpp +++ b/addons/cinematicSpec/config.cpp @@ -14,6 +14,7 @@ class CfgPatches { }; }; +#include "cfgEventHandlers.hpp" #include "cfgFunctions.hpp" class ACE_spectator_display { @@ -22,9 +23,3 @@ class ACE_spectator_display { class ACE_spectator_interface { onKeyDown = "_this call GRAD_cinematicSpec_fnc_chainHandlers"; }; - -class Extended_PreInit_EventHandlers { - class ADDON { - clientInit = QUOTE(call COMPILE_FILE(XEH_preInit)); - }; -}; From 632eb5d073b70920c5a10c3ad352be369a44896e Mon Sep 17 00:00:00 2001 From: McDiod Date: Fri, 21 Dec 2018 22:24:07 +0100 Subject: [PATCH 8/9] add zeus to help --- addons/zeus/CfgEventHandlers.hpp | 1 + addons/zeus/XEH_preClientInit.sqf | 31 +++++++++++++++++++++++++++++++ 2 files changed, 32 insertions(+) create mode 100644 addons/zeus/XEH_preClientInit.sqf diff --git a/addons/zeus/CfgEventHandlers.hpp b/addons/zeus/CfgEventHandlers.hpp index 0d3301d6..a95e641f 100644 --- a/addons/zeus/CfgEventHandlers.hpp +++ b/addons/zeus/CfgEventHandlers.hpp @@ -7,6 +7,7 @@ class Extended_PreStart_EventHandlers { class Extended_PreInit_EventHandlers { class ADDON { init = QUOTE(call COMPILE_FILE(XEH_preInit)); + clientInit = QUOTE(call COMPILE_FILE(XEH_preClientInit)); }; }; diff --git a/addons/zeus/XEH_preClientInit.sqf b/addons/zeus/XEH_preClientInit.sqf new file mode 100644 index 00000000..e59e3d93 --- /dev/null +++ b/addons/zeus/XEH_preClientInit.sqf @@ -0,0 +1,31 @@ +#include "script_component.hpp" + +private _title = "Zeus"; +private _helpText = " +Gruppe Adler Mod adds a collection of new Zeus modules:
+
+Add Players to Zeus
+Drop this anywhere to add all players to the Zeus interface.
+
+Blacklist Headless Transfer
+Drop this module on a unit. This will blacklist the unit's group from being automatically transferred to a headless client. In the dialog, you can optionally choose to transfer the ownership to either server or player.
+
+Monitoring
+Drop this module anywhere. A settings window will pop up allowing you to toggle monitoring of different parameters, including player FPS, medical status, AI status and some more.
+
+Move Respawn Position
+Drop this module anywhere, then select a side to move that side's respawn position to the module. Keep in mind that the respawn position is also where JIP players spawn.
+
+Reload Loadout
+Drop this on a unit. If the unit has a grad-loadout assigned, it will be reloaded.
+
+Set Faction Loadout
+Drop this anywhere or on a unit. Select a loadout for a faction. Units of the selected faction will now spawn with the selected loadout.
+
+Supply Drop
+Place a container (like an ammo box) somewhere on the map. Fill it to your liking. Drop this module on the container. Select an aircraft from the list that pops up. Select a target position for the drop to land. The selected aircraft will then proceed to paradrop your container at the position.
+
+Toggle BFT
+Drop this anywhere. Toggles Blue Force Tracking.
"; + +[_title,_helpText] call EFUNC(ui,addHelpRecord); From 7d93d6e7fe5177ebabd5e38fa7b9bd16cfeca725 Mon Sep 17 00:00:00 2001 From: McDiod Date: Fri, 21 Dec 2018 22:25:40 +0100 Subject: [PATCH 9/9] small AMS help formatting --- addons/ams/XEH_preClientInit.sqf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/ams/XEH_preClientInit.sqf b/addons/ams/XEH_preClientInit.sqf index 9c63c58d..075f34b1 100644 --- a/addons/ams/XEH_preClientInit.sqf +++ b/addons/ams/XEH_preClientInit.sqf @@ -1,6 +1,6 @@ #include "script_component.hpp" private _title = "Advanced Medical"; -private _helpText = "Gruppe Adler Mod brings some changes to ACE's advanced medical system. The most prominent are:
* increased IV transfusion rate
* chance for CPR to revive patient, even if in critical condition"; +private _helpText = "Gruppe Adler Mod brings some changes to ACE's advanced medical system. The most prominent are:

- increased IV transfusion rate
- chance for CPR to revive patient, even if in critical condition"; [_title,_helpText] call EFUNC(ui,addHelpRecord);