(svn r24905) -Feature(ish): Implement station randomisation triggers.

This commit is contained in:
peter1138
2013-01-11 07:39:25 +00:00
parent 4ebbfc3de4
commit c00a400cc7
12 changed files with 127 additions and 11 deletions

View File

@@ -1535,6 +1535,7 @@ static void LoadUnloadVehicle(Vehicle *front, int *cargo_left)
st->last_vehicle_type = v->type;
if (ge->cargo.Empty()) {
TriggerStationRandomisation(st, st->xy, SRT_CARGO_TAKEN, v->cargo_type);
TriggerStationAnimation(st, st->xy, SAT_CARGO_TAKEN, v->cargo_type);
AirportAnimationTrigger(st, AAT_STATION_CARGO_TAKEN, v->cargo_type);
}
@@ -1552,7 +1553,10 @@ static void LoadUnloadVehicle(Vehicle *front, int *cargo_left)
}
if (anything_loaded || anything_unloaded) {
if (front->type == VEH_TRAIN) TriggerStationAnimation(st, front->tile, SAT_TRAIN_LOADS);
if (front->type == VEH_TRAIN) {
TriggerStationRandomisation(st, front->tile, SRT_TRAIN_LOADS);
TriggerStationAnimation(st, front->tile, SAT_TRAIN_LOADS);
}
}
/* Only set completely_emptied, if we just unloaded all remaining cargo */