Implement Dropspenser Hook (#4903)
* Implement Dropspenser Hook Implemented a hook for dropspensing. HOOK_DROPSPENSE When plugin callback returns true then dropspense is cancelled * Update src/Bindings/PluginManager.h Co-authored-by: peterbell10 <peterbell10@live.co.uk> * Create OnDropSpense.lua * Fix indent * Forgot include Forgot to include the plugin manager. Although now im confused why it was working on my end without including the plugin manager * Update plugins.lua with dropspense * fix typos * haha notepad++ go brr Co-authored-by: peterbell10 <peterbell10@live.co.uk>
This commit is contained in:
committed by
GitHub
parent
0a1bf06c6f
commit
23bca00831
@@ -613,6 +613,19 @@ bool cPluginManager::CallHookHopperPushingItem(cWorld & a_World, cHopperEntity &
|
||||
|
||||
|
||||
|
||||
bool cPluginManager::CallHookDropSpense(cWorld & a_World, cDropSpenserEntity & a_DropSpenser, int a_SlotNum)
|
||||
{
|
||||
return GenericCallHook(HOOK_DROPSPENSE, [&](cPlugin * a_Plugin)
|
||||
{
|
||||
return a_Plugin->OnDropSpense(a_World, a_DropSpenser, a_SlotNum);
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
bool cPluginManager::CallHookKilled(cEntity & a_Victim, TakeDamageInfo & a_TDI, AString & a_DeathMessage)
|
||||
{
|
||||
return GenericCallHook(HOOK_KILLED, [&](cPlugin * a_Plugin)
|
||||
|
||||
Reference in New Issue
Block a user