2023-09-12 18:58:10 +00:00
|
|
|
#include "..\script_component.hpp"
|
2016-05-03 08:21:21 +00:00
|
|
|
/*
|
|
|
|
* Author: Ir0n1E
|
2016-06-12 21:56:00 +00:00
|
|
|
* Check gunbag status full/empty.
|
2016-05-03 08:21:21 +00:00
|
|
|
*
|
|
|
|
* Arguments:
|
|
|
|
* 0: Unit <OBJECT>
|
|
|
|
*
|
|
|
|
* Return Value:
|
2016-06-12 21:56:00 +00:00
|
|
|
* None
|
|
|
|
*
|
|
|
|
* Example:
|
|
|
|
* [player] call ace_gunbag_fnc_status
|
2016-05-03 08:21:21 +00:00
|
|
|
*
|
|
|
|
* Public: No
|
|
|
|
*/
|
|
|
|
|
|
|
|
params ["_unit"];
|
|
|
|
|
2016-06-12 11:51:23 +00:00
|
|
|
private _state = (backpackContainer _unit) getVariable [QGVAR(gunbagWeapon), []];
|
2016-05-03 08:21:21 +00:00
|
|
|
|
2016-06-12 11:51:23 +00:00
|
|
|
if (_state isEqualTo []) then {
|
2016-05-17 09:21:48 +00:00
|
|
|
[localize LSTRING(empty)] call EFUNC(common,displayTextStructured);
|
2016-05-03 08:21:21 +00:00
|
|
|
} else {
|
2016-06-12 11:51:23 +00:00
|
|
|
_state params ["_weapon"];
|
|
|
|
|
|
|
|
[
|
|
|
|
getText (configFile >> "CfgWeapons" >> _weapon >> "displayname"),
|
|
|
|
getText (configFile >> "CfgWeapons" >> _weapon >> "picture")
|
|
|
|
] call EFUNC(common,displayTextPicture);
|
2016-05-03 08:21:21 +00:00
|
|
|
};
|