#ifndef TOOLS_VALIDATOR_GODOT_PROCESSOR_H_ #define TOOLS_VALIDATOR_GODOT_PROCESSOR_H_ #include namespace com::fourisland::lingo2_archipelago { struct CollectedInfo; void ProcessGodotData(const std::string& repodir, CollectedInfo& info); } // namespace com::fourisland::lingo2_archipelago #endif /* TOOLS_VALIDATOR_GODOT_PROCESSOR_H_ */ s://git.fourisland.com/lingo2-archipelago' title='lingo2-archipelago Git repository'/>
about summary refs log tree commit diff stats
blob: 5b51c57a91d72d3f3b2fabb17a8e9c3f3ccf08f0 (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
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
#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