1
0
mirror of https://github.com/OpenTTD/OpenTTD synced 2025-12-10 06:52:05 +01:00

Fix 313c6c45aa: [Script] Return rail types as list instead of bitmask. (#14617)

This is more idiomatic for scripts, and avoids exposing internal representation.
This commit is contained in:
Peter Nelson
2025-09-15 13:59:04 +01:00
committed by GitHub
parent 7d252ff7fc
commit 5f20a97b36
5 changed files with 292 additions and 15 deletions

View File

@@ -487,6 +487,13 @@ function Regression::Engine()
print(" GetRailType(): " + AIEngine.GetRailType(i));
print(" GetRoadType(): " + AIEngine.GetRoadType(i));
print(" GetPlaneType(): " + AIEngine.GetPlaneType(i));
local railtypes = AIEngine.GetAllRailTypes(i);
print(" GetAllRailTypes(): " + (railtypes == null ? "null" : "instance"));
if (railtypes != null) {
foreach(t in railtypes) {
print(" " + t);
}
}
}
print(" Valid Engines: " + j);
}

File diff suppressed because it is too large Load Diff