ACE3/addons/zeus/functions/fnc_moduleRemoveArsenal.sqf
mharis001 bca8b01860 Various additions to ace_zeus (#6036)
* Add search to teleport players UI

* Change group side icons to look better

* Improve teleport UI and add stringtable entries

* Add Assign Repair Vehicle module

* Add Assign Repair Facility module

* Add Assign Engineer module

* Add Full Heal module

* Add Suicide Bomber module

* Make heal module work without ace_medical

* Add suicide bomber module translations

* Improve attribute cargo to use displayName

* Improve set engineer ui

* ACE_Curator for repair modules + author array

* Add angle param to getModuleDestination

* Prevent multiple suicide bomber modules on same target

* Heal module: support BI scripted revive system

* Requested changes
2018-02-24 11:44:57 -06:00

42 lines
1.2 KiB
Plaintext

/*
* Author: alganthe
* Remove arsenal from an object
*
* Arguments:
* 0: The module logic <OBJECT>
*
* Return Value:
* None
*
* Public: No
*/
#include "script_component.hpp"
params ["_logic"];
if (!local _logic) exitWith {};
private _object = attachedTo _logic;
TRACE_3("moduleRemoveArsenal",_logic,_object,typeOf _object);
switch (true) do {
case (isNull _object): {
[LSTRING(NothingSelected)] call FUNC(showMessage);
};
case (isPlayer _object): {
["str_a3_cfgvehicles_moduleremotecontrol_f_errorPlayer"] call FUNC(showMessage);
};
case (!alive _object): {
[LSTRING(OnlyAlive)] call FUNC(showMessage);
};
default {
TRACE_1("Calling removeVirtualXXXCargo functions", _object);
[_object, (_object call BIS_fnc_getVirtualItemCargo), true] call BIS_fnc_removeVirtualItemCargo;
[_object, (_object call BIS_fnc_getVirtualWeaponCargo), true] call BIS_fnc_removeVirtualWeaponCargo;
[_object, (_object call BIS_fnc_getVirtualMagazineCargo), true] call BIS_fnc_removeVirtualMagazineCargo;
[_object, (_object call BIS_fnc_getVirtualBackpackCargo), true] call BIS_fnc_removeVirtualBackpackCargo;
};
};
deleteVehicle _logic;