2023-09-12 18:58:10 +00:00
|
|
|
#include "..\script_component.hpp"
|
2018-07-09 17:20:55 +00:00
|
|
|
/*
|
|
|
|
* Author: shukari
|
|
|
|
* Returns if vehicle or object is a rearm source.
|
|
|
|
*
|
|
|
|
* Arguments:
|
2023-07-28 09:47:23 +00:00
|
|
|
* 0: Target <OBJECT>
|
2018-07-09 17:20:55 +00:00
|
|
|
*
|
|
|
|
* Return Value:
|
|
|
|
* None
|
|
|
|
*
|
|
|
|
* Example:
|
|
|
|
* [cursorObject] call ace_rearm_fnc_isSource
|
|
|
|
*
|
|
|
|
* Public: Yes
|
|
|
|
*/
|
2023-07-28 09:47:23 +00:00
|
|
|
params [["_target", objNull, [objNull]]];
|
2018-07-09 17:20:55 +00:00
|
|
|
|
2018-11-02 21:56:16 +00:00
|
|
|
if ((_target getVariable [QGVAR(currentSupply), 0]) < 0) exitWith {false};
|
2021-10-30 21:42:03 +00:00
|
|
|
|
2021-02-18 18:58:08 +00:00
|
|
|
private _vehCfg = configOf _target;
|
2018-07-09 17:20:55 +00:00
|
|
|
private _vanillaCargoConfig = getNumber (_vehCfg >> "transportAmmo");
|
|
|
|
private _rearmCargoConfig = getNumber (_vehCfg >> QGVAR(defaultSupply));
|
|
|
|
private _supplyVehicle = _target getVariable [QGVAR(isSupplyVehicle), false];
|
|
|
|
|
2023-07-28 09:47:23 +00:00
|
|
|
_rearmCargoConfig > 0 || {_supplyVehicle} || {_vanillaCargoConfig > 0}
|