mirror of
https://github.com/OpenTTD/OpenTTD.git
synced 2026-07-26 00:45:35 +00:00
Codechange: make WindowClass a scoped enum
This commit is contained in:
+4
-4
@@ -350,7 +350,7 @@ CommandCost CmdBuildObject(DoCommandFlags flags, TileIndex tile, ObjectType type
|
||||
if (flags.Test(DoCommandFlag::Execute)) {
|
||||
hq_score = UpdateCompanyRatingAndValue(c, false);
|
||||
c->location_of_HQ = tile;
|
||||
SetWindowDirty(WC_COMPANY, c->index);
|
||||
SetWindowDirty(WindowClass::Company, c->index);
|
||||
}
|
||||
break;
|
||||
}
|
||||
@@ -592,7 +592,7 @@ static CommandCost ClearTile_Object(TileIndex tile, DoCommandFlags flags)
|
||||
Company *c = Company::Get(GetTileOwner(tile));
|
||||
if (flags.Test(DoCommandFlag::Execute)) {
|
||||
c->location_of_HQ = INVALID_TILE; // reset HQ position
|
||||
SetWindowDirty(WC_COMPANY, c->index);
|
||||
SetWindowDirty(WindowClass::Company, c->index);
|
||||
CargoPacket::InvalidateAllFrom({c->index, SourceType::Headquarters});
|
||||
}
|
||||
|
||||
@@ -605,7 +605,7 @@ static CommandCost ClearTile_Object(TileIndex tile, DoCommandFlags flags)
|
||||
if (flags.Test(DoCommandFlag::Execute)) {
|
||||
Town *town = o->town;
|
||||
town->statues.Reset(GetTileOwner(tile));
|
||||
SetWindowDirty(WC_TOWN_AUTHORITY, town->index);
|
||||
SetWindowDirty(WindowClass::TownAuthority, town->index);
|
||||
}
|
||||
break;
|
||||
|
||||
@@ -959,7 +959,7 @@ static void ChangeTileOwner_Object(TileIndex tile, Owner old_owner, Owner new_ow
|
||||
do_clear = true;
|
||||
}
|
||||
|
||||
SetWindowDirty(WC_TOWN_AUTHORITY, t->index);
|
||||
SetWindowDirty(WindowClass::TownAuthority, t->index);
|
||||
} else {
|
||||
do_clear = true;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user