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());
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

View File

@ -4,7 +4,6 @@ import { NitroLogger } from '@nitrots/utils';
import { GetRoomContentLoader } from './GetRoomContentLoader';
import { GetRoomObjectLogicFactory } from './GetRoomObjectLogicFactory';
import { GetRoomObjectVisualizationFactory } from './GetRoomObjectVisualizationFactory';
import { RoomContentLoader } from './RoomContentLoader';
import { RoomInstance } from './RoomInstance';
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_FAILURE, 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

View File

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