about summary refs log tree commit diff stats
diff options
context:
space:
mode:
-rw-r--r--Archipelago/client.gd6
-rw-r--r--Archipelago/load.gd12
-rw-r--r--Archipelago/notifier.gd14
-rw-r--r--data/LL1.yaml24
-rw-r--r--util/generate_gamedata.rb3
5 files changed, 58 insertions, 1 deletions
diff --git a/Archipelago/client.gd b/Archipelago/client.gd index 0326ffb..d7074f5 100644 --- a/Archipelago/client.gd +++ b/Archipelago/client.gd
@@ -540,6 +540,12 @@ func sendLocation(loc_id):
540 _held_locations.append(loc_id) 540 _held_locations.append(loc_id)
541 541
542 542
543func setValue(key, value):
544 sendMessage(
545 [{"cmd": "Set", "key": key, "operations": [{"operation": "replace", "value": value}]}]
546 )
547
548
543func completedGoal(): 549func completedGoal():
544 sendMessage([{"cmd": "StatusUpdate", "status": 30}]) # CLIENT_GOAL 550 sendMessage([{"cmd": "StatusUpdate", "status": 30}]) # CLIENT_GOAL
545 551
diff --git a/Archipelago/load.gd b/Archipelago/load.gd index 9568f69..052aa84 100644 --- a/Archipelago/load.gd +++ b/Archipelago/load.gd
@@ -267,12 +267,22 @@ func _load():
267 painting_node.move_to_z = painting_node.translation.z 267 painting_node.move_to_z = painting_node.translation.z
268 painting_node.translation.x = 88 268 painting_node.translation.x = 88
269 painting_node.translation.z = 39 269 painting_node.translation.z = 39
270 270
271 var fearless_door = get_node("Doors/Naps Room Doors/Door_hider_5").duplicate() 271 var fearless_door = get_node("Doors/Naps Room Doors/Door_hider_5").duplicate()
272 fearless_door.name = "Door_hider_new1" 272 fearless_door.name = "Door_hider_new1"
273 fearless_door.translation.y = 5 273 fearless_door.translation.y = 5
274 get_node("Doors/Naps Room Doors").add_child(fearless_door) 274 get_node("Doors/Naps Room Doors").add_child(fearless_door)
275 275
276 # Set up notifiers for each achievement panel, for the tracker.
277 var notifier_script = ResourceLoader.load("user://maps/Archipelago/notifier.gd")
278 for panel in gamedata.panels:
279 if "achievement" in panel:
280 var panel_node = panels_parent.get_node(panel["id"])
281 var script_instance = notifier_script.new()
282 script_instance.name = "Achievement_Notifier"
283 script_instance.key = "Achievement|%s" % panel["achievement"]
284 panel_node.add_child(script_instance)
285
276 # Attach a script to every panel so that we can do things like conditionally 286 # Attach a script to every panel so that we can do things like conditionally
277 # disable them. 287 # disable them.
278 var panel_script = ResourceLoader.load("user://maps/Archipelago/panel.gd") 288 var panel_script = ResourceLoader.load("user://maps/Archipelago/panel.gd")
diff --git a/Archipelago/notifier.gd b/Archipelago/notifier.gd new file mode 100644 index 0000000..57d6564 --- /dev/null +++ b/Archipelago/notifier.gd
@@ -0,0 +1,14 @@
1extends Node
2
3var key
4
5
6func _ready():
7 self.get_parent().get_node("Viewport/GUI/Panel/TextEdit").connect(
8 "answer_correct", self, "handle_correct"
9 )
10
11
12func handle_correct():
13 var apclient = global.get_node("Archipelago")
14 apclient.setValue(key, true)
diff --git a/data/LL1.yaml b/data/LL1.yaml index 268fb59..b8c1ef4 100644 --- a/data/LL1.yaml +++ b/data/LL1.yaml
@@ -1104,6 +1104,7 @@
1104- id: Countdown Panels/Panel_1234567890_wanderlust 1104- id: Countdown Panels/Panel_1234567890_wanderlust
1105 color: orange 1105 color: orange
1106 tag: midorange 1106 tag: midorange
1107 achievement: The Wanderer
1107- id: Tower Room/Panel_wanderlust_1234567890 1108- id: Tower Room/Panel_wanderlust_1234567890
1108 color: orange 1109 color: orange
1109 tag: midorange 1110 tag: midorange
@@ -2636,75 +2637,98 @@
2636- id: Countdown Panels/Panel_traveled_traveled 2637- id: Countdown Panels/Panel_traveled_traveled
2637 color: white 2638 color: white
2638 tag: forbid 2639 tag: forbid
2640 achievement: The Traveled
2639- id: Countdown Panels/Panel_disagreeable_agreeable 2641- id: Countdown Panels/Panel_disagreeable_agreeable
2640 color: black 2642 color: black
2641 tag: forbid 2643 tag: forbid
2644 achievement: The Agreeable
2642- id: Countdown Panels/Panel_seeker_seeker 2645- id: Countdown Panels/Panel_seeker_seeker
2643 color: white 2646 color: white
2644 tag: forbid 2647 tag: forbid
2648 achievement: The Seeker
2645- id: Countdown Panels/Panel_tenacious_tenacious 2649- id: Countdown Panels/Panel_tenacious_tenacious
2646 color: white 2650 color: white
2647 tag: forbid 2651 tag: forbid
2652 achievement: The Tenacious
2648- id: Countdown Panels/Panel_perceptive_perceptive 2653- id: Countdown Panels/Panel_perceptive_perceptive
2649 color: white 2654 color: white
2650 tag: forbid 2655 tag: forbid
2656 achievement: The Perceptive
2651- id: Countdown Panels/Panel_emboldened_bold 2657- id: Countdown Panels/Panel_emboldened_bold
2652 color: red 2658 color: red
2653 tag: forbid 2659 tag: forbid
2660 achievement: The Bold
2654- id: Countdown Panels/Panel_deterred_undeterred 2661- id: Countdown Panels/Panel_deterred_undeterred
2655 color: blue 2662 color: blue
2656 tag: forbid 2663 tag: forbid
2664 achievement: The Undeterred
2657- id: Countdown Panels/Panel_illuminated_initiated 2665- id: Countdown Panels/Panel_illuminated_initiated
2658 color: purple 2666 color: purple
2659 tag: forbid 2667 tag: forbid
2668 achievement: The Initiated
2660- id: Countdown Panels/Panel_discerning_scramble 2669- id: Countdown Panels/Panel_discerning_scramble
2661 color: yellow 2670 color: yellow
2662 tag: forbid 2671 tag: forbid
2672 achievement: The Discerning
2663- id: Countdown Panels/Panel_intelligent_wise 2673- id: Countdown Panels/Panel_intelligent_wise
2664 color: brown 2674 color: brown
2665 tag: forbid 2675 tag: forbid
2676 achievement: The Wise
2666- id: Countdown Panels/Panel_optimistic_optimistic 2677- id: Countdown Panels/Panel_optimistic_optimistic
2667 color: white 2678 color: white
2668 tag: forbid 2679 tag: forbid
2680 achievement: The Optimistic
2669- id: Countdown Panels/Panel_wondrous_wondrous 2681- id: Countdown Panels/Panel_wondrous_wondrous
2670 color: white 2682 color: white
2671 tag: forbid 2683 tag: forbid
2684 achievement: The Wondrous
2672- id: Countdown Panels/Panel_steady_steady 2685- id: Countdown Panels/Panel_steady_steady
2673 color: white 2686 color: white
2674 tag: forbid 2687 tag: forbid
2688 achievement: The Steady
2675- id: Countdown Panels/Panel_bearer_bearer 2689- id: Countdown Panels/Panel_bearer_bearer
2676 color: white 2690 color: white
2677 tag: forbid 2691 tag: forbid
2692 achievement: The Bearer
2678- id: Countdown Panels/Panel_colorful_colorful 2693- id: Countdown Panels/Panel_colorful_colorful
2679 color: white 2694 color: white
2680 tag: forbid 2695 tag: forbid
2696 achievement: The Colorful
2681- id: Countdown Panels/Panel_observant_observant 2697- id: Countdown Panels/Panel_observant_observant
2682 color: white 2698 color: white
2683 tag: forbid 2699 tag: forbid
2700 achievement: The Observant
2684- id: Countdown Panels/Panel_master_master 2701- id: Countdown Panels/Panel_master_master
2685 color: white 2702 color: white
2686 tag: forbid 2703 tag: forbid
2687- id: Countdown Panels/Panel_grandfathered_red 2704- id: Countdown Panels/Panel_grandfathered_red
2688 color: red 2705 color: red
2689 tag: forbid 2706 tag: forbid
2707 achievement: The Red
2690- id: Countdown Panels/Panel_ecstatic_ecstatic 2708- id: Countdown Panels/Panel_ecstatic_ecstatic
2691 color: yellow 2709 color: yellow
2692 tag: forbid 2710 tag: forbid
2711 achievement: The Ecstatic
2693- id: Countdown Panels/Panel_artistic_artistic 2712- id: Countdown Panels/Panel_artistic_artistic
2694 color: blue 2713 color: blue
2695 tag: forbid 2714 tag: forbid
2715 achievement: The Artistic
2696- id: Countdown Panels/Panel_incomparable_incomparable 2716- id: Countdown Panels/Panel_incomparable_incomparable
2697 color: white 2717 color: white
2698 tag: forbid 2718 tag: forbid
2719 achievement: The Incomparable
2699- id: Countdown Panels/Panel_fearless_fearless 2720- id: Countdown Panels/Panel_fearless_fearless
2700 color: white 2721 color: white
2701 tag: forbid 2722 tag: forbid
2723 achievement: The Fearless
2702- id: Countdown Panels/Panel_scientific_scientific 2724- id: Countdown Panels/Panel_scientific_scientific
2703 color: purple 2725 color: purple
2704 tag: forbid 2726 tag: forbid
2727 achievement: The Scientific
2705- id: Countdown Panels/Panel_challenged_unchallenged 2728- id: Countdown Panels/Panel_challenged_unchallenged
2706 color: black 2729 color: black
2707 tag: forbid 2730 tag: forbid
2731 achievement: The Unchallenged
2708- id: Master Room/Panel_mastery_mastery 2732- id: Master Room/Panel_mastery_mastery
2709 color: white 2733 color: white
2710 tag: midwhite 2734 tag: midwhite
diff --git a/util/generate_gamedata.rb b/util/generate_gamedata.rb index 5940480..3b57f76 100644 --- a/util/generate_gamedata.rb +++ b/util/generate_gamedata.rb
@@ -30,6 +30,9 @@ end.map do |panel|
30 end 30 end
31 ret["copy_to_sign"] = "[\"" + copytos.join("\",\"") + "\"]" 31 ret["copy_to_sign"] = "[\"" + copytos.join("\",\"") + "\"]"
32 end 32 end
33 if panel.include? "achievement"
34 ret["achievement"] = "\"#{panel["achievement"]}\""
35 end
33 ret 36 ret
34end.map do |panel| 37end.map do |panel|
35 "{" + panel.to_a.map do |element| 38 "{" + panel.to_a.map do |element|