Codechange: make TownID an enum
This commit is contained in:
@@ -36,7 +36,7 @@
|
||||
return (type == GT_NONE && destination == 0) ||
|
||||
(type == GT_TILE && ScriptMap::IsValidTile(::TileIndex(destination))) ||
|
||||
(type == GT_INDUSTRY && ScriptIndustry::IsValidIndustry(destination)) ||
|
||||
(type == GT_TOWN && ScriptTown::IsValidTown(destination)) ||
|
||||
(type == GT_TOWN && ScriptTown::IsValidTown(static_cast<TownID>(destination))) ||
|
||||
(type == GT_COMPANY && ScriptCompany::ResolveCompanyID(ScriptCompany::ToScriptCompanyID(static_cast<::CompanyID>(destination))) != ScriptCompany::COMPANY_INVALID) ||
|
||||
(type == GT_STORY_PAGE && story_page != nullptr && (c == INVALID_COMPANY ? story_page->company == INVALID_COMPANY : story_page->company == INVALID_COMPANY || story_page->company == c));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user