mirror of
https://github.com/billsonnn/nitro-renderer.git
synced 2025-01-18 22:36:27 +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());
|
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
|
||||||
|
@ -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
|
||||||
|
@ -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) =>
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user