Remove Cheats/ExtraCheats distinction

It is not necessary as there is no longer a need to preserve
the size/order of struct Cheats
This commit is contained in:
Jonathan G Rennison
2023-11-26 11:32:26 +00:00
parent 7d65fbd6e8
commit a3371fccc6
8 changed files with 20 additions and 38 deletions

View File

@@ -267,11 +267,11 @@ CommandCost CmdCheatSetting(TileIndex tile, DoCommandFlag flags, uint32 p1, uint
case CHT_INFLATION_INCOME:
if (flags & DC_EXEC) {
_extra_cheats.inflation_income.been_used = true;
_cheats.inflation_income.been_used = true;
_economy.inflation_payment = Clamp<uint64>(p2, 1 << 16, MAX_INFLATION);
if (_economy.inflation_payment > _economy.inflation_prices) {
_economy.inflation_prices = _economy.inflation_payment;
_extra_cheats.inflation_cost.been_used = true;
_cheats.inflation_cost.been_used = true;
}
RecomputePrices();
SetWindowDirty(WC_CHEATS, 0);
@@ -280,11 +280,11 @@ CommandCost CmdCheatSetting(TileIndex tile, DoCommandFlag flags, uint32 p1, uint
case CHT_INFLATION_COST:
if (flags & DC_EXEC) {
_extra_cheats.inflation_cost.been_used = true;
_cheats.inflation_cost.been_used = true;
_economy.inflation_prices = Clamp<uint64>(p2, 1 << 16, MAX_INFLATION);
if (_economy.inflation_payment > _economy.inflation_prices) {
_economy.inflation_payment = _economy.inflation_prices;
_extra_cheats.inflation_income.been_used = true;
_cheats.inflation_income.been_used = true;
}
RecomputePrices();
SetWindowDirty(WC_CHEATS, 0);
@@ -296,7 +296,7 @@ CommandCost CmdCheatSetting(TileIndex tile, DoCommandFlag flags, uint32 p1, uint
break;
case CHT_TOWN_RATING:
cht = &_extra_cheats.town_rating;
cht = &_cheats.town_rating;
break;
default: