mirror of
https://github.com/JGRennison/OpenTTD-patches.git
synced 2024-11-09 19:10:38 +00:00
Debug: Add compatible railtype info to railtype debug window
This commit is contained in:
parent
92ca965ef7
commit
0d61ae9567
@ -184,8 +184,8 @@ class NIHVehicle : public NIHelper {
|
|||||||
print(buffer);
|
print(buffer);
|
||||||
if (e->type == VEH_TRAIN) {
|
if (e->type == VEH_TRAIN) {
|
||||||
const RailtypeInfo *rti = GetRailTypeInfo(e->u.rail.railtype);
|
const RailtypeInfo *rti = GetRailTypeInfo(e->u.rail.railtype);
|
||||||
seprintf(buffer, lastof(buffer), " Railtype: %u (0x" OTTD_PRINTFHEX64 "), Compatible: 0x" OTTD_PRINTFHEX64 ", Powered: 0x" OTTD_PRINTFHEX64,
|
seprintf(buffer, lastof(buffer), " Railtype: %u (0x" OTTD_PRINTFHEX64 "), Compatible: 0x" OTTD_PRINTFHEX64 ", Powered: 0x" OTTD_PRINTFHEX64 ", All compatible: 0x" OTTD_PRINTFHEX64,
|
||||||
e->u.rail.railtype, (static_cast<RailTypes>(1) << e->u.rail.railtype), rti->compatible_railtypes, rti->powered_railtypes);
|
e->u.rail.railtype, (static_cast<RailTypes>(1) << e->u.rail.railtype), rti->compatible_railtypes, rti->powered_railtypes, rti->all_compatible_railtypes);
|
||||||
print(buffer);
|
print(buffer);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -633,6 +633,12 @@ class NIHRailType : public NIHelper {
|
|||||||
HasBit(info->ctrl_flags, RTCF_PROGSIG) ? 'p' : '-',
|
HasBit(info->ctrl_flags, RTCF_PROGSIG) ? 'p' : '-',
|
||||||
HasBit(info->ctrl_flags, RTCF_RESTRICTEDSIG) ? 'r' : '-');
|
HasBit(info->ctrl_flags, RTCF_RESTRICTEDSIG) ? 'r' : '-');
|
||||||
print(buffer);
|
print(buffer);
|
||||||
|
seprintf(buffer, lastof(buffer), " Powered: 0x" OTTD_PRINTFHEX64, info->powered_railtypes);
|
||||||
|
print(buffer);
|
||||||
|
seprintf(buffer, lastof(buffer), " Compatible: 0x" OTTD_PRINTFHEX64, info->compatible_railtypes);
|
||||||
|
print(buffer);
|
||||||
|
seprintf(buffer, lastof(buffer), " All compatible: 0x" OTTD_PRINTFHEX64, info->all_compatible_railtypes);
|
||||||
|
print(buffer);
|
||||||
};
|
};
|
||||||
|
|
||||||
print("Debug Info:");
|
print("Debug Info:");
|
||||||
|
Loading…
Reference in New Issue
Block a user