You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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)
));
}
The text was updated successfully, but these errors were encountered:
@juzdepeche Thanks for the suggestion. It's been a while since I've touched this project, but I'll take a look into it.
The autoCompletion parameter would most likely need to be a list of strings (and/or a delegate that returns a list of strings). It would be up to the developer to ensure that the provided parameters CAN be converted from string for use in their callback method.
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:
The text was updated successfully, but these errors were encountered: