From de00ac3ef2e5f4678542fa7b2e2bef41096225a9 Mon Sep 17 00:00:00 2001 From: Chomp Date: Fri, 17 Jan 2025 10:44:04 +0000 Subject: [PATCH] Fixed incorrect globals interface and related code (fixes christmas error) --- project/src/callbacks/DataCallbacks.ts | 1 - project/src/controllers/PrestigeController.ts | 1 + project/src/models/eft/common/IGlobals.ts | 3 +-- project/src/services/SeasonalEventService.ts | 2 +- 4 files changed, 3 insertions(+), 4 deletions(-) diff --git a/project/src/callbacks/DataCallbacks.ts b/project/src/callbacks/DataCallbacks.ts index 2a4e4ab6..a293d5ab 100644 --- a/project/src/callbacks/DataCallbacks.ts +++ b/project/src/callbacks/DataCallbacks.ts @@ -44,7 +44,6 @@ export class DataCallbacks { */ public getGlobals(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData { const globals = this.databaseService.getGlobals(); - globals.time = Date.now() / 1000; return this.httpResponse.getBody(this.databaseService.getGlobals()); } diff --git a/project/src/controllers/PrestigeController.ts b/project/src/controllers/PrestigeController.ts index 2af385d7..9f92bb6c 100644 --- a/project/src/controllers/PrestigeController.ts +++ b/project/src/controllers/PrestigeController.ts @@ -88,6 +88,7 @@ export class PrestigeController { } // Skill copy + // TODO - Find what skills should be prestiged over const commonSKillsToCopy = prePrestigePmc.Skills.Common; for (const skillToCopy of commonSKillsToCopy) { // Set progress to max level 20 diff --git a/project/src/models/eft/common/IGlobals.ts b/project/src/models/eft/common/IGlobals.ts index e4cb212f..89622c06 100644 --- a/project/src/models/eft/common/IGlobals.ts +++ b/project/src/models/eft/common/IGlobals.ts @@ -2,11 +2,9 @@ import type { Ixy, Ixyz } from "@spt/models/eft/common/Ixyz"; import type { IItem } from "@spt/models/eft/common/tables/IItem"; export interface IGlobals { - time: number; config: IConfig; LocationInfection: ILocationInfection; bot_presets: IBotPreset[]; - AudioSettings: IAudioSettings; BotWeaponScatterings: IBotWeaponScattering[]; ItemPresets: Record; } @@ -127,6 +125,7 @@ export interface IProjectileExplosionParams { } export interface IConfig { + AudioSettings: IAudioSettings; ArtilleryShelling: IArtilleryShelling; content: IContent; AimPunchMagnitude: number; diff --git a/project/src/services/SeasonalEventService.ts b/project/src/services/SeasonalEventService.ts index eeafbde5..54404598 100644 --- a/project/src/services/SeasonalEventService.ts +++ b/project/src/services/SeasonalEventService.ts @@ -488,7 +488,7 @@ export class SeasonalEventService { const globals = this.databaseService.getGlobals(); globals.config.Airdrop.AirdropViewType = "NewYear"; - const radioSettings = globals.AudioSettings.RadioBroadcastSettings; + const radioSettings = globals.config.AudioSettings.RadioBroadcastSettings; radioSettings.EnabledBroadcast = true; const christmasStation = radioSettings.RadioStations.find((x) => x.Station === "Christmas");