Initial support for NewGRF road stops (bus and lorry stops)

This commit is contained in:
Jonathan G Rennison
2022-02-09 02:11:55 +00:00
parent a3c003546b
commit 1084bb8566
28 changed files with 1592 additions and 119 deletions

View File

@@ -26,6 +26,7 @@
#include "newgrf_industrytiles.h"
#include "newgrf_station.h"
#include "newgrf_airporttiles.h"
#include "newgrf_roadstop.h"
#include "object.h"
#include "strings_func.h"
#include "date_func.h"
@@ -2146,6 +2147,7 @@ static void LoadUnloadVehicle(Vehicle *front)
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);
TriggerRoadStopRandomisation(st, st->xy, RSRT_CARGO_TAKEN, v->cargo_type);
}
new_load_unload_ticks += loaded;
@@ -2166,6 +2168,8 @@ static void LoadUnloadVehicle(Vehicle *front)
if (front->type == VEH_TRAIN) {
TriggerStationRandomisation(st, station_tile, SRT_TRAIN_LOADS);
TriggerStationAnimation(st, station_tile, SAT_TRAIN_LOADS);
} else if (front->type == VEH_ROAD) {
TriggerRoadStopRandomisation(st, station_tile, RSRT_VEH_LOADS);
}
}