From dfa10c8817746671b576bb99f9de3f60b4cf8706 Mon Sep 17 00:00:00 2001 From: Star Rauchenberger Date: Wed, 22 Oct 2025 23:51:44 -0400 Subject: Handle Icarus's paintings --- apworld/client/main.gd | 1 + apworld/client/paintingAuto.gd | 43 ++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 44 insertions(+) create mode 100644 apworld/client/paintingAuto.gd diff --git a/apworld/client/main.gd b/apworld/client/main.gd index e1f9610..3a62f81 100644 --- a/apworld/client/main.gd +++ b/apworld/client/main.gd @@ -43,6 +43,7 @@ func _ready(): installScriptExtension(runtime.load_script("keyHolderChecker.gd")) installScriptExtension(runtime.load_script("keyHolderResetterListener.gd")) installScriptExtension(runtime.load_script("painting.gd")) + installScriptExtension(runtime.load_script("paintingAuto.gd")) installScriptExtension(runtime.load_script("panel.gd")) installScriptExtension(runtime.load_script("pauseMenu.gd")) installScriptExtension(runtime.load_script("player.gd")) diff --git a/apworld/client/paintingAuto.gd b/apworld/client/paintingAuto.gd new file mode 100644 index 0000000..553c2c9 --- /dev/null +++ b/apworld/client/paintingAuto.gd @@ -0,0 +1,43 @@ +extends "res://scripts/nodes/paintingAuto.gd" + +var item_id +var item_amount + + +func _ready(): + var node_path = String( + get_tree().get_root().get_node("scene").get_path_to(self).get_concatenated_names() + ) + + var gamedata = global.get_node("Gamedata") + var door_id = gamedata.get_door_for_map_node_path(global.map, node_path) + if door_id != null: + var ap = global.get_node("Archipelago") + var item_lock = ap.get_item_id_for_door(door_id) + + if item_lock != null: + item_id = item_lock[0] + item_amount = item_lock[1] + + self.senders = [] + self.senderGroup = [] + self.nested = false + self.complete_at = 0 + self.max_length = 0 + self.excludeSenders = [] + + call_deferred("_readier") + + super._ready() + + if item_id != null and activate_on_sender_complete: + enabled = false + if not hide_particles: + get_node("Hinge/paintingColliders/TeleportParticles").emitting = false + + +func _readier(): + var ap = global.get_node("Archipelago") + + if ap.client.getItemAmount(item_id) >= item_amount: + handleTriggered() -- cgit 1.4.1