MCPcopy Create free account
hub / github.com/OpenApoc/OpenApoc / get

Method get

game/state/battle/battleunit.cpp:99–108  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

97} // namespace
98
99template <> sp<BattleUnit> StateObject<BattleUnit>::get(const GameState &state, const UString &id)
100{
101 auto it = state.current_battle->units.find(id);
102 if (it == state.current_battle->units.end())
103 {
104 LogError("No agent_type matching ID \"%s\"", id);
105 return nullptr;
106 }
107 return it->second;
108}
109
110template <> const UString &StateObject<BattleUnit>::getPrefix()
111{

Callers 2

battleunit.cppFile · 0.45
handleCollisionMethod · 0.45

Calls 1

endMethod · 0.80

Tested by

no test coverage detected