19 #ifndef OPENXCOM_NODE_H
20 #define OPENXCOM_NODE_H
22 #include "../Battlescape/Position.h"
23 #include <yaml-cpp/yaml.h>
28 enum NodeRank{NR_SCOUT=0, NR_XCOM, NR_SOLDIER, NR_NAVIGATOR, NR_LEADER, NR_ENGINEER, NR_MISC1, NR_MEDIC, NR_MISC2};
40 std::vector<int> _nodeLinks;
48 static const int CRAFTSEGMENT = 1000;
49 static const int UFOSEGMENT = 2000;
50 static const int TYPE_FLYING = 0x01;
51 static const int TYPE_SMALL = 0x02;
52 static const int TYPE_DANGEROUS = 0x04;
53 static const int nodeRank[8][7];
56 Node(
int id,
Position pos,
int segment,
int type,
int rank,
int flags,
int reserved,
int priority);
60 void load(
const YAML::Node& node);
62 YAML::Node
save()
const;
83 bool isAllocated()
const;
86 bool isTarget()
const;
YAML::Node save() const
Saves the node to YAML.
Definition: Node.cpp:88
NodeRank getRank() const
Gets node's rank.
Definition: Node.cpp:117
int getType() const
Gets the node's type.
Definition: Node.cpp:159
int getSegment() const
Gets the node's segment.
Definition: Node.cpp:144
std::vector< int > * getNodeLinks()
get the node's paths
Definition: Node.cpp:150
void load(const YAML::Node &node)
Loads the node from YAML.
Definition: Node.cpp:70
int getFlags()
gets "flags" variable, which is really the patrolling desirability value
Definition: Node.h:80
~Node()
Cleans up the Node.
Definition: Node.cpp:48
int getID() const
get the node's id
Definition: Node.cpp:108
Node()
Creates a Node.
Definition: Node.cpp:25
int getPriority() const
Gets node's priority.
Definition: Node.cpp:126
const Position & getPosition() const
Gets the node's position.
Definition: Node.cpp:135
bool operator<(Node &b)
compares the _flags variables of the nodes (for the purpose of patrol decisions!) ...
Definition: Node.h:82
Represents a node/spawnpoint in the battlescape, loaded from RMP files.
Definition: Node.h:34
void setType(int type)
Sets the node's type, surprisingly.
Definition: Node.cpp:184
Easy handling of X-Y-Z coordinates.
Definition: Position.h:30