From 07b64aa696e9e9e47dec08ad7edad526362fd50f Mon Sep 17 00:00:00 2001 From: Chomp Date: Sat, 4 Jan 2025 12:47:27 +0000 Subject: [PATCH] Added `hohoho` command to force Christmas --- project/assets/database/locales/server/en.json | 1 + project/src/helpers/Dialogue/SptDialogueChatBot.ts | 13 +++++++++++++ 2 files changed, 14 insertions(+) diff --git a/project/assets/database/locales/server/en.json b/project/assets/database/locales/server/en.json index 69eb574f..2e2f87cb 100644 --- a/project/assets/database/locales/server/en.json +++ b/project/assets/database/locales/server/en.json @@ -729,6 +729,7 @@ "websocket-started": "Started websocket at %s", "chatbot-cannot_accept_any_more_of_gift": "You cannot accept any more of this gift", "chatbot-halloween_event_enabled": "Halloween event has been enabled, restart your game client before starting a raid", + "chatbot-christmas_event_enabled": "Christmas event has been enabled, restart your game client before starting a raid", "chatbot-added_stash_rows_please_restart": "Added 2 rows to stash, please restart your game to see them", "chatbot-snow_enabled": "Snow is enabled for all subsequent raids until the server is restarted" } diff --git a/project/src/helpers/Dialogue/SptDialogueChatBot.ts b/project/src/helpers/Dialogue/SptDialogueChatBot.ts index 63afbb90..35d12659 100644 --- a/project/src/helpers/Dialogue/SptDialogueChatBot.ts +++ b/project/src/helpers/Dialogue/SptDialogueChatBot.ts @@ -182,6 +182,19 @@ export class SptDialogueChatBot implements IDialogueChatBot { } } + if (requestInput === "hohoho") { + const enableEventResult = this.seasonalEventService.forceSeasonalEvent(SeasonalEventType.CHRISTMAS); + if (enableEventResult) { + this.mailSendService.sendUserMessageToPlayer( + sessionId, + sptFriendUser, + this.randomUtil.getArrayValue([ + this.localisationService.getText("chatbot-christmas_event_enabled"), + ]), + ); + } + } + if (requestInput === "givemespace") { const stashRowGiftId = "StashRows"; const maxGiftsToSendCount = this.coreConfig.features.chatbotFeatures.commandUseLimits[stashRowGiftId] ?? 5;