Codechange: use GSCompanyMode::IsValid, IsDeity, and the precondition helpers
Direct 1:1 replacements in the code, and comments now refer to either GSCompanyMode::IsValid or GSCompanyMode::IsDeity instead of several variations on "company mode active" or "no company mode active".
This commit is contained in:
@@ -18,7 +18,7 @@
|
||||
/* static */ bool ScriptWaypoint::IsValidWaypoint(StationID waypoint_id)
|
||||
{
|
||||
const Waypoint *wp = ::Waypoint::GetIfValid(waypoint_id);
|
||||
return wp != nullptr && (wp->owner == ScriptObject::GetCompany() || ScriptObject::GetCompany() == OWNER_DEITY || wp->owner == OWNER_NONE);
|
||||
return wp != nullptr && (wp->owner == ScriptObject::GetCompany() || ScriptCompanyMode::IsDeity() || wp->owner == OWNER_NONE);
|
||||
}
|
||||
|
||||
/* static */ StationID ScriptWaypoint::GetWaypointID(TileIndex tile)
|
||||
|
Reference in New Issue
Block a user