Add nearby stations to town debug window

This commit is contained in:
Jonathan G Rennison
2019-08-20 01:45:35 +01:00
parent 4b9a4ae695
commit 515187058f

View File

@@ -615,6 +615,13 @@ class NIHTown : public NIHelper {
SetDParam(0, t->cargo_accepted_total);
b = GetString(b, STR_JUST_CARGO_LIST, lastof(buffer));
print(buffer);
seprintf(buffer, lastof(buffer), " Nearby stations: %u", (uint) t->stations_near.size());
print(buffer);
for (const Station *st : t->stations_near) {
seprintf(buffer, lastof(buffer), " %u: %s", st->index, st->GetCachedName());
print(buffer);
}
}
};