mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
d1f0dc5e83
* Update CfgVehicles.hpp * Cargo cleanup * Update menu.hpp * Updated status effect key * Update fnc_onMenuOpen.sqf * Update fnc_onMenuOpen.sqf * fix comment from merge * nil interaction GVARs on menu close * fix carry bug * Fix floating objects in MP * Updated ace_cargoAdded doc * Fix progress bar prematurely stopping * Finer cursor object selection --------- Co-authored-by: LinkIsGrim <salluci.lovi@gmail.com>
26 lines
559 B
Plaintext
26 lines
559 B
Plaintext
#include "..\script_component.hpp"
|
|
/*
|
|
* Author: Glowbal, kymckay
|
|
* Gets the cargo size of an object.
|
|
*
|
|
* Arguments:
|
|
* 0: Item <STRING> or <OBJECT>
|
|
*
|
|
* Return Value:
|
|
* Cargo size <NUMBER> (default: -1)
|
|
*
|
|
* Example:
|
|
* cursorObject call ace_cargo_fnc_getSizeItem
|
|
*
|
|
* Public: No
|
|
*/
|
|
|
|
params ["_item"];
|
|
|
|
// Default cargo size is -1 as 0 is a valid size
|
|
if (_item isEqualType "") then {
|
|
GET_NUMBER(configFile >> "CfgVehicles" >> _item >> QGVAR(size),-1)
|
|
} else {
|
|
_item getVariable [QGVAR(size), GET_NUMBER(configOf _item >> QGVAR(size),-1)]
|
|
};
|