1
0
mirror of https://github.com/OpenTTD/OpenTTD synced 2026-01-29 07:04:35 +01:00

Codechange: Use EnumBitSet for RoadTypeFlags and RailTypeFlags. (#13415)

This commit is contained in:
Peter Nelson
2025-01-30 22:08:51 +00:00
committed by GitHub
parent a4d23c072d
commit 917d5cc75d
13 changed files with 56 additions and 76 deletions

View File

@@ -122,7 +122,7 @@ bool HasRoadTypeAvail(const CompanyID company, RoadType roadtype)
* The GS under deity mode, as well as anybody in the editor builds roads that are
* owned by towns. So if a town may build it, it should be buildable by them too.
*/
return (rti->flags & ROTFB_HIDDEN) == 0 || (rti->flags & ROTFB_TOWN_BUILD) != 0;
return !rti->flags.Test( RoadTypeFlag::Hidden) || rti->flags.Test( RoadTypeFlag::TownBuild);
} else {
const Company *c = Company::GetIfValid(company);
if (c == nullptr) return false;