about summary refs log tree commit diff stats
path: root/data/maps/four_rooms/doors.txtpb
blob: f0bf060b5adde819498c5a4c0e8d34a483605593 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
doors {
  name: "Intensify Door"
  type: STANDARD
  receivers: "Components/Doors/entry_1"
  panels { room: "Intensify Room" name: "SMALL" }
  panels { room: "Intensify Room" name: "LIKE" }
  panels { room: "Intensify Room" name: "LARGE" }
  panels { room: "Intensify Room" name: "TERROR" }
  panels { room: "Intensify Room" name: "BETTER" }
  panels { room: "Intensify Room" name: "TURN" }
  panels { room: "Intensify Room" name: "INJURY" }
  panels { room: "Intensify Room" name: "SWAY" }
  location_room: "Intensify Room"
}
doors {
  name: "Examples Door"
  type: STANDARD
  receivers: "Components/Doors/entry_2"
  panels { room: "Examples Room" name: "SIZE (1)" }
  panels { room: "Examples Room" name: "EMOTION (1)" }
  panels { room: "Examples Room" name: "SIZE (2)" }
  panels { room: "Examples Room" name: "EMOTION (2)" }
  panels { room: "Examples Room" name: "SUPERLATIVE" }
  panels { room: "Examples Room" name: "SONNET" }
  panels { room: "Examples Room" name: "URN" }
  panels { room: "Examples Room" name: "ART" }
  location_room: "Examples Room"
}
doors {
  name: "Synonyms Door"
  type: STANDARD
  receivers: "Components/Doors/entry_3"
  panels { room: "Synonyms Room" name: "MINUTE" }
  panels { room: "Synonyms Room" name: "ADORE" }
  panels { room: "Synonyms Room" name: "MASSIVE" }
  panels { room: "Synonyms Room" name: "FRIGHT" }
  panels { room: "Synonyms Room" name: "SURPASS" }
  panels { room: "Synonyms Room" name: "VERSE" }
  panels { room: "Synonyms Room" name: "SERIOUS" }
  panels { room: "Synonyms Room" name: "FURY" }
  location_room: "Synonyms Room"
}
doors {
  name: "Time Door"
  type: STANDARD
  receivers: "Components/Doors/entry_4"
  panels { room: "Time Room" name: "BROODING" }
  panels { room: "Time Room" name: "CARE" }
  panels { room: "Time Room" name: "LIFE" }
  panels { room: "Time Room" name: "SUSPENSE" }
  panels { room: "Time Room" name: "PRACTICE" }
  panels { room: "Time Room" name: "WRITING" }
  panels { room: "Time Room" name: "HOLE" }
  panels { room: "Time Room" name: "RHYTHM" }
  location_room: "Time Room"
}
doors {
  name: "A2 Door"
  type: STANDARD
  receivers: "Components/Doors/entry_6"
  panels { room: "Hallway" name: "SUSPICION" }
  location_room: "Hallway"
}
doors {
  name: "Keyholder Door"
  type: STANDARD
  receivers: "Components/Doors/entry_5"
  panels { room: "Hallway" name: "HUNCHBACK" }
  location_room: "Hallway"
}
n> new_region) new_location.access_rule = make_location_lambda(location.reqs, world) new_region.locations.append(new_location) for event_name, item_name in world.player_logic.event_loc_item_by_room.get(room.id, {}).items(): new_location = Lingo2Location(world.player, event_name, None, new_region) event_item = Lingo2Item(item_name, ItemClassification.progression, None, world.player) new_location.place_locked_item(event_item) new_region.locations.append(new_location) return new_region def create_regions(world: "Lingo2World"): regions = { "Menu": Region("Menu", world.player, world.multiworld) } for room in world.static_logic.objects.rooms: region = create_region(room, world) regions[region.name] = region regions["Menu"].connect(regions["The Entry - Starting Room"], "Start Game") # TODO: The requirements of the opposite trigger also matter. for connection in world.static_logic.objects.connections: if connection.roof_access and not world.options.daedalus_roof_access: continue from_region = world.static_logic.get_room_region_name(connection.from_room) to_region = world.static_logic.get_room_region_name(connection.to_room) connection_name = f"{from_region} -> {to_region}" reqs = AccessRequirements() if connection.HasField("required_door"): reqs.merge(world.player_logic.get_door_open_reqs(connection.required_door)) door = world.static_logic.objects.doors[connection.required_door] wmap = world.static_logic.objects.maps[door.map_id] connection_name = f"{connection_name} (using {wmap.name} - {door.name})" if connection.HasField("port"): port = world.static_logic.objects.ports[connection.port] connection_name = f"{connection_name} (via port {port.name})" if port.HasField("required_door"): reqs.merge(world.player_logic.get_door_open_reqs(port.required_door)) if connection.HasField("painting"): painting = world.static_logic.objects.paintings[connection.painting] connection_name = f"{connection_name} (via painting {painting.name})" if painting.HasField("required_door"): reqs.merge(world.player_logic.get_door_open_reqs(painting.required_door)) if connection.HasField("panel"): proxy = connection.panel reqs.merge(world.player_logic.get_panel_reqs(proxy.panel, proxy.answer if proxy.HasField("answer") else None)) panel = world.static_logic.objects.panels[proxy.panel] if proxy.HasField("answer"): connection_name = f"{connection_name} (via panel {panel.name}/{proxy.answer})" else: connection_name = f"{connection_name} (via panel {panel.name})" if from_region in regions and to_region in regions: connection = Entrance(world.player, connection_name, regions[from_region]) connection.access_rule = make_location_lambda(reqs, world) regions[from_region].exits.append(connection) connection.connect(regions[to_region]) for region in reqs.rooms: world.multiworld.register_indirect_condition(regions[region], connection) world.multiworld.regions += regions.values()