MCPcopy Create free account
hub / github.com/OpenTTD/OpenTTD / ScriptStationList_Vehicle

Method ScriptStationList_Vehicle

src/script/api/script_stationlist.cpp:31–40  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

29}
30
31ScriptStationList_Vehicle::ScriptStationList_Vehicle(VehicleID vehicle_id)
32{
33 if (!ScriptVehicle::IsPrimaryVehicle(vehicle_id)) return;
34
35 const Vehicle *v = ::Vehicle::Get(vehicle_id);
36
37 for (const Order &o : v->Orders()) {
38 if (o.IsType(OT_GOTO_STATION)) this->AddItem(o.GetDestination().ToStationID().base());
39 }
40}
41
42ScriptStationList_Cargo::ScriptStationList_Cargo(ScriptStationList_Cargo::CargoMode mode,
43 ScriptStationList_Cargo::CargoSelector selector, StationID station_id, CargoType cargo,

Callers

nothing calls this directly

Calls 6

OrdersMethod · 0.80
IsTypeMethod · 0.80
AddItemMethod · 0.80
GetDestinationMethod · 0.80
baseMethod · 0.45
ToStationIDMethod · 0.45

Tested by

no test coverage detected