mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
Expanded optional hint to addCargoItem and AddCargoByClass event
This commit is contained in:
parent
30544dc757
commit
151903ace4
@ -6,6 +6,7 @@
|
||||
* 0: Item Classname <STRING>
|
||||
* 1: Vehicle <OBJECT>
|
||||
* 2: Amount <NUMBER> (default: 1)
|
||||
* 3: Show Hint <BOOL> (default: false)
|
||||
*
|
||||
* Return Value:
|
||||
* None
|
||||
@ -18,7 +19,7 @@
|
||||
#include "script_component.hpp"
|
||||
|
||||
private ["_position", "_item", "_i"];
|
||||
params ["_itemClass", "_vehicle", ["_amount", 1]];
|
||||
params ["_itemClass", "_vehicle", ["_amount", 1], ["_showHint", false, [false]] ];
|
||||
TRACE_3("params",_itemClass,_vehicle,_amount);
|
||||
|
||||
_position = getPos _vehicle;
|
||||
@ -29,7 +30,7 @@ for "_i" from 1 to _amount do {
|
||||
_item = createVehicle [_itemClass, _position, [], 0, "CAN_COLLIDE"];
|
||||
|
||||
// Load item or delete it if no space left
|
||||
if !([_item, _vehicle, false] call FUNC(loadItem)) exitWith {
|
||||
if !([_item, _vehicle, _showHint] call FUNC(loadItem)) exitWith {
|
||||
TRACE_1("no room to load item - deleting",_item);
|
||||
deleteVehicle _item;
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user