Enable snow for christmas/new years
This commit is contained in:
parent
b70176765e
commit
d1b9cbbfc5
@ -1,5 +1,6 @@
|
||||
{
|
||||
"acceleration": 7,
|
||||
"enableWinterEvent": false,
|
||||
"weather": {
|
||||
"clouds": {
|
||||
"values": [-1.5, -1, 0, 0.5, 1, 1.5],
|
||||
|
@ -24,7 +24,7 @@ export class WeatherController
|
||||
/** Handle client/weather */
|
||||
public generate(): IWeatherData
|
||||
{
|
||||
let result: IWeatherData = { acceleration: 0, time: "", date: "", weather: null, winterEventEnabled: false };
|
||||
let result: IWeatherData = { acceleration: 0, time: "", date: "", weather: null, winterEventEnabled: this.weatherConfig.enableWinterEvent };
|
||||
|
||||
result = this.weatherGenerator.calculateGameTime(result);
|
||||
result.weather = this.weatherGenerator.generateWeather();
|
||||
|
@ -7,6 +7,7 @@ export interface IWeatherConfig extends IBaseConfig
|
||||
kind: "aki-weather";
|
||||
acceleration: number;
|
||||
weather: Weather;
|
||||
enableWinterEvent: boolean;
|
||||
}
|
||||
|
||||
export interface Weather
|
||||
|
@ -10,6 +10,7 @@ import { SeasonalEventType } from "@spt-aki/models/enums/SeasonalEventType";
|
||||
import { IHttpConfig } from "@spt-aki/models/spt/config/IHttpConfig";
|
||||
import { IQuestConfig } from "@spt-aki/models/spt/config/IQuestConfig";
|
||||
import { ISeasonalEvent, ISeasonalEventConfig } from "@spt-aki/models/spt/config/ISeasonalEventConfig";
|
||||
import { IWeatherConfig } from "@spt-aki/models/spt/config/IWeatherConfig";
|
||||
import { ILocationData } from "@spt-aki/models/spt/server/ILocations";
|
||||
import { ILogger } from "@spt-aki/models/spt/utils/ILogger";
|
||||
import { ConfigServer } from "@spt-aki/servers/ConfigServer";
|
||||
@ -24,6 +25,7 @@ export class SeasonalEventService
|
||||
protected seasonalEventConfig: ISeasonalEventConfig;
|
||||
protected questConfig: IQuestConfig;
|
||||
protected httpConfig: IHttpConfig;
|
||||
protected weatherConfig: IWeatherConfig;
|
||||
|
||||
protected halloweenEventActive = undefined;
|
||||
protected christmasEventActive = undefined;
|
||||
@ -42,6 +44,7 @@ export class SeasonalEventService
|
||||
this.seasonalEventConfig = this.configServer.getConfig(ConfigTypes.SEASONAL_EVENT);
|
||||
this.questConfig = this.configServer.getConfig(ConfigTypes.QUEST);
|
||||
this.httpConfig = this.configServer.getConfig(ConfigTypes.HTTP);
|
||||
this.weatherConfig = this.configServer.getConfig(ConfigTypes.WEATHER);
|
||||
|
||||
this.cacheActiveEvents();
|
||||
}
|
||||
@ -325,9 +328,11 @@ export class SeasonalEventService
|
||||
this.addLootItemsToGifterDropItemsList();
|
||||
this.enableDancingTree();
|
||||
this.giveGift(sessionId, "Christmas2022");
|
||||
this.enableSnow();
|
||||
break;
|
||||
case SeasonalEventType.NEW_YEARS.toLowerCase():
|
||||
this.giveGift(sessionId, "NewYear2023");
|
||||
this.enableSnow();
|
||||
break;
|
||||
default:
|
||||
// Likely a mod event
|
||||
@ -550,4 +555,9 @@ export class SeasonalEventService
|
||||
{
|
||||
return this.seasonalEventConfig.eventBotMapping[eventBotRole];
|
||||
}
|
||||
|
||||
public enableSnow(): void
|
||||
{
|
||||
this.weatherConfig.enableWinterEvent = true;
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user