(svn r7335) -Codechange: redraw station tiles when cargo is moved, for newstations
This commit is contained in:
@@ -1500,6 +1500,7 @@ int LoadUnloadVehicle(Vehicle *v, bool just_arrived)
|
|||||||
|
|
||||||
if (result != 0) {
|
if (result != 0) {
|
||||||
InvalidateWindow(WC_VEHICLE_DETAILS, v->index);
|
InvalidateWindow(WC_VEHICLE_DETAILS, v->index);
|
||||||
|
MarkStationTilesDirty(st);
|
||||||
|
|
||||||
if (result & 2) InvalidateWindow(WC_STATION_VIEW, last_visited);
|
if (result & 2) InvalidateWindow(WC_STATION_VIEW, last_visited);
|
||||||
|
|
||||||
|
|||||||
@@ -210,6 +210,7 @@ void GetProductionAroundTiles(AcceptedCargo produced, TileIndex tile, int w, int
|
|||||||
void GetAcceptanceAroundTiles(AcceptedCargo accepts, TileIndex tile, int w, int h, int rad);
|
void GetAcceptanceAroundTiles(AcceptedCargo accepts, TileIndex tile, int w, int h, int rad);
|
||||||
uint GetStationPlatforms(const Station *st, TileIndex tile);
|
uint GetStationPlatforms(const Station *st, TileIndex tile);
|
||||||
uint GetPlatformLength(TileIndex tile, DiagDirection dir);
|
uint GetPlatformLength(TileIndex tile, DiagDirection dir);
|
||||||
|
void MarkStationTilesDirty(const Station *st);
|
||||||
|
|
||||||
|
|
||||||
const DrawTileSprites *GetStationTileLayout(byte gfx);
|
const DrawTileSprites *GetStationTileLayout(byte gfx);
|
||||||
|
|||||||
@@ -79,7 +79,7 @@ static bool TileBelongsToRailStation(const Station *st, TileIndex tile)
|
|||||||
return IsTileType(tile, MP_STATION) && GetStationIndex(tile) == st->index && IsRailwayStation(tile);
|
return IsTileType(tile, MP_STATION) && GetStationIndex(tile) == st->index && IsRailwayStation(tile);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void MarkStationTilesDirty(const Station *st)
|
void MarkStationTilesDirty(const Station *st)
|
||||||
{
|
{
|
||||||
TileIndex tile = st->train_tile;
|
TileIndex tile = st->train_tile;
|
||||||
int w, h;
|
int w, h;
|
||||||
@@ -2591,6 +2591,7 @@ static void UpdateStationWaiting(Station *st, int type, uint amount)
|
|||||||
st->goods[type].enroute_time = 0;
|
st->goods[type].enroute_time = 0;
|
||||||
st->goods[type].enroute_from = st->index;
|
st->goods[type].enroute_from = st->index;
|
||||||
InvalidateWindow(WC_STATION_VIEW, st->index);
|
InvalidateWindow(WC_STATION_VIEW, st->index);
|
||||||
|
MarkStationTilesDirty(st);
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Rename a station
|
/** Rename a station
|
||||||
|
|||||||
Reference in New Issue
Block a user