Use string unions instead of generic string
Posted: Thu Dec 28, 2023 6:30 am
There are a number of places where things like function parameters and concept fields have a type of string, but can only be strings from a defined list.
Would it be possible to make those unions, that way they show up in the autocomplete list when using FMTK + LuaLS?
It's not the end of the world because they still show up in the tooltip, but it would be nice to not have to type some of the longer ones out.
Examples:
LuaItemStack::get_mapper() and set_mapper()
TrainPathFinderRequest::type
ElemID::type
There are plenty more, I won't list them for brevity.
Would it be possible to make those unions, that way they show up in the autocomplete list when using FMTK + LuaLS?
It's not the end of the world because they still show up in the tooltip, but it would be nice to not have to type some of the longer ones out.
Examples:
LuaItemStack::get_mapper() and set_mapper()
TrainPathFinderRequest::type
ElemID::type
There are plenty more, I won't list them for brevity.