ACE3/addons/reloadlaunchers/functions/fnc_getLoadableMissiles.sqf
johnb432 59ee36560f
Reload Launchers - Code cleanup (#9334)
* reloadlaunchers cleanup

* Update fnc_canLoad.sqf
2023-08-28 14:27:01 -03:00

24 lines
587 B
Plaintext

#include "script_component.hpp"
/*
* Author: commy2, johnb43
* Return all magazine types from reloaders inventory that are compatible with given weapon.
*
* Arguments:
* 0: Unit to execute the reload <OBJECT>
* 1: Launcher name <STRING>
*
* Return Value:
* Reloable magazines <ARRAY>
*
* Example:
* [player, "launch_RPG32_F"] call ace_reloadlaunchers_fnc_getLoadableMissiles
*
* Public: No
*/
params ["_unit", "_weapon"];
TRACE_2("params",_unit,_weapon);
// Look for primary muzzle magazines only
(compatibleMagazines [_weapon, "this"]) arrayIntersect (magazines _unit)