|
@@ -521,19 +521,13 @@ void GetAcceptanceAroundTiles(AcceptedCa
|
|
|
assert(w > 0);
|
|
|
assert(h > 0);
|
|
|
|
|
|
for (int yc = y1; yc != y2; yc++) {
|
|
|
for (int xc = x1; xc != x2; xc++) {
|
|
|
TileIndex tile = TileXY(xc, yc);
|
|
|
|
|
|
if (!IsTileType(tile, MP_STATION)) {
|
|
|
AcceptedCargo ac;
|
|
|
|
|
|
GetAcceptedCargo(tile, ac);
|
|
|
for (uint i = 0; i < lengthof(ac); ++i) accepts[i] += ac[i];
|
|
|
}
|
|
|
AddAcceptedCargo(tile, accepts);
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
|
|
|
/** Update the acceptance for a station.
|
|
|
* @param st Station to update
|
|
@@ -2345,17 +2339,12 @@ static uint GetSlopeZ_Station(TileIndex
|
|
|
|
|
|
static Foundation GetFoundation_Station(TileIndex tile, Slope tileh)
|
|
|
{
|
|
|
return FlatteningFoundation(tileh);
|
|
|
}
|
|
|
|
|
|
static void GetAcceptedCargo_Station(TileIndex tile, AcceptedCargo ac)
|
|
|
{
|
|
|
/* not used */
|
|
|
}
|
|
|
|
|
|
static void GetTileDesc_Station(TileIndex tile, TileDesc *td)
|
|
|
{
|
|
|
td->owner[0] = GetTileOwner(tile);
|
|
|
if (IsDriveThroughStopTile(tile)) {
|
|
|
Owner road_owner = INVALID_OWNER;
|
|
|
Owner tram_owner = INVALID_OWNER;
|
|
@@ -3160,13 +3149,13 @@ static CommandCost TerraformTile_Station
|
|
|
|
|
|
|
|
|
extern const TileTypeProcs _tile_type_station_procs = {
|
|
|
DrawTile_Station, // draw_tile_proc
|
|
|
GetSlopeZ_Station, // get_slope_z_proc
|
|
|
ClearTile_Station, // clear_tile_proc
|
|
|
GetAcceptedCargo_Station, // get_accepted_cargo_proc
|
|
|
NULL, // get_accepted_cargo_proc
|
|
|
GetTileDesc_Station, // get_tile_desc_proc
|
|
|
GetTileTrackStatus_Station, // get_tile_track_status_proc
|
|
|
ClickTile_Station, // click_tile_proc
|
|
|
AnimateTile_Station, // animate_tile_proc
|
|
|
TileLoop_Station, // tile_loop_clear
|
|
|
ChangeTileOwner_Station, // change_tile_owner_clear
|