Changeset - r28734:0920b6987490
[Not reviewed]
master
0 2 0
Joan Josep - 2 months ago 2024-02-11 17:47:49
juanjo.ng.83@gmail.com
Fix: Redraw orders when a station feature is added/removed. (#12061)
2 files changed with 5 insertions and 0 deletions:
0 comments (0 inline, 0 general)
src/station.cpp
Show inline comments
 
@@ -233,6 +233,7 @@ void Station::AddFacility(StationFacilit
 
	this->facilities |= new_facility_bit;
 
	this->owner = _current_company;
 
	this->build_date = TimerGameCalendar::date;
 
	SetWindowClassesDirty(WC_VEHICLE_ORDERS);
 
}
 

	
 
/**
src/station_cmd.cpp
Show inline comments
 
@@ -1695,6 +1695,7 @@ CommandCost RemoveFromRailBaseStation(Ti
 
		/* if we deleted the whole station, delete the train facility. */
 
		if (st->train_station.tile == INVALID_TILE) {
 
			st->facilities &= ~FACIL_TRAIN;
 
			SetWindowClassesDirty(WC_VEHICLE_ORDERS);
 
			SetWindowWidgetDirty(WC_STATION_VIEW, st->index, WID_SV_TRAINS);
 
			MarkCatchmentTilesDirty();
 
			st->UpdateVirtCoord();
 
@@ -2142,6 +2143,7 @@ static CommandCost RemoveRoadStop(TileIn
 
			/* removed the only stop? */
 
			if (*primary_stop == nullptr) {
 
				st->facilities &= (is_truck ? ~FACIL_TRUCK_STOP : ~FACIL_BUS_STOP);
 
				SetWindowClassesDirty(WC_VEHICLE_ORDERS);
 
			}
 
		} else {
 
			/* tell the predecessor in the list to skip this stop */
 
@@ -2574,6 +2576,7 @@ static CommandCost RemoveAirport(TileInd
 

	
 
		st->airport.Clear();
 
		st->facilities &= ~FACIL_AIRPORT;
 
		SetWindowClassesDirty(WC_VEHICLE_ORDERS);
 

	
 
		InvalidateWindowData(WC_STATION_VIEW, st->index, -1);
 

	
 
@@ -2827,6 +2830,7 @@ static CommandCost RemoveDock(TileIndex 
 
			st->ship_station.Clear();
 
			st->docking_station.Clear();
 
			st->facilities &= ~FACIL_DOCK;
 
			SetWindowClassesDirty(WC_VEHICLE_ORDERS);
 
		}
 

	
 
		Company::Get(st->owner)->infrastructure.station -= 2;
0 comments (0 inline, 0 general)