Skip to content

Feature Request: parameter autocompletion #4

@juzdepeche

Description

@juzdepeche

Would be helpful and nice to have a command parameter autocompletion (like the command autocomplete). A way to use it could be to pass a list of values like in the example below.

Usage:

        private static void ConfigureGiveCollectibleCommand()
        {
            DevConsole.AddCommand(Command.Create(
                name: "collectible_give",
                aliases: "",
                helpText: "Gives collectibles to the player",
                p1: Parameter.Create(
                    name: "collectible type",
                    helpText: "The collectible type to give to the player"
--->             autocompletion: new List<CollectibleType>() { CollectibleType.Life, CollectibleType.Ammo, CollectibleType.Mana }
                ),
                p2: Parameter.Create(
                    name: "amount",
                    helpText: "The amount you want to give to the player"
                ),
                callback: (CollectibleType type, int amount) => GiveCollectible(type, amount)
            ));
        }

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions