mirror of
https://github.com/billsonnn/nitro-renderer.git
synced 2025-01-18 14:36:26 +01:00
Update loading things
This commit is contained in:
parent
d372ecd599
commit
d992214c10
@ -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
|
||||
|
@ -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
|
||||
|
@ -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) =>
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user