Codechange: Turn custom vehicle spritenums into enum, and use them consistently. (#14022)

This commit is contained in:
frosch
2025-04-18 15:19:28 +02:00
committed by GitHub
parent 2c59838acb
commit b862d4937f
12 changed files with 39 additions and 28 deletions

View File

@@ -228,7 +228,7 @@ void InitDepotWindowBlockSizes()
if (!e->IsEnabled()) continue;
uint w = TRAININFO_DEFAULT_VEHICLE_WIDTH;
if (e->GetGRF() != nullptr && is_custom_sprite(e->u.rail.image_index)) {
if (e->GetGRF() != nullptr && IsCustomVehicleSpriteNum(e->u.rail.image_index)) {
w = e->GetGRF()->traininfo_vehicle_width;
if (w != VEHICLEINFO_FULL_VEHICLE_WIDTH) {
/* Hopeless.