From 131844fc133e2b1c2a4fccaa8a8a542f10d47265 Mon Sep 17 00:00:00 2001 From: Star Rauchenberger Date: Sat, 25 Oct 2025 12:10:01 -0400 Subject: The Fuzzy is playable now --- apworld/client/allowNumbers.gd | 10 +++++++++ apworld/client/main.gd | 3 +++ apworld/client/manager.gd | 3 +++ apworld/client/player.gd | 50 ++++++++++++++++++++++++++++++++++++++++++ apworld/player_logic.py | 8 +++++++ apworld/static_logic.py | 1 + 6 files changed, 75 insertions(+) create mode 100644 apworld/client/allowNumbers.gd (limited to 'apworld') diff --git a/apworld/client/allowNumbers.gd b/apworld/client/allowNumbers.gd new file mode 100644 index 0000000..d958b50 --- /dev/null +++ b/apworld/client/allowNumbers.gd @@ -0,0 +1,10 @@ +extends "res://scripts/nodes/allowNumbers.gd" + + +func _readier(): + var ap = global.get_node("Archipelago") + var gamedata = global.get_node("Gamedata") + + var item_id = gamedata.objects.get_special_ids()["Numbers"] + if ap.client.getItemAmount(item_id) >= 1: + global.allow_numbers = true diff --git a/apworld/client/main.gd b/apworld/client/main.gd index a3b21c5..a543678 100644 --- a/apworld/client/main.gd +++ b/apworld/client/main.gd @@ -36,6 +36,7 @@ func _ready(): global.add_child(ap_instance) # Let's also inject any scripts we need to inject now. + installScriptExtension(runtime.load_script("allowNumbers.gd")) installScriptExtension(runtime.load_script("animationListener.gd")) installScriptExtension(runtime.load_script("collectable.gd")) installScriptExtension(runtime.load_script("door.gd")) @@ -86,6 +87,7 @@ func _ready(): unlocks.data["advanced_mastery"] = "" unlocks.data["charismatic_mastery"] = "" unlocks.data["crystalline_mastery"] = "" + unlocks.data["fuzzy_mastery"] = "" unlocks.data["icarus_mastery"] = "" unlocks.data["stellar_mastery"] = "" @@ -243,6 +245,7 @@ func startGame(): settings.worldport_fades = "never" clearResourceCache("res://objects/meshes/gridDoor.tscn") + clearResourceCache("res://objects/nodes/allowNumbers.tscn") clearResourceCache("res://objects/nodes/collectable.tscn") clearResourceCache("res://objects/nodes/door.tscn") clearResourceCache("res://objects/nodes/keyHolder.tscn") diff --git a/apworld/client/manager.gd b/apworld/client/manager.gd index 399d6a5..aa07559 100644 --- a/apworld/client/manager.gd +++ b/apworld/client/manager.gd @@ -261,6 +261,9 @@ func _process_item(item, amount): if item_id == gamedata.objects.get_special_ids()["A Job Well Done"]: update_job_well_done_sign() + if item_id == gamedata.objects.get_special_ids()["Numbers"] and global.map == "the_fuzzy": + global.allow_numbers = true + # Show a message about the item if it's new. if int(item["index"]) > _last_new_item: _last_new_item = int(item["index"]) diff --git a/apworld/client/player.gd b/apworld/client/player.gd index 9acb942..712a59b 100644 --- a/apworld/client/player.gd +++ b/apworld/client/player.gd @@ -25,6 +25,7 @@ func _ready(): _set_up_mastery_listener("advanced") _set_up_mastery_listener("charismatic") _set_up_mastery_listener("crystalline") + _set_up_mastery_listener("fuzzy") _set_up_mastery_listener("icarus") _set_up_mastery_listener("stellar") @@ -219,6 +220,29 @@ func _ready(): q_wpl.senders.append(NodePath("../QPanel")) giftmap_parent.add_child.call_deferred(q_wpl) + if ap.enable_gift_maps.has("The Fuzzy"): + var gongus_panel = panel_prefab.instantiate() + gongus_panel.name = "GongusPanel" + gongus_panel.answer = "gongus" + gongus_panel.position = Vector3(33.5, -260, 5.5) + giftmap_panel.proxies.append(NodePath("../GongusPanel")) + giftmap_parent.add_child.call_deferred(gongus_panel) + + var kiwi_panel = panel_prefab.instantiate() + kiwi_panel.name = "KiwiPanel" + kiwi_panel.answer = "kiwi" + kiwi_panel.position = Vector3(33.5, -270, 5.5) + giftmap_panel.proxies.append(NodePath("../KiwiPanel")) + giftmap_parent.add_child.call_deferred(kiwi_panel) + + var fuzzy_wpl = wpl_prefab.instantiate() + fuzzy_wpl.name = "FuzzyWpl" + fuzzy_wpl.exit = "the_fuzzy" + fuzzy_wpl.senders.append(NodePath("../GongusPanel")) + fuzzy_wpl.senders.append(NodePath("../KiwiPanel")) + fuzzy_wpl.complete_at = 1 + giftmap_parent.add_child.call_deferred(fuzzy_wpl) + if ap.enable_gift_maps.has("The Stellar"): var hatkirby_panel = panel_prefab.instantiate() hatkirby_panel.name = "HatkirbyPanel" @@ -505,6 +529,32 @@ func _ready(): saver.senderGroup.append(NodePath("/root/scene/Components/Collectables")) get_node("/root/scene").add_child.call_deferred(saver) + # Add the mastery to The Fuzzy. + if global.map == "the_fuzzy": + var collectable_prefab = preload("res://objects/nodes/collectable.tscn") + var saver_prefab = preload("res://objects/nodes/saver.tscn") + var usl_prefab = preload("res://objects/nodes/listeners/unlockSetterListener.tscn") + + var mastery = collectable_prefab.instantiate() + mastery.name = "collectable" + mastery.position = Vector3(0, 2, -20) + mastery.unlock_type = "smiley" + mastery.material_override = load("res://assets/materials/gold.material") + get_node("/root/scene/Components/Collectables").add_child.call_deferred(mastery) + + var usl = usl_prefab.instantiate() + usl.name = "unlockSetterListenerMastery" + usl.key = "fuzzy_mastery" + usl.value = "unlocked" + usl.senders.append(NodePath("/root/scene/Components/Collectables/collectable")) + get_node("/root/scene/Components").add_child.call_deferred(usl) + + var saver = saver_prefab.instantiate() + saver.name = "saver_collectables" + saver.type = "collectables" + saver.senderGroup.append(NodePath("/root/scene/Components/Collectables")) + get_node("/root/scene").add_child.call_deferred(saver) + # Add the mastery to The Stellar. if global.map == "the_stellar": var collectable_prefab = preload("res://objects/nodes/collectable.tscn") diff --git a/apworld/player_logic.py b/apworld/player_logic.py index e21e2c3..0cbcdec 100644 --- a/apworld/player_logic.py +++ b/apworld/player_logic.py @@ -241,6 +241,8 @@ class Lingo2PlayerLogic: return "The Charismatic" in world.options.enable_gift_maps.value elif game_map.name == "the_crystalline": return "The Crystalline" in world.options.enable_gift_maps.value + elif game_map.name == "the_fuzzy": + return "The Fuzzy" in world.options.enable_gift_maps.value elif game_map.name == "the_stellar": return "The Stellar" in world.options.enable_gift_maps.value @@ -256,6 +258,9 @@ class Lingo2PlayerLogic: if world.options.masteries_requirement > maximum_masteries: world.options.masteries_requirement.value = maximum_masteries + if "The Fuzzy" in world.options.enable_gift_maps.value: + self.real_items.append("Numbers") + if self.world.options.shuffle_doors: for progressive in world.static_logic.objects.progressives: for i in range(0, len(progressive.doors)): @@ -599,3 +604,6 @@ class Lingo2PlayerLogic: if needed > 0: reqs.letters[l] = max(reqs.letters.get(l, 0), needed) + + if any(l.isnumeric() for l in solution): + reqs.items.add("Numbers") diff --git a/apworld/static_logic.py b/apworld/static_logic.py index fb23e4c..8e07b82 100644 --- a/apworld/static_logic.py +++ b/apworld/static_logic.py @@ -68,6 +68,7 @@ class Lingo2StaticLogic: self.location_name_groups.setdefault("Keyholders", []).append(location_name) self.item_id_to_name[self.objects.special_ids["A Job Well Done"]] = "A Job Well Done" + self.item_id_to_name[self.objects.special_ids["Numbers"]] = "Numbers" for symbol_name in SYMBOL_ITEMS.values(): self.item_id_to_name[self.objects.special_ids[symbol_name]] = symbol_name -- cgit 1.4.1