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

Method extractCommon

tools/extractors/extractors.cpp:319–348  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

317// clang-format on
318
319void InitialGameStateExtractor::extractCommon(GameState &state) const
320{
321 this->extractResearch(state);
322 this->extractOrganisations(state);
323 this->extractVehicleEquipment(state);
324 this->extractAgentBodyTypes(state);
325 this->extractAgentTypes(state);
326 this->extractVehicles(state);
327 this->extractFacilities(state);
328 this->extractBaseLayouts(state);
329 this->extractAgentEquipment(state);
330 this->extractDoodads(state);
331 this->extractBuildingFunctions(state);
332 this->extractEconomy(state);
333
334 // The alien map doesn't change
335 UString alienMapId = City::getPrefix() + "ALIEN";
336 state.cities[alienMapId] = std::make_shared<City>();
337 state.cities[alienMapId]->id = alienMapId;
338 state.cities[alienMapId]->researchUnlock.emplace_back(&state,
339 "RESEARCH_UNLOCK_ALIEN_DIMENSION");
340 this->extractBuildings(state, "albuild", state.cities[alienMapId], true);
341 this->extractCityMap(state, "alienmap", "ALIENMAP_", state.cities[alienMapId]);
342 this->extractCityScenery(state, "ALIENMAP_", "alienmap", "alien", "alien_s", "loftemps",
343 "cityovr", state.cities[alienMapId]);
344
345 this->extractBattlescapeMap(state, battleMapPaths);
346 this->extractSharedBattleResources(state);
347 this->extractSharedCityResources(state);
348}
349
350void InitialGameStateExtractor::extract(GameState &state, Difficulty difficulty) const
351{

Callers 1

main.cppFile · 0.80

Calls 15

extractResearchMethod · 0.95
extractOrganisationsMethod · 0.95
extractAgentBodyTypesMethod · 0.95
extractAgentTypesMethod · 0.95
extractVehiclesMethod · 0.95
extractFacilitiesMethod · 0.95
extractBaseLayoutsMethod · 0.95
extractAgentEquipmentMethod · 0.95
extractDoodadsMethod · 0.95
extractEconomyMethod · 0.95

Tested by

no test coverage detected