fix: fixed renderer typescript errors
This commit is contained in:
parent
23c7eb0a4a
commit
28a2b07db6
|
@ -0,0 +1,24 @@
|
|||
{
|
||||
"jsc": {
|
||||
"target": "es2017",
|
||||
"parser": {
|
||||
"syntax": "typescript",
|
||||
"decorators": true,
|
||||
"dynamicImport": true
|
||||
},
|
||||
"transform": {
|
||||
"decoratorMetadata": true,
|
||||
"legacyDecorator": true
|
||||
},
|
||||
"keepClassNames": true,
|
||||
"externalHelpers": true,
|
||||
"loose": true
|
||||
},
|
||||
"module": {
|
||||
"type": "commonjs",
|
||||
"strict": true,
|
||||
"noInterop": true
|
||||
},
|
||||
"sourceMaps": true,
|
||||
"exclude": ["jest.config.ts",".*\\.spec.tsx?$",".*\\.test.tsx?$","./src/jest-setup.ts$","./**/jest-setup.ts$",".*.js$"]
|
||||
}
|
|
@ -1,5 +1,9 @@
|
|||
{
|
||||
"name": "@nitro/renderer",
|
||||
"version": "0.0.1",
|
||||
"type": "commonjs"
|
||||
"type": "commonjs",
|
||||
"dependencies": {
|
||||
"@swc/helpers": "~0.4.11"
|
||||
},
|
||||
"devDependencies": {}
|
||||
}
|
||||
|
|
|
@ -5,20 +5,28 @@
|
|||
"projectType": "library",
|
||||
"targets": {
|
||||
"build": {
|
||||
"executor": "@nrwl/js:tsc",
|
||||
"outputs": ["{options.outputPath}"],
|
||||
"executor": "@nrwl/js:swc",
|
||||
"outputs": [
|
||||
"{options.outputPath}"
|
||||
],
|
||||
"options": {
|
||||
"outputPath": "dist/libs/renderer",
|
||||
"main": "libs/renderer/src/index.ts",
|
||||
"tsConfig": "libs/renderer/tsconfig.lib.json",
|
||||
"assets": ["libs/renderer/*.md"]
|
||||
"assets": [
|
||||
"libs/renderer/*.md"
|
||||
]
|
||||
}
|
||||
},
|
||||
"lint": {
|
||||
"executor": "@nrwl/linter:eslint",
|
||||
"outputs": ["{options.outputFile}"],
|
||||
"outputs": [
|
||||
"{options.outputFile}"
|
||||
],
|
||||
"options": {
|
||||
"lintFilePatterns": ["libs/renderer/**/*.ts"]
|
||||
"lintFilePatterns": [
|
||||
"libs/renderer/**/*.ts"
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
|
|
|
@ -25,8 +25,7 @@ export class NitroConfiguration {
|
|||
|
||||
return true;
|
||||
} catch (e) {
|
||||
NitroLogger.error(e.stack);
|
||||
|
||||
if (e instanceof Error) NitroLogger.error(e.stack);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -20,7 +20,7 @@ export class CrackableDataType extends ObjectDataBase implements IObjectData {
|
|||
this._target = 0;
|
||||
}
|
||||
|
||||
public parseWrapper(wrapper: IMessageDataWrapper): void {
|
||||
public override parseWrapper(wrapper: IMessageDataWrapper): void {
|
||||
if (!wrapper) return;
|
||||
|
||||
this._state = wrapper.readString();
|
||||
|
@ -30,7 +30,7 @@ export class CrackableDataType extends ObjectDataBase implements IObjectData {
|
|||
super.parseWrapper(wrapper);
|
||||
}
|
||||
|
||||
public initializeFromRoomObjectModel(model: IRoomObjectModel): void {
|
||||
public override initializeFromRoomObjectModel(model: IRoomObjectModel): void {
|
||||
super.initializeFromRoomObjectModel(model);
|
||||
|
||||
this._state = model.getValue<string>(RoomObjectVariable.FURNITURE_CRACKABLE_STATE);
|
||||
|
@ -38,7 +38,7 @@ export class CrackableDataType extends ObjectDataBase implements IObjectData {
|
|||
this._target = model.getValue<number>(RoomObjectVariable.FURNITURE_CRACKABLE_TARGET);
|
||||
}
|
||||
|
||||
public writeRoomObjectModel(model: IRoomObjectModel): void {
|
||||
public override writeRoomObjectModel(model: IRoomObjectModel): void {
|
||||
super.writeRoomObjectModel(model);
|
||||
|
||||
model.setValue(RoomObjectVariable.FURNITURE_DATA_FORMAT, CrackableDataType.FORMAT_KEY);
|
||||
|
@ -47,11 +47,11 @@ export class CrackableDataType extends ObjectDataBase implements IObjectData {
|
|||
model.setValue(RoomObjectVariable.FURNITURE_CRACKABLE_TARGET, this._target);
|
||||
}
|
||||
|
||||
public getLegacyString(): string {
|
||||
public override getLegacyString(): string {
|
||||
return this._state;
|
||||
}
|
||||
|
||||
public compare(data: IObjectData): boolean {
|
||||
public override compare(data: IObjectData): boolean {
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
|
@ -10,7 +10,7 @@ export class EmptyDataType extends ObjectDataBase implements IObjectData {
|
|||
|
||||
private _state: string;
|
||||
|
||||
public parseWrapper(wrapper: IMessageDataWrapper): void {
|
||||
public override parseWrapper(wrapper: IMessageDataWrapper): void {
|
||||
if (!wrapper) return;
|
||||
|
||||
this._state = "";
|
||||
|
@ -18,17 +18,17 @@ export class EmptyDataType extends ObjectDataBase implements IObjectData {
|
|||
super.parseWrapper(wrapper);
|
||||
}
|
||||
|
||||
public writeRoomObjectModel(model: IRoomObjectModel): void {
|
||||
public override writeRoomObjectModel(model: IRoomObjectModel): void {
|
||||
super.writeRoomObjectModel(model);
|
||||
|
||||
model.setValue(RoomObjectVariable.FURNITURE_DATA_FORMAT, EmptyDataType.FORMAT_KEY);
|
||||
}
|
||||
|
||||
public getLegacyString(): string {
|
||||
public override getLegacyString(): string {
|
||||
return this._state;
|
||||
}
|
||||
|
||||
public compare(data: IObjectData): boolean {
|
||||
public override compare(data: IObjectData): boolean {
|
||||
return super.compare(data);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -23,7 +23,7 @@ export class HighScoreDataType extends ObjectDataBase implements IObjectData {
|
|||
this._entries = [];
|
||||
}
|
||||
|
||||
public parseWrapper(wrapper: IMessageDataWrapper): void {
|
||||
public override parseWrapper(wrapper: IMessageDataWrapper): void {
|
||||
if (!wrapper) return;
|
||||
|
||||
this._state = wrapper.readString();
|
||||
|
@ -53,7 +53,7 @@ export class HighScoreDataType extends ObjectDataBase implements IObjectData {
|
|||
super.parseWrapper(wrapper);
|
||||
}
|
||||
|
||||
public initializeFromRoomObjectModel(model: IRoomObjectModel): void {
|
||||
public override initializeFromRoomObjectModel(model: IRoomObjectModel): void {
|
||||
this._scoreType = model.getValue<number>(RoomObjectVariable.FURNITURE_HIGHSCORE_SCORE_TYPE);
|
||||
this._clearType = model.getValue<number>(RoomObjectVariable.FURNITURE_HIGHSCORE_CLEAR_TYPE);
|
||||
this._entries = [];
|
||||
|
@ -76,7 +76,7 @@ export class HighScoreDataType extends ObjectDataBase implements IObjectData {
|
|||
super.initializeFromRoomObjectModel(model);
|
||||
}
|
||||
|
||||
public writeRoomObjectModel(model: IRoomObjectModel): void {
|
||||
public override writeRoomObjectModel(model: IRoomObjectModel): void {
|
||||
super.writeRoomObjectModel(model);
|
||||
|
||||
model.setValue(RoomObjectVariable.FURNITURE_DATA_FORMAT, HighScoreDataType.FORMAT_KEY);
|
||||
|
@ -99,7 +99,7 @@ export class HighScoreDataType extends ObjectDataBase implements IObjectData {
|
|||
}
|
||||
}
|
||||
|
||||
public getLegacyString(): string {
|
||||
public override getLegacyString(): string {
|
||||
return this._state;
|
||||
}
|
||||
|
||||
|
|
|
@ -16,7 +16,7 @@ export class LegacyDataType extends ObjectDataBase implements IObjectData {
|
|||
this._data = "";
|
||||
}
|
||||
|
||||
public parseWrapper(wrapper: IMessageDataWrapper): void {
|
||||
public override parseWrapper(wrapper: IMessageDataWrapper): void {
|
||||
if (!wrapper) return;
|
||||
|
||||
this._data = wrapper.readString();
|
||||
|
@ -24,24 +24,24 @@ export class LegacyDataType extends ObjectDataBase implements IObjectData {
|
|||
super.parseWrapper(wrapper);
|
||||
}
|
||||
|
||||
public initializeFromRoomObjectModel(model: IRoomObjectModel): void {
|
||||
public override initializeFromRoomObjectModel(model: IRoomObjectModel): void {
|
||||
super.initializeFromRoomObjectModel(model);
|
||||
|
||||
this._data = model.getValue<string>(RoomObjectVariable.FURNITURE_DATA);
|
||||
}
|
||||
|
||||
public writeRoomObjectModel(model: IRoomObjectModel): void {
|
||||
public override writeRoomObjectModel(model: IRoomObjectModel): void {
|
||||
super.writeRoomObjectModel(model);
|
||||
|
||||
model.setValue(RoomObjectVariable.FURNITURE_DATA_FORMAT, LegacyDataType.FORMAT_KEY);
|
||||
model.setValue(RoomObjectVariable.FURNITURE_DATA, this._data);
|
||||
}
|
||||
|
||||
public getLegacyString(): string {
|
||||
public override getLegacyString(): string {
|
||||
return this._data;
|
||||
}
|
||||
|
||||
public compare(data: IObjectData): boolean {
|
||||
public override compare(data: IObjectData): boolean {
|
||||
return this._data === data.getLegacyString();
|
||||
}
|
||||
|
||||
|
|
|
@ -19,7 +19,7 @@ export class MapDataType extends ObjectDataBase {
|
|||
this._data = {};
|
||||
}
|
||||
|
||||
public parseWrapper(wrapper: IMessageDataWrapper): void {
|
||||
public override parseWrapper(wrapper: IMessageDataWrapper): void {
|
||||
if (!wrapper) return;
|
||||
|
||||
this._data = {};
|
||||
|
@ -31,20 +31,20 @@ export class MapDataType extends ObjectDataBase {
|
|||
super.parseWrapper(wrapper);
|
||||
}
|
||||
|
||||
public initializeFromRoomObjectModel(model: IRoomObjectModel): void {
|
||||
public override initializeFromRoomObjectModel(model: IRoomObjectModel): void {
|
||||
super.initializeFromRoomObjectModel(model);
|
||||
|
||||
this._data = model.getValue<{[index: string]: string}>(RoomObjectVariable.FURNITURE_DATA) || {};
|
||||
}
|
||||
|
||||
public writeRoomObjectModel(model: IRoomObjectModel): void {
|
||||
public override writeRoomObjectModel(model: IRoomObjectModel): void {
|
||||
super.writeRoomObjectModel(model);
|
||||
|
||||
model.setValue(RoomObjectVariable.FURNITURE_DATA_FORMAT, MapDataType.FORMAT_KEY);
|
||||
model.setValue(RoomObjectVariable.FURNITURE_DATA, this._data);
|
||||
}
|
||||
|
||||
public getLegacyString(): string {
|
||||
public override getLegacyString(): string {
|
||||
if (!this._data) return "";
|
||||
|
||||
const state = this._data[MapDataType.STATE];
|
||||
|
@ -54,7 +54,7 @@ export class MapDataType extends ObjectDataBase {
|
|||
return state;
|
||||
}
|
||||
|
||||
public compare(data: IObjectData): boolean {
|
||||
public override compare(data: IObjectData): boolean {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@ -62,7 +62,7 @@ export class MapDataType extends ObjectDataBase {
|
|||
return this._data[key];
|
||||
}
|
||||
|
||||
public get rarityLevel(): number {
|
||||
public override get rarityLevel(): number {
|
||||
if (!this._data) return -1;
|
||||
|
||||
const state = this._data[MapDataType.RARITY];
|
||||
|
|
|
@ -18,7 +18,7 @@ export class NumberDataType extends ObjectDataBase {
|
|||
this._data = [];
|
||||
}
|
||||
|
||||
public parseWrapper(wrapper: IMessageDataWrapper): void {
|
||||
public override parseWrapper(wrapper: IMessageDataWrapper): void {
|
||||
if (!wrapper) return;
|
||||
|
||||
this._data = [];
|
||||
|
@ -30,26 +30,26 @@ export class NumberDataType extends ObjectDataBase {
|
|||
super.parseWrapper(wrapper);
|
||||
}
|
||||
|
||||
public initializeFromRoomObjectModel(model: IRoomObjectModel): void {
|
||||
public override initializeFromRoomObjectModel(model: IRoomObjectModel): void {
|
||||
super.initializeFromRoomObjectModel(model);
|
||||
|
||||
this._data = model.getValue<number[]>(RoomObjectVariable.FURNITURE_DATA);
|
||||
}
|
||||
|
||||
public writeRoomObjectModel(model: IRoomObjectModel): void {
|
||||
public override writeRoomObjectModel(model: IRoomObjectModel): void {
|
||||
super.writeRoomObjectModel(model);
|
||||
|
||||
model.setValue(RoomObjectVariable.FURNITURE_DATA_FORMAT, NumberDataType.FORMAT_KEY);
|
||||
model.setValue(RoomObjectVariable.FURNITURE_DATA, this._data);
|
||||
}
|
||||
|
||||
public getLegacyString(): string {
|
||||
public override getLegacyString(): string {
|
||||
if (!this._data || !this._data.length) return "";
|
||||
|
||||
return this._data[NumberDataType.STATE].toString();
|
||||
}
|
||||
|
||||
public compare(data: IObjectData): boolean {
|
||||
public override compare(data: IObjectData): boolean {
|
||||
if (!(data instanceof NumberDataType)) return false;
|
||||
|
||||
let i = 0;
|
||||
|
|
|
@ -18,7 +18,7 @@ export class StringDataType extends ObjectDataBase {
|
|||
this._data = [];
|
||||
}
|
||||
|
||||
public parseWrapper(wrapper: IMessageDataWrapper): void {
|
||||
public override parseWrapper(wrapper: IMessageDataWrapper): void {
|
||||
if (!wrapper) return;
|
||||
|
||||
this._data = [];
|
||||
|
@ -30,26 +30,26 @@ export class StringDataType extends ObjectDataBase {
|
|||
super.parseWrapper(wrapper);
|
||||
}
|
||||
|
||||
public initializeFromRoomObjectModel(model: IRoomObjectModel): void {
|
||||
public override initializeFromRoomObjectModel(model: IRoomObjectModel): void {
|
||||
super.initializeFromRoomObjectModel(model);
|
||||
|
||||
this._data = model.getValue<string[]>(RoomObjectVariable.FURNITURE_DATA);
|
||||
}
|
||||
|
||||
public writeRoomObjectModel(model: IRoomObjectModel): void {
|
||||
public override writeRoomObjectModel(model: IRoomObjectModel): void {
|
||||
super.writeRoomObjectModel(model);
|
||||
|
||||
model.setValue(RoomObjectVariable.FURNITURE_DATA_FORMAT, StringDataType.FORMAT_KEY);
|
||||
model.setValue(RoomObjectVariable.FURNITURE_DATA, this._data);
|
||||
}
|
||||
|
||||
public getLegacyString(): string {
|
||||
public override getLegacyString(): string {
|
||||
if (!this._data || !this._data.length) return "";
|
||||
|
||||
return this._data[StringDataType.STATE];
|
||||
}
|
||||
|
||||
public compare(data: IObjectData): boolean {
|
||||
public override compare(data: IObjectData): boolean {
|
||||
if (!(data instanceof StringDataType)) return false;
|
||||
|
||||
let i = 0;
|
||||
|
|
|
@ -18,7 +18,7 @@ export class VoteDataType extends ObjectDataBase {
|
|||
this._result = 0;
|
||||
}
|
||||
|
||||
public parseWrapper(wrapper: IMessageDataWrapper): void {
|
||||
public override parseWrapper(wrapper: IMessageDataWrapper): void {
|
||||
if (!wrapper) return;
|
||||
|
||||
this._state = wrapper.readString();
|
||||
|
@ -27,7 +27,7 @@ export class VoteDataType extends ObjectDataBase {
|
|||
super.parseWrapper(wrapper);
|
||||
}
|
||||
|
||||
public writeRoomObjectModel(model: IRoomObjectModel): void {
|
||||
public override writeRoomObjectModel(model: IRoomObjectModel): void {
|
||||
super.writeRoomObjectModel(model);
|
||||
|
||||
model.setValue(RoomObjectVariable.FURNITURE_DATA_FORMAT, VoteDataType.FORMAT_KEY);
|
||||
|
@ -40,11 +40,11 @@ export class VoteDataType extends ObjectDataBase {
|
|||
model.setValue(RoomObjectVariable.FURNITURE_DATA, data);
|
||||
}
|
||||
|
||||
public getLegacyString(): string {
|
||||
public override getLegacyString(): string {
|
||||
return this._state;
|
||||
}
|
||||
|
||||
public compare(data: IObjectData): boolean {
|
||||
public override compare(data: IObjectData): boolean {
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
|
@ -17,7 +17,7 @@ export class NitroCore extends Disposable implements INitroCore {
|
|||
this._communication = new CommunicationManager();
|
||||
}
|
||||
|
||||
protected onDispose(): void {
|
||||
protected override onDispose(): void {
|
||||
if (this._communication) {
|
||||
this._communication.dispose();
|
||||
|
||||
|
|
|
@ -10,7 +10,7 @@ export class EventDispatcher extends Disposable implements IEventDispatcher, IDi
|
|||
this._listeners = new Map();
|
||||
}
|
||||
|
||||
protected onDispose(): void {
|
||||
protected override onDispose(): void {
|
||||
this.removeAllListeners();
|
||||
|
||||
super.onDispose();
|
||||
|
@ -76,9 +76,8 @@ export class EventDispatcher extends Disposable implements IEventDispatcher, IDi
|
|||
|
||||
try {
|
||||
callback(event);
|
||||
} catch (err) {
|
||||
NitroLogger.error(err.stack);
|
||||
|
||||
} catch (e) {
|
||||
if (e instanceof Error) NitroLogger.error(e.stack);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -32,7 +32,7 @@ export class NitroManager extends Disposable implements INitroManager {
|
|||
return;
|
||||
}
|
||||
|
||||
protected onDispose(): void {
|
||||
protected override onDispose(): void {
|
||||
if (this._events) this._events.dispose();
|
||||
|
||||
super.onDispose();
|
||||
|
|
|
@ -11,7 +11,7 @@ export class CommunicationManager extends Disposable implements ICommunicationMa
|
|||
this._connections = [];
|
||||
}
|
||||
|
||||
protected onDispose(): void {
|
||||
protected override onDispose(): void {
|
||||
if (!this._connections || !this._connections.length) return;
|
||||
|
||||
for (const connection of this._connections.values()) connection && connection.dispose();
|
||||
|
@ -20,7 +20,7 @@ export class CommunicationManager extends Disposable implements ICommunicationMa
|
|||
public createConnection(stateListener: IConnectionStateListener = null): IConnection {
|
||||
const connection = new SocketConnection(this, stateListener);
|
||||
|
||||
if (!connection) return;
|
||||
if (!connection) return null;
|
||||
|
||||
this._connections.push(connection);
|
||||
|
||||
|
|
|
@ -59,7 +59,7 @@ export class SocketConnection extends EventDispatcher implements IConnection {
|
|||
this.createSocket(socketUrl);
|
||||
}
|
||||
|
||||
protected onDispose(): void {
|
||||
protected override onDispose(): void {
|
||||
super.onDispose();
|
||||
|
||||
this.destroySocket();
|
||||
|
@ -115,7 +115,7 @@ export class SocketConnection extends EventDispatcher implements IConnection {
|
|||
this.dispatchConnectionEvent(SocketConnectionEvent.CONNECTION_OPENED, event);
|
||||
}
|
||||
|
||||
private onClose(event: CloseEvent): void {
|
||||
private onClose(event: Event): void {
|
||||
this.dispatchConnectionEvent(SocketConnectionEvent.CONNECTION_CLOSED, event);
|
||||
}
|
||||
|
||||
|
@ -123,8 +123,9 @@ export class SocketConnection extends EventDispatcher implements IConnection {
|
|||
this.dispatchConnectionEvent(SocketConnectionEvent.CONNECTION_ERROR, event);
|
||||
}
|
||||
|
||||
private onMessage(event: MessageEvent): void {
|
||||
private onMessage(event: Event): void {
|
||||
if (!event) return;
|
||||
if (!(event instanceof MessageEvent)) return;
|
||||
|
||||
//this.dispatchConnectionEvent(SocketConnectionEvent.CONNECTION_MESSAGE, event);
|
||||
|
||||
|
@ -257,7 +258,7 @@ export class SocketConnection extends EventDispatcher implements IConnection {
|
|||
if (!events || !events.length) {
|
||||
NitroLogger.packets("IncomingMessage", wrapper.header, "UNREGISTERED", wrapper);
|
||||
|
||||
return;
|
||||
return null;
|
||||
}
|
||||
|
||||
try {
|
||||
|
|
|
@ -81,11 +81,11 @@ export class MessageClassManager {
|
|||
}
|
||||
|
||||
public getEvents(header: number): IMessageEvent[] {
|
||||
if (!header) return;
|
||||
if (!header) return null;
|
||||
|
||||
const existing = this._messageInstancesById.get(header);
|
||||
|
||||
if (!existing) return;
|
||||
if (!existing) return null;
|
||||
|
||||
return existing;
|
||||
}
|
||||
|
|
|
@ -19,7 +19,7 @@ export class ConfigurationManager extends NitroManager implements IConfiguration
|
|||
this.onConfigurationLoaded = this.onConfigurationLoaded.bind(this);
|
||||
}
|
||||
|
||||
protected onInit(): void {
|
||||
protected override onInit(): void {
|
||||
NitroConfiguration.parseConfiguration(this.getDefaultConfig(), true);
|
||||
|
||||
this._pendingUrls = NitroConfiguration.getValue<string[]>("config.urls").slice();
|
||||
|
|
|
@ -74,7 +74,7 @@ export class AvatarRenderManager extends NitroManager implements IAvatarRenderMa
|
|||
this.onAvatarStructureDownloadDone = this.onAvatarStructureDownloadDone.bind(this);
|
||||
}
|
||||
|
||||
public onInit(): void {
|
||||
public override onInit(): void {
|
||||
this._structure = new AvatarStructure(this);
|
||||
|
||||
this.loadGeometry();
|
||||
|
@ -104,7 +104,7 @@ export class AvatarRenderManager extends NitroManager implements IAvatarRenderMa
|
|||
this.checkReady();
|
||||
}
|
||||
|
||||
public onDispose(): void {
|
||||
public override onDispose(): void {
|
||||
if (this._avatarAssetDownloadManager) {
|
||||
this._avatarAssetDownloadManager.removeEventListener(AvatarAssetDownloadManager.DOWNLOADER_READY, this.onAvatarAssetDownloaderReady);
|
||||
|
||||
|
|
|
@ -49,7 +49,7 @@ export class AvatarStructure extends EventDispatcher {
|
|||
|
||||
public init(): void {}
|
||||
|
||||
public dispose(): void {
|
||||
public override dispose(): void {
|
||||
if (this.disposed) return;
|
||||
|
||||
super.dispose();
|
||||
|
|
|
@ -9,7 +9,7 @@ export class PlaceHolderAvatarImage extends AvatarImage {
|
|||
super(k, _arg_2, _arg_3, _arg_4, _arg_5, null);
|
||||
}
|
||||
|
||||
public isPlaceholder(): boolean {
|
||||
public override isPlaceholder(): boolean {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -37,7 +37,7 @@ export class GeometryItem extends Node3D {
|
|||
return this._isDoubleSided;
|
||||
}
|
||||
|
||||
public toString(): string {
|
||||
public override toString(): string {
|
||||
return this._id + ": " + this.location + " - " + this.transformedLocation;
|
||||
}
|
||||
|
||||
|
|
|
@ -36,7 +36,7 @@ export class NitroCommunicationDemo extends NitroManager implements INitroCommun
|
|||
this.sendPong = this.sendPong.bind(this);
|
||||
}
|
||||
|
||||
protected onInit(): void {
|
||||
protected override onInit(): void {
|
||||
const connection = this._communication.connection;
|
||||
|
||||
if (connection) {
|
||||
|
@ -49,7 +49,7 @@ export class NitroCommunicationDemo extends NitroManager implements INitroCommun
|
|||
this._communication.registerMessageEvent(new AuthenticatedEvent(this.onAuthenticatedEvent.bind(this)));
|
||||
}
|
||||
|
||||
protected onDispose(): void {
|
||||
protected override onDispose(): void {
|
||||
const connection = this._communication.connection;
|
||||
|
||||
if (connection) {
|
||||
|
|
|
@ -38,7 +38,7 @@ export class NitroCommunicationManager extends NitroManager implements INitroCom
|
|||
this.onConnectionAuthenticatedEvent = this.onConnectionAuthenticatedEvent.bind(this);
|
||||
}
|
||||
|
||||
protected onInit(): void {
|
||||
protected override onInit(): void {
|
||||
if (this._connection) return;
|
||||
|
||||
Nitro.instance.events.addEventListener(NitroCommunicationDemoEvent.CONNECTION_AUTHENTICATED, this.onConnectionAuthenticatedEvent);
|
||||
|
@ -56,7 +56,7 @@ export class NitroCommunicationManager extends NitroManager implements INitroCom
|
|||
this._connection.init(NitroConfiguration.getValue<string>("socket.url"));
|
||||
}
|
||||
|
||||
protected onDispose(): void {
|
||||
protected override onDispose(): void {
|
||||
if (this._demo) this._demo.dispose();
|
||||
|
||||
if (this._connection) {
|
||||
|
|
|
@ -14,7 +14,7 @@ export class ExtendedForumData extends ForumData {
|
|||
private _canChangeSettings: boolean;
|
||||
private _isStaff: boolean;
|
||||
|
||||
public static parse(wrapper: IMessageDataWrapper): ExtendedForumData {
|
||||
public static override parse(wrapper: IMessageDataWrapper): ExtendedForumData {
|
||||
const extendedForumData: ExtendedForumData = new ExtendedForumData();
|
||||
|
||||
ForumData.fillFromMessage(extendedForumData, wrapper);
|
||||
|
|
|
@ -101,6 +101,7 @@ export class RoomUnitStatusParser implements IMessageParser {
|
|||
new RoomUnitStatusMessage(unitId, x, y, z, height, headDirection, direction, targetX, targetY, targetZ, didMove, canStandUp, statusActions)
|
||||
);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
public get statuses(): RoomUnitStatusMessage[] {
|
||||
|
|
|
@ -14,7 +14,7 @@ export class ConditionDefinition extends Triggerable {
|
|||
return this._type;
|
||||
}
|
||||
|
||||
public get code(): number {
|
||||
public override get code(): number {
|
||||
return this._type;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -20,7 +20,7 @@ export class TriggerDefinition extends Triggerable {
|
|||
}
|
||||
}
|
||||
|
||||
public get code(): number {
|
||||
public override get code(): number {
|
||||
return this._triggerConf;
|
||||
}
|
||||
|
||||
|
|
|
@ -26,7 +26,7 @@ export class WiredActionDefinition extends Triggerable {
|
|||
return this._type;
|
||||
}
|
||||
|
||||
public get code(): number {
|
||||
public override get code(): number {
|
||||
return this._type;
|
||||
}
|
||||
|
||||
|
|
|
@ -54,7 +54,7 @@ export class NitroLocalizationManager extends NitroManager implements INitroLoca
|
|||
this._pendingUrls = [];
|
||||
}
|
||||
|
||||
protected onInit(): void {
|
||||
protected override onInit(): void {
|
||||
this._communication.registerMessageEvent(new BadgePointLimitsEvent(this.onBadgePointLimitsEvent.bind(this)));
|
||||
|
||||
let urls: string[] = NitroConfiguration.getValue<string[]>("external.texts.url");
|
||||
|
|
|
@ -358,6 +358,7 @@ export class RoomContentLoader implements IFurnitureDataListener, IRoomContentLo
|
|||
|
||||
this._petColors.set(petIndex, palettes);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
public getPlaceholderName(type: string): string {
|
||||
|
|
|
@ -212,7 +212,7 @@ export class RoomEngine
|
|||
this.onBadgeImageReadyEvent = this.onBadgeImageReadyEvent.bind(this);
|
||||
}
|
||||
|
||||
public onInit(): void {
|
||||
public override onInit(): void {
|
||||
if (this._ready) return;
|
||||
|
||||
this._imageObjectIdBank = new NumberBank(1000);
|
||||
|
@ -247,7 +247,7 @@ export class RoomEngine
|
|||
document.addEventListener("visibilitychange", this.runVisibilityUpdate);
|
||||
}
|
||||
|
||||
public onDispose(): void {
|
||||
public override onDispose(): void {
|
||||
if (!this._ready) return;
|
||||
|
||||
for (const [key, value] of this._roomInstanceDatas) {
|
||||
|
@ -394,7 +394,7 @@ export class RoomEngine
|
|||
landscapeType: string,
|
||||
worldType: string
|
||||
): IRoomInstance {
|
||||
if (!this._ready || !this._roomManager) return;
|
||||
if (!this._ready || !this._roomManager) return null;
|
||||
|
||||
const instance = this._roomManager.createRoomInstance(this.getRoomId(roomId));
|
||||
|
||||
|
@ -633,7 +633,7 @@ export class RoomEngine
|
|||
const x = ~~point.x;
|
||||
const y = ~~point.y;
|
||||
|
||||
if (renderingCanvas.screenOffsetX === x && renderingCanvas.screenOffsetY === y) return;
|
||||
if (renderingCanvas.screenOffsetX === x && renderingCanvas.screenOffsetY === y) return false;
|
||||
|
||||
this.events.dispatchEvent(new RoomDragEvent(roomId, -(renderingCanvas.screenOffsetX - x), -(renderingCanvas.screenOffsetY - y)));
|
||||
|
||||
|
@ -2543,22 +2543,25 @@ export class RoomEngine
|
|||
if (!this._roomObjectEventHandler) return false;
|
||||
|
||||
this._roomObjectEventHandler.modifyRoomObject(this._activeRoomId, objectId, category, operation);
|
||||
return true;
|
||||
}
|
||||
|
||||
public modifyRoomObjectDataWithMap(objectId: number, category: number, operation: string, data: Map<string, string>): boolean {
|
||||
if (!this._roomObjectEventHandler) return false;
|
||||
|
||||
if (category !== RoomObjectCategory.FLOOR) return;
|
||||
if (category !== RoomObjectCategory.FLOOR) return false;
|
||||
|
||||
this._roomObjectEventHandler.modifyRoomObjectDataWithMap(this._activeRoomId, objectId, category, operation, data);
|
||||
return true;
|
||||
}
|
||||
|
||||
public modifyRoomObjectData(objectId: number, category: number, colorHex: string, data: string): boolean {
|
||||
if (!this._roomObjectEventHandler) return false;
|
||||
|
||||
if (category !== RoomObjectCategory.WALL) return;
|
||||
if (category !== RoomObjectCategory.WALL) return false;
|
||||
|
||||
this._roomObjectEventHandler.modifyWallItemData(this._activeRoomId, objectId, colorHex, data);
|
||||
return true;
|
||||
}
|
||||
|
||||
private processRoomObjectEvent(event: RoomObjectEvent): void {
|
||||
|
@ -2654,7 +2657,7 @@ export class RoomEngine
|
|||
}
|
||||
|
||||
private addOverlayIconSprite(k: NitroSprite, _arg_2: string, _arg_3: Texture<Resource>, scale: number = 1): NitroSprite {
|
||||
if (!k || !_arg_3) return;
|
||||
if (!k || !_arg_3) return null;
|
||||
|
||||
let sprite = this.getOverlayIconSprite(k, _arg_2);
|
||||
|
||||
|
|
|
@ -94,7 +94,7 @@ export class RoomMessageHandler extends Disposable {
|
|||
this._requesterId = -1;
|
||||
}
|
||||
|
||||
protected onDispose(): void {
|
||||
protected override onDispose(): void {
|
||||
super.onDispose();
|
||||
|
||||
this._connection = null;
|
||||
|
|
|
@ -117,7 +117,7 @@ export class RoomObjectEventHandler extends Disposable implements IRoomCanvasMou
|
|||
this._roomEngine.events.addEventListener(RoomEngineObjectEvent.ADDED, this.onRoomEngineObjectEvent);
|
||||
}
|
||||
|
||||
public dispose(): void {
|
||||
public override dispose(): void {
|
||||
if (this._eventIds) {
|
||||
this._eventIds = null;
|
||||
}
|
||||
|
@ -1618,7 +1618,7 @@ export class RoomObjectEventHandler extends Disposable implements IRoomCanvasMou
|
|||
_arg_2.objectType === RoomObjectUserType.RENTABLE_BOT ||
|
||||
_arg_2.objectType === RoomObjectUserType.MONSTER_PLANT
|
||||
)
|
||||
return;
|
||||
return false;
|
||||
|
||||
const _local_3 = this._roomEngine.getRoomObject(k, _arg_2.objectId, RoomObjectCategory.FLOOR);
|
||||
const _local_4 = this.getActiveSurfaceLocation(_local_3, _arg_2);
|
||||
|
|
|
@ -26,13 +26,13 @@ export class MovingObjectLogic extends RoomObjectLogicBase {
|
|||
this._updateInterval = MovingObjectLogic.DEFAULT_UPDATE_INTERVAL;
|
||||
}
|
||||
|
||||
protected onDispose(): void {
|
||||
protected override onDispose(): void {
|
||||
this._liftAmount = 0;
|
||||
|
||||
super.onDispose();
|
||||
}
|
||||
|
||||
public update(time: number): void {
|
||||
public override update(time: number): void {
|
||||
super.update(time);
|
||||
|
||||
const locationOffset = this.getLocationOffset();
|
||||
|
@ -85,13 +85,13 @@ export class MovingObjectLogic extends RoomObjectLogicBase {
|
|||
this._lastUpdateTime = this.time;
|
||||
}
|
||||
|
||||
public setObject(object: IRoomObjectController): void {
|
||||
public override setObject(object: IRoomObjectController): void {
|
||||
super.setObject(object);
|
||||
|
||||
if (object) this._location.assign(object.getLocation());
|
||||
}
|
||||
|
||||
public processUpdateMessage(message: IRoomObjectUpdateMessage): void {
|
||||
public override processUpdateMessage(message: IRoomObjectUpdateMessage): void {
|
||||
if (!message) return;
|
||||
|
||||
super.processUpdateMessage(message);
|
||||
|
|
|
@ -72,7 +72,7 @@ export class AvatarLogic extends MovingObjectLogic {
|
|||
this._numberValueEndTimestamp = 0;
|
||||
}
|
||||
|
||||
public getEventTypes(): string[] {
|
||||
public override getEventTypes(): string[] {
|
||||
const types = [
|
||||
RoomObjectMouseEvent.CLICK,
|
||||
RoomObjectMouseEvent.DOUBLE_CLICK,
|
||||
|
@ -86,7 +86,7 @@ export class AvatarLogic extends MovingObjectLogic {
|
|||
return this.mergeTypes(super.getEventTypes(), types);
|
||||
}
|
||||
|
||||
public dispose(): void {
|
||||
public override dispose(): void {
|
||||
if (this._selected && this.object) {
|
||||
if (this.eventDispatcher) this.eventDispatcher.dispatchEvent(new RoomObjectMoveEvent(RoomObjectMoveEvent.OBJECT_REMOVED, this.object));
|
||||
}
|
||||
|
@ -96,7 +96,7 @@ export class AvatarLogic extends MovingObjectLogic {
|
|||
this._reportedLocation = null;
|
||||
}
|
||||
|
||||
public update(time: number): void {
|
||||
public override update(time: number): void {
|
||||
super.update(time);
|
||||
|
||||
if (this._selected && this.object) {
|
||||
|
@ -216,7 +216,7 @@ export class AvatarLogic extends MovingObjectLogic {
|
|||
}
|
||||
}
|
||||
|
||||
public processUpdateMessage(message: RoomObjectUpdateMessage): void {
|
||||
public override processUpdateMessage(message: RoomObjectUpdateMessage): void {
|
||||
if (!message || !this.object) return;
|
||||
|
||||
super.processUpdateMessage(message);
|
||||
|
@ -406,7 +406,7 @@ export class AvatarLogic extends MovingObjectLogic {
|
|||
model.setValue(RoomObjectVariable.FIGURE_EFFECT, effect);
|
||||
}
|
||||
|
||||
public mouseEvent(event: RoomSpriteMouseEvent, geometry: IRoomGeometry): void {
|
||||
public override mouseEvent(event: RoomSpriteMouseEvent, geometry: IRoomGeometry): void {
|
||||
let eventType: string = null;
|
||||
|
||||
switch (event.type) {
|
||||
|
|
|
@ -12,7 +12,7 @@ export class FurnitureAchievementResolutionLogic extends FurnitureBadgeDisplayLo
|
|||
private static ACH_NOT_SET: string = "ach_0";
|
||||
private static BADGE_VISIBLE_IN_STATE: number = 2;
|
||||
|
||||
public getEventTypes(): string[] {
|
||||
public override getEventTypes(): string[] {
|
||||
const types = [
|
||||
RoomObjectWidgetRequestEvent.ACHIEVEMENT_RESOLUTION_OPEN,
|
||||
RoomObjectWidgetRequestEvent.ACHIEVEMENT_RESOLUTION_ENGRAVING,
|
||||
|
@ -23,7 +23,7 @@ export class FurnitureAchievementResolutionLogic extends FurnitureBadgeDisplayLo
|
|||
return this.mergeTypes(super.getEventTypes(), types);
|
||||
}
|
||||
|
||||
public processUpdateMessage(message: RoomObjectUpdateMessage): void {
|
||||
public override processUpdateMessage(message: RoomObjectUpdateMessage): void {
|
||||
super.processUpdateMessage(message);
|
||||
|
||||
if (message instanceof ObjectGroupBadgeUpdateMessage) {
|
||||
|
@ -39,7 +39,7 @@ export class FurnitureAchievementResolutionLogic extends FurnitureBadgeDisplayLo
|
|||
}
|
||||
}
|
||||
|
||||
public useObject(): void {
|
||||
public override useObject(): void {
|
||||
if (!this.object || !this.eventDispatcher) return;
|
||||
|
||||
let event: RoomObjectEvent = null;
|
||||
|
@ -60,7 +60,7 @@ export class FurnitureAchievementResolutionLogic extends FurnitureBadgeDisplayLo
|
|||
if (event) this.eventDispatcher.dispatchEvent(event);
|
||||
}
|
||||
|
||||
protected updateBadge(badgeId: string): void {
|
||||
protected override updateBadge(badgeId: string): void {
|
||||
if (badgeId === FurnitureAchievementResolutionLogic.ACH_NOT_SET) return;
|
||||
|
||||
super.updateBadge(badgeId);
|
||||
|
|
|
@ -6,13 +6,13 @@ import {ObjectDataUpdateMessage, ObjectGroupBadgeUpdateMessage} from "../../../m
|
|||
import {FurnitureLogic} from "./FurnitureLogic";
|
||||
|
||||
export class FurnitureBadgeDisplayLogic extends FurnitureLogic {
|
||||
public getEventTypes(): string[] {
|
||||
public override getEventTypes(): string[] {
|
||||
const types = [RoomObjectWidgetRequestEvent.BADGE_DISPLAY_ENGRAVING, RoomObjectBadgeAssetEvent.LOAD_BADGE];
|
||||
|
||||
return this.mergeTypes(super.getEventTypes(), types);
|
||||
}
|
||||
|
||||
public processUpdateMessage(message: RoomObjectUpdateMessage): void {
|
||||
public override processUpdateMessage(message: RoomObjectUpdateMessage): void {
|
||||
super.processUpdateMessage(message);
|
||||
|
||||
if (!this.object) return;
|
||||
|
@ -37,7 +37,7 @@ export class FurnitureBadgeDisplayLogic extends FurnitureLogic {
|
|||
}
|
||||
}
|
||||
|
||||
public useObject(): void {
|
||||
public override useObject(): void {
|
||||
if (!this.object || !this.eventDispatcher) return;
|
||||
|
||||
this.eventDispatcher.dispatchEvent(new RoomObjectWidgetRequestEvent(RoomObjectWidgetRequestEvent.BADGE_DISPLAY_ENGRAVING, this.object));
|
||||
|
|
|
@ -9,13 +9,13 @@ export class FurnitureChangeStateWhenStepOnLogic extends FurnitureLogic {
|
|||
this.onRoomToObjectOwnAvatarMoveEvent = this.onRoomToObjectOwnAvatarMoveEvent.bind(this);
|
||||
}
|
||||
|
||||
public initialize(asset: IAssetData): void {
|
||||
public override initialize(asset: IAssetData): void {
|
||||
super.initialize(asset);
|
||||
|
||||
if (this.eventDispatcher) this.eventDispatcher.addEventListener(RoomToObjectOwnAvatarMoveEvent.ROAME_MOVE_TO, this.onRoomToObjectOwnAvatarMoveEvent);
|
||||
}
|
||||
|
||||
public tearDown(): void {
|
||||
public override tearDown(): void {
|
||||
if (this.eventDispatcher) this.eventDispatcher.removeEventListener(RoomToObjectOwnAvatarMoveEvent.ROAME_MOVE_TO, this.onRoomToObjectOwnAvatarMoveEvent);
|
||||
|
||||
super.tearDown();
|
||||
|
|
|
@ -5,13 +5,13 @@ import {ObjectDataUpdateMessage} from "../../../messages";
|
|||
import {FurnitureLogic} from "./FurnitureLogic";
|
||||
|
||||
export class FurnitureClothingChangeLogic extends FurnitureLogic {
|
||||
public getEventTypes(): string[] {
|
||||
public override getEventTypes(): string[] {
|
||||
const types = [RoomObjectWidgetRequestEvent.CLOTHING_CHANGE];
|
||||
|
||||
return this.mergeTypes(super.getEventTypes(), types);
|
||||
}
|
||||
|
||||
public initialize(asset: IAssetData): void {
|
||||
public override initialize(asset: IAssetData): void {
|
||||
super.initialize(asset);
|
||||
|
||||
const furniData = this.object.model.getValue<string>(RoomObjectVariable.FURNITURE_DATA);
|
||||
|
@ -19,7 +19,7 @@ export class FurnitureClothingChangeLogic extends FurnitureLogic {
|
|||
this.updateClothingData(furniData);
|
||||
}
|
||||
|
||||
public processUpdateMessage(message: RoomObjectUpdateMessage): void {
|
||||
public override processUpdateMessage(message: RoomObjectUpdateMessage): void {
|
||||
super.processUpdateMessage(message);
|
||||
|
||||
if (message instanceof ObjectDataUpdateMessage) message.data && this.updateClothingData(message.data.getLegacyString());
|
||||
|
@ -34,7 +34,7 @@ export class FurnitureClothingChangeLogic extends FurnitureLogic {
|
|||
if (girlClothing && girlClothing.length) this.object.model.setValue<string>(RoomObjectVariable.FURNITURE_CLOTHING_GIRL, girlClothing);
|
||||
}
|
||||
|
||||
public useObject(): void {
|
||||
public override useObject(): void {
|
||||
if (!this.object || !this.eventDispatcher) return;
|
||||
|
||||
this.eventDispatcher.dispatchEvent(new RoomObjectWidgetRequestEvent(RoomObjectWidgetRequestEvent.CLOTHING_CHANGE, this.object));
|
||||
|
|
|
@ -3,13 +3,13 @@ import {RoomObjectEvent, RoomObjectStateChangedEvent, RoomSpriteMouseEvent} from
|
|||
import {FurnitureLogic} from "./FurnitureLogic";
|
||||
|
||||
export class FurnitureCounterClockLogic extends FurnitureLogic {
|
||||
public getEventTypes(): string[] {
|
||||
public override getEventTypes(): string[] {
|
||||
const types = [RoomObjectStateChangedEvent.STATE_CHANGE];
|
||||
|
||||
return this.mergeTypes(super.getEventTypes(), types);
|
||||
}
|
||||
|
||||
public mouseEvent(event: RoomSpriteMouseEvent, geometry: IRoomGeometry): void {
|
||||
public override mouseEvent(event: RoomSpriteMouseEvent, geometry: IRoomGeometry): void {
|
||||
if (!event || !geometry || !this.object) return;
|
||||
|
||||
let objectEvent: RoomObjectEvent = null;
|
||||
|
@ -36,7 +36,7 @@ export class FurnitureCounterClockLogic extends FurnitureLogic {
|
|||
super.mouseEvent(event, geometry);
|
||||
}
|
||||
|
||||
public useObject(): void {
|
||||
public override useObject(): void {
|
||||
if (!this.object || !this.eventDispatcher) return;
|
||||
|
||||
this.eventDispatcher.dispatchEvent(new RoomObjectStateChangedEvent(RoomObjectStateChangedEvent.STATE_CHANGE, this.object, 1));
|
||||
|
|
|
@ -3,7 +3,7 @@ import {RoomObjectUpdateMessage} from "../../../../../room";
|
|||
import {FurnitureLogic} from "./FurnitureLogic";
|
||||
|
||||
export class FurnitureCrackableLogic extends FurnitureLogic {
|
||||
public processUpdateMessage(message: RoomObjectUpdateMessage): void {
|
||||
public override processUpdateMessage(message: RoomObjectUpdateMessage): void {
|
||||
super.processUpdateMessage(message);
|
||||
|
||||
if (!this.object) return;
|
||||
|
|
|
@ -2,7 +2,7 @@ import {RoomWidgetEnum} from "../../../../../api";
|
|||
import {FurnitureLogic} from "./FurnitureLogic";
|
||||
|
||||
export class FurnitureCraftingGizmoLogic extends FurnitureLogic {
|
||||
public get widget(): string {
|
||||
public override get widget(): string {
|
||||
return RoomWidgetEnum.CRAFTING;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -3,13 +3,13 @@ import {RoomObjectWidgetRequestEvent} from "../../../../../events";
|
|||
import {FurnitureLogic} from "./FurnitureLogic";
|
||||
|
||||
export class FurnitureCreditLogic extends FurnitureLogic {
|
||||
public getEventTypes(): string[] {
|
||||
public override getEventTypes(): string[] {
|
||||
const types = [RoomObjectWidgetRequestEvent.CREDITFURNI];
|
||||
|
||||
return this.mergeTypes(super.getEventTypes(), types);
|
||||
}
|
||||
|
||||
public initialize(asset: IAssetData): void {
|
||||
public override initialize(asset: IAssetData): void {
|
||||
super.initialize(asset);
|
||||
|
||||
let creditValue = 0;
|
||||
|
@ -21,7 +21,7 @@ export class FurnitureCreditLogic extends FurnitureLogic {
|
|||
this.object.model.setValue(RoomObjectVariable.FURNITURE_CREDIT_VALUE, creditValue);
|
||||
}
|
||||
|
||||
public useObject(): void {
|
||||
public override useObject(): void {
|
||||
if (!this.object || !this.eventDispatcher) return;
|
||||
|
||||
this.eventDispatcher.dispatchEvent(new RoomObjectWidgetRequestEvent(RoomObjectWidgetRequestEvent.CREDITFURNI, this.object));
|
||||
|
|
|
@ -6,13 +6,13 @@ import {FurnitureMultiStateLogic} from "./FurnitureMultiStateLogic";
|
|||
export class FurnitureCuckooClockLogic extends FurnitureMultiStateLogic {
|
||||
private _state: number = 1;
|
||||
|
||||
public getEventTypes(): string[] {
|
||||
public override getEventTypes(): string[] {
|
||||
const types = [RoomObjectPlaySoundIdEvent.PLAY_SOUND_AT_PITCH];
|
||||
|
||||
return this.mergeTypes(super.getEventTypes(), types);
|
||||
}
|
||||
|
||||
public processUpdateMessage(message: RoomObjectUpdateMessage): void {
|
||||
public override processUpdateMessage(message: RoomObjectUpdateMessage): void {
|
||||
super.processUpdateMessage(message);
|
||||
|
||||
if (message instanceof ObjectDataUpdateMessage) {
|
||||
|
|
|
@ -3,19 +3,19 @@ import {RoomObjectWidgetRequestEvent} from "../../../../../events";
|
|||
import {FurnitureMultiStateLogic} from "./FurnitureMultiStateLogic";
|
||||
|
||||
export class FurnitureCustomStackHeightLogic extends FurnitureMultiStateLogic {
|
||||
public getEventTypes(): string[] {
|
||||
public override getEventTypes(): string[] {
|
||||
const types = [RoomObjectWidgetRequestEvent.STACK_HEIGHT];
|
||||
|
||||
return this.mergeTypes(super.getEventTypes(), types);
|
||||
}
|
||||
|
||||
public initialize(asset: IAssetData): void {
|
||||
public override initialize(asset: IAssetData): void {
|
||||
super.initialize(asset);
|
||||
|
||||
if (this.object && this.object.model) this.object.model.setValue(RoomObjectVariable.FURNITURE_ALWAYS_STACKABLE, 1);
|
||||
}
|
||||
|
||||
public useObject(): void {
|
||||
public override useObject(): void {
|
||||
if (!this.object || !this.eventDispatcher) return;
|
||||
|
||||
this.eventDispatcher.dispatchEvent(new RoomObjectWidgetRequestEvent(RoomObjectWidgetRequestEvent.STACK_HEIGHT, this.object));
|
||||
|
|
|
@ -13,13 +13,13 @@ export class FurnitureDiceLogic extends FurnitureLogic {
|
|||
this._noTagsLastStateActivate = false;
|
||||
}
|
||||
|
||||
public getEventTypes(): string[] {
|
||||
public override getEventTypes(): string[] {
|
||||
const types = [RoomObjectFurnitureActionEvent.DICE_ACTIVATE, RoomObjectFurnitureActionEvent.DICE_OFF];
|
||||
|
||||
return this.mergeTypes(super.getEventTypes(), types);
|
||||
}
|
||||
|
||||
public mouseEvent(event: RoomSpriteMouseEvent, geometry: IRoomGeometry): void {
|
||||
public override mouseEvent(event: RoomSpriteMouseEvent, geometry: IRoomGeometry): void {
|
||||
if (!event || !geometry || !this.object) return;
|
||||
|
||||
let objectEvent: RoomObjectEvent = null;
|
||||
|
|
|
@ -2,13 +2,13 @@ import {RoomObjectWidgetRequestEvent} from "../../../../../events";
|
|||
import {FurnitureLogic} from "./FurnitureLogic";
|
||||
|
||||
export class FurnitureEcotronBoxLogic extends FurnitureLogic {
|
||||
public getEventTypes(): string[] {
|
||||
public override getEventTypes(): string[] {
|
||||
const types = [RoomObjectWidgetRequestEvent.ECOTRONBOX];
|
||||
|
||||
return this.mergeTypes(super.getEventTypes(), types);
|
||||
}
|
||||
|
||||
public useObject(): void {
|
||||
public override useObject(): void {
|
||||
if (!this.object || !this.eventDispatcher) return;
|
||||
|
||||
this.eventDispatcher.dispatchEvent(new RoomObjectWidgetRequestEvent(RoomObjectWidgetRequestEvent.ECOTRONBOX, this.object));
|
||||
|
|
|
@ -13,13 +13,13 @@ export class FurnitureEditableInternalLinkLogic extends FurnitureLogic {
|
|||
this._updateCount = 0;
|
||||
}
|
||||
|
||||
public getEventTypes(): string[] {
|
||||
public override getEventTypes(): string[] {
|
||||
const types = [RoomObjectWidgetRequestEvent.INERNAL_LINK];
|
||||
|
||||
return this.mergeTypes(super.getEventTypes(), types);
|
||||
}
|
||||
|
||||
public initialize(asset: IAssetData): void {
|
||||
public override initialize(asset: IAssetData): void {
|
||||
super.initialize(asset);
|
||||
|
||||
if (asset.logic) {
|
||||
|
@ -29,7 +29,7 @@ export class FurnitureEditableInternalLinkLogic extends FurnitureLogic {
|
|||
}
|
||||
}
|
||||
|
||||
public update(time: number): void {
|
||||
public override update(time: number): void {
|
||||
super.update(time);
|
||||
|
||||
if (!this._showStateOnceRendered) return;
|
||||
|
@ -51,7 +51,7 @@ export class FurnitureEditableInternalLinkLogic extends FurnitureLogic {
|
|||
}
|
||||
}
|
||||
|
||||
public mouseEvent(event: RoomSpriteMouseEvent, geometry: IRoomGeometry): void {
|
||||
public override mouseEvent(event: RoomSpriteMouseEvent, geometry: IRoomGeometry): void {
|
||||
if (!event || !geometry) return;
|
||||
|
||||
if (event.type === MouseEventType.DOUBLE_CLICK) {
|
||||
|
@ -61,7 +61,7 @@ export class FurnitureEditableInternalLinkLogic extends FurnitureLogic {
|
|||
super.mouseEvent(event, geometry);
|
||||
}
|
||||
|
||||
public useObject(): void {
|
||||
public override useObject(): void {
|
||||
if (!this.object || !this.eventDispatcher) return;
|
||||
|
||||
this.eventDispatcher.dispatchEvent(new RoomObjectWidgetRequestEvent(RoomObjectWidgetRequestEvent.INERNAL_LINK, this.object));
|
||||
|
|
|
@ -5,13 +5,13 @@ import {FurnitureLogic} from "./FurnitureLogic";
|
|||
export class FurnitureEditableRoomLinkLogic extends FurnitureLogic {
|
||||
private _timer: any;
|
||||
|
||||
public getEventTypes(): string[] {
|
||||
public override getEventTypes(): string[] {
|
||||
const types = [RoomObjectWidgetRequestEvent.ROOM_LINK];
|
||||
|
||||
return this.mergeTypes(super.getEventTypes(), types);
|
||||
}
|
||||
|
||||
public initialize(asset: IAssetData): void {
|
||||
public override initialize(asset: IAssetData): void {
|
||||
super.initialize(asset);
|
||||
|
||||
if (asset.logic) {
|
||||
|
@ -23,7 +23,7 @@ export class FurnitureEditableRoomLinkLogic extends FurnitureLogic {
|
|||
}
|
||||
}
|
||||
|
||||
protected onDispose(): void {
|
||||
protected override onDispose(): void {
|
||||
if (this._timer) {
|
||||
clearTimeout(this._timer);
|
||||
|
||||
|
@ -41,7 +41,7 @@ export class FurnitureEditableRoomLinkLogic extends FurnitureLogic {
|
|||
}
|
||||
}
|
||||
|
||||
public useObject(): void {
|
||||
public override useObject(): void {
|
||||
this.setAutomaticStateIndex(1);
|
||||
|
||||
if (this._timer) {
|
||||
|
|
|
@ -5,19 +5,19 @@ import {FurnitureLogic} from "./FurnitureLogic";
|
|||
export class FurnitureEffectBoxLogic extends FurnitureLogic {
|
||||
private _timer: any;
|
||||
|
||||
public getEventTypes(): string[] {
|
||||
public override getEventTypes(): string[] {
|
||||
const types = [RoomObjectWidgetRequestEvent.EFFECTBOX_OPEN_DIALOG];
|
||||
|
||||
return this.mergeTypes(super.getEventTypes(), types);
|
||||
}
|
||||
|
||||
public useObject(): void {
|
||||
public override useObject(): void {
|
||||
if (!this.object || !this.eventDispatcher) return;
|
||||
|
||||
this.eventDispatcher.dispatchEvent(new RoomObjectWidgetRequestEvent(RoomObjectWidgetRequestEvent.EFFECTBOX_OPEN_DIALOG, this.object));
|
||||
}
|
||||
|
||||
public get contextMenu(): string {
|
||||
public override get contextMenu(): string {
|
||||
return ContextMenuEnum.EFFECT_BOX;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -3,13 +3,13 @@ import {RoomObjectWidgetRequestEvent} from "../../../../../events";
|
|||
import {FurnitureMultiStateLogic} from "./FurnitureMultiStateLogic";
|
||||
|
||||
export class FurnitureExternalImageLogic extends FurnitureMultiStateLogic {
|
||||
public getEventTypes(): string[] {
|
||||
public override getEventTypes(): string[] {
|
||||
const types = [RoomObjectWidgetRequestEvent.EXTERNAL_IMAGE];
|
||||
|
||||
return this.mergeTypes(super.getEventTypes(), types);
|
||||
}
|
||||
|
||||
public initialize(asset: IAssetData): void {
|
||||
public override initialize(asset: IAssetData): void {
|
||||
super.initialize(asset);
|
||||
|
||||
if (!asset) return;
|
||||
|
@ -26,7 +26,7 @@ export class FurnitureExternalImageLogic extends FurnitureMultiStateLogic {
|
|||
}
|
||||
}
|
||||
|
||||
public useObject(): void {
|
||||
public override useObject(): void {
|
||||
if (!this.object || !this.eventDispatcher) return;
|
||||
|
||||
this.eventDispatcher.dispatchEvent(new RoomObjectWidgetRequestEvent(RoomObjectWidgetRequestEvent.EXTERNAL_IMAGE, this.object));
|
||||
|
|
|
@ -3,13 +3,13 @@ import {RoomObjectEvent, RoomObjectStateChangedEvent, RoomSpriteMouseEvent} from
|
|||
import {FurnitureLogic} from "./FurnitureLogic";
|
||||
|
||||
export class FurnitureFireworksLogic extends FurnitureLogic {
|
||||
public getEventTypes(): string[] {
|
||||
public override getEventTypes(): string[] {
|
||||
const types = [RoomObjectStateChangedEvent.STATE_CHANGE];
|
||||
|
||||
return this.mergeTypes(super.getEventTypes(), types);
|
||||
}
|
||||
|
||||
public initialize(asset: IAssetData): void {
|
||||
public override initialize(asset: IAssetData): void {
|
||||
super.initialize(asset);
|
||||
|
||||
if (asset.logic) {
|
||||
|
@ -19,7 +19,7 @@ export class FurnitureFireworksLogic extends FurnitureLogic {
|
|||
}
|
||||
}
|
||||
|
||||
public mouseEvent(event: RoomSpriteMouseEvent, geometry: IRoomGeometry): void {
|
||||
public override mouseEvent(event: RoomSpriteMouseEvent, geometry: IRoomGeometry): void {
|
||||
if (!event || !geometry || !this.object) return;
|
||||
|
||||
let objectEvent: RoomObjectEvent = null;
|
||||
|
@ -46,7 +46,7 @@ export class FurnitureFireworksLogic extends FurnitureLogic {
|
|||
super.mouseEvent(event, geometry);
|
||||
}
|
||||
|
||||
public useObject(): void {
|
||||
public override useObject(): void {
|
||||
if (!this.object || !this.eventDispatcher) return;
|
||||
|
||||
this.eventDispatcher.dispatchEvent(new RoomObjectStateChangedEvent(RoomObjectStateChangedEvent.STATE_CHANGE, this.object, 0));
|
||||
|
|
|
@ -17,13 +17,13 @@ export class FurnitureFloorHoleLogic extends FurnitureMultiStateLogic {
|
|||
this._currentLocation = null;
|
||||
}
|
||||
|
||||
public getEventTypes(): string[] {
|
||||
public override getEventTypes(): string[] {
|
||||
const types = [RoomObjectFloorHoleEvent.ADD_HOLE, RoomObjectFloorHoleEvent.REMOVE_HOLE];
|
||||
|
||||
return this.mergeTypes(super.getEventTypes(), types);
|
||||
}
|
||||
|
||||
protected onDispose(): void {
|
||||
protected override onDispose(): void {
|
||||
if (this._currentState === FurnitureFloorHoleLogic.STATE_HOLE) {
|
||||
this.eventDispatcher.dispatchEvent(new RoomObjectFloorHoleEvent(RoomObjectFloorHoleEvent.REMOVE_HOLE, this.object));
|
||||
}
|
||||
|
@ -31,13 +31,13 @@ export class FurnitureFloorHoleLogic extends FurnitureMultiStateLogic {
|
|||
super.onDispose();
|
||||
}
|
||||
|
||||
public update(time: number): void {
|
||||
public override update(time: number): void {
|
||||
super.update(time);
|
||||
|
||||
this.handleAutomaticStateUpdate();
|
||||
}
|
||||
|
||||
public processUpdateMessage(message: RoomObjectUpdateMessage): void {
|
||||
public override processUpdateMessage(message: RoomObjectUpdateMessage): void {
|
||||
super.processUpdateMessage(message);
|
||||
|
||||
if (!this.object) return;
|
||||
|
|
|
@ -11,13 +11,13 @@ export class FurnitureFriendFurniLogic extends FurnitureMultiStateLogic {
|
|||
|
||||
private _state: number = -1;
|
||||
|
||||
public initialize(asset: IAssetData): void {
|
||||
public override initialize(asset: IAssetData): void {
|
||||
super.initialize(asset);
|
||||
|
||||
if (this.object) this.object.model.setValue(RoomObjectVariable.FURNITURE_FRIENDFURNI_ENGRAVING, this.engravingDialogType);
|
||||
}
|
||||
|
||||
public processUpdateMessage(message: RoomObjectUpdateMessage): void {
|
||||
public override processUpdateMessage(message: RoomObjectUpdateMessage): void {
|
||||
if (message instanceof ObjectDataUpdateMessage) {
|
||||
const data = message.data as StringDataType;
|
||||
|
||||
|
@ -31,13 +31,13 @@ export class FurnitureFriendFurniLogic extends FurnitureMultiStateLogic {
|
|||
super.processUpdateMessage(message);
|
||||
}
|
||||
|
||||
public getEventTypes(): string[] {
|
||||
public override getEventTypes(): string[] {
|
||||
const types = [RoomObjectWidgetRequestEvent.FRIEND_FURNITURE_ENGRAVING];
|
||||
|
||||
return this.mergeTypes(super.getEventTypes(), types);
|
||||
}
|
||||
|
||||
public useObject(): void {
|
||||
public override useObject(): void {
|
||||
if (!this.object || !this.eventDispatcher) return;
|
||||
|
||||
if (this._state === FurnitureFriendFurniLogic.STATE_LOCKED) {
|
||||
|
@ -51,7 +51,7 @@ export class FurnitureFriendFurniLogic extends FurnitureMultiStateLogic {
|
|||
return 0;
|
||||
}
|
||||
|
||||
public get contextMenu(): string {
|
||||
public override get contextMenu(): string {
|
||||
return this._state === FurnitureFriendFurniLogic.STATE_UNLOCKED ? ContextMenuEnum.FRIEND_FURNITURE : ContextMenuEnum.DUMMY;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -3,19 +3,19 @@ import {RoomObjectWidgetRequestEvent} from "../../../../../events";
|
|||
import {FurnitureGuildCustomizedLogic} from "./FurnitureGuildCustomizedLogic";
|
||||
|
||||
export class FurnitureGroupForumTerminalLogic extends FurnitureGuildCustomizedLogic {
|
||||
public getEventTypes(): string[] {
|
||||
public override getEventTypes(): string[] {
|
||||
const types = [RoomObjectWidgetRequestEvent.INERNAL_LINK];
|
||||
|
||||
return this.mergeTypes(super.getEventTypes(), types);
|
||||
}
|
||||
|
||||
protected updateGroupId(id: string): void {
|
||||
protected override updateGroupId(id: string): void {
|
||||
super.updateGroupId(id);
|
||||
|
||||
this.object.model.setValue(RoomObjectVariable.FURNITURE_INTERNAL_LINK, `groupforum/${id}`);
|
||||
}
|
||||
|
||||
public useObject(): void {
|
||||
public override useObject(): void {
|
||||
if (!this.object || !this.eventDispatcher) return;
|
||||
|
||||
this.eventDispatcher.dispatchEvent(new RoomObjectWidgetRequestEvent(RoomObjectWidgetRequestEvent.INERNAL_LINK, this.object));
|
||||
|
|
|
@ -11,7 +11,7 @@ export class FurnitureGuildCustomizedLogic extends FurnitureMultiStateLogic {
|
|||
public static COLOR1_KEY: number = 3;
|
||||
public static COLOR2_KEY: number = 4;
|
||||
|
||||
public getEventTypes(): string[] {
|
||||
public override getEventTypes(): string[] {
|
||||
const types = [
|
||||
RoomObjectBadgeAssetEvent.LOAD_BADGE,
|
||||
RoomObjectWidgetRequestEvent.GUILD_FURNI_CONTEXT_MENU,
|
||||
|
@ -21,7 +21,7 @@ export class FurnitureGuildCustomizedLogic extends FurnitureMultiStateLogic {
|
|||
return this.mergeTypes(super.getEventTypes(), types);
|
||||
}
|
||||
|
||||
public processUpdateMessage(message: RoomObjectUpdateMessage): void {
|
||||
public override processUpdateMessage(message: RoomObjectUpdateMessage): void {
|
||||
super.processUpdateMessage(message);
|
||||
|
||||
if (message instanceof ObjectDataUpdateMessage) {
|
||||
|
@ -58,7 +58,7 @@ export class FurnitureGuildCustomizedLogic extends FurnitureMultiStateLogic {
|
|||
this.object.model.setValue(RoomObjectVariable.FURNITURE_GUILD_CUSTOMIZED_COLOR_2, parseInt(color2, 16));
|
||||
}
|
||||
|
||||
public mouseEvent(event: RoomSpriteMouseEvent, geometry: IRoomGeometry): void {
|
||||
public override mouseEvent(event: RoomSpriteMouseEvent, geometry: IRoomGeometry): void {
|
||||
if (!event || !geometry || !this.object) return;
|
||||
|
||||
switch (event.type) {
|
||||
|
|
|
@ -2,13 +2,13 @@ import {RoomObjectFurnitureActionEvent} from "../../../../../events";
|
|||
import {FurnitureLogic} from "./FurnitureLogic";
|
||||
|
||||
export class FurnitureHabboWheelLogic extends FurnitureLogic {
|
||||
public getEventTypes(): string[] {
|
||||
public override getEventTypes(): string[] {
|
||||
const types = [RoomObjectFurnitureActionEvent.USE_HABBOWHEEL];
|
||||
|
||||
return this.mergeTypes(super.getEventTypes(), types);
|
||||
}
|
||||
|
||||
public useObject(): void {
|
||||
public override useObject(): void {
|
||||
if (!this.object || !this.eventDispatcher) return;
|
||||
|
||||
this.eventDispatcher.dispatchEvent(new RoomObjectFurnitureActionEvent(RoomObjectFurnitureActionEvent.USE_HABBOWHEEL, this.object));
|
||||
|
|
|
@ -9,11 +9,11 @@ export class FurnitureHighScoreLogic extends FurnitureLogic {
|
|||
|
||||
private _state = -1;
|
||||
|
||||
public getEventTypes(): string[] {
|
||||
public override getEventTypes(): string[] {
|
||||
return [RoomObjectWidgetRequestEvent.HIGH_SCORE_DISPLAY, RoomObjectWidgetRequestEvent.HIDE_HIGH_SCORE_DISPLAY];
|
||||
}
|
||||
|
||||
public tearDown(): void {
|
||||
public override tearDown(): void {
|
||||
if (this.object.model.getValue(RoomObjectVariable.FURNITURE_REAL_ROOM_OBJECT) === 1) {
|
||||
this.eventDispatcher.dispatchEvent(new RoomObjectWidgetRequestEvent(RoomObjectWidgetRequestEvent.HIDE_HIGH_SCORE_DISPLAY, this.object));
|
||||
}
|
||||
|
@ -21,7 +21,7 @@ export class FurnitureHighScoreLogic extends FurnitureLogic {
|
|||
super.tearDown();
|
||||
}
|
||||
|
||||
public processUpdateMessage(message: RoomObjectUpdateMessage): void {
|
||||
public override processUpdateMessage(message: RoomObjectUpdateMessage): void {
|
||||
super.processUpdateMessage(message);
|
||||
|
||||
if (this.object.model.getValue(RoomObjectVariable.FURNITURE_REAL_ROOM_OBJECT) !== 1) return;
|
||||
|
|
|
@ -3,13 +3,13 @@ import {RoomObjectEvent, RoomObjectStateChangedEvent, RoomSpriteMouseEvent} from
|
|||
import {FurnitureLogic} from "./FurnitureLogic";
|
||||
|
||||
export class FurnitureHockeyScoreLogic extends FurnitureLogic {
|
||||
public getEventTypes(): string[] {
|
||||
public override getEventTypes(): string[] {
|
||||
const types = [RoomObjectStateChangedEvent.STATE_CHANGE];
|
||||
|
||||
return this.mergeTypes(super.getEventTypes(), types);
|
||||
}
|
||||
|
||||
public mouseEvent(event: RoomSpriteMouseEvent, geometry: IRoomGeometry): void {
|
||||
public override mouseEvent(event: RoomSpriteMouseEvent, geometry: IRoomGeometry): void {
|
||||
if (!event || !geometry || !this.object) return;
|
||||
|
||||
let objectEvent: RoomObjectEvent = null;
|
||||
|
@ -43,7 +43,7 @@ export class FurnitureHockeyScoreLogic extends FurnitureLogic {
|
|||
super.mouseEvent(event, geometry);
|
||||
}
|
||||
|
||||
public useObject(): void {
|
||||
public override useObject(): void {
|
||||
if (!this.object || !this.eventDispatcher) return;
|
||||
|
||||
this.eventDispatcher.dispatchEvent(new RoomObjectStateChangedEvent(RoomObjectStateChangedEvent.STATE_CHANGE, this.object, 3));
|
||||
|
|
|
@ -2,7 +2,7 @@ import {FriendFurniEngravingWidgetType} from "../../../../../api";
|
|||
import {FurnitureFriendFurniLogic} from "./FurnitureFriendFurniLogic";
|
||||
|
||||
export class FurnitureHweenLovelockLogic extends FurnitureFriendFurniLogic {
|
||||
public get engravingDialogType(): number {
|
||||
public override get engravingDialogType(): number {
|
||||
return FriendFurniEngravingWidgetType.HABBOWEEN;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -15,7 +15,7 @@ export class FurnitureIceStormLogic extends FurnitureMultiStateLogic {
|
|||
this._nextStateTimestamp = 0;
|
||||
}
|
||||
|
||||
public update(totalTimeRunning: number): void {
|
||||
public override update(totalTimeRunning: number): void {
|
||||
if (this._nextStateTimestamp > 0 && totalTimeRunning >= this._nextStateTimestamp) {
|
||||
this._nextStateTimestamp = 0;
|
||||
|
||||
|
@ -29,7 +29,7 @@ export class FurnitureIceStormLogic extends FurnitureMultiStateLogic {
|
|||
super.update(totalTimeRunning);
|
||||
}
|
||||
|
||||
public processUpdateMessage(message: RoomObjectUpdateMessage): void {
|
||||
public override processUpdateMessage(message: RoomObjectUpdateMessage): void {
|
||||
if (message instanceof ObjectDataUpdateMessage) {
|
||||
this.processUpdate(message);
|
||||
|
||||
|
|
|
@ -6,13 +6,13 @@ export class FurnitureInternalLinkLogic extends FurnitureLogic {
|
|||
private _showStateOnceRendered: boolean = false;
|
||||
private _updateCount: number = 0;
|
||||
|
||||
public getEventTypes(): string[] {
|
||||
public override getEventTypes(): string[] {
|
||||
const types = [RoomObjectWidgetRequestEvent.INERNAL_LINK];
|
||||
|
||||
return this.mergeTypes(super.getEventTypes(), types);
|
||||
}
|
||||
|
||||
public initialize(asset: IAssetData): void {
|
||||
public override initialize(asset: IAssetData): void {
|
||||
super.initialize(asset);
|
||||
|
||||
if (asset.logic) {
|
||||
|
@ -24,7 +24,7 @@ export class FurnitureInternalLinkLogic extends FurnitureLogic {
|
|||
}
|
||||
}
|
||||
|
||||
public update(time: number): void {
|
||||
public override update(time: number): void {
|
||||
super.update(time);
|
||||
|
||||
if (!this._showStateOnceRendered) return;
|
||||
|
@ -46,7 +46,7 @@ export class FurnitureInternalLinkLogic extends FurnitureLogic {
|
|||
}
|
||||
}
|
||||
|
||||
public mouseEvent(event: RoomSpriteMouseEvent, geometry: IRoomGeometry): void {
|
||||
public override mouseEvent(event: RoomSpriteMouseEvent, geometry: IRoomGeometry): void {
|
||||
if (!event || !geometry) return;
|
||||
|
||||
if (event.type === MouseEventType.DOUBLE_CLICK && this._showStateOnceRendered) {
|
||||
|
@ -56,7 +56,7 @@ export class FurnitureInternalLinkLogic extends FurnitureLogic {
|
|||
super.mouseEvent(event, geometry);
|
||||
}
|
||||
|
||||
public useObject(): void {
|
||||
public override useObject(): void {
|
||||
if (!this.object || !this.eventDispatcher) return;
|
||||
|
||||
this.eventDispatcher.dispatchEvent(new RoomObjectWidgetRequestEvent(RoomObjectWidgetRequestEvent.INERNAL_LINK, this.object));
|
||||
|
|
|
@ -9,7 +9,7 @@ export class FurnitureJukeboxLogic extends FurnitureMultiStateLogic {
|
|||
private _isInitialized: boolean = false;
|
||||
private _currentState: number = -1;
|
||||
|
||||
public getEventTypes(): string[] {
|
||||
public override getEventTypes(): string[] {
|
||||
const types = [
|
||||
RoomObjectFurnitureActionEvent.JUKEBOX_START,
|
||||
RoomObjectFurnitureActionEvent.JUKEBOX_MACHINE_STOP,
|
||||
|
@ -21,13 +21,13 @@ export class FurnitureJukeboxLogic extends FurnitureMultiStateLogic {
|
|||
return this.mergeTypes(super.getEventTypes(), types);
|
||||
}
|
||||
|
||||
protected onDispose(): void {
|
||||
protected override onDispose(): void {
|
||||
this.requestDispose();
|
||||
|
||||
super.onDispose();
|
||||
}
|
||||
|
||||
public processUpdateMessage(message: RoomObjectUpdateMessage): void {
|
||||
public override processUpdateMessage(message: RoomObjectUpdateMessage): void {
|
||||
super.processUpdateMessage(message);
|
||||
|
||||
if (this.object.model.getValue<number>(RoomObjectVariable.FURNITURE_REAL_ROOM_OBJECT) !== 1) return;
|
||||
|
@ -78,7 +78,7 @@ export class FurnitureJukeboxLogic extends FurnitureMultiStateLogic {
|
|||
this.eventDispatcher.dispatchEvent(new RoomObjectFurnitureActionEvent(RoomObjectFurnitureActionEvent.JUKEBOX_DISPOSE, this.object));
|
||||
}
|
||||
|
||||
public useObject(): void {
|
||||
public override useObject(): void {
|
||||
if (!this.object || !this.eventDispatcher) return;
|
||||
|
||||
this.eventDispatcher.dispatchEvent(new RoomObjectWidgetRequestEvent(RoomObjectWidgetRequestEvent.JUKEBOX_PLAYLIST_EDITOR, this.object));
|
||||
|
|
|
@ -74,7 +74,7 @@ export class FurnitureLogic extends MovingObjectLogic {
|
|||
}
|
||||
}
|
||||
|
||||
public getEventTypes(): string[] {
|
||||
public override getEventTypes(): string[] {
|
||||
const types = [
|
||||
RoomObjectStateChangedEvent.STATE_CHANGE,
|
||||
RoomObjectMouseEvent.CLICK,
|
||||
|
@ -93,7 +93,7 @@ export class FurnitureLogic extends MovingObjectLogic {
|
|||
return this.mergeTypes(super.getEventTypes(), types);
|
||||
}
|
||||
|
||||
public initialize(asset: IAssetData): void {
|
||||
public override initialize(asset: IAssetData): void {
|
||||
if (!asset) return;
|
||||
|
||||
const model = this.object && this.object.model;
|
||||
|
@ -142,14 +142,14 @@ export class FurnitureLogic extends MovingObjectLogic {
|
|||
model.setValue(RoomObjectVariable.FURNITURE_ALPHA_MULTIPLIER, 1);
|
||||
}
|
||||
|
||||
protected onDispose(): void {
|
||||
protected override onDispose(): void {
|
||||
this._storedRotateMessage = null;
|
||||
this._directions = null;
|
||||
|
||||
super.onDispose();
|
||||
}
|
||||
|
||||
public setObject(object: IRoomObjectController): void {
|
||||
public override setObject(object: IRoomObjectController): void {
|
||||
super.setObject(object);
|
||||
|
||||
if (object && object.getLocation().length) this._directionInitialized = true;
|
||||
|
@ -165,7 +165,7 @@ export class FurnitureLogic extends MovingObjectLogic {
|
|||
this.eventDispatcher.dispatchEvent(new RoomObjectRoomAdEvent(RoomObjectRoomAdEvent.ROOM_AD_FURNI_CLICK, this.object));
|
||||
}
|
||||
|
||||
public update(time: number): void {
|
||||
public override update(time: number): void {
|
||||
super.update(time);
|
||||
|
||||
if (this._bouncingStep > 0) {
|
||||
|
@ -175,7 +175,7 @@ export class FurnitureLogic extends MovingObjectLogic {
|
|||
}
|
||||
}
|
||||
|
||||
public processUpdateMessage(message: RoomObjectUpdateMessage): void {
|
||||
public override processUpdateMessage(message: RoomObjectUpdateMessage): void {
|
||||
if (message instanceof ObjectDataUpdateMessage) {
|
||||
this.processDataUpdateMessage(message);
|
||||
|
||||
|
@ -249,7 +249,7 @@ export class FurnitureLogic extends MovingObjectLogic {
|
|||
this.object.model.setValue(RoomObjectVariable.FURNITURE_ITEMDATA, message.data);
|
||||
}
|
||||
|
||||
public mouseEvent(event: RoomSpriteMouseEvent, geometry: IRoomGeometry): void {
|
||||
public override mouseEvent(event: RoomSpriteMouseEvent, geometry: IRoomGeometry): void {
|
||||
const adUrl = this.getAdClickUrl(this.object.model);
|
||||
|
||||
switch (event.type) {
|
||||
|
@ -391,7 +391,7 @@ export class FurnitureLogic extends MovingObjectLogic {
|
|||
}
|
||||
}
|
||||
|
||||
protected getLocationOffset(): IVector3D {
|
||||
protected override getLocationOffset(): IVector3D {
|
||||
if (this._bouncingStep <= 0) return null;
|
||||
|
||||
this._locationOffset.x = 0;
|
||||
|
@ -414,7 +414,7 @@ export class FurnitureLogic extends MovingObjectLogic {
|
|||
return this._locationOffset;
|
||||
}
|
||||
|
||||
public useObject(): void {
|
||||
public override useObject(): void {
|
||||
if (!this.object || !this.eventDispatcher) return;
|
||||
|
||||
const clickUrl = this.getAdClickUrl(this.object.model);
|
||||
|
@ -428,7 +428,7 @@ export class FurnitureLogic extends MovingObjectLogic {
|
|||
this.eventDispatcher.dispatchEvent(new RoomObjectStateChangedEvent(RoomObjectStateChangedEvent.STATE_CHANGE, this.object));
|
||||
}
|
||||
|
||||
public tearDown(): void {
|
||||
public override tearDown(): void {
|
||||
if (this.object.model.getValue<number>(RoomObjectVariable.FURNITURE_REAL_ROOM_OBJECT) === 1) {
|
||||
if (this.widget) this.eventDispatcher.dispatchEvent(new RoomObjectWidgetRequestEvent(RoomObjectWidgetRequestEvent.CLOSE_WIDGET, this.object));
|
||||
|
||||
|
|
|
@ -2,7 +2,7 @@ import {FriendFurniEngravingWidgetType} from "../../../../../api";
|
|||
import {FurnitureFriendFurniLogic} from "./FurnitureFriendFurniLogic";
|
||||
|
||||
export class FurnitureLoveLockLogic extends FurnitureFriendFurniLogic {
|
||||
public get engravingDialogType(): number {
|
||||
public override get engravingDialogType(): number {
|
||||
return FriendFurniEngravingWidgetType.LOVE_LOCK;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -9,13 +9,13 @@ export class FurnitureMannequinLogic extends FurnitureLogic {
|
|||
private static FIGURE: string = "FIGURE";
|
||||
private static OUTFIT_NAME: string = "OUTFIT_NAME";
|
||||
|
||||
public getEventTypes(): string[] {
|
||||
public override getEventTypes(): string[] {
|
||||
const types = [RoomObjectWidgetRequestEvent.MANNEQUIN];
|
||||
|
||||
return this.mergeTypes(super.getEventTypes(), types);
|
||||
}
|
||||
|
||||
public processUpdateMessage(message: RoomObjectUpdateMessage): void {
|
||||
public override processUpdateMessage(message: RoomObjectUpdateMessage): void {
|
||||
super.processUpdateMessage(message);
|
||||
|
||||
if (message instanceof ObjectDataUpdateMessage) {
|
||||
|
@ -37,7 +37,7 @@ export class FurnitureMannequinLogic extends FurnitureLogic {
|
|||
this.object.model.setValue(RoomObjectVariable.FURNITURE_MANNEQUIN_NAME, data.getValue(FurnitureMannequinLogic.OUTFIT_NAME));
|
||||
}
|
||||
|
||||
public useObject(): void {
|
||||
public override useObject(): void {
|
||||
if (!this.object || !this.eventDispatcher) return;
|
||||
|
||||
this.eventDispatcher.dispatchEvent(new RoomObjectWidgetRequestEvent(RoomObjectWidgetRequestEvent.MANNEQUIN, this.object));
|
||||
|
|
|
@ -3,19 +3,19 @@ import {RoomObjectWidgetRequestEvent} from "../../../../../events";
|
|||
import {FurnitureMultiStateLogic} from "./FurnitureMultiStateLogic";
|
||||
|
||||
export class FurnitureMonsterplantSeedLogic extends FurnitureMultiStateLogic {
|
||||
public getEventTypes(): string[] {
|
||||
public override getEventTypes(): string[] {
|
||||
const types = [RoomObjectWidgetRequestEvent.MONSTERPLANT_SEED_PLANT_CONFIRMATION_DIALOG];
|
||||
|
||||
return this.mergeTypes(super.getEventTypes(), types);
|
||||
}
|
||||
|
||||
public useObject(): void {
|
||||
public override useObject(): void {
|
||||
if (!this.object || !this.eventDispatcher) return;
|
||||
|
||||
this.eventDispatcher.dispatchEvent(new RoomObjectWidgetRequestEvent(RoomObjectWidgetRequestEvent.MONSTERPLANT_SEED_PLANT_CONFIRMATION_DIALOG, this.object));
|
||||
}
|
||||
|
||||
public get contextMenu(): string {
|
||||
public override get contextMenu(): string {
|
||||
return ContextMenuEnum.MONSTERPLANT_SEED;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -2,7 +2,7 @@ import {IAssetData, RoomObjectVariable} from "../../../../../api";
|
|||
import {FurnitureMultiStateLogic} from "./FurnitureMultiStateLogic";
|
||||
|
||||
export class FurnitureMultiHeightLogic extends FurnitureMultiStateLogic {
|
||||
public initialize(asset: IAssetData): void {
|
||||
public override initialize(asset: IAssetData): void {
|
||||
super.initialize(asset);
|
||||
|
||||
if (this.object && this.object.model) this.object.model.setValue(RoomObjectVariable.FURNITURE_IS_VARIABLE_HEIGHT, 1);
|
||||
|
|
|
@ -3,13 +3,13 @@ import {RoomObjectFurnitureActionEvent, RoomSpriteMouseEvent} from "../../../../
|
|||
import {FurnitureLogic} from "./FurnitureLogic";
|
||||
|
||||
export class FurnitureMultiStateLogic extends FurnitureLogic {
|
||||
public getEventTypes(): string[] {
|
||||
public override getEventTypes(): string[] {
|
||||
const types = [RoomObjectFurnitureActionEvent.MOUSE_BUTTON, RoomObjectFurnitureActionEvent.MOUSE_ARROW];
|
||||
|
||||
return this.mergeTypes(super.getEventTypes(), types);
|
||||
}
|
||||
|
||||
public mouseEvent(event: RoomSpriteMouseEvent, geometry: IRoomGeometry): void {
|
||||
public override mouseEvent(event: RoomSpriteMouseEvent, geometry: IRoomGeometry): void {
|
||||
if (!event || !geometry || !this.object) return;
|
||||
|
||||
switch (event.type) {
|
||||
|
|
|
@ -3,19 +3,19 @@ import {RoomObjectWidgetRequestEvent} from "../../../../../events";
|
|||
import {FurnitureMultiStateLogic} from "./FurnitureMultiStateLogic";
|
||||
|
||||
export class FurnitureMysteryBoxLogic extends FurnitureMultiStateLogic {
|
||||
public getEventTypes(): string[] {
|
||||
public override getEventTypes(): string[] {
|
||||
const types = [RoomObjectWidgetRequestEvent.MYSTERYBOX_OPEN_DIALOG];
|
||||
|
||||
return this.mergeTypes(super.getEventTypes(), types);
|
||||
}
|
||||
|
||||
public useObject(): void {
|
||||
public override useObject(): void {
|
||||
if (!this.object || !this.eventDispatcher) return;
|
||||
|
||||
this.eventDispatcher.dispatchEvent(new RoomObjectWidgetRequestEvent(RoomObjectWidgetRequestEvent.MYSTERYBOX_OPEN_DIALOG, this.object));
|
||||
}
|
||||
|
||||
public get contextMenu(): string {
|
||||
public override get contextMenu(): string {
|
||||
return ContextMenuEnum.MYSTERY_BOX;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -3,19 +3,19 @@ import {RoomObjectWidgetRequestEvent} from "../../../../../events";
|
|||
import {FurnitureMultiStateLogic} from "./FurnitureMultiStateLogic";
|
||||
|
||||
export class FurnitureMysteryTrophyLogic extends FurnitureMultiStateLogic {
|
||||
public getEventTypes(): string[] {
|
||||
public override getEventTypes(): string[] {
|
||||
const types = [RoomObjectWidgetRequestEvent.MYSTERYTROPHY_OPEN_DIALOG];
|
||||
|
||||
return this.mergeTypes(super.getEventTypes(), types);
|
||||
}
|
||||
|
||||
public useObject(): void {
|
||||
public override useObject(): void {
|
||||
if (!this.object || !this.eventDispatcher) return;
|
||||
|
||||
this.eventDispatcher.dispatchEvent(new RoomObjectWidgetRequestEvent(RoomObjectWidgetRequestEvent.MYSTERYTROPHY_OPEN_DIALOG, this.object));
|
||||
}
|
||||
|
||||
public get contextMenu(): string {
|
||||
public override get contextMenu(): string {
|
||||
return ContextMenuEnum.MYSTERY_TROPHY;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -2,13 +2,13 @@ import {RoomObjectFurnitureActionEvent} from "../../../../../events";
|
|||
import {FurnitureLogic} from "./FurnitureLogic";
|
||||
|
||||
export class FurnitureOneWayDoorLogic extends FurnitureLogic {
|
||||
public getEventTypes(): string[] {
|
||||
public override getEventTypes(): string[] {
|
||||
const types = [RoomObjectFurnitureActionEvent.ENTER_ONEWAYDOOR];
|
||||
|
||||
return this.mergeTypes(super.getEventTypes(), types);
|
||||
}
|
||||
|
||||
public useObject(): void {
|
||||
public override useObject(): void {
|
||||
if (!this.object || !this.eventDispatcher) return;
|
||||
|
||||
this.eventDispatcher.dispatchEvent(new RoomObjectFurnitureActionEvent(RoomObjectFurnitureActionEvent.ENTER_ONEWAYDOOR, this.object));
|
||||
|
|
|
@ -4,13 +4,13 @@ import {RoomObjectUpdateMessage} from "../../../../../room";
|
|||
import {FurnitureLogic} from "./FurnitureLogic";
|
||||
|
||||
export class FurniturePetCustomizationLogic extends FurnitureLogic {
|
||||
public getEventTypes(): string[] {
|
||||
public override getEventTypes(): string[] {
|
||||
const types = [RoomObjectWidgetRequestEvent.PET_PRODUCT_MENU];
|
||||
|
||||
return this.mergeTypes(super.getEventTypes(), types);
|
||||
}
|
||||
|
||||
public processUpdateMessage(message: RoomObjectUpdateMessage): void {
|
||||
public override processUpdateMessage(message: RoomObjectUpdateMessage): void {
|
||||
super.processUpdateMessage(message);
|
||||
|
||||
if (!this.object) return;
|
||||
|
@ -20,7 +20,7 @@ export class FurniturePetCustomizationLogic extends FurnitureLogic {
|
|||
}
|
||||
}
|
||||
|
||||
public useObject(): void {
|
||||
public override useObject(): void {
|
||||
if (!this.object || !this.eventDispatcher) return;
|
||||
|
||||
this.eventDispatcher.dispatchEvent(new RoomObjectWidgetRequestEvent(RoomObjectWidgetRequestEvent.PET_PRODUCT_MENU, this.object));
|
||||
|
|
|
@ -2,13 +2,13 @@ import {RoomObjectWidgetRequestEvent} from "../../../../../events";
|
|||
import {FurnitureLogic} from "./FurnitureLogic";
|
||||
|
||||
export class FurniturePlaceholderLogic extends FurnitureLogic {
|
||||
public getEventTypes(): string[] {
|
||||
public override getEventTypes(): string[] {
|
||||
const types = [RoomObjectWidgetRequestEvent.PLACEHOLDER];
|
||||
|
||||
return this.mergeTypes(super.getEventTypes(), types);
|
||||
}
|
||||
|
||||
public useObject(): void {
|
||||
public override useObject(): void {
|
||||
if (!this.object || !this.eventDispatcher) return;
|
||||
|
||||
this.eventDispatcher.dispatchEvent(new RoomObjectWidgetRequestEvent(RoomObjectWidgetRequestEvent.PLACEHOLDER, this.object));
|
||||
|
|
|
@ -2,7 +2,7 @@ import {IAssetData, IAssetLogicPlanetSystem, RoomObjectVariable} from "../../../
|
|||
import {FurnitureLogic} from "./FurnitureLogic";
|
||||
|
||||
export class FurniturePlanetSystemLogic extends FurnitureLogic {
|
||||
public initialize(asset: IAssetData): void {
|
||||
public override initialize(asset: IAssetData): void {
|
||||
super.initialize(asset);
|
||||
|
||||
if (asset.logic) {
|
||||
|
|
|
@ -11,13 +11,13 @@ export class FurniturePresentLogic extends FurnitureLogic {
|
|||
private static PURCHASER_NAME: string = "PURCHASER_NAME";
|
||||
private static PURCHASER_FIGURE: string = "PURCHASER_FIGURE";
|
||||
|
||||
public getEventTypes(): string[] {
|
||||
public override getEventTypes(): string[] {
|
||||
const types = [RoomObjectWidgetRequestEvent.PRESENT];
|
||||
|
||||
return this.mergeTypes(super.getEventTypes(), types);
|
||||
}
|
||||
|
||||
public initialize(asset: IAssetData): void {
|
||||
public override initialize(asset: IAssetData): void {
|
||||
super.initialize(asset);
|
||||
|
||||
if (asset.logic) {
|
||||
|
@ -27,7 +27,7 @@ export class FurniturePresentLogic extends FurnitureLogic {
|
|||
}
|
||||
}
|
||||
|
||||
public processUpdateMessage(message: RoomObjectUpdateMessage): void {
|
||||
public override processUpdateMessage(message: RoomObjectUpdateMessage): void {
|
||||
super.processUpdateMessage(message);
|
||||
|
||||
if (message instanceof ObjectDataUpdateMessage) {
|
||||
|
@ -70,7 +70,7 @@ export class FurniturePresentLogic extends FurnitureLogic {
|
|||
this.object.model.setValue(key, value);
|
||||
}
|
||||
|
||||
public mouseEvent(event: RoomSpriteMouseEvent, geometry: IRoomGeometry): void {
|
||||
public override mouseEvent(event: RoomSpriteMouseEvent, geometry: IRoomGeometry): void {
|
||||
if (!event || !geometry || !this.object) return;
|
||||
|
||||
switch (event.type) {
|
||||
|
@ -85,7 +85,7 @@ export class FurniturePresentLogic extends FurnitureLogic {
|
|||
super.mouseEvent(event, geometry);
|
||||
}
|
||||
|
||||
public useObject(): void {
|
||||
public override useObject(): void {
|
||||
if (!this.object || !this.eventDispatcher) return;
|
||||
|
||||
this.eventDispatcher.dispatchEvent(new RoomObjectWidgetRequestEvent(RoomObjectWidgetRequestEvent.PRESENT, this.object));
|
||||
|
|
|
@ -3,19 +3,19 @@ import {RoomObjectWidgetRequestEvent} from "../../../../../events";
|
|||
import {FurnitureMultiStateLogic} from "./FurnitureMultiStateLogic";
|
||||
|
||||
export class FurniturePurchaseableClothingLogic extends FurnitureMultiStateLogic {
|
||||
public getEventTypes(): string[] {
|
||||
public override getEventTypes(): string[] {
|
||||
const types = [RoomObjectWidgetRequestEvent.PURCHASABLE_CLOTHING_CONFIRMATION_DIALOG];
|
||||
|
||||
return this.mergeTypes(super.getEventTypes(), types);
|
||||
}
|
||||
|
||||
public useObject(): void {
|
||||
public override useObject(): void {
|
||||
if (!this.object || !this.eventDispatcher) return;
|
||||
|
||||
this.eventDispatcher.dispatchEvent(new RoomObjectWidgetRequestEvent(RoomObjectWidgetRequestEvent.PURCHASABLE_CLOTHING_CONFIRMATION_DIALOG, this.object));
|
||||
}
|
||||
|
||||
public get contextMenu(): string {
|
||||
public override get contextMenu(): string {
|
||||
return ContextMenuEnum.PURCHASABLE_CLOTHING;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -18,7 +18,7 @@ export class FurniturePushableLogic extends FurnitureMultiStateLogic {
|
|||
this._oldLocation = new Vector3d();
|
||||
}
|
||||
|
||||
public processUpdateMessage(message: RoomObjectUpdateMessage): void {
|
||||
public override processUpdateMessage(message: RoomObjectUpdateMessage): void {
|
||||
if (!message) return;
|
||||
|
||||
const isMoveMessage = message instanceof ObjectMoveUpdateMessage;
|
||||
|
@ -83,7 +83,7 @@ export class FurniturePushableLogic extends FurnitureMultiStateLogic {
|
|||
super.processUpdateMessage(message);
|
||||
}
|
||||
|
||||
public update(time: number): void {
|
||||
public override update(time: number): void {
|
||||
if (!this.object) return;
|
||||
|
||||
this._oldLocation.assign(this.object.getLocation());
|
||||
|
|
|
@ -2,13 +2,13 @@ import {RoomObjectStateChangedEvent} from "../../../../../events";
|
|||
import {FurnitureLogic} from "./FurnitureLogic";
|
||||
|
||||
export class FurnitureRandomStateLogic extends FurnitureLogic {
|
||||
public getEventTypes(): string[] {
|
||||
public override getEventTypes(): string[] {
|
||||
const types = [RoomObjectStateChangedEvent.STATE_RANDOM];
|
||||
|
||||
return this.mergeTypes(super.getEventTypes(), types);
|
||||
}
|
||||
|
||||
public useObject(): void {
|
||||
public override useObject(): void {
|
||||
if (!this.object || !this.eventDispatcher) return;
|
||||
|
||||
this.eventDispatcher.dispatchEvent(new RoomObjectStateChangedEvent(RoomObjectStateChangedEvent.STATE_RANDOM, this.object));
|
||||
|
|
|
@ -2,7 +2,7 @@ import {ContextMenuEnum} from "../../../../../api";
|
|||
import {FurnitureMultiStateLogic} from "./FurnitureMultiStateLogic";
|
||||
|
||||
export class FurnitureRandomTeleportLogic extends FurnitureMultiStateLogic {
|
||||
public get contextMenu(): string {
|
||||
public override get contextMenu(): string {
|
||||
return ContextMenuEnum.RANDOM_TELEPORT;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -3,13 +3,13 @@ import {RoomObjectDataRequestEvent} from "../../../../../events";
|
|||
import {FurnitureLogic} from "./FurnitureLogic";
|
||||
|
||||
export class FurnitureRentableSpaceLogic extends FurnitureLogic {
|
||||
public getEventTypes(): string[] {
|
||||
public override getEventTypes(): string[] {
|
||||
const types = [RoomObjectDataRequestEvent.RODRE_CURRENT_USER_ID];
|
||||
|
||||
return this.mergeTypes(super.getEventTypes(), types);
|
||||
}
|
||||
|
||||
public update(time: number): void {
|
||||
public override update(time: number): void {
|
||||
super.update(time);
|
||||
|
||||
if (this.object && this.object.model) {
|
||||
|
@ -29,7 +29,7 @@ export class FurnitureRentableSpaceLogic extends FurnitureLogic {
|
|||
}
|
||||
}
|
||||
|
||||
public get widget(): string {
|
||||
public override get widget(): string {
|
||||
return RoomWidgetEnum.RENTABLESPACE;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -13,13 +13,13 @@ export class FurnitureRoomBackgroundColorLogic extends FurnitureMultiStateLogic
|
|||
this._roomColorUpdated = false;
|
||||
}
|
||||
|
||||
public getEventTypes(): string[] {
|
||||
public override getEventTypes(): string[] {
|
||||
const types = [RoomObjectWidgetRequestEvent.BACKGROUND_COLOR, RoomObjectHSLColorEnableEvent.ROOM_BACKGROUND_COLOR];
|
||||
|
||||
return this.mergeTypes(super.getEventTypes(), types);
|
||||
}
|
||||
|
||||
protected onDispose(): void {
|
||||
protected override onDispose(): void {
|
||||
if (this._roomColorUpdated) {
|
||||
if (this.eventDispatcher && this.object) {
|
||||
const realRoomObject = this.object.model.getValue<number>(RoomObjectVariable.FURNITURE_REAL_ROOM_OBJECT);
|
||||
|
@ -37,7 +37,7 @@ export class FurnitureRoomBackgroundColorLogic extends FurnitureMultiStateLogic
|
|||
super.onDispose();
|
||||
}
|
||||
|
||||
public processUpdateMessage(message: RoomObjectUpdateMessage): void {
|
||||
public override processUpdateMessage(message: RoomObjectUpdateMessage): void {
|
||||
super.processUpdateMessage(message);
|
||||
|
||||
if (message instanceof ObjectDataUpdateMessage) {
|
||||
|
@ -78,7 +78,7 @@ export class FurnitureRoomBackgroundColorLogic extends FurnitureMultiStateLogic
|
|||
}
|
||||
}
|
||||
|
||||
public mouseEvent(event: RoomSpriteMouseEvent, geometry: IRoomGeometry): void {
|
||||
public override mouseEvent(event: RoomSpriteMouseEvent, geometry: IRoomGeometry): void {
|
||||
if (!event || !geometry || !this.object) return;
|
||||
|
||||
switch (event.type) {
|
||||
|
|
|
@ -2,7 +2,7 @@ import {IRoomObjectModel} from "../../../../../api";
|
|||
import {FurnitureRoomBrandingLogic} from "./FurnitureRoomBrandingLogic";
|
||||
|
||||
export class FurnitureRoomBackgroundLogic extends FurnitureRoomBrandingLogic {
|
||||
protected getAdClickUrl(model: IRoomObjectModel): string {
|
||||
protected override getAdClickUrl(model: IRoomObjectModel): string {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -10,11 +10,11 @@ export class FurnitureRoomBillboardLogic extends FurnitureRoomBrandingLogic {
|
|||
this._hasClickUrl = true;
|
||||
}
|
||||
|
||||
protected getAdClickUrl(model: IRoomObjectModel): string {
|
||||
protected override getAdClickUrl(model: IRoomObjectModel): string {
|
||||
return model.getValue<string>(RoomObjectVariable.FURNITURE_BRANDING_URL);
|
||||
}
|
||||
|
||||
protected handleAdClick(objectId: number, objectType: string, clickUrl: string): void {
|
||||
protected override handleAdClick(objectId: number, objectType: string, clickUrl: string): void {
|
||||
if (clickUrl.indexOf("http") === 0) {
|
||||
HabboWebTools.openWebPage(clickUrl);
|
||||
|
||||
|
|
|
@ -34,13 +34,13 @@ export class FurnitureRoomBrandingLogic extends FurnitureLogic {
|
|||
this._hasClickUrl = false;
|
||||
}
|
||||
|
||||
public getEventTypes(): string[] {
|
||||
public override getEventTypes(): string[] {
|
||||
const types = [RoomObjectRoomAdEvent.ROOM_AD_LOAD_IMAGE];
|
||||
|
||||
return this.mergeTypes(super.getEventTypes(), types);
|
||||
}
|
||||
|
||||
public initialize(asset: IAssetData): void {
|
||||
public override initialize(asset: IAssetData): void {
|
||||
super.initialize(asset);
|
||||
|
||||
if (this._disableFurnitureSelection) {
|
||||
|
@ -48,7 +48,7 @@ export class FurnitureRoomBrandingLogic extends FurnitureLogic {
|
|||
}
|
||||
}
|
||||
|
||||
public processUpdateMessage(message: RoomObjectUpdateMessage): void {
|
||||
public override processUpdateMessage(message: RoomObjectUpdateMessage): void {
|
||||
super.processUpdateMessage(message);
|
||||
|
||||
if (message instanceof ObjectDataUpdateMessage) this.processAdDataUpdateMessage(message);
|
||||
|
@ -121,7 +121,7 @@ export class FurnitureRoomBrandingLogic extends FurnitureLogic {
|
|||
}
|
||||
}
|
||||
|
||||
public mouseEvent(event: RoomSpriteMouseEvent, geometry: IRoomGeometry): void {
|
||||
public override mouseEvent(event: RoomSpriteMouseEvent, geometry: IRoomGeometry): void {
|
||||
if (!event || !geometry) return;
|
||||
|
||||
if (event.type === MouseEventType.MOUSE_MOVE || event.type === MouseEventType.DOUBLE_CLICK) return;
|
||||
|
|
|
@ -13,13 +13,13 @@ export class FurnitureRoomDimmerLogic extends FurnitureLogic {
|
|||
this._roomColorUpdated = false;
|
||||
}
|
||||
|
||||
public getEventTypes(): string[] {
|
||||
public override getEventTypes(): string[] {
|
||||
const types = [RoomObjectWidgetRequestEvent.DIMMER, RoomObjectWidgetRequestEvent.WIDGET_REMOVE_DIMMER, RoomObjectDimmerStateUpdateEvent.DIMMER_STATE];
|
||||
|
||||
return this.mergeTypes(super.getEventTypes(), types);
|
||||
}
|
||||
|
||||
protected onDispose(): void {
|
||||
protected override onDispose(): void {
|
||||
if (this._roomColorUpdated) {
|
||||
if (this.eventDispatcher && this.object) {
|
||||
const realRoomObject = this.object.model.getValue<number>(RoomObjectVariable.FURNITURE_REAL_ROOM_OBJECT);
|
||||
|
@ -36,7 +36,7 @@ export class FurnitureRoomDimmerLogic extends FurnitureLogic {
|
|||
super.onDispose();
|
||||
}
|
||||
|
||||
public processUpdateMessage(message: RoomObjectUpdateMessage): void {
|
||||
public override processUpdateMessage(message: RoomObjectUpdateMessage): void {
|
||||
if (message instanceof ObjectDataUpdateMessage) {
|
||||
if (message.data) {
|
||||
const extra = message.data.getLegacyString();
|
||||
|
@ -91,13 +91,13 @@ export class FurnitureRoomDimmerLogic extends FurnitureLogic {
|
|||
}
|
||||
}
|
||||
|
||||
public useObject(): void {
|
||||
public override useObject(): void {
|
||||
if (!this.object || !this.eventDispatcher) return;
|
||||
|
||||
this.eventDispatcher.dispatchEvent(new RoomObjectWidgetRequestEvent(RoomObjectWidgetRequestEvent.DIMMER, this.object));
|
||||
}
|
||||
|
||||
public update(time: number): void {
|
||||
public override update(time: number): void {
|
||||
super.update(time);
|
||||
|
||||
// if(this.object && this.object.model)
|
||||
|
|
|
@ -19,7 +19,7 @@ export class FurnitureScoreLogic extends FurnitureLogic {
|
|||
this._scoreTimer = 0;
|
||||
}
|
||||
|
||||
public processUpdateMessage(message: RoomObjectUpdateMessage): void {
|
||||
public override processUpdateMessage(message: RoomObjectUpdateMessage): void {
|
||||
if (message instanceof ObjectDataUpdateMessage) return this.updateScore(message.state);
|
||||
|
||||
super.processUpdateMessage(message);
|
||||
|
@ -43,7 +43,7 @@ export class FurnitureScoreLogic extends FurnitureLogic {
|
|||
}
|
||||
}
|
||||
|
||||
public update(time: number): void {
|
||||
public override update(time: number): void {
|
||||
super.update(time);
|
||||
|
||||
const currentScore = this.object.getState(0);
|
||||
|
|
|
@ -3,7 +3,7 @@ import {RoomObjectUpdateMessage} from "../../../../../room";
|
|||
import {FurnitureLogic} from "./FurnitureLogic";
|
||||
|
||||
export class FurnitureSongDiskLogic extends FurnitureLogic {
|
||||
public processUpdateMessage(message: RoomObjectUpdateMessage): void {
|
||||
public override processUpdateMessage(message: RoomObjectUpdateMessage): void {
|
||||
super.processUpdateMessage(message);
|
||||
|
||||
if (this.object.model.getValue<number>(RoomObjectVariable.FURNITURE_REAL_ROOM_OBJECT) === 1) {
|
||||
|
|
|
@ -14,7 +14,7 @@ export class FurnitureSoundBlockLogic extends FurnitureMultiStateLogic {
|
|||
private _noPitch: boolean = false;
|
||||
private _lastLocZ: number = 0;
|
||||
|
||||
public getEventTypes(): string[] {
|
||||
public override getEventTypes(): string[] {
|
||||
const types = [
|
||||
RoomObjectSamplePlaybackEvent.ROOM_OBJECT_INITIALIZED,
|
||||
RoomObjectSamplePlaybackEvent.ROOM_OBJECT_DISPOSED,
|
||||
|
@ -25,7 +25,7 @@ export class FurnitureSoundBlockLogic extends FurnitureMultiStateLogic {
|
|||
return this.mergeTypes(super.getEventTypes(), types);
|
||||
}
|
||||
|
||||
public initialize(asset: IAssetData): void {
|
||||
public override initialize(asset: IAssetData): void {
|
||||
super.initialize(asset);
|
||||
|
||||
if (asset.logic) {
|
||||
|
@ -38,7 +38,7 @@ export class FurnitureSoundBlockLogic extends FurnitureMultiStateLogic {
|
|||
this.object.model.setValue(RoomObjectVariable.FURNITURE_SOUNDBLOCK_RELATIVE_ANIMATION_SPEED, 1);
|
||||
}
|
||||
|
||||
protected onDispose(): void {
|
||||
protected override onDispose(): void {
|
||||
if (this._state !== FurnitureSoundBlockLogic.STATE_UNINITIALIZED) {
|
||||
this.eventDispatcher.dispatchEvent(new RoomObjectSamplePlaybackEvent(RoomObjectSamplePlaybackEvent.ROOM_OBJECT_DISPOSED, this.object, this._sampleId));
|
||||
}
|
||||
|
@ -46,7 +46,7 @@ export class FurnitureSoundBlockLogic extends FurnitureMultiStateLogic {
|
|||
super.onDispose();
|
||||
}
|
||||
|
||||
public processUpdateMessage(message: RoomObjectUpdateMessage): void {
|
||||
public override processUpdateMessage(message: RoomObjectUpdateMessage): void {
|
||||
super.processUpdateMessage(message);
|
||||
|
||||
if (message instanceof ObjectDataUpdateMessage) this.updateSoundBlockMessage(message);
|
||||
|
|
|
@ -9,7 +9,7 @@ export class FurnitureSoundMachineLogic extends FurnitureMultiStateLogic {
|
|||
private _isInitialized: boolean = false;
|
||||
private _currentState: number = -1;
|
||||
|
||||
public getEventTypes(): string[] {
|
||||
public override getEventTypes(): string[] {
|
||||
const types = [
|
||||
RoomObjectFurnitureActionEvent.SOUND_MACHINE_START,
|
||||
RoomObjectFurnitureActionEvent.SOUND_MACHINE_STOP,
|
||||
|
@ -20,13 +20,13 @@ export class FurnitureSoundMachineLogic extends FurnitureMultiStateLogic {
|
|||
return this.mergeTypes(super.getEventTypes(), types);
|
||||
}
|
||||
|
||||
protected onDispose(): void {
|
||||
protected override onDispose(): void {
|
||||
this.requestDispose();
|
||||
|
||||
super.onDispose();
|
||||
}
|
||||
|
||||
public processUpdateMessage(message: RoomObjectUpdateMessage): void {
|
||||
public override processUpdateMessage(message: RoomObjectUpdateMessage): void {
|
||||
super.processUpdateMessage(message);
|
||||
|
||||
if (this.object.model.getValue<number>(RoomObjectVariable.FURNITURE_REAL_ROOM_OBJECT) !== 1) return;
|
||||
|
|
|
@ -7,13 +7,13 @@ import {FurnitureLogic} from "./FurnitureLogic";
|
|||
export class FurnitureStickieLogic extends FurnitureLogic {
|
||||
private static STICKIE_COLORS: string[] = ["9CCEFF", "FF9CFF", "9CFF9C", "FFFF33"];
|
||||
|
||||
public getEventTypes(): string[] {
|
||||
public override getEventTypes(): string[] {
|
||||
const types = [RoomObjectWidgetRequestEvent.STICKIE, RoomObjectFurnitureActionEvent.STICKIE];
|
||||
|
||||
return this.mergeTypes(super.getEventTypes(), types);
|
||||
}
|
||||
|
||||
public initialize(asset: IAssetData): void {
|
||||
public override initialize(asset: IAssetData): void {
|
||||
super.initialize(asset);
|
||||
|
||||
this.updateColor();
|
||||
|
@ -21,7 +21,7 @@ export class FurnitureStickieLogic extends FurnitureLogic {
|
|||
if (this.object) this.object.model.setValue(RoomObjectVariable.FURNITURE_IS_STICKIE, "");
|
||||
}
|
||||
|
||||
public processUpdateMessage(message: RoomObjectUpdateMessage): void {
|
||||
public override processUpdateMessage(message: RoomObjectUpdateMessage): void {
|
||||
super.processUpdateMessage(message);
|
||||
|
||||
if (message instanceof ObjectItemDataUpdateMessage) {
|
||||
|
@ -43,7 +43,7 @@ export class FurnitureStickieLogic extends FurnitureLogic {
|
|||
this.object.model.setValue(RoomObjectVariable.FURNITURE_COLOR, colorIndex + 1);
|
||||
}
|
||||
|
||||
public useObject(): void {
|
||||
public override useObject(): void {
|
||||
if (!this.object || !this.eventDispatcher) return;
|
||||
|
||||
this.eventDispatcher.dispatchEvent(new RoomObjectFurnitureActionEvent(RoomObjectFurnitureActionEvent.STICKIE, this.object));
|
||||
|
|
|
@ -2,13 +2,13 @@ import {RoomObjectWidgetRequestEvent} from "../../../../../events";
|
|||
import {FurnitureLogic} from "./FurnitureLogic";
|
||||
|
||||
export class FurnitureTrophyLogic extends FurnitureLogic {
|
||||
public getEventTypes(): string[] {
|
||||
public override getEventTypes(): string[] {
|
||||
const types = [RoomObjectWidgetRequestEvent.TROPHY];
|
||||
|
||||
return this.mergeTypes(super.getEventTypes(), types);
|
||||
}
|
||||
|
||||
public useObject(): void {
|
||||
public override useObject(): void {
|
||||
if (!this.object || !this.eventDispatcher) return;
|
||||
|
||||
this.eventDispatcher.dispatchEvent(new RoomObjectWidgetRequestEvent(RoomObjectWidgetRequestEvent.TROPHY, this.object));
|
||||
|
|
|
@ -20,7 +20,7 @@ export class FurnitureVoteCounterLogic extends FurnitureMultiStateLogic {
|
|||
this._interval = 33;
|
||||
}
|
||||
|
||||
public processUpdateMessage(message: RoomObjectUpdateMessage): void {
|
||||
public override processUpdateMessage(message: RoomObjectUpdateMessage): void {
|
||||
super.processUpdateMessage(message);
|
||||
|
||||
if (message instanceof ObjectDataUpdateMessage) {
|
||||
|
@ -56,7 +56,7 @@ export class FurnitureVoteCounterLogic extends FurnitureMultiStateLogic {
|
|||
}
|
||||
}
|
||||
|
||||
public update(time: number): void {
|
||||
public override update(time: number): void {
|
||||
super.update(time);
|
||||
|
||||
if (this.object) {
|
||||
|
|
|
@ -4,7 +4,7 @@ import {ObjectDataUpdateMessage} from "../../../messages";
|
|||
import {FurnitureMultiStateLogic} from "./FurnitureMultiStateLogic";
|
||||
|
||||
export class FurnitureVoteMajorityLogic extends FurnitureMultiStateLogic {
|
||||
public processUpdateMessage(message: RoomObjectUpdateMessage): void {
|
||||
public override processUpdateMessage(message: RoomObjectUpdateMessage): void {
|
||||
super.processUpdateMessage(message);
|
||||
|
||||
if (!this.object) return;
|
||||
|
|
|
@ -3,7 +3,7 @@ import {RoomObjectStateChangedEvent, RoomSpriteMouseEvent} from "../../../../../
|
|||
import {FurnitureMultiStateLogic} from "./FurnitureMultiStateLogic";
|
||||
|
||||
export class FurnitureWelcomeGiftLogic extends FurnitureMultiStateLogic {
|
||||
public mouseEvent(event: RoomSpriteMouseEvent, geometry: IRoomGeometry): void {
|
||||
public override mouseEvent(event: RoomSpriteMouseEvent, geometry: IRoomGeometry): void {
|
||||
if (!event || !geometry) return;
|
||||
|
||||
if (event.type === MouseEventType.DOUBLE_CLICK) {
|
||||
|
|
|
@ -2,7 +2,7 @@ import {IAssetData, RoomObjectVariable} from "../../../../../api";
|
|||
import {FurnitureMultiStateLogic} from "./FurnitureMultiStateLogic";
|
||||
|
||||
export class FurnitureWindowLogic extends FurnitureMultiStateLogic {
|
||||
public initialize(asset: IAssetData): void {
|
||||
public override initialize(asset: IAssetData): void {
|
||||
super.initialize(asset);
|
||||
|
||||
let maskType = "";
|
||||
|
|
|
@ -3,13 +3,13 @@ import {RoomObjectDataRequestEvent, RoomObjectWidgetRequestEvent} from "../../..
|
|||
import {FurnitureLogic} from "./FurnitureLogic";
|
||||
|
||||
export class FurnitureYoutubeLogic extends FurnitureLogic {
|
||||
public getEventTypes(): string[] {
|
||||
public override getEventTypes(): string[] {
|
||||
const types = [RoomObjectWidgetRequestEvent.YOUTUBE, RoomObjectDataRequestEvent.RODRE_URL_PREFIX];
|
||||
|
||||
return this.mergeTypes(super.getEventTypes(), types);
|
||||
}
|
||||
|
||||
public update(time: number): void {
|
||||
public override update(time: number): void {
|
||||
super.update(time);
|
||||
|
||||
if (!this.object.model.getValue<string>(RoomObjectVariable.SESSION_URL_PREFIX)) {
|
||||
|
@ -17,7 +17,7 @@ export class FurnitureYoutubeLogic extends FurnitureLogic {
|
|||
}
|
||||
}
|
||||
|
||||
public useObject(): void {
|
||||
public override useObject(): void {
|
||||
if (!this.object || !this.eventDispatcher) return;
|
||||
|
||||
this.eventDispatcher.dispatchEvent(new RoomObjectWidgetRequestEvent(RoomObjectWidgetRequestEvent.YOUTUBE, this.object));
|
||||
|
|
|
@ -41,13 +41,13 @@ export class PetLogic extends MovingObjectLogic {
|
|||
this._expressionEndTimestamp = 0;
|
||||
}
|
||||
|
||||
public getEventTypes(): string[] {
|
||||
public override getEventTypes(): string[] {
|
||||
const types = [RoomObjectMouseEvent.CLICK, RoomObjectMoveEvent.POSITION_CHANGED];
|
||||
|
||||
return this.mergeTypes(super.getEventTypes(), types);
|
||||
}
|
||||
|
||||
public initialize(asset: IAssetData): void {
|
||||
public override initialize(asset: IAssetData): void {
|
||||
if (!asset) return;
|
||||
|
||||
const model = this.object && this.object.model;
|
||||
|
@ -69,7 +69,7 @@ export class PetLogic extends MovingObjectLogic {
|
|||
model.setValue(RoomObjectVariable.PET_ALLOWED_DIRECTIONS, this._directions);
|
||||
}
|
||||
|
||||
public dispose(): void {
|
||||
public override dispose(): void {
|
||||
if (this._selected && this.object) {
|
||||
if (this.eventDispatcher) this.eventDispatcher.dispatchEvent(new RoomObjectMoveEvent(RoomObjectMoveEvent.OBJECT_REMOVED, this.object));
|
||||
}
|
||||
|
@ -78,7 +78,7 @@ export class PetLogic extends MovingObjectLogic {
|
|||
this._reportedLocation = null;
|
||||
}
|
||||
|
||||
public update(totalTimeRunning: number): void {
|
||||
public override update(totalTimeRunning: number): void {
|
||||
super.update(totalTimeRunning);
|
||||
|
||||
if (this._selected && this.object) {
|
||||
|
@ -125,7 +125,7 @@ export class PetLogic extends MovingObjectLogic {
|
|||
}
|
||||
}
|
||||
|
||||
public processUpdateMessage(message: RoomObjectUpdateMessage): void {
|
||||
public override processUpdateMessage(message: RoomObjectUpdateMessage): void {
|
||||
if (!message || !this.object) return;
|
||||
|
||||
super.processUpdateMessage(message);
|
||||
|
@ -199,7 +199,7 @@ export class PetLogic extends MovingObjectLogic {
|
|||
}
|
||||
}
|
||||
|
||||
public mouseEvent(event: RoomSpriteMouseEvent, geometry: IRoomGeometry): void {
|
||||
public override mouseEvent(event: RoomSpriteMouseEvent, geometry: IRoomGeometry): void {
|
||||
let eventType: string = null;
|
||||
|
||||
switch (event.type) {
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue