Add road stops flag for drive-through stops only

This commit is contained in:
Jonathan G Rennison
2022-04-15 17:46:42 +01:00
parent 25dc483de0
commit 8a9afd4621
5 changed files with 31 additions and 2 deletions

View File

@@ -2092,6 +2092,7 @@ CommandCost CmdBuildRoadStop(TileIndex tile, DoCommandFlag flags, uint32 p1, uin
if (roadstopspec != nullptr) {
if (type && roadstopspec->stop_type != ROADSTOPTYPE_FREIGHT && roadstopspec->stop_type != ROADSTOPTYPE_ALL) return CMD_ERROR;
if (!type && roadstopspec->stop_type != ROADSTOPTYPE_PASSENGER && roadstopspec->stop_type != ROADSTOPTYPE_ALL) return CMD_ERROR;
if (!is_drive_through && HasBit(roadstopspec->flags, RSF_DRIVE_THROUGH_ONLY)) return CMD_ERROR;
}
/* Check if the requested road stop is too big */