Changeset - r16419:98b731f0af59
[Not reviewed]
master
0 2 0
rubidium - 14 years ago 2010-11-11 10:34:44
rubidium@openttd.org
(svn r21145) -Fix: station list wasn't updated when a new cargo got a rating
2 files changed with 9 insertions and 2 deletions:
0 comments (0 inline, 0 general)
src/economy.cpp
Show inline comments
 
@@ -1190,7 +1190,10 @@ static void LoadUnloadVehicle(Vehicle *v
 
			 * accept cargo that was loaded at the same station. */
 
			if ((u->current_order.GetUnloadType() & (OUFB_UNLOAD | OUFB_TRANSFER)) && (!accepted || v->cargo.Count() == cargo_count)) {
 
				remaining = v->cargo.MoveTo(&ge->cargo, amount_unloaded, u->current_order.GetUnloadType() & OUFB_TRANSFER ? VehicleCargoList::MTA_TRANSFER : VehicleCargoList::MTA_UNLOAD, payment);
 
				SetBit(ge->acceptance_pickup, GoodsEntry::PICKUP);
 
				if (!HasBit(ge->acceptance_pickup, GoodsEntry::PICKUP)) {
 
					InvalidateWindowData(WC_STATION_LIST, last_visited);
 
					SetBit(ge->acceptance_pickup, GoodsEntry::PICKUP);
 
				}
 

	
 
				dirty_vehicle = dirty_station = true;
 
			} else if (!accepted) {
src/station_cmd.cpp
Show inline comments
 
@@ -3201,7 +3201,11 @@ static uint UpdateStationWaiting(Station
 
	if (amount == 0) return 0;
 

	
 
	ge.cargo.Append(new CargoPacket(st->index, st->xy, amount, source_type, source_id));
 
	SetBit(ge.acceptance_pickup, GoodsEntry::PICKUP);
 

	
 
	if (!HasBit(ge.acceptance_pickup, GoodsEntry::PICKUP)) {
 
		InvalidateWindowData(WC_STATION_LIST, st->index);
 
		SetBit(ge.acceptance_pickup, GoodsEntry::PICKUP);
 
	}
 

	
 
	TriggerStationAnimation(st, st->xy, SAT_NEW_CARGO, type);
 
	AirportAnimationTrigger(st, AAT_STATION_NEW_CARGO, type);
0 comments (0 inline, 0 general)