0x00438959
| 405 | |
| 406 | // 0x00438959 |
| 407 | void saveNewScore(Scenario::ObjectiveProgress& progress, const CompanyId companyId) |
| 408 | { |
| 409 | auto res = findScenario(getGameState().scenarioFileName); |
| 410 | if (!res.has_value()) |
| 411 | { |
| 412 | return; |
| 413 | } |
| 414 | auto& entry = _scenarioList[res.value()]; |
| 415 | if (!entry.hasFlag(ScenarioIndexFlags::completed) || progress.completedChallengeInMonths < entry.completedMonths) |
| 416 | { |
| 417 | entry.flags |= ScenarioIndexFlags::completed; |
| 418 | entry.completedMonths = progress.completedChallengeInMonths; |
| 419 | auto* company = CompanyManager::get(companyId); |
| 420 | StringManager::formatString(entry.highscoreName, company->name); |
| 421 | saveIndex(); |
| 422 | } |
| 423 | } |
| 424 | |
| 425 | // 0x00525F5E |
| 426 | uint32_t getScenarioTicks() |
no test coverage detected