1
0
mirror of https://github.com/OpenTTD/OpenTTD.git synced 2025-08-28 00:49:11 +00:00

Fix #9642: Keep infrastructure totals when overbuilding road depots. (#11229)

This commit is contained in:
Joan Josep
2023-08-28 00:20:37 +02:00
committed by GitHub
parent d4312c59a4
commit be9a690f41

View File

@@ -1195,12 +1195,12 @@ CommandCost CmdBuildRoadDepot(DoCommandFlag flags, TileIndex tile, RoadType rt,
dep->build_date = TimerGameCalendar::date;
MakeRoadDepot(tile, _current_company, dep->index, dir, rt);
MakeDefaultName(dep);
/* A road depot has two road bits. */
UpdateCompanyRoadInfrastructure(rt, _current_company, ROAD_DEPOT_TRACKBIT_FACTOR);
}
MarkTileDirtyByTile(tile);
/* A road depot has two road bits. */
UpdateCompanyRoadInfrastructure(rt, _current_company, ROAD_DEPOT_TRACKBIT_FACTOR);
}
cost.AddCost(_price[PR_BUILD_DEPOT_ROAD]);