Cmdr icon indicating copy to clipboard operation
Cmdr copied to clipboard

Automatically create Listable variations for types that aren't already Listable

Open evaera opened this issue 6 years ago • 3 comments

evaera avatar Jan 16 '19 08:01 evaera

This could open up many possibilities for 'variant' types.

LoganDark avatar Feb 17 '19 07:02 LoganDark

Would there be a chance of this causing problems for types that really shouldn't be listable. E.g. PlayerID can be expensive if enough players are specified, or in some commands (e.g. place players [place id]) it could be potentially problematic.

autonordev avatar Oct 24 '19 10:10 autonordev

Would there be a chance of this causing problems for types that really shouldn't be listable. E.g. PlayerID can be expensive if enough players are specified, or in some commands (e.g. place players [place id]) it could be potentially problematic.

No, I don't think so. This would create a plural type out of any singular types, so commands can still choose to use the singular variation if they wish which isn't listable. This change would only mean that if a type like "integer" is registered, it will automatically register "integers". But if you only wanted one integer, you could still use type "integer" in your command. So the control is still up to the developer here.

evaera avatar Oct 24 '19 10:10 evaera