File diff r7947:2da5c8f07e0d → r7948:c37d06109abc
src/station_cmd.cpp
Show inline comments
 
@@ -41,12 +41,13 @@
 
#include "misc/autoptr.hpp"
 
#include "road.h"
 
#include "cargotype.h"
 
#include "strings.h"
 
#include "autoslope.h"
 
#include "transparency.h"
 
#include "water.h"
 

	
 
DEFINE_OLD_POOL_GENERIC(Station, Station)
 
DEFINE_OLD_POOL_GENERIC(RoadStop, RoadStop)
 

	
 

	
 
/**
 
@@ -1896,18 +1897,13 @@ static CommandCost RemoveBuoy(Station *s
 
		st->facilities &= ~FACIL_DOCK;
 
		st->had_vehicle_of_type &= ~HVOT_BUOY;
 

	
 
		/* We have to set the water tile's state to the same state as before the
 
		 * buoy was placed. Otherwise one could plant a buoy on a canal edge,
 
		 * remove it and flood the land (if the canal edge is at level 0) */
 
		Owner o = GetTileOwner(tile);
 
		if (o == OWNER_WATER) {
 
			MakeWater(tile);
 
		} else {
 
			MakeCanal(tile, o);
 
		}
 
		MakeWaterOrCanalDependingOnSurroundings(tile, GetTileOwner(tile));
 
		MarkTileDirtyByTile(tile);
 

	
 
		UpdateStationVirtCoordDirty(st);
 
		DeleteStationIfEmpty(st);
 
	}
 

	
 
@@ -2037,13 +2033,13 @@ static CommandCost RemoveDock(Station *s
 

	
 
	if (!EnsureNoVehicleOnGround(tile1)) return CMD_ERROR;
 
	if (!EnsureNoVehicleOnGround(tile2)) return CMD_ERROR;
 

	
 
	if (flags & DC_EXEC) {
 
		DoClearSquare(tile1);
 
		MakeWater(tile2);
 
		MakeWaterOrCanalDependingOnSurroundings(tile2, st->owner);
 

	
 
		st->rect.AfterRemoveTile(st, tile1);
 
		st->rect.AfterRemoveTile(st, tile2);
 

	
 
		MarkTileDirtyByTile(tile2);
 

	
 
@@ -2061,15 +2057,12 @@ static CommandCost RemoveDock(Station *s
 

	
 
const DrawTileSprites *GetStationTileLayout(StationType st, byte gfx)
 
{
 
	return &_station_display_datas[st][gfx];
 
}
 

	
 
/* For drawing canal edges on buoys */
 
extern void DrawCanalWater(TileIndex tile);
 

	
 
static void DrawTile_Station(TileInfo *ti)
 
{
 
	const DrawTileSprites *t = NULL;
 
	RailType railtype;
 
	RoadTypes roadtypes;
 
	if (IsRailwayStation(ti->tile)) {