paradoxuum / centurion

A flexible and extensible command framework for roblox-ts
https://centurion.paradoxum.dev/
MIT License
26 stars 5 forks source link

Support listable types #13

Closed paradoxuum closed 2 months ago

paradoxuum commented 8 months ago

At the moment, types cannot be defined as "listable".

Listable types are types that should accept an array of comma-separated inputs (text) and transform them into an array of outputs (the type).

An example type where this would be used is the players type. At the moment, we have to manually split the text using gmatch and transform each string. This works fine to a degree, but you can't put spaces after commas, as it will consider that to be the start of the next argument.

Another issue to consider is how suggestions are currently handled. The interface doesn't take commas into account when displaying the type's suggestions, because it doesn't know if commas should be treated as a separator or as regular text.