diff options
Diffstat (limited to 'apworld')
| -rw-r--r-- | apworld/client/maps/control_center.gd | 22 |
1 files changed, 22 insertions, 0 deletions
| diff --git a/apworld/client/maps/control_center.gd b/apworld/client/maps/control_center.gd index fadfed9..92999d3 100644 --- a/apworld/client/maps/control_center.gd +++ b/apworld/client/maps/control_center.gd | |||
| @@ -74,6 +74,28 @@ func on_map_load(root): | |||
| 74 | old_door.queue_free() | 74 | old_door.queue_free() |
| 75 | root.get_node("/root/scene/Components/Doors").add_child.call_deferred(new_door) | 75 | root.get_node("/root/scene/Components/Doors").add_child.call_deferred(new_door) |
| 76 | 76 | ||
| 77 | # Display White Ending requirements. | ||
| 78 | var ending_count = 0 | ||
| 79 | var mastery_count = 0 | ||
| 80 | for key in unlocks.data: | ||
| 81 | if unlocks.data[key] == "unlocked": | ||
| 82 | if key.ends_with("_ending"): | ||
| 83 | ending_count += 1 | ||
| 84 | elif key.ends_with("_mastery"): | ||
| 85 | mastery_count += 1 | ||
| 86 | |||
| 87 | var sign_prefab = preload("res://objects/nodes/sign.tscn") | ||
| 88 | var sign1 = sign_prefab.instantiate() | ||
| 89 | sign1.position = Vector3(87.5, 5, -42.01) | ||
| 90 | sign1.text = "Endings: %d/%d" % [ending_count, ap.endings_requirement] | ||
| 91 | root.get_node("/root/scene").add_child.call_deferred(sign1) | ||
| 92 | |||
| 93 | var sign2 = sign_prefab.instantiate() | ||
| 94 | sign2.position = Vector3(87.5, 5, -15.99) | ||
| 95 | sign2.rotation_degrees.y = 180 | ||
| 96 | sign2.text = "Masteries: %d/%d" % [mastery_count, ap.masteries_requirement] | ||
| 97 | root.get_node("/root/scene").add_child.call_deferred(sign2) | ||
| 98 | |||
| 77 | 99 | ||
| 78 | func _set_up_mastery_listener(root, name): | 100 | func _set_up_mastery_listener(root, name): |
| 79 | var prefab = preload("res://objects/nodes/listeners/unlockReaderListener.tscn") | 101 | var prefab = preload("res://objects/nodes/listeners/unlockReaderListener.tscn") |
