about summary refs log tree commit diff stats
path: root/data/maps/the_orb/rooms/B Room.txtpb
blob: 833c659bed861a839edf956ea25b1ebd55743e4f (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
name: "B Room"
display_name: "Orb"
letters {
  key: "b"
  path: "Components/Collectables/b"
}
paintings {
  name: "SPIRAL"
  path: "Meshes/spiral"
  # TODO: This is too high up to enter. It's also a hint painting.
  exit_only: true
}
# TODO: Should these two be independent for shuffling purposes, or always tied
# to the Main Area's port?
ports {
  name: "MID"
  path: "Components/Warps/worldport4"
  orientation: "south"
  # This port is in the room immediately after solving the B puzzles, which
  # means it seems like it would be inaccessible if you enter the map from the
  # painting or from the final port, but entering the O or R areas brings you
  # back to the beginning.
}
ports {
  name: "FINAL"
  path: "Components/Warps/worldport5"
  orientation: "south"
}
.String.Regex */ .highlight .s1 { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Single */ .highlight .ss { color: #aa6600; background-color: #fff0f0 } /* Literal.String.Symbol */ .highlight .bp { color: #003388 } /* Name.Builtin.Pseudo */ .highlight .fm { color: #0066bb; font-weight: bold } /* Name.Function.Magic */ .highlight .vc { color: #336699 } /* Name.Variable.Class */ .highlight .vg { color: #dd7700 } /* Name.Variable.Global */ .highlight .vi { color: #3333bb } /* Name.Variable.Instance */ .highlight .vm { color: #336699 } /* Name.Variable.Magic */ .highlight .il { color: #0000DD; font-weight: bold } /* Literal.Number.Integer.Long */
#include "identifiers.h"

#include <string>

#include "proto/human.pb.h"

namespace com::fourisland::lingo2_archipelago {

std::optional<RoomIdentifier> GetCompleteRoomIdentifier(
    RoomIdentifier identifier, std::optional<std::string> map_name) {
  if (!identifier.has_map()) {
    if (!map_name) {
      return std::nullopt;
    }
    identifier.set_map(*map_name);
  }
  return identifier;
}

std::optional<DoorIdentifier> GetCompleteDoorIdentifier(
    DoorIdentifier identifier, std::optional<std::string> map_name) {
  if (!identifier.has_map()) {
    if (!map_name) {
      return std::nullopt;
    }
    identifier.set_map(*map_name);
  }
  return identifier;
}

std::optional<PortIdentifier> GetCompletePortIdentifier(
    PortIdentifier identifier, std::optional<std::string> map_name,
    std::optional<std::string> room_name) {
  if (!identifier.has_map()) {
    if (!map_name) {
      return std::nullopt;
    }
    identifier.set_map(*map_name);
  }
  if (!identifier.has_room()) {
    if (!room_name) {
      return std::nullopt;
    }
    identifier.set_room(*room_name);
  }
  return identifier;
}

std::optional<PaintingIdentifier> GetCompletePaintingIdentifier(
    PaintingIdentifier identifier, std::optional<std::string> map_name,
    std::optional<std::string> room_name) {
  if (!identifier.has_map()) {
    if (!map_name) {
      return std::nullopt;
    }
    identifier.set_map(*map_name);
  }
  if (!identifier.has_room()) {
    if (!room_name) {
      return std::nullopt;
    }
    identifier.set_room(*room_name);
  }
  return identifier;
}

std::optional<PanelIdentifier> GetCompletePanelIdentifierWithoutAnswer(
    PanelIdentifier identifier, std::optional<std::string> map_name,
    std::optional<std::string> room_name) {
  if (!identifier.has_map()) {
    if (!map_name) {
      return std::nullopt;
    }
    identifier.set_map(*map_name);
  }
  if (!identifier.has_room()) {
    if (!room_name) {
      return std::nullopt;
    }
    identifier.set_room(*room_name);
  }
  identifier.clear_answer();
  return identifier;
}

std::optional<KeyholderIdentifier> GetCompleteKeyholderIdentifierWithoutKey(
    KeyholderIdentifier identifier, const std::string& map_name,
    std::optional<std::string> room_name) {
  if (!identifier.has_map()) {
    identifier.set_map(map_name);
  }
  if (!identifier.has_room()) {
    if (!room_name) {
      return std::nullopt;
    }
    identifier.set_room(*room_name);
  }
  identifier.clear_key();
  return identifier;
}

}  // namespace com::fourisland::lingo2_archipelago