Official support for event based teleportation handling between mods.
Details
Several mods like Picker Dollies or Warptorio 2 allow the player to teleport/move existing entities. However due to lack of an "official" event for this everyone implements their own undocumented remote interface for sharing event ids which makes it difficult for other mod authors to support "moving" as a generic function.
Expected
Ideally it would be awesome if LuaEntity.teleport() also supported "{raise_teleported=true}" style equivalent to LuaSurface.create_entity. The event could look something like this:
Code: Select all
on_entity_teleported or script_raised_teleported
Called after an entity was teleported.
Contains
entity :: LuaEntity
source_position :: Position
source_surface :: LuaSurface
player_index :: uint (optional): The player that caused the teleporting.