Skip to content

Commit

Permalink
Fix: Road type is not available before its introduction date.
Browse files Browse the repository at this point in the history
  • Loading branch information
PeterN committed Mar 30, 2023
1 parent 3ae6335 commit 4f2fee7
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/road.cpp
Expand Up @@ -114,6 +114,9 @@ bool HasRoadTypeAvail(const CompanyID company, RoadType roadtype)
const RoadTypeInfo *rti = GetRoadTypeInfo(roadtype);
if (rti->label == 0) return false;

/* Not yet introduced at this date. */
if (IsInsideMM(rti->introduction_date, 0, MAX_DAY) && rti->introduction_date > _date) return false;

/*
* Do not allow building hidden road types, except when a town may build it.
* The GS under deity mode, as well as anybody in the editor builds roads that are
Expand Down

0 comments on commit 4f2fee7

Please sign in to comment.