0
0
mirror of https://github.com/sp-tarkov/server.git synced 2025-02-13 09:50:43 -05:00

Added coreConfig.features.chatbotFeatures.sptFriendGiftsEnabled, default true

This commit is contained in:
Dev 2024-09-24 16:41:02 +01:00
parent 4ea528c381
commit be7e07fa4e
3 changed files with 25 additions and 22 deletions

View File

@ -23,6 +23,7 @@
"compressProfile": false,
"chatbotFeatures": {
"sptFriendEnabled": true,
"sptFriendGiftsEnabled": true,
"commandoEnabled": true,
"commandoFeatures": {
"giveCommandEnabled": true

View File

@ -53,11 +53,11 @@ export class SptDialogueChatBot implements IDialogueChatBot {
const sender = this.profileHelper.getPmcProfile(sessionId);
const sptFriendUser = this.getChatBot();
const giftSent = this.giftService.sendGiftToPlayer(sessionId, request.text);
const requestInput = request.text.toLowerCase();
// only check if entered text is gift code when feature enabled
if (this.coreConfig.features.chatbotFeatures.sptFriendGiftsEnabled) {
const giftSent = this.giftService.sendGiftToPlayer(sessionId, request.text);
if (giftSent === GiftSentResult.SUCCESS) {
this.mailSendService.sendUserMessageToPlayer(
sessionId,
@ -81,6 +81,7 @@ export class SptDialogueChatBot implements IDialogueChatBot {
return;
}
}
if (requestInput.includes("love you")) {
this.mailSendService.sendUserMessageToPlayer(

View File

@ -88,6 +88,7 @@ export interface IServerFeatures {
export interface IChatbotFeatures {
sptFriendEnabled: boolean;
sptFriendGiftsEnabled: boolean;
commandoEnabled: boolean;
commandoFeatures: ICommandoFeatures;
commandUseLimits: Record<string, number>;