From e3421cbf8f21bb41f4626d7b4cd122224b9ddfdb Mon Sep 17 00:00:00 2001 From: PabstMirror Date: Sun, 18 Nov 2018 23:04:50 -0600 Subject: [PATCH] Arsenal - Add config to force show (mortars) (#6694) * Arsenal - Add config to force show (mortars) * Update CfgMagazines.hpp * Update arsenal-framework.md --- addons/arsenal/functions/fnc_addVirtualItems.sqf | 3 ++- addons/arsenal/functions/fnc_scanConfig.sqf | 3 ++- addons/mk6mortar/CfgMagazines.hpp | 5 +++++ docs/wiki/framework/arsenal-framework.md | 2 +- 4 files changed, 10 insertions(+), 3 deletions(-) diff --git a/addons/arsenal/functions/fnc_addVirtualItems.sqf b/addons/arsenal/functions/fnc_addVirtualItems.sqf index ff5865bb6b..93819ac09b 100644 --- a/addons/arsenal/functions/fnc_addVirtualItems.sqf +++ b/addons/arsenal/functions/fnc_addVirtualItems.sqf @@ -193,7 +193,8 @@ if (_items isEqualType true) then { switch true do { // Rifle, handgun, secondary weapons mags case ( - (getNumber (configFile >> "CfgMagazines" >> _x >> "type") in [TYPE_MAGAZINE_PRIMARY_AND_THROW,TYPE_MAGAZINE_SECONDARY_AND_PUT,1536,TYPE_MAGAZINE_HANDGUN_AND_GL]) && + ((getNumber (_x >> "type") in [TYPE_MAGAZINE_PRIMARY_AND_THROW,TYPE_MAGAZINE_SECONDARY_AND_PUT,1536,TYPE_MAGAZINE_HANDGUN_AND_GL]) || + {(getNumber (_x >> QGVAR(hide))) == -1}) && {!(_x in _grenadeList)} && {!(_x in _putList)} ): { diff --git a/addons/arsenal/functions/fnc_scanConfig.sqf b/addons/arsenal/functions/fnc_scanConfig.sqf index 840c56d514..fdb73c72ef 100644 --- a/addons/arsenal/functions/fnc_scanConfig.sqf +++ b/addons/arsenal/functions/fnc_scanConfig.sqf @@ -142,7 +142,8 @@ private _putList = []; switch true do { // Rifle, handgun, secondary weapons mags case ( - (getNumber (_x >> "type") in [TYPE_MAGAZINE_PRIMARY_AND_THROW,TYPE_MAGAZINE_SECONDARY_AND_PUT,1536,TYPE_MAGAZINE_HANDGUN_AND_GL]) && + ((getNumber (_x >> "type") in [TYPE_MAGAZINE_PRIMARY_AND_THROW,TYPE_MAGAZINE_SECONDARY_AND_PUT,1536,TYPE_MAGAZINE_HANDGUN_AND_GL]) || + {(getNumber (_x >> QGVAR(hide))) == -1}) && {!(_className in _grenadeList)} && {!(_className in _putList)} ): { diff --git a/addons/mk6mortar/CfgMagazines.hpp b/addons/mk6mortar/CfgMagazines.hpp index a726bc5a9f..0d5c1d5703 100644 --- a/addons/mk6mortar/CfgMagazines.hpp +++ b/addons/mk6mortar/CfgMagazines.hpp @@ -4,6 +4,7 @@ class cfgMagazines { count = 1; scope = 2; scopeCurator = 2; + EGVAR(arsenal,hide) = -1; author = ECSTRING(common,ACETeam); displayName = CSTRING(magazine_HE_displayName); displayNameShort = ""; @@ -17,6 +18,7 @@ class cfgMagazines { count = 1; scope = 2; scopeCurator = 2; + EGVAR(arsenal,hide) = -1; author = ECSTRING(common,ACETeam); displayName = CSTRING(magazine_Smoke_displayName); displayNameShort = ""; @@ -30,6 +32,7 @@ class cfgMagazines { count = 1; scope = 2; scopeCurator = 2; + EGVAR(arsenal,hide) = -1; author = ECSTRING(common,ACETeam); displayName = CSTRING(magazine_Illum_displayName); displayNameShort = ""; @@ -43,6 +46,7 @@ class cfgMagazines { count = 1; scope = 2; scopeCurator = 2; + EGVAR(arsenal,hide) = -1; author = ECSTRING(common,ACETeam); displayName = CSTRING(magazine_HE_Guided_displayName); displayNameShort = ""; @@ -56,6 +60,7 @@ class cfgMagazines { count = 1; scope = 2; scopeCurator = 2; + EGVAR(arsenal,hide) = -1; author = ECSTRING(common,ACETeam); displayName = CSTRING(magazine_HE_LaserGuided_displayName); displayNameShort = ""; diff --git a/docs/wiki/framework/arsenal-framework.md b/docs/wiki/framework/arsenal-framework.md index 9dd8767832..c0db1c57ee 100644 --- a/docs/wiki/framework/arsenal-framework.md +++ b/docs/wiki/framework/arsenal-framework.md @@ -109,7 +109,7 @@ Example: ACE Arsenal has 2 new config entries for items: -- `ace_arsenal_hide`: `0`(shown) or `1` (hidden), used to hide items from ACE Arsenal. +- `ace_arsenal_hide`: `0`(shown) or `1` (hidden), used to hide items from ACE Arsenal or `-1` (forced show), for vehicle magazines. - `ace_arsenal_uniqueBase`: Class name of the item that ACE Arsenal will replace it with when saving a loadout. Both of them are optional.