1
0
Mirror von https://github.com/minetest-mods/nether.git synchronisiert 2026-01-02 20:25:19 +01: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
Dieser Commit ist enthalten in:
Treer
2019-07-17 23:07:05 +10:00
committet von SmallJoker
Ursprung 6401052f92
Commit 52b20925d5
2 geänderte Dateien mit 49 neuen und 9 gelöschten Zeilen

Datei anzeigen

@@ -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)
}