mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
Added cargo listenable and callable events
This commit is contained in:
parent
16add9d376
commit
e110874800
@ -4,6 +4,12 @@ class Extended_PreInit_EventHandlers {
|
||||
};
|
||||
};
|
||||
|
||||
class Extended_PostInit_EventHandlers {
|
||||
class ADDON {
|
||||
init = QUOTE(call COMPILE_FILE(XEH_postInit));
|
||||
};
|
||||
};
|
||||
|
||||
class Extended_Killed_EventHandlers {
|
||||
class All {
|
||||
init = QUOTE(call FUNC(handleDestroyed));
|
||||
|
4
addons/cargo/XEH_postInit.sqf
Normal file
4
addons/cargo/XEH_postInit.sqf
Normal file
@ -0,0 +1,4 @@
|
||||
#include "script_component.hpp"
|
||||
|
||||
["LoadItem", {_this call FUNC(loadItem)}] call EFUNC(common,addEventHandler);
|
||||
["UnloadItem", {_this call FUNC(unloadItem)}] call EFUNC(common,addEventHandler);
|
@ -34,4 +34,7 @@ detach _item;
|
||||
_item attachTo [_vehicle,[0,0,100]];
|
||||
["hideObjectGlobal", [_item, true]] call EFUNC(common,serverEvent);
|
||||
|
||||
// Invoke listenable event
|
||||
["cargo_itemLoaded", [_item, _vehicle]] call EFUNC(common,globalEvent);
|
||||
|
||||
true
|
||||
|
@ -62,4 +62,7 @@ _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);
|
||||
|
||||
true
|
||||
|
Loading…
Reference in New Issue
Block a user