1
0

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:
KrystilizeNevaDies
2020-09-22 01:31:45 +10:00
committed by GitHub
parent 0a1bf06c6f
commit 23bca00831
9 changed files with 69 additions and 4 deletions

View File

@@ -790,6 +790,10 @@ cPluginManager.AddHook(cPluginManager.HOOK_CHAT, OnChatMessage);
{
Notes = "Called when a hopper is pushing an item into the container it is aimed at.",
},
HOOK_DROPSPENSE =
{
Notes = "Called when a {{cDropSpenserEntity|DropSpenser}} is dropspensing an {{cItem|item}}.",
},
HOOK_KILLED =
{
Notes = "Called when an entity has been killed.",