Renamed cargo events

This commit is contained in:
jonpas 2015-08-22 16:45:50 +02:00
parent 583682396f
commit 18f5a2ca94
5 changed files with 8 additions and 8 deletions

View File

@ -1,5 +1,5 @@
#include "script_component.hpp"
["LoadItem", {_this call FUNC(loadItem)}] call EFUNC(common,addEventHandler);
["UnloadItem", {_this call FUNC(unloadItem)}] call EFUNC(common,addEventHandler);
["AddCargoItem", {_this call FUNC(addCargoItem)}] call EFUNC(common,addEventHandler);
["LoadCargo", {_this call FUNC(loadItem)}] call EFUNC(common,addEventHandler);
["UnloadCargo", {_this call FUNC(unloadItem)}] call EFUNC(common,addEventHandler);
["AddCargoByClass", {_this call FUNC(addCargoItem)}] call EFUNC(common,addEventHandler);

View File

@ -11,7 +11,7 @@
* None
*
* Example:
* ["item", vehicle] call ace_cargo_fnc_addItem
* ["item", vehicle] call ace_cargo_fnc_addCargoItem
*
* Public: No
*/
@ -34,5 +34,5 @@ for "_i" from 1 to _amount do {
};
// Invoke listenable event
["cargo_itemAdded", [_itemClass, _vehicle, _amount]] call EFUNC(common,globalEvent);
["cargoAddedByClass", [_itemClass, _vehicle, _amount]] call EFUNC(common,globalEvent);
};

View File

@ -25,7 +25,7 @@ _initializedClasses = GETMVAR(GVAR(initializedClasses),[]);
if (isServer) then {
{
if (isClass _x) then {
["AddCargoItem", [getText (_x >> "type"), _vehicle, getNumber (_x >> "amount")]] call EFUNC(common,localEvent);
["AddCargoByClass", [getText (_x >> "type"), _vehicle, getNumber (_x >> "amount")]] call EFUNC(common,localEvent);
};
} count ("true" configClasses (configFile >> "CfgVehicles" >> _type >> "ACE_Cargo" >> "Cargo"));
};

View File

@ -35,6 +35,6 @@ _item attachTo [_vehicle,[0,0,100]];
["hideObjectGlobal", [_item, true]] call EFUNC(common,serverEvent);
// Invoke listenable event
["cargo_itemLoaded", [_item, _vehicle]] call EFUNC(common,globalEvent);
["cargoLoaded", [_item, _vehicle]] call EFUNC(common,globalEvent);
true

View File

@ -63,6 +63,6 @@ _item setPosASL (_emptyPos call EFUNC(common,PositiontoASL));
// TOOO maybe drag/carry the unloaded item?
// Invoke listenable event
["cargo_itemUnloaded", [_item, _vehicle]] call EFUNC(common,globalEvent);
["cargoUnloaded", [_item, _vehicle]] call EFUNC(common,globalEvent);
true