| 348 | } |
| 349 | |
| 350 | void InitialGameStateExtractor::extract(GameState &state, Difficulty difficulty) const |
| 351 | { |
| 352 | state.difficulty = (int)difficulty; |
| 353 | |
| 354 | this->extractAlienEquipmentSets(state, difficulty); |
| 355 | |
| 356 | std::map<Difficulty, UString> humanMapNames = { |
| 357 | {Difficulty::DIFFICULTY_1, "citymap1"}, {Difficulty::DIFFICULTY_2, "citymap2"}, |
| 358 | {Difficulty::DIFFICULTY_3, "citymap3"}, {Difficulty::DIFFICULTY_4, "citymap4"}, |
| 359 | {Difficulty::DIFFICULTY_5, "citymap5"}, |
| 360 | }; |
| 361 | |
| 362 | UString humanMapId = City::getPrefix() + "HUMAN"; |
| 363 | |
| 364 | state.cities[humanMapId] = std::make_shared<City>(); |
| 365 | state.cities[humanMapId]->id = humanMapId; |
| 366 | state.cities[humanMapId]->civilianSalary = 65; // this is default value in UFO2P code |
| 367 | state.cities[humanMapId]->researchUnlock.emplace_back(&state, |
| 368 | "RESEARCH_UNLOCK_DIMENSION_GATES"); |
| 369 | |
| 370 | this->extractBuildings(state, humanMapNames[difficulty], state.cities[humanMapId]); |
| 371 | |
| 372 | this->extractCityMap(state, humanMapNames[difficulty], "CITYMAP_", state.cities[humanMapId]); |
| 373 | |
| 374 | this->extractCityScenery(state, "CITYMAP_", "citymap", "city", "stratmap", "loftemps", |
| 375 | "cityovr", state.cities[humanMapId]); |
| 376 | } |
| 377 | |
| 378 | } // namespace OpenApoc |
no test coverage detected