godot-yat icon indicating copy to clipboard operation
godot-yat copied to clipboard

Create a mapping of arguments/options to numbers

Open MASSHUU12 opened this issue 3 months ago • 0 comments

Is your feature request related to a problem? Please describe. Currently, when, for example, an argument takes the content of 'foo' or 'bar' a check involving string comparison is required, which is not fast and can be cumbersome.

Describe the solution you'd like A good solution could be to automatically map such strings to numeric values, e.g., 'foo:1', 'bar:2' and 'foobar:4' which would allow the creation of flags and at the same time preserve the use of strings on the user side.

Specifically, it could look like the following:

[Argument("lorem", "foo:1|bar:2|foobar:4", "Lorem ipsum.")].

Describe alternatives you've considered -

Additional context -

MASSHUU12 avatar Apr 02 '24 08:04 MASSHUU12