Lua Hooks to disable drops from players#8485
Lua Hooks to disable drops from players#8485Trihedraf wants to merge 1 commit intodiasurgical:masterfrom
Conversation
StephenCWills
left a comment
There was a problem hiding this comment.
Interesting how you can't use these functions to force a player to drop their items in PvP, for example. They were clearly designed with a laser-focused goal in mind. Since the call site is the same for all three events, I wonder if it wouldn't be better to somehow consolidate these into a single OnPlayerDeath() function call. You could pass the three boolean values in and let the Lua functions tweak them instead of making assumptions about the purpose of the Lua script.
That's a really good idea, making the lua events as high level as possible. |
Adds lua hooks for players to disable drops on death.
events.OnPlayerDeathDropEar
events.OnPlayerDeathDropGold
events.OnPlayerDeathDropItem
Example lua mod that disables dropping items on death.