1
0
mirror of https://github.com/OpenTTD/OpenTTD synced 2026-01-17 01:12:39 +01:00

Codechange: introduce ConvertibleThroughBase helpers

This commit is contained in:
Rubidium
2025-02-09 17:25:40 +01:00
committed by rubidium42
parent bdd14063a0
commit b0eb8fe4db
8 changed files with 37 additions and 4 deletions

View File

@@ -73,6 +73,8 @@ static inline uint GetInspectWindowNumber(GrfSpecFeature feature, uint index)
return (feature << 24) | index;
}
static inline uint GetInspectWindowNumber(GrfSpecFeature feature, ConvertibleThroughBase auto index) { return GetInspectWindowNumber(feature, index.base()); }
/**
* The type of a property to show. This is used to
* provide an appropriate representation in the GUI.
@@ -226,6 +228,11 @@ protected:
SetDParam(2, index);
SetDParam(3, tile);
}
void SetObjectAtStringParameters(StringID string, ConvertibleThroughBase auto index, TileIndex tile) const
{
this->SetObjectAtStringParameters(string, index.base(), tile);
}
};