diff options
-rw-r--r-- | Archipelago/load.gd | 9 | ||||
-rw-r--r-- | util/generate_gamedata.rb | 4 |
2 files changed, 12 insertions, 1 deletions
diff --git a/Archipelago/load.gd b/Archipelago/load.gd index 4c6c178..ce97918 100644 --- a/Archipelago/load.gd +++ b/Archipelago/load.gd | |||
@@ -115,7 +115,7 @@ func _load(): | |||
115 | var panels_parent = self.get_node("Panels") | 115 | var panels_parent = self.get_node("Panels") |
116 | var location_script = ResourceLoader.load("user://maps/Archipelago/location.gd") | 116 | var location_script = ResourceLoader.load("user://maps/Archipelago/location.gd") |
117 | for location_id in gamedata.panel_ids_by_location_id.keys(): | 117 | for location_id in gamedata.panel_ids_by_location_id.keys(): |
118 | if !(gamedata.classification_by_location_id[location_id] & apclient._location_classification_bit): | 118 | if not (gamedata.classification_by_location_id[location_id] & apclient._location_classification_bit): |
119 | continue | 119 | continue |
120 | 120 | ||
121 | var location = location_script.new() | 121 | var location = location_script.new() |
@@ -421,6 +421,13 @@ func _load(): | |||
421 | script_instance.key = "Achievement|%s" % panel["achievement"] | 421 | script_instance.key = "Achievement|%s" % panel["achievement"] |
422 | panel_node.add_child(script_instance) | 422 | panel_node.add_child(script_instance) |
423 | 423 | ||
424 | if "hunt" in panel and panel["hunt"] and not (gamedata.classification_by_location_id[panel["loc"]] & apclient._location_classification_bit): | ||
425 | var panel_node = panels_parent.get_node(panel["id"]) | ||
426 | var script_instance = notifier_script.new() | ||
427 | script_instance.name = "Hunt_Notifier" | ||
428 | script_instance.key = "Hunt|%d" % panel["loc"] | ||
429 | panel_node.add_child(script_instance) | ||
430 | |||
424 | # Attach a script to every panel so that we can do things like conditionally | 431 | # Attach a script to every panel so that we can do things like conditionally |
425 | # disable them. | 432 | # disable them. |
426 | var panel_script = ResourceLoader.load("user://maps/Archipelago/panel.gd") | 433 | var panel_script = ResourceLoader.load("user://maps/Archipelago/panel.gd") |
diff --git a/util/generate_gamedata.rb b/util/generate_gamedata.rb index e130572..5e03655 100644 --- a/util/generate_gamedata.rb +++ b/util/generate_gamedata.rb | |||
@@ -34,6 +34,7 @@ config.each do |room_name, room_data| | |||
34 | 34 | ||
35 | ret = {} | 35 | ret = {} |
36 | ret["id"] = "\"#{panel["id"]}\"" | 36 | ret["id"] = "\"#{panel["id"]}\"" |
37 | ret["loc"] = location_id | ||
37 | if panel.include? "colors" | 38 | if panel.include? "colors" |
38 | if panel["colors"].kind_of? String | 39 | if panel["colors"].kind_of? String |
39 | ret["color"] = "[\"#{panel["colors"]}\"]" | 40 | ret["color"] = "[\"#{panel["colors"]}\"]" |
@@ -62,6 +63,9 @@ config.each do |room_name, room_data| | |||
62 | if panel.include? "achievement" | 63 | if panel.include? "achievement" |
63 | ret["achievement"] = "\"#{panel["achievement"]}\"" | 64 | ret["achievement"] = "\"#{panel["achievement"]}\"" |
64 | end | 65 | end |
66 | if panel.include? "hunt" and panel["hunt"] | ||
67 | ret["hunt"] = "true" | ||
68 | end | ||
65 | panel_output << ret | 69 | panel_output << ret |
66 | 70 | ||
67 | panel_ids_by_location_id[location_id] = [panel["id"]] | 71 | panel_ids_by_location_id[location_id] = [panel["id"]] |