mirror of
https://github.com/minetest-mods/nether.git
synced 2025-07-02 16:30:36 +02:00
Unlinks target portal if it's linked to a different portal
This is effectively a missing part to the change that made locate_or_build_portal() enforce that portals only link together in mutual pairs. As target portals that didn't need to be located or built we not being updated to link back to where the player travelled from. Also * implements events: on_run_wormhole, on_extinguish * adds a lot of debug info
This commit is contained in:
@ -96,9 +96,13 @@ Used by `nether.register_portal`.
|
||||
-- If orientation is not specified then the orientation of the realm
|
||||
-- portal will be used.
|
||||
|
||||
on_run_wormhole,
|
||||
on_ignite,
|
||||
on_extinguish,
|
||||
on_player_teleported,
|
||||
on_created
|
||||
on_run_wormhole = function(portalDef, anochorPos, orientation)
|
||||
-- invoked once per second per portal
|
||||
on_extinguish = function(portalDef, anochorPos, orientation)
|
||||
-- invoked when a portal is extinguished, including when the portal
|
||||
-- it connected to was extinguished.
|
||||
|
||||
todo: on_ignite = function(portalDef, anochorPos, orientation)
|
||||
todo: on_player_teleported = function(portalDef, oldPos, newPos)
|
||||
todo: on_created = function(portalDef, anochorPos, orientation)
|
||||
}
|
||||
|
Reference in New Issue
Block a user