MASSHUU12 / godot-yat

YAT is an plugin that provides a customizable, in-game terminal for your Godot (C#) project.
https://godotengine.org/asset-library/asset/2324
MIT License
135 stars 5 forks source link

Create a mapping of arguments/options to numbers #276

Closed MASSHUU12 closed 2 months ago

MASSHUU12 commented 6 months ago

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 -