From 60143be55ff5e64c21835a2498a89ad29c9da5e1 Mon Sep 17 00:00:00 2001 From: PabstMirror Date: Mon, 9 Oct 2023 18:20:23 -0500 Subject: [PATCH] Arsenal - Add stats for buddy-loading launchers and belt linking (#9470) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * reload launchers - show if enable arsenal stat * Apply suggestions from code review Co-authored-by: Jouni Järvinen Co-authored-by: johnb432 <58661205+johnb432@users.noreply.github.com> * Add ACE_isBelt stat * buddy --------- Co-authored-by: Jouni Järvinen Co-authored-by: johnb432 <58661205+johnb432@users.noreply.github.com> --- addons/reload/ACE_Arsenal_Stats.hpp | 13 +++++++++++++ addons/reload/config.cpp | 1 + addons/reloadlaunchers/ACE_Arsenal_Stats.hpp | 13 +++++++++++++ addons/reloadlaunchers/config.cpp | 1 + addons/reloadlaunchers/stringtable.xml | 3 +++ 5 files changed, 31 insertions(+) create mode 100644 addons/reload/ACE_Arsenal_Stats.hpp create mode 100644 addons/reloadlaunchers/ACE_Arsenal_Stats.hpp diff --git a/addons/reload/ACE_Arsenal_Stats.hpp b/addons/reload/ACE_Arsenal_Stats.hpp new file mode 100644 index 0000000000..44de05e949 --- /dev/null +++ b/addons/reload/ACE_Arsenal_Stats.hpp @@ -0,0 +1,13 @@ +class EGVAR(arsenal,stats) { + class statBase; + class ACE_isBelt: statBase { + scope = 2; + priority = -1; + stats[] = {"ACE_isBelt"}; + displayName = CSTRING(LinkBelt); + showText = 1; + textStatement = QUOTE(localize QUOTE(ELSTRING(Common,Enabled))); + condition = QUOTE(params[ARR_2('_stat', '_config')]; (getNumber (_config >> _stat select 0)) == 1); + tabs[] = {{}, {4}}; + }; +}; diff --git a/addons/reload/config.cpp b/addons/reload/config.cpp index 21e28d35f5..1cd11c5b17 100644 --- a/addons/reload/config.cpp +++ b/addons/reload/config.cpp @@ -14,6 +14,7 @@ class CfgPatches { }; }; +#include "ACE_Arsenal_Stats.hpp" #include "CfgVehicles.hpp" #include "CfgMagazines.hpp" #include "CfgEventHandlers.hpp" diff --git a/addons/reloadlaunchers/ACE_Arsenal_Stats.hpp b/addons/reloadlaunchers/ACE_Arsenal_Stats.hpp new file mode 100644 index 0000000000..b894042d68 --- /dev/null +++ b/addons/reloadlaunchers/ACE_Arsenal_Stats.hpp @@ -0,0 +1,13 @@ +class EGVAR(arsenal,stats) { + class statBase; + class ADDON: statBase { + scope = 2; + priority = -1; + stats[] = {QGVAR(enabled)}; + displayName = CSTRING(featureDescription); + showText = 1; + textStatement = QUOTE(localize QUOTE(ELSTRING(Common,Enabled))); + condition = QUOTE(params[ARR_2('_stat', '_config')]; (getNumber (_config >> _stat select 0)) == 1); + tabs[] = {{2}, {}}; + }; +}; diff --git a/addons/reloadlaunchers/config.cpp b/addons/reloadlaunchers/config.cpp index bf9a5fa928..30407c4d7b 100644 --- a/addons/reloadlaunchers/config.cpp +++ b/addons/reloadlaunchers/config.cpp @@ -14,6 +14,7 @@ class CfgPatches { }; }; +#include "ACE_Arsenal_Stats.hpp" #include "CfgEventHandlers.hpp" #include "CfgVehicles.hpp" #include "CfgWeapons.hpp" diff --git a/addons/reloadlaunchers/stringtable.xml b/addons/reloadlaunchers/stringtable.xml index f69bcabf29..4c6430f323 100644 --- a/addons/reloadlaunchers/stringtable.xml +++ b/addons/reloadlaunchers/stringtable.xml @@ -107,5 +107,8 @@ Wyrzutnia nie mogła być załadowana 발사기를 장전할 수 없습니다. + + Buddy Loading +