0
0
mirror of https://github.com/sp-tarkov/server.git synced 2025-02-13 06:50:43 -05:00

Fixed incorrect globals interface and related code (fixes christmas error)

This commit is contained in:
Chomp 2025-01-17 10:44:04 +00:00
parent f07ba3fec4
commit de00ac3ef2
4 changed files with 3 additions and 4 deletions

View File

@ -44,7 +44,6 @@ export class DataCallbacks {
*/ */
public getGlobals(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData<IGlobals> { public getGlobals(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData<IGlobals> {
const globals = this.databaseService.getGlobals(); const globals = this.databaseService.getGlobals();
globals.time = Date.now() / 1000;
return this.httpResponse.getBody(this.databaseService.getGlobals()); return this.httpResponse.getBody(this.databaseService.getGlobals());
} }

View File

@ -88,6 +88,7 @@ export class PrestigeController {
} }
// Skill copy // Skill copy
// TODO - Find what skills should be prestiged over
const commonSKillsToCopy = prePrestigePmc.Skills.Common; const commonSKillsToCopy = prePrestigePmc.Skills.Common;
for (const skillToCopy of commonSKillsToCopy) { for (const skillToCopy of commonSKillsToCopy) {
// Set progress to max level 20 // Set progress to max level 20

View File

@ -2,11 +2,9 @@ import type { Ixy, Ixyz } from "@spt/models/eft/common/Ixyz";
import type { IItem } from "@spt/models/eft/common/tables/IItem"; import type { IItem } from "@spt/models/eft/common/tables/IItem";
export interface IGlobals { export interface IGlobals {
time: number;
config: IConfig; config: IConfig;
LocationInfection: ILocationInfection; LocationInfection: ILocationInfection;
bot_presets: IBotPreset[]; bot_presets: IBotPreset[];
AudioSettings: IAudioSettings;
BotWeaponScatterings: IBotWeaponScattering[]; BotWeaponScatterings: IBotWeaponScattering[];
ItemPresets: Record<string, IPreset>; ItemPresets: Record<string, IPreset>;
} }
@ -127,6 +125,7 @@ export interface IProjectileExplosionParams {
} }
export interface IConfig { export interface IConfig {
AudioSettings: IAudioSettings;
ArtilleryShelling: IArtilleryShelling; ArtilleryShelling: IArtilleryShelling;
content: IContent; content: IContent;
AimPunchMagnitude: number; AimPunchMagnitude: number;

View File

@ -488,7 +488,7 @@ export class SeasonalEventService {
const globals = this.databaseService.getGlobals(); const globals = this.databaseService.getGlobals();
globals.config.Airdrop.AirdropViewType = "NewYear"; globals.config.Airdrop.AirdropViewType = "NewYear";
const radioSettings = globals.AudioSettings.RadioBroadcastSettings; const radioSettings = globals.config.AudioSettings.RadioBroadcastSettings;
radioSettings.EnabledBroadcast = true; radioSettings.EnabledBroadcast = true;
const christmasStation = radioSettings.RadioStations.find((x) => x.Station === "Christmas"); const christmasStation = radioSettings.RadioStations.find((x) => x.Station === "Christmas");