diff options
Diffstat (limited to 'client/Archipelago/player.gd')
| -rw-r--r-- | client/Archipelago/player.gd | 73 |
1 files changed, 0 insertions, 73 deletions
| diff --git a/client/Archipelago/player.gd b/client/Archipelago/player.gd deleted file mode 100644 index 46b5940..0000000 --- a/client/Archipelago/player.gd +++ /dev/null | |||
| @@ -1,73 +0,0 @@ | |||
| 1 | extends "res://scripts/nodes/player.gd" | ||
| 2 | |||
| 3 | |||
| 4 | func _ready(): | ||
| 5 | var ap = global.get_node("Archipelago") | ||
| 6 | var gamedata = global.get_node("Gamedata") | ||
| 7 | |||
| 8 | var map_id = gamedata.map_id_by_name.get(global.map) | ||
| 9 | for door in gamedata.objects.get_doors(): | ||
| 10 | if door.get_map_id() != map_id: | ||
| 11 | continue | ||
| 12 | |||
| 13 | if not door.has_ap_id(): | ||
| 14 | continue | ||
| 15 | |||
| 16 | if door.get_type() == gamedata.SCRIPT_proto.DoorType.ITEM_ONLY: | ||
| 17 | continue | ||
| 18 | |||
| 19 | var locationListener = ap.SCRIPT_locationListener.new() | ||
| 20 | locationListener.location_id = door.get_ap_id() | ||
| 21 | locationListener.name = "locationListener_%d" % door.get_ap_id() | ||
| 22 | |||
| 23 | for panel_ref in door.get_panels(): | ||
| 24 | var panel_data = gamedata.objects.get_panels()[panel_ref.get_panel()] | ||
| 25 | var panel_path = panel_data.get_path() | ||
| 26 | |||
| 27 | if panel_ref.has_answer(): | ||
| 28 | for proxy in panel_data.get_proxies(): | ||
| 29 | if proxy.get_answer() == panel_ref.get_answer(): | ||
| 30 | panel_path = proxy.get_path() | ||
| 31 | break | ||
| 32 | |||
| 33 | locationListener.senders.append(NodePath("/root/scene/" + panel_path)) | ||
| 34 | |||
| 35 | get_parent().add_child.call_deferred(locationListener) | ||
| 36 | |||
| 37 | for letter in gamedata.objects.get_letters(): | ||
| 38 | var room = gamedata.objects.get_rooms()[letter.get_room_id()] | ||
| 39 | if room.get_map_id() != map_id: | ||
| 40 | continue | ||
| 41 | |||
| 42 | var locationListener = ap.SCRIPT_locationListener.new() | ||
| 43 | locationListener.location_id = letter.get_ap_id() | ||
| 44 | locationListener.name = "locationListener_%d" % letter.get_ap_id() | ||
| 45 | locationListener.senders.append(NodePath("/root/scene/" + letter.get_path())) | ||
| 46 | |||
| 47 | get_parent().add_child.call_deferred(locationListener) | ||
| 48 | |||
| 49 | for mastery in gamedata.objects.get_masteries(): | ||
| 50 | var room = gamedata.objects.get_rooms()[mastery.get_room_id()] | ||
| 51 | if room.get_map_id() != map_id: | ||
| 52 | continue | ||
| 53 | |||
| 54 | var locationListener = ap.SCRIPT_locationListener.new() | ||
| 55 | locationListener.location_id = mastery.get_ap_id() | ||
| 56 | locationListener.name = "locationListener_%d" % mastery.get_ap_id() | ||
| 57 | locationListener.senders.append(NodePath("/root/scene/" + mastery.get_path())) | ||
| 58 | |||
| 59 | get_parent().add_child.call_deferred(locationListener) | ||
| 60 | |||
| 61 | for ending in gamedata.objects.get_endings(): | ||
| 62 | var room = gamedata.objects.get_rooms()[ending.get_room_id()] | ||
| 63 | if room.get_map_id() != map_id: | ||
| 64 | continue | ||
| 65 | |||
| 66 | var locationListener = ap.SCRIPT_locationListener.new() | ||
| 67 | locationListener.location_id = ending.get_ap_id() | ||
| 68 | locationListener.name = "locationListener_%d" % ending.get_ap_id() | ||
| 69 | locationListener.senders.append(NodePath("/root/scene/" + ending.get_path())) | ||
| 70 | |||
| 71 | get_parent().add_child.call_deferred(locationListener) | ||
| 72 | |||
| 73 | super._ready() | ||
