From 38fb97aeac56626e9d0a761e162e293a1cb622d1 Mon Sep 17 00:00:00 2001 From: VKing Date: Sun, 20 Dec 2015 20:51:44 +0100 Subject: [PATCH] Fixed init problem; added mortar ammo boxes --- addons/mk6mortar/CfgVehicles.hpp | 25 +++++++++++++++++++ addons/mk6mortar/XEH_getIn.sqf | 4 +-- addons/mk6mortar/XEH_initPost.sqf | 2 -- addons/mk6mortar/functions/fnc_mortarInit.sqf | 2 ++ addons/mk6mortar/stringtable.xml | 17 ++++++++++--- 5 files changed, 41 insertions(+), 9 deletions(-) diff --git a/addons/mk6mortar/CfgVehicles.hpp b/addons/mk6mortar/CfgVehicles.hpp index 0d5c03d39c..76748f8801 100644 --- a/addons/mk6mortar/CfgVehicles.hpp +++ b/addons/mk6mortar/CfgVehicles.hpp @@ -139,4 +139,29 @@ class CfgVehicles { description = CSTRING(Module_Description); }; }; + + class Box_NATO_AmmoOrd_F; + class ACE_Box_82mm_Mo_HE: Box_NATO_AmmoOrd_F { + displayName = CSTRING(HEBox_DisplayName); + author = ECSTRING(common,ACETeam); + transportMaxWeapons = 4; + transportMaxmagazines = 8; + class TransportMagazines { + MACRO_ADDMAGAZINE(ACE_1Rnd_82mm_Mo_HE,8); + }; + class TransportItems {}; + class TransportWeapons {}; + }; + class ACE_Box_82mm_Mo_Smoke: ACE_Box_82mm_Mo_HE { + displayName = CSTRING(SmokeBox_DisplayName); + class TransportMagazines { + MACRO_ADDMAGAZINE(ACE_1Rnd_82mm_Mo_Smoke,8); + }; + }; + class ACE_Box_82mm_Mo_Illum: ACE_Box_82mm_Mo_HE { + displayName = CSTRING(IllumBox_DisplayName); + class TransportMagazines { + MACRO_ADDMAGAZINE(ACE_1Rnd_82mm_Mo_Illum,8); + }; + }; }; diff --git a/addons/mk6mortar/XEH_getIn.sqf b/addons/mk6mortar/XEH_getIn.sqf index 5d7fd62484..2802b54e80 100644 --- a/addons/mk6mortar/XEH_getIn.sqf +++ b/addons/mk6mortar/XEH_getIn.sqf @@ -3,7 +3,7 @@ params ["_mortar","_crewPosition","_unit","_turretPath"]; TRACE_4("",_mortar,_crewPosition,_unit,_turretPath); -if (_unit != player || {_crewPosition != "GUNNER"}) exitWith {LOG("Exit")}; +if (_unit != player) exitWith {LOG("Exit")}; if (!EGVAR(common,settingsInitFinished)) exitWith { EGVAR(common,runAtSettingsInitialized) pushBack [{ @@ -13,6 +13,4 @@ if (!EGVAR(common,settingsInitFinished)) exitWith { }, _mortar]; }; -if (!GVAR(useAmmoHandling)) exitWith {}; - _mortar call FUNC(mortarInit); diff --git a/addons/mk6mortar/XEH_initPost.sqf b/addons/mk6mortar/XEH_initPost.sqf index dd06b48993..dfcaee61a2 100644 --- a/addons/mk6mortar/XEH_initPost.sqf +++ b/addons/mk6mortar/XEH_initPost.sqf @@ -13,6 +13,4 @@ if (!EGVAR(common,settingsInitFinished)) exitWith { }, _this]; }; -if (!GVAR(useAmmoHandling)) exitWith {}; - _this call FUNC(mortarInit); diff --git a/addons/mk6mortar/functions/fnc_mortarInit.sqf b/addons/mk6mortar/functions/fnc_mortarInit.sqf index 0bb7756418..09f16090df 100644 --- a/addons/mk6mortar/functions/fnc_mortarInit.sqf +++ b/addons/mk6mortar/functions/fnc_mortarInit.sqf @@ -15,6 +15,8 @@ */ #include "script_component.hpp" +if !(GVAR(useAmmoHandling)) exitWith {}; + params ["_mortar"]; private ["_newWeapon","_currentWeapon"]; diff --git a/addons/mk6mortar/stringtable.xml b/addons/mk6mortar/stringtable.xml index cc01175c1f..d8eefb679f 100644 --- a/addons/mk6mortar/stringtable.xml +++ b/addons/mk6mortar/stringtable.xml @@ -135,6 +135,12 @@ Модуль настройки миномета MK6. Ce module permet de régler les options du mortier MK6 + + Use Ammunition handling + + + Removes mortar magazines, requiring individual rounds to be loaded by the gunner or loader. Does not affect AI mortars. + Remove Round @@ -180,11 +186,14 @@ Used in Mk6 mortar - - Ammunition handling + + [ACE] 82mm HE Rounds - - Removes mortar magazines, requiring individual rounds to be loaded by the gunner or loader + + [ACE] 82mm Smoke Rounds + + + [ACE] 82mm Illumination Rounds