about summary refs log tree commit diff stats
path: root/tools/util/godot_scene.h
blob: 17f3f508edc1189b279fe228d6bbe575e1dba7fe (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
#ifndef TOOLS_UTIL_TSCN_H_
#define TOOLS_UTIL_TSCN_H_

#include <map>
#include <memory>
#include <string>
#include <utility>
#include <variant>
#include <vector>

namespace com::fourisland::lingo2_archipelago {

struct GodotExtResource {
  std::string type;
  std::string path;
};

struct GodotExtResourceRef {
  std::string id;
};

using GodotInstanceType = std::variant<std::monostate, GodotExtResourceRef>;

struct GodotNode {
  std::string name;
  std::string parent;
  GodotInstanceType instance_type;

  std::string GetPath() const;
};

class GodotScene {
 public:
  GodotScene(std::map<std::string, GodotExtResource> ext_resources,
             std::vector<GodotNode> nodes)
      : ext_resources_(std::move(ext_resources)), nodes_(std::move(nodes)) {}

  const GodotExtResource* GetExtResource(const std::string& id) const {
    auto it = ext_resources_.find(id);
    if (it != ext_resources_.end()) {
      return &it->second;
    } else {
      return nullptr;
    }
  }
  const std::vector<GodotNode>& GetNodes() const { return nodes_; }

 private:
  std::map<std::string, GodotExtResource> ext_resources_;
  std::vector<GodotNode> nodes_;
};

GodotScene ReadGodotSceneFromFile(const std::string& path);

}  // namespace com::fourisland::lingo2_archipelago

#endif /* TOOLS_UTIL_TSCN_H_ */
href='#n484'>484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506
# The following doors open after solving the puzzles on both sides of the door,
# and thus they don't impact logic:
# - Secret Doors/northwest_1
# - Secret Doors/northwest_5
# - Secret Doors/northeast_4
# - Secret Doors/northeast_3
# - Secret Doors/northeast_5 (assuming the adjacent door is vanilla)
# - Secret Doors/northeast_8
# - Secret Doors/northeast_9
# - Secret Doors/northeast_15
# - Secret Doors/northeast_10
# - Secret Doors/northeast_11
# - Secret Doors/northwest_9
# - Secret Doors/northeast_2
# - Secret Doors/southwest_2
# - Secret Doors/southwest_3
# - Secret Doors/southwest_7
# - Secret Doors/southwest_8
# - Secret Doors/southwest_11
# - Secret Doors/southwest_19
# - Secret Doors/southwest_12 (assuming Discovery Room entrances are vanilla)
# - Secret Doors/southwest_15
# - Secret Doors/southwest_14
# - Secret Doors/southeast_2
doors {
  name: "Yellow Room Left Door"
  type: EVENT
  panels { room: "Central Connected Area" name: "HEROINE" }
  panels { room: "Central Connected Area" name: "KNIGHT" }
  panels { room: "Central Connected Area" name: "HATCHLING" }
  panels { room: "Central Connected Area" name: "WALTZ" }
}
doors {
  name: "Yellow Room Right Door"
  type: EVENT
  panels { room: "Central Connected Area" name: "NIGHTMARE" }
  panels { room: "Central Connected Area" name: "ESCAPE" }
  panels { room: "Central Connected Area" name: "HID" }
  panels { room: "Central Connected Area" name: "SEEK" }
}
doors {
  name: "Yellow Room Puzzles"
  type: LOCATION_ONLY
  panels { room: "Central Connected Area" name: "HEROINE" }
  panels { room: "Central Connected Area" name: "KNIGHT" }
  panels { room: "Central Connected Area" name: "HATCHLING" }
  panels { room: "Central Connected Area" name: "WALTZ" }
  panels { room: "Central Connected Area" name: "NIGHTMARE" }
  panels { room: "Central Connected Area" name: "ESCAPE" }
  panels { room: "Central Connected Area" name: "HID" }
  panels { room: "Central Connected Area" name: "SEEK" }
  panels { room: "Central Connected Area" name: "EWE" }
  panels { room: "Central Connected Area" name: "WILL" }
  panels { room: "Central Connected Area" name: "SHORE" }
  panels { room: "Central Connected Area" name: "GOT" }
  panels { room: "Central Connected Area" name: "LESS" }
  location_room: "Central Connected Area"
}
doors {
  name: "Northwest Corner Exit"
  type: EVENT
  panels { room: "White Corners" name: "ARCH" }
}
doors {
  name: "Northwest Corner Behind"
  type: EVENT
  panels { room: "White Corners" name: "ARCH" }
}
doors {
  name: "Missing 2 Blocker"
  type: EVENT
  panels { room: "Missing 1" name: "SING" }
}
doors {
  name: "Triplet Blocker"
  type: EVENT
  panels { room: "Missing 2" name: "MISS" }
}
doors {
  name: "Daisy Alcove"
  type: EVENT
  panels { room: "Central Connected Area" name: "DAY" }
}
doors {
  name: "Missing 3 Blocker"
  type: EVENT
  panels { room: "Triplet Room" name: "ICE" }
  panels { room: "Triplet Room" name: "FILM" }
  panels { room: "Triplet Room" name: "ICE FILM" }
}
doors {
  name: "Northwest 6"
  type: EVENT
  # This technically does impact logic. It connects four rooms (Yellow Left,
  # Northwest Room, Jay Painting, and Star Rooms), but only panels from Star
  # Rooms and Northwest Room are needed to open it.
  panels { room: "Star Rooms" name: "BACK" }
  panels { room: "Northwest Room" name: "SEE" }
  panels { room: "Northwest Room" name: "ONES" }
  panels { room: "Northwest Room" name: "TIC" }
  panels { room: "Northwest Room" name: "RAT" }
  panels { room: "Northwest Room" name: "DATE" }
  panels { room: "Northwest Room" name: "DUG" }
  panels { room: "Northwest Room" name: "NONE" }
  panels { room: "Northwest Room" name: "HER" }
  panels { room: "Northwest Room" name: "DAM" }
}
doors {
  name: "Plaza Entrance Blocker"
  type: EVENT
  panels { room: "Plaza Entrance" name: "GEE" }
}
doors {
  name: "Southeast Room Circlet"
  type: EVENT
  panels { room: "Directions Room" name: "ABS" }
  panels { room: "Directions Room" name: "AM" }
  panels { room: "Directions Room" name: "LINGO" }
  panels { room: "Directions Room" name: "ATE" }
  panels { room: "Directions Room" name: "LUTE" }
  panels { room: "Directions Room" name: "FAN" }
  panels { room: "Directions Room" name: "BOLT" }
  panels { room: "Directions Room" name: "DUPE" }
  panels { room: "Directions Room" name: "LICE" }
  panels { room: "Directions Room" name: "FIND" }
  panels { room: "Directions Room" name: "REDS" }
  panels { room: "Directions Room" name: "END" }
  panels { room: "Directions Room" name: "RING" }
  panels { room: "Directions Room" name: "AFT" }
  panels { room: "Directions Room" name: "PANT" }
  panels { room: "Directions Room" name: "TIN" }
  panels { room: "Directions Room" name: "HAM" }
  panels { room: "Directions Room" name: "ATOM" }
}
doors {
  name: "Southeast Room 1"
  type: LOCATION_ONLY
  panels { room: "Directions Room" name: "ABS" }
  panels { room: "Directions Room" name: "AM" }
  panels { room: "Directions Room" name: "LINGO" }
  panels { room: "Directions Room" name: "ATE" }
  panels { room: "Directions Room" name: "LUTE" }
  panels { room: "Directions Room" name: "FAN" }
  panels { room: "Directions Room" name: "BOLT" }
  panels { room: "Directions Room" name: "DUPE" }
  panels { room: "Directions Room" name: "LICE" }
  location_room: "Directions Room"
}
doors {
  name: "Southeast Room 2"
  type: LOCATION_ONLY
  panels { room: "Directions Room" name: "FIND" }
  panels { room: "Directions Room" name: "REDS" }
  panels { room: "Directions Room" name: "END" }
  panels { room: "Directions Room" name: "RING" }
  panels { room: "Directions Room" name: "AFT" }
  panels { room: "Directions Room" name: "PANT" }
  panels { room: "Directions Room" name: "TIN" }
  panels { room: "Directions Room" name: "HAM" }
  panels { room: "Directions Room" name: "ATOM" }
  location_room: "Directions Room"
}
doors {
  name: "Red Eyes Blocker"
  type: EVENT
  panels { room: "Missing 3" name: "SIN" }
}
doors {
  name: "Blue Eyes Blocker"
  type: EVENT
  panels { room: "Missing 3" name: "SIN" }
}
doors {
  name: "East Room 1 Entrance"
  type: LOCATION_ONLY
  panels { room: "Central Connected Area" name: "PUNK" }
  panels { room: "Central Connected Area" name: "WILY" }
  panels { room: "Central Connected Area" name: "FUN (1)" }
  panels { room: "Central Connected Area" name: "DEUS" }
  panels { room: "Central Connected Area" name: "WIZ" }
  panels { room: "Central Connected Area" name: "HIM" }
  panels { room: "Central Connected Area" name: "WARD" }
  panels { room: "Central Connected Area" name: "CHIN" }
  panels { room: "Central Connected Area" name: "DING" }
  location_room: "Central Connected Area"
  location_name: "East Room 2"
}
doors {
  name: "East Room 1"
  type: LOCATION_ONLY
  panels { room: "East Room 1" name: "CHIN" }
  panels { room: "East Room 1" name: "HEAT" }
  panels { room: "East Room 1" name: "END" }
  panels { room: "East Room 1" name: "FLY" }
  panels { room: "East Room 1" name: "OUCH" }
  panels { room: "East Room 1" name: "HAG" }
  panels { room: "East Room 1" name: "TIN" }
  panels { room: "East Room 1" name: "RID" }
  panels { room: "East Room 1" name: "TUG" }
  location_room: "East Room 1"
}
doors {
  name: "Orange Alcove"
  type: EVENT
  panels { room: "Central Connected Area" name: "RANGE" }
}
doors {
  name: "Gray Alcove"
  type: EVENT
  panels { room: "Central Connected Area" name: "HAD" }
  panels { room: "Central Connected Area" name: "SOW" }
  panels { room: "Central Connected Area" name: "ARK" }
  panels { room: "Central Connected Area" name: "MET" }
}
doors {
  name: "Black Alcove"
  type: EVENT
  panels { room: "Star Rooms" name: "TURN" }
  panels { room: "Central Connected Area" name: "HAD" }
  panels { room: "Central Connected Area" name: "SOW" }
  panels { room: "Central Connected Area" name: "ARK" }
  panels { room: "Central Connected Area" name: "MET" }
}
doors {
  name: "Hero Room Entrance"
  type: LOCATION_ONLY
  panels { room: "Northeast Room 1" name: "HAT" }
  panels { room: "Northeast Room 1" name: "CON" }
  panels { room: "Northeast Room 1" name: "LEND" }
  panels { room: "Northeast Room 1" name: "ALE" }
  panels { room: "Northeast Room 1" name: "SIDE" }
  panels { room: "Northeast Room 1" name: "SIT" }
  panels { room: "Northeast Room 1" name: "ATE" }
  panels { room: "Northeast Room 1" name: "CAR" }
  panels { room: "Northeast Room 1" name: "SIR" }
  location_room: "Northeast Room 1"
  location_name: "Northeast Room 1"
}
doors {
  name: "Northeast Corner Behind"
  type: EVENT
  panels { room: "Northeast Room 1" name: "HAT" }
  panels { room: "Northeast Room 1" name: "CON" }
  panels { room: "Northeast Room 1" name: "LEND" }
  panels { room: "Northeast Room 1" name: "ALE" }
  panels { room: "Northeast Room 1" name: "SIDE" }
  panels { room: "Northeast Room 1" name: "SIT" }
  panels { room: "Northeast Room 1" name: "ATE" }
  panels { room: "Northeast Room 1" name: "CAR" }
  panels { room: "Northeast Room 1" name: "SIR" }
}
doors {
  name: "Jay Painting"
  type: LOCATION_ONLY
  panels { room: "Northwest Room" name: "SEE" }
  panels { room: "Northwest Room" name: "ONES" }
  panels { room: "Northwest Room" name: "TIC" }
  panels { room: "Northwest Room" name: "RAT" }
  panels { room: "Northwest Room" name: "DATE" }
  panels { room: "Northwest Room" name: "DUG" }
  panels { room: "Northwest Room" name: "NONE" }
  panels { room: "Northwest Room" name: "HER" }
  panels { room: "Northwest Room" name: "DAM" }
  location_room: "Northwest Room"
  location_name: "Northwest Room"
}
doors {
  name: "Cyan Alcove"
  type: EVENT
  panels { room: "Star Rooms" name: "CYANIDE" }
}
doors {
  name: "Northeast Room 1 Entrance"
  type: EVENT
  panels { room: "White Corners" name: "ZERO" }
}
doors {
  name: "Southwest Room 3 Entrance"
  type: EVENT
  panels { room: "White Corners" name: "WHEN" }
}
doors {
  name: "Southwest Corner Behind"
  type: LOCATION_ONLY
  panels { room: "Southwest Room 3" name: "RING" }
  panels { room: "Southwest Room 3" name: "MINE" }
  panels { room: "Southwest Room 3" name: "PAL" }
  panels { room: "Southwest Room 3" name: "PIT" }
  panels { room: "Southwest Room 3" name: "AGE" }
  panels { room: "Southwest Room 3" name: "MAZE" }
  panels { room: "Southwest Room 3" name: "URN" }
  panels { room: "Southwest Room 3" name: "HOST" }
  panels { room: "Southwest Room 3" name: "MUG" }
  location_room: "Southwest Room 3"
  location_name: "Southwest Room 3"
}
doors {
  name: "Southwest Room 2 Entrance"
  type: EVENT
  panels { room: "Missing 1" name: "SING" }
}
doors {
  name: "Brown Alcove"
  type: LOCATION_ONLY
  panels { room: "Southwest Room 2" name: "RAT" }
  panels { room: "Southwest Room 2" name: "EGO" }
  panels { room: "Southwest Room 2" name: "FIT" }
  panels { room: "Southwest Room 2" name: "GORY" }
  panels { room: "Southwest Room 2" name: "NINE" }
  panels { room: "Southwest Room 2" name: "RAIL" }
  panels { room: "Southwest Room 2" name: "CAT" }
  panels { room: "Southwest Room 2" name: "ION" }
  panels { room: "Southwest Room 2" name: "INN" }
  location_room: "Southwest Room 2"
  location_name: "Southwest Room 2"
}
doors {
  name: "Southwest 4"
  type: EVENT
  # This technically does impact logic. It connects four rooms (Southwest Room,
  # Southwest Room 3, Star Rooms, and Central Connected Area), but panels from
  # Central Connected Area are not required to open it.
  panels { room: "Star Rooms" name: "CYANIDE" }
  panels { room: "Southwest Room" name: "MAN" }
  panels { room: "Southwest Room" name: "ATE" }
  panels { room: "Southwest Room" name: "RAT (1)" }
  panels { room: "Southwest Room" name: "SON" }
  panels { room: "Southwest Room" name: "THEN" }
  panels { room: "Southwest Room" name: "RAT (2)" }
  panels { room: "Southwest Room" name: "TON" }
  panels { room: "Southwest Room" name: "SEA" }
  panels { room: "Southwest Room" name: "SEAL" }
  panels { room: "Southwest Room 3" name: "RING" }
  panels { room: "Southwest Room 3" name: "MINE" }
  panels { room: "Southwest Room 3" name: "PAL" }
  panels { room: "Southwest Room 3" name: "PIT" }
  panels { room: "Southwest Room 3" name: "AGE" }
  panels { room: "Southwest Room 3" name: "MAZE" }
  panels { room: "Southwest Room 3" name: "URN" }
  panels { room: "Southwest Room 3" name: "HOST" }
  panels { room: "Southwest Room 3" name: "MUG" }
}
doors {
  name: "Southwest Room"
  type: LOCATION_ONLY
  panels { room: "Southwest Room" name: "MAN" }
  panels { room: "Southwest Room" name: "ATE" }
  panels { room: "Southwest Room" name: "RAT (1)" }
  panels { room: "Southwest Room" name: "SON" }
  panels { room: "Southwest Room" name: "THEN" }
  panels { room: "Southwest Room" name: "RAT (2)" }
  panels { room: "Southwest Room" name: "TON" }
  panels { room: "Southwest Room" name: "SEA" }
  panels { room: "Southwest Room" name: "SEAL" }
  location_room: "Southwest Room"
}
doors {
  name: "Missing 1 Blocker"
  type: EVENT
  panels { room: "Southwest Room" name: "MAN" }
  panels { room: "Southwest Room" name: "ATE" }
  panels { room: "Southwest Room" name: "RAT (1)" }
  panels { room: "Southwest Room" name: "SON" }
  panels { room: "Southwest Room" name: "THEN" }
  panels { room: "Southwest Room" name: "RAT (2)" }
  panels { room: "Southwest Room" name: "TON" }
  panels { room: "Southwest Room" name: "SEA" }
  panels { room: "Southwest Room" name: "SEAL" }
  panels { room: "Discovery Room" name: "INDUCE" }
  panels { room: "Discovery Room" name: "OVER" }
  panels { room: "Discovery Room" name: "DICEY" }
  panels { room: "Discovery Room" name: "TROD" }
}
doors {
  name: "Discovery Room Entrance"
  type: EVENT
  panels { room: "Directions Room" name: "EAT" }
  panels { room: "Directions Room" name: "NOT" }
  panels { room: "Directions Room" name: "OUT" }
  panels { room: "Directions Room" name: "WET" }
}
doors {
  name: "Star Rooms West Entrance"
  type: EVENT
  panels { room: "Central Connected Area" name: "ALE" }
  panels { room: "Central Connected Area" name: "ACE" }
  panels { room: "Central Connected Area" name: "JET" }
  panels { room: "Central Connected Area" name: "MORE" }
  panels { room: "Central Connected Area" name: "FUN (2)" }
  panels { room: "Central Connected Area" name: "LOW" }
  panels { room: "Central Connected Area" name: "FOR" }
  panels { room: "Central Connected Area" name: "RED" }
}
doors {
  name: "Star Rooms South Entrance"
  type: EVENT
  panels { room: "Brown Alcove" name: "BROW" }
  panels { room: "Gray Alcove" name: "GRAVELY" }
  panels { room: "Central Connected Area" name: "BURROWING" }
  panels { room: "Central Connected Area" name: "RAY" }
}
doors {
  name: "Star Rooms North Entrance"
  type: EVENT
  panels { room: "Central Connected Area" name: "ALMOND" }
  panels { room: "Cyan Alcove" name: "CAN" }
}
doors {
  name: "Star Rooms East Entrance"
  type: EVENT
  panels { room: "Black Alcove" name: "LACK" }
  panels { room: "Orange Alcove" name: "ON" }
  panels { room: "Star Rooms" name: "BACK" }
  panels { room: "Central Connected Area" name: "RANGE" }
}
doors {
  name: "Northwest Room Entrance"
  type: EVENT
  panels { room: "Missing 1" name: "SING" }
}
doors {
  name: "South Left Painting"
  type: LOCATION_ONLY
  panels { room: "Central Connected Area" name: "SOY" }
  panels { room: "Central Connected Area" name: "RIM" }
  panels { room: "Central Connected Area" name: "GRACE" }
  panels { room: "Central Connected Area" name: "ICE" }
  panels { room: "Central Connected Area" name: "EON" }
  panels { room: "Central Connected Area" name: "SIT" }
  panels { room: "Central Connected Area" name: "CITY" }
  panels { room: "Central Connected Area" name: "SON (1)" }
  panels { room: "Central Connected Area" name: "URGE" }
  location_room: "Central Connected Area"
  location_name: "Northeast Room 2"
}
doors {
  name: "South Right Painting"
  type: EVENT
  panels { room: "Central Connected Area" name: "SOY" }
  panels { room: "Central Connected Area" name: "RIM" }
  panels { room: "Central Connected Area" name: "GRACE" }
  panels { room: "Central Connected Area" name: "ICE" }
  panels { room: "Central Connected Area" name: "EON" }
  panels { room: "Central Connected Area" name: "SIT" }
  panels { room: "Central Connected Area" name: "CITY" }
  panels { room: "Central Connected Area" name: "SON (1)" }
  panels { room: "Central Connected Area" name: "URGE" }
}
doors {
  name: "Southwest 6"
  type: EVENT
  # This is an alternate entrance to Discovery Room.
  panels { room: "Southwest Room" name: "MAN" }
  panels { room: "Southwest Room" name: "ATE" }
  panels { room: "Southwest Room" name: "RAT (1)" }
  panels { room: "Southwest Room" name: "SON" }
  panels { room: "Southwest Room" name: "THEN" }
  panels { room: "Southwest Room" name: "RAT (2)" }
  panels { room: "Southwest Room" name: "TON" }
  panels { room: "Southwest Room" name: "SEA" }
  panels { room: "Southwest Room" name: "SEAL" }
  panels { room: "Central Connected Area" name: "ALE" }
  panels { room: "Central Connected Area" name: "ACE" }
  panels { room: "Central Connected Area" name: "JET" }
  panels { room: "Central Connected Area" name: "MORE" }
}
doors {
  name: "Southeast Corner Exit"
  type: EVENT
  panels { room: "White Corners" name: "DAM" }
}
doors {
  name: "Mastery"
  type: EVENT
  panels { room: "Red Eyes" name: "RED EYES" }
  panels { room: "Blue Eyes" name: "BLUE EYES" }
}
doors {
  name: "Digital Entrance"
  type: STANDARD
  receivers: "Components/Doors/entry_1"
  panels { room: "Digital Entrance" name: "ORANGE" }
  location_room: "Digital Entrance"
}
doors {
  name: "Nuanced Entrance"
  type: STANDARD
  receivers: "Components/Doors/entry_2"
  panels { room: "Yellow Left" name: "SICKNESS" }
  location_room: "Yellow Left"
}
doors {
  name: "Bearer Entrance"
  type: STANDARD
  receivers: "Components/Doors/entry_5"
  panels { room: "Yellow Right" name: "HEALTH" }
  location_room: "Yellow Right"
}
doors {
  name: "Cyan Doors"
  type: EVENT
  receivers: "Components/Doors/entry_4"
  receivers: "Panels/Miscellaneous/entry_2/teleportListener"
  receivers: "Panels/Miscellaneous/entry_3/teleportListener"
  double_letters: true
}