Fix #7945: Add cost of clearing the sloped tile when placing a dock (#7947)

pull/217/head
SamuXarick 3 years ago committed by GitHub
parent c988b4d62b
commit f84a466ca5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -7327,7 +7327,7 @@ ERROR: IsEnd() is invalid as Begin() is never called
IsBuoyTile(): true
IsLockTile(): true
IsCanalTile(): true
GetBankBalance(): 1999965070
GetBankBalance(): 1999965040
--AIWaypointList(BUOY)--
Count(): 1
@ -7346,7 +7346,7 @@ ERROR: IsEnd() is invalid as Begin() is never called
IsBuoyTile(): false
IsLockTile(): false
IsCanalTile(): false
GetBankBalance(): 1999959675
GetBankBalance(): 1999959645
BuildWaterDepot(): true
BuildDock(): true

@ -2535,8 +2535,10 @@ CommandCost CmdBuildDock(TileIndex tile, DoCommandFlag flags, uint32 p1, uint32
if (IsBridgeAbove(tile)) return_cmd_error(STR_ERROR_MUST_DEMOLISH_BRIDGE_FIRST);
CommandCost cost(EXPENSES_CONSTRUCTION, _price[PR_BUILD_STATION_DOCK]);
ret = DoCommand(tile, 0, 0, flags, CMD_LANDSCAPE_CLEAR);
if (ret.Failed()) return ret;
cost.AddCost(ret);
TileIndex tile_cur = tile + TileOffsByDiagDir(direction);
@ -2591,7 +2593,7 @@ CommandCost CmdBuildDock(TileIndex tile, DoCommandFlag flags, uint32 p1, uint32
st->AfterStationTileSetChange(true, STATION_DOCK);
}
return CommandCost(EXPENSES_CONSTRUCTION, _price[PR_BUILD_STATION_DOCK]);
return cost;
}
void RemoveDockingTile(TileIndex t)

Loading…
Cancel
Save