You've already forked Nitro_Render_V3
mirror of
https://github.com/duckietm/Nitro_Render_V3.git
synced 2026-06-19 23:16:20 +00:00
🆙 added Backgrounds to the renderer
This commit is contained in:
@@ -0,0 +1,21 @@
|
||||
import { IMessageComposer } from '@nitrots/api';
|
||||
|
||||
export class RoomUnitBackgroundComposer implements IMessageComposer<ConstructorParameters<typeof RoomUnitBackgroundComposer>>
|
||||
{
|
||||
private _data: ConstructorParameters<typeof RoomUnitBackgroundComposer>;
|
||||
|
||||
constructor(backgroundImage: number, backgroundStand: number, backgroundOverlay: number)
|
||||
{
|
||||
this._data = [ backgroundImage, backgroundStand, backgroundOverlay ];
|
||||
}
|
||||
|
||||
public getMessageArray()
|
||||
{
|
||||
return this._data;
|
||||
}
|
||||
|
||||
public dispose(): void
|
||||
{
|
||||
return;
|
||||
}
|
||||
}
|
||||
@@ -1,5 +1,6 @@
|
||||
export * from './chat';
|
||||
export * from './RoomUnitActionComposer';
|
||||
export * from './RoomUnitBackgroundComposer';
|
||||
export * from './RoomUnitDanceComposer';
|
||||
export * from './RoomUnitDropHandItemComposer';
|
||||
export * from './RoomUnitGiveHandItemComposer';
|
||||
|
||||
@@ -7,6 +7,9 @@ export class RoomUnitInfoParser implements IMessageParser
|
||||
private _gender: string;
|
||||
private _motto: string;
|
||||
private _achievementScore: number;
|
||||
private _backgroundId: number;
|
||||
private _standId: number;
|
||||
private _overlayId: number;
|
||||
|
||||
public flush(): boolean
|
||||
{
|
||||
@@ -15,6 +18,9 @@ export class RoomUnitInfoParser implements IMessageParser
|
||||
this._gender = 'M';
|
||||
this._motto = null;
|
||||
this._achievementScore = 0;
|
||||
this._backgroundId = 0;
|
||||
this._standId = 0;
|
||||
this._overlayId = 0;
|
||||
|
||||
return true;
|
||||
}
|
||||
@@ -56,4 +62,19 @@ export class RoomUnitInfoParser implements IMessageParser
|
||||
{
|
||||
return this._achievementScore;
|
||||
}
|
||||
}
|
||||
|
||||
public get backgroundId(): number
|
||||
{
|
||||
return this._backgroundId;
|
||||
}
|
||||
|
||||
public get standId(): number
|
||||
{
|
||||
return this._standId;
|
||||
}
|
||||
|
||||
public get overlayId(): number
|
||||
{
|
||||
return this._overlayId;
|
||||
}
|
||||
}
|
||||
@@ -27,6 +27,9 @@ export class RoomUnitParser implements IMessageParser
|
||||
const id = wrapper.readInt();
|
||||
const username = wrapper.readString();
|
||||
const custom = wrapper.readString();
|
||||
const background = wrapper.readInt();
|
||||
const stand = wrapper.readInt();
|
||||
const overlay = wrapper.readInt();
|
||||
let figure = wrapper.readString();
|
||||
const roomIndex = wrapper.readInt();
|
||||
const x = wrapper.readInt();
|
||||
@@ -40,6 +43,9 @@ export class RoomUnitParser implements IMessageParser
|
||||
user.dir = direction;
|
||||
user.name = username;
|
||||
user.custom = custom;
|
||||
user.background = background;
|
||||
user.stand = stand;
|
||||
user.overlay = overlay;
|
||||
user.x = x;
|
||||
user.y = y;
|
||||
user.z = z;
|
||||
|
||||
@@ -14,6 +14,9 @@ export class UserMessageData
|
||||
private _figure: string = '';
|
||||
private _custom: string = '';
|
||||
private _activityPoints: number = 0;
|
||||
private _background: number = 0;
|
||||
private _stand: number = 0;
|
||||
private _overlay: number = 0
|
||||
private _webID: number = 0;
|
||||
private _groupID: number = 0;
|
||||
private _groupStatus: number = 0;
|
||||
@@ -178,6 +181,36 @@ export class UserMessageData
|
||||
this._activityPoints = k;
|
||||
}
|
||||
}
|
||||
|
||||
public get background(): number
|
||||
{
|
||||
return this._background;
|
||||
}
|
||||
|
||||
public set background(k: number)
|
||||
{
|
||||
this._background = k;
|
||||
}
|
||||
|
||||
public get stand(): number
|
||||
{
|
||||
return this._stand;
|
||||
}
|
||||
|
||||
public set stand(k: number)
|
||||
{
|
||||
this._stand = k;
|
||||
}
|
||||
|
||||
public get overlay(): number
|
||||
{
|
||||
return this._overlay;
|
||||
}
|
||||
|
||||
public set overlay(k: number)
|
||||
{
|
||||
this._overlay = k;
|
||||
}
|
||||
|
||||
public get webID(): number
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user