You've already forked Nitro_Render_V3
mirror of
https://github.com/duckietm/Nitro_Render_V3.git
synced 2026-06-19 15:06:20 +00:00
feat(session): live furnidata reload via mergeFurnitureDataFromUrl
Add SessionDataManager.mergeFurnitureDataFromUrl() + FurnitureDataLoader.mergeFromUrl() to merge a single furnidata chunk (e.g. a custom tier) into the live floor/wall maps at runtime, returning the added entries so callers can also refresh the RoomContentLoader. Lets newly added furniture appear without a full client reload.
This commit is contained in:
committed by
medievalshell
parent
6c07cf8677
commit
e83468563d
@@ -224,6 +224,21 @@ export class SessionDataManager implements ISessionDataManager
|
||||
];
|
||||
}
|
||||
|
||||
// Mergia a runtime un chunk furnidata (es. custom/imported.json5) nelle Map
|
||||
// esistenti, SENZA reload del client. Ritorna gli entry aggiunti cosi il
|
||||
// chiamante puo' aggiornare anche il RoomContentLoader. Fa comparire i furni
|
||||
// appena importati nel catalogo in tempo reale.
|
||||
public async mergeFurnitureDataFromUrl(url: string): Promise<IFurnitureData[]>
|
||||
{
|
||||
if(!url || !url.length) return [];
|
||||
|
||||
const added = await this._furnitureData.mergeFromUrl(url);
|
||||
|
||||
if(added && added.length) GetEventDispatcher().dispatchEvent(new NitroEvent(NitroEventType.SESSION_DATA_UPDATED));
|
||||
|
||||
return added;
|
||||
}
|
||||
|
||||
public async applyFurnitureDataOverrides(url: string): Promise<void>
|
||||
{
|
||||
if(!url || !url.length)
|
||||
|
||||
Reference in New Issue
Block a user