| 97 | } // namespace |
| 98 | |
| 99 | template <> 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 | |
| 110 | template <> const UString &StateObject<BattleUnit>::getPrefix() |
| 111 | { |
no test coverage detected