2015-08-10 21:07:47 +00:00
|
|
|
/*
|
|
|
|
* Author: Glowbal
|
|
|
|
* Get the cargo size of an object
|
|
|
|
*
|
|
|
|
* Arguments:
|
|
|
|
* 0: Object <OBJECT>
|
|
|
|
*
|
|
|
|
* Return value:
|
2015-08-14 16:07:31 +00:00
|
|
|
* Cargo size. <NUMBER> (default: -1)
|
2015-08-10 21:07:47 +00:00
|
|
|
*
|
|
|
|
* Public: No
|
|
|
|
*/
|
|
|
|
|
|
|
|
#include "script_component.hpp"
|
|
|
|
|
2015-08-14 16:42:22 +00:00
|
|
|
private "_config";
|
|
|
|
params ["_item"];
|
2015-08-14 16:07:31 +00:00
|
|
|
_config = (configFile >> "CfgVehicles" >> typeof _item >> QGVAR(size));
|
|
|
|
if (isNumber (_config)) exitwith {
|
|
|
|
_item getvariable [QGVAR(size), getNumber (_config)];
|
2015-08-10 21:07:47 +00:00
|
|
|
};
|
2015-08-14 16:07:31 +00:00
|
|
|
-1
|