Optional "cause" and "force" for entity.die()

User avatar
Mooncat
Smart Inserter
Smart Inserter
Posts: 1197
Joined: Wed May 18, 2016 4:55 pm
Contact:

Optional "cause" and "force" for entity.die()

Post by Mooncat »

Request:
Add optional parameters "cause" (The entity that did the killing if available) and "force" (The force that did the killing if any) to LuaEntity::die()

As we know LuaEntity::die() triggers on_entity_died automatically, but it currently does not support passing the cause and force to the event, hence we don't know who triggered LuaEntity::die(). Adding them as optional parameters can solve this problem. :D

Edit: oops, turns out EvoGUI isn't using on_entity_died for the kill counter. So this is not related to the problem. But I will leave it here in case someone find it useful. :P
Post Reply

Return to “Implemented mod requests”