From 0cef0ba6e924fbfb922a50c48c5bc04a9da0113c Mon Sep 17 00:00:00 2001 From: jonpas Date: Wed, 16 Aug 2023 14:16:44 +0200 Subject: [PATCH] Fastroping - Add Auto add FRIES setting (#9319) Co-authored-by: PabstMirror Co-authored-by: Filip Maciejewski --- addons/fastroping/XEH_postInit.sqf | 11 +++++++++++ addons/fastroping/config.cpp | 2 +- addons/fastroping/initSettings.sqf | 8 ++++++++ addons/fastroping/stringtable.xml | 8 ++++++++ docs/wiki/feature/fastroping.md | 8 ++++---- docs/wiki/framework/fastroping-framework.md | 12 ++++++------ 6 files changed, 38 insertions(+), 11 deletions(-) diff --git a/addons/fastroping/XEH_postInit.sqf b/addons/fastroping/XEH_postInit.sqf index 43e5de24f9..27d3ca4008 100644 --- a/addons/fastroping/XEH_postInit.sqf +++ b/addons/fastroping/XEH_postInit.sqf @@ -32,6 +32,17 @@ }, {false}] call CBA_fnc_addKeybind; +if (isServer) then { + ["Helicopter", "init", { + if (!GVAR(autoAddFRIES)) exitWith {}; + params ["_vehicle"]; + if (isNumber (configOf _vehicle >> QGVAR(enabled)) && {isNil {_vehicle getVariable [QGVAR(FRIES), nil]}}) then { + [_vehicle] call FUNC(equipFRIES); + }; + }, true, ["ACE_friesBase"], true] call CBA_fnc_addClassEventHandler; +}; + + #ifdef DRAW_FASTROPE_INFO addMissionEventHandler ["Draw3D", { if (!(cursorObject isKindOf "Helicopter")) exitWith {}; diff --git a/addons/fastroping/config.cpp b/addons/fastroping/config.cpp index be8f70a482..dbf1f35e6a 100644 --- a/addons/fastroping/config.cpp +++ b/addons/fastroping/config.cpp @@ -8,7 +8,7 @@ class CfgPatches { requiredVersion = REQUIRED_VERSION; requiredAddons[] = {"ace_interaction","ace_logistics_rope"}; author = ECSTRING(common,ACETeam); - authors[] = {"KoffeinFlummi", "BaerMitUmlaut", "Pokertour"}; + authors[] = {"KoffeinFlummi", "BaerMitUmlaut", "Pokertour", "veteran29"}; url = ECSTRING(main,URL); VERSION_CONFIG; }; diff --git a/addons/fastroping/initSettings.sqf b/addons/fastroping/initSettings.sqf index 0334d90c76..844de927a2 100644 --- a/addons/fastroping/initSettings.sqf +++ b/addons/fastroping/initSettings.sqf @@ -9,3 +9,11 @@ private _category = [LELSTRING(common,categoryUncategorized), LLSTRING(setting_c {[QGVAR(requireRopeItems), _this] call EFUNC(common,cbaSettings_settingChanged)}, false // needRestart ] call CBA_fnc_addSetting; + +[ + QGVAR(autoAddFRIES), "CHECKBOX", + [LSTRING(setting_autoAddFRIES_displayName), LSTRING(setting_autoAddFRIES_description)], + _category, + false, // default value + true // isGlobal +] call CBA_fnc_addSetting; diff --git a/addons/fastroping/stringtable.xml b/addons/fastroping/stringtable.xml index acee249496..92cf725d8b 100644 --- a/addons/fastroping/stringtable.xml +++ b/addons/fastroping/stringtable.xml @@ -314,5 +314,13 @@ Halatla kaymak için halat gerekli 줄이 필요합니다 + + Auto-Equip FRIES + Automatycznie Zamontuj FRIES + + + Automatically add FRIES to helicopters that support them. + Automatycznie dodawaj FRIES do śmigłowców które je wspierają. + diff --git a/docs/wiki/feature/fastroping.md b/docs/wiki/feature/fastroping.md index 7178bca3fa..78eff817b4 100644 --- a/docs/wiki/feature/fastroping.md +++ b/docs/wiki/feature/fastroping.md @@ -1,8 +1,8 @@ --- layout: wiki -title: Fast-Roping +title: Fastroping component: fastroping -description: System for adding fast roping capabilities to helicopters. +description: System for adding fastroping capabilities to helicopters. group: feature category: realism parent: wiki @@ -14,10 +14,10 @@ version: --- ## 1. Overview -The fast roping module adds the possibility to do fast roping insertions from helicopters. +The fast roping module adds the possibility to do fastroping insertions from helicopters. ## 2. Usage -If you are sitting in the back of a helicopter that has fast roping capabilities, open your interaction menu to deploy the ropes. Depending on the helicopter and its FRIES (abbr. for Fast Rope Insertion Extraction System) the deployment of the ropes is a two step process: +If you are sitting in the back of a helicopter that has fastroping capabilities, open your interaction menu to deploy the ropes. Depending on the helicopter and its FRIES (abbr. for FastRope Insertion Extraction System) the deployment of the ropes is a two step process: 1. FRIES preparation, usually consisting of opening the helicopters doors and the extension of the hooks (not necessary for some helicopters) 2. Rope deployment diff --git a/docs/wiki/framework/fastroping-framework.md b/docs/wiki/framework/fastroping-framework.md index 3979243d7c..fad016a8bf 100644 --- a/docs/wiki/framework/fastroping-framework.md +++ b/docs/wiki/framework/fastroping-framework.md @@ -1,7 +1,7 @@ --- layout: wiki -title: Fast Roping Framework -description: Explains the config values and functions used for making a helicopter fast roping capable. +title: Fastroping Framework +description: Explains the config values and functions used for making a helicopter fastroping capable. group: framework order: 5 parent: wiki @@ -12,7 +12,7 @@ version: patch: 0 --- -If you want to prepare a helicopter from your addon for fast roping, there's a few ways to do that. +If you want to prepare a helicopter from your addon for fastroping, there's a few ways to do that. ## 1. Using simple rope origin points @@ -37,7 +37,7 @@ You can also use more or less than two rope origins. You can additionally execut ## 2. Using a FRIES -If your helicopter is not fast roping capable by default, you can make it take a FRIES. A FRIES is just a simple model that gets attached to the helicopter with its own rope origin points. ACE3 already includes two FRIES that are used in real life and can be attached to most helicopters. +If your helicopter is not fastroping capable by default, you can make it take a FRIES. A FRIES is just a simple model that gets attached to the helicopter with its own rope origin points. ACE3 already includes two FRIES that are used in real life and can be attached to most helicopters. To make your helicopter FRIES capable, you need to add the following config entries: @@ -52,10 +52,10 @@ ace_fastroping_ropeOrigins[] = {"ropeOriginLeft", "ropeOriginRight"}; Let us go through each of them: -- `ace_fastroping_enabled = 2` tells ACE that your helicopter is fast roping capabale but needs a FRIES for that. +- `ace_fastroping_enabled = 2` tells ACE that your helicopter is fastroping capabale but needs a FRIES for that. - `ace_fastroping_friesType` defines the object that will be used as a FRIES on your helicopter - `ace_fastroping_friesAttachmentPoint` defines the coordinates at which the FRIES will be attached to. -- See 3.3 for more information about `ace_fastroping_onCut` and `ace_fastroping_onPrepare`. Note: These two entries are necessary for fast roping with a FRIES. +- See 3.3 for more information about `ace_fastroping_onCut` and `ace_fastroping_onPrepare`. Note: These two entries are necessary for fastroping with a FRIES. - `ace_fastroping_ropeOrigins` defines the memory points or coordinates from the FRIES where the ropes will be attached to. ## 2.1 Using one of the given FRIES