From 139ecb09dcb49177d1fa39baaf8e378e3009fc76 Mon Sep 17 00:00:00 2001 From: Star Rauchenberger Date: Thu, 18 Apr 2024 17:42:35 -0400 Subject: Reapply "Added support for warp items (including sunwarps)" This reverts commit 17572f8cd5945536eccffbbe832517d75993c03f. --- 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