mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
e47e18001f
* Update display name in team * Update display name everywhere * order https://youtu.be/VYycQTm2HrM --------- Co-authored-by: BrettMayson <brett@mayson.io>
30 lines
560 B
Plaintext
30 lines
560 B
Plaintext
#include "script_component.hpp"
|
|
/*
|
|
* Author: Glowbal, kymckay
|
|
* Get the cargo size of an object.
|
|
*
|
|
* Arguments:
|
|
* 0: Item <OBJECT or STRING>
|
|
*
|
|
* Return Value:
|
|
* Cargo size <NUMBER> (default: -1)
|
|
*
|
|
* Example:
|
|
* [object] call ace_cargo_fnc_getSizeItem
|
|
*
|
|
* Public: No
|
|
*/
|
|
|
|
params ["_item"];
|
|
|
|
// Virtual items are much easier to deal with
|
|
if (_item isEqualType "") then {
|
|
CARGO_SIZE(_item)
|
|
} else {
|
|
if (isNil {_item getVariable QGVAR(size)}) then {
|
|
CARGO_SIZE(typeOf _item)
|
|
} else {
|
|
_item getVariable QGVAR(size)
|
|
};
|
|
};
|