Add scope info logging to LoadUnloadStation
This commit is contained in:
@@ -87,7 +87,8 @@ const char *scope_dumper::StationInfo(const BaseStation *st)
|
||||
|
||||
if (st) {
|
||||
const bool waypoint = Waypoint::IsExpected(st);
|
||||
b += seprintf(b, last, "%s: %u: ", waypoint ? "waypoint" : "station", st->index);
|
||||
b += seprintf(b, last, "%s: %u: (", waypoint ? "waypoint" : "station", st->index);
|
||||
SetDParam(0, st->index);
|
||||
b = GetString(b, waypoint ? STR_WAYPOINT_NAME : STR_STATION_NAME, last);
|
||||
b += seprintf(b, last, ", c:%d, facil: ", (int) st->owner);
|
||||
auto dump_facil = [&](char c, StationFacility flag) {
|
||||
@@ -99,6 +100,7 @@ const char *scope_dumper::StationInfo(const BaseStation *st)
|
||||
dump_facil('A', FACIL_AIRPORT);
|
||||
dump_facil('D', FACIL_DOCK);
|
||||
dump_facil('W', FACIL_WAYPOINT);
|
||||
b += seprintf(b, last, ")");
|
||||
} else {
|
||||
b += seprintf(b, last, "station/waypoint: NULL");
|
||||
}
|
||||
|
@@ -951,8 +951,11 @@ void CallVehicleTicks()
|
||||
|
||||
RunVehicleDayProc();
|
||||
|
||||
Station *st;
|
||||
FOR_ALL_STATIONS(st) LoadUnloadStation(st);
|
||||
{
|
||||
Station *st = nullptr;
|
||||
SCOPE_INFO_FMT([&st], "CallVehicleTicks: LoadUnloadStation: %s", scope_dumper().StationInfo(st));
|
||||
FOR_ALL_STATIONS(st) LoadUnloadStation(st);
|
||||
}
|
||||
|
||||
Vehicle *v = NULL;
|
||||
SCOPE_INFO_FMT([&v], "CallVehicleTicks: %s", scope_dumper().VehicleInfo(v));
|
||||
|
Reference in New Issue
Block a user