diff options
author | Erich Eckner <git@eckner.net> | 2018-11-05 22:43:31 +0100 |
---|---|---|
committer | Erich Eckner <git@eckner.net> | 2018-11-16 19:11:46 +0100 |
commit | 6b519f8b1aac426a281c22660185c50fb2ac409f (patch) | |
tree | e06597ee7fdd1451113a4c71991851cb96b86541 /src/station_cmd.cpp | |
parent | 6644b6b3a42611c8de6c528ae84472e69d89d87f (diff) | |
download | openttd-6b519f8b1aac426a281c22660185c50fb2ac409f.tar.xz |
UNDERGROUND_COST_MULTIPLIER new
Diffstat (limited to 'src/station_cmd.cpp')
-rw-r--r-- | src/station_cmd.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/station_cmd.cpp b/src/station_cmd.cpp index fa35b2fdf..5e3f6c04b 100644 --- a/src/station_cmd.cpp +++ b/src/station_cmd.cpp @@ -760,7 +760,7 @@ CommandCost CheckBuildableTile(TileIndex tile, uint invalid_dirs, int &allowed_z return_cmd_error(STR_ERROR_FLAT_LAND_REQUIRED); } } - cost.AddCost(_price[PR_BUILD_FOUNDATION]); + cost.AddCost(_price[PR_BUILD_FOUNDATION] * UNDERGROUND_COST_MULTIPLIER(tile)); } /* The level of this tile must be equal to allowed_z. */ @@ -989,7 +989,7 @@ static CommandCost CheckFlatLandRoadStop(TileArea tile_area, DoCommandFlag flags } uint roadbits_to_build = CountBits(rts) * 2 - num_roadbits; - cost.AddCost(_price[PR_BUILD_ROAD] * roadbits_to_build); + cost.AddCost(_price[PR_BUILD_ROAD] * roadbits_to_build * UNDERGROUND_COST_MULTIPLIER(cur_tile)); } } @@ -1242,8 +1242,8 @@ CommandCost CmdBuildRailStation(TileIndex tile_org, DoCommandFlag flags, uint32 CommandCost cost = CheckFlatLandRailStation(new_location, flags, axis, &est, rt, affected_vehicles, spec_class, spec_index, plat_len, numtracks); if (cost.Failed()) return cost; /* Add construction expenses. */ - cost.AddCost((numtracks * _price[PR_BUILD_STATION_RAIL] + _price[PR_BUILD_STATION_RAIL_LENGTH]) * plat_len); - cost.AddCost(numtracks * plat_len * RailBuildCost(rt)); + cost.AddCost((numtracks * _price[PR_BUILD_STATION_RAIL] + _price[PR_BUILD_STATION_RAIL_LENGTH]) * plat_len * UNDERGROUND_COST_MULTIPLIER(tile_org)); + cost.AddCost(numtracks * plat_len * RailBuildCost(rt) * UNDERGROUND_COST_MULTIPLIER(tile_org)); Station *st = NULL; ret = FindJoiningStation(est, station_to_join, adjacent, new_location, &st); @@ -1513,7 +1513,7 @@ CommandCost RemoveFromRailBaseStation(TileArea ta, SmallVector<T *, 4> &affected } /* If we reached here, the tile is valid so increase the quantity of tiles we will remove */ - quantity++; + quantity += UNDERGROUND_COST_MULTIPLIER(tile); if (keep_rail || IsStationTileBlocked(tile)) { /* Don't refund the 'steel' of the track when we keep the |