Changeset - r24591:da4cf98ec941
[Not reviewed]
master
0 2 0
SamuXarick - 4 years ago 2021-01-07 09:35:09
43006711+SamuXarick@users.noreply.github.com
Fix #7945: Add cost of clearing the sloped tile when placing a dock (#7947)
2 files changed with 5 insertions and 3 deletions:
0 comments (0 inline, 0 general)
regression/regression/result.txt
Show inline comments
 
@@ -7327,7 +7327,7 @@ ERROR: IsEnd() is invalid as Begin() is 
 
  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 
 
  IsBuoyTile():         false
 
  IsLockTile():         false
 
  IsCanalTile():        false
 
  GetBankBalance():     1999959675
 
  GetBankBalance():     1999959645
 
  BuildWaterDepot():    true
 
  BuildDock():          true
 

	
src/station_cmd.cpp
Show inline comments
 
@@ -2535,8 +2535,10 @@ CommandCost CmdBuildDock(TileIndex tile,
 

	
 
	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,
 
		st->AfterStationTileSetChange(true, STATION_DOCK);
 
	}
 

	
 
	return CommandCost(EXPENSES_CONSTRUCTION, _price[PR_BUILD_STATION_DOCK]);
 
	return cost;
 
}
 

	
 
void RemoveDockingTile(TileIndex t)
0 comments (0 inline, 0 general)