src/station_cmd.cpp
changeset 7319 f884be171f04
parent 7257 18c8b085008d
child 7353 716c6dd9322a
equal deleted inserted replaced
7318:9fa3dc1d39ca 7319:f884be171f04
   976 			SetSignalsOnBothDir(tile_org, track);
   976 			SetSignalsOnBothDir(tile_org, track);
   977 			YapfNotifyTrackLayoutChange(tile_org, track);
   977 			YapfNotifyTrackLayoutChange(tile_org, track);
   978 			tile_org += tile_delta ^ TileDiffXY(1, 1); // perpendicular to tile_delta
   978 			tile_org += tile_delta ^ TileDiffXY(1, 1); // perpendicular to tile_delta
   979 		} while (--numtracks);
   979 		} while (--numtracks);
   980 
   980 
   981 		st->MarkTilesDirty();
   981 		st->MarkTilesDirty(false);
   982 		UpdateStationVirtCoordDirty(st);
   982 		UpdateStationVirtCoordDirty(st);
   983 		UpdateStationAcceptance(st, false);
   983 		UpdateStationAcceptance(st, false);
   984 		RebuildStationLists();
   984 		RebuildStationLists();
   985 		InvalidateWindow(WC_STATION_LIST, st->owner);
   985 		InvalidateWindow(WC_STATION_LIST, st->owner);
   986 		/* success, so don't delete the new station */
   986 		/* success, so don't delete the new station */
  1103 			DeallocateSpecFromStation(st, specindex);
  1103 			DeallocateSpecFromStation(st, specindex);
  1104 
  1104 
  1105 			// now we need to make the "spanned" area of the railway station smaller if we deleted something at the edges.
  1105 			// now we need to make the "spanned" area of the railway station smaller if we deleted something at the edges.
  1106 			// we also need to adjust train_tile.
  1106 			// we also need to adjust train_tile.
  1107 			MakeRailwayStationAreaSmaller(st);
  1107 			MakeRailwayStationAreaSmaller(st);
  1108 			st->MarkTilesDirty();
  1108 			st->MarkTilesDirty(false);
  1109 			UpdateStationSignCoord(st);
  1109 			UpdateStationSignCoord(st);
  1110 
  1110 
  1111 			// if we deleted the whole station, delete the train facility.
  1111 			// if we deleted the whole station, delete the train facility.
  1112 			if (st->train_tile == 0) {
  1112 			if (st->train_tile == 0) {
  1113 				st->facilities &= ~FACIL_TRAIN;
  1113 				st->facilities &= ~FACIL_TRAIN;
  2482 
  2482 
  2483 	st->goods[type].enroute_time = 0;
  2483 	st->goods[type].enroute_time = 0;
  2484 	st->goods[type].enroute_from = st->index;
  2484 	st->goods[type].enroute_from = st->index;
  2485 	st->goods[type].enroute_from_xy = st->xy;
  2485 	st->goods[type].enroute_from_xy = st->xy;
  2486 	InvalidateWindow(WC_STATION_VIEW, st->index);
  2486 	InvalidateWindow(WC_STATION_VIEW, st->index);
  2487 	st->MarkTilesDirty();
  2487 	st->MarkTilesDirty(true);
  2488 }
  2488 }
  2489 
  2489 
  2490 /** Rename a station
  2490 /** Rename a station
  2491  * @param tile unused
  2491  * @param tile unused
  2492  * @param flags operation to perform
  2492  * @param flags operation to perform