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,
|
"compressProfile": false,
|
||||||
"chatbotFeatures": {
|
"chatbotFeatures": {
|
||||||
"sptFriendEnabled": true,
|
"sptFriendEnabled": true,
|
||||||
|
"sptFriendGiftsEnabled": true,
|
||||||
"commandoEnabled": true,
|
"commandoEnabled": true,
|
||||||
"commandoFeatures": {
|
"commandoFeatures": {
|
||||||
"giveCommandEnabled": true
|
"giveCommandEnabled": true
|
||||||
|
@ -53,11 +53,11 @@ export class SptDialogueChatBot implements IDialogueChatBot {
|
|||||||
const sender = this.profileHelper.getPmcProfile(sessionId);
|
const sender = this.profileHelper.getPmcProfile(sessionId);
|
||||||
|
|
||||||
const sptFriendUser = this.getChatBot();
|
const sptFriendUser = this.getChatBot();
|
||||||
|
|
||||||
const giftSent = this.giftService.sendGiftToPlayer(sessionId, request.text);
|
|
||||||
|
|
||||||
const requestInput = request.text.toLowerCase();
|
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) {
|
if (giftSent === GiftSentResult.SUCCESS) {
|
||||||
this.mailSendService.sendUserMessageToPlayer(
|
this.mailSendService.sendUserMessageToPlayer(
|
||||||
sessionId,
|
sessionId,
|
||||||
@ -81,6 +81,7 @@ export class SptDialogueChatBot implements IDialogueChatBot {
|
|||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (requestInput.includes("love you")) {
|
if (requestInput.includes("love you")) {
|
||||||
this.mailSendService.sendUserMessageToPlayer(
|
this.mailSendService.sendUserMessageToPlayer(
|
||||||
|
@ -88,6 +88,7 @@ export interface IServerFeatures {
|
|||||||
|
|
||||||
export interface IChatbotFeatures {
|
export interface IChatbotFeatures {
|
||||||
sptFriendEnabled: boolean;
|
sptFriendEnabled: boolean;
|
||||||
|
sptFriendGiftsEnabled: boolean;
|
||||||
commandoEnabled: boolean;
|
commandoEnabled: boolean;
|
||||||
commandoFeatures: ICommandoFeatures;
|
commandoFeatures: ICommandoFeatures;
|
||||||
commandUseLimits: Record<string, number>;
|
commandUseLimits: Record<string, number>;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user