feat(furni-editor): import-text packet (10049) for Habbo furnidata fetch

Add FurniEditorImportTextComposer (outgoing 10049) + FurniEditorImportText
ResultEvent/Parser (incoming 10049: found, name, description, classname),
register both in NitroMessages and export from the furnieditor barrels.
Lets the editor pull official names/descriptions from a server-fetched
Habbo furnidata URL.
This commit is contained in:
simoleo89
2026-06-06 15:26:23 +02:00
parent 7da07aa1d5
commit 108a24625f
9 changed files with 96 additions and 1 deletions
File diff suppressed because one or more lines are too long
@@ -496,6 +496,7 @@ export class IncomingHeader
public static FURNI_EDITOR_INTERACTIONS_RESULT = 10043;
public static FURNI_EDITOR_RESULT = 10044;
public static FURNITURE_DATA_RELOAD = 10047;
public static FURNI_EDITOR_IMPORT_TEXT_RESULT = 10049;
// Catalog Admin
public static CATALOG_ADMIN_RESULT = 10059;
@@ -0,0 +1,16 @@
import { IMessageEvent } from '@nitrots/api';
import { MessageEvent } from '@nitrots/events';
import { FurniEditorImportTextResultMessageParser } from '../../parser';
export class FurniEditorImportTextResultEvent extends MessageEvent implements IMessageEvent
{
constructor(callBack: Function)
{
super(callBack, FurniEditorImportTextResultMessageParser);
}
public getParser(): FurniEditorImportTextResultMessageParser
{
return this.parser as FurniEditorImportTextResultMessageParser;
}
}
@@ -1,4 +1,5 @@
export * from './FurniEditorDetailResultEvent';
export * from './FurniEditorImportTextResultEvent';
export * from './FurniEditorInteractionsResultEvent';
export * from './FurniEditorResultEvent';
export * from './FurniEditorSearchResultEvent';
@@ -505,6 +505,7 @@ export class OutgoingHeader
public static FURNI_EDITOR_DELETE = 10045;
public static FURNI_EDITOR_UPDATE_FURNIDATA = 10046;
public static FURNI_EDITOR_REVERT_FURNIDATA = 10048;
public static FURNI_EDITOR_IMPORT_TEXT = 10049;
public static CATALOG_ADMIN_SAVE_PAGE = 10050;
public static CATALOG_ADMIN_CREATE_PAGE = 10051;
@@ -0,0 +1,21 @@
import { IMessageComposer } from '@nitrots/api';
export class FurniEditorImportTextComposer implements IMessageComposer<ConstructorParameters<typeof FurniEditorImportTextComposer>>
{
private _data: ConstructorParameters<typeof FurniEditorImportTextComposer>;
constructor(itemId: number)
{
this._data = [ itemId ];
}
dispose(): void
{
this._data = null;
}
public getMessageArray()
{
return this._data;
}
}
@@ -1,6 +1,7 @@
export * from './FurniEditorBySpriteComposer';
export * from './FurniEditorDeleteComposer';
export * from './FurniEditorDetailComposer';
export * from './FurniEditorImportTextComposer';
export * from './FurniEditorInteractionsComposer';
export * from './FurniEditorRevertFurnidataComposer';
export * from './FurniEditorSearchComposer';
@@ -0,0 +1,51 @@
import { IMessageDataWrapper, IMessageParser } from '@nitrots/api';
export class FurniEditorImportTextResultMessageParser implements IMessageParser
{
private _found: boolean;
private _name: string;
private _description: string;
private _classname: string;
public flush(): boolean
{
this._found = false;
this._name = '';
this._description = '';
this._classname = '';
return true;
}
public parse(wrapper: IMessageDataWrapper): boolean
{
if(!wrapper) return false;
this._found = wrapper.readBoolean();
this._name = wrapper.readString();
this._description = wrapper.readString();
this._classname = wrapper.readString();
return true;
}
public get found(): boolean
{
return this._found;
}
public get name(): string
{
return this._name;
}
public get description(): string
{
return this._description;
}
public get classname(): string
{
return this._classname;
}
}
@@ -1,6 +1,7 @@
export * from './CatalogRefData';
export * from './FurniDetailData';
export * from './FurniEditorDetailResultMessageParser';
export * from './FurniEditorImportTextResultMessageParser';
export * from './FurniEditorInteractionsResultMessageParser';
export * from './FurniEditorResultMessageParser';
export * from './FurniEditorSearchResultMessageParser';