MCPcopy Create free account
hub / github.com/OpenXcom/OpenXcom / save

Method save

src/Battlescape/AlienBAIState.cpp:104–118  ·  view source on GitHub ↗

* Saves the AI state to a YAML file. * @return YAML node. */

Source from the content-addressed store, hash-verified

102 * @return YAML node.
103 */
104YAML::Node AlienBAIState::save() const
105{
106 int fromNodeID = -1, toNodeID = -1;
107 if (_fromNode)
108 fromNodeID = _fromNode->getID();
109 if (_toNode)
110 toNodeID = _toNode->getID();
111
112 YAML::Node node;
113 node["fromNode"] = fromNodeID;
114 node["toNode"] = toNodeID;
115 node["AIMode"] = _AIMode;
116 node["wasHit"] = _wasHit;
117 return node;
118}
119
120/**
121 * Enters the current AI state.

Callers

nothing calls this directly

Calls 1

getIDMethod · 0.80

Tested by

no test coverage detected