From b2b098573ef5bcd03d61e827d11b969460d992af Mon Sep 17 00:00:00 2001 From: Star Rauchenberger Date: Wed, 31 Jan 2024 15:23:08 -0500 Subject: Added support for warp items (including sunwarps) --- Archipelago/teleport.gd | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 Archipelago/teleport.gd (limited to 'Archipelago/teleport.gd') diff --git a/Archipelago/teleport.gd b/Archipelago/teleport.gd new file mode 100644 index 0000000..d322722 --- /dev/null +++ b/Archipelago/teleport.gd @@ -0,0 +1,24 @@ +extends "res://scripts/teleport.gd" + +var _unlocked = true + + +func _ready(): + var apclient = global.get_node("Archipelago") + if apclient._door_shuffle and !apclient.warpIsVanilla(self.get_parent().name + "/" + self.name): + if self.get_parent().name == "Teleporter Warps": + if apclient._sunwarp_access != apclient.kSUNWARP_ACCESS_NORMAL: + _unlocked = false + else: + _unlocked = false + + ._ready() + + +func _body_entered(var body): + if _unlocked: + ._body_entered(body) + + +func unlock_warp(): + _unlocked = true -- cgit 1.4.1