feat: Add color role item effect with role swapping and implement item consumption toggle.

This commit is contained in:
syntaxbullet
2025-12-23 21:12:36 +01:00
parent 67d6298793
commit a3099b80c5
5 changed files with 37 additions and 3 deletions

View File

@@ -48,6 +48,7 @@ export interface GameConfigType {
};
studentRole: string;
visitorRole: string;
colorRoles: string[];
welcomeChannelId?: string;
welcomeMessage?: string;
}
@@ -111,6 +112,7 @@ const configSchema = z.object({
}),
studentRole: z.string(),
visitorRole: z.string(),
colorRoles: z.array(z.string()).default([]),
welcomeChannelId: z.string().optional(),
welcomeMessage: z.string().optional()
});

View File

@@ -18,7 +18,8 @@ export type ItemEffect =
| { type: 'ADD_BALANCE'; amount: number }
| { type: 'XP_BOOST'; multiplier: number; durationSeconds?: number; durationMinutes?: number; durationHours?: number }
| { type: 'TEMP_ROLE'; roleId: string; durationSeconds?: number; durationMinutes?: number; durationHours?: number }
| { type: 'REPLY_MESSAGE'; message: string };
| { type: 'REPLY_MESSAGE'; message: string }
| { type: 'COLOR_ROLE'; roleId: string };
export interface ItemUsageData {
consume: boolean;