20 #include "../Battlescape/Position.h" 21 #include <yaml-cpp/yaml.h> 26 enum NodeRank{NR_SCOUT=0, NR_XCOM, NR_SOLDIER, NR_NAVIGATOR, NR_LEADER, NR_ENGINEER, NR_MISC1, NR_MEDIC, NR_MISC2};
38 std::vector<int> _nodeLinks;
47 static const int CRAFTSEGMENT = 1000;
48 static const int UFOSEGMENT = 2000;
49 static const int TYPE_FLYING = 0x01;
50 static const int TYPE_SMALL = 0x02;
51 static const int TYPE_DANGEROUS = 0x04;
52 static const int nodeRank[8][7];
55 Node(
int id,
Position pos,
int segment,
int type,
int rank,
int flags,
int reserved,
int priority);
59 void load(
const YAML::Node& node);
61 YAML::Node
save()
const;
82 bool isAllocated()
const;
85 bool isTarget()
const;
86 void setDummy(
bool dummy);
int getID() const
get the node's id
Definition: Node.cpp:113
int getFlags() const
gets "flags" variable, which is really the patrolling desirability value
Definition: Node.h:79
bool operator<(Node &b) const
compares the _flags variables of the nodes (for the purpose of patrol decisions!) ...
Definition: Node.h:81
std::vector< int > * getNodeLinks()
get the node's paths
Definition: Node.cpp:155
void load(const YAML::Node &node)
Loads the node from YAML.
Definition: Node.cpp:73
~Node()
Cleans up the Node.
Definition: Node.cpp:48
int getPriority() const
Gets node's priority.
Definition: Node.cpp:131
NodeRank getRank() const
Gets node's rank.
Definition: Node.cpp:122
Node()
Creates a Node.
Definition: Node.cpp:25
int getSegment() const
Gets the node's segment.
Definition: Node.cpp:149
Position getPosition() const
Gets the node's position.
Definition: Node.cpp:140
Represents a node/spawnpoint in the battlescape, loaded from RMP files.
Definition: Node.h:32
void setType(int type)
Sets the node's type, surprisingly.
Definition: Node.cpp:189
Easy handling of X-Y-Z coordinates.
Definition: Position.h:28
YAML::Node save() const
Saves the node to YAML.
Definition: Node.cpp:92
int getType() const
Gets the node's type.
Definition: Node.cpp:164
Definition: BaseInfoState.cpp:40