It should be easier to access field instances on entities and levels and having them be your desired type. We can add some extension methods to the Level and EntityInstances (and maybe a future LevelMetadata type) that allows getting a field instance by name and expected type - providing an error otherwise. Doing this via trait would make it easy to maintain, as we could keep the logic out of the quicktype-generated ldtk module, and leave most of it to default implementation. Something like...
It should be easier to access field instances on entities and levels and having them be your desired type. We can add some extension methods to the
Level
andEntityInstance
s (and maybe a futureLevelMetadata
type) that allows getting a field instance by name and expected type - providing an error otherwise. Doing this via trait would make it easy to maintain, as we could keep the logic out of the quicktype-generatedldtk
module, and leave most of it to default implementation. Something like...