This callback is called whenever a dropspenser dropspenses an item. A plugin may decide to disallow
the move by returning true.
Callback function
The default name for the callback function is OnDropSpense. It has the following signature:
function MyOnDropSpense(World, DropSpenser, SlotNum)
Parameters:
Name | Type | Notes |
World | cWorld | World where the dropspenser resides |
DropSpenser | cDropSpenserEntity | The dropspenser that is pulling the item |
SlotNum | number | The slot of the dropspensed item in the dropspenser's internal storage |
If the function returns false or no value, the next plugin's callback is called. If the function
returns true, no other callback is called for this event and the dropspenser will not dropspense the item.
Code examplesRegistering the callback
cPluginManager:AddHook(cPluginManager.HOOK_DROPSPENSE, MyOnDropSpense);
|