Allow enabling snow in raid via SPT friend
This commit is contained in:
parent
51e1f7734e
commit
bde364388f
@ -8,6 +8,7 @@ import { ConfigTypes } from "@spt-aki/models/enums/ConfigTypes";
|
|||||||
import { GiftSentResult } from "@spt-aki/models/enums/GiftSentResult";
|
import { GiftSentResult } from "@spt-aki/models/enums/GiftSentResult";
|
||||||
import { MemberCategory } from "@spt-aki/models/enums/MemberCategory";
|
import { MemberCategory } from "@spt-aki/models/enums/MemberCategory";
|
||||||
import { ICoreConfig } from "@spt-aki/models/spt/config/ICoreConfig";
|
import { ICoreConfig } from "@spt-aki/models/spt/config/ICoreConfig";
|
||||||
|
import { IWeatherConfig } from "@spt-aki/models/spt/config/IWeatherConfig";
|
||||||
import { ConfigServer } from "@spt-aki/servers/ConfigServer";
|
import { ConfigServer } from "@spt-aki/servers/ConfigServer";
|
||||||
import { GiftService } from "@spt-aki/services/GiftService";
|
import { GiftService } from "@spt-aki/services/GiftService";
|
||||||
import { MailSendService } from "@spt-aki/services/MailSendService";
|
import { MailSendService } from "@spt-aki/services/MailSendService";
|
||||||
@ -17,6 +18,8 @@ import { RandomUtil } from "@spt-aki/utils/RandomUtil";
|
|||||||
export class SptDialogueChatBot implements IDialogueChatBot
|
export class SptDialogueChatBot implements IDialogueChatBot
|
||||||
{
|
{
|
||||||
protected coreConfig: ICoreConfig;
|
protected coreConfig: ICoreConfig;
|
||||||
|
protected weatherConfig: IWeatherConfig;
|
||||||
|
|
||||||
public constructor(
|
public constructor(
|
||||||
@inject("ProfileHelper") protected profileHelper: ProfileHelper,
|
@inject("ProfileHelper") protected profileHelper: ProfileHelper,
|
||||||
@inject("RandomUtil") protected randomUtil: RandomUtil,
|
@inject("RandomUtil") protected randomUtil: RandomUtil,
|
||||||
@ -26,6 +29,7 @@ export class SptDialogueChatBot implements IDialogueChatBot
|
|||||||
)
|
)
|
||||||
{
|
{
|
||||||
this.coreConfig = this.configServer.getConfig(ConfigTypes.CORE);
|
this.coreConfig = this.configServer.getConfig(ConfigTypes.CORE);
|
||||||
|
this.weatherConfig = this.configServer.getConfig(ConfigTypes.WEATHER);
|
||||||
}
|
}
|
||||||
|
|
||||||
public getChatBot(): IUserDialogInfo
|
public getChatBot(): IUserDialogInfo
|
||||||
@ -147,6 +151,17 @@ export class SptDialogueChatBot implements IDialogueChatBot
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (request.text.toLowerCase() === "itsonlysnowalan")
|
||||||
|
{
|
||||||
|
this.weatherConfig.forceWinterEvent = true;
|
||||||
|
|
||||||
|
this.mailSendService.sendUserMessageToPlayer(
|
||||||
|
sessionId,
|
||||||
|
sptFriendUser,
|
||||||
|
this.randomUtil.getArrayValue(["Snow will be enabled after your next raid"]),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
return request.dialogId;
|
return request.dialogId;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user