Fastroping - Add Auto add FRIES setting (#9319)

Co-authored-by: PabstMirror <pabstmirror@gmail.com>
Co-authored-by: Filip Maciejewski <veteran29@users.noreply.github.com>
This commit is contained in:
jonpas
2023-08-16 14:16:44 +02:00
committed by GitHub
parent 9abb43ad3a
commit 0cef0ba6e9
6 changed files with 38 additions and 11 deletions

View File

@ -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 {};

View File

@ -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;
};

View File

@ -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;

View File

@ -314,5 +314,13 @@
<Turkish>Halatla kaymak için halat gerekli</Turkish>
<Korean>줄이 필요합니다</Korean>
</Key>
<Key ID="STR_ACE_Fastroping_setting_autoAddFRIES_displayName">
<English>Auto-Equip FRIES</English>
<Polish>Automatycznie Zamontuj FRIES</Polish>
</Key>
<Key ID="STR_ACE_Fastroping_setting_autoAddFRIES_description">
<English>Automatically add FRIES to helicopters that support them.</English>
<Polish>Automatycznie dodawaj FRIES do śmigłowców które je wspierają.</Polish>
</Key>
</Package>
</Project>

View File

@ -1,6 +1,6 @@
---
layout: wiki
title: Fast-Roping
title: Fastroping
component: fastroping
description: System for adding fastroping capabilities to helicopters.
group: feature

View File

@ -1,6 +1,6 @@
---
layout: wiki
title: Fast Roping Framework
title: Fastroping Framework
description: Explains the config values and functions used for making a helicopter fastroping capable.
group: framework
order: 5