Add cheat to fix station ratings at 100%

This commit is contained in:
Jonathan G Rennison
2021-04-11 03:51:30 +01:00
parent d0159f2452
commit f1cab62140
6 changed files with 29 additions and 3 deletions

View File

@@ -282,6 +282,10 @@ CommandCost CmdCheatSetting(TileIndex tile, DoCommandFlag flags, uint32 p1, uint
}
return CommandCost();
case CHT_STATION_RATING:
cht = &_extra_cheats.station_rating;
break;
default:
return CMD_ERROR;
}
@@ -289,6 +293,11 @@ CommandCost CmdCheatSetting(TileIndex tile, DoCommandFlag flags, uint32 p1, uint
cht->value = p2;
cht->been_used = true;
SetWindowDirty(WC_CHEATS, 0);
if (p1 == CHT_STATION_RATING) {
extern void UpdateAllStationRatings();
UpdateAllStationRatings();
}
}
return CommandCost();
}