Update loading things

This commit is contained in:
billsonnn 2024-03-26 22:43:29 -04:00
parent d372ecd599
commit d992214c10
3 changed files with 9 additions and 11 deletions

View File

@ -42,6 +42,8 @@ export class RoomContentLoader implements IRoomContentLoader
this.processFurnitureData(GetSessionDataManager().getAllFurnitureData()); this.processFurnitureData(GetSessionDataManager().getAllFurnitureData());
for(const [index, name] of GetConfiguration().getValue<string[]>('pet.types').entries()) this._pets[name] = index; for(const [index, name] of GetConfiguration().getValue<string[]>('pet.types').entries()) this._pets[name] = index;
await Promise.all(RoomContentLoader.MANDATORY_LIBRARIES.map(value => this.downloadAsset(value)));
} }
public processFurnitureData(furnitureData: IFurnitureData[]): void public processFurnitureData(furnitureData: IFurnitureData[]): void

View File

@ -4,7 +4,6 @@ import { NitroLogger } from '@nitrots/utils';
import { GetRoomContentLoader } from './GetRoomContentLoader'; import { GetRoomContentLoader } from './GetRoomContentLoader';
import { GetRoomObjectLogicFactory } from './GetRoomObjectLogicFactory'; import { GetRoomObjectLogicFactory } from './GetRoomObjectLogicFactory';
import { GetRoomObjectVisualizationFactory } from './GetRoomObjectVisualizationFactory'; import { GetRoomObjectVisualizationFactory } from './GetRoomObjectVisualizationFactory';
import { RoomContentLoader } from './RoomContentLoader';
import { RoomInstance } from './RoomInstance'; import { RoomInstance } from './RoomInstance';
import { RoomObjectManager } from './RoomObjectManager'; import { RoomObjectManager } from './RoomObjectManager';
@ -30,10 +29,6 @@ export class RoomManager implements IRoomManager, IRoomInstanceContainer
GetEventDispatcher().addEventListener(RoomContentLoadedEvent.RCLE_SUCCESS, this.onRoomContentLoadedEvent); GetEventDispatcher().addEventListener(RoomContentLoadedEvent.RCLE_SUCCESS, this.onRoomContentLoadedEvent);
GetEventDispatcher().addEventListener(RoomContentLoadedEvent.RCLE_FAILURE, this.onRoomContentLoadedEvent); GetEventDispatcher().addEventListener(RoomContentLoadedEvent.RCLE_FAILURE, this.onRoomContentLoadedEvent);
GetEventDispatcher().addEventListener(RoomContentLoadedEvent.RCLE_CANCEL, this.onRoomContentLoadedEvent); GetEventDispatcher().addEventListener(RoomContentLoadedEvent.RCLE_CANCEL, this.onRoomContentLoadedEvent);
const promises = RoomContentLoader.MANDATORY_LIBRARIES.map(value => GetRoomContentLoader().downloadAsset(value));
await Promise.all(promises);
} }
public getRoomInstance(roomId: string): IRoomInstance public getRoomInstance(roomId: string): IRoomInstance

View File

@ -56,12 +56,13 @@ export class SessionDataManager implements ISessionDataManager
public async init(): Promise<void> public async init(): Promise<void>
{ {
await this._furnitureData.init(); await Promise.all([
await this._productData.init(); this._furnitureData.init(),
this._productData.init(),
this._badgeImageManager.init(); this._badgeImageManager.init(),
this._ignoredUsersManager.init(); this._ignoredUsersManager.init(),
this._groupInformationManager.init(); this._groupInformationManager.init()
]);
GetCommunication().registerMessageEvent(new FigureUpdateEvent((event: FigureUpdateEvent) => GetCommunication().registerMessageEvent(new FigureUpdateEvent((event: FigureUpdateEvent) =>
{ {