add: const to control usage of seasonal splash messages

This commit is contained in:
flx-sta 2024-09-18 17:43:56 -07:00
parent 90641df85f
commit 8dc228125b
1 changed files with 15 additions and 11 deletions

View File

@ -41,6 +41,8 @@ interface Season {
//#region Constants
/** Whether to use seasonal splash messages in general */
const USE_SEASONAL_SPLASH_MESSAGES = false;
/** The weight multiplier for the battles-won splash message */
const BATTLES_WON_WEIGHT_MULTIPLIER = 10;
/** The weight multiplier for the seasonal splash messages */
@ -113,6 +115,7 @@ const seasonalSplashMessages: Season[] = [
export function getSplashMessages(): string[] {
const splashMessages: string[] = [...commonSplashMessages];
if (USE_SEASONAL_SPLASH_MESSAGES) {
// add seasonal splash messages if the season is active
for (const { name, start, end, messages } of seasonalSplashMessages) {
const now = new Date();
@ -127,6 +130,7 @@ export function getSplashMessages(): string[] {
});
}
}
}
return splashMessages.map((message) => `splashMessages:${message}`);
}