0x0048B244
| 87 | |
| 88 | // 0x0048B244 |
| 89 | void updateDaily() |
| 90 | { |
| 91 | for (auto& town : TownManager::towns()) |
| 92 | { |
| 93 | town.flags &= ~TownFlags::ratingAdjusted; |
| 94 | } |
| 95 | |
| 96 | for (auto& station : stations()) |
| 97 | { |
| 98 | if (station.stationTileSize == 0) |
| 99 | { |
| 100 | station.noTilesTimeout++; |
| 101 | if (station.noTilesTimeout == 5 && CompanyManager::isPlayerCompany(station.owner)) |
| 102 | { |
| 103 | companyEmotionEvent(station.owner, Emotion::disgusted); |
| 104 | } |
| 105 | if (station.noTilesTimeout >= 10) |
| 106 | { |
| 107 | Ui::Windows::Construction::Station::sub_49E1F1(station.id()); |
| 108 | station.invalidate(); |
| 109 | deallocateStation(station.id()); |
| 110 | } |
| 111 | } |
| 112 | else |
| 113 | { |
| 114 | station.noTilesTimeout = 0; |
| 115 | } |
| 116 | if (station.updateCargo()) |
| 117 | { |
| 118 | auto town = TownManager::get(station.town); |
| 119 | if (town != nullptr && (town->flags & TownFlags::ratingAdjusted) == TownFlags::none) |
| 120 | { |
| 121 | town->flags |= TownFlags::ratingAdjusted; |
| 122 | town->adjustCompanyRating(station.owner, 1); |
| 123 | } |
| 124 | } |
| 125 | } |
| 126 | } |
| 127 | |
| 128 | // 0x048F988 |
| 129 | StringId generateNewStationName(StationId stationId, TownId townId, World::Pos3 position, uint8_t mode) |
nothing calls this directly
no test coverage detected