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

Function loadBattleBase

game/ui/city/basedefensescreen.cpp:19–36  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

17namespace
18{
19std::shared_future<void> loadBattleBase(sp<GameState> state, StateRef<Base> base,
20 StateRef<Organisation> attacker)
21{
22 auto loadTask = fw().threadPoolEnqueue([base, state, attacker]() -> void {
23 std::list<StateRef<Agent>> agents;
24 StateRef<Vehicle> veh = {};
25
26 bool hotseat = false;
27 const std::map<StateRef<AgentType>, int> *aliens = nullptr;
28 const int *guards = nullptr;
29 const int *civilians = nullptr;
30
31 Battle::beginBattle(*state, hotseat, attacker, agents, aliens, guards, civilians, veh,
32 base->building);
33 });
34
35 return loadTask;
36}
37} // namespace
38
39BaseDefenseScreen::BaseDefenseScreen(sp<GameState> state, StateRef<Base> base,

Callers 1

Calls 1

threadPoolEnqueueMethod · 0.80

Tested by

no test coverage detected