ACE3/addons/csw/XEH_postInit.sqf
GhostIsSpooky a4ae61f1fc
CSW - Add reloading from nearSupplies (#8776)
* allow players to reload from nearSupplies

* limit reloading to friendly sides

* add handling for ai getting inside empty weapon

* configOf for lookup

* add getin handler, hammer out remaining bugs

* configOf lookup

* improve friendly/object filter

* more configOf lookups

* Capitalize settings, add ammo storage setting

* remove systemChat

Co-authored-by: PabstMirror <pabstmirror@gmail.com>

* fix TRACE

Co-authored-by: PabstMirror <pabstmirror@gmail.com>

Co-authored-by: PabstMirror <pabstmirror@gmail.com>
2022-03-07 12:29:19 -06:00

27 lines
948 B
Plaintext

#include "script_component.hpp"
GVAR(vehicleMagCache) = createHashMap;
["CBA_settingsInitialized", {
TRACE_3("settingsInit",GVAR(defaultAssemblyMode),GVAR(handleExtraMagazines),GVAR(ammoHandling));
["StaticWeapon", "init", LINKFUNC(staticWeaponInit), true, [], true] call CBA_fnc_addClassEventHandler;
}] call CBA_fnc_addEventHandler;
// Event handlers:
[QGVAR(disableVanillaAssembly), {
params ["_staticWeapon"];
TRACE_1("disableVanillaAssembly eh",_staticWeapon);
_staticWeapon enableWeaponDisassembly false;
}] call CBA_fnc_addEventHandler;
[QGVAR(addTurretMag), LINKFUNC(reload_handleAddTurretMag)] call CBA_fnc_addEventHandler;
[QGVAR(removeTurretMag), LINKFUNC(reload_handleRemoveTurretMag)] call CBA_fnc_addEventHandler;
[QGVAR(returnAmmo), LINKFUNC(reload_handleReturnAmmo)] call CBA_fnc_addEventHandler;
#ifdef DEBUG_MODE_FULL
call compile preprocessFileLineNumbers QPATHTOF(dev\checkStaticWeapons.sqf);
#endif