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:
parent
4ea528c381
commit
be7e07fa4e
@ -23,6 +23,7 @@
|
||||
"compressProfile": false,
|
||||
"chatbotFeatures": {
|
||||
"sptFriendEnabled": true,
|
||||
"sptFriendGiftsEnabled": true,
|
||||
"commandoEnabled": true,
|
||||
"commandoFeatures": {
|
||||
"giveCommandEnabled": true
|
||||
|
@ -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(
|
||||
|
@ -88,6 +88,7 @@ export interface IServerFeatures {
|
||||
|
||||
export interface IChatbotFeatures {
|
||||
sptFriendEnabled: boolean;
|
||||
sptFriendGiftsEnabled: boolean;
|
||||
commandoEnabled: boolean;
|
||||
commandoFeatures: ICommandoFeatures;
|
||||
commandUseLimits: Record<string, number>;
|
||||
|
Loading…
x
Reference in New Issue
Block a user