From eeb8d9347ceeeb63076f88696ebbee96fc74f7d4 Mon Sep 17 00:00:00 2001 From: PabstMirror Date: Fri, 25 Apr 2025 10:04:10 -0500 Subject: [PATCH] Set Vehicle Ammo from 3den --- addons/setvehicleammo/$PBOPREFIX$ | 1 + addons/setvehicleammo/CfgEden.hpp | 95 ++++++++ addons/setvehicleammo/CfgEventHandlers.hpp | 11 + addons/setvehicleammo/XEH_PREP.hpp | 7 + addons/setvehicleammo/XEH_preInit.sqf | 33 +++ addons/setvehicleammo/XEH_preStart.sqf | 3 + addons/setvehicleammo/config.cpp | 16 ++ .../functions/fnc_attributeLoad.sqf | 220 ++++++++++++++++++ .../functions/fnc_attributeSave.sqf | 24 ++ .../functions/fnc_initVehicle.sqf | 35 +++ .../functions/fnc_vehicleCustomizationSet.sqf | 19 ++ addons/setvehicleammo/script_component.hpp | 12 + 12 files changed, 476 insertions(+) create mode 100644 addons/setvehicleammo/$PBOPREFIX$ create mode 100644 addons/setvehicleammo/CfgEden.hpp create mode 100644 addons/setvehicleammo/CfgEventHandlers.hpp create mode 100644 addons/setvehicleammo/XEH_PREP.hpp create mode 100644 addons/setvehicleammo/XEH_preInit.sqf create mode 100644 addons/setvehicleammo/XEH_preStart.sqf create mode 100644 addons/setvehicleammo/config.cpp create mode 100644 addons/setvehicleammo/functions/fnc_attributeLoad.sqf create mode 100644 addons/setvehicleammo/functions/fnc_attributeSave.sqf create mode 100644 addons/setvehicleammo/functions/fnc_initVehicle.sqf create mode 100644 addons/setvehicleammo/functions/fnc_vehicleCustomizationSet.sqf create mode 100644 addons/setvehicleammo/script_component.hpp diff --git a/addons/setvehicleammo/$PBOPREFIX$ b/addons/setvehicleammo/$PBOPREFIX$ new file mode 100644 index 00000000000..b65d6cb8052 --- /dev/null +++ b/addons/setvehicleammo/$PBOPREFIX$ @@ -0,0 +1 @@ +z\ace\addons\setvehicleammo diff --git a/addons/setvehicleammo/CfgEden.hpp b/addons/setvehicleammo/CfgEden.hpp new file mode 100644 index 00000000000..daa8aac863c --- /dev/null +++ b/addons/setvehicleammo/CfgEden.hpp @@ -0,0 +1,95 @@ +class ctrlToolbox; +class ctrlStatic; +class ctrlListNBox; +class ctrlTree; +class ctrlXSliderH; + + +class Cfg3DEN { + class Attributes { + class Default; + class TitleWide: Default { + class Controls { + class Title; + }; + }; + class GVAR(vehAmmoAttribute): TitleWide { + attributeLoad = QUOTE([ARR_2(_this,_value)] call FUNC(attributeLoad)); + attributeSave = QUOTE([_this] call FUNC(attributeSave)); + + h = "(15 * 5 + 1) * (pixelH * pixelGrid * 0.5)"; + class Controls: Controls { + class Type: ctrlToolbox { + idc = 100; + x = "5 * (pixelW * pixelGrid * 0.5)"; + y = "0 * 5 * (pixelH * pixelGrid * 0.5)"; + w = "( 48 + 82 - 5) * (pixelW * pixelGrid * 0.5)"; + h = "1 * 5 * (pixelH * pixelGrid * 0.5)"; + rows = 1; + columns = 2; + strings[] = {"Default","Custom"}; + }; + class ListBackground: ctrlStatic { + x = "5 * (pixelW * pixelGrid * 0.5)"; + y = "1 * 5 * (pixelH * pixelGrid * 0.5)"; + w = "( 48 + 82 - 5) * (pixelW * pixelGrid * 0.5)"; + h = "13 * 5 * (pixelH * pixelGrid * 0.5)"; + colorBackground[] = {1,1,1,0.1}; + }; + class List: ctrlTree { + idc = 101; + x = "5 * (pixelW * pixelGrid * 0.5)"; + y = "1 * 5 * (pixelH * pixelGrid * 0.5)"; + w = "( 48 + 82 - 5) * (pixelW * pixelGrid * 0.5)"; + h = "13 * 5 * (pixelH * pixelGrid * 0.5)"; + }; + class ammoSlider: ctrlXSliderH { + idc = 102; + x = "5 * (pixelW * pixelGrid * 0.5)"; + y = "14 * 5 * (pixelH * pixelGrid * 0.5)"; + w = "( 48 + 82 - 5) * (pixelW * pixelGrid * 0.5)"; + h = "1 * 5 * (pixelH * pixelGrid * 0.5)"; + }; + }; + }; + }; + + class Object { + class AttributeCategories { + class ace_attributes { + class Attributes { + class GVAR(vehicleCustomizationSet) { + displayName = "Copy Custom Garage Apperence"; + tooltip = "Apply this vehicle's camo customiation to ALL other vehicles spawned with the SAME classname"; + property = QGVAR(vehicleCustomizationSet); + control = "Checkbox"; + expression = QUOTE(if (_value) then { call FUNC(vehicleCustomizationSet) }); + typeName = "BOOL"; + condition = "objectVehicle"; + defaultValue = "(false)"; + }; + class GVAR(rearmCustom) { + displayName = "Set as Rearm-Scripted Loadouts"; + tooltip = "ACE-Rearm will try to rearm the custom loadout instead of the config default"; + property = QGVAR(rearmCustom); + control = "Checkbox"; + expression = QUOTE(if (_value) then { _this setVariable [ARR_3('ace_rearm_scriptedLoadout',true,true)] }); + typeName = "BOOL"; + condition = "objectVehicle"; + defaultValue = "(false)"; + }; + class ADDON { + displayName = "Set Vehicle Ammo"; + tooltip = ""; + property = QGVAR(vehAmmoAttribute); + control = QGVAR(vehAmmoAttribute); + defaultValue = "''"; + typeName = "STRING"; + expression = QUOTE([ARR_2(_this,_value)] call FUNC(initVehicle)); + condition = "objectVehicle"; + }; + }; + }; + }; + }; +}; diff --git a/addons/setvehicleammo/CfgEventHandlers.hpp b/addons/setvehicleammo/CfgEventHandlers.hpp new file mode 100644 index 00000000000..865276cfba9 --- /dev/null +++ b/addons/setvehicleammo/CfgEventHandlers.hpp @@ -0,0 +1,11 @@ +class Extended_PreStart_EventHandlers { + class ADDON { + init = QUOTE(call COMPILE_SCRIPT(XEH_preStart)); + }; +}; + +class Extended_PreInit_EventHandlers { + class ADDON { + init = QUOTE(call COMPILE_SCRIPT(XEH_preInit)); + }; +}; diff --git a/addons/setvehicleammo/XEH_PREP.hpp b/addons/setvehicleammo/XEH_PREP.hpp new file mode 100644 index 00000000000..76dbadd0d16 --- /dev/null +++ b/addons/setvehicleammo/XEH_PREP.hpp @@ -0,0 +1,7 @@ +TRACE_1("",QUOTE(ADDON)); + +PREP(attributeLoad); +PREP(attributeSave); +PREP(initVehicle); + +PREP(vehicleCustomizationSet); diff --git a/addons/setvehicleammo/XEH_preInit.sqf b/addons/setvehicleammo/XEH_preInit.sqf new file mode 100644 index 00000000000..3d6c73150fb --- /dev/null +++ b/addons/setvehicleammo/XEH_preInit.sqf @@ -0,0 +1,33 @@ +#include "script_component.hpp" + +ADDON = false; + +PREP_RECOMPILE_START; +#include "XEH_PREP.hpp" +PREP_RECOMPILE_END; + +// Vehicle customization - order is a little weird +// preInit, 3den-vehicleCustomizationSet, 3den-bisGarage, vehicleCustomizationSet's nextFrame, 1 sec delay (pubVar), 5 sec delay (apply) + +if (isServer) then { + GVAR(vehicleCustomization) = createHashMap; + [{ + publicVariable QGVAR(vehicleCustomization); + }, [], 1] call CBA_fnc_waitAndExecute; +}; +[{ + if (isNil QGVAR(vehicleCustomization)) exitWith { ERROR("hash nil?") }; + if ((count GVAR(vehicleCustomization)) == 0) exitWith {}; + INFO_1("applying %1 vehicle customizations",count GVAR(vehicleCustomization)); + { + [_x, "InitPost", { + params ["_vehicle"]; + if ((!alive _vehicle) || {!local _vehicle}) exitWith {}; + private _customization = GVAR(vehicleCustomization) getOrDefault [typeOf _vehicle, []]; + private _ret = [_vehicle, _customization select 0, _customization select 1] call bis_fnc_initVehicle; + TRACE_3("applied",typeOf _vehicle,_ret,_customization); + }, false, nil, true] call CBA_fnc_addClassEventHandler; // no inheritance, apply retro + } forEach GVAR(vehicleCustomization); +}, [], 5] call CBA_fnc_waitAndExecute; + +ADDON = true; diff --git a/addons/setvehicleammo/XEH_preStart.sqf b/addons/setvehicleammo/XEH_preStart.sqf new file mode 100644 index 00000000000..022888575ed --- /dev/null +++ b/addons/setvehicleammo/XEH_preStart.sqf @@ -0,0 +1,3 @@ +#include "script_component.hpp" + +#include "XEH_PREP.hpp" diff --git a/addons/setvehicleammo/config.cpp b/addons/setvehicleammo/config.cpp new file mode 100644 index 00000000000..e47171f04b5 --- /dev/null +++ b/addons/setvehicleammo/config.cpp @@ -0,0 +1,16 @@ +#include "script_component.hpp" + +class CfgPatches { + class ADDON { + units[] = {}; + weapons[] = {}; + requiredVersion = REQUIRED_VERSION; + requiredAddons[] = {"ace_common"}; + author = ECSTRING(common,ACETeam); + url = ECSTRING(main,URL); + VERSION_CONFIG; + }; +}; + +#include "CfgEden.hpp" +#include "CfgEventHandlers.hpp" diff --git a/addons/setvehicleammo/functions/fnc_attributeLoad.sqf b/addons/setvehicleammo/functions/fnc_attributeLoad.sqf new file mode 100644 index 00000000000..1550d266d0a --- /dev/null +++ b/addons/setvehicleammo/functions/fnc_attributeLoad.sqf @@ -0,0 +1,220 @@ +#include "..\script_component.hpp" + +params ["_control", "_loadoutValue"]; +TRACE_2("params",_control,_loadoutValue); + +GVAR(turretMagsArray) = []; +GVAR(defaultLoad) = []; +GVAR(deltaLoad) = []; +GVAR(selectedTurretPath) = []; +GVAR(selectedTreePath) = []; +GVAR(selectedMagazine) = ""; + + +//Parse string into a delta loadout array: +if (_loadoutValue isEqualTo true) then {_loadoutValue = ""}; //why? +if (_loadoutValue != "") then { + _loadoutValue = call compile _loadoutValue; + if (_loadoutValue isEqualType []) then { + GVAR(deltaLoad) = _loadoutValue; + }; +}; + +private _entity = (get3DENSelected "object") select 0; +TRACE_2("",_entity,typeOf _entity); + +private _enableLBChangedEH = { + params ["_control", "_selection"]; + TRACE_2("lbChanged eh",_control,_selection); + if (_selection == 0) then { + ((ctrlParentControlsGroup _control) controlsGroupCtrl 101) ctrlEnable false; + ((ctrlParentControlsGroup _control) controlsGroupCtrl 101) ctrlSetFade 0.5; + ((ctrlParentControlsGroup _control) controlsGroupCtrl 101) ctrlCommit 0; + ((ctrlParentControlsGroup _control) controlsGroupCtrl 102) ctrlEnable false; + ((ctrlParentControlsGroup _control) controlsGroupCtrl 102) ctrlSetFade 0.5; + ((ctrlParentControlsGroup _control) controlsGroupCtrl 102) ctrlCommit 0; + } else { + ((ctrlParentControlsGroup _control) controlsGroupCtrl 101) ctrlEnable true; + ((ctrlParentControlsGroup _control) controlsGroupCtrl 101) ctrlSetFade 0; + ((ctrlParentControlsGroup _control) controlsGroupCtrl 101) ctrlCommit 0; + ((ctrlParentControlsGroup _control) controlsGroupCtrl 102) ctrlEnable true; + ((ctrlParentControlsGroup _control) controlsGroupCtrl 102) ctrlSetFade 0; + ((ctrlParentControlsGroup _control) controlsGroupCtrl 102) ctrlCommit 0; + }; +}; +(_control controlsGroupCtrl 100) ctrlAddEventHandler ["ToolBoxSelChanged", _enableLBChangedEH]; + +if (GVAR(deltaLoad) isEqualTo []) then { + (_control controlsGroupCtrl 100) lbSetCurSel 0; + ((ctrlParentControlsGroup _control) controlsGroupCtrl 101) ctrlEnable false; + ((ctrlParentControlsGroup _control) controlsGroupCtrl 101) ctrlSetFade 0.5; + ((ctrlParentControlsGroup _control) controlsGroupCtrl 101) ctrlCommit 0; + ((ctrlParentControlsGroup _control) controlsGroupCtrl 102) ctrlEnable false; + ((ctrlParentControlsGroup _control) controlsGroupCtrl 102) ctrlSetFade 0.5; + ((ctrlParentControlsGroup _control) controlsGroupCtrl 102) ctrlCommit 0; + +} else { + (_control controlsGroupCtrl 100) lbSetCurSel 1; +}; + +private _treeSelChangedEH = { + params ["_control", "_newPath"]; + TRACE_2("lbChanged eh",_control,_newPath); + + private _mag = GVAR(turretMagsArray); + private _path = []; + { + _mag = _mag select _x; + if (_forEachIndex == 0) then { + _path = _mag select 0; + _mag = _mag select 1; + }; + } forEach _newPath; + TRACE_1("",_mag); + + if (_mag isEqualType "") then { + GVAR(selectedTurretPath) = _path; + GVAR(selectedMagazine) = _mag; + GVAR(selectedTreePath) = _newPath; + private _magCount = 0; + { + _x params ["_xPath", "_xMag", "_xCount"]; + if ((_xPath isEqualTo GVAR(selectedTurretPath)) && {_xMag == GVAR(selectedMagazine)}) exitWith { + _magCount = _xCount; + }; + } forEach GVAR(defaultLoad); + { + _x params ["_xPath", "_xMag", "_xCount"]; + if ((_xPath isEqualTo GVAR(selectedTurretPath)) && {_xMag == GVAR(selectedMagazine)}) exitWith { + _magCount = _magCount + _xCount; + }; + } forEach GVAR(deltaLoad); + + ((ctrlParentControlsGroup _control) controlsGroupCtrl 102) sliderSetRange [0, 10]; + ((ctrlParentControlsGroup _control) controlsGroupCtrl 102) sliderSetPosition _magCount; + + ((ctrlParentControlsGroup _control) controlsGroupCtrl 102) ctrlEnable true; + ((ctrlParentControlsGroup _control) controlsGroupCtrl 102) ctrlSetFade 0; + ((ctrlParentControlsGroup _control) controlsGroupCtrl 102) ctrlCommit 0; + } else { + ((ctrlParentControlsGroup _control) controlsGroupCtrl 102) ctrlEnable false; + ((ctrlParentControlsGroup _control) controlsGroupCtrl 102) ctrlSetFade 1; + ((ctrlParentControlsGroup _control) controlsGroupCtrl 102) ctrlCommit 0; + }; +}; +(_control controlsGroupCtrl 101) ctrlAddEventHandler ["TreeSelChanged", _treeSelChangedEH]; + +private _sliderChangedEH = { + params ["_control", "_sliderValue"]; + TRACE_2("lbChanged eh",_control,_sliderValue); + + _sliderValue = (round (_sliderValue * 10)) / 10; + + private _defaultCount = 0; + { + _x params ["_xPath", "_xMag", "_xCount"]; + if ((_xPath isEqualTo GVAR(selectedTurretPath)) && {_xMag == GVAR(selectedMagazine)}) exitWith { + _defaultCount = _xCount; + }; + } forEach GVAR(defaultLoad); + + private _delta = _sliderValue - _defaultCount; + private _found = false; + { + _x params ["_xPath", "_xMag", "_xCount"]; + if ((_xPath isEqualTo GVAR(selectedTurretPath)) && {_xMag == GVAR(selectedMagazine)}) exitWith { + _found = true; + _x set [2, _delta]; + }; + } forEach GVAR(deltaLoad); + if (!_found) then { + GVAR(deltaLoad) pushBack [GVAR(selectedTurretPath), GVAR(selectedMagazine), _delta]; + }; + + TRACE_3("",_delta,GVAR(selectedMagazine),GVAR(selectedTreePath)); + + private _rounds = round (_sliderValue * getNumber (configFile >> "CfgMagazines" >> GVAR(selectedMagazine) >> "count")); + private _text = format ["%1 [%2x = %3rnds]", GVAR(selectedMagazine), _sliderValue, _rounds]; + ((ctrlParentControlsGroup _control) controlsGroupCtrl 101) tvSetText [GVAR(selectedTreePath), _text]; +}; +(_control controlsGroupCtrl 102) ctrlAddEventHandler ["SliderPosChanged", _sliderChangedEH]; + + +private _config = configFile >> "CfgVehicles" >> (typeOf _entity); +private _turrets = allTurrets _entity; +TRACE_1("",_turrets); + + +private _addWeaponSystem = { + params ["_config", "_path", "_name"]; + private _weapons = getArray (_config >> "weapons"); + private _magazines = getArray (_config >> "magazines"); + TRACE_3("",_weapons,_magazines,_config); + if (_weapons isEqualTo []) exitWith {}; + + { + private _magToAdd = _x; + private _found = false; + { + _x params ["_xPath", "_xMag", "_xCount"]; + if ((_xPath isEqualTo _path) && {_xMag == _magToAdd}) exitWith { + _found = true; + _x set [2, (_xCount + 1)]; + }; + } forEach GVAR(defaultLoad); + if (!_found) then { + GVAR(defaultLoad) pushBack [_path, _magToAdd, 1]; + }; + } forEach _magazines; + + private _tvIndexTurret = (_control controlsGroupCtrl 101) tvAdd [ [], _name]; + (_control controlsGroupCtrl 101) tvExpand [_tvIndexTurret]; + + private _index = GVAR(turretMagsArray) pushBack [_path, []]; + + { + private _weapon = _x; + private _muzzles = getArray (configFile >> "CfgWeapons" >> _weapon >> "muzzles"); + private _weaponMagazines = compatibleMagazines _weapon; + + ((GVAR(turretMagsArray) select _index) select 1) pushBack _weaponMagazines; + + { + if (_x != "this") then { + _weaponMagazines append (getArray (configFile >> "CfgWeapons" >> _weapon >> _x >> "magazines")); + }; + false + } count _muzzles; + + private _tvIndexWeapon = (_control controlsGroupCtrl 101) tvAdd [[_tvIndexTurret], _x]; + (_control controlsGroupCtrl 101) tvExpand [_tvIndexTurret, _tvIndexWeapon]; + { + private _magToAdd = _x; + private _magCount = 0; + { + _x params ["_xPath", "_xMag", "_xCount"]; + if ((_xPath isEqualTo _path) && {_xMag == _magToAdd}) exitWith { + _magCount = _xCount; + }; + } forEach GVAR(defaultLoad); + { + _x params ["_xPath", "_xMag", "_xCount"]; + if ((_xPath isEqualTo _path) && {_xMag == _magToAdd}) exitWith { + _magCount = _magCount + _xCount; + }; + } forEach GVAR(deltaLoad); + + private _rounds = round (_magCount * getNumber (configFile >> "CfgMagazines" >> _magToAdd >> "count")); + private _text = format ["%1 [%2x = %3rnds]", _magToAdd, _magCount, _rounds]; + (_control controlsGroupCtrl 101) tvAdd [[_tvIndexTurret, _tvIndexWeapon], _text]; + } forEach _weaponMagazines; + } forEach _weapons; +}; + +[_config, [-1], "Pilot"] call _addWeaponSystem; + +{ + private _turretConfig = [_config, _x] call ace_common_fnc_getTurretConfigPath; + TRACE_2("",_x,_turretConfig); + [_turretConfig, _x, (format ["Turret %1", _x])] call _addWeaponSystem; +} forEach _turrets; diff --git a/addons/setvehicleammo/functions/fnc_attributeSave.sqf b/addons/setvehicleammo/functions/fnc_attributeSave.sqf new file mode 100644 index 00000000000..84e3fc1dfcd --- /dev/null +++ b/addons/setvehicleammo/functions/fnc_attributeSave.sqf @@ -0,0 +1,24 @@ +#include "..\script_component.hpp" + +params ["_control"]; +TRACE_1("params",_control); + +if ((lbCurSel(_control controlsGroupCtrl 100)) == 0) exitWith { + private _return = ""; + TRACE_1("lb set to default",_return); + _return +}; + + +private _output = []; +{ + TRACE_1("x:",_x); + _x params ["_xPath", "_xMag", "_xCount"]; + if (_xCount != 0) then { + _output pushBack _x; + }; +} forEach GVAR(deltaLoad); + +private _return = (str _output); +TRACE_2("",count _output,_return); +_return diff --git a/addons/setvehicleammo/functions/fnc_initVehicle.sqf b/addons/setvehicleammo/functions/fnc_initVehicle.sqf new file mode 100644 index 00000000000..62411d6c808 --- /dev/null +++ b/addons/setvehicleammo/functions/fnc_initVehicle.sqf @@ -0,0 +1,35 @@ +#include "..\script_component.hpp" + +params ["_vehicle", "_loadoutValue"]; +TRACE_2("params",_vehicle,_loadoutValue); + +if (!(_loadoutValue isEqualType "")) exitWith {TRACE_1("not string",_loadoutValue)}; +if (_loadoutValue == "") exitWith {TRACE_1("default",_loadoutValue);}; +_loadoutValue = call compile _loadoutValue; +if (!(_loadoutValue isEqualType [])) exitWith {TRACE_1("not array",_loadoutValue)}; + +TRACE_1("",_loadoutValue); +TRACE_3("veh",typeOf _vehicle,local _vehicle,magazines _vehicle); + +{ + _x params ["_xPath", "_xMag", "_xCount"]; + while {_xCount < 0} do { + _vehicle removeMagazineTurret [_xMag, _xPath]; + TRACE_2("removing",_xMag,_xPath); + _xCount = _xCount + 1; + }; + while {_xCount > 0} do { + if (_xCount >= 1) then { + _vehicle addMagazineTurret [_xMag, _xPath]; + TRACE_2("adding full",_xMag,_xPath); + _xCount = _xCount - 1; + } else { + private _rounds = floor (_xCount * getNumber (configFile >> "CfgMagazines" >> _xMag >> "count")); + _vehicle addMagazineTurret [_xMag, _xPath, _rounds]; + TRACE_3("adding partial",_xMag,_xPath,_rounds); + _xCount = 0; + }; + }; +} forEach _loadoutValue; + +TRACE_1("veh",magazines _vehicle); diff --git a/addons/setvehicleammo/functions/fnc_vehicleCustomizationSet.sqf b/addons/setvehicleammo/functions/fnc_vehicleCustomizationSet.sqf new file mode 100644 index 00000000000..61206c9c793 --- /dev/null +++ b/addons/setvehicleammo/functions/fnc_vehicleCustomizationSet.sqf @@ -0,0 +1,19 @@ +#include "..\script_component.hpp" + +params ["_vehicle"]; +TRACE_2("vehicleCustomizationSet",_vehicle,typeOf _vehicle); + +// we need to delay a frame so the 3den garage attribute can be applyed +[{ + params ["_vehicle"]; + TRACE_2("vehicleCustomizationSet after 3den",_vehicle,typeOf _vehicle); + if (!alive _vehicle) exitWith { ERROR_1("bad vehicle %1",_vehicle) }; + + private _customization = [_vehicle] call BIS_fnc_getVehicleCustomization; + TRACE_1("",_customization); + if ((_customization param [0, []]) isEqualTo []) exitWith { ERROR_2("bad custom %1-%2",typeOf _vehicle,_customization) }; + + if (GVAR(vehicleCustomization) set [typeOf _vehicle, _customization]) then { + WARNING_2("overwriting existing customization %1-%2",typeOf _vehicle,_customization) + }; +}, _this] call CBA_fnc_execNextFrame; diff --git a/addons/setvehicleammo/script_component.hpp b/addons/setvehicleammo/script_component.hpp new file mode 100644 index 00000000000..9ac73826324 --- /dev/null +++ b/addons/setvehicleammo/script_component.hpp @@ -0,0 +1,12 @@ +#define COMPONENT setvehicleammo +#include "\z\ace\addons\main\script_mod.hpp" + +// #define DEBUG_MODE_FULL +// #define DISABLE_COMPILE_CACHE +// #define ENABLE_PERFORMANCE_COUNTERS + +#ifdef DEBUG_ENABLED_SETVEHICLEAMMO + #define DEBUG_MODE_FULL +#endif + +#include "\z\ace\addons\main\script_macros.hpp"