diff --git a/addons/overheating/ACE_Arsenal_Stats.hpp b/addons/overheating/ACE_Arsenal_Stats.hpp new file mode 100644 index 0000000000..ef1e497c55 --- /dev/null +++ b/addons/overheating/ACE_Arsenal_Stats.hpp @@ -0,0 +1,21 @@ +class EGVAR(arsenal,stats) { + class statBase; + class ACE_allowSwapBarrel: statBase { + scope = 2; + priority = -1; + stats[] = {QGVAR(allowSwapBarrel)}; + displayName = CSTRING(statBarrelType); + showText = 1; + textStatement = QUOTE(call FUNC(statTextStatement_allowSwapBarrel)); + tabs[] = {{0,1}, {}}; + }; + class ACE_boltType: statBase { + scope = 2; + priority = -1.1; + stats[] = {QGVAR(closedBolt)}; + displayName = CSTRING(statBoltType); + showText = 1; + textStatement = QUOTE(call FUNC(statTextStatement_boltType)); + tabs[] = {{0,1}, {}}; + }; +}; diff --git a/addons/overheating/XEH_PREP.hpp b/addons/overheating/XEH_PREP.hpp index 865a049569..91d345914d 100644 --- a/addons/overheating/XEH_PREP.hpp +++ b/addons/overheating/XEH_PREP.hpp @@ -25,6 +25,8 @@ PREP(overheat); PREP(sendSpareBarrelsTemperaturesHint); PREP(setAmmoTemperature); PREP(setWeaponTemperature); +PREP(statTextStatement_boltType); +PREP(statTextStatement_allowSwapBarrel); PREP(swapBarrel); PREP(swapBarrelAssistant); PREP(swapBarrelCallback); diff --git a/addons/overheating/config.cpp b/addons/overheating/config.cpp index f04238fd10..4d8fb34cc3 100644 --- a/addons/overheating/config.cpp +++ b/addons/overheating/config.cpp @@ -26,6 +26,8 @@ class CfgPatches { #include "ACE_Settings.hpp" +#include "ACE_Arsenal_Stats.hpp" + class CfgMovesBasic { class ManActions { GVAR(GestureMountMuzzle) = QGVAR(GestureMountMuzzle); diff --git a/addons/overheating/functions/fnc_statTextStatement_allowSwapBarrel.sqf b/addons/overheating/functions/fnc_statTextStatement_allowSwapBarrel.sqf new file mode 100644 index 0000000000..9713023c17 --- /dev/null +++ b/addons/overheating/functions/fnc_statTextStatement_allowSwapBarrel.sqf @@ -0,0 +1,21 @@ +#include "..\script_component.hpp" +/* + * Author: drofseh + * Barrel Type statement. + * + * Arguments: + * 0: Not used + * 1: Item config path + * + * Return Value: + * Stat Text + * + * Public: No +*/ + +params ["", "_config"]; +TRACE_1("statTextStatement_allowSwapBarrel",_config); + +if ((getNumber (_config >> QGVAR(allowSwapBarrel))) == 1) exitWith {LLSTRING(statBarrelType_removeable)}; + +LLSTRING(statBarrelType_nonRemoveable) diff --git a/addons/overheating/functions/fnc_statTextStatement_boltType.sqf b/addons/overheating/functions/fnc_statTextStatement_boltType.sqf new file mode 100644 index 0000000000..67967496c7 --- /dev/null +++ b/addons/overheating/functions/fnc_statTextStatement_boltType.sqf @@ -0,0 +1,21 @@ +#include "..\script_component.hpp" +/* + * Author: drofseh + * Bolt Type statement. + * + * Arguments: + * 0: Not used + * 1: Item config path + * + * Return Value: + * Stat Text + * + * Public: No +*/ + +params ["", "_config"]; +TRACE_1("statTextStatement_boltType",_config); + +if ((getNumber (_config >> QGVAR(closedBolt))) == 1) exitWith {LLSTRING(statBoltType_closedBolt)}; + +LLSTRING(statBoltType_openBolt) diff --git a/addons/overheating/stringtable.xml b/addons/overheating/stringtable.xml index 2c6249be2f..678a9a746a 100644 --- a/addons/overheating/stringtable.xml +++ b/addons/overheating/stringtable.xml @@ -875,5 +875,23 @@ 备用枪管温度非常热 備用槍管溫度超級熱 + + Bolt Type + + + Open Bolt + + + Closed Bolt + + + Barrel Type + + + Non-Removeable + + + Quick Change +