Even more enum refactorings (not done yet)

- Add common enum icons
- enum def for existing enum types, with color description
This commit is contained in:
Wolfsblvt
2024-06-20 20:33:45 +02:00
parent 7f7ecdcca8
commit 461b1a9d87
18 changed files with 462 additions and 137 deletions

View File

@ -1,5 +1,5 @@
import { SlashCommandClosure } from './SlashCommandClosure.js';
import { getEnumBooleanValues, getEnumIconByValueType } from './SlashCommandCommonEnumsProvider.js';
import { commonEnumProviders } from './SlashCommandCommonEnumsProvider.js';
import { SlashCommandEnumValue } from './SlashCommandEnumValue.js';
import { SlashCommandExecutor } from './SlashCommandExecutor.js';
@ -73,7 +73,7 @@ export class SlashCommandArgument {
this.forceEnum = forceEnum;
// If no enums were set explictly and the type is one where we know possible enum values, we set them here
if (!this.enumList.length && types == ARGUMENT_TYPE.BOOLEAN) this.enumList = getEnumBooleanValues();
if (!this.enumList.length && types == ARGUMENT_TYPE.BOOLEAN) this.enumList = commonEnumProviders.boolean()();
}
}