diff --git a/.eslintrc.json b/.eslintrc.json index 75a1859d..23546cfc 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -24,6 +24,9 @@ "SwitchCase": 1 } ], + "no-multi-spaces": [ + "error" + ], "no-trailing-spaces": [ "error", { diff --git a/src/core/NitroCore.ts b/src/core/NitroCore.ts index e3696b98..d84bccf6 100644 --- a/src/core/NitroCore.ts +++ b/src/core/NitroCore.ts @@ -22,7 +22,7 @@ export class NitroCore extends Disposable implements INitroCore this._configuration = new ConfigurationManager(); this._communication = new CommunicationManager(); - this._asset = new AssetManager(); + this._asset = new AssetManager(); } protected onDispose(): void diff --git a/src/core/NitroVersion.ts b/src/core/NitroVersion.ts index 3fb4aa79..e1dcccd0 100644 --- a/src/core/NitroVersion.ts +++ b/src/core/NitroVersion.ts @@ -1,5 +1,5 @@ export class NitroVersion { - public static RENDERER_VERSION: string = '1.1.5'; - public static UI_VERSION: string = ''; + public static RENDERER_VERSION: string = '1.1.5'; + public static UI_VERSION: string = ''; } diff --git a/src/core/asset/AssetManager.ts b/src/core/asset/AssetManager.ts index fa61a4fa..56f55df2 100644 --- a/src/core/asset/AssetManager.ts +++ b/src/core/asset/AssetManager.ts @@ -21,9 +21,9 @@ export class AssetManager extends Disposable implements IAssetManager { super(); - this._logger = new NitroLogger(this.constructor.name); - this._textures = new Map(); - this._collections = new Map(); + this._logger = new NitroLogger(this.constructor.name); + this._textures = new Map(); + this._collections = new Map(); } public static removeFileExtension(name: string): string @@ -167,8 +167,8 @@ export class AssetManager extends Disposable implements IAssetManager if(resource.extension === 'nitro') { - const nitroBundle = new NitroBundle(resource.data); - const assetData = (nitroBundle.jsonFile as IAssetData); + const nitroBundle = new NitroBundle(resource.data); + const assetData = (nitroBundle.jsonFile as IAssetData); if(!assetData) { diff --git a/src/core/asset/NitroBundle.ts b/src/core/asset/NitroBundle.ts index 59d32271..f7866c17 100644 --- a/src/core/asset/NitroBundle.ts +++ b/src/core/asset/NitroBundle.ts @@ -21,7 +21,7 @@ export class NitroBundle let binary = ''; const bytes = new Uint8Array(buffer); - const len = bytes.byteLength; + const len = bytes.byteLength; for(let i = 0; i < len; i++) (binary += String.fromCharCode(bytes[i])); @@ -36,10 +36,10 @@ export class NitroBundle while(fileCount > 0) { - const fileNameLength = binaryReader.readShort(); - const fileName = binaryReader.readBytes(fileNameLength).toString(); - const fileLength = binaryReader.readInt(); - const buffer = binaryReader.readBytes(fileLength); + const fileNameLength = binaryReader.readShort(); + const fileName = binaryReader.readBytes(fileNameLength).toString(); + const fileLength = binaryReader.readInt(); + const buffer = binaryReader.readBytes(fileLength); if(fileName.endsWith('.json')) { @@ -49,8 +49,8 @@ export class NitroBundle } else { - const decompressed = inflate((buffer.toArrayBuffer() as Data)); - const base64 = NitroBundle.arrayBufferToBase64(decompressed); + const decompressed = inflate((buffer.toArrayBuffer() as Data)); + const base64 = NitroBundle.arrayBufferToBase64(decompressed); this._baseTexture = new BaseTexture('data:image/png;base64,' + base64); } diff --git a/src/core/common/NitroManager.ts b/src/core/common/NitroManager.ts index 091e175c..91c77cfd 100644 --- a/src/core/common/NitroManager.ts +++ b/src/core/common/NitroManager.ts @@ -18,24 +18,24 @@ export class NitroManager extends Disposable implements INitroManager { super(); - this._logger = logger instanceof NitroLogger ? logger : new NitroLogger(this.constructor.name); + this._logger = logger instanceof NitroLogger ? logger : new NitroLogger(this.constructor.name); - this._events = new EventDispatcher(); + this._events = new EventDispatcher(); - this._isLoaded = false; - this._isLoading = false; + this._isLoaded = false; + this._isLoading = false; } public init(): void { if(this._isLoaded || this._isLoading || this.isDisposing) return; - this._isLoading = true; + this._isLoading = true; this.onInit(); - this._isLoaded = true; - this._isLoading = false; + this._isLoaded = true; + this._isLoading = false; } protected onInit(): void diff --git a/src/core/common/disposable/Disposable.ts b/src/core/common/disposable/Disposable.ts index 0b77bcf7..23e34d34 100644 --- a/src/core/common/disposable/Disposable.ts +++ b/src/core/common/disposable/Disposable.ts @@ -7,20 +7,20 @@ export class Disposable implements IDisposable constructor() { - this._isDisposed = false; - this._isDisposing = false; + this._isDisposed = false; + this._isDisposing = false; } public dispose(): void { if(this._isDisposed || this._isDisposing) return; - this._isDisposing = true; + this._isDisposing = true; this.onDispose(); - this._isDisposed = true; - this._isDisposing = false; + this._isDisposed = true; + this._isDisposing = false; } protected onDispose(): void diff --git a/src/core/common/logger/NitroLogger.ts b/src/core/common/logger/NitroLogger.ts index 68e69f93..740b74a1 100644 --- a/src/core/common/logger/NitroLogger.ts +++ b/src/core/common/logger/NitroLogger.ts @@ -10,9 +10,9 @@ export class NitroLogger implements INitroLogger constructor(name: string, description: string | number = null) { - this._name = name; - this._description = description; - this._print = true; + this._name = name; + this._description = description; + this._print = true; } public log(message: string): void diff --git a/src/core/communication/codec/BinaryWriter.ts b/src/core/communication/codec/BinaryWriter.ts index 57bcb005..4f5c6b31 100644 --- a/src/core/communication/codec/BinaryWriter.ts +++ b/src/core/communication/codec/BinaryWriter.ts @@ -76,7 +76,7 @@ export class BinaryWriter { if(!array) return; - const mergedArray = new Uint8Array( ((this.position + array.length) > this._buffer.length) ? (this.position + array.length) : this._buffer.length); + const mergedArray = new Uint8Array( ((this.position + array.length) > this._buffer.length) ? (this.position + array.length) : this._buffer.length); mergedArray.set(this._buffer); mergedArray.set(array, this.position); diff --git a/src/core/communication/codec/evawire/EvaWireDataWrapper.ts b/src/core/communication/codec/evawire/EvaWireDataWrapper.ts index 50a7a68b..66a744f8 100644 --- a/src/core/communication/codec/evawire/EvaWireDataWrapper.ts +++ b/src/core/communication/codec/evawire/EvaWireDataWrapper.ts @@ -8,8 +8,8 @@ export class EvaWireDataWrapper implements IMessageDataWrapper constructor(header: number, buffer: BinaryReader) { - this._header = header; - this._buffer = buffer; + this._header = header; + this._buffer = buffer; } public readBytes(length: number): BinaryReader @@ -61,8 +61,8 @@ export class EvaWireDataWrapper implements IMessageDataWrapper public readString(): string { - const length = this.readShort(); - const buffer = this._buffer.readBytes(length); + const length = this.readShort(); + const buffer = this._buffer.readBytes(length); return buffer.toString('utf8'); } diff --git a/src/core/communication/codec/evawire/EvaWireFormat.ts b/src/core/communication/codec/evawire/EvaWireFormat.ts index c1c3a411..4869fe6a 100644 --- a/src/core/communication/codec/evawire/EvaWireFormat.ts +++ b/src/core/communication/codec/evawire/EvaWireFormat.ts @@ -21,8 +21,8 @@ export class EvaWireFormat implements ICodec if(type === 'object') { - if(value === null) type = 'null'; - else if(value instanceof Byte) type = 'byte'; + if(value === null) type = 'null'; + else if(value instanceof Byte) type = 'byte'; else if(value instanceof Short) type = 'short'; else if(value instanceof ArrayBuffer) type = 'arraybuffer'; } @@ -75,7 +75,7 @@ export class EvaWireFormat implements ICodec if(connection.dataBuffer.byteLength < 4) break; const container = new BinaryReader(connection.dataBuffer); - const length = container.readInt(); + const length = container.readInt(); if(length > (connection.dataBuffer.byteLength - 4)) break; diff --git a/src/core/communication/connections/SocketConnection.ts b/src/core/communication/connections/SocketConnection.ts index 5f3e0d4a..9d1d5201 100644 --- a/src/core/communication/connections/SocketConnection.ts +++ b/src/core/communication/connections/SocketConnection.ts @@ -33,23 +33,23 @@ export class SocketConnection extends EventDispatcher implements IConnection { super(); - this._communicationManager = communicationManager; - this._stateListener = stateListener; - this._socket = null; - this._messages = new MessageClassManager(); - this._codec = new EvaWireFormat(); - this._dataBuffer = null; - this._isReady = false; + this._communicationManager = communicationManager; + this._stateListener = stateListener; + this._socket = null; + this._messages = new MessageClassManager(); + this._codec = new EvaWireFormat(); + this._dataBuffer = null; + this._isReady = false; this._pendingClientMessages = []; this._pendingServerMessages = []; - this._isAuthenticated = false; + this._isAuthenticated = false; - this.onOpen = this.onOpen.bind(this); - this.onClose = this.onClose.bind(this); - this.onError = this.onError.bind(this); - this.onMessage = this.onMessage.bind(this); + this.onOpen = this.onOpen.bind(this); + this.onClose = this.onClose.bind(this); + this.onError = this.onError.bind(this); + this.onMessage = this.onMessage.bind(this); } public init(socketUrl: string): void @@ -68,11 +68,11 @@ export class SocketConnection extends EventDispatcher implements IConnection this.destroySocket(); - this._communicationManager = null; - this._stateListener = null; - this._messages = null; - this._codec = null; - this._dataBuffer = null; + this._communicationManager = null; + this._stateListener = null; + this._messages = null; + this._codec = null; + this._dataBuffer = null; } public onReady(): void @@ -95,8 +95,8 @@ export class SocketConnection extends EventDispatcher implements IConnection this.destroySocket(); - this._dataBuffer = new ArrayBuffer(0); - this._socket = new WebSocket(socketUrl); + this._dataBuffer = new ArrayBuffer(0); + this._socket = new WebSocket(socketUrl); this._socket.addEventListener(WebSocketEventEnum.CONNECTION_OPENED, this.onOpen); this._socket.addEventListener(WebSocketEventEnum.CONNECTION_CLOSED, this.onClose); @@ -189,8 +189,8 @@ export class SocketConnection extends EventDispatcher implements IConnection continue; } - const message = composer.getMessageArray(); - const encoded = this._codec.encode(header, message); + const message = composer.getMessageArray(); + const encoded = this._codec.encode(header, message); if(!encoded) { diff --git a/src/core/communication/connections/enums/ClientDeviceCategoryEnum.ts b/src/core/communication/connections/enums/ClientDeviceCategoryEnum.ts index 01619fef..abd127f7 100644 --- a/src/core/communication/connections/enums/ClientDeviceCategoryEnum.ts +++ b/src/core/communication/connections/enums/ClientDeviceCategoryEnum.ts @@ -1,5 +1,5 @@ export class ClientDeviceCategoryEnum { - public static UNKNOWN: number = 0; - public static BROWSER: number = 1; + public static UNKNOWN: number = 0; + public static BROWSER: number = 1; } \ No newline at end of file diff --git a/src/core/communication/connections/enums/ClientPlatformEnum.ts b/src/core/communication/connections/enums/ClientPlatformEnum.ts index e74abddd..417b811e 100644 --- a/src/core/communication/connections/enums/ClientPlatformEnum.ts +++ b/src/core/communication/connections/enums/ClientPlatformEnum.ts @@ -1,7 +1,7 @@ export class ClientPlatformEnum { - public static UNKNOWN: number = 0; - public static FLASH: number = 1; - public static HTML5: number = 2; + public static UNKNOWN: number = 0; + public static FLASH: number = 1; + public static HTML5: number = 2; } \ No newline at end of file diff --git a/src/core/communication/connections/enums/WebSocketEventEnum.ts b/src/core/communication/connections/enums/WebSocketEventEnum.ts index 36a3c458..303b79c1 100644 --- a/src/core/communication/connections/enums/WebSocketEventEnum.ts +++ b/src/core/communication/connections/enums/WebSocketEventEnum.ts @@ -1,7 +1,7 @@ export class WebSocketEventEnum { - public static CONNECTION_OPENED = 'open'; - public static CONNECTION_CLOSED = 'close'; - public static CONNECTION_ERROR = 'error'; - public static CONNECTION_MESSAGE = 'message'; + public static CONNECTION_OPENED = 'open'; + public static CONNECTION_CLOSED = 'close'; + public static CONNECTION_ERROR = 'error'; + public static CONNECTION_MESSAGE = 'message'; } \ No newline at end of file diff --git a/src/core/communication/events/SocketConnectionEvent.ts b/src/core/communication/events/SocketConnectionEvent.ts index 51a18fec..7ccc44d7 100644 --- a/src/core/communication/events/SocketConnectionEvent.ts +++ b/src/core/communication/events/SocketConnectionEvent.ts @@ -3,10 +3,10 @@ import { IConnection } from '../connections/IConnection'; export class SocketConnectionEvent extends NitroEvent { - public static CONNECTION_OPENED = 'SCE_OPEN'; - public static CONNECTION_CLOSED = 'SCE_CLOSED'; - public static CONNECTION_ERROR = 'SCE_ERROR'; - public static CONNECTION_MESSAGE = 'SCE_MESSAGE'; + public static CONNECTION_OPENED = 'SCE_OPEN'; + public static CONNECTION_CLOSED = 'SCE_CLOSED'; + public static CONNECTION_ERROR = 'SCE_ERROR'; + public static CONNECTION_MESSAGE = 'SCE_MESSAGE'; private _connection: IConnection; private _originalEvent: Event; @@ -15,7 +15,7 @@ export class SocketConnectionEvent extends NitroEvent { super(type); - this._connection = connection; + this._connection = connection; this._originalEvent = event; } diff --git a/src/core/communication/messages/MessageClassManager.ts b/src/core/communication/messages/MessageClassManager.ts index e4647281..838dc187 100644 --- a/src/core/communication/messages/MessageClassManager.ts +++ b/src/core/communication/messages/MessageClassManager.ts @@ -11,9 +11,9 @@ export class MessageClassManager constructor() { - this._messageIdByEvent = new Map(); - this._messageIdByComposer = new Map(); - this._messageInstancesById = new Map(); + this._messageIdByEvent = new Map(); + this._messageIdByComposer = new Map(); + this._messageInstancesById = new Map(); } public dispose(): void diff --git a/src/core/communication/messages/MessageEvent.ts b/src/core/communication/messages/MessageEvent.ts index 0c66b659..c2c5217d 100644 --- a/src/core/communication/messages/MessageEvent.ts +++ b/src/core/communication/messages/MessageEvent.ts @@ -11,18 +11,18 @@ export class MessageEvent implements IMessageEvent constructor(callBack: Function, parser: { new(): IMessageParser }) { - this._callBack = callBack; - this._parserClass = parser; - this._parser = null; - this._connection = null; + this._callBack = callBack; + this._parserClass = parser; + this._parser = null; + this._connection = null; } public dispose(): void { - this._callBack = null; - this._parserClass = null; - this._parser = null; - this._connection = null; + this._callBack = null; + this._parserClass = null; + this._parser = null; + this._connection = null; } public get callBack(): Function diff --git a/src/core/configuration/ConfigurationEvent.ts b/src/core/configuration/ConfigurationEvent.ts index 959fa8e4..92fd59ae 100644 --- a/src/core/configuration/ConfigurationEvent.ts +++ b/src/core/configuration/ConfigurationEvent.ts @@ -2,8 +2,8 @@ import { NitroEvent } from '../events/NitroEvent'; export class ConfigurationEvent extends NitroEvent { - public static LOADED: string = 'NCE_LOADED'; - public static FAILED: string = 'NCE_FAILED'; + public static LOADED: string = 'NCE_LOADED'; + public static FAILED: string = 'NCE_FAILED'; constructor(type: string) { diff --git a/src/core/events/EventDispatcher.ts b/src/core/events/EventDispatcher.ts index 59456ec6..e2a0113b 100644 --- a/src/core/events/EventDispatcher.ts +++ b/src/core/events/EventDispatcher.ts @@ -15,7 +15,7 @@ export class EventDispatcher extends Disposable implements IEventDispatcher, IDi { super(); - this._logger = new NitroLogger(this.constructor.name); + this._logger = new NitroLogger(this.constructor.name); this._listeners = new Map(); } diff --git a/src/core/utils/AdvancedMap.ts b/src/core/utils/AdvancedMap.ts index fb8c7940..e1cff566 100644 --- a/src/core/utils/AdvancedMap.ts +++ b/src/core/utils/AdvancedMap.ts @@ -9,10 +9,10 @@ export class AdvancedMap implements IDisposable constructor(map: Map = null) { - this._length = 0; - this._dictionary = new Map(); - this._array = []; - this._keys = []; + this._length = 0; + this._dictionary = new Map(); + this._array = []; + this._keys = []; if(map) for(const [ key, value ] of map.entries()) this.add(key, value); } @@ -36,18 +36,18 @@ export class AdvancedMap implements IDisposable this._dictionary = null; } - this._length = 0; - this._array = null; - this._keys = null; + this._length = 0; + this._array = null; + this._keys = null; } public reset(): void { for(const key of this._dictionary.keys()) this._dictionary.delete(key); - this._length = 0; - this._array = []; - this._keys = []; + this._length = 0; + this._array = []; + this._keys = []; } public unshift(key: T, value: U): boolean @@ -70,8 +70,8 @@ export class AdvancedMap implements IDisposable this._dictionary.set(key, value); - this._array[this._length] = value; - this._keys[this._length] = key; + this._array[this._length] = value; + this._keys[this._length] = key; this._length++; diff --git a/src/core/utils/NitroTimer.ts b/src/core/utils/NitroTimer.ts index 3cf960c7..1dca0434 100644 --- a/src/core/utils/NitroTimer.ts +++ b/src/core/utils/NitroTimer.ts @@ -6,9 +6,9 @@ export class NitroTimer constructor(percision: number = 1) { - this._elapsedTime = 0; - this._percision = percision; - this._timer = null; + this._elapsedTime = 0; + this._percision = percision; + this._timer = null; this.start(); } diff --git a/src/nitro/Nitro.ts b/src/nitro/Nitro.ts index 38fac8b6..724bf534 100644 --- a/src/nitro/Nitro.ts +++ b/src/nitro/Nitro.ts @@ -43,9 +43,9 @@ settings.ROUND_PIXELS = true; export class Nitro extends Application implements INitro { - public static WEBGL_CONTEXT_LOST: string = 'NE_WEBGL_CONTEXT_LOST'; - public static WEBGL_UNAVAILABLE: string = 'NE_WEBGL_UNAVAILABLE'; - public static READY: string = 'NE_READY!'; + public static WEBGL_CONTEXT_LOST: string = 'NE_WEBGL_CONTEXT_LOST'; + public static WEBGL_UNAVAILABLE: string = 'NE_WEBGL_UNAVAILABLE'; + public static READY: string = 'NE_READY!'; private static INSTANCE: INitro = null; @@ -74,24 +74,24 @@ export class Nitro extends Application implements INitro if(!Nitro.INSTANCE) Nitro.INSTANCE = this; - this._nitroTimer = new NitroTimer(); - this._worker = null; - this._core = core; - this._events = new EventDispatcher(); - this._localization = new NitroLocalizationManager(); - this._communication = new NitroCommunicationManager(core.communication); - this._avatar = new AvatarRenderManager(); - this._roomEngine = new RoomEngine(this._communication); - this._sessionDataManager = new SessionDataManager(this._communication); - this._roomSessionManager = new RoomSessionManager(this._communication, this._roomEngine); - this._roomManager = new RoomManager(this._roomEngine, this._roomEngine.visualizationFactory, this._roomEngine.logicFactory); - this._cameraManager = new RoomCameraWidgetManager(); - this._soundManager = new SoundManager(); - this._linkTrackers = []; - this._workerTrackers = []; + this._nitroTimer = new NitroTimer(); + this._worker = null; + this._core = core; + this._events = new EventDispatcher(); + this._localization = new NitroLocalizationManager(); + this._communication = new NitroCommunicationManager(core.communication); + this._avatar = new AvatarRenderManager(); + this._roomEngine = new RoomEngine(this._communication); + this._sessionDataManager = new SessionDataManager(this._communication); + this._roomSessionManager = new RoomSessionManager(this._communication, this._roomEngine); + this._roomManager = new RoomManager(this._roomEngine, this._roomEngine.visualizationFactory, this._roomEngine.logicFactory); + this._cameraManager = new RoomCameraWidgetManager(); + this._soundManager = new SoundManager(); + this._linkTrackers = []; + this._workerTrackers = []; - this._isReady = false; - this._isDisposed = false; + this._isReady = false; + this._isDisposed = false; this._core.configuration.events.addEventListener(ConfigurationEvent.LOADED, this.onConfigurationLoadedEvent.bind(this)); this._roomEngine.events.addEventListener(RoomEngineEvent.ENGINE_INITIALIZED, this.onRoomEngineReady.bind(this)); @@ -110,8 +110,8 @@ export class Nitro extends Application implements INitro const canvas = document.createElement('canvas'); - canvas.id = 'client-wrapper'; - canvas.className = 'client-canvas'; + canvas.id = 'client-wrapper'; + canvas.className = 'client-canvas'; const instance = new this(new NitroCore(), { autoDensity: true, @@ -136,7 +136,7 @@ export class Nitro extends Application implements INitro { this._roomEngine.sessionDataManager = this._sessionDataManager; this._roomEngine.roomSessionManager = this._roomSessionManager; - this._roomEngine.roomManager = this._roomManager; + this._roomEngine.roomManager = this._roomManager; if(this._sessionDataManager) this._sessionDataManager.init(); if(this._roomSessionManager) this._roomSessionManager.init(); @@ -209,14 +209,14 @@ export class Nitro extends Application implements INitro super.destroy(); - this._isDisposed = true; - this._isReady = false; + this._isDisposed = true; + this._isReady = false; } private onConfigurationLoadedEvent(event: ConfigurationEvent): void { - const animationFPS = this.getConfiguration('system.animation.fps', 24); - const limitsFPS = this.getConfiguration('system.limits.fps', true); + const animationFPS = this.getConfiguration('system.animation.fps', 24); + const limitsFPS = this.getConfiguration('system.limits.fps', true); if(limitsFPS) Nitro.instance.ticker.maxFPS = animationFPS; } diff --git a/src/nitro/avatar/AvatarAssetDownloadLibrary.ts b/src/nitro/avatar/AvatarAssetDownloadLibrary.ts index 76a72914..a3093916 100644 --- a/src/nitro/avatar/AvatarAssetDownloadLibrary.ts +++ b/src/nitro/avatar/AvatarAssetDownloadLibrary.ts @@ -6,9 +6,9 @@ export class AvatarAssetDownloadLibrary extends EventDispatcher { public static DOWNLOAD_COMPLETE: string = 'AADL_DOWNLOAD_COMPLETE'; - private static NOT_LOADED: number = 0; - private static LOADING: number = 1; - private static LOADED: number = 2; + private static NOT_LOADED: number = 0; + private static LOADING: number = 1; + private static LOADED: number = 2; private _state: number; private _libraryName: string; @@ -20,11 +20,11 @@ export class AvatarAssetDownloadLibrary extends EventDispatcher { super(); - this._state = AvatarAssetDownloadLibrary.NOT_LOADED; - this._libraryName = id; - this._revision = revision; - this._downloadUrl = assetUrl; - this._assets = assets; + this._state = AvatarAssetDownloadLibrary.NOT_LOADED; + this._libraryName = id; + this._revision = revision; + this._downloadUrl = assetUrl; + this._assets = assets; this._downloadUrl = this._downloadUrl.replace(/%libname%/gi, this._libraryName); this._downloadUrl = this._downloadUrl.replace(/%revision%/gi, this._revision); diff --git a/src/nitro/avatar/AvatarAssetDownloadManager.ts b/src/nitro/avatar/AvatarAssetDownloadManager.ts index 8b5c0280..5d69ac72 100644 --- a/src/nitro/avatar/AvatarAssetDownloadManager.ts +++ b/src/nitro/avatar/AvatarAssetDownloadManager.ts @@ -12,10 +12,10 @@ import { IAvatarImageListener } from './IAvatarImageListener'; export class AvatarAssetDownloadManager extends EventDispatcher { - public static DOWNLOADER_READY: string = 'AADM_DOWNLOADER_READY'; - public static LIBRARY_LOADED: string = 'AADM_LIBRARY_LOADED'; + public static DOWNLOADER_READY: string = 'AADM_DOWNLOADER_READY'; + public static LIBRARY_LOADED: string = 'AADM_LIBRARY_LOADED'; - private static MAX_DOWNLOADS: number = 2; + private static MAX_DOWNLOADS: number = 2; private _assets: IAssetManager; private _structure: AvatarStructure; @@ -34,21 +34,21 @@ export class AvatarAssetDownloadManager extends EventDispatcher { super(); - this._assets = assets; - this._structure = structure; + this._assets = assets; + this._structure = structure; - this._missingMandatoryLibs = Nitro.instance.getConfiguration('avatar.mandatory.libraries'); - this._figureMap = new Map(); - this._pendingContainers = []; - this._figureListeners = new Map(); - this._incompleteFigures = new Map(); - this._pendingDownloadQueue = []; - this._currentDownloads = []; - this._libraryNames = []; - this._isReady = false; + this._missingMandatoryLibs = Nitro.instance.getConfiguration('avatar.mandatory.libraries'); + this._figureMap = new Map(); + this._pendingContainers = []; + this._figureListeners = new Map(); + this._incompleteFigures = new Map(); + this._pendingDownloadQueue = []; + this._currentDownloads = []; + this._libraryNames = []; + this._isReady = false; - this.onLibraryLoaded = this.onLibraryLoaded.bind(this); - this.onAvatarRenderReady = this.onAvatarRenderReady.bind(this); + this.onLibraryLoaded = this.onLibraryLoaded.bind(this); + this.onAvatarRenderReady = this.onAvatarRenderReady.bind(this); this.loadFigureMap(); @@ -101,8 +101,8 @@ export class AvatarAssetDownloadManager extends EventDispatcher { if(!library) continue; - const id = (library.id as string); - const revision = (library.revision || ''); + const id = (library.id as string); + const revision = (library.revision || ''); if(this._libraryNames.indexOf(id) >= 0) continue; @@ -114,9 +114,9 @@ export class AvatarAssetDownloadManager extends EventDispatcher for(const part of library.parts) { - const id = (part.id as string); - const type = (part.type as string); - const partString = (type + ':' + id); + const id = (part.id as string); + const type = (part.type as string); + const partString = (type + ':' + id); let existing = this._figureMap.get(partString); @@ -256,8 +256,8 @@ export class AvatarAssetDownloadManager extends EventDispatcher { if(!part) continue; - const name = (part.type + ':' + part.id); - const existing = this._figureMap.get(name); + const name = (part.type + ':' + part.id); + const existing = this._figureMap.get(name); if(existing === undefined) continue; @@ -284,8 +284,8 @@ export class AvatarAssetDownloadManager extends EventDispatcher return; } - const figure = container.getFigureString(); - const pendingLibraries = this.getAvatarFigurePendingLibraries(container); + const figure = container.getFigureString(); + const pendingLibraries = this.getAvatarFigurePendingLibraries(container); if(pendingLibraries && pendingLibraries.length) { diff --git a/src/nitro/avatar/AvatarFigureContainer.ts b/src/nitro/avatar/AvatarFigureContainer.ts index f2751650..33428e5e 100644 --- a/src/nitro/avatar/AvatarFigureContainer.ts +++ b/src/nitro/avatar/AvatarFigureContainer.ts @@ -96,9 +96,9 @@ export class AvatarFigureContainer implements IAvatarFigureContainer if(pieces.length >= 2) { - const type = pieces[0]; - const setId = parseInt(pieces[1]); - const colors = []; + const type = pieces[0]; + const setId = parseInt(pieces[1]); + const colors = []; let index = 2; diff --git a/src/nitro/avatar/AvatarImage.ts b/src/nitro/avatar/AvatarImage.ts index aa4659a0..b68fb4b1 100644 --- a/src/nitro/avatar/AvatarImage.ts +++ b/src/nitro/avatar/AvatarImage.ts @@ -31,15 +31,15 @@ import { IPartColor } from './structure/figure/IPartColor'; export class AvatarImage implements IAvatarImage, IAvatarEffectListener { - private static CHANNELS_EQUAL: string = 'CHANNELS_EQUAL'; - private static CHANNELS_UNIQUE: string = 'CHANNELS_UNIQUE'; - private static CHANNELS_RED: string = 'CHANNELS_RED'; - private static CHANNELS_GREEN: string = 'CHANNELS_GREEN'; - private static CHANNELS_BLUE: string = 'CHANNELS_BLUE'; + private static CHANNELS_EQUAL: string = 'CHANNELS_EQUAL'; + private static CHANNELS_UNIQUE: string = 'CHANNELS_UNIQUE'; + private static CHANNELS_RED: string = 'CHANNELS_RED'; + private static CHANNELS_GREEN: string = 'CHANNELS_GREEN'; + private static CHANNELS_BLUE: string = 'CHANNELS_BLUE'; private static CHANNELS_DESATURATED: string = 'CHANNELS_DESATURATED'; - private static DEFAULT_ACTION: string = 'Default'; - private static DEFAULT_DIRECTION: number = 2; - private static DEFAULT_AVATAR_SET: string = AvatarSetType.FULL; + private static DEFAULT_ACTION: string = 'Default'; + private static DEFAULT_DIRECTION: number = 2; + private static DEFAULT_AVATAR_SET: string = AvatarSetType.FULL; protected _structure: AvatarStructure; protected _scale: string; @@ -333,7 +333,7 @@ export class AvatarImage implements IAvatarImage, IAvatarEffectListener this._reusableTexture = null; } - this._image = null; + this._image = null; this._isCachedImage = false; } @@ -343,8 +343,8 @@ export class AvatarImage implements IAvatarImage, IAvatarEffectListener const container = new NitroContainer(); - let isCachable = true; - let partCount = (_local_6.length - 1); + let isCachable = true; + let partCount = (_local_6.length - 1); while(partCount >= 0) { @@ -435,18 +435,18 @@ export class AvatarImage implements IAvatarImage, IAvatarEffectListener } */ - this._image = this._reusableTexture; - this._changes = false; + this._image = this._reusableTexture; + this._changes = false; return this._image; } public applyPalette(texture: RenderTexture, reds: number[] = [], greens: number[] = [], blues: number[] = []): RenderTexture { - const textureCanvas = TextureUtils.generateCanvas(texture); - const textureCtx = textureCanvas.getContext('2d'); - const textureImageData = textureCtx.getImageData(0, 0, textureCanvas.width, textureCanvas.height); - const data = textureImageData.data; + const textureCanvas = TextureUtils.generateCanvas(texture); + const textureCtx = textureCanvas.getContext('2d'); + const textureImageData = textureCtx.getImageData(0, 0, textureCanvas.width, textureCanvas.height); + const data = textureImageData.data; for(let i = 0; i < data.length; i += 4) { @@ -502,12 +502,12 @@ export class AvatarImage implements IAvatarImage, IAvatarEffectListener if(!avatarCanvas) return null; - const setTypes = this.getBodyParts(setType, this._mainAction.definition.geometryType, this._mainDirection); + const setTypes = this.getBodyParts(setType, this._mainAction.definition.geometryType, this._mainDirection); const container = new NitroSprite(); - const sprite = new NitroSprite(Texture.EMPTY); + const sprite = new NitroSprite(Texture.EMPTY); - sprite.width = avatarCanvas.width; - sprite.height = avatarCanvas.height; + sprite.width = avatarCanvas.width; + sprite.height = avatarCanvas.height; container.addChild(sprite); @@ -515,8 +515,8 @@ export class AvatarImage implements IAvatarImage, IAvatarEffectListener while(partCount >= 0) { - const set = setTypes[partCount]; - const part = this._cache.getImageContainer(set, this._frameCounter); + const set = setTypes[partCount]; + const part = this._cache.getImageContainer(set, this._frameCounter); if(part) { @@ -567,15 +567,15 @@ export class AvatarImage implements IAvatarImage, IAvatarEffectListener if(!avatarCanvas) return null; - const setTypes = this.getBodyParts(setType, this._mainAction.definition.geometryType, this._mainDirection); + const setTypes = this.getBodyParts(setType, this._mainAction.definition.geometryType, this._mainDirection); const container = new NitroContainer(); let partCount = (setTypes.length - 1); while(partCount >= 0) { - const set = setTypes[partCount]; - const part = this._cache.getImageContainer(set, this._frameCounter); + const set = setTypes[partCount]; + const part = this._cache.getImageContainer(set, this._frameCounter); if(part) { @@ -927,8 +927,8 @@ export class AvatarImage implements IAvatarImage, IAvatarEffectListener { if(!this._sortedActions == null) return; - const _local_3: number = Nitro.instance.time; - const _local_4: string[] = []; + const _local_3: number = Nitro.instance.time; + const _local_4: string[] = []; for(const k of this._sortedActions) _local_4.push(k.actionType); diff --git a/src/nitro/avatar/AvatarImageBodyPartContainer.ts b/src/nitro/avatar/AvatarImageBodyPartContainer.ts index 9c1f8ed1..6ef966f0 100644 --- a/src/nitro/avatar/AvatarImageBodyPartContainer.ts +++ b/src/nitro/avatar/AvatarImageBodyPartContainer.ts @@ -10,11 +10,11 @@ export class AvatarImageBodyPartContainer constructor(k: Container, _arg_2: Point, _arg_3: boolean) { - this._image = k; - this._regPoint = _arg_2; - this._offset = new Point(0, 0); - this._regPoint = _arg_2; - this._isCacheable = _arg_3; + this._image = k; + this._regPoint = _arg_2; + this._offset = new Point(0, 0); + this._regPoint = _arg_2; + this._isCacheable = _arg_3; this.cleanPoints(); } @@ -28,9 +28,9 @@ export class AvatarImageBodyPartContainer }); } - this._image = null; - this._regPoint = null; - this._offset = null; + this._image = null; + this._regPoint = null; + this._offset = null; } private cleanPoints(): void diff --git a/src/nitro/avatar/AvatarImagePartContainer.ts b/src/nitro/avatar/AvatarImagePartContainer.ts index c8604851..cc32c403 100644 --- a/src/nitro/avatar/AvatarImagePartContainer.ts +++ b/src/nitro/avatar/AvatarImagePartContainer.ts @@ -19,17 +19,17 @@ export class AvatarImagePartContainer constructor(k: string, _arg_2: string, _arg_3: string, _arg_4: IPartColor, _arg_5: AvatarAnimationFrame[], _arg_6: IActionDefinition, _arg_7: boolean, _arg_8: number, _arg_9: string = '', _arg_10: boolean = false, _arg_11: number = 1) { - this._bodyPartId = k; - this._partType = _arg_2; - this._partId = _arg_3; - this._color = _arg_4; - this._frames = _arg_5; - this._action = _arg_6; - this._isColorable = _arg_7; - this._paletteMapId = _arg_8; - this._flippedPartType = _arg_9; - this._isBlendable = _arg_10; - this._blendTransform = null; + this._bodyPartId = k; + this._partType = _arg_2; + this._partId = _arg_3; + this._color = _arg_4; + this._frames = _arg_5; + this._action = _arg_6; + this._isColorable = _arg_7; + this._paletteMapId = _arg_8; + this._flippedPartType = _arg_9; + this._isBlendable = _arg_10; + this._blendTransform = null; if(this._partType === 'ey') this._isColorable = false; } diff --git a/src/nitro/avatar/AvatarRenderManager.ts b/src/nitro/avatar/AvatarRenderManager.ts index 391abd02..534efdba 100644 --- a/src/nitro/avatar/AvatarRenderManager.ts +++ b/src/nitro/avatar/AvatarRenderManager.ts @@ -53,24 +53,24 @@ export class AvatarRenderManager extends NitroManager implements IAvatarRenderMa { super(); - this._structure = null; - this._avatarAssetDownloadManager = null; + this._structure = null; + this._avatarAssetDownloadManager = null; - this._placeHolderFigure = null; + this._placeHolderFigure = null; - this._figureMapReady = false; - this._effectMapReady = false; - this._actionsReady = false; - this._geometryReady = false; - this._partSetsReady = false; - this._animationsReady = false; - this._isReady = false; + this._figureMapReady = false; + this._effectMapReady = false; + this._actionsReady = false; + this._geometryReady = false; + this._partSetsReady = false; + this._animationsReady = false; + this._isReady = false; - this.onAvatarAssetDownloaderReady = this.onAvatarAssetDownloaderReady.bind(this); - this.onAvatarAssetDownloaded = this.onAvatarAssetDownloaded.bind(this); - this.onEffectAssetDownloaderReady = this.onEffectAssetDownloaderReady.bind(this); - this.onEffectAssetDownloaded = this.onEffectAssetDownloaded.bind(this); - this.onAvatarStructureDownloadDone = this.onAvatarStructureDownloadDone.bind(this); + this.onAvatarAssetDownloaderReady = this.onAvatarAssetDownloaderReady.bind(this); + this.onAvatarAssetDownloaded = this.onAvatarAssetDownloaded.bind(this); + this.onEffectAssetDownloaderReady = this.onEffectAssetDownloaderReady.bind(this); + this.onEffectAssetDownloaded = this.onEffectAssetDownloaded.bind(this); + this.onAvatarStructureDownloadDone = this.onAvatarStructureDownloadDone.bind(this); } public onInit(): void @@ -356,8 +356,8 @@ export class AvatarRenderManager extends NitroManager implements IAvatarRenderMa { if(!this._structure) return 0; - const figureData = this._structure.figureData; - const parts = Array.from(container.getPartTypeIds()); + const figureData = this._structure.figureData; + const parts = Array.from(container.getPartTypeIds()); let clubLevel = 0; @@ -367,15 +367,15 @@ export class AvatarRenderManager extends NitroManager implements IAvatarRenderMa if(!set) continue; - const setId = container.getPartSetId(part); - const partSet = set.getPartSet(setId); + const setId = container.getPartSetId(part); + const partSet = set.getPartSet(setId); if(partSet) { clubLevel = Math.max(partSet.clubLevel, clubLevel); - const palette = figureData.getPalette(set.paletteID); - const colors = container.getPartColorIds(part); + const palette = figureData.getPalette(set.paletteID); + const colors = container.getPartColorIds(part); for(const colorId of colors) { @@ -405,7 +405,7 @@ export class AvatarRenderManager extends NitroManager implements IAvatarRenderMa public isValidFigureSetForGender(setId: number, gender: string): boolean { const structure = this.structureData; - const partSet = structure.getFigurePartSet(setId); + const partSet = structure.getFigurePartSet(setId); return !!(partSet && ((partSet.gender.toUpperCase() === 'U') || (partSet.gender.toUpperCase() === gender.toUpperCase()))); } @@ -428,8 +428,8 @@ export class AvatarRenderManager extends NitroManager implements IAvatarRenderMa private resolveFigureSets(k: number[]): IFigurePartSet[] { - const structure = this.structureData; - const partSets: IFigurePartSet[] = []; + const structure = this.structureData; + const partSets: IFigurePartSet[] = []; for(const _local_4 of k) { diff --git a/src/nitro/avatar/AvatarStructure.ts b/src/nitro/avatar/AvatarStructure.ts index ffa0fdc9..9a405b44 100644 --- a/src/nitro/avatar/AvatarStructure.ts +++ b/src/nitro/avatar/AvatarStructure.ts @@ -43,15 +43,15 @@ export class AvatarStructure extends EventDispatcher { super(); - this._renderManager = renderManager; - this._geometry = null; - this._figureData = new FigureSetData(); - this._partSetsData = new PartSetsData(); - this._animationData = new AvatarAnimationData(); - this._animationManager = new AnimationManager(); - this._mandatorySetTypeIds = {}; - this._actionManager = null; - this._defaultAction = null; + this._renderManager = renderManager; + this._geometry = null; + this._figureData = new FigureSetData(); + this._partSetsData = new PartSetsData(); + this._animationData = new AvatarAnimationData(); + this._animationManager = new AnimationManager(); + this._mandatorySetTypeIds = {}; + this._actionManager = null; + this._defaultAction = null; } public init(): void @@ -65,11 +65,11 @@ export class AvatarStructure extends EventDispatcher super.dispose(); - this._renderManager = null; - this._figureData = null; - this._partSetsData = null; - this._animationData = null; - this._mandatorySetTypeIds = null; + this._renderManager = null; + this._figureData = null; + this._partSetsData = null; + this._animationData = null; + this._mandatorySetTypeIds = null; } public initGeometry(k: any): void @@ -251,8 +251,8 @@ export class AvatarStructure extends EventDispatcher { let _local_3: string[] = []; - const _local_4: string[] = []; - const _local_5 = k.definition.geometryType; + const _local_4: string[] = []; + const _local_5 = k.definition.geometryType; if(k.definition.isAnimation) { @@ -356,10 +356,10 @@ export class AvatarStructure extends EventDispatcher if(!_arg_3 == null) return []; - const _local_9 = this._partSetsData.getActiveParts(_arg_3.definition); - const _local_11: AvatarImagePartContainer[] = []; - let _local_14: any[] = [ 0 ]; - const _local_15 = this._animationData.getAction(_arg_3.definition); + const _local_9 = this._partSetsData.getActiveParts(_arg_3.definition); + const _local_11: AvatarImagePartContainer[] = []; + let _local_14: any[] = [ 0 ]; + const _local_15 = this._animationData.getAction(_arg_3.definition); if(_arg_3.definition.isAnimation) { @@ -388,8 +388,8 @@ export class AvatarStructure extends EventDispatcher } } - const _local_16 = this._geometry.getParts(_arg_4, k, _arg_5, _local_9, _arg_7); - const _local_21 = _arg_2.getPartTypeIds(); + const _local_16 = this._geometry.getParts(_arg_4, k, _arg_5, _local_9, _arg_7); + const _local_21 = _arg_2.getPartTypeIds(); for(const _local_17 of _local_21) { @@ -469,7 +469,7 @@ export class AvatarStructure extends EventDispatcher for(const _local_12 of _local_16) { let _local_39: IPartColor = null; - let _local_38 = false; + let _local_38 = false; const _local_40 = ((_arg_8) && (_arg_8.get(_local_12))); diff --git a/src/nitro/avatar/EffectAssetDownloadLibrary.ts b/src/nitro/avatar/EffectAssetDownloadLibrary.ts index 7899805d..1829bc14 100644 --- a/src/nitro/avatar/EffectAssetDownloadLibrary.ts +++ b/src/nitro/avatar/EffectAssetDownloadLibrary.ts @@ -7,9 +7,9 @@ export class EffectAssetDownloadLibrary extends EventDispatcher { public static DOWNLOAD_COMPLETE: string = 'EADL_DOWNLOAD_COMPLETE'; - private static NOT_LOADED: number = 0; - private static LOADING: number = 1; - private static LOADED: number = 2; + private static NOT_LOADED: number = 0; + private static LOADING: number = 1; + private static LOADED: number = 2; private _state: number; private _libraryName: string; @@ -22,12 +22,12 @@ export class EffectAssetDownloadLibrary extends EventDispatcher { super(); - this._state = EffectAssetDownloadLibrary.NOT_LOADED; - this._libraryName = id; - this._revision = revision; - this._downloadUrl = assetUrl; - this._assets = assets; - this._animation = null; + this._state = EffectAssetDownloadLibrary.NOT_LOADED; + this._libraryName = id; + this._revision = revision; + this._downloadUrl = assetUrl; + this._assets = assets; + this._animation = null; this._downloadUrl = this._downloadUrl.replace(/%libname%/gi, this._libraryName); this._downloadUrl = this._downloadUrl.replace(/%revision%/gi, this._revision); diff --git a/src/nitro/avatar/EffectAssetDownloadManager.ts b/src/nitro/avatar/EffectAssetDownloadManager.ts index 08d74fb6..a40c970f 100644 --- a/src/nitro/avatar/EffectAssetDownloadManager.ts +++ b/src/nitro/avatar/EffectAssetDownloadManager.ts @@ -11,10 +11,10 @@ import { IAvatarEffectListener } from './IAvatarEffectListener'; export class EffectAssetDownloadManager extends EventDispatcher { - public static DOWNLOADER_READY: string = 'EADM_DOWNLOADER_READY'; - public static LIBRARY_LOADED: string = 'EADM_LIBRARY_LOADED'; + public static DOWNLOADER_READY: string = 'EADM_DOWNLOADER_READY'; + public static LIBRARY_LOADED: string = 'EADM_LIBRARY_LOADED'; - private static MAX_DOWNLOADS: number = 2; + private static MAX_DOWNLOADS: number = 2; private _assets: IAssetManager; private _structure: AvatarStructure; @@ -33,21 +33,21 @@ export class EffectAssetDownloadManager extends EventDispatcher { super(); - this._assets = assets; - this._structure = structure; + this._assets = assets; + this._structure = structure; - this._missingMandatoryLibs = Nitro.instance.getConfiguration('avatar.mandatory.effect.libraries'); - this._effectMap = new Map(); - this._effectListeners = new Map(); - this._incompleteEffects = new Map(); - this._initDownloadBuffer = []; - this._pendingDownloadQueue = []; - this._currentDownloads = []; - this._libraryNames = []; - this._isReady = false; + this._missingMandatoryLibs = Nitro.instance.getConfiguration('avatar.mandatory.effect.libraries'); + this._effectMap = new Map(); + this._effectListeners = new Map(); + this._incompleteEffects = new Map(); + this._initDownloadBuffer = []; + this._pendingDownloadQueue = []; + this._currentDownloads = []; + this._libraryNames = []; + this._isReady = false; - this.onLibraryLoaded = this.onLibraryLoaded.bind(this); - this.onAvatarRenderReady = this.onAvatarRenderReady.bind(this); + this.onLibraryLoaded = this.onLibraryLoaded.bind(this); + this.onAvatarRenderReady = this.onAvatarRenderReady.bind(this); this.loadEffectMap(); @@ -100,9 +100,9 @@ export class EffectAssetDownloadManager extends EventDispatcher { if(!effect) continue; - const id = (effect.id as string); - const lib = (effect.lib as string); - const revision = (effect.revision || ''); + const id = (effect.id as string); + const lib = (effect.lib as string); + const revision = (effect.revision || ''); if(this._libraryNames.indexOf(lib) >= 0) continue; diff --git a/src/nitro/avatar/actions/ActionDefinition.ts b/src/nitro/avatar/actions/ActionDefinition.ts index 331d4f13..0aad3e46 100644 --- a/src/nitro/avatar/actions/ActionDefinition.ts +++ b/src/nitro/avatar/actions/ActionDefinition.ts @@ -23,23 +23,23 @@ export class ActionDefinition implements IActionDefinition constructor(data: any) { - this._id = data.id; - this._state = data.state; - this._precedence = data.precedence; - this._activePartSet = data.activePartSet; - this._assetPartDefinition = data.assetPartDefinition; - this._lay = data.lay; - this._geometryType = data.geometryType; - this._isMain = data.main || false; - this._isDefault = data.isDefault || false; - this._isAnimation = data.animation || false; - this._startFromFrameZero = data.startFromFrameZero || false; - this._prevents = data.prevents || []; - this._preventHeadTurn = data.preventHeadTurn || false; - this._types = new Map(); - this._params = new Map(); + this._id = data.id; + this._state = data.state; + this._precedence = data.precedence; + this._activePartSet = data.activePartSet; + this._assetPartDefinition = data.assetPartDefinition; + this._lay = data.lay; + this._geometryType = data.geometryType; + this._isMain = data.main || false; + this._isDefault = data.isDefault || false; + this._isAnimation = data.animation || false; + this._startFromFrameZero = data.startFromFrameZero || false; + this._prevents = data.prevents || []; + this._preventHeadTurn = data.preventHeadTurn || false; + this._types = new Map(); + this._params = new Map(); this._defaultParameterValue = ''; - this._canvasOffsets = null; + this._canvasOffsets = null; if(data.params && (data.params.length > 0)) { diff --git a/src/nitro/avatar/actions/ActionType.ts b/src/nitro/avatar/actions/ActionType.ts index e90ec689..d6d0312c 100644 --- a/src/nitro/avatar/actions/ActionType.ts +++ b/src/nitro/avatar/actions/ActionType.ts @@ -8,11 +8,11 @@ export class ActionType constructor(data: any) { - this._id = parseInt(data.id); - this._value = parseInt(data.id); - this._prevents = data.prevents || []; - this._preventHeadTurn = data.preventHeadTurn || false; - this._isAnimated = true; + this._id = parseInt(data.id); + this._value = parseInt(data.id); + this._prevents = data.prevents || []; + this._preventHeadTurn = data.preventHeadTurn || false; + this._isAnimated = true; if((data.animated !== undefined) && (data.animated === false)) this._isAnimated = false; } diff --git a/src/nitro/avatar/actions/ActiveActionData.ts b/src/nitro/avatar/actions/ActiveActionData.ts index 8e259169..138c4085 100644 --- a/src/nitro/avatar/actions/ActiveActionData.ts +++ b/src/nitro/avatar/actions/ActiveActionData.ts @@ -11,18 +11,18 @@ export class ActiveActionData implements IActiveActionData constructor(action: string, parameter: string = '', startFrame: number = 0) { - this._actionType = action || ''; - this._actionParameter = parameter || ''; - this._definition = null; - this._startFrame = startFrame || 0; - this._overridingAction = null; + this._actionType = action || ''; + this._actionParameter = parameter || ''; + this._definition = null; + this._startFrame = startFrame || 0; + this._overridingAction = null; } public dispose(): void { - this._actionType = null; - this._actionParameter = null; - this._definition = null; + this._actionType = null; + this._actionParameter = null; + this._definition = null; } public get id(): string diff --git a/src/nitro/avatar/actions/AvatarActionManager.ts b/src/nitro/avatar/actions/AvatarActionManager.ts index fbc2395a..618c9585 100644 --- a/src/nitro/avatar/actions/AvatarActionManager.ts +++ b/src/nitro/avatar/actions/AvatarActionManager.ts @@ -10,8 +10,8 @@ export class AvatarActionManager constructor(k: IAssetManager, data: any) { - this._assets = k; - this._actions = new Map(); + this._assets = k; + this._actions = new Map(); this._defaultAction = null; this.updateActions(data); @@ -45,7 +45,7 @@ export class AvatarActionManager for(const canvasOffset of offset.offsets) { - const size = (canvasOffset.size || ''); + const size = (canvasOffset.size || ''); const direction = canvasOffset.direction; if((size === '') || (direction === undefined)) continue; @@ -106,8 +106,8 @@ export class AvatarActionManager { if(!activeAction) continue; - const action = this._actions.get(activeAction.actionType); - const offsets = action && action.getOffsets(_arg_2, _arg_3); + const action = this._actions.get(activeAction.actionType); + const offsets = action && action.getOffsets(_arg_2, _arg_3); if(offsets) canvasOffsets = offsets; } @@ -143,8 +143,8 @@ export class AvatarActionManager private filterActions(actions: IActiveActionData[]): IActiveActionData[] { - let preventions: string[] = []; - const activeActions: IActiveActionData[] = []; + let preventions: string[] = []; + const activeActions: IActiveActionData[] = []; for(const action of actions) { diff --git a/src/nitro/avatar/alias/AssetAlias.ts b/src/nitro/avatar/alias/AssetAlias.ts index 99da1e1d..7389812f 100644 --- a/src/nitro/avatar/alias/AssetAlias.ts +++ b/src/nitro/avatar/alias/AssetAlias.ts @@ -9,8 +9,8 @@ export class AssetAlias constructor(name: string, alias: IAssetAlias) { - this._name = name; - this._link = alias.link; + this._name = name; + this._link = alias.link; this._flipH = alias.flipH; this._flipV = alias.flipV; } diff --git a/src/nitro/avatar/alias/AssetAliasCollection.ts b/src/nitro/avatar/alias/AssetAliasCollection.ts index 7f73d496..b689e4e0 100644 --- a/src/nitro/avatar/alias/AssetAliasCollection.ts +++ b/src/nitro/avatar/alias/AssetAliasCollection.ts @@ -12,16 +12,16 @@ export class AssetAliasCollection constructor(k: AvatarRenderManager, _arg_2: IAssetManager) { - this._avatarRenderManager = k; - this._aliases = new Map(); - this._assets = _arg_2; - this._missingAssetNames = []; + this._avatarRenderManager = k; + this._aliases = new Map(); + this._assets = _arg_2; + this._missingAssetNames = []; } public dispose(): void { - this._assets = null; - this._aliases = null; + this._assets = null; + this._aliases = null; } public reset(): void diff --git a/src/nitro/avatar/animation/AddDataContainer.ts b/src/nitro/avatar/animation/AddDataContainer.ts index 1b8af5a3..86948e15 100644 --- a/src/nitro/avatar/animation/AddDataContainer.ts +++ b/src/nitro/avatar/animation/AddDataContainer.ts @@ -10,10 +10,10 @@ export class AddDataContainer constructor(k: IAssetAnimationAdd) { - this._id = k.id || ''; + this._id = k.id || ''; this._align = k.align || ''; - this._base = k.base || ''; - this._ink = k.ink || 0; + this._base = k.base || ''; + this._ink = k.ink || 0; this._blend = 0; const _local_2 = k.blend; diff --git a/src/nitro/avatar/animation/Animation.ts b/src/nitro/avatar/animation/Animation.ts index 2c741366..bff95839 100644 --- a/src/nitro/avatar/animation/Animation.ts +++ b/src/nitro/avatar/animation/Animation.ts @@ -25,17 +25,17 @@ export class Animation implements IAnimation constructor(k: AvatarStructure, _arg_2: IAssetAnimation) { - this._id = _arg_2.name; - this._description = this._id; - this._frames = []; - this._spriteData = null; - this._avatarData = null; - this._directionData = null; - this._removeData = null; - this._addData = null; + this._id = _arg_2.name; + this._description = this._id; + this._frames = []; + this._spriteData = null; + this._avatarData = null; + this._directionData = null; + this._removeData = null; + this._addData = null; this._overriddenActions = null; - this._overrideFrames = null; - this._resetOnToggle = (_arg_2.resetOnToggle || false); + this._overrideFrames = null; + this._resetOnToggle = (_arg_2.resetOnToggle || false); if(_arg_2.sprites && _arg_2.sprites.length) { @@ -64,12 +64,12 @@ export class Animation implements IAnimation if(_arg_2.overrides && _arg_2.overrides.length) { - this._overrideFrames = new Map(); + this._overrideFrames = new Map(); this._overriddenActions = new Map(); for(const override of _arg_2.overrides) { - const name = override.name; + const name = override.name; const value = override.override; this._overriddenActions.set(value, name); @@ -105,8 +105,8 @@ export class Animation implements IAnimation { for(const bodyPart of frame.bodyparts) { - const definition = _arg_3.getActionDefinition(bodyPart.action); - const layer = new AvatarAnimationLayerData(bodyPart, AvatarAnimationLayerData.BODYPART, definition); + const definition = _arg_3.getActionDefinition(bodyPart.action); + const layer = new AvatarAnimationLayerData(bodyPart, AvatarAnimationLayerData.BODYPART, definition); layers.push(layer); } @@ -116,8 +116,8 @@ export class Animation implements IAnimation { for(const fx of frame.fxs) { - const definition = _arg_3.getActionDefinition(fx.action); - const layer = new AvatarAnimationLayerData(fx, AvatarAnimationLayerData.FX, definition); + const definition = _arg_3.getActionDefinition(fx.action); + const layer = new AvatarAnimationLayerData(fx, AvatarAnimationLayerData.FX, definition); layers.push(layer); } diff --git a/src/nitro/avatar/animation/AvatarAnimationLayerData.ts b/src/nitro/avatar/animation/AvatarAnimationLayerData.ts index 7bbaf972..f4bde731 100644 --- a/src/nitro/avatar/animation/AvatarAnimationLayerData.ts +++ b/src/nitro/avatar/animation/AvatarAnimationLayerData.ts @@ -22,15 +22,15 @@ export class AvatarAnimationLayerData implements IAnimationLayerData constructor(k: IAssetAnimationFramePart, _arg_2: string, _arg_3: IActionDefinition) { - this._id = k.id; - this._animationFrame = (k.frame || 0); - this._dx = (k.dx || 0); - this._dy = (k.dy || 0); - this._dz = (k.dz || 0); - this._directionOffset = (k.dd || 0); - this._type = _arg_2; - this._base = (k.base || ''); - this._items = new Map(); + this._id = k.id; + this._animationFrame = (k.frame || 0); + this._dx = (k.dx || 0); + this._dy = (k.dy || 0); + this._dz = (k.dz || 0); + this._directionOffset = (k.dd || 0); + this._type = _arg_2; + this._base = (k.base || ''); + this._items = new Map(); if(k.items) for(const _local_4 of k.items) this._items.set(_local_4.id, _local_4.base); @@ -40,8 +40,8 @@ export class AvatarAnimationLayerData implements IAnimationLayerData if(_arg_3) { - this._action = new ActiveActionData(_arg_3.state, this.base); - this._action.definition = _arg_3; + this._action = new ActiveActionData(_arg_3.state, this.base); + this._action.definition = _arg_3; } } @@ -52,8 +52,8 @@ export class AvatarAnimationLayerData implements IAnimationLayerData private baseAsInt(): number { - let k = 0; - let index = 0; + let k = 0; + let index = 0; while(index < this._base.length) { diff --git a/src/nitro/avatar/animation/AvatarDataContainer.ts b/src/nitro/avatar/animation/AvatarDataContainer.ts index c4c5ead2..caa528df 100644 --- a/src/nitro/avatar/animation/AvatarDataContainer.ts +++ b/src/nitro/avatar/animation/AvatarDataContainer.ts @@ -29,18 +29,18 @@ export class AvatarDataContainer implements IAvatarDataContainer foreground = foreground.replace('#', ''); background = background.replace('#', ''); - this._foreGround = parseInt(foreground, 16); - this._backGround = parseInt(background, 16); - this._colorTransform = null; - this._rgb = parseInt(foreground, 16); - this._r = ((this._rgb >> 16) & 0xFF); - this._g = ((this._rgb >> 8) & 0xFF); - this._b = ((this._rgb >> 0) & 0xFF); - this._redMultiplier = ((this._r / 0xFF) * 1); - this._greenMultiplier = ((this._g / 0xFF) * 1); - this._blueMultiplier = ((this._b / 0xFF) * 1); - this._alphaMultiplier = 1; - this._paletteIsGrayscale = true; + this._foreGround = parseInt(foreground, 16); + this._backGround = parseInt(background, 16); + this._colorTransform = null; + this._rgb = parseInt(foreground, 16); + this._r = ((this._rgb >> 16) & 0xFF); + this._g = ((this._rgb >> 8) & 0xFF); + this._b = ((this._rgb >> 0) & 0xFF); + this._redMultiplier = ((this._r / 0xFF) * 1); + this._greenMultiplier = ((this._g / 0xFF) * 1); + this._blueMultiplier = ((this._b / 0xFF) * 1); + this._alphaMultiplier = 1; + this._paletteIsGrayscale = true; if(this._ink === 37) { diff --git a/src/nitro/avatar/animation/SpriteDataContainer.ts b/src/nitro/avatar/animation/SpriteDataContainer.ts index c4c03dee..5a5aae73 100644 --- a/src/nitro/avatar/animation/SpriteDataContainer.ts +++ b/src/nitro/avatar/animation/SpriteDataContainer.ts @@ -16,15 +16,15 @@ export class SpriteDataContainer implements ISpriteDataContainer constructor(k: IAnimation, _arg_2: IAssetAnimationSprite) { - this._animation = k; - this._id = _arg_2.id; - this._ink = _arg_2.ink; - this._member = _arg_2.member; - this._hasStaticY = _arg_2.staticY ? true : false; + this._animation = k; + this._id = _arg_2.id; + this._ink = _arg_2.ink; + this._member = _arg_2.member; + this._hasStaticY = _arg_2.staticY ? true : false; this._hasDirections = _arg_2.directions ? true : false; - this._dx = []; - this._dy = []; - this._dz = []; + this._dx = []; + this._dy = []; + this._dz = []; const directions = _arg_2.directionList; diff --git a/src/nitro/avatar/cache/AvatarImageBodyPartCache.ts b/src/nitro/avatar/cache/AvatarImageBodyPartCache.ts index 430d3add..caab3746 100644 --- a/src/nitro/avatar/cache/AvatarImageBodyPartCache.ts +++ b/src/nitro/avatar/cache/AvatarImageBodyPartCache.ts @@ -34,8 +34,8 @@ export class AvatarImageBodyPartCache this._cache.clear(); - this._cache = null; - this._disposed = true; + this._cache = null; + this._disposed = true; } } diff --git a/src/nitro/avatar/cache/AvatarImageCache.ts b/src/nitro/avatar/cache/AvatarImageCache.ts index 9154d39b..eeecd58b 100644 --- a/src/nitro/avatar/cache/AvatarImageCache.ts +++ b/src/nitro/avatar/cache/AvatarImageCache.ts @@ -38,16 +38,16 @@ export class AvatarImageCache constructor(k: AvatarStructure, _arg_2: IAvatarImage, _arg_3: AssetAliasCollection, _arg_4: string) { - this._structure = k; - this._avatar = _arg_2; - this._assets = _arg_3; - this._scale = _arg_4; - this._cache = new Map(); - this._canvas = null; - this._disposed = false; - this._unionImages = []; - this._matrix = new Matrix(); - this._serverRenderData = []; + this._structure = k; + this._avatar = _arg_2; + this._assets = _arg_3; + this._scale = _arg_4; + this._cache = new Map(); + this._canvas = null; + this._disposed = false; + this._unionImages = []; + this._matrix = new Matrix(); + this._serverRenderData = []; } public dispose(): void @@ -55,10 +55,10 @@ export class AvatarImageCache if(this._disposed) return; this._structure = null; - this._avatar = null; - this._assets = null; - this._canvas = null; - this._disposed = true; + this._avatar = null; + this._assets = null; + this._canvas = null; + this._disposed = true; if(this._cache) { @@ -148,16 +148,16 @@ export class AvatarImageCache if((((this._geometryType === GeometryType.SITTING) && (k === GeometryType.VERTICAL)) || ((this._geometryType === GeometryType.VERTICAL) && (k === GeometryType.SITTING)) || ((this._geometryType === GeometryType.SNOWWARS_HORIZONTAL) && (k = GeometryType.SNOWWARS_HORIZONTAL)))) { - this._geometryType = k; - this._canvas = null; + this._geometryType = k; + this._canvas = null; return; } this.disposeInactiveActions(0); - this._geometryType = k; - this._canvas = null; + this._geometryType = k; + this._canvas = null; } public getImageContainer(k: string, frameNumber: number, _arg_3: boolean = false): AvatarImageBodyPartContainer @@ -177,10 +177,10 @@ export class AvatarImageCache if(_local_7.definition.startFromFrameZero) frameCount -= _local_7.startFrame; - let _local_8 = _local_7; - let _local_9: string[] = []; - let _local_10: Map = new Map(); - const _local_11 = new Point(); + let _local_8 = _local_7; + let _local_9: string[] = []; + let _local_10: Map = new Map(); + const _local_11 = new Point(); if(!((!(_local_7)) || (!(_local_7.definition)))) { @@ -332,10 +332,10 @@ export class AvatarImageCache if(!this._canvas) return null; } - const isFlipped = AvatarDirectionAngle.DIRECTION_IS_FLIPPED[direction] || false; + const isFlipped = AvatarDirectionAngle.DIRECTION_IS_FLIPPED[direction] || false; let assetPartDefinition = _arg_4.definition.assetPartDefinition; - let isCacheable = true; - let containerIndex = (containers.length - 1); + let isCacheable = true; + let containerIndex = (containers.length - 1); while(containerIndex >= 0) { @@ -347,10 +347,10 @@ export class AvatarImageCache { if(!((container.partType === 'ri') && !container.partId)) { - const partId = container.partId; - const animationFrame = container.getFrameDefinition(frameCount); + const partId = container.partId; + const animationFrame = container.getFrameDefinition(frameCount); - let partType = container.partType; + let partType = container.partType; let frameNumber = 0; if(animationFrame) @@ -361,8 +361,8 @@ export class AvatarImageCache } else frameNumber = container.getFrameIndex(frameCount); - let assetDirection = direction; - let flipH = false; + let assetDirection = direction; + let flipH = false; if(isFlipped) { @@ -372,21 +372,21 @@ export class AvatarImageCache } else { - if(direction === 4) assetDirection = 2; - else if(direction === 5) assetDirection = 1; - else if(direction === 6) assetDirection = 0; + if(direction === 4) assetDirection = 2; + else if(direction === 5) assetDirection = 1; + else if(direction === 6) assetDirection = 0; if(container.flippedPartType !== partType) partType = container.flippedPartType; } } - let assetName = (this._scale + '_' + assetPartDefinition + '_' + partType + '_' + partId + '_' + assetDirection + '_' + frameNumber); - let asset = this._assets.getAsset(assetName); + let assetName = (this._scale + '_' + assetPartDefinition + '_' + partType + '_' + partId + '_' + assetDirection + '_' + frameNumber); + let asset = this._assets.getAsset(assetName); if(!asset) { - assetName = (this._scale + '_std_' + partType + '_' + partId + '_' + assetDirection + '_0'); - asset = this._assets.getAsset(assetName); + assetName = (this._scale + '_std_' + partType + '_' + partId + '_' + assetDirection + '_0'); + asset = this._assets.getAsset(assetName); } if(asset) @@ -409,13 +409,13 @@ export class AvatarImageCache { const spriteData = new RoomObjectSpriteData(); - spriteData.name = this._assets.getAssetName(assetName); - spriteData.x = (-(offset.x) - 33); - spriteData.y = -(offset.y); - spriteData.z = (this._serverRenderData.length * -0.0001); - spriteData.width = asset.rectangle.width; - spriteData.height = asset.rectangle.height; - spriteData.flipH = flipH; + spriteData.name = this._assets.getAssetName(assetName); + spriteData.x = (-(offset.x) - 33); + spriteData.y = -(offset.y); + spriteData.z = (this._serverRenderData.length * -0.0001); + spriteData.width = asset.rectangle.width; + spriteData.height = asset.rectangle.height; + spriteData.flipH = flipH; if(assetPartDefinition === 'lay') spriteData.x = (spriteData.x + 53); @@ -443,9 +443,9 @@ export class AvatarImageCache if(!this._unionImages.length) return null; - const imageData = this.createUnionImage(this._unionImages, isFlipped); - const canvasOffset = ((this._scale === AvatarScaleType.LARGE) ? (this._canvas.height - 16) : (this._canvas.height - 8)); - const offset = new Point(-(imageData.regPoint.x), (canvasOffset - imageData.regPoint.y)); + const imageData = this.createUnionImage(this._unionImages, isFlipped); + const canvasOffset = ((this._scale === AvatarScaleType.LARGE) ? (this._canvas.height - 16) : (this._canvas.height - 8)); + const offset = new Point(-(imageData.regPoint.x), (canvasOffset - imageData.regPoint.y)); if(isFlipped && (assetPartDefinition !== 'lay')) offset.x = (offset.x + ((this._scale === AvatarScaleType.LARGE) ? 67 : 31)); @@ -479,13 +479,13 @@ export class AvatarImageCache for(const data of k) data && bounds.enlarge(data.offsetRect); - const point = new Point(-(bounds.x), -(bounds.y)); + const point = new Point(-(bounds.x), -(bounds.y)); const container = new NitroContainer(); const sprite = new NitroSprite(Texture.EMPTY); - sprite.width = bounds.width; - sprite.height = bounds.height; + sprite.width = bounds.width; + sprite.height = bounds.height; container.addChild(sprite); @@ -493,10 +493,10 @@ export class AvatarImageCache { if(!data) continue; - const texture = data.texture; - const color = data.colorTransform; - const flipH = (!(isFlipped && data.flipH) && (isFlipped || data.flipH)); - const regPoint = point.clone(); + const texture = data.texture; + const color = data.colorTransform; + const flipH = (!(isFlipped && data.flipH) && (isFlipped || data.flipH)); + const regPoint = point.clone(); regPoint.x -= data.regPoint.x; regPoint.y -= data.regPoint.y; @@ -505,7 +505,7 @@ export class AvatarImageCache if(flipH) { - this._matrix.a = -1; + this._matrix.a = -1; this._matrix.tx = ((data.rect.x + data.rect.width) + regPoint.x); this._matrix.ty = (regPoint.y - data.rect.y); } diff --git a/src/nitro/avatar/cache/AvatarImageDirectionCache.ts b/src/nitro/avatar/cache/AvatarImageDirectionCache.ts index 1182ca3a..da3a75e6 100644 --- a/src/nitro/avatar/cache/AvatarImageDirectionCache.ts +++ b/src/nitro/avatar/cache/AvatarImageDirectionCache.ts @@ -8,8 +8,8 @@ export class AvatarImageDirectionCache constructor(k: AvatarImagePartContainer[]) { - this._partList = k; - this._images = new Map(); + this._partList = k; + this._images = new Map(); } public dispose(): void diff --git a/src/nitro/avatar/cache/ImageData.ts b/src/nitro/avatar/cache/ImageData.ts index 7686a9ee..82b8339a 100644 --- a/src/nitro/avatar/cache/ImageData.ts +++ b/src/nitro/avatar/cache/ImageData.ts @@ -13,21 +13,21 @@ export class ImageData constructor(texture: Texture, rectangle: Rectangle, _arg_3: Point, flipH: boolean, color: number, container: Container = null) { - this._texture = texture; + this._texture = texture; this._container = container; - this._rect = rectangle; - this._regPoint = _arg_3; - this._flipH = flipH; - this._colorTransform = color; + this._rect = rectangle; + this._regPoint = _arg_3; + this._flipH = flipH; + this._colorTransform = color; if(flipH) this._regPoint.x = (-(this._regPoint.x) + rectangle.width); } public dispose(): void { - this._texture = null; - this._regPoint = null; - this._colorTransform = null; + this._texture = null; + this._regPoint = null; + this._colorTransform = null; } public get texture(): Texture diff --git a/src/nitro/avatar/enum/AvatarAction.ts b/src/nitro/avatar/enum/AvatarAction.ts index b53c2a0b..6e753353 100644 --- a/src/nitro/avatar/enum/AvatarAction.ts +++ b/src/nitro/avatar/enum/AvatarAction.ts @@ -1,51 +1,51 @@ export class AvatarAction { - public static CARRY_OBJECT = 'cri'; - public static DANCE = 'dance'; - public static EFFECT = 'fx'; - public static EXPRESSION = 'expression'; - public static EXPRESSION_BLOW_A_KISS = 'blow'; - public static EXPRESSION_CRY = 'cry'; - public static EXPRESSION_IDLE = 'idle'; - public static EXPRESSION_LAUGH = 'laugh'; - public static EXPRESSION_RESPECT = 'respect'; - public static EXPRESSION_RIDE_JUMP = 'ridejump'; + public static CARRY_OBJECT = 'cri'; + public static DANCE = 'dance'; + public static EFFECT = 'fx'; + public static EXPRESSION = 'expression'; + public static EXPRESSION_BLOW_A_KISS = 'blow'; + public static EXPRESSION_CRY = 'cry'; + public static EXPRESSION_IDLE = 'idle'; + public static EXPRESSION_LAUGH = 'laugh'; + public static EXPRESSION_RESPECT = 'respect'; + public static EXPRESSION_RIDE_JUMP = 'ridejump'; public static EXPRESSION_SNOWBOARD_OLLIE = 'sbollie'; - public static EXPRESSION_SNOWBORD_360 = 'sb360'; - public static EXPRESSION_WAVE = 'wave'; - public static GESTURE = 'gest'; - public static GESTURE_AGGRAVATED = 'agr'; - public static GESTURE_SAD = 'sad'; - public static GESTURE_SMILE = 'sml'; - public static GESTURE_SURPRISED = 'srp'; - public static GUIDE_STATUS = 'guide'; - public static MUTED = 'muted'; - public static PET_GESTURE_BLINK = 'eyb'; - public static PET_GESTURE_CRAZY = 'crz'; - public static PET_GESTURE_JOY = 'joy'; - public static PET_GESTURE_MISERABLE = 'mis'; - public static PET_GESTURE_PUZZLED = 'puz'; - public static PET_GESTURE_TONGUE = 'tng'; - public static PLAYING_GAME = 'playing_game'; - public static POSTURE = 'posture'; - public static POSTURE_FLOAT = 'float'; - public static POSTURE_LAY = 'lay'; - public static POSTURE_SIT = 'sit'; - public static POSTURE_STAND = 'std'; - public static POSTURE_SWIM = 'swim'; - public static POSTURE_WALK = 'mv'; - public static SIGN = 'sign'; - public static SLEEP = 'sleep'; - public static SNOWWAR_DIE_BACK = 'swdieback'; - public static SNOWWAR_DIE_FRONT = 'swdiefront'; - public static SNOWWAR_PICK = 'swpick'; - public static SNOWWAR_RUN = 'swrun'; - public static SNOWWAR_THROW = 'swthrow'; - public static TALK = 'talk'; - public static BLINK = 'blink'; - public static TYPING = 'typing'; - public static USE_OBJECT = 'usei'; - public static VOTE = 'vote'; + public static EXPRESSION_SNOWBORD_360 = 'sb360'; + public static EXPRESSION_WAVE = 'wave'; + public static GESTURE = 'gest'; + public static GESTURE_AGGRAVATED = 'agr'; + public static GESTURE_SAD = 'sad'; + public static GESTURE_SMILE = 'sml'; + public static GESTURE_SURPRISED = 'srp'; + public static GUIDE_STATUS = 'guide'; + public static MUTED = 'muted'; + public static PET_GESTURE_BLINK = 'eyb'; + public static PET_GESTURE_CRAZY = 'crz'; + public static PET_GESTURE_JOY = 'joy'; + public static PET_GESTURE_MISERABLE = 'mis'; + public static PET_GESTURE_PUZZLED = 'puz'; + public static PET_GESTURE_TONGUE = 'tng'; + public static PLAYING_GAME = 'playing_game'; + public static POSTURE = 'posture'; + public static POSTURE_FLOAT = 'float'; + public static POSTURE_LAY = 'lay'; + public static POSTURE_SIT = 'sit'; + public static POSTURE_STAND = 'std'; + public static POSTURE_SWIM = 'swim'; + public static POSTURE_WALK = 'mv'; + public static SIGN = 'sign'; + public static SLEEP = 'sleep'; + public static SNOWWAR_DIE_BACK = 'swdieback'; + public static SNOWWAR_DIE_FRONT = 'swdiefront'; + public static SNOWWAR_PICK = 'swpick'; + public static SNOWWAR_RUN = 'swrun'; + public static SNOWWAR_THROW = 'swthrow'; + public static TALK = 'talk'; + public static BLINK = 'blink'; + public static TYPING = 'typing'; + public static USE_OBJECT = 'usei'; + public static VOTE = 'vote'; public static GESTURE_MAP = [ '', AvatarAction.GESTURE_SMILE, AvatarAction.GESTURE_AGGRAVATED, AvatarAction.GESTURE_SURPRISED, AvatarAction.GESTURE_SAD, AvatarAction.PET_GESTURE_JOY, AvatarAction.PET_GESTURE_CRAZY, AvatarAction.PET_GESTURE_TONGUE, AvatarAction.PET_GESTURE_BLINK, AvatarAction.PET_GESTURE_MISERABLE, AvatarAction.PET_GESTURE_PUZZLED ]; @@ -108,19 +108,19 @@ export class AvatarAction public static idToAvatarActionState(id: string): string { - if(id === 'Lay') return 'lay'; - if(id === 'Float') return 'float'; - if(id === 'Swim') return 'swim'; - if(id === 'Sit') return 'sit'; - if(id === 'Respect') return 'respect'; - if(id === 'Wave') return 'wave'; - if(id === 'Idle') return 'idle'; - if(id === 'Dance') return 'dance'; - if(id === 'UseItem') return 'usei'; - if(id === 'CarryItem') return 'cri'; - if(id === 'Talk') return 'talk'; - if(id === 'Sleep') return 'Sleep'; - if(id === 'Move') return 'mv'; + if(id === 'Lay') return 'lay'; + if(id === 'Float') return 'float'; + if(id === 'Swim') return 'swim'; + if(id === 'Sit') return 'sit'; + if(id === 'Respect') return 'respect'; + if(id === 'Wave') return 'wave'; + if(id === 'Idle') return 'idle'; + if(id === 'Dance') return 'dance'; + if(id === 'UseItem') return 'usei'; + if(id === 'CarryItem') return 'cri'; + if(id === 'Talk') return 'talk'; + if(id === 'Sleep') return 'Sleep'; + if(id === 'Move') return 'mv'; return 'std'; } diff --git a/src/nitro/avatar/enum/AvatarDirectionAngle.ts b/src/nitro/avatar/enum/AvatarDirectionAngle.ts index cb383d9b..f2047749 100644 --- a/src/nitro/avatar/enum/AvatarDirectionAngle.ts +++ b/src/nitro/avatar/enum/AvatarDirectionAngle.ts @@ -1,7 +1,7 @@ export class AvatarDirectionAngle { - public static DIRECTION_TO_ANGLE: number[] = [45, 90, 135, 180, 225, 270, 315, 0]; //_Str_2204 - public static DIRECTION_IS_FLIPPED: boolean[] = [false, false, false, false, true, true, true, false]; //_Str_1859 - public static MIN_DIRECTION: number = 0; //_Str_1562 - public static MAX_DIRECTION: number = 7; //_Str_1257 + public static DIRECTION_TO_ANGLE: number[] = [45, 90, 135, 180, 225, 270, 315, 0]; //_Str_2204 + public static DIRECTION_IS_FLIPPED: boolean[] = [false, false, false, false, true, true, true, false]; //_Str_1859 + public static MIN_DIRECTION: number = 0; //_Str_1562 + public static MAX_DIRECTION: number = 7; //_Str_1257 } \ No newline at end of file diff --git a/src/nitro/avatar/enum/AvatarEditorFigureCategory.ts b/src/nitro/avatar/enum/AvatarEditorFigureCategory.ts index 4c53f891..02e18011 100644 --- a/src/nitro/avatar/enum/AvatarEditorFigureCategory.ts +++ b/src/nitro/avatar/enum/AvatarEditorFigureCategory.ts @@ -1,10 +1,10 @@ export class AvatarEditorFigureCategory { - public static GENERIC: string = 'hd'; - public static HEAD: string = 'head'; - public static TORSO: string = 'torso'; - public static LEGS: string = 'legs'; - public static HOTLOOKS: string = 'hotlooks'; - public static WARDROBE: string = 'wardrobe'; - public static EFFECTS: string = 'effects'; + public static GENERIC: string = 'hd'; + public static HEAD: string = 'head'; + public static TORSO: string = 'torso'; + public static LEGS: string = 'legs'; + public static HOTLOOKS: string = 'hotlooks'; + public static WARDROBE: string = 'wardrobe'; + public static EFFECTS: string = 'effects'; } \ No newline at end of file diff --git a/src/nitro/avatar/enum/AvatarEditorInstanceId.ts b/src/nitro/avatar/enum/AvatarEditorInstanceId.ts index c4177f16..82cfaaef 100644 --- a/src/nitro/avatar/enum/AvatarEditorInstanceId.ts +++ b/src/nitro/avatar/enum/AvatarEditorInstanceId.ts @@ -1,7 +1,7 @@ export class AvatarEditorInstanceId { - public static OWN_AVATAR_EDITOR: number = 0; - public static FURNITURE_AVATAR_EDITOR: number = 1; - public static BOT_EDITOR: number = 2; - public static DEV_TOOL_EDITOR: number = 3; + public static OWN_AVATAR_EDITOR: number = 0; + public static FURNITURE_AVATAR_EDITOR: number = 1; + public static BOT_EDITOR: number = 2; + public static DEV_TOOL_EDITOR: number = 3; } diff --git a/src/nitro/avatar/enum/AvatarEditorSideCategory.ts b/src/nitro/avatar/enum/AvatarEditorSideCategory.ts index 13e3304d..8dfd9796 100644 --- a/src/nitro/avatar/enum/AvatarEditorSideCategory.ts +++ b/src/nitro/avatar/enum/AvatarEditorSideCategory.ts @@ -1,5 +1,5 @@ export class AvatarEditorSideCategory { - public static NOTHING: string = 'nothing'; - public static WARDROBE: string = 'wardrobe'; + public static NOTHING: string = 'nothing'; + public static WARDROBE: string = 'wardrobe'; } \ No newline at end of file diff --git a/src/nitro/avatar/enum/AvatarFigurePartType.ts b/src/nitro/avatar/enum/AvatarFigurePartType.ts index 23ecb286..30bc5646 100644 --- a/src/nitro/avatar/enum/AvatarFigurePartType.ts +++ b/src/nitro/avatar/enum/AvatarFigurePartType.ts @@ -1,29 +1,29 @@ export class AvatarFigurePartType { - public static BODY: string = 'bd'; - public static SHOES: string = 'sh'; - public static LEGS: string = 'lg'; - public static CHEST: string = 'ch'; - public static WAIST_ACCESSORY: string = 'wa'; - public static CHEST_ACCESSORY: string = 'ca'; - public static HEAD: string = 'hd'; - public static HAIR: string = 'hr'; - public static FACE_ACCESSORY: string = 'fa'; - public static EYE_ACCESSORY: string = 'ea'; - public static HEAD_ACCESSORY: string = 'ha'; + public static BODY: string = 'bd'; + public static SHOES: string = 'sh'; + public static LEGS: string = 'lg'; + public static CHEST: string = 'ch'; + public static WAIST_ACCESSORY: string = 'wa'; + public static CHEST_ACCESSORY: string = 'ca'; + public static HEAD: string = 'hd'; + public static HAIR: string = 'hr'; + public static FACE_ACCESSORY: string = 'fa'; + public static EYE_ACCESSORY: string = 'ea'; + public static HEAD_ACCESSORY: string = 'ha'; public static HEAD_ACCESSORY_EXTRA: string = 'he'; - public static COAT_CHEST: string = 'cc'; - public static CHEST_PRINT: string = 'cp'; - public static LEFT_HAND_ITEM: string = 'li'; - public static LEFT_HAND: string = 'lh'; - public static LEFT_SLEEVE: string = 'ls'; - public static RIGHT_HAND: string = 'rh'; - public static RIGHT_SLEEVE: string = 'rs'; - public static FACE: string = 'fc'; - public static EYES: string = 'ey'; - public static HAIR_BIG: string = 'hrb'; - public static RIGHT_HAND_ITEM: string = 'ri'; - public static LEFT_COAT_SLEEVE: string = 'lc'; - public static RIGHT_COAT_SLEEVE: string = 'rc'; - public static FIGURE_SETS: string[] = [ AvatarFigurePartType.SHOES, AvatarFigurePartType.LEGS, AvatarFigurePartType.CHEST, AvatarFigurePartType.WAIST_ACCESSORY, AvatarFigurePartType.CHEST_ACCESSORY, AvatarFigurePartType.HEAD, AvatarFigurePartType.HAIR, AvatarFigurePartType.FACE_ACCESSORY, AvatarFigurePartType.EYE_ACCESSORY, AvatarFigurePartType.HEAD_ACCESSORY, AvatarFigurePartType.HEAD_ACCESSORY_EXTRA, AvatarFigurePartType.COAT_CHEST, AvatarFigurePartType.CHEST_PRINT ]; + public static COAT_CHEST: string = 'cc'; + public static CHEST_PRINT: string = 'cp'; + public static LEFT_HAND_ITEM: string = 'li'; + public static LEFT_HAND: string = 'lh'; + public static LEFT_SLEEVE: string = 'ls'; + public static RIGHT_HAND: string = 'rh'; + public static RIGHT_SLEEVE: string = 'rs'; + public static FACE: string = 'fc'; + public static EYES: string = 'ey'; + public static HAIR_BIG: string = 'hrb'; + public static RIGHT_HAND_ITEM: string = 'ri'; + public static LEFT_COAT_SLEEVE: string = 'lc'; + public static RIGHT_COAT_SLEEVE: string = 'rc'; + public static FIGURE_SETS: string[] = [ AvatarFigurePartType.SHOES, AvatarFigurePartType.LEGS, AvatarFigurePartType.CHEST, AvatarFigurePartType.WAIST_ACCESSORY, AvatarFigurePartType.CHEST_ACCESSORY, AvatarFigurePartType.HEAD, AvatarFigurePartType.HAIR, AvatarFigurePartType.FACE_ACCESSORY, AvatarFigurePartType.EYE_ACCESSORY, AvatarFigurePartType.HEAD_ACCESSORY, AvatarFigurePartType.HEAD_ACCESSORY_EXTRA, AvatarFigurePartType.COAT_CHEST, AvatarFigurePartType.CHEST_PRINT ]; } diff --git a/src/nitro/avatar/enum/AvatarGuideStatus.ts b/src/nitro/avatar/enum/AvatarGuideStatus.ts index 35004c28..48a5b3cd 100644 --- a/src/nitro/avatar/enum/AvatarGuideStatus.ts +++ b/src/nitro/avatar/enum/AvatarGuideStatus.ts @@ -1,6 +1,6 @@ export class AvatarGuideStatus { - public static NONE: number = 0; - public static GUIDE: number = 1; + public static NONE: number = 0; + public static GUIDE: number = 1; public static REQUESTER: number = 2; } \ No newline at end of file diff --git a/src/nitro/avatar/enum/GeometryType.ts b/src/nitro/avatar/enum/GeometryType.ts index 30607459..402c05f4 100644 --- a/src/nitro/avatar/enum/GeometryType.ts +++ b/src/nitro/avatar/enum/GeometryType.ts @@ -1,8 +1,8 @@ export class GeometryType { - public static VERTICAL: string = 'vertical'; - public static SITTING: string = 'sitting'; - public static HORIZONTAL: string = 'horizontal'; - public static SWIM: string = 'swim'; + public static VERTICAL: string = 'vertical'; + public static SITTING: string = 'sitting'; + public static HORIZONTAL: string = 'horizontal'; + public static SWIM: string = 'swim'; public static SNOWWARS_HORIZONTAL: string = 'swhorizontal'; } \ No newline at end of file diff --git a/src/nitro/avatar/enum/RenderMode.ts b/src/nitro/avatar/enum/RenderMode.ts index 48147d30..ff9f877c 100644 --- a/src/nitro/avatar/enum/RenderMode.ts +++ b/src/nitro/avatar/enum/RenderMode.ts @@ -1,7 +1,7 @@ export class RenderMode { - public static TOOL: string = 'tool'; - public static COMPONENT: string = 'component'; - public static ONLINE_TOOL: string = 'online_tool'; - public static LOCAL_ONLY: string = 'local_only'; + public static TOOL: string = 'tool'; + public static COMPONENT: string = 'component'; + public static ONLINE_TOOL: string = 'online_tool'; + public static LOCAL_ONLY: string = 'local_only'; } \ No newline at end of file diff --git a/src/nitro/avatar/geometry/AvatarModelGeometry.ts b/src/nitro/avatar/geometry/AvatarModelGeometry.ts index f8fd57cf..9cd57a08 100644 --- a/src/nitro/avatar/geometry/AvatarModelGeometry.ts +++ b/src/nitro/avatar/geometry/AvatarModelGeometry.ts @@ -16,12 +16,12 @@ export class AvatarModelGeometry constructor(k: any) { - this._camera = new Vector3D(0, 0, 10); - this._avatarSet = new AvatarSet(k.avatarSets[0]); - this._geometryTypes = new Map(); - this._itemIdToBodyPartMap = new Map(); - this._transformation = new Matrix4x4(); - this._canvases = new Map(); + this._camera = new Vector3D(0, 0, 10); + this._avatarSet = new AvatarSet(k.avatarSets[0]); + this._geometryTypes = new Map(); + this._itemIdToBodyPartMap = new Map(); + this._transformation = new Matrix4x4(); + this._canvases = new Map(); const camera = k.camera; @@ -38,8 +38,8 @@ export class AvatarModelGeometry { if(!canvas) continue; - const scale = canvas.scale; - const geometries = new Map(); + const scale = canvas.scale; + const geometries = new Map(); if(canvas.geometries && (canvas.geometries.length > 0)) { @@ -63,8 +63,8 @@ export class AvatarModelGeometry { if(!type) continue; - const bodyParts: Map = new Map(); - const itemIds: Map = new Map(); + const bodyParts: Map = new Map(); + const itemIds: Map = new Map(); if(type.bodyParts && (type.bodyParts.length > 0)) { @@ -211,7 +211,7 @@ export class AvatarModelGeometry private getBodyPartsInAvatarSet(k: Map, _arg_2: string): GeometryBodyPart[] { - const parts = this.getBodyPartIdsInAvatarSet(_arg_2); + const parts = this.getBodyPartIdsInAvatarSet(_arg_2); const geometryParts = []; for(const part of parts) @@ -233,10 +233,10 @@ export class AvatarModelGeometry { if(!_arg_3) return []; - const geometryParts = this.getBodyPartsOfType(_arg_3); - const parts = this.getBodyPartsInAvatarSet(geometryParts, k); - const sets: [ number, GeometryBodyPart ][] = []; - const ids: string[] = []; + const geometryParts = this.getBodyPartsOfType(_arg_3); + const parts = this.getBodyPartsInAvatarSet(geometryParts, k); + const sets: [ number, GeometryBodyPart ][] = []; + const ids: string[] = []; this._transformation = Matrix4x4.getYRotationMatrix(_arg_2); diff --git a/src/nitro/avatar/geometry/AvatarSet.ts b/src/nitro/avatar/geometry/AvatarSet.ts index 7aea7dca..2dee8040 100644 --- a/src/nitro/avatar/geometry/AvatarSet.ts +++ b/src/nitro/avatar/geometry/AvatarSet.ts @@ -8,11 +8,11 @@ constructor(k: any) { - this._id = k.id; - this._isMain = k.main || false; - this._avatarSets = new Map(); - this._bodyParts = []; - this._allBodyParts = []; + this._id = k.id; + this._isMain = k.main || false; + this._avatarSets = new Map(); + this._bodyParts = []; + this._allBodyParts = []; if(k.avatarSets && (k.avatarSets.length > 0)) { diff --git a/src/nitro/avatar/geometry/GeometryBodyPart.ts b/src/nitro/avatar/geometry/GeometryBodyPart.ts index 1aa6ac94..e151ad3d 100644 --- a/src/nitro/avatar/geometry/GeometryBodyPart.ts +++ b/src/nitro/avatar/geometry/GeometryBodyPart.ts @@ -15,10 +15,10 @@ export class GeometryBodyPart extends Node3D { super(parseFloat(k.x), parseFloat(k.y), parseFloat(k.z)); - this._id = k.id; - this._radius = parseFloat(k.radius); - this._parts = new Map(); - this._dynamicParts = new Map(); + this._id = k.id; + this._radius = parseFloat(k.radius); + this._parts = new Map(); + this._dynamicParts = new Map(); if(k.items && (k.items.length > 0)) { @@ -35,7 +35,7 @@ export class GeometryBodyPart extends Node3D public getDynamicParts(k: IAvatarImage): GeometryItem[] { - const existing = this._dynamicParts.get(k); + const existing = this._dynamicParts.get(k); const parts: GeometryItem[] = []; if(existing) diff --git a/src/nitro/avatar/geometry/GeometryItem.ts b/src/nitro/avatar/geometry/GeometryItem.ts index 189a4061..25cd8186 100644 --- a/src/nitro/avatar/geometry/GeometryItem.ts +++ b/src/nitro/avatar/geometry/GeometryItem.ts @@ -13,14 +13,14 @@ export class GeometryItem extends Node3D { super(parseFloat(k.x), parseFloat(k.y), parseFloat(k.z)); - this._id = k.id; - this._radius = parseFloat(k.radius); - this._normal = new Vector3D(parseFloat(k.nx), parseFloat(k.ny), parseFloat(k.nz)); + this._id = k.id; + this._radius = parseFloat(k.radius); + this._normal = new Vector3D(parseFloat(k.nx), parseFloat(k.ny), parseFloat(k.nz)); this._isDoubleSided = k.double || false; - this._isDynamic = _arg_2; + this._isDynamic = _arg_2; } - public getDistance(k: Vector3D): number + public getDistance(k: Vector3D): number { const _local_2 = Math.abs(((k.z - this.transformedLocation.z) - this._radius)); const _local_3 = Math.abs(((k.z - this.transformedLocation.z) + this._radius)); diff --git a/src/nitro/avatar/geometry/Matrix4x4.ts b/src/nitro/avatar/geometry/Matrix4x4.ts index d0914a20..24cc0632 100644 --- a/src/nitro/avatar/geometry/Matrix4x4.ts +++ b/src/nitro/avatar/geometry/Matrix4x4.ts @@ -2,8 +2,8 @@ export class Matrix4x4 { - public static IDENTITY:Matrix4x4 = new Matrix4x4(1, 0, 0, 0, 1, 0, 0, 0, 1); - private static TOLERANS: number = 1E-18; + public static IDENTITY:Matrix4x4 = new Matrix4x4(1, 0, 0, 0, 1, 0, 0, 0, 1); + private static TOLERANS: number = 1E-18; private _data: number[]; @@ -57,14 +57,14 @@ export class Matrix4x4 public multiply(k:Matrix4x4): Matrix4x4 { - const _local_2 = (((this._data[0] * k.data[0]) + (this._data[1] * k.data[3])) + (this._data[2] * k.data[6])); - const _local_3 = (((this._data[0] * k.data[1]) + (this._data[1] * k.data[4])) + (this._data[2] * k.data[7])); - const _local_4 = (((this._data[0] * k.data[2]) + (this._data[1] * k.data[5])) + (this._data[2] * k.data[8])); - const _local_5 = (((this._data[3] * k.data[0]) + (this._data[4] * k.data[3])) + (this._data[5] * k.data[6])); - const _local_6 = (((this._data[3] * k.data[1]) + (this._data[4] * k.data[4])) + (this._data[5] * k.data[7])); - const _local_7 = (((this._data[3] * k.data[2]) + (this._data[4] * k.data[5])) + (this._data[5] * k.data[8])); - const _local_8 = (((this._data[6] * k.data[0]) + (this._data[7] * k.data[3])) + (this._data[8] * k.data[6])); - const _local_9 = (((this._data[6] * k.data[1]) + (this._data[7] * k.data[4])) + (this._data[8] * k.data[7])); + const _local_2 = (((this._data[0] * k.data[0]) + (this._data[1] * k.data[3])) + (this._data[2] * k.data[6])); + const _local_3 = (((this._data[0] * k.data[1]) + (this._data[1] * k.data[4])) + (this._data[2] * k.data[7])); + const _local_4 = (((this._data[0] * k.data[2]) + (this._data[1] * k.data[5])) + (this._data[2] * k.data[8])); + const _local_5 = (((this._data[3] * k.data[0]) + (this._data[4] * k.data[3])) + (this._data[5] * k.data[6])); + const _local_6 = (((this._data[3] * k.data[1]) + (this._data[4] * k.data[4])) + (this._data[5] * k.data[7])); + const _local_7 = (((this._data[3] * k.data[2]) + (this._data[4] * k.data[5])) + (this._data[5] * k.data[8])); + const _local_8 = (((this._data[6] * k.data[0]) + (this._data[7] * k.data[3])) + (this._data[8] * k.data[6])); + const _local_9 = (((this._data[6] * k.data[1]) + (this._data[7] * k.data[4])) + (this._data[8] * k.data[7])); const _local_10 = (((this._data[6] * k.data[2]) + (this._data[7] * k.data[5])) + (this._data[8] * k.data[8])); return new Matrix4x4(_local_2, _local_3, _local_4, _local_5, _local_6, _local_7, _local_8, _local_9, _local_10); diff --git a/src/nitro/avatar/geometry/Node3D.ts b/src/nitro/avatar/geometry/Node3D.ts index 7cbcf49c..310dff45 100644 --- a/src/nitro/avatar/geometry/Node3D.ts +++ b/src/nitro/avatar/geometry/Node3D.ts @@ -9,9 +9,9 @@ export class Node3D constructor(k: number, _arg_2: number, _arg_3: number) { - this._location = new Vector3D(k, _arg_2, _arg_3); - this._transformedLocation = new Vector3D(); - this._needsTransformation = false; + this._location = new Vector3D(k, _arg_2, _arg_3); + this._transformedLocation = new Vector3D(); + this._needsTransformation = false; if(((!(k == 0)) || (!(_arg_2 == 0))) || (!(_arg_3 == 0))) this._needsTransformation = true; } diff --git a/src/nitro/avatar/pets/PetCustomPart.ts b/src/nitro/avatar/pets/PetCustomPart.ts index 0c374016..ade87f60 100644 --- a/src/nitro/avatar/pets/PetCustomPart.ts +++ b/src/nitro/avatar/pets/PetCustomPart.ts @@ -6,8 +6,8 @@ export class PetCustomPart constructor(layerId: number, partId: number, paletteId: number) { - this._layerId = layerId; - this._partId = partId; + this._layerId = layerId; + this._partId = partId; this._paletteId = paletteId; } diff --git a/src/nitro/avatar/pets/PetFigureData.ts b/src/nitro/avatar/pets/PetFigureData.ts index 105811c3..66b4b9d3 100644 --- a/src/nitro/avatar/pets/PetFigureData.ts +++ b/src/nitro/avatar/pets/PetFigureData.ts @@ -14,17 +14,17 @@ export class PetFigureData constructor(k: string) { - this._typeId = this.getTypeId(k); + this._typeId = this.getTypeId(k); this._paletteId = this.getPaletteId(k); - this._color = this.getColor(k); - this._headOnly = this.getHeadOnly(k); + this._color = this.getColor(k); + this._headOnly = this.getHeadOnly(k); const _local_2 = this.getCustomData(k); - this._customLayerIds = this.getCustomLayerIds(_local_2); - this._customPartIds = this.getCustomPartIds(_local_2); - this._customPaletteIds = this.getCustomPaletteIds(_local_2); - this._customParts = []; + this._customLayerIds = this.getCustomLayerIds(_local_2); + this._customPartIds = this.getCustomPartIds(_local_2); + this._customPaletteIds = this.getCustomPaletteIds(_local_2); + this._customParts = []; let i = 0; @@ -114,16 +114,16 @@ export class PetFigureData if(k) { - const _local_3 = k.split(' '); - const _local_4 = ((this._headOnly) ? 1 : 0); - const _local_5 = (4 + _local_4); + const _local_3 = k.split(' '); + const _local_4 = ((this._headOnly) ? 1 : 0); + const _local_5 = (4 + _local_4); if(_local_3.length > _local_5) { - const _local_6 = (3 + _local_4); - const _local_7 = parseInt(_local_3[_local_6]); + const _local_6 = (3 + _local_4); + const _local_7 = parseInt(_local_3[_local_6]); - _local_2 = _local_3.slice(_local_5, (_local_5 + (_local_7 * 3))); + _local_2 = _local_3.slice(_local_5, (_local_5 + (_local_7 * 3))); } } diff --git a/src/nitro/avatar/pets/PetType.ts b/src/nitro/avatar/pets/PetType.ts index cca7168d..9058b7b3 100644 --- a/src/nitro/avatar/pets/PetType.ts +++ b/src/nitro/avatar/pets/PetType.ts @@ -1,38 +1,38 @@ export class PetType { - public static DOG: number = 0; - public static CAT: number = 1; - public static CROCODILE: number = 2; - public static TERRIER: number = 3; - public static BEAR: number = 4; - public static PIG: number = 5; - public static LION: number = 6; - public static RHINO: number = 7; - public static SPIDER: number = 8; - public static TURTLE: number = 9; - public static CHICKEN: number = 10; - public static FROG: number = 11; - public static DRAGON: number = 12; - public static MONSTER: number = 13; - public static MONKEY: number = 14; - public static HORSE: number = 15; - public static MONSTERPLANT: number = 16; - public static BUNNY: number = 17; - public static BUNNYEVIL: number = 18; + public static DOG: number = 0; + public static CAT: number = 1; + public static CROCODILE: number = 2; + public static TERRIER: number = 3; + public static BEAR: number = 4; + public static PIG: number = 5; + public static LION: number = 6; + public static RHINO: number = 7; + public static SPIDER: number = 8; + public static TURTLE: number = 9; + public static CHICKEN: number = 10; + public static FROG: number = 11; + public static DRAGON: number = 12; + public static MONSTER: number = 13; + public static MONKEY: number = 14; + public static HORSE: number = 15; + public static MONSTERPLANT: number = 16; + public static BUNNY: number = 17; + public static BUNNYEVIL: number = 18; public static BUNNYDEPRESSED: number = 19; - public static BUNNYLOVE: number = 20; - public static PIGEONGOOD: number = 21; - public static PIGEONEVIL: number = 22; - public static DEMONMONKEY: number = 23; - public static BABYBEAR: number = 24; - public static BABYTERRIER: number = 25; - public static GNOME: number = 26; - public static LEPRECHAUN: number = 27; - public static KITTENBABY: number = 28; - public static PUPPYBABY: number = 29; - public static PIGLETNBABY: number = 30; - public static HALOOMPA: number = 31; - public static FOOLS: number = 32; - public static PTEROSAUR: number = 33; - public static VELOCIRAPTOR: number = 34; + public static BUNNYLOVE: number = 20; + public static PIGEONGOOD: number = 21; + public static PIGEONEVIL: number = 22; + public static DEMONMONKEY: number = 23; + public static BABYBEAR: number = 24; + public static BABYTERRIER: number = 25; + public static GNOME: number = 26; + public static LEPRECHAUN: number = 27; + public static KITTENBABY: number = 28; + public static PUPPYBABY: number = 29; + public static PIGLETNBABY: number = 30; + public static HALOOMPA: number = 31; + public static FOOLS: number = 32; + public static PTEROSAUR: number = 33; + public static VELOCIRAPTOR: number = 34; } \ No newline at end of file diff --git a/src/nitro/avatar/structure/AvatarCanvas.ts b/src/nitro/avatar/structure/AvatarCanvas.ts index ad40e2b5..db76239a 100644 --- a/src/nitro/avatar/structure/AvatarCanvas.ts +++ b/src/nitro/avatar/structure/AvatarCanvas.ts @@ -11,10 +11,10 @@ export class AvatarCanvas constructor(k: any, _arg_2: string) { - this._id = k.id; - this._width = k.width; - this._height = k.height; - this._offset = new Point(k.dx, k.dy); + this._id = k.id; + this._width = k.width; + this._height = k.height; + this._offset = new Point(k.dx, k.dy); if(_arg_2 == AvatarScaleType.LARGE) this._regPoint = new Point(((this._width - 64) / 2), 0); else this._regPoint = new Point(((this._width - 32) / 2), 0); diff --git a/src/nitro/avatar/structure/FigureSetData.ts b/src/nitro/avatar/structure/FigureSetData.ts index 5fe429c5..0de29d06 100644 --- a/src/nitro/avatar/structure/FigureSetData.ts +++ b/src/nitro/avatar/structure/FigureSetData.ts @@ -14,8 +14,8 @@ export class FigureSetData implements IFigureSetData, IStructureData constructor() { - this._palettes = new Map(); - this._setTypes = new Map(); + this._palettes = new Map(); + this._setTypes = new Map(); } public dispose(): void diff --git a/src/nitro/avatar/structure/PartSetsData.ts b/src/nitro/avatar/structure/PartSetsData.ts index 6f052e8e..4845f7e3 100644 --- a/src/nitro/avatar/structure/PartSetsData.ts +++ b/src/nitro/avatar/structure/PartSetsData.ts @@ -11,8 +11,8 @@ export class PartSetsData implements IFigureSetData constructor() { - this._parts = new Map(); - this._activePartSets = new Map(); + this._parts = new Map(); + this._activePartSets = new Map(); } public parse(data: any): boolean diff --git a/src/nitro/avatar/structure/animation/AnimationAction.ts b/src/nitro/avatar/structure/animation/AnimationAction.ts index c5ceceec..0b7e6aeb 100644 --- a/src/nitro/avatar/structure/animation/AnimationAction.ts +++ b/src/nitro/avatar/structure/animation/AnimationAction.ts @@ -13,11 +13,11 @@ export class AnimationAction constructor(data: any) { - this._id = data.id; - this._actionParts = new Map(); - this._bodyPartOffsets = new Map(); - this._frameCount = 0; - this._frameIndexes = []; + this._id = data.id; + this._actionParts = new Map(); + this._bodyPartOffsets = new Map(); + this._frameCount = 0; + this._frameIndexes = []; if(data.parts && (data.parts.length > 0)) { @@ -104,9 +104,9 @@ export class AnimationAction public getFrameBodyPartOffset(frameId: number, frameCount: number, partId: string): Point { - const frameIndex = (frameCount % this._frameIndexes.length); - const frameNumber = this._frameIndexes[frameIndex]; - const offsets = this._bodyPartOffsets.get(frameNumber); + const frameIndex = (frameCount % this._frameIndexes.length); + const frameNumber = this._frameIndexes[frameIndex]; + const offsets = this._bodyPartOffsets.get(frameNumber); if(!offsets) return AnimationAction.DEFAULT_OFFSET; diff --git a/src/nitro/avatar/structure/animation/AvatarAnimationFrame.ts b/src/nitro/avatar/structure/animation/AvatarAnimationFrame.ts index ba1a18ff..3b9ec352 100644 --- a/src/nitro/avatar/structure/animation/AvatarAnimationFrame.ts +++ b/src/nitro/avatar/structure/animation/AvatarAnimationFrame.ts @@ -5,8 +5,8 @@ export class AvatarAnimationFrame constructor(data: any) { - this._number = data.number; - this._assetPartDefinition = data.assetPartDefinition || null; + this._number = data.number; + this._assetPartDefinition = data.assetPartDefinition || null; } public get number(): number diff --git a/src/nitro/avatar/structure/figure/FigurePart.ts b/src/nitro/avatar/structure/figure/FigurePart.ts index 8214b973..afc22585 100644 --- a/src/nitro/avatar/structure/figure/FigurePart.ts +++ b/src/nitro/avatar/structure/figure/FigurePart.ts @@ -14,12 +14,12 @@ export class FigurePart implements IFigurePart { if(!data) throw new Error('invalid_data'); - this._id = data.id; - this._type = data.type; - this._index = data.index; - this._colorLayerIndex = data.colorindex; - this._paletteMapId = -1; - this._breed = -1; + this._id = data.id; + this._type = data.type; + this._index = data.index; + this._colorLayerIndex = data.colorindex; + this._paletteMapId = -1; + this._breed = -1; } public dispose(): void diff --git a/src/nitro/avatar/structure/figure/FigurePartSet.ts b/src/nitro/avatar/structure/figure/FigurePartSet.ts index aafcde5c..ad6910e9 100644 --- a/src/nitro/avatar/structure/figure/FigurePartSet.ts +++ b/src/nitro/avatar/structure/figure/FigurePartSet.ts @@ -20,20 +20,20 @@ export class FigurePartSet implements IFigurePartSet { if(!type || !data) throw new Error('invalid_data'); - this._id = data.id; - this._type = type; - this._gender = data.gender; - this._clubLevel = data.club; - this._isColorable = data.colorable; - this._isSelectable = data.selectable; - this._parts = []; - this._hiddenLayers = []; - this._isPreSelectable = data.preselectable; - this._isSellable = data.sellable; + this._id = data.id; + this._type = type; + this._gender = data.gender; + this._clubLevel = data.club; + this._isColorable = data.colorable; + this._isSelectable = data.selectable; + this._parts = []; + this._hiddenLayers = []; + this._isPreSelectable = data.preselectable; + this._isSellable = data.sellable; for(const part of data.parts) { - const newPart = new FigurePart(part); + const newPart = new FigurePart(part); const partIndex = this.getPartIndex(newPart); if(partIndex !== -1) this._parts.splice(partIndex, 0, newPart); @@ -55,8 +55,8 @@ export class FigurePartSet implements IFigurePartSet figurePart.dispose(); } - this._parts = null; - this._hiddenLayers = null; + this._parts = null; + this._hiddenLayers = null; } private getPartIndex(part: FigurePart): number diff --git a/src/nitro/avatar/structure/figure/Palette.ts b/src/nitro/avatar/structure/figure/Palette.ts index b2233342..42da5a83 100644 --- a/src/nitro/avatar/structure/figure/Palette.ts +++ b/src/nitro/avatar/structure/figure/Palette.ts @@ -13,8 +13,8 @@ export class Palette implements IPalette { if(!data) throw new Error('invalid_data'); - this._id = data.id; - this._colors = new AdvancedMap(); + this._id = data.id; + this._colors = new AdvancedMap(); this.append(data); } diff --git a/src/nitro/avatar/structure/figure/SetType.ts b/src/nitro/avatar/structure/figure/SetType.ts index 4aebd8b8..d5e0f3eb 100644 --- a/src/nitro/avatar/structure/figure/SetType.ts +++ b/src/nitro/avatar/structure/figure/SetType.ts @@ -15,12 +15,12 @@ export class SetType implements ISetType { if(!data) throw new Error('invalid_data'); - this._type = data.type; - this._paletteId = data.paletteId; - this._isMandatory = {}; - this._isMandatory['F'] = [ data.mandatory_f_0, data.mandatory_f_1 ]; - this._isMandatory['M'] = [ data.mandatory_m_0, data.mandatory_m_1 ]; - this._partSets = new AdvancedMap(); + this._type = data.type; + this._paletteId = data.paletteId; + this._isMandatory = {}; + this._isMandatory['F'] = [ data.mandatory_f_0, data.mandatory_f_1 ]; + this._isMandatory['M'] = [ data.mandatory_m_0, data.mandatory_m_1 ]; + this._partSets = new AdvancedMap(); this.append(data); } diff --git a/src/nitro/avatar/structure/parts/ActivePartSet.ts b/src/nitro/avatar/structure/parts/ActivePartSet.ts index 63eb6e48..42443080 100644 --- a/src/nitro/avatar/structure/parts/ActivePartSet.ts +++ b/src/nitro/avatar/structure/parts/ActivePartSet.ts @@ -5,7 +5,7 @@ export class ActivePartSet constructor(data: any) { - this._id = data.id; + this._id = data.id; this._parts = []; if(data.activeParts && (data.activeParts.length > 0)) diff --git a/src/nitro/avatar/structure/parts/PartDefinition.ts b/src/nitro/avatar/structure/parts/PartDefinition.ts index 607503ec..19caa8cf 100644 --- a/src/nitro/avatar/structure/parts/PartDefinition.ts +++ b/src/nitro/avatar/structure/parts/PartDefinition.ts @@ -10,11 +10,11 @@ export class PartDefinition { if(!data) throw new Error('invalid_data'); - this._setType = data.setType; - this._flippedSetType = data.flippedSetType || null; - this._removeSetType = data.removeSetType || null; - this._appendToFigure = false; - this._staticId = -1; + this._setType = data.setType; + this._flippedSetType = data.flippedSetType || null; + this._removeSetType = data.removeSetType || null; + this._appendToFigure = false; + this._staticId = -1; } public hasStaticId(): boolean diff --git a/src/nitro/camera/RoomCameraWidgetEffect.ts b/src/nitro/camera/RoomCameraWidgetEffect.ts index d66987b0..3fa664bb 100644 --- a/src/nitro/camera/RoomCameraWidgetEffect.ts +++ b/src/nitro/camera/RoomCameraWidgetEffect.ts @@ -12,11 +12,11 @@ export class RoomCameraWidgetEffect implements IRoomCameraWidgetEffect constructor(name: string, minLevel: number = -1, texture: Texture = null, colorMatrix: ColorMatrix = null, blendMode: number = null) { - this._name = name; - this._minLevel = minLevel; - this._texture = texture; - this._colorMatrix = colorMatrix; - this._blendMode = blendMode; + this._name = name; + this._minLevel = minLevel; + this._texture = texture; + this._colorMatrix = colorMatrix; + this._blendMode = blendMode; } public get name(): string diff --git a/src/nitro/camera/RoomCameraWidgetManager.ts b/src/nitro/camera/RoomCameraWidgetManager.ts index 7508fedf..0a56c0d0 100644 --- a/src/nitro/camera/RoomCameraWidgetManager.ts +++ b/src/nitro/camera/RoomCameraWidgetManager.ts @@ -17,9 +17,9 @@ export class RoomCameraWidgetManager implements IRoomCameraWidgetManager constructor() { - this._effects = new Map(); - this._events = new EventDispatcher(); - this._isLoaded = false; + this._effects = new Map(); + this._events = new EventDispatcher(); + this._isLoaded = false; } public init(): void @@ -29,7 +29,7 @@ export class RoomCameraWidgetManager implements IRoomCameraWidgetManager this._isLoaded = true; const imagesUrl = Nitro.instance.getConfiguration('image.library.url') + 'Habbo-Stories/'; - const effects = Nitro.instance.getConfiguration<{ name: string, colorMatrix?: ColorMatrix, minLevel: number, blendMode?: number, enabled: boolean }[]>('camera.available.effects'); + const effects = Nitro.instance.getConfiguration<{ name: string, colorMatrix?: ColorMatrix, minLevel: number, blendMode?: number, enabled: boolean }[]>('camera.available.effects'); for(const effect of effects) { @@ -43,8 +43,8 @@ export class RoomCameraWidgetManager implements IRoomCameraWidgetManager } else { - cameraEffect.texture = Texture.from(imagesUrl + effect.name + '.png'); - cameraEffect.blendMode = effect.blendMode; + cameraEffect.texture = Texture.from(imagesUrl + effect.name + '.png'); + cameraEffect.blendMode = effect.blendMode; } this._effects.set(cameraEffect.name, cameraEffect); @@ -56,7 +56,7 @@ export class RoomCameraWidgetManager implements IRoomCameraWidgetManager public applyEffects(texture: Texture, selectedEffects: IRoomCameraWidgetSelectedEffect[], isZoomed: boolean): HTMLImageElement { const container = new NitroContainer(); - const sprite = new NitroSprite(texture); + const sprite = new NitroSprite(texture); container.addChild(sprite); @@ -70,8 +70,8 @@ export class RoomCameraWidgetManager implements IRoomCameraWidgetManager { const filter = new ColorMatrixFilter(); - filter.matrix = effect.colorMatrix; - filter.alpha = selectedEffect.alpha; + filter.matrix = effect.colorMatrix; + filter.alpha = selectedEffect.alpha; if(!sprite.filters) sprite.filters = []; @@ -79,9 +79,9 @@ export class RoomCameraWidgetManager implements IRoomCameraWidgetManager } else { - const effectSprite = new NitroSprite(effect.texture); - effectSprite.alpha = selectedEffect.alpha; - effectSprite.blendMode = effect.blendMode; + const effectSprite = new NitroSprite(effect.texture); + effectSprite.alpha = selectedEffect.alpha; + effectSprite.blendMode = effect.blendMode; container.addChild(effectSprite); } diff --git a/src/nitro/camera/RoomCameraWidgetSelectedEffect.ts b/src/nitro/camera/RoomCameraWidgetSelectedEffect.ts index 9cbf2217..b944ef7f 100644 --- a/src/nitro/camera/RoomCameraWidgetSelectedEffect.ts +++ b/src/nitro/camera/RoomCameraWidgetSelectedEffect.ts @@ -7,8 +7,8 @@ export class RoomCameraWidgetSelectedEffect constructor(effect: IRoomCameraWidgetEffect, alpha: number) { - this._effect = effect; - this._alpha = alpha; + this._effect = effect; + this._alpha = alpha; } public get effect(): IRoomCameraWidgetEffect diff --git a/src/nitro/communication/NitroCommunicationManager.ts b/src/nitro/communication/NitroCommunicationManager.ts index c906cc6a..2854b946 100644 --- a/src/nitro/communication/NitroCommunicationManager.ts +++ b/src/nitro/communication/NitroCommunicationManager.ts @@ -25,14 +25,14 @@ export class NitroCommunicationManager extends NitroManager implements INitroCom super(); this._communication = communication; - this._connection = null; - this._messages = new NitroMessages(); + this._connection = null; + this._messages = new NitroMessages(); - this._demo = new NitroCommunicationDemo(this); + this._demo = new NitroCommunicationDemo(this); - this.onConnectionOpenedEvent = this.onConnectionOpenedEvent.bind(this); - this.onConnectionClosedEvent = this.onConnectionClosedEvent.bind(this); - this.onConnectionErrorEvent = this.onConnectionErrorEvent.bind(this); + this.onConnectionOpenedEvent = this.onConnectionOpenedEvent.bind(this); + this.onConnectionClosedEvent = this.onConnectionClosedEvent.bind(this); + this.onConnectionErrorEvent = this.onConnectionErrorEvent.bind(this); this.onConnectionAuthenticatedEvent = this.onConnectionAuthenticatedEvent.bind(this); } diff --git a/src/nitro/communication/NitroMessages.ts b/src/nitro/communication/NitroMessages.ts index 8f9d85fb..4a9d8d8e 100644 --- a/src/nitro/communication/NitroMessages.ts +++ b/src/nitro/communication/NitroMessages.ts @@ -471,7 +471,7 @@ export class NitroMessages implements IMessageConfiguration constructor() { - this._events = new Map(); + this._events = new Map(); this._composers = new Map(); this.registerEvents(); diff --git a/src/nitro/communication/demo/NitroCommunicationDemo.ts b/src/nitro/communication/demo/NitroCommunicationDemo.ts index 70da702d..bafc1552 100644 --- a/src/nitro/communication/demo/NitroCommunicationDemo.ts +++ b/src/nitro/communication/demo/NitroCommunicationDemo.ts @@ -27,15 +27,15 @@ export class NitroCommunicationDemo extends NitroManager this._communication = communication; - this._handShaking = false; - this._didConnect = false; + this._handShaking = false; + this._didConnect = false; - this._pongInterval = null; + this._pongInterval = null; - this.onConnectionOpenedEvent = this.onConnectionOpenedEvent.bind(this); - this.onConnectionClosedEvent = this.onConnectionClosedEvent.bind(this); - this.onConnectionErrorEvent = this.onConnectionErrorEvent.bind(this); - this.sendPong = this.sendPong.bind(this); + this.onConnectionOpenedEvent = this.onConnectionOpenedEvent.bind(this); + this.onConnectionClosedEvent = this.onConnectionClosedEvent.bind(this); + this.onConnectionErrorEvent = this.onConnectionErrorEvent.bind(this); + this.sendPong = this.sendPong.bind(this); } protected onInit(): void @@ -64,7 +64,7 @@ export class NitroCommunicationDemo extends NitroManager connection.removeEventListener(SocketConnectionEvent.CONNECTION_ERROR, this.onConnectionErrorEvent); } - this._handShaking = false; + this._handShaking = false; this.stopPonging(); diff --git a/src/nitro/communication/demo/NitroCommunicationDemoEvent.ts b/src/nitro/communication/demo/NitroCommunicationDemoEvent.ts index 43ff9df1..9f16b448 100644 --- a/src/nitro/communication/demo/NitroCommunicationDemoEvent.ts +++ b/src/nitro/communication/demo/NitroCommunicationDemoEvent.ts @@ -3,13 +3,13 @@ import { NitroEvent } from '../../../core/events/NitroEvent'; export class NitroCommunicationDemoEvent extends NitroEvent { - public static CONNECTION_ESTABLISHED = 'NCE_ESTABLISHED'; - public static CONNECTION_CLOSED = 'NCE_CLOSED'; - public static CONNECTION_ERROR = 'NCE_ERROR'; - public static CONNECTION_HANDSHAKING = 'NCE_HANDSHAKING'; - public static CONNECTION_HANDSHAKED = 'NCE_HANDSHAKED'; - public static CONNECTION_HANDSHAKE_FAILED = 'NCE_HANDSHAKE_FAILED'; - public static CONNECTION_AUTHENTICATED = 'NCE_AUTHENTICATED'; + public static CONNECTION_ESTABLISHED = 'NCE_ESTABLISHED'; + public static CONNECTION_CLOSED = 'NCE_CLOSED'; + public static CONNECTION_ERROR = 'NCE_ERROR'; + public static CONNECTION_HANDSHAKING = 'NCE_HANDSHAKING'; + public static CONNECTION_HANDSHAKED = 'NCE_HANDSHAKED'; + public static CONNECTION_HANDSHAKE_FAILED = 'NCE_HANDSHAKE_FAILED'; + public static CONNECTION_AUTHENTICATED = 'NCE_AUTHENTICATED'; private _connection: IConnection; diff --git a/src/nitro/communication/messages/incoming/IncomingHeader.ts b/src/nitro/communication/messages/incoming/IncomingHeader.ts index a42391c6..a069fa15 100644 --- a/src/nitro/communication/messages/incoming/IncomingHeader.ts +++ b/src/nitro/communication/messages/incoming/IncomingHeader.ts @@ -1,368 +1,368 @@ export class IncomingHeader { - public static ACHIEVEMENT_LIST = 305; - public static AUTHENTICATED = 2491; - public static AUTHENTICATION = -1; - public static AVAILABILITY_STATUS = 2033; - public static BUILDERS_CLUB_EXPIRED = 1452; - public static CLUB_OFFERS = 2405; - public static CATALOG_PAGE = 804; - public static CATALOG_PAGE_LIST = 1032; - public static CATALOG_PURCHASE_OK = 869; - public static CATALOG_PURCHASE_ERROR = 1404; - public static CATALOG_PURCHASE_NOT_ALLOWED = 3770; - public static PRODUCT_OFFER = 3388; - public static LIMITED_SOLD_OUT = 377; - public static CATALOG_PUBLISHED = 1866; - public static CFH_RESULT_MESSAGE = 3635; - public static CLIENT_LATENCY = 10; - public static CLIENT_PING = 3928; - public static DESKTOP_CAMPAIGN = 1745; - public static DESKTOP_NEWS = 286; - public static DESKTOP_VIEW = 122; - public static BUNDLE_DISCOUNT_RULESET = 2347; - public static FIRST_LOGIN_OF_DAY = 793; - public static FURNITURE_ALIASES = 1723; - public static FURNITURE_DATA = 2547; - public static FURNITURE_FLOOR = 1778; - public static FURNITURE_FLOOR_ADD = 1534; - public static FURNITURE_FLOOR_REMOVE = 2703; - public static FURNITURE_FLOOR_UPDATE = 3776; - public static FURNITURE_ITEMDATA = 2202; - public static FURNITURE_STATE = 2376; + public static ACHIEVEMENT_LIST = 305; + public static AUTHENTICATED = 2491; + public static AUTHENTICATION = -1; + public static AVAILABILITY_STATUS = 2033; + public static BUILDERS_CLUB_EXPIRED = 1452; + public static CLUB_OFFERS = 2405; + public static CATALOG_PAGE = 804; + public static CATALOG_PAGE_LIST = 1032; + public static CATALOG_PURCHASE_OK = 869; + public static CATALOG_PURCHASE_ERROR = 1404; + public static CATALOG_PURCHASE_NOT_ALLOWED = 3770; + public static PRODUCT_OFFER = 3388; + public static LIMITED_SOLD_OUT = 377; + public static CATALOG_PUBLISHED = 1866; + public static CFH_RESULT_MESSAGE = 3635; + public static CLIENT_LATENCY = 10; + public static CLIENT_PING = 3928; + public static DESKTOP_CAMPAIGN = 1745; + public static DESKTOP_NEWS = 286; + public static DESKTOP_VIEW = 122; + public static BUNDLE_DISCOUNT_RULESET = 2347; + public static FIRST_LOGIN_OF_DAY = 793; + public static FURNITURE_ALIASES = 1723; + public static FURNITURE_DATA = 2547; + public static FURNITURE_FLOOR = 1778; + public static FURNITURE_FLOOR_ADD = 1534; + public static FURNITURE_FLOOR_REMOVE = 2703; + public static FURNITURE_FLOOR_UPDATE = 3776; + public static FURNITURE_ITEMDATA = 2202; + public static FURNITURE_STATE = 2376; public static FURNITURE_GROUP_CONTEXT_MENU_INFO = 3293; public static FURNITURE_POSTIT_STICKY_POLE_OPEN = 2366; - public static GAME_CENTER_ACHIEVEMENTS = 2265; - public static GAME_CENTER_GAME_LIST = 222; - public static GAME_CENTER_STATUS = 2893; - public static GENERIC_ALERT = 3801; - public static MODERATOR_MESSAGE = 2030; - public static GENERIC_ERROR = 1600; - public static GIFT_WRAPPER_CONFIG = 2234; - public static GROUP_BADGES = 2402; - public static GROUP_CREATE_OPTIONS = 2159; - public static GROUP_FORUM_INFO = 3011; - public static GROUP_FORUM_LIST = 3001; - public static GROUP_FORUM_THREADS = 1073; - public static GROUP_INFO = 1702; - public static GROUP_LIST = 420; - public static GROUP_MEMBER = 265; - public static GROUP_MEMBERS = 1200; - public static GROUP_MEMBERS_REFRESH = 2445; - public static GROUP_MEMBER_REMOVE_CONFIRM = 1876; - public static GROUP_PURCHASED = 2808; - public static GROUP_SETTINGS = 3965; - public static GROUP_BADGE_PARTS = 2238; - public static ITEM_DIMMER_SETTINGS = 2710; - public static ITEM_STACK_HELPER = 2816; - public static ITEM_WALL = 1369; - public static ITEM_WALL_ADD = 2187; - public static ITEM_WALL_REMOVE = 3208; - public static ITEM_WALL_UPDATE = 2009; - public static LOAD_GAME_URL = 2624; - public static MARKETPLACE_CONFIG = 1823; - public static MESSENGER_ACCEPT_FRIENDS = 896; - public static MESSENGER_CHAT = 1587; - public static MESSENGER_FIND_FRIENDS = 1210; - public static MESSENGER_FOLLOW_FAILED = 3048; - public static MESSENGER_FRIEND_NOTIFICATION = 3082; - public static MESSENGER_FRIENDS = 3130; - public static MESSENGER_INIT = 1605; + public static GAME_CENTER_ACHIEVEMENTS = 2265; + public static GAME_CENTER_GAME_LIST = 222; + public static GAME_CENTER_STATUS = 2893; + public static GENERIC_ALERT = 3801; + public static MODERATOR_MESSAGE = 2030; + public static GENERIC_ERROR = 1600; + public static GIFT_WRAPPER_CONFIG = 2234; + public static GROUP_BADGES = 2402; + public static GROUP_CREATE_OPTIONS = 2159; + public static GROUP_FORUM_INFO = 3011; + public static GROUP_FORUM_LIST = 3001; + public static GROUP_FORUM_THREADS = 1073; + public static GROUP_INFO = 1702; + public static GROUP_LIST = 420; + public static GROUP_MEMBER = 265; + public static GROUP_MEMBERS = 1200; + public static GROUP_MEMBERS_REFRESH = 2445; + public static GROUP_MEMBER_REMOVE_CONFIRM = 1876; + public static GROUP_PURCHASED = 2808; + public static GROUP_SETTINGS = 3965; + public static GROUP_BADGE_PARTS = 2238; + public static ITEM_DIMMER_SETTINGS = 2710; + public static ITEM_STACK_HELPER = 2816; + public static ITEM_WALL = 1369; + public static ITEM_WALL_ADD = 2187; + public static ITEM_WALL_REMOVE = 3208; + public static ITEM_WALL_UPDATE = 2009; + public static LOAD_GAME_URL = 2624; + public static MARKETPLACE_CONFIG = 1823; + public static MESSENGER_ACCEPT_FRIENDS = 896; + public static MESSENGER_CHAT = 1587; + public static MESSENGER_FIND_FRIENDS = 1210; + public static MESSENGER_FOLLOW_FAILED = 3048; + public static MESSENGER_FRIEND_NOTIFICATION = 3082; + public static MESSENGER_FRIENDS = 3130; + public static MESSENGER_INIT = 1605; public static MESSENGER_INSTANCE_MESSAGE_ERROR = 3359; - public static MESSENGER_INVITE = 3870; - public static MESSENGER_INVITE_ERROR = 462; - public static MESSENGER_MESSAGE_ERROR = 892; - public static MESSENGER_MINIMAIL_COUNT = 2803; - public static MESSENGER_MINIMAIL_NEW = 1911; - public static MESSENGER_RELATIONSHIPS = 2016; - public static MESSENGER_REQUEST = 2219; - public static MESSENGER_REQUEST_ERROR = 892; - public static MESSENGER_REQUESTS = 280; - public static MESSENGER_ROOM_INVITE = 3870; - public static MESSENGER_SEARCH = 973; - public static MESSENGER_UPDATE = 2800; - public static MODERATION_REPORT_DISABLED = 1651; - public static MODERATION_TOOL = 2696; - public static MODERATION_USER_INFO = 2866; - public static MOTD_MESSAGES = 2035; - public static NAVIGATOR_CATEGORIES = 1562; - public static NAVIGATOR_COLLAPSED = 1543; - public static NAVIGATOR_EVENT_CATEGORIES = 3244; - public static NAVIGATOR_LIFTED = 3104; - public static NAVIGATOR_METADATA = 3052; - public static NAVIGATOR_OPEN_ROOM_CREATOR = 2064; - public static NAVIGATOR_SEARCH = 2690; - public static NAVIGATOR_SEARCHES = 3984; - public static NAVIGATOR_SETTINGS = 518; - public static NOTIFICATION_LIST = 1992; - public static PET_FIGURE_UPDATE = 1924; - public static PET_INFO = 2901; - public static RECYCLER_PRIZES = 3164; - public static ROOM_BAN_LIST = 1869; - public static ROOM_BAN_REMOVE = 3429; - public static ROOM_CREATED = 1304; - public static ROOM_DOORBELL = 2309; - public static ROOM_DOORBELL_ACCEPTED = 3783; - public static ROOM_DOORBELL_REJECTED = 878; - public static ROOM_ENTER = 758; - public static ROOM_ENTER_ERROR = 899; - public static ROOM_FORWARD = 160; - public static ROOM_HEIGHT_MAP = 2753; - public static ROOM_HEIGHT_MAP_UPDATE = 558; - public static ROOM_INFO = 687; - public static ROOM_INFO_OWNER = 749; - public static ROOM_MODEL = 1301; - public static ROOM_MODEL_BLOCKED_TILES = 3990; - public static ROOM_MODEL_DOOR = 1664; - public static ROOM_MODEL_NAME = 2031; - public static ROOM_MUTED = 2533; - public static ROOM_MUTE_USER = 826; - public static ROOM_PAINT = 2454; - public static ROOM_PROMOTION = 2274; - public static ROOM_QUEUE_STATUS = 2208; - public static ROOM_RIGHTS = 780; - public static ROOM_RIGHTS_CLEAR = 2392; - public static ROOM_RIGHTS_LIST = 1284; - public static ROOM_RIGHTS_LIST_ADD = 2088; - public static ROOM_RIGHTS_LIST_REMOVE = 1327; - public static ROOM_RIGHTS_OWNER = 339; - public static ROOM_ROLLING = 3207; - public static ROOM_SCORE = 482; - public static ROOM_SETTINGS = 1498; - public static ROOM_SETTINGS_CHAT = 1191; - public static ROOM_SETTINGS_SAVE = 948; - public static ROOM_SETTINGS_SAVE_ERROR = 1555; - public static ROOM_SETTINGS_UPDATED = 3297; - public static ROOM_SPECTATOR = 1033; - public static ROOM_THICKNESS = 3547; - public static INFO_FEED_ENABLE = 3284; - public static SECURITY_MACHINE = 1488; - public static MYSTERY_BOX_KEYS = 2833; - public static TRADE_ACCEPTED = 2568; - public static TRADE_CLOSED = 1373; - public static TRADE_COMPLETED = 1001; - public static TRADE_CONFIRMATION = 2720; - public static TRADE_LIST_ITEM = 2024; - public static TRADE_NOT_OPEN = 3128; - public static TRADE_OPEN = 2505; - public static TRADE_OPEN_FAILED = 217; - public static TRADE_OTHER_NOT_ALLOWED = 2154; - public static TRADE_YOU_NOT_ALLOWED = 3058; - public static UNIT = 374; - public static UNIT_CHANGE_NAME = 2182; - public static UNIT_CHAT = 1446; - public static UNIT_CHAT_SHOUT = 1036; - public static UNIT_CHAT_WHISPER = 2704; - public static UNIT_DANCE = 2233; - public static UNIT_EFFECT = 1167; - public static UNIT_EXPRESSION = 1631; - public static UNIT_HAND_ITEM = 1474; - public static UNIT_IDLE = 1797; - public static UNIT_INFO = 3920; - public static UNIT_NUMBER = 2324; - public static UNIT_REMOVE = 2661; - public static UNIT_STATUS = 1640; - public static UNIT_TYPING = 1717; - public static UNSEEN_ITEMS = 2103; - public static USER_ACHIEVEMENT_SCORE = 1968; - public static USER_BADGES = 717; - public static USER_BADGES_ADD = 2493; - public static USER_BADGES_CURRENT = 1087; - public static USER_BOT_REMOVE = 233; - public static USER_BOTS = 3086; - public static USER_CHANGE_NAME = 118; - public static USER_CLOTHING = 1450; - public static USER_CREDITS = 3475; - public static USER_CURRENCY = 2018; - public static ACTIVITY_POINT_NOTIFICATION = 2275; - public static USER_EFFECTS = 340; - public static USER_FAVORITE_ROOM = 2524; - public static USER_FAVORITE_ROOM_COUNT = 151; - public static USER_FIGURE = 2429; - public static USER_FURNITURE = 994; - public static USER_FURNITURE_ADD = 104; - public static USER_FURNITURE_POSTIT_PLACED = 1501; - public static USER_FURNITURE_REFRESH = 3151; - public static USER_FURNITURE_REMOVE = 159; - public static USER_HOME_ROOM = 2875; - public static USER_IGNORED = 126; - public static USER_IGNORED_RESULT = 207; - public static USER_INFO = 2725; - public static USER_OUTFITS = 3315; - public static USER_PERKS = 2586; - public static USER_PERMISSIONS = 411; - public static USER_PET_ADD = 2101; - public static USER_PET_REMOVE = 3253; - public static USER_PETS = 3522; - public static USER_PROFILE = 3898; - public static USER_RESPECT = 2815; - public static USER_SANCTION_STATUS = 3679; - public static USER_SETTINGS = 513; - public static USER_SUBSCRIPTION = 954; - public static USER_WARDROBE_PAGE = 3315; - public static WIRED_ACTION = 1434; - public static WIRED_CONDITION = 1108; - public static WIRED_ERROR = 156; - public static WIRED_OPEN = 1830; - public static WIRED_REWARD = 178; - public static WIRED_SAVE = 1155; - public static WIRED_TRIGGER = 383; - public static PLAYING_GAME = 448; - public static FURNITURE_STATE_2 = 3431; - public static REMOVE_BOT_FROM_INVENTORY = 233; - public static ADD_BOT_TO_INVENTORY = 1352; - public static ACHIEVEMENT_PROGRESSED = 2107; - public static MODTOOL_ROOM_INFO = 1333; - public static MODTOOL_USER_CHATLOG = 3377; - public static MODTOOL_ROOM_CHATLOG = 3434; - public static MODTOOL_VISITED_ROOMS_USER = 1752; - public static MODERATOR_ACTION_RESULT = 2335; - public static ISSUE_DELETED = 3192; - public static ISSUE_INFO = 3609; - public static ISSUE_PICK_FAILED = 3150; - public static CFH_CHATLOG = 607; - public static MODERATOR_TOOL_PREFERENCES = 1576; - public static LOVELOCK_FURNI_START = 3753; - public static LOVELOCK_FURNI_FRIEND_COMFIRMED = 382; - public static LOVELOCK_FURNI_FINISHED = 770; - public static GIFT_RECEIVER_NOT_FOUND = 1517; - public static GIFT_OPENED = 56; - public static FLOOD_CONTROL = 566; - public static REMAINING_MUTE = 826; - public static USER_EFFECT_LIST = 340; - public static USER_EFFECT_LIST_ADD = 2867; - public static USER_EFFECT_LIST_REMOVE = 2228; - public static USER_EFFECT_ACTIVATE = 1959; - public static CLUB_GIFT_INFO = 619; - public static REDEEM_VOUCHER_ERROR = 714; - public static REDEEM_VOUCHER_OK = 3336; - public static IN_CLIENT_LINK = 2023; - public static BOT_COMMAND_CONFIGURATION = 1618; - public static HAND_ITEM_RECEIVED = 354; - public static PET_PLACING_ERROR = 2913; - public static BOT_ERROR = 639; - public static MARKETPLACE_SELL_ITEM = 54; - public static MARKETPLACE_ITEM_STATS = 725; - public static MARKETPLACE_OWN_ITEMS = 3884; - public static MARKETPLACE_CANCEL_SALE = 3264; - public static MARKETPLACE_ITEM_POSTED = 1359; - public static MARKETPLACE_ITEMS_SEARCHED = 680; - public static MARKETPLACE_AFTER_ORDER_STATUS = 2032; - public static CATALOG_RECEIVE_PET_BREEDS = 3331; - public static CATALOG_APPROVE_NAME_RESULT = 1503; - public static OBJECTS_DATA_UPDATE = 1453; - public static PET_EXPERIENCE = 2156; - public static COMMUNITY_GOAL_VOTE_EVENT = 1435; - public static PROMO_ARTICLES = 286; - public static COMMUNITY_GOAL_EARNED_PRIZES = 3319; - public static COMMUNITY_GOAL_PROGRESS = 2525; - public static CONCURRENT_USERS_GOAL_PROGRESS = 2737; - public static QUEST_DAILY = 1878; - public static QUEST_CANCELLED = 3027; - public static QUEST_COMPLETED = 949; - public static COMMUNITY_GOAL_HALL_OF_FAME = 3005; - public static EPIC_POPUP = 3945; - public static SEASONAL_QUESTS = 1122; - public static QUESTS = 3625; - public static QUEST = 230; - public static BONUS_RARE_INFO = 1533; - public static CRAFTABLE_PRODUCTS = 1000; - public static CRAFTING_RECIPE = 2774; - public static CRAFTING_RECIPES_AVAILABLE = 2124; - public static CRAFTING_RESULT = 618; - public static CAMERA_PUBLISH_STATUS = 2057; - public static CAMERA_PURCHASE_OK = 2783; - public static CAMERA_STORAGE_URL = 3696; - public static COMPETITION_STATUS = 133; - public static INIT_CAMERA = 3878; - public static THUMBNAIL_STATUS = 3595; - public static ACHIEVEMENT_NOTIFICATION = 806; - public static CLUB_GIFT_NOTIFICATION = 2188; - public static INTERSTITIAL_MESSAGE = 1808; - public static ROOM_AD_ERROR = 1759; - public static AVAILABILITY_TIME = 600; - public static HOTEL_CLOSED_AND_OPENS = 3728; - public static HOTEL_CLOSES_AND_OPENS_AT = 2771; - public static HOTEL_WILL_CLOSE_MINUTES = 1050; - public static HOTEL_MAINTENANCE = 1350; - public static JUKEBOX_PLAYLIST_FULL = 105; - public static JUKEBOX_SONG_DISKS = 34; - public static NOW_PLAYING = 469; - public static OFFICIAL_SONG_ID = 1381; - public static PLAYLIST = 1748; - public static PLAYLIST_SONG_ADDED = 1140; - public static TRAX_SONG_INFO = 3365; - public static USER_SONG_DISKS_INVENTORY = 2602; - public static CHECK_USER_NAME = 563; - public static CFH_SANCTION = 2782; - public static CFH_TOPICS = 325; - public static CFH_SANCTION_STATUS = 2221; - public static CAMPAIGN_CALENDAR_DATA = 2531; - public static CAMPAIGN_CALENDAR_DOOR_OPENED = 2551; - public static BUILDERS_CLUB_FURNI_COUNT = 3828; - public static BUILDERS_CLUB_SUBSCRIPTION = 1452; - public static CATALOG_PAGE_EXPIRATION = 2668; - public static CATALOG_EARLIEST_EXPIRY = 2515; - public static CLUB_GIFT_SELECTED = 659; - public static TARGET_OFFER_NOT_FOUND = 1237; - public static TARGET_OFFER = 119; - public static DIRECT_SMS_CLUB_BUY = 195; - public static ROOM_AD_PURCHASE = 2468; - public static NOT_ENOUGH_BALANCE = 3914; - public static LIMITED_OFFER_APPEARING_NEXT = 44; - public static IS_OFFER_GIFTABLE = 761; - public static CLUB_EXTENDED_OFFER = 3964; - public static SEASONAL_CALENDAR_OFFER = 1889; - public static COMPETITION_ENTRY_SUBMIT = 1177; - public static COMPETITION_VOTING_INFO = 3506; - public static COMPETITION_TIMING_CODE = 1745; - public static COMPETITION_USER_PART_OF = 3841; - public static COMPETITION_NO_OWNED_ROOMS = 2064; - public static COMPETITION_SECONDS_UNTIL = 3926; - public static BADGE_POINT_LIMITS = 2501; - public static BADGE_REQUEST_FULFILLED = 2998; - public static HELPER_TALENT_TRACK = 3406; - public static USER_BANNED = 1683; - public static BOT_RECEIVED = 3684; - public static PET_LEVEL_NOTIFICATION = 859; - public static PET_RECEIVED = 1111; - public static MODERATION_CAUTION = 1890; - public static YOUTUBE_CONTROL_VIDEO = 1554; - public static YOUTUBE_DISPLAY_PLAYLISTS = 1112; - public static YOUTUBE_DISPLAY_VIDEO = 1411; - public static CFH_DISABLED_NOTIFY = 1651; - public static QUESTION = 2665; - public static POLL_CONTENTS = 2997; - public static POLL_ERROR = 662; - public static POLL_OFFER = 3785; - public static QUESTION_ANSWERED = 2589; - public static QUESTION_FINISHED = 1066; - public static CFH_PENDING_CALLS = 1121; - public static GUIDE_ON_DUTY_STATUS = 1548; - public static GUIDE_SESSION_ATTACHED = 1591; - public static GUIDE_SESSION_DETACHED = 138; - public static GUIDE_SESSION_ENDED = 1456; - public static GUIDE_SESSION_ERROR = 673; + public static MESSENGER_INVITE = 3870; + public static MESSENGER_INVITE_ERROR = 462; + public static MESSENGER_MESSAGE_ERROR = 892; + public static MESSENGER_MINIMAIL_COUNT = 2803; + public static MESSENGER_MINIMAIL_NEW = 1911; + public static MESSENGER_RELATIONSHIPS = 2016; + public static MESSENGER_REQUEST = 2219; + public static MESSENGER_REQUEST_ERROR = 892; + public static MESSENGER_REQUESTS = 280; + public static MESSENGER_ROOM_INVITE = 3870; + public static MESSENGER_SEARCH = 973; + public static MESSENGER_UPDATE = 2800; + public static MODERATION_REPORT_DISABLED = 1651; + public static MODERATION_TOOL = 2696; + public static MODERATION_USER_INFO = 2866; + public static MOTD_MESSAGES = 2035; + public static NAVIGATOR_CATEGORIES = 1562; + public static NAVIGATOR_COLLAPSED = 1543; + public static NAVIGATOR_EVENT_CATEGORIES = 3244; + public static NAVIGATOR_LIFTED = 3104; + public static NAVIGATOR_METADATA = 3052; + public static NAVIGATOR_OPEN_ROOM_CREATOR = 2064; + public static NAVIGATOR_SEARCH = 2690; + public static NAVIGATOR_SEARCHES = 3984; + public static NAVIGATOR_SETTINGS = 518; + public static NOTIFICATION_LIST = 1992; + public static PET_FIGURE_UPDATE = 1924; + public static PET_INFO = 2901; + public static RECYCLER_PRIZES = 3164; + public static ROOM_BAN_LIST = 1869; + public static ROOM_BAN_REMOVE = 3429; + public static ROOM_CREATED = 1304; + public static ROOM_DOORBELL = 2309; + public static ROOM_DOORBELL_ACCEPTED = 3783; + public static ROOM_DOORBELL_REJECTED = 878; + public static ROOM_ENTER = 758; + public static ROOM_ENTER_ERROR = 899; + public static ROOM_FORWARD = 160; + public static ROOM_HEIGHT_MAP = 2753; + public static ROOM_HEIGHT_MAP_UPDATE = 558; + public static ROOM_INFO = 687; + public static ROOM_INFO_OWNER = 749; + public static ROOM_MODEL = 1301; + public static ROOM_MODEL_BLOCKED_TILES = 3990; + public static ROOM_MODEL_DOOR = 1664; + public static ROOM_MODEL_NAME = 2031; + public static ROOM_MUTED = 2533; + public static ROOM_MUTE_USER = 826; + public static ROOM_PAINT = 2454; + public static ROOM_PROMOTION = 2274; + public static ROOM_QUEUE_STATUS = 2208; + public static ROOM_RIGHTS = 780; + public static ROOM_RIGHTS_CLEAR = 2392; + public static ROOM_RIGHTS_LIST = 1284; + public static ROOM_RIGHTS_LIST_ADD = 2088; + public static ROOM_RIGHTS_LIST_REMOVE = 1327; + public static ROOM_RIGHTS_OWNER = 339; + public static ROOM_ROLLING = 3207; + public static ROOM_SCORE = 482; + public static ROOM_SETTINGS = 1498; + public static ROOM_SETTINGS_CHAT = 1191; + public static ROOM_SETTINGS_SAVE = 948; + public static ROOM_SETTINGS_SAVE_ERROR = 1555; + public static ROOM_SETTINGS_UPDATED = 3297; + public static ROOM_SPECTATOR = 1033; + public static ROOM_THICKNESS = 3547; + public static INFO_FEED_ENABLE = 3284; + public static SECURITY_MACHINE = 1488; + public static MYSTERY_BOX_KEYS = 2833; + public static TRADE_ACCEPTED = 2568; + public static TRADE_CLOSED = 1373; + public static TRADE_COMPLETED = 1001; + public static TRADE_CONFIRMATION = 2720; + public static TRADE_LIST_ITEM = 2024; + public static TRADE_NOT_OPEN = 3128; + public static TRADE_OPEN = 2505; + public static TRADE_OPEN_FAILED = 217; + public static TRADE_OTHER_NOT_ALLOWED = 2154; + public static TRADE_YOU_NOT_ALLOWED = 3058; + public static UNIT = 374; + public static UNIT_CHANGE_NAME = 2182; + public static UNIT_CHAT = 1446; + public static UNIT_CHAT_SHOUT = 1036; + public static UNIT_CHAT_WHISPER = 2704; + public static UNIT_DANCE = 2233; + public static UNIT_EFFECT = 1167; + public static UNIT_EXPRESSION = 1631; + public static UNIT_HAND_ITEM = 1474; + public static UNIT_IDLE = 1797; + public static UNIT_INFO = 3920; + public static UNIT_NUMBER = 2324; + public static UNIT_REMOVE = 2661; + public static UNIT_STATUS = 1640; + public static UNIT_TYPING = 1717; + public static UNSEEN_ITEMS = 2103; + public static USER_ACHIEVEMENT_SCORE = 1968; + public static USER_BADGES = 717; + public static USER_BADGES_ADD = 2493; + public static USER_BADGES_CURRENT = 1087; + public static USER_BOT_REMOVE = 233; + public static USER_BOTS = 3086; + public static USER_CHANGE_NAME = 118; + public static USER_CLOTHING = 1450; + public static USER_CREDITS = 3475; + public static USER_CURRENCY = 2018; + public static ACTIVITY_POINT_NOTIFICATION = 2275; + public static USER_EFFECTS = 340; + public static USER_FAVORITE_ROOM = 2524; + public static USER_FAVORITE_ROOM_COUNT = 151; + public static USER_FIGURE = 2429; + public static USER_FURNITURE = 994; + public static USER_FURNITURE_ADD = 104; + public static USER_FURNITURE_POSTIT_PLACED = 1501; + public static USER_FURNITURE_REFRESH = 3151; + public static USER_FURNITURE_REMOVE = 159; + public static USER_HOME_ROOM = 2875; + public static USER_IGNORED = 126; + public static USER_IGNORED_RESULT = 207; + public static USER_INFO = 2725; + public static USER_OUTFITS = 3315; + public static USER_PERKS = 2586; + public static USER_PERMISSIONS = 411; + public static USER_PET_ADD = 2101; + public static USER_PET_REMOVE = 3253; + public static USER_PETS = 3522; + public static USER_PROFILE = 3898; + public static USER_RESPECT = 2815; + public static USER_SANCTION_STATUS = 3679; + public static USER_SETTINGS = 513; + public static USER_SUBSCRIPTION = 954; + public static USER_WARDROBE_PAGE = 3315; + public static WIRED_ACTION = 1434; + public static WIRED_CONDITION = 1108; + public static WIRED_ERROR = 156; + public static WIRED_OPEN = 1830; + public static WIRED_REWARD = 178; + public static WIRED_SAVE = 1155; + public static WIRED_TRIGGER = 383; + public static PLAYING_GAME = 448; + public static FURNITURE_STATE_2 = 3431; + public static REMOVE_BOT_FROM_INVENTORY = 233; + public static ADD_BOT_TO_INVENTORY = 1352; + public static ACHIEVEMENT_PROGRESSED = 2107; + public static MODTOOL_ROOM_INFO = 1333; + public static MODTOOL_USER_CHATLOG = 3377; + public static MODTOOL_ROOM_CHATLOG = 3434; + public static MODTOOL_VISITED_ROOMS_USER = 1752; + public static MODERATOR_ACTION_RESULT = 2335; + public static ISSUE_DELETED = 3192; + public static ISSUE_INFO = 3609; + public static ISSUE_PICK_FAILED = 3150; + public static CFH_CHATLOG = 607; + public static MODERATOR_TOOL_PREFERENCES = 1576; + public static LOVELOCK_FURNI_START = 3753; + public static LOVELOCK_FURNI_FRIEND_COMFIRMED = 382; + public static LOVELOCK_FURNI_FINISHED = 770; + public static GIFT_RECEIVER_NOT_FOUND = 1517; + public static GIFT_OPENED = 56; + public static FLOOD_CONTROL = 566; + public static REMAINING_MUTE = 826; + public static USER_EFFECT_LIST = 340; + public static USER_EFFECT_LIST_ADD = 2867; + public static USER_EFFECT_LIST_REMOVE = 2228; + public static USER_EFFECT_ACTIVATE = 1959; + public static CLUB_GIFT_INFO = 619; + public static REDEEM_VOUCHER_ERROR = 714; + public static REDEEM_VOUCHER_OK = 3336; + public static IN_CLIENT_LINK = 2023; + public static BOT_COMMAND_CONFIGURATION = 1618; + public static HAND_ITEM_RECEIVED = 354; + public static PET_PLACING_ERROR = 2913; + public static BOT_ERROR = 639; + public static MARKETPLACE_SELL_ITEM = 54; + public static MARKETPLACE_ITEM_STATS = 725; + public static MARKETPLACE_OWN_ITEMS = 3884; + public static MARKETPLACE_CANCEL_SALE = 3264; + public static MARKETPLACE_ITEM_POSTED = 1359; + public static MARKETPLACE_ITEMS_SEARCHED = 680; + public static MARKETPLACE_AFTER_ORDER_STATUS = 2032; + public static CATALOG_RECEIVE_PET_BREEDS = 3331; + public static CATALOG_APPROVE_NAME_RESULT = 1503; + public static OBJECTS_DATA_UPDATE = 1453; + public static PET_EXPERIENCE = 2156; + public static COMMUNITY_GOAL_VOTE_EVENT = 1435; + public static PROMO_ARTICLES = 286; + public static COMMUNITY_GOAL_EARNED_PRIZES = 3319; + public static COMMUNITY_GOAL_PROGRESS = 2525; + public static CONCURRENT_USERS_GOAL_PROGRESS = 2737; + public static QUEST_DAILY = 1878; + public static QUEST_CANCELLED = 3027; + public static QUEST_COMPLETED = 949; + public static COMMUNITY_GOAL_HALL_OF_FAME = 3005; + public static EPIC_POPUP = 3945; + public static SEASONAL_QUESTS = 1122; + public static QUESTS = 3625; + public static QUEST = 230; + public static BONUS_RARE_INFO = 1533; + public static CRAFTABLE_PRODUCTS = 1000; + public static CRAFTING_RECIPE = 2774; + public static CRAFTING_RECIPES_AVAILABLE = 2124; + public static CRAFTING_RESULT = 618; + public static CAMERA_PUBLISH_STATUS = 2057; + public static CAMERA_PURCHASE_OK = 2783; + public static CAMERA_STORAGE_URL = 3696; + public static COMPETITION_STATUS = 133; + public static INIT_CAMERA = 3878; + public static THUMBNAIL_STATUS = 3595; + public static ACHIEVEMENT_NOTIFICATION = 806; + public static CLUB_GIFT_NOTIFICATION = 2188; + public static INTERSTITIAL_MESSAGE = 1808; + public static ROOM_AD_ERROR = 1759; + public static AVAILABILITY_TIME = 600; + public static HOTEL_CLOSED_AND_OPENS = 3728; + public static HOTEL_CLOSES_AND_OPENS_AT = 2771; + public static HOTEL_WILL_CLOSE_MINUTES = 1050; + public static HOTEL_MAINTENANCE = 1350; + public static JUKEBOX_PLAYLIST_FULL = 105; + public static JUKEBOX_SONG_DISKS = 34; + public static NOW_PLAYING = 469; + public static OFFICIAL_SONG_ID = 1381; + public static PLAYLIST = 1748; + public static PLAYLIST_SONG_ADDED = 1140; + public static TRAX_SONG_INFO = 3365; + public static USER_SONG_DISKS_INVENTORY = 2602; + public static CHECK_USER_NAME = 563; + public static CFH_SANCTION = 2782; + public static CFH_TOPICS = 325; + public static CFH_SANCTION_STATUS = 2221; + public static CAMPAIGN_CALENDAR_DATA = 2531; + public static CAMPAIGN_CALENDAR_DOOR_OPENED = 2551; + public static BUILDERS_CLUB_FURNI_COUNT = 3828; + public static BUILDERS_CLUB_SUBSCRIPTION = 1452; + public static CATALOG_PAGE_EXPIRATION = 2668; + public static CATALOG_EARLIEST_EXPIRY = 2515; + public static CLUB_GIFT_SELECTED = 659; + public static TARGET_OFFER_NOT_FOUND = 1237; + public static TARGET_OFFER = 119; + public static DIRECT_SMS_CLUB_BUY = 195; + public static ROOM_AD_PURCHASE = 2468; + public static NOT_ENOUGH_BALANCE = 3914; + public static LIMITED_OFFER_APPEARING_NEXT = 44; + public static IS_OFFER_GIFTABLE = 761; + public static CLUB_EXTENDED_OFFER = 3964; + public static SEASONAL_CALENDAR_OFFER = 1889; + public static COMPETITION_ENTRY_SUBMIT = 1177; + public static COMPETITION_VOTING_INFO = 3506; + public static COMPETITION_TIMING_CODE = 1745; + public static COMPETITION_USER_PART_OF = 3841; + public static COMPETITION_NO_OWNED_ROOMS = 2064; + public static COMPETITION_SECONDS_UNTIL = 3926; + public static BADGE_POINT_LIMITS = 2501; + public static BADGE_REQUEST_FULFILLED = 2998; + public static HELPER_TALENT_TRACK = 3406; + public static USER_BANNED = 1683; + public static BOT_RECEIVED = 3684; + public static PET_LEVEL_NOTIFICATION = 859; + public static PET_RECEIVED = 1111; + public static MODERATION_CAUTION = 1890; + public static YOUTUBE_CONTROL_VIDEO = 1554; + public static YOUTUBE_DISPLAY_PLAYLISTS = 1112; + public static YOUTUBE_DISPLAY_VIDEO = 1411; + public static CFH_DISABLED_NOTIFY = 1651; + public static QUESTION = 2665; + public static POLL_CONTENTS = 2997; + public static POLL_ERROR = 662; + public static POLL_OFFER = 3785; + public static QUESTION_ANSWERED = 2589; + public static QUESTION_FINISHED = 1066; + public static CFH_PENDING_CALLS = 1121; + public static GUIDE_ON_DUTY_STATUS = 1548; + public static GUIDE_SESSION_ATTACHED = 1591; + public static GUIDE_SESSION_DETACHED = 138; + public static GUIDE_SESSION_ENDED = 1456; + public static GUIDE_SESSION_ERROR = 673; public static GUIDE_SESSION_INVITED_TO_GUIDE_ROOM = 219; - public static GUIDE_SESSION_MESSAGE = 841; - public static GUIDE_SESSION_PARTNER_IS_TYPING = 1016; - public static GUIDE_SESSION_REQUESTER_ROOM = 1847; - public static GUIDE_SESSION_STARTED = 3209; - public static GUIDE_TICKET_CREATION_RESULT = 3285; - public static GUIDE_TICKET_RESOLUTION = 2674; - public static GUIDE_REPORTING_STATUS = 3463; - public static HOTEL_MERGE_NAME_CHANGE = 1663; - public static ISSUE_CLOSE_NOTIFICATION = 934; - public static QUIZ_DATA = 2927; - public static QUIZ_RESULTS = 2772; - public static CFH_PENDING_CALLS_DELETED = 77; - public static CFH_REPLY = 3796; - public static CHAT_REVIEW_SESSION_DETACHED = 30; + public static GUIDE_SESSION_MESSAGE = 841; + public static GUIDE_SESSION_PARTNER_IS_TYPING = 1016; + public static GUIDE_SESSION_REQUESTER_ROOM = 1847; + public static GUIDE_SESSION_STARTED = 3209; + public static GUIDE_TICKET_CREATION_RESULT = 3285; + public static GUIDE_TICKET_RESOLUTION = 2674; + public static GUIDE_REPORTING_STATUS = 3463; + public static HOTEL_MERGE_NAME_CHANGE = 1663; + public static ISSUE_CLOSE_NOTIFICATION = 934; + public static QUIZ_DATA = 2927; + public static QUIZ_RESULTS = 2772; + public static CFH_PENDING_CALLS_DELETED = 77; + public static CFH_REPLY = 3796; + public static CHAT_REVIEW_SESSION_DETACHED = 30; public static CHAT_REVIEW_SESSION_OFFERED_TO_GUIDE = 735; - public static CHAT_REVIEW_SESSION_RESULTS = 3276; - public static CHAT_REVIEW_SESSION_STARTED = 143; + public static CHAT_REVIEW_SESSION_RESULTS = 3276; + public static CHAT_REVIEW_SESSION_STARTED = 143; public static CHAT_REVIEW_SESSION_VOTING_STATUS = 1829; - public static SCR_SEND_KICKBACK_INFO = 3277; - public static PET_STATUS = 1907; - public static GROUP_DEACTIVATE = 3129; + public static SCR_SEND_KICKBACK_INFO = 3277; + public static PET_STATUS = 1907; + public static GROUP_DEACTIVATE = 3129; } diff --git a/src/nitro/communication/messages/incoming/catalog/CatalogPageMessageOfferData.ts b/src/nitro/communication/messages/incoming/catalog/CatalogPageMessageOfferData.ts index 91a068a0..e9cfd384 100644 --- a/src/nitro/communication/messages/incoming/catalog/CatalogPageMessageOfferData.ts +++ b/src/nitro/communication/messages/incoming/catalog/CatalogPageMessageOfferData.ts @@ -18,13 +18,13 @@ export class CatalogPageMessageOfferData constructor(wrapper: IMessageDataWrapper) { - this._offerId = wrapper.readInt(); - this._localizationId = wrapper.readString(); - this._rent = wrapper.readBoolean(); - this._priceCredits = wrapper.readInt(); - this._priceActivityPoints = wrapper.readInt(); - this._priceActivityPointsType = wrapper.readInt(); - this._giftable = wrapper.readBoolean(); + this._offerId = wrapper.readInt(); + this._localizationId = wrapper.readString(); + this._rent = wrapper.readBoolean(); + this._priceCredits = wrapper.readInt(); + this._priceActivityPoints = wrapper.readInt(); + this._priceActivityPointsType = wrapper.readInt(); + this._giftable = wrapper.readBoolean(); this._products = []; @@ -37,10 +37,10 @@ export class CatalogPageMessageOfferData totalProducts--; } - this._clubLevel = wrapper.readInt(); + this._clubLevel = wrapper.readInt(); this._bundlePurchaseAllowed = wrapper.readBoolean(); - this._isPet = wrapper.readBoolean(); - this._previewImage = wrapper.readString(); + this._isPet = wrapper.readBoolean(); + this._previewImage = wrapper.readString(); } public get offerId(): number diff --git a/src/nitro/communication/messages/incoming/catalog/CatalogPageMessageProductData.ts b/src/nitro/communication/messages/incoming/catalog/CatalogPageMessageProductData.ts index 4ed9bf3d..d73bb05f 100644 --- a/src/nitro/communication/messages/incoming/catalog/CatalogPageMessageProductData.ts +++ b/src/nitro/communication/messages/incoming/catalog/CatalogPageMessageProductData.ts @@ -25,13 +25,13 @@ export class CatalogPageMessageProductData public flush(): boolean { - this._productType = null; - this._furniClassId = -1; - this._extraParam = null; - this._productCount = 0; - this._uniqueLimitedItem = false; - this._uniqueLimitedItemSeriesSize = 0; - this._uniqueLimitedItemsLeft = 0; + this._productType = null; + this._furniClassId = -1; + this._extraParam = null; + this._productCount = 0; + this._uniqueLimitedItem = false; + this._uniqueLimitedItemSeriesSize = 0; + this._uniqueLimitedItemsLeft = 0; return true; } @@ -43,19 +43,19 @@ export class CatalogPageMessageProductData switch(this._productType) { case CatalogPageMessageProductData.B: - this._extraParam = wrapper.readString(); - this._productCount = 1; + this._extraParam = wrapper.readString(); + this._productCount = 1; return true; default: - this._furniClassId = wrapper.readInt(); - this._extraParam = wrapper.readString(); - this._productCount = wrapper.readInt(); + this._furniClassId = wrapper.readInt(); + this._extraParam = wrapper.readString(); + this._productCount = wrapper.readInt(); this._uniqueLimitedItem = wrapper.readBoolean(); if(this._uniqueLimitedItem) { - this._uniqueLimitedItemSeriesSize = wrapper.readInt(); - this._uniqueLimitedItemsLeft = wrapper.readInt(); + this._uniqueLimitedItemSeriesSize = wrapper.readInt(); + this._uniqueLimitedItemsLeft = wrapper.readInt(); } return true; } diff --git a/src/nitro/communication/messages/incoming/catalog/ClubOfferData.ts b/src/nitro/communication/messages/incoming/catalog/ClubOfferData.ts index 242827a3..7d03c67a 100644 --- a/src/nitro/communication/messages/incoming/catalog/ClubOfferData.ts +++ b/src/nitro/communication/messages/incoming/catalog/ClubOfferData.ts @@ -20,22 +20,22 @@ export class ClubOfferData { if(!wrapper) throw new Error('invalid_wrapper'); - this._offerId = wrapper.readInt(); - this._productCode = wrapper.readString(); + this._offerId = wrapper.readInt(); + this._productCode = wrapper.readString(); wrapper.readBoolean(); - this._priceCredits = wrapper.readInt(); - this._priceActivityPoints = wrapper.readInt(); - this._priceActivityPointsType = wrapper.readInt(); - this._vip = wrapper.readBoolean(); - this._months = wrapper.readInt(); - this._extraDays = wrapper.readInt(); - this._giftable = wrapper.readBoolean(); - this._daysLeftAfterPurchase = wrapper.readInt(); - this._year = wrapper.readInt(); - this._month = wrapper.readInt(); - this._day = wrapper.readInt(); + this._priceCredits = wrapper.readInt(); + this._priceActivityPoints = wrapper.readInt(); + this._priceActivityPointsType = wrapper.readInt(); + this._vip = wrapper.readBoolean(); + this._months = wrapper.readInt(); + this._extraDays = wrapper.readInt(); + this._giftable = wrapper.readBoolean(); + this._daysLeftAfterPurchase = wrapper.readInt(); + this._year = wrapper.readInt(); + this._month = wrapper.readInt(); + this._day = wrapper.readInt(); } public get offerId(): number diff --git a/src/nitro/communication/messages/incoming/catalog/FrontPageItem.ts b/src/nitro/communication/messages/incoming/catalog/FrontPageItem.ts index 845b1f6c..eb49cbf7 100644 --- a/src/nitro/communication/messages/incoming/catalog/FrontPageItem.ts +++ b/src/nitro/communication/messages/incoming/catalog/FrontPageItem.ts @@ -3,9 +3,9 @@ import { Nitro } from '../../../../Nitro'; export class FrontPageItem { - public static ITEM_CATALOGUE_PAGE: number = 0; - public static ITEM_PRODUCT_OFFER: number = 1; - public static ITEM_IAP: number = 2; + public static ITEM_CATALOGUE_PAGE: number = 0; + public static ITEM_PRODUCT_OFFER: number = 1; + public static ITEM_IAP: number = 2; private _type: number; private _position: number; @@ -26,14 +26,14 @@ export class FrontPageItem public flush(): boolean { - this._type = -1; - this._position = null; - this._itemName = null; - this._itemPromoImage = null; - this._catalogPageLocation = null; - this._productCode = null; - this._productOfferId = 0; - this._expirationTime = 0; + this._type = -1; + this._position = null; + this._itemName = null; + this._itemPromoImage = null; + this._catalogPageLocation = null; + this._productCode = null; + this._productOfferId = 0; + this._expirationTime = 0; return true; } @@ -42,10 +42,10 @@ export class FrontPageItem { if(!wrapper) return false; - this._position = wrapper.readInt(); - this._itemName = wrapper.readString(); - this._itemPromoImage = wrapper.readString(); - this._type = wrapper.readInt(); + this._position = wrapper.readInt(); + this._itemName = wrapper.readString(); + this._itemPromoImage = wrapper.readString(); + this._type = wrapper.readInt(); switch(this._type) { diff --git a/src/nitro/communication/messages/incoming/catalog/NodeData.ts b/src/nitro/communication/messages/incoming/catalog/NodeData.ts index 36fc634c..2baa88b8 100644 --- a/src/nitro/communication/messages/incoming/catalog/NodeData.ts +++ b/src/nitro/communication/messages/incoming/catalog/NodeData.ts @@ -20,13 +20,13 @@ export class NodeData public flush(): boolean { - this._visible = false; - this._icon = 0; - this._pageId = -1; - this._pageName = null; - this._localization = null; - this._children = []; - this._offerIds = []; + this._visible = false; + this._icon = 0; + this._pageId = -1; + this._pageName = null; + this._localization = null; + this._children = []; + this._offerIds = []; return true; } @@ -35,11 +35,11 @@ export class NodeData { if(!wrapper) return false; - this._visible = wrapper.readBoolean(); - this._icon = wrapper.readInt(); - this._pageId = wrapper.readInt(); - this._pageName = wrapper.readString(); - this._localization = wrapper.readString(); + this._visible = wrapper.readBoolean(); + this._icon = wrapper.readInt(); + this._pageId = wrapper.readInt(); + this._pageName = wrapper.readString(); + this._localization = wrapper.readString(); let totalOffers = wrapper.readInt(); diff --git a/src/nitro/communication/messages/incoming/catalog/PurchaseOKMessageOfferData.ts b/src/nitro/communication/messages/incoming/catalog/PurchaseOKMessageOfferData.ts index 6f6a72cf..fdbc6301 100644 --- a/src/nitro/communication/messages/incoming/catalog/PurchaseOKMessageOfferData.ts +++ b/src/nitro/communication/messages/incoming/catalog/PurchaseOKMessageOfferData.ts @@ -24,16 +24,16 @@ export class PurchaseOKMessageOfferData public flush(): boolean { - this._offerId = -1; - this._localizationId = null; - this._rent = false; - this._priceCredits = 0; - this._priceActivityPoints = 0; - this._priceActivityPointsType = 0; - this._clubLevel = 0; - this._giftable = false; - this._bundlePurchaseAllowed = false; - this._products = []; + this._offerId = -1; + this._localizationId = null; + this._rent = false; + this._priceCredits = 0; + this._priceActivityPoints = 0; + this._priceActivityPointsType = 0; + this._clubLevel = 0; + this._giftable = false; + this._bundlePurchaseAllowed = false; + this._products = []; return true; } @@ -42,13 +42,13 @@ export class PurchaseOKMessageOfferData { if(!wrapper) return false; - this._offerId = wrapper.readInt(); - this._localizationId = wrapper.readString(); - this._rent = wrapper.readBoolean(); - this._priceCredits = wrapper.readInt(); - this._priceActivityPoints = wrapper.readInt(); - this._priceActivityPointsType = wrapper.readInt(); - this._giftable = wrapper.readBoolean(); + this._offerId = wrapper.readInt(); + this._localizationId = wrapper.readString(); + this._rent = wrapper.readBoolean(); + this._priceCredits = wrapper.readInt(); + this._priceActivityPoints = wrapper.readInt(); + this._priceActivityPointsType = wrapper.readInt(); + this._giftable = wrapper.readBoolean(); let totalProducts = wrapper.readInt(); @@ -59,7 +59,7 @@ export class PurchaseOKMessageOfferData totalProducts--; } - this._clubLevel = wrapper.readInt(); + this._clubLevel = wrapper.readInt(); this._bundlePurchaseAllowed = wrapper.readBoolean(); return true; diff --git a/src/nitro/communication/messages/incoming/friendlist/AcceptFriendFailureData.ts b/src/nitro/communication/messages/incoming/friendlist/AcceptFriendFailureData.ts index f127ec98..a8f17aa6 100644 --- a/src/nitro/communication/messages/incoming/friendlist/AcceptFriendFailureData.ts +++ b/src/nitro/communication/messages/incoming/friendlist/AcceptFriendFailureData.ts @@ -9,7 +9,7 @@ export class AcceptFriendFailerData { if(!wrapper) throw new Error('invalid_wrapper'); - this._senderId = wrapper.readInt(); + this._senderId = wrapper.readInt(); this._errorCode = wrapper.readInt(); } diff --git a/src/nitro/communication/messages/incoming/friendlist/FriendCategoryData.ts b/src/nitro/communication/messages/incoming/friendlist/FriendCategoryData.ts index 3e88596a..1b548d25 100644 --- a/src/nitro/communication/messages/incoming/friendlist/FriendCategoryData.ts +++ b/src/nitro/communication/messages/incoming/friendlist/FriendCategoryData.ts @@ -9,8 +9,8 @@ export class FriendCategoryData { if(!wrapper) throw new Error('invalid_wrapper'); - this._id = wrapper.readInt(); - this._name = wrapper.readString(); + this._id = wrapper.readInt(); + this._name = wrapper.readString(); } public get id(): number diff --git a/src/nitro/communication/messages/incoming/friendlist/FriendParser.ts b/src/nitro/communication/messages/incoming/friendlist/FriendParser.ts index 87046464..5995b2d2 100644 --- a/src/nitro/communication/messages/incoming/friendlist/FriendParser.ts +++ b/src/nitro/communication/messages/incoming/friendlist/FriendParser.ts @@ -21,20 +21,20 @@ export class FriendParser { if(!wrapper) throw new Error('invalid_wrapper'); - this._id = wrapper.readInt(); - this._name = wrapper.readString(); - this._gender = wrapper.readInt(); - this._online = wrapper.readBoolean(); - this._followingAllowed = wrapper.readBoolean(); - this._figure = wrapper.readString(); - this._categoryId = wrapper.readInt(); - this._motto = wrapper.readString(); - this._realName = wrapper.readString(); - this._lastAccess = wrapper.readString(); - this._persistedMessageUser = wrapper.readBoolean(); - this._vipMember = wrapper.readBoolean(); - this._pocketHabboUser = wrapper.readBoolean(); - this._relationshipStatus = wrapper.readShort(); + this._id = wrapper.readInt(); + this._name = wrapper.readString(); + this._gender = wrapper.readInt(); + this._online = wrapper.readBoolean(); + this._followingAllowed = wrapper.readBoolean(); + this._figure = wrapper.readString(); + this._categoryId = wrapper.readInt(); + this._motto = wrapper.readString(); + this._realName = wrapper.readString(); + this._lastAccess = wrapper.readString(); + this._persistedMessageUser = wrapper.readBoolean(); + this._vipMember = wrapper.readBoolean(); + this._pocketHabboUser = wrapper.readBoolean(); + this._relationshipStatus = wrapper.readShort(); } public get id(): number diff --git a/src/nitro/communication/messages/incoming/friendlist/FriendRequestData.ts b/src/nitro/communication/messages/incoming/friendlist/FriendRequestData.ts index b49879e2..ad42d0e1 100644 --- a/src/nitro/communication/messages/incoming/friendlist/FriendRequestData.ts +++ b/src/nitro/communication/messages/incoming/friendlist/FriendRequestData.ts @@ -11,10 +11,10 @@ export class FriendRequestData { if(!wrapper) throw new Error('invalid_wrapper'); - this._requestId = wrapper.readInt(); - this._requesterName = wrapper.readString(); - this._figureString = wrapper.readString(); - this._requesterUserId = this._requestId; + this._requestId = wrapper.readInt(); + this._requesterName = wrapper.readString(); + this._figureString = wrapper.readString(); + this._requesterUserId = this._requestId; } public get requestId(): number diff --git a/src/nitro/communication/messages/incoming/friendlist/HabboSearchResultData.ts b/src/nitro/communication/messages/incoming/friendlist/HabboSearchResultData.ts index 544c84ce..14948241 100644 --- a/src/nitro/communication/messages/incoming/friendlist/HabboSearchResultData.ts +++ b/src/nitro/communication/messages/incoming/friendlist/HabboSearchResultData.ts @@ -16,17 +16,17 @@ export class HabboSearchResultData { if(!wrapper) throw new Error('invalid_wrapper'); - this._avatarId = wrapper.readInt(); - this._avatarName = wrapper.readString(); - this._avatarMotto = wrapper.readString(); - this._isAvatarOnline = wrapper.readBoolean(); - this._canFollow = wrapper.readBoolean(); + this._avatarId = wrapper.readInt(); + this._avatarName = wrapper.readString(); + this._avatarMotto = wrapper.readString(); + this._isAvatarOnline = wrapper.readBoolean(); + this._canFollow = wrapper.readBoolean(); - this._lastOnlineData = wrapper.readString(); // this was not assigned to anything on original packet + this._lastOnlineData = wrapper.readString(); // this was not assigned to anything on original packet - this._avatarGender = wrapper.readInt(); - this._avatarFigure = wrapper.readString(); - this._realName = wrapper.readString(); + this._avatarGender = wrapper.readInt(); + this._avatarFigure = wrapper.readString(); + this._realName = wrapper.readString(); } public get avatarId(): number diff --git a/src/nitro/communication/messages/incoming/help/CallForHelpPendingCallsMessageEvent.ts b/src/nitro/communication/messages/incoming/help/CallForHelpPendingCallsMessageEvent.ts index 00fa3dc8..bd0eb880 100644 --- a/src/nitro/communication/messages/incoming/help/CallForHelpPendingCallsMessageEvent.ts +++ b/src/nitro/communication/messages/incoming/help/CallForHelpPendingCallsMessageEvent.ts @@ -6,7 +6,7 @@ export class CallForHelpPendingCallsMessageEvent extends MessageEvent implements { constructor(callBack: Function) { - super(callBack, CallForHelpPendingCallsMessageParser); + super(callBack, CallForHelpPendingCallsMessageParser); } public getParser(): CallForHelpPendingCallsMessageParser diff --git a/src/nitro/communication/messages/incoming/help/CallForHelpReplyMessageEvent.ts b/src/nitro/communication/messages/incoming/help/CallForHelpReplyMessageEvent.ts index a4c1aa5a..3e653f42 100644 --- a/src/nitro/communication/messages/incoming/help/CallForHelpReplyMessageEvent.ts +++ b/src/nitro/communication/messages/incoming/help/CallForHelpReplyMessageEvent.ts @@ -6,7 +6,7 @@ export class CallForHelpReplyMessageEvent extends MessageEvent implements IMessa { constructor(callBack: Function) { - super(callBack, CallForHelpReplyMessageParser); + super(callBack, CallForHelpReplyMessageParser); } public getParser(): CallForHelpReplyMessageParser diff --git a/src/nitro/communication/messages/incoming/inventory/achievements/AchievementData.ts b/src/nitro/communication/messages/incoming/inventory/achievements/AchievementData.ts index 7979782b..f51e1ed5 100644 --- a/src/nitro/communication/messages/incoming/inventory/achievements/AchievementData.ts +++ b/src/nitro/communication/messages/incoming/inventory/achievements/AchievementData.ts @@ -28,18 +28,18 @@ export class AchievementData if(!wrapper) throw new Error('invalid_parser'); this._achievementId = wrapper.readInt(); - this._level = wrapper.readInt(); - this._badgeId = wrapper.readString(); - this._scoreAtStartOfLevel = wrapper.readInt(); - this._scoreLimit = Math.max(1, wrapper.readInt()); - this._levelRewardPoints = wrapper.readInt(); - this._levelRewardPointType = wrapper.readInt(); - this._currentPoints = wrapper.readInt(); - this._finalLevel = wrapper.readBoolean(); - this._category = wrapper.readString(); - this._subCategory = wrapper.readString(); - this._levelCount = wrapper.readInt(); - this._displayMethod = wrapper.readInt(); + this._level = wrapper.readInt(); + this._badgeId = wrapper.readString(); + this._scoreAtStartOfLevel = wrapper.readInt(); + this._scoreLimit = Math.max(1, wrapper.readInt()); + this._levelRewardPoints = wrapper.readInt(); + this._levelRewardPointType = wrapper.readInt(); + this._currentPoints = wrapper.readInt(); + this._finalLevel = wrapper.readBoolean(); + this._category = wrapper.readString(); + this._subCategory = wrapper.readString(); + this._levelCount = wrapper.readInt(); + this._displayMethod = wrapper.readInt(); } public get achievementId(): number @@ -140,17 +140,17 @@ export class AchievementData public reset(badge: AchievementData) { this._achievementId = badge._achievementId; - this._level = badge._level; - this._badgeId = badge._badgeId; - this._scoreAtStartOfLevel = badge._scoreAtStartOfLevel; - this._scoreLimit = badge._scoreLimit; - this._levelRewardPoints = badge._levelRewardPoints; - this._levelRewardPointType = badge._levelRewardPointType; - this._currentPoints = badge._currentPoints; - this._finalLevel = badge._finalLevel; - this._category = badge.category; - this._subCategory = badge._subCategory; - this._levelCount = badge._levelCount; - this._displayMethod = badge._displayMethod; + this._level = badge._level; + this._badgeId = badge._badgeId; + this._scoreAtStartOfLevel = badge._scoreAtStartOfLevel; + this._scoreLimit = badge._scoreLimit; + this._levelRewardPoints = badge._levelRewardPoints; + this._levelRewardPointType = badge._levelRewardPointType; + this._currentPoints = badge._currentPoints; + this._finalLevel = badge._finalLevel; + this._category = badge.category; + this._subCategory = badge._subCategory; + this._levelCount = badge._levelCount; + this._displayMethod = badge._displayMethod; } } diff --git a/src/nitro/communication/messages/incoming/inventory/achievements/AchievementResolutionData.ts b/src/nitro/communication/messages/incoming/inventory/achievements/AchievementResolutionData.ts index 9a5482c6..1692488e 100644 --- a/src/nitro/communication/messages/incoming/inventory/achievements/AchievementResolutionData.ts +++ b/src/nitro/communication/messages/incoming/inventory/achievements/AchievementResolutionData.ts @@ -13,18 +13,18 @@ export class AchievementResolutionData constructor(wrapper: IMessageDataWrapper) { this._achievementId = wrapper.readInt(); - this._level = wrapper.readInt(); - this._badgeId = wrapper.readString(); - this._requiredLevel = wrapper.readInt(); - this._state = wrapper.readInt(); + this._level = wrapper.readInt(); + this._badgeId = wrapper.readString(); + this._requiredLevel = wrapper.readInt(); + this._state = wrapper.readInt(); } public dispose(): void { this._achievementId = 0; - this._level = 0; - this._badgeId = ''; - this._requiredLevel = 0; + this._level = 0; + this._badgeId = ''; + this._requiredLevel = 0; } public get achievementId(): number diff --git a/src/nitro/communication/messages/incoming/inventory/trading/ItemDataStructure.ts b/src/nitro/communication/messages/incoming/inventory/trading/ItemDataStructure.ts index 23daeb0c..d465ee4c 100644 --- a/src/nitro/communication/messages/incoming/inventory/trading/ItemDataStructure.ts +++ b/src/nitro/communication/messages/incoming/inventory/trading/ItemDataStructure.ts @@ -27,23 +27,23 @@ export class ItemDataStructure implements IFurnitureItemData constructor(wrapper: IMessageDataWrapper) { - this._itemId = wrapper.readInt(); - this._furniType = wrapper.readString().toUpperCase(); - this._ref = wrapper.readInt(); - this._spriteId = wrapper.readInt(); - this._category = wrapper.readInt(); - this._isGroupable = wrapper.readBoolean(); - this._stuffData = FurnitureDataParser.parseObjectData(wrapper); - this._secondsToExpiration = -1; - this._expirationTimeStamp = Nitro.instance.time; - this._hasRentPeriodStarted = false; - this._creationDay = wrapper.readInt(); - this._creationMonth = wrapper.readInt(); - this._creationYear = wrapper.readInt(); - this._extra = ((this.furniType === 'S') ? wrapper.readInt() : -1); - this._flatId = -1; - this._rentable = false; - this._isWallItem = (this._furniType === 'I'); + this._itemId = wrapper.readInt(); + this._furniType = wrapper.readString().toUpperCase(); + this._ref = wrapper.readInt(); + this._spriteId = wrapper.readInt(); + this._category = wrapper.readInt(); + this._isGroupable = wrapper.readBoolean(); + this._stuffData = FurnitureDataParser.parseObjectData(wrapper); + this._secondsToExpiration = -1; + this._expirationTimeStamp = Nitro.instance.time; + this._hasRentPeriodStarted = false; + this._creationDay = wrapper.readInt(); + this._creationMonth = wrapper.readInt(); + this._creationYear = wrapper.readInt(); + this._extra = ((this.furniType === 'S') ? wrapper.readInt() : -1); + this._flatId = -1; + this._rentable = false; + this._isWallItem = (this._furniType === 'I'); } public get itemId(): number diff --git a/src/nitro/communication/messages/incoming/moderation/ModeratorUserInfoData.ts b/src/nitro/communication/messages/incoming/moderation/ModeratorUserInfoData.ts index 1d67048f..83d20d82 100644 --- a/src/nitro/communication/messages/incoming/moderation/ModeratorUserInfoData.ts +++ b/src/nitro/communication/messages/incoming/moderation/ModeratorUserInfoData.ts @@ -20,7 +20,7 @@ export class ModeratorUserInfoData private _figure: string; private _userClassification: string; private _lastSanctionTime: string = ''; - private _sanctionAgeHours: number = 0; + private _sanctionAgeHours: number = 0; constructor(wrapper: IMessageDataWrapper) { diff --git a/src/nitro/communication/messages/incoming/moderation/UserChatlogData.ts b/src/nitro/communication/messages/incoming/moderation/UserChatlogData.ts index 4092c712..c3416568 100644 --- a/src/nitro/communication/messages/incoming/moderation/UserChatlogData.ts +++ b/src/nitro/communication/messages/incoming/moderation/UserChatlogData.ts @@ -9,7 +9,7 @@ export class UserChatlogData constructor(wrapper: IMessageDataWrapper) { - this._userId = wrapper.readInt(); + this._userId = wrapper.readInt(); this._username = wrapper.readString(); const size = wrapper.readInt(); for(let i = 0; i < size; i++) diff --git a/src/nitro/communication/messages/incoming/room/engine/ObjectData.ts b/src/nitro/communication/messages/incoming/room/engine/ObjectData.ts index 64a6fe46..29851671 100644 --- a/src/nitro/communication/messages/incoming/room/engine/ObjectData.ts +++ b/src/nitro/communication/messages/incoming/room/engine/ObjectData.ts @@ -8,9 +8,9 @@ export class ObjectData constructor(id: number, state: number, objectData: IObjectData) { - this._id = id; + this._id = id; this._state = state; - this._data = objectData; + this._data = objectData; } public get id(): number diff --git a/src/nitro/communication/messages/incoming/room/pet/BreedingPetInfo.ts b/src/nitro/communication/messages/incoming/room/pet/BreedingPetInfo.ts index 2545b3aa..becbdc98 100644 --- a/src/nitro/communication/messages/incoming/room/pet/BreedingPetInfo.ts +++ b/src/nitro/communication/messages/incoming/room/pet/BreedingPetInfo.ts @@ -12,20 +12,20 @@ export class BreedingPetInfo { if(!wrapper) throw new Error('invalid_wrapper'); - this._webId = wrapper.readInt(); - this._name = wrapper.readString(); - this._level = wrapper.readInt(); - this._figure = wrapper.readString(); - this._owner = wrapper.readString(); + this._webId = wrapper.readInt(); + this._name = wrapper.readString(); + this._level = wrapper.readInt(); + this._figure = wrapper.readString(); + this._owner = wrapper.readString(); } public dispose():void { - this._webId = 0; - this._name = ''; - this._level = 0; - this._figure = ''; - this._owner = ''; + this._webId = 0; + this._name = ''; + this._level = 0; + this._figure = ''; + this._owner = ''; } public get webId(): number diff --git a/src/nitro/communication/messages/incoming/room/pet/RarityCategoryData.ts b/src/nitro/communication/messages/incoming/room/pet/RarityCategoryData.ts index 8f0c38a5..bb5895fd 100644 --- a/src/nitro/communication/messages/incoming/room/pet/RarityCategoryData.ts +++ b/src/nitro/communication/messages/incoming/room/pet/RarityCategoryData.ts @@ -10,7 +10,7 @@ export class RarityCategoryData if(!wrapper) throw new Error('invalid_wrapper'); this._chance = wrapper.readInt(); - this._breeds = []; + this._breeds = []; let totalCount = wrapper.readInt(); @@ -25,7 +25,7 @@ export class RarityCategoryData public dispose():void { this._chance = -1; - this._breeds = []; + this._breeds = []; } public get chance(): number diff --git a/src/nitro/communication/messages/incoming/roomevents/TriggerDefinition.ts b/src/nitro/communication/messages/incoming/roomevents/TriggerDefinition.ts index d6b4e815..5f69f072 100644 --- a/src/nitro/communication/messages/incoming/roomevents/TriggerDefinition.ts +++ b/src/nitro/communication/messages/incoming/roomevents/TriggerDefinition.ts @@ -10,8 +10,8 @@ export class TriggerDefinition extends Triggerable { super(wrapper); - this._conflictingActions = []; - this._triggerConf = wrapper.readInt(); + this._conflictingActions = []; + this._triggerConf = wrapper.readInt(); let count = wrapper.readInt(); diff --git a/src/nitro/communication/messages/incoming/roomevents/Triggerable.ts b/src/nitro/communication/messages/incoming/roomevents/Triggerable.ts index 554f92f2..81fb04ad 100644 --- a/src/nitro/communication/messages/incoming/roomevents/Triggerable.ts +++ b/src/nitro/communication/messages/incoming/roomevents/Triggerable.ts @@ -13,10 +13,10 @@ export class Triggerable constructor(wrapper: IMessageDataWrapper) { - this._stuffIds = []; - this._intParams = []; + this._stuffIds = []; + this._intParams = []; this._stuffTypeSelectionEnabled = wrapper.readBoolean(); - this._furniLimit = wrapper.readInt(); + this._furniLimit = wrapper.readInt(); let count = wrapper.readInt(); @@ -27,9 +27,9 @@ export class Triggerable count--; } - this._stuffTypeId = wrapper.readInt(); - this._id = wrapper.readInt(); - this._stringParam = wrapper.readString(); + this._stuffTypeId = wrapper.readInt(); + this._id = wrapper.readInt(); + this._stringParam = wrapper.readString(); count = wrapper.readInt(); diff --git a/src/nitro/communication/messages/incoming/roomevents/WiredActionDefinition.ts b/src/nitro/communication/messages/incoming/roomevents/WiredActionDefinition.ts index f174c7da..545e591b 100644 --- a/src/nitro/communication/messages/incoming/roomevents/WiredActionDefinition.ts +++ b/src/nitro/communication/messages/incoming/roomevents/WiredActionDefinition.ts @@ -11,9 +11,9 @@ export class WiredActionDefinition extends Triggerable { super(wrapper); - this._conflictingTriggers = []; - this._type = wrapper.readInt(); - this._delayInPulses = wrapper.readInt(); + this._conflictingTriggers = []; + this._type = wrapper.readInt(); + this._delayInPulses = wrapper.readInt(); let count = wrapper.readInt(); diff --git a/src/nitro/communication/messages/incoming/roomevents/WiredRewardResultMessageEvent.ts b/src/nitro/communication/messages/incoming/roomevents/WiredRewardResultMessageEvent.ts index 7792f7e2..0d880587 100644 --- a/src/nitro/communication/messages/incoming/roomevents/WiredRewardResultMessageEvent.ts +++ b/src/nitro/communication/messages/incoming/roomevents/WiredRewardResultMessageEvent.ts @@ -4,8 +4,8 @@ import { WiredRewardResultMessageParser } from '../../parser/roomevents/WiredRew export class WiredRewardResultMessageEvent extends MessageEvent implements IMessageEvent { - public static PRODUCT_DONATED_CODE: number = 6; - public static BADGE_DONATED_CODE: number = 7; + public static PRODUCT_DONATED_CODE: number = 6; + public static BADGE_DONATED_CODE: number = 7; constructor(callBack: Function) { diff --git a/src/nitro/communication/messages/outgoing/OutgoingHeader.ts b/src/nitro/communication/messages/outgoing/OutgoingHeader.ts index e745263b..cc4258b1 100644 --- a/src/nitro/communication/messages/outgoing/OutgoingHeader.ts +++ b/src/nitro/communication/messages/outgoing/OutgoingHeader.ts @@ -1,384 +1,384 @@ export class OutgoingHeader { - public static ACHIEVEMENT_LIST = 219; - public static AUTHENTICATION = -1; - public static BOT_CONFIGURATION = 1986; - public static BOT_PICKUP = 3323; - public static BOT_PLACE = 1592; - public static BOT_SKILL_SAVE = 2624; - public static GET_CLUB_OFFERS = 3285; - public static GET_CLUB_GIFT_INFO = 487; - public static GET_CATALOG_INDEX = 1195; - public static GET_CATALOG_PAGE = 412; - public static CATALOG_PURCHASE = 3492; - public static CATALOG_PURCHASE_GIFT = 1411; - public static GET_PRODUCT_OFFER = 2594; - public static CLIENT_LATENCY = 295; - public static CLIENT_LATENCY_MEASURE = 96; - public static CLIENT_POLICY = 26979; - public static CLIENT_PONG = 2596; - public static CLIENT_TOOLBAR_TOGGLE = 2313; - public static CLIENT_VARIABLES = 1053; - public static GET_CURRENT_TIMING_CODE = 2912; - public static DESKTOP_NEWS = 1827; - public static DESKTOP_VIEW = 105; - public static GET_BUNDLE_DISCOUNT_RULESET = 223; - public static EVENT_TRACKER = 3457; - public static FIND_NEW_FRIENDS = 516; - public static FURNITURE_ALIASES = 3898; - public static FURNITURE_FLOOR_UPDATE = 248; - public static FURNITURE_MULTISTATE = 99; - public static FURNITURE_PICKUP = 3456; - public static FURNITURE_PLACE = 1258; - public static FURNITURE_POSTIT_PLACE = 2248; + public static ACHIEVEMENT_LIST = 219; + public static AUTHENTICATION = -1; + public static BOT_CONFIGURATION = 1986; + public static BOT_PICKUP = 3323; + public static BOT_PLACE = 1592; + public static BOT_SKILL_SAVE = 2624; + public static GET_CLUB_OFFERS = 3285; + public static GET_CLUB_GIFT_INFO = 487; + public static GET_CATALOG_INDEX = 1195; + public static GET_CATALOG_PAGE = 412; + public static CATALOG_PURCHASE = 3492; + public static CATALOG_PURCHASE_GIFT = 1411; + public static GET_PRODUCT_OFFER = 2594; + public static CLIENT_LATENCY = 295; + public static CLIENT_LATENCY_MEASURE = 96; + public static CLIENT_POLICY = 26979; + public static CLIENT_PONG = 2596; + public static CLIENT_TOOLBAR_TOGGLE = 2313; + public static CLIENT_VARIABLES = 1053; + public static GET_CURRENT_TIMING_CODE = 2912; + public static DESKTOP_NEWS = 1827; + public static DESKTOP_VIEW = 105; + public static GET_BUNDLE_DISCOUNT_RULESET = 223; + public static EVENT_TRACKER = 3457; + public static FIND_NEW_FRIENDS = 516; + public static FURNITURE_ALIASES = 3898; + public static FURNITURE_FLOOR_UPDATE = 248; + public static FURNITURE_MULTISTATE = 99; + public static FURNITURE_PICKUP = 3456; + public static FURNITURE_PLACE = 1258; + public static FURNITURE_POSTIT_PLACE = 2248; public static FURNITURE_POSTIT_SAVE_STICKY_POLE = 3283; - public static FURNITURE_RANDOMSTATE = 3617; - public static FURNITURE_WALL_MULTISTATE = 210; - public static FURNITURE_WALL_UPDATE = 168; - public static GAMES_INIT = 2914; - public static GAMES_LIST = 741; - public static GET_GIFT_WRAPPING_CONFIG = 418; - public static GROUP_ADMIN_ADD = 2894; - public static GROUP_ADMIN_REMOVE = 722; - public static GROUP_CREATE_OPTIONS = 798; - public static GROUP_FAVORITE = 3549; - public static GET_FORUM_STATS = 3149; - public static GET_FORUM_THREADS = 873; - public static GET_FORUMS_LIST = 436; - public static GET_FORUM_MESSAGES = 232; - public static GET_FORUM_THREAD = 3900; - public static GET_UNREAD_FORUMS_COUNT = 2908; - public static FORUM_MODERATE_MESSAGE = 286; - public static FORUM_MODERATE_THREAD = 1397; - public static FORUM_POST_MESSAGE = 3529; - public static UPDATE_FORUM_READ_MARKER = 1855; - public static UPDATE_FORUM_SETTINGS = 2214; - public static FORUM_UPDATE_THREAD = 3045; - public static GROUP_INFO = 2991; - public static GROUP_DELETE = 1134; - public static GROUP_MEMBER_REMOVE_CONFIRM = 3593; - public static GROUP_MEMBER_REMOVE = 593; - public static GROUP_MEMBERS = 312; - public static GROUP_MEMBERSHIPS = 367; - public static GROUP_REQUEST = 998; - public static GROUP_REQUEST_ACCEPT = 3386; - public static GROUP_REQUEST_DECLINE = 1894; - public static GROUP_SETTINGS = 1004; - public static GROUP_PARTS = 813; - public static GROUP_BUY = 230; - public static GROUP_SAVE_INFORMATION = 3137; - public static GROUP_SAVE_BADGE = 1991; - public static GROUP_SAVE_COLORS = 1764; - public static GROUP_SAVE_PREFERENCES = 3435; - public static GROUP_BADGES = 21; - public static INVENTORY_UNKNOWN = 1371; - public static ITEM_CLOTHING_REDEEM = 3374; - public static ITEM_COLOR_WHEEL_CLICK = 2144; - public static ITEM_DICE_CLICK = 1990; - public static ITEM_DICE_CLOSE = 1533; - public static ITEM_DIMMER_SAVE = 1648; - public static ITEM_DIMMER_SETTINGS = 2813; - public static ITEM_DIMMER_TOGGLE = 2296; - public static ITEM_EXCHANGE_REDEEM = 3115; - public static ITEM_PAINT = 711; - public static SET_OBJECT_DATA = 3608; - public static ITEM_STACK_HELPER = 3839; - public static ITEM_WALL_CLICK = 210; - public static ITEM_WALL_UPDATE = 168; - public static MARKETPLACE_CONFIG = 2597; - public static ACCEPT_FRIEND = 137; - public static MESSENGER_CHAT = 3567; - public static DECLINE_FRIEND = 2890; - public static FOLLOW_FRIEND = 3997; - public static MESSENGER_FRIENDS = 1523; - public static MESSENGER_INIT = 2781; - public static MESSENGER_RELATIONSHIPS = 2138; - public static SET_RELATIONSHIP_STATUS = 3768; - public static REMOVE_FRIEND = 1689; - public static REQUEST_FRIEND = 3157; - public static GET_FRIEND_REQUESTS = 2448; - public static SEND_ROOM_INVITE = 1276; - public static HABBO_SEARCH = 1210; - public static FRIEND_LIST_UPDATE = 1419; - public static MOD_TOOL_USER_INFO = 3295; - public static NAVIGATOR_CATEGORIES = 3027; - public static NAVIGATOR_INIT = 2110; - public static NAVIGATOR_SEARCH = 249; - public static NAVIGATOR_SEARCH_CLOSE = 1834; - public static NAVIGATOR_SEARCH_OPEN = 637; - public static NAVIGATOR_SEARCH_SAVE = 2226; - public static NAVIGATOR_SETTINGS = 1782; - public static NAVIGATOR_SETTINGS_SAVE = 3159; - public static NAVIGATOR_CATEGORY_LIST_MODE = 1202; - public static PET_INFO = 2934; - public static PET_PICKUP = 1581; - public static PET_PLACE = 2647; - public static PET_RESPECT = 3202; - public static PET_RIDE = 1036; - public static PET_MOVE = 3449; - public static RECYCLER_PRIZES = 398; - public static RELEASE_VERSION = 4000; - public static CALL_FOR_HELP = 1691; - public static ROOM_AMBASSADOR_ALERT = 2996; - public static ROOM_BAN_GIVE = 1477; - public static ROOM_BAN_LIST = 2267; - public static ROOM_BAN_REMOVE = 992; - public static ROOM_CREATE = 2752; - public static ROOM_DELETE = 532; - public static ROOM_DOORBELL = 1644; - public static ROOM_ENTER = 2312; - public static ROOM_FAVORITE = 3817; - public static ROOM_FAVORITE_REMOVE = 309; - public static ROOM_INFO = 2230; - public static ROOM_KICK = 1320; - public static ROOM_LIKE = 3582; - public static ROOM_MODEL = 2300; - public static GET_OCCUPIED_TILES = 1687; - public static GET_ROOM_ENTRY_TILE = 3559; - public static ROOM_MODEL_SAVE = 875; - public static ROOM_MUTE = 3637; - public static ROOM_MUTE_USER = 3485; - public static ROOM_RIGHTS_GIVE = 808; - public static ROOM_RIGHTS_LIST = 3385; - public static ROOM_RIGHTS_REMOVE = 2064; - public static ROOM_RIGHTS_REMOVE_ALL = 2683; - public static ROOM_RIGHTS_REMOVE_OWN = 3182; - public static ROOM_SETTINGS = 3129; - public static ROOM_SETTINGS_SAVE = 1969; - public static ROOM_STAFF_PICK = 1918; - public static SECURITY_MACHINE = 2490; - public static SECURITY_TICKET = 2419; - public static TRADE = 1481; - public static TRADE_ACCEPT = 3863; - public static TRADE_CANCEL = 2341; - public static TRADE_CLOSE = 2551; - public static TRADE_CONFIRM = 2760; - public static TRADE_ITEM = 3107; - public static TRADE_ITEM_REMOVE = 3845; - public static TRADE_ITEMS = 1263; - public static TRADE_UNACCEPT = 1444; - public static UNIT_ACTION = 2456; - public static UNIT_CHAT = 1314; - public static UNIT_CHAT_SHOUT = 2085; - public static UNIT_CHAT_WHISPER = 1543; - public static UNIT_DANCE = 2080; - public static UNIT_DROP_HAND_ITEM = 2814; - public static UNIT_GIVE_HANDITEM = 2941; - public static UNIT_LOOK = 3301; - public static UNIT_POSTURE = 2235; - public static UNIT_SIGN = 1975; - public static UNIT_TYPING = 1597; - public static UNIT_TYPING_STOP = 1474; - public static UNIT_WALK = 3320; - public static USER_BADGES = 2769; - public static USER_BADGES_CURRENT = 2091; - public static USER_BADGES_CURRENT_UPDATE = 644; - public static USER_BOTS = 3848; - public static USER_CURRENCY = 273; - public static USER_EFFECT_ACTIVATE = 2959; - public static USER_EFFECT_ENABLE = 1752; - public static USER_FIGURE = 2730; - public static USER_FURNITURE = 3150; // sent when in room - public static USER_FURNITURE2 = 3500; // sent when not in room - public static USER_HOME_ROOM = 1740; - public static USER_INFO = 357; - public static USER_MOTTO = 2228; - public static USER_IGNORED = 3878; - public static USER_PETS = 3095; - public static USER_PROFILE = 3265; - public static USER_PROFILE_BY_NAME = 2249; - public static USER_RESPECT = 2694; - public static GET_SOUND_SETTINGS = 2388; - public static USER_SETTINGS_CAMERA = 1461; - public static USER_SETTINGS_CHAT_STYLE = 1030; - public static USER_SETTINGS_INVITES = 1086; - public static USER_SETTINGS_OLD_CHAT = 1262; - public static USER_SETTINGS_VOLUME = 1367; - public static USER_SUBSCRIPTION = 3166; - public static GET_WARDROBE = 2742; - public static SAVE_WARDROBE_OUTFIT = 800; - public static USER_TAGS = 17; - public static VISIT_USER = 2970; - public static WIRED_ACTION_SAVE = 2281; - public static WIRED_APPLY_SNAPSHOT = 3373; - public static WIRED_CONDITION_SAVE = 3203; - public static WIRED_OPEN = 768; - public static WIRED_TRIGGER_SAVE = 1520; - public static GET_ITEM_DATA = 3964; - public static ONE_WAY_DOOR_CLICK = 2765; - public static REMOVE_WALL_ITEM = 3336; - public static SET_ITEM_DATA = 3666; - public static CATALOG_REDEEM_VOUCHER = 339; - public static ROOM_TONER_APPLY = 2880; - public static FRIEND_FURNI_CONFIRM_LOCK = 3775; - public static MANNEQUIN_SAVE_NAME = 2850; - public static MANNEQUIN_SAVE_LOOK = 2209; - public static PRESENT_OPEN_PRESENT = 3558; - public static CATALOG_SELECT_VIP_GIFT = 2276; - public static USER_IGNORE_ID = 3314; - public static USER_IGNORE = 1117; - public static USER_UNIGNORE = 2061; - public static MODTOOL_REQUEST_ROOM_INFO = 707; - public static MODTOOL_CHANGE_ROOM_SETTINGS = 3260; - public static MODTOOL_REQUEST_USER_CHATLOG = 1391; - public static MODTOOL_REQUEST_ROOM_CHATLOG = 2587; - public static MODTOOL_SANCTION_ALERT = 229; - public static MODTOOL_SANCTION_BAN = 2766; - public static MODTOOL_SANCTION_KICK = 2582; - public static MODTOOL_SANCTION_TRADELOCK = 3742; - public static MODTOOL_ALERTEVENT = 1840; - public static MODTOOL_SANCTION_MUTE = 1945; - public static MODTOOL_REQUEST_USER_ROOMS = 3526; - public static MODTOOL_ROOM_ALERT = 3842; - public static MODTOOL_PREFERENCES = 31; - public static CLOSE_ISSUE_DEFAULT_ACTION = 2717; - public static CLOSE_ISSUES = 2067; - public static DEFAULT_SANCTION = 1681; - public static GET_CFH_CHATLOG = 211; - public static MODTOOL_SANCTION = 1392; - public static PICK_ISSUES = 15; - public static RELEASE_ISSUES = 1572; - public static CONVERT_GLOBAL_ROOM_ID = 314; - public static REQUEST_SELL_ITEM = 848; + public static FURNITURE_RANDOMSTATE = 3617; + public static FURNITURE_WALL_MULTISTATE = 210; + public static FURNITURE_WALL_UPDATE = 168; + public static GAMES_INIT = 2914; + public static GAMES_LIST = 741; + public static GET_GIFT_WRAPPING_CONFIG = 418; + public static GROUP_ADMIN_ADD = 2894; + public static GROUP_ADMIN_REMOVE = 722; + public static GROUP_CREATE_OPTIONS = 798; + public static GROUP_FAVORITE = 3549; + public static GET_FORUM_STATS = 3149; + public static GET_FORUM_THREADS = 873; + public static GET_FORUMS_LIST = 436; + public static GET_FORUM_MESSAGES = 232; + public static GET_FORUM_THREAD = 3900; + public static GET_UNREAD_FORUMS_COUNT = 2908; + public static FORUM_MODERATE_MESSAGE = 286; + public static FORUM_MODERATE_THREAD = 1397; + public static FORUM_POST_MESSAGE = 3529; + public static UPDATE_FORUM_READ_MARKER = 1855; + public static UPDATE_FORUM_SETTINGS = 2214; + public static FORUM_UPDATE_THREAD = 3045; + public static GROUP_INFO = 2991; + public static GROUP_DELETE = 1134; + public static GROUP_MEMBER_REMOVE_CONFIRM = 3593; + public static GROUP_MEMBER_REMOVE = 593; + public static GROUP_MEMBERS = 312; + public static GROUP_MEMBERSHIPS = 367; + public static GROUP_REQUEST = 998; + public static GROUP_REQUEST_ACCEPT = 3386; + public static GROUP_REQUEST_DECLINE = 1894; + public static GROUP_SETTINGS = 1004; + public static GROUP_PARTS = 813; + public static GROUP_BUY = 230; + public static GROUP_SAVE_INFORMATION = 3137; + public static GROUP_SAVE_BADGE = 1991; + public static GROUP_SAVE_COLORS = 1764; + public static GROUP_SAVE_PREFERENCES = 3435; + public static GROUP_BADGES = 21; + public static INVENTORY_UNKNOWN = 1371; + public static ITEM_CLOTHING_REDEEM = 3374; + public static ITEM_COLOR_WHEEL_CLICK = 2144; + public static ITEM_DICE_CLICK = 1990; + public static ITEM_DICE_CLOSE = 1533; + public static ITEM_DIMMER_SAVE = 1648; + public static ITEM_DIMMER_SETTINGS = 2813; + public static ITEM_DIMMER_TOGGLE = 2296; + public static ITEM_EXCHANGE_REDEEM = 3115; + public static ITEM_PAINT = 711; + public static SET_OBJECT_DATA = 3608; + public static ITEM_STACK_HELPER = 3839; + public static ITEM_WALL_CLICK = 210; + public static ITEM_WALL_UPDATE = 168; + public static MARKETPLACE_CONFIG = 2597; + public static ACCEPT_FRIEND = 137; + public static MESSENGER_CHAT = 3567; + public static DECLINE_FRIEND = 2890; + public static FOLLOW_FRIEND = 3997; + public static MESSENGER_FRIENDS = 1523; + public static MESSENGER_INIT = 2781; + public static MESSENGER_RELATIONSHIPS = 2138; + public static SET_RELATIONSHIP_STATUS = 3768; + public static REMOVE_FRIEND = 1689; + public static REQUEST_FRIEND = 3157; + public static GET_FRIEND_REQUESTS = 2448; + public static SEND_ROOM_INVITE = 1276; + public static HABBO_SEARCH = 1210; + public static FRIEND_LIST_UPDATE = 1419; + public static MOD_TOOL_USER_INFO = 3295; + public static NAVIGATOR_CATEGORIES = 3027; + public static NAVIGATOR_INIT = 2110; + public static NAVIGATOR_SEARCH = 249; + public static NAVIGATOR_SEARCH_CLOSE = 1834; + public static NAVIGATOR_SEARCH_OPEN = 637; + public static NAVIGATOR_SEARCH_SAVE = 2226; + public static NAVIGATOR_SETTINGS = 1782; + public static NAVIGATOR_SETTINGS_SAVE = 3159; + public static NAVIGATOR_CATEGORY_LIST_MODE = 1202; + public static PET_INFO = 2934; + public static PET_PICKUP = 1581; + public static PET_PLACE = 2647; + public static PET_RESPECT = 3202; + public static PET_RIDE = 1036; + public static PET_MOVE = 3449; + public static RECYCLER_PRIZES = 398; + public static RELEASE_VERSION = 4000; + public static CALL_FOR_HELP = 1691; + public static ROOM_AMBASSADOR_ALERT = 2996; + public static ROOM_BAN_GIVE = 1477; + public static ROOM_BAN_LIST = 2267; + public static ROOM_BAN_REMOVE = 992; + public static ROOM_CREATE = 2752; + public static ROOM_DELETE = 532; + public static ROOM_DOORBELL = 1644; + public static ROOM_ENTER = 2312; + public static ROOM_FAVORITE = 3817; + public static ROOM_FAVORITE_REMOVE = 309; + public static ROOM_INFO = 2230; + public static ROOM_KICK = 1320; + public static ROOM_LIKE = 3582; + public static ROOM_MODEL = 2300; + public static GET_OCCUPIED_TILES = 1687; + public static GET_ROOM_ENTRY_TILE = 3559; + public static ROOM_MODEL_SAVE = 875; + public static ROOM_MUTE = 3637; + public static ROOM_MUTE_USER = 3485; + public static ROOM_RIGHTS_GIVE = 808; + public static ROOM_RIGHTS_LIST = 3385; + public static ROOM_RIGHTS_REMOVE = 2064; + public static ROOM_RIGHTS_REMOVE_ALL = 2683; + public static ROOM_RIGHTS_REMOVE_OWN = 3182; + public static ROOM_SETTINGS = 3129; + public static ROOM_SETTINGS_SAVE = 1969; + public static ROOM_STAFF_PICK = 1918; + public static SECURITY_MACHINE = 2490; + public static SECURITY_TICKET = 2419; + public static TRADE = 1481; + public static TRADE_ACCEPT = 3863; + public static TRADE_CANCEL = 2341; + public static TRADE_CLOSE = 2551; + public static TRADE_CONFIRM = 2760; + public static TRADE_ITEM = 3107; + public static TRADE_ITEM_REMOVE = 3845; + public static TRADE_ITEMS = 1263; + public static TRADE_UNACCEPT = 1444; + public static UNIT_ACTION = 2456; + public static UNIT_CHAT = 1314; + public static UNIT_CHAT_SHOUT = 2085; + public static UNIT_CHAT_WHISPER = 1543; + public static UNIT_DANCE = 2080; + public static UNIT_DROP_HAND_ITEM = 2814; + public static UNIT_GIVE_HANDITEM = 2941; + public static UNIT_LOOK = 3301; + public static UNIT_POSTURE = 2235; + public static UNIT_SIGN = 1975; + public static UNIT_TYPING = 1597; + public static UNIT_TYPING_STOP = 1474; + public static UNIT_WALK = 3320; + public static USER_BADGES = 2769; + public static USER_BADGES_CURRENT = 2091; + public static USER_BADGES_CURRENT_UPDATE = 644; + public static USER_BOTS = 3848; + public static USER_CURRENCY = 273; + public static USER_EFFECT_ACTIVATE = 2959; + public static USER_EFFECT_ENABLE = 1752; + public static USER_FIGURE = 2730; + public static USER_FURNITURE = 3150; // sent when in room + public static USER_FURNITURE2 = 3500; // sent when not in room + public static USER_HOME_ROOM = 1740; + public static USER_INFO = 357; + public static USER_MOTTO = 2228; + public static USER_IGNORED = 3878; + public static USER_PETS = 3095; + public static USER_PROFILE = 3265; + public static USER_PROFILE_BY_NAME = 2249; + public static USER_RESPECT = 2694; + public static GET_SOUND_SETTINGS = 2388; + public static USER_SETTINGS_CAMERA = 1461; + public static USER_SETTINGS_CHAT_STYLE = 1030; + public static USER_SETTINGS_INVITES = 1086; + public static USER_SETTINGS_OLD_CHAT = 1262; + public static USER_SETTINGS_VOLUME = 1367; + public static USER_SUBSCRIPTION = 3166; + public static GET_WARDROBE = 2742; + public static SAVE_WARDROBE_OUTFIT = 800; + public static USER_TAGS = 17; + public static VISIT_USER = 2970; + public static WIRED_ACTION_SAVE = 2281; + public static WIRED_APPLY_SNAPSHOT = 3373; + public static WIRED_CONDITION_SAVE = 3203; + public static WIRED_OPEN = 768; + public static WIRED_TRIGGER_SAVE = 1520; + public static GET_ITEM_DATA = 3964; + public static ONE_WAY_DOOR_CLICK = 2765; + public static REMOVE_WALL_ITEM = 3336; + public static SET_ITEM_DATA = 3666; + public static CATALOG_REDEEM_VOUCHER = 339; + public static ROOM_TONER_APPLY = 2880; + public static FRIEND_FURNI_CONFIRM_LOCK = 3775; + public static MANNEQUIN_SAVE_NAME = 2850; + public static MANNEQUIN_SAVE_LOOK = 2209; + public static PRESENT_OPEN_PRESENT = 3558; + public static CATALOG_SELECT_VIP_GIFT = 2276; + public static USER_IGNORE_ID = 3314; + public static USER_IGNORE = 1117; + public static USER_UNIGNORE = 2061; + public static MODTOOL_REQUEST_ROOM_INFO = 707; + public static MODTOOL_CHANGE_ROOM_SETTINGS = 3260; + public static MODTOOL_REQUEST_USER_CHATLOG = 1391; + public static MODTOOL_REQUEST_ROOM_CHATLOG = 2587; + public static MODTOOL_SANCTION_ALERT = 229; + public static MODTOOL_SANCTION_BAN = 2766; + public static MODTOOL_SANCTION_KICK = 2582; + public static MODTOOL_SANCTION_TRADELOCK = 3742; + public static MODTOOL_ALERTEVENT = 1840; + public static MODTOOL_SANCTION_MUTE = 1945; + public static MODTOOL_REQUEST_USER_ROOMS = 3526; + public static MODTOOL_ROOM_ALERT = 3842; + public static MODTOOL_PREFERENCES = 31; + public static CLOSE_ISSUE_DEFAULT_ACTION = 2717; + public static CLOSE_ISSUES = 2067; + public static DEFAULT_SANCTION = 1681; + public static GET_CFH_CHATLOG = 211; + public static MODTOOL_SANCTION = 1392; + public static PICK_ISSUES = 15; + public static RELEASE_ISSUES = 1572; + public static CONVERT_GLOBAL_ROOM_ID = 314; + public static REQUEST_SELL_ITEM = 848; public static REQUEST_MARKETPLACE_ITEM_STATS = 3288; - public static MARKETPLACE_SELL_ITEM = 3447; - public static MARKETPLACE_REQUEST_OWN_ITEMS = 2105; - public static MARKETPLACE_TAKE_BACK_ITEM = 434; - public static MARKETPLACE_REDEEM_CREDITS = 2650; - public static MARKETPLACE_REQUEST_OFFERS = 2407; - public static MARKETPLACE_BUY_OFFER = 1603; - public static MARKETPLACE_BUY_TOKENS = 1866; - public static CATALOG_REQUESET_PET_BREEDS = 1756; - public static APPROVE_NAME = 2109; - public static UNIT_GIVE_HANDITEM_PET = 2768; - public static PET_MOUNT = 1036; - public static PET_SUPPLEMENT = 749; - public static FURNITURE_GROUP_INFO = 2651; - public static ACHIEVEMENT_RESOLUTION_OPEN = 359; - public static USE_PET_PRODUCT = 1328; - public static REMOVE_PET_SADDLE = 186; - public static TOGGLE_PET_RIDING = 1472; - public static TOGGLE_PET_BREEDING = 3379; - public static UNSEEN_RESET_CATEGORY = 3493; - public static UNSEEN_RESET_ITEMS = 2343; - public static COMMUNITY_GOAL_VOTE_COMPOSER = 3536; - public static GET_PROMO_ARTICLES = 1827; - public static ACCEPT_QUEST = 3604; - public static ACTIVATE_QUEST = 793; - public static CANCEL_QUEST = 3133; - public static FRIEND_REQUEST_QUEST_COMPLETE = 1148; + public static MARKETPLACE_SELL_ITEM = 3447; + public static MARKETPLACE_REQUEST_OWN_ITEMS = 2105; + public static MARKETPLACE_TAKE_BACK_ITEM = 434; + public static MARKETPLACE_REDEEM_CREDITS = 2650; + public static MARKETPLACE_REQUEST_OFFERS = 2407; + public static MARKETPLACE_BUY_OFFER = 1603; + public static MARKETPLACE_BUY_TOKENS = 1866; + public static CATALOG_REQUESET_PET_BREEDS = 1756; + public static APPROVE_NAME = 2109; + public static UNIT_GIVE_HANDITEM_PET = 2768; + public static PET_MOUNT = 1036; + public static PET_SUPPLEMENT = 749; + public static FURNITURE_GROUP_INFO = 2651; + public static ACHIEVEMENT_RESOLUTION_OPEN = 359; + public static USE_PET_PRODUCT = 1328; + public static REMOVE_PET_SADDLE = 186; + public static TOGGLE_PET_RIDING = 1472; + public static TOGGLE_PET_BREEDING = 3379; + public static UNSEEN_RESET_CATEGORY = 3493; + public static UNSEEN_RESET_ITEMS = 2343; + public static COMMUNITY_GOAL_VOTE_COMPOSER = 3536; + public static GET_PROMO_ARTICLES = 1827; + public static ACCEPT_QUEST = 3604; + public static ACTIVATE_QUEST = 793; + public static CANCEL_QUEST = 3133; + public static FRIEND_REQUEST_QUEST_COMPLETE = 1148; public static GET_COMMUNITY_GOAL_EARNED_PRIZES = 2688; public static GET_COMMUNITY_GOAL_HALL_OF_FAME = 2167; - public static GET_COMMUNITY_GOAL_PROGRESS = 1145; + public static GET_COMMUNITY_GOAL_PROGRESS = 1145; public static GET_CONCURRENT_USERS_GOAL_PROGRESS = 1343; - public static GET_CONCURRENT_USERS_REWARD = 3872; - public static GET_DAILY_QUEST = 2486; - public static GET_QUESTS = 3333; - public static GET_SEASONAL_QUESTS_ONLY = 1190; - public static OPEN_QUEST_TRACKER = 2750; - public static REDEEM_COMMUNITY_GOAL_PRIZE = 90; - public static REJECT_QUEST = 2397; - public static START_CAMPAIGN = 1697; - public static GET_BONUS_RARE_INFO = 957; - public static CRAFT = 3591; - public static CRAFT_SECRET = 1251; - public static GET_CRAFTABLE_PRODUCTS = 633; - public static GET_CRAFTING_RECIPE = 1173; - public static GET_CRAFTING_RECIPES_AVAILABLE = 3086; - public static PHOTO_COMPETITION = 3959; - public static PUBLISH_PHOTO = 2068; - public static PURCHASE_PHOTO = 2408; - public static RENDER_ROOM = 3226; - public static RENDER_ROOM_THUMBNAIL = 1982; - public static REQUEST_CAMERA_CONFIGURATION = 796; - public static ADD_JUKEBOX_DISK = 753; - public static GET_JUKEBOX_PLAYLIST = 1435; - public static GET_NOW_PLAYING = 1325; - public static GET_OFFICIAL_SONG_ID = 3189; - public static GET_SONG_INFO = 3082; - public static GET_SOUND_MACHINE_PLAYLIST = 3498; - public static GET_USER_SONG_DISKS = 2304; - public static REMOVE_JUKEBOX_DISK = 3050; - public static INTERSTITIAL_SHOWN = 1109; - public static GET_INTERSTITIAL = 2519; - public static CHANGE_USERNAME = 2977; - public static CHECK_USERNAME = 3950; + public static GET_CONCURRENT_USERS_REWARD = 3872; + public static GET_DAILY_QUEST = 2486; + public static GET_QUESTS = 3333; + public static GET_SEASONAL_QUESTS_ONLY = 1190; + public static OPEN_QUEST_TRACKER = 2750; + public static REDEEM_COMMUNITY_GOAL_PRIZE = 90; + public static REJECT_QUEST = 2397; + public static START_CAMPAIGN = 1697; + public static GET_BONUS_RARE_INFO = 957; + public static CRAFT = 3591; + public static CRAFT_SECRET = 1251; + public static GET_CRAFTABLE_PRODUCTS = 633; + public static GET_CRAFTING_RECIPE = 1173; + public static GET_CRAFTING_RECIPES_AVAILABLE = 3086; + public static PHOTO_COMPETITION = 3959; + public static PUBLISH_PHOTO = 2068; + public static PURCHASE_PHOTO = 2408; + public static RENDER_ROOM = 3226; + public static RENDER_ROOM_THUMBNAIL = 1982; + public static REQUEST_CAMERA_CONFIGURATION = 796; + public static ADD_JUKEBOX_DISK = 753; + public static GET_JUKEBOX_PLAYLIST = 1435; + public static GET_NOW_PLAYING = 1325; + public static GET_OFFICIAL_SONG_ID = 3189; + public static GET_SONG_INFO = 3082; + public static GET_SOUND_MACHINE_PLAYLIST = 3498; + public static GET_USER_SONG_DISKS = 2304; + public static REMOVE_JUKEBOX_DISK = 3050; + public static INTERSTITIAL_SHOWN = 1109; + public static GET_INTERSTITIAL = 2519; + public static CHANGE_USERNAME = 2977; + public static CHECK_USERNAME = 3950; public static OPEN_CAMPAIGN_CALENDAR_DOOR_STAFF= 3889; - public static OPEN_CAMPAIGN_CALENDAR_DOOR = 2257; - public static BUILDERS_CLUB_PLACE_ROOM_ITEM = 1051; - public static BUILDERS_CLUB_PLACE_WALL_ITEM = 462; - public static BUILDERS_CLUB_QUERY_FURNI_COUNT = 2529; - public static GET_CATALOG_PAGE_EXPIRATION = 742; + public static OPEN_CAMPAIGN_CALENDAR_DOOR = 2257; + public static BUILDERS_CLUB_PLACE_ROOM_ITEM = 1051; + public static BUILDERS_CLUB_PLACE_WALL_ITEM = 462; + public static BUILDERS_CLUB_QUERY_FURNI_COUNT = 2529; + public static GET_CATALOG_PAGE_EXPIRATION = 742; public static GET_CATALOG_PAGE_WITH_EARLIEST_EXP = 3135; - public static GET_DIRECT_CLUB_BUY_AVAILABLE = 801; + public static GET_DIRECT_CLUB_BUY_AVAILABLE = 801; public static GET_HABBO_BASIC_MEMBERSHIP_EXTEND_OFFER = 603; - public static GET_HABBO_CLUB_EXTEND_OFFER = 2462; - public static GET_IS_OFFER_GIFTABLE = 1347; + public static GET_HABBO_CLUB_EXTEND_OFFER = 2462; + public static GET_IS_OFFER_GIFTABLE = 1347; public static GET_LIMITED_OFFER_APPEARING_NEXT = 410; - public static GET_NEXT_TARGETED_OFFER = 596; - public static GET_ROOM_AD_PURCHASE_INFO = 1075; + public static GET_NEXT_TARGETED_OFFER = 596; + public static GET_ROOM_AD_PURCHASE_INFO = 1075; public static GET_SEASONAL_CALENDAR_DAILY_OFFER = 3257; - public static GET_TARGETED_OFFER = 2487; + public static GET_TARGETED_OFFER = 2487; public static MARK_CATALOG_NEW_ADDITIONS_PAGE_OPENED = 2150; public static PURCHASE_BASIC_MEMBERSHIP_EXTENSION = 2735; - public static PURCHASE_ROOM_AD = 777; - public static PURCHASE_TARGETED_OFFER = 1826; + public static PURCHASE_ROOM_AD = 777; + public static PURCHASE_TARGETED_OFFER = 1826; public static PURCHASE_VIP_MEMBERSHIP_EXTENSION = 3407; - public static ROOM_AD_PURCHASE_INITIATED = 2283; - public static SET_TARGETTED_OFFER_STATE = 2041; - public static SHOP_TARGETED_OFFER_VIEWED = 3483; - public static HELPER_TALENT_TRACK = 196; - public static FORWARD_TO_A_COMPETITION_ROOM = 172; - public static FORWARD_TO_A_SUBMITTABLE_ROOM = 1450; + public static ROOM_AD_PURCHASE_INITIATED = 2283; + public static SET_TARGETTED_OFFER_STATE = 2041; + public static SHOP_TARGETED_OFFER_VIEWED = 3483; + public static HELPER_TALENT_TRACK = 196; + public static FORWARD_TO_A_COMPETITION_ROOM = 172; + public static FORWARD_TO_A_SUBMITTABLE_ROOM = 1450; public static FORWARD_TO_RANDOM_COMPETITION_ROOM = 865; - public static GET_IS_USER_PART_OF_COMPETITION = 2077; - public static GET_SECONDS_UNTIL = 271; - public static ROOM_COMPETITION_INIT = 1334; - public static SUBMIT_ROOM_TO_COMPETITION = 2595; - public static VOTE_FOR_ROOM = 143; - public static GET_GIFT = 2436; - public static RESET_PHONE_NUMBER_STATE = 2741; + public static GET_IS_USER_PART_OF_COMPETITION = 2077; + public static GET_SECONDS_UNTIL = 271; + public static ROOM_COMPETITION_INIT = 1334; + public static SUBMIT_ROOM_TO_COMPETITION = 2595; + public static VOTE_FOR_ROOM = 143; + public static GET_GIFT = 2436; + public static RESET_PHONE_NUMBER_STATE = 2741; public static SET_PHONE_NUMBER_VERIFICATION_STATUS = 1379; - public static TRY_PHONE_NUMBER = 790; - public static VERIFY_CODE = 2721; + public static TRY_PHONE_NUMBER = 790; + public static VERIFY_CODE = 2721; public static CONTROL_YOUTUBE_DISPLAY_PLAYBACK = 3005; - public static GET_YOUTUBE_DISPLAY_STATUS = 336; - public static SET_YOUTUBE_DISPLAY_PLAYLIST = 2069; - public static GO_TO_FLAT = 685; + public static GET_YOUTUBE_DISPLAY_STATUS = 336; + public static SET_YOUTUBE_DISPLAY_PLAYLIST = 2069; + public static GO_TO_FLAT = 685; public static CALL_FOR_HELP_FROM_FORUM_MESSAGE = 1412; - public static CALL_FOR_HELP_FROM_FORUM_THREAD = 534; - public static CALL_FOR_HELP_FROM_IM = 2950; - public static CALL_FOR_HELP_FROM_PHOTO = 2492; - public static CALL_FOR_HELP_FROM_SELFIE = 2755; - public static CHAT_REVIEW_GUIDE_DECIDES = 3365; - public static CHAT_REVIEW_GUIDE_DETACHED = 2501; - public static CHAT_REVIEW_GUIDE_VOTE = 3961; - public static CHAT_REVIEW_SESSION_CREATE = 3060; - public static DELETE_PENDING_CALLS_FOR_HELP = 3605; - public static GET_CFH_STATUS = 2746; - public static GET_FAQ_CATEGORY = 3445; - public static GET_FAQ_TEXT = 1849; - public static GET_GUIDE_REPORTING_STATUS = 3786; - public static GET_PENDING_CALLS_FOR_HELP = 3267; - public static GET_QUIZ_QUESTIONS = 1296; - public static GUIDE_SESSION_CREATE = 3338; - public static GUIDE_SESSION_FEEDBACK = 477; + public static CALL_FOR_HELP_FROM_FORUM_THREAD = 534; + public static CALL_FOR_HELP_FROM_IM = 2950; + public static CALL_FOR_HELP_FROM_PHOTO = 2492; + public static CALL_FOR_HELP_FROM_SELFIE = 2755; + public static CHAT_REVIEW_GUIDE_DECIDES = 3365; + public static CHAT_REVIEW_GUIDE_DETACHED = 2501; + public static CHAT_REVIEW_GUIDE_VOTE = 3961; + public static CHAT_REVIEW_SESSION_CREATE = 3060; + public static DELETE_PENDING_CALLS_FOR_HELP = 3605; + public static GET_CFH_STATUS = 2746; + public static GET_FAQ_CATEGORY = 3445; + public static GET_FAQ_TEXT = 1849; + public static GET_GUIDE_REPORTING_STATUS = 3786; + public static GET_PENDING_CALLS_FOR_HELP = 3267; + public static GET_QUIZ_QUESTIONS = 1296; + public static GUIDE_SESSION_CREATE = 3338; + public static GUIDE_SESSION_FEEDBACK = 477; public static GUIDE_SESSION_GET_REQUESTER_ROOM = 1052; - public static GUIDE_SESSION_GUIDE_DECIDES = 1424; - public static GUIDE_SESSION_INVITE_REQUESTER = 234; - public static GUIDE_SESSION_IS_TYPING = 519; - public static GUIDE_SESSION_MESSAGE = 3899; - public static GUIDE_SESSION_ON_DUTY_UPDATE = 1922; - public static GUIDE_SESSION_REPORT = 3969; - public static GUIDE_SESSION_REQUESTER_CANCELS = 291; - public static GUIDE_SESSION_RESOLVED = 887; - public static POST_QUIZ_ANSWERS = 3720; - public static SEARCH_FAQS = 2031; - public static POLL_ANSWER = 3505; - public static POLL_REJECT = 1773; - public static POLL_START = 109; - public static DISCONNECT = 2445; - public static SCR_GET_KICKBACK_INFO = 869; - public static COMPOST_PLANT = 3835; - public static HARVEST_PET = 1521; + public static GUIDE_SESSION_GUIDE_DECIDES = 1424; + public static GUIDE_SESSION_INVITE_REQUESTER = 234; + public static GUIDE_SESSION_IS_TYPING = 519; + public static GUIDE_SESSION_MESSAGE = 3899; + public static GUIDE_SESSION_ON_DUTY_UPDATE = 1922; + public static GUIDE_SESSION_REPORT = 3969; + public static GUIDE_SESSION_REQUESTER_CANCELS = 291; + public static GUIDE_SESSION_RESOLVED = 887; + public static POST_QUIZ_ANSWERS = 3720; + public static SEARCH_FAQS = 2031; + public static POLL_ANSWER = 3505; + public static POLL_REJECT = 1773; + public static POLL_START = 109; + public static DISCONNECT = 2445; + public static SCR_GET_KICKBACK_INFO = 869; + public static COMPOST_PLANT = 3835; + public static HARVEST_PET = 1521; } diff --git a/src/nitro/communication/messages/outgoing/room/furniture/FurniturePlaceComposer.ts b/src/nitro/communication/messages/outgoing/room/furniture/FurniturePlaceComposer.ts index 69baa88b..4b16d52a 100644 --- a/src/nitro/communication/messages/outgoing/room/furniture/FurniturePlaceComposer.ts +++ b/src/nitro/communication/messages/outgoing/room/furniture/FurniturePlaceComposer.ts @@ -12,12 +12,12 @@ export class FurniturePlaceComposer implements IMessageComposer constructor(itemId: number, category: number, wallLocation: string, x: number, y: number, direction: number) { - this._itemId = itemId; - this._category = category; - this._wallLocation = wallLocation; - this._x = x; - this._y = y; - this._direction = direction; + this._itemId = itemId; + this._category = category; + this._wallLocation = wallLocation; + this._x = x; + this._y = y; + this._direction = direction; } public getMessageArray() diff --git a/src/nitro/communication/messages/parser/availability/AvailabilityStatusMessageParser.ts b/src/nitro/communication/messages/parser/availability/AvailabilityStatusMessageParser.ts index a9b6a194..32f7d363 100644 --- a/src/nitro/communication/messages/parser/availability/AvailabilityStatusMessageParser.ts +++ b/src/nitro/communication/messages/parser/availability/AvailabilityStatusMessageParser.ts @@ -8,9 +8,9 @@ export class AvailabilityStatusMessageParser implements IMessageParser public flush(): boolean { - this._isOpen = false; - this._onShutdown = false; - this._isAuthenticUser = false; + this._isOpen = false; + this._onShutdown = false; + this._isAuthenticUser = false; return true; } @@ -19,8 +19,8 @@ export class AvailabilityStatusMessageParser implements IMessageParser { if(!wrapper) return false; - this._isOpen = wrapper.readBoolean(); - this._onShutdown = wrapper.readBoolean(); + this._isOpen = wrapper.readBoolean(); + this._onShutdown = wrapper.readBoolean(); if(wrapper.bytesAvailable) { diff --git a/src/nitro/communication/messages/parser/avatar/ChangeUserNameResultMessageParser.ts b/src/nitro/communication/messages/parser/avatar/ChangeUserNameResultMessageParser.ts index fe908069..c9f92cf5 100644 --- a/src/nitro/communication/messages/parser/avatar/ChangeUserNameResultMessageParser.ts +++ b/src/nitro/communication/messages/parser/avatar/ChangeUserNameResultMessageParser.ts @@ -8,9 +8,9 @@ export class ChangeUserNameResultMessageParser implements IMessageParser public flush(): boolean { - this._resultCode = -1; - this._name = ''; - this._nameSuggestions = []; + this._resultCode = -1; + this._name = ''; + this._nameSuggestions = []; return true; } @@ -19,8 +19,8 @@ export class ChangeUserNameResultMessageParser implements IMessageParser { if(!wrapper) return false; - this._resultCode = wrapper.readInt(); - this._name = wrapper.readString(); + this._resultCode = wrapper.readInt(); + this._name = wrapper.readString(); let totalSuggestions = wrapper.readInt(); diff --git a/src/nitro/communication/messages/parser/avatar/CheckUserNameResultMessageParser.ts b/src/nitro/communication/messages/parser/avatar/CheckUserNameResultMessageParser.ts index 76ff0ead..f762ae78 100644 --- a/src/nitro/communication/messages/parser/avatar/CheckUserNameResultMessageParser.ts +++ b/src/nitro/communication/messages/parser/avatar/CheckUserNameResultMessageParser.ts @@ -8,9 +8,9 @@ export class CheckUserNameResultMessageParser implements IMessageParser public flush(): boolean { - this._resultCode = -1; - this._name = ''; - this._nameSuggestions = []; + this._resultCode = -1; + this._name = ''; + this._nameSuggestions = []; return true; } @@ -19,8 +19,8 @@ export class CheckUserNameResultMessageParser implements IMessageParser { if(!wrapper) return false; - this._resultCode = wrapper.readInt(); - this._name = wrapper.readString(); + this._resultCode = wrapper.readInt(); + this._name = wrapper.readString(); let totalSuggestions = wrapper.readInt(); diff --git a/src/nitro/communication/messages/parser/bots/BotAddedToInventoryParser.ts b/src/nitro/communication/messages/parser/bots/BotAddedToInventoryParser.ts index e0576029..26b1face 100644 --- a/src/nitro/communication/messages/parser/bots/BotAddedToInventoryParser.ts +++ b/src/nitro/communication/messages/parser/bots/BotAddedToInventoryParser.ts @@ -8,7 +8,7 @@ export class BotAddedToInventoryParser implements IMessageParser public flush(): boolean { - this._item = null; + this._item = null; this._openInventory = false; return true; @@ -18,7 +18,7 @@ export class BotAddedToInventoryParser implements IMessageParser { if(!wrapper) return false; - this._item = new BotData(wrapper); + this._item = new BotData(wrapper); this._openInventory = wrapper.readBoolean(); return true; diff --git a/src/nitro/communication/messages/parser/bots/BotData.ts b/src/nitro/communication/messages/parser/bots/BotData.ts index 410e51e0..e1f48580 100644 --- a/src/nitro/communication/messages/parser/bots/BotData.ts +++ b/src/nitro/communication/messages/parser/bots/BotData.ts @@ -12,11 +12,11 @@ export class BotData { if(!wrapper) throw new Error('invalid_parser'); - this._id = wrapper.readInt(); - this._name = wrapper.readString(); - this._motto = wrapper.readString(); - this._gender = wrapper.readString(); - this._figure = wrapper.readString(); + this._id = wrapper.readInt(); + this._name = wrapper.readString(); + this._motto = wrapper.readString(); + this._gender = wrapper.readString(); + this._figure = wrapper.readString(); } public get id(): number diff --git a/src/nitro/communication/messages/parser/bots/BotReceivedMessageParser.ts b/src/nitro/communication/messages/parser/bots/BotReceivedMessageParser.ts index 314b7eea..45690f7b 100644 --- a/src/nitro/communication/messages/parser/bots/BotReceivedMessageParser.ts +++ b/src/nitro/communication/messages/parser/bots/BotReceivedMessageParser.ts @@ -9,7 +9,7 @@ export class BotReceivedMessageParser implements IMessageParser public flush(): boolean { this._boughtAsGift = false; - this._item = null; + this._item = null; return true; } @@ -19,7 +19,7 @@ export class BotReceivedMessageParser implements IMessageParser if(!wrapper) return false; this._boughtAsGift = wrapper.readBoolean(); - this._item = new BotData(wrapper); + this._item = new BotData(wrapper); return true; } diff --git a/src/nitro/communication/messages/parser/catalog/CatalogIndexMessageParser.ts b/src/nitro/communication/messages/parser/catalog/CatalogIndexMessageParser.ts index 00102499..f955f9f5 100644 --- a/src/nitro/communication/messages/parser/catalog/CatalogIndexMessageParser.ts +++ b/src/nitro/communication/messages/parser/catalog/CatalogIndexMessageParser.ts @@ -18,9 +18,9 @@ export class CatalogIndexMessageParser implements IMessageParser { if(!wrapper) return false; - this._root = new NodeData(wrapper); + this._root = new NodeData(wrapper); this._newAdditionsAvailable = wrapper.readBoolean(); - this._catalogType = wrapper.readString(); + this._catalogType = wrapper.readString(); return true; } diff --git a/src/nitro/communication/messages/parser/catalog/CatalogPageMessageParser.ts b/src/nitro/communication/messages/parser/catalog/CatalogPageMessageParser.ts index f1450e2d..05d0afe3 100644 --- a/src/nitro/communication/messages/parser/catalog/CatalogPageMessageParser.ts +++ b/src/nitro/communication/messages/parser/catalog/CatalogPageMessageParser.ts @@ -16,14 +16,14 @@ export class CatalogPageMessageParser implements IMessageParser public flush(): boolean { - this._pageId = -1; - this._catalogType = null; - this._layoutCode = null; - this._localization = null; - this._offers = []; - this._offerId = -1; + this._pageId = -1; + this._catalogType = null; + this._layoutCode = null; + this._localization = null; + this._offers = []; + this._offerId = -1; this._acceptSeasonCurrencyAsCredits = false; - this._frontPageItems = []; + this._frontPageItems = []; return true; } @@ -32,10 +32,10 @@ export class CatalogPageMessageParser implements IMessageParser { if(!wrapper) return false; - this._pageId = wrapper.readInt(); - this._catalogType = wrapper.readString(); - this._layoutCode = wrapper.readString(); - this._localization = new CatalogLocalizationData(wrapper); + this._pageId = wrapper.readInt(); + this._catalogType = wrapper.readString(); + this._layoutCode = wrapper.readString(); + this._localization = new CatalogLocalizationData(wrapper); let totalOffers = wrapper.readInt(); @@ -46,7 +46,7 @@ export class CatalogPageMessageParser implements IMessageParser totalOffers--; } - this._offerId = wrapper.readInt(); + this._offerId = wrapper.readInt(); this._acceptSeasonCurrencyAsCredits = wrapper.readBoolean(); if(wrapper.bytesAvailable) diff --git a/src/nitro/communication/messages/parser/catalog/CatalogPublishedMessageParser.ts b/src/nitro/communication/messages/parser/catalog/CatalogPublishedMessageParser.ts index b04564bd..20200038 100644 --- a/src/nitro/communication/messages/parser/catalog/CatalogPublishedMessageParser.ts +++ b/src/nitro/communication/messages/parser/catalog/CatalogPublishedMessageParser.ts @@ -8,7 +8,7 @@ export class CatalogPublishedMessageParser implements IMessageParser public flush(): boolean { this._instantlyRefreshCatalogue = false; - this._newFurniDataHash = null; + this._newFurniDataHash = null; return true; } diff --git a/src/nitro/communication/messages/parser/catalog/ClubGiftInfoParser.ts b/src/nitro/communication/messages/parser/catalog/ClubGiftInfoParser.ts index 64d106b0..bd700f20 100644 --- a/src/nitro/communication/messages/parser/catalog/ClubGiftInfoParser.ts +++ b/src/nitro/communication/messages/parser/catalog/ClubGiftInfoParser.ts @@ -47,7 +47,7 @@ export class ClubGiftInfoParser implements IMessageParser return this._offers; } - public get daysUntilNextGift(): number + public get daysUntilNextGift(): number { return this._daysUntilNextGift; } @@ -70,7 +70,7 @@ export class ClubGiftInfoParser implements IMessageParser } - public get giftData():Map + public get giftData():Map { return this._giftData; } diff --git a/src/nitro/communication/messages/parser/catalog/GiftWrappingConfigurationParser.ts b/src/nitro/communication/messages/parser/catalog/GiftWrappingConfigurationParser.ts index 7c618a0a..8b542dde 100644 --- a/src/nitro/communication/messages/parser/catalog/GiftWrappingConfigurationParser.ts +++ b/src/nitro/communication/messages/parser/catalog/GiftWrappingConfigurationParser.ts @@ -28,7 +28,7 @@ export class GiftWrappingConfigurationParser implements IMessageParser const boxTypes = []; const ribbonTypes = []; const giftFurnis = []; - this._isEnabled = wrapper.readBoolean(); + this._isEnabled = wrapper.readBoolean(); // hotel.gifts.special.price this._price = wrapper.readInt(); diff --git a/src/nitro/communication/messages/parser/catalog/PurchaseErrorMessageParser.ts b/src/nitro/communication/messages/parser/catalog/PurchaseErrorMessageParser.ts index 10796a3a..498e2c7b 100644 --- a/src/nitro/communication/messages/parser/catalog/PurchaseErrorMessageParser.ts +++ b/src/nitro/communication/messages/parser/catalog/PurchaseErrorMessageParser.ts @@ -6,7 +6,7 @@ export class PurchaseErrorMessageParser implements IMessageParser public flush(): boolean { - this._code = 0; + this._code = 0; return true; } diff --git a/src/nitro/communication/messages/parser/catalog/PurchaseNotAllowedMessageParser.ts b/src/nitro/communication/messages/parser/catalog/PurchaseNotAllowedMessageParser.ts index 203fccf8..ee076b8f 100644 --- a/src/nitro/communication/messages/parser/catalog/PurchaseNotAllowedMessageParser.ts +++ b/src/nitro/communication/messages/parser/catalog/PurchaseNotAllowedMessageParser.ts @@ -6,7 +6,7 @@ export class PurchaseNotAllowedMessageParser implements IMessageParser public flush(): boolean { - this._code = 0; + this._code = 0; return true; } diff --git a/src/nitro/communication/messages/parser/catalog/SellablePetPaletteData.ts b/src/nitro/communication/messages/parser/catalog/SellablePetPaletteData.ts index d87f02ea..90c4ebf2 100644 --- a/src/nitro/communication/messages/parser/catalog/SellablePetPaletteData.ts +++ b/src/nitro/communication/messages/parser/catalog/SellablePetPaletteData.ts @@ -18,11 +18,11 @@ export class SellablePetPaletteData public flush(): boolean { - this._type = -1; - this._breedId = -1; + this._type = -1; + this._breedId = -1; this._paletteId = -1; - this._sellable = false; - this._rare = false; + this._sellable = false; + this._rare = false; return true; } @@ -31,11 +31,11 @@ export class SellablePetPaletteData { if(!wrapper) return false; - this._type = wrapper.readInt(); - this._breedId = wrapper.readInt(); + this._type = wrapper.readInt(); + this._breedId = wrapper.readInt(); this._paletteId = wrapper.readInt(); - this._sellable = wrapper.readBoolean(); - this._rare = wrapper.readBoolean(); + this._sellable = wrapper.readBoolean(); + this._rare = wrapper.readBoolean(); return true; } diff --git a/src/nitro/communication/messages/parser/catalog/SellablePetPalettesParser.ts b/src/nitro/communication/messages/parser/catalog/SellablePetPalettesParser.ts index 36f47a60..2d570d1a 100644 --- a/src/nitro/communication/messages/parser/catalog/SellablePetPalettesParser.ts +++ b/src/nitro/communication/messages/parser/catalog/SellablePetPalettesParser.ts @@ -8,8 +8,8 @@ export class SellablePetPalettesParser implements IMessageParser public flush(): boolean { - this._productCode = ''; - this._palettes = []; + this._productCode = ''; + this._palettes = []; return true; } diff --git a/src/nitro/communication/messages/parser/friendlist/FriendListFragmentMessageParser.ts b/src/nitro/communication/messages/parser/friendlist/FriendListFragmentMessageParser.ts index 1997a972..40c74615 100644 --- a/src/nitro/communication/messages/parser/friendlist/FriendListFragmentMessageParser.ts +++ b/src/nitro/communication/messages/parser/friendlist/FriendListFragmentMessageParser.ts @@ -9,9 +9,9 @@ export class FriendListFragmentParser implements IMessageParser public flush(): boolean { - this._totalFragments = 0; - this._fragmentNumber = 0; - this._fragment = []; + this._totalFragments = 0; + this._fragmentNumber = 0; + this._fragment = []; return true; } @@ -20,8 +20,8 @@ export class FriendListFragmentParser implements IMessageParser { if(!wrapper) return false; - this._totalFragments = wrapper.readInt(); - this._fragmentNumber = wrapper.readInt(); + this._totalFragments = wrapper.readInt(); + this._fragmentNumber = wrapper.readInt(); let totalFriends = wrapper.readInt(); diff --git a/src/nitro/communication/messages/parser/friendlist/FriendListUpdateParser.ts b/src/nitro/communication/messages/parser/friendlist/FriendListUpdateParser.ts index 9666a683..db2765ca 100644 --- a/src/nitro/communication/messages/parser/friendlist/FriendListUpdateParser.ts +++ b/src/nitro/communication/messages/parser/friendlist/FriendListUpdateParser.ts @@ -11,10 +11,10 @@ export class FriendListUpdateParser implements IMessageParser public flush(): boolean { - this._categories = []; - this._removedFriendIds = []; - this._addedFriends = []; - this._updatedFriends = []; + this._categories = []; + this._removedFriendIds = []; + this._addedFriends = []; + this._updatedFriends = []; return true; } diff --git a/src/nitro/communication/messages/parser/friendlist/FriendNotificationParser.ts b/src/nitro/communication/messages/parser/friendlist/FriendNotificationParser.ts index fca63268..8d7bfc4c 100644 --- a/src/nitro/communication/messages/parser/friendlist/FriendNotificationParser.ts +++ b/src/nitro/communication/messages/parser/friendlist/FriendNotificationParser.ts @@ -8,9 +8,9 @@ export class FriendNotificationParser implements IMessageParser public flush(): boolean { - this._typeCode = -1; - this._avatarId = 0; - this._message = null; + this._typeCode = -1; + this._avatarId = 0; + this._message = null; return true; } @@ -19,9 +19,9 @@ export class FriendNotificationParser implements IMessageParser { if(!wrapper) return false; - this._typeCode = wrapper.readInt(); - this._avatarId = wrapper.readInt(); - this._message = wrapper.readString(); + this._typeCode = wrapper.readInt(); + this._avatarId = wrapper.readInt(); + this._message = wrapper.readString(); return true; } diff --git a/src/nitro/communication/messages/parser/friendlist/FriendRequestsParser.ts b/src/nitro/communication/messages/parser/friendlist/FriendRequestsParser.ts index 5097f9f4..4fcd1b9b 100644 --- a/src/nitro/communication/messages/parser/friendlist/FriendRequestsParser.ts +++ b/src/nitro/communication/messages/parser/friendlist/FriendRequestsParser.ts @@ -9,7 +9,7 @@ export class FriendRequestsParser implements IMessageParser public flush(): boolean { this._totalRequests = 0; - this._requests = []; + this._requests = []; return true; } diff --git a/src/nitro/communication/messages/parser/friendlist/HabboSearchResultParser.ts b/src/nitro/communication/messages/parser/friendlist/HabboSearchResultParser.ts index f2f0d876..2e16e120 100644 --- a/src/nitro/communication/messages/parser/friendlist/HabboSearchResultParser.ts +++ b/src/nitro/communication/messages/parser/friendlist/HabboSearchResultParser.ts @@ -8,8 +8,8 @@ export class HabboSearchResultParser implements IMessageParser public flush(): boolean { - this._friends = []; - this._others = []; + this._friends = []; + this._others = []; return true; } diff --git a/src/nitro/communication/messages/parser/friendlist/InstantMessageErrorParser.ts b/src/nitro/communication/messages/parser/friendlist/InstantMessageErrorParser.ts index 3b1e8ea2..560f3e16 100644 --- a/src/nitro/communication/messages/parser/friendlist/InstantMessageErrorParser.ts +++ b/src/nitro/communication/messages/parser/friendlist/InstantMessageErrorParser.ts @@ -9,8 +9,8 @@ export class InstantMessageErrorParser implements IMessageParser public flush(): boolean { this._errorCode = 0; - this._userId = 0; - this._message = null; + this._userId = 0; + this._message = null; return true; } @@ -20,8 +20,8 @@ export class InstantMessageErrorParser implements IMessageParser if(!wrapper) return false; this._errorCode = wrapper.readInt(); - this._userId = wrapper.readInt(); - this._message = wrapper.readString(); + this._userId = wrapper.readInt(); + this._message = wrapper.readString(); return true; } diff --git a/src/nitro/communication/messages/parser/friendlist/MessageErrorParser.ts b/src/nitro/communication/messages/parser/friendlist/MessageErrorParser.ts index 47104896..80967fff 100644 --- a/src/nitro/communication/messages/parser/friendlist/MessageErrorParser.ts +++ b/src/nitro/communication/messages/parser/friendlist/MessageErrorParser.ts @@ -7,8 +7,8 @@ export class MessageErrorParser implements IMessageParser public flush(): boolean { - this._clientMessageId = 0; - this._errorCode = 0; + this._clientMessageId = 0; + this._errorCode = 0; return true; } @@ -17,8 +17,8 @@ export class MessageErrorParser implements IMessageParser { if(!wrapper) return false; - this._clientMessageId = wrapper.readInt(); - this._errorCode = wrapper.readInt(); + this._clientMessageId = wrapper.readInt(); + this._errorCode = wrapper.readInt(); return true; } diff --git a/src/nitro/communication/messages/parser/friendlist/MessengerInitParser.ts b/src/nitro/communication/messages/parser/friendlist/MessengerInitParser.ts index 6dfe5f6a..ab9397ec 100644 --- a/src/nitro/communication/messages/parser/friendlist/MessengerInitParser.ts +++ b/src/nitro/communication/messages/parser/friendlist/MessengerInitParser.ts @@ -10,10 +10,10 @@ export class MessengerInitParser implements IMessageParser public flush(): boolean { - this._userFriendLimit = 0; - this._normalFriendLimit = 0; - this._extendedFriendLimit = 0; - this._categories = []; + this._userFriendLimit = 0; + this._normalFriendLimit = 0; + this._extendedFriendLimit = 0; + this._categories = []; return true; } @@ -21,9 +21,9 @@ export class MessengerInitParser implements IMessageParser { if(!wrapper) return false; - this._userFriendLimit = wrapper.readInt(); - this._normalFriendLimit = wrapper.readInt(); - this._extendedFriendLimit = wrapper.readInt(); + this._userFriendLimit = wrapper.readInt(); + this._normalFriendLimit = wrapper.readInt(); + this._extendedFriendLimit = wrapper.readInt(); let totalCategories = wrapper.readInt(); diff --git a/src/nitro/communication/messages/parser/friendlist/NewConsoleMessageParser.ts b/src/nitro/communication/messages/parser/friendlist/NewConsoleMessageParser.ts index d6d9c161..24f9c65a 100644 --- a/src/nitro/communication/messages/parser/friendlist/NewConsoleMessageParser.ts +++ b/src/nitro/communication/messages/parser/friendlist/NewConsoleMessageParser.ts @@ -9,10 +9,10 @@ export class NewConsoleMessageParser implements IMessageParser public flush(): boolean { - this._senderId = 0; - this._messageText = null; - this._secondsSinceSent = 0; - this._extraData = null; + this._senderId = 0; + this._messageText = null; + this._secondsSinceSent = 0; + this._extraData = null; return true; } @@ -21,9 +21,9 @@ export class NewConsoleMessageParser implements IMessageParser { if(!wrapper) return false; - this._senderId = wrapper.readInt(); - this._messageText = wrapper.readString(); - this._secondsSinceSent = wrapper.readInt(); + this._senderId = wrapper.readInt(); + this._messageText = wrapper.readString(); + this._secondsSinceSent = wrapper.readInt(); if(wrapper.bytesAvailable) { diff --git a/src/nitro/communication/messages/parser/friendlist/RoomInviteErrorParser.ts b/src/nitro/communication/messages/parser/friendlist/RoomInviteErrorParser.ts index d5502972..cf5ab38f 100644 --- a/src/nitro/communication/messages/parser/friendlist/RoomInviteErrorParser.ts +++ b/src/nitro/communication/messages/parser/friendlist/RoomInviteErrorParser.ts @@ -7,8 +7,8 @@ export class RoomInviteErrorParser implements IMessageParser public flush(): boolean { - this._errorCode = 0; - this._failedRecipients = []; + this._errorCode = 0; + this._failedRecipients = []; return true; } diff --git a/src/nitro/communication/messages/parser/friendlist/RoomInviteMessageParser.ts b/src/nitro/communication/messages/parser/friendlist/RoomInviteMessageParser.ts index ad944051..8fa9b3fc 100644 --- a/src/nitro/communication/messages/parser/friendlist/RoomInviteMessageParser.ts +++ b/src/nitro/communication/messages/parser/friendlist/RoomInviteMessageParser.ts @@ -7,8 +7,8 @@ export class RoomInviteParser implements IMessageParser public flush(): boolean { - this._senderId = 0; - this._messageText = null; + this._senderId = 0; + this._messageText = null; return true; } @@ -17,8 +17,8 @@ export class RoomInviteParser implements IMessageParser { if(!wrapper) return false; - this._senderId = wrapper.readInt(); - this._messageText = wrapper.readString(); + this._senderId = wrapper.readInt(); + this._messageText = wrapper.readString(); return true; } diff --git a/src/nitro/communication/messages/parser/game/LoadGameUrlParser.ts b/src/nitro/communication/messages/parser/game/LoadGameUrlParser.ts index 6ba94f35..cb371770 100644 --- a/src/nitro/communication/messages/parser/game/LoadGameUrlParser.ts +++ b/src/nitro/communication/messages/parser/game/LoadGameUrlParser.ts @@ -8,8 +8,8 @@ export class LoadGameUrlParser implements IMessageParser public flush(): boolean { - this._gameTypeId = 0; - this._url = null; + this._gameTypeId = 0; + this._url = null; this._gameClientId = null; return true; @@ -19,9 +19,9 @@ export class LoadGameUrlParser implements IMessageParser { if(!wrapper) return false; - this._gameTypeId = wrapper.readInt(); + this._gameTypeId = wrapper.readInt(); this._gameClientId = wrapper.readString(); - this._url = wrapper.readString(); + this._url = wrapper.readString(); return true; } diff --git a/src/nitro/communication/messages/parser/group/GroupBadgePartsParser.ts b/src/nitro/communication/messages/parser/group/GroupBadgePartsParser.ts index 8c051c9a..e5ce4ffe 100644 --- a/src/nitro/communication/messages/parser/group/GroupBadgePartsParser.ts +++ b/src/nitro/communication/messages/parser/group/GroupBadgePartsParser.ts @@ -10,11 +10,11 @@ export class GroupBadgePartsParser implements IMessageParser flush(): boolean { - this._bases = new Map(); - this._symbols = new Map(); - this._partColors = new Map(); - this._colorsA = new Map(); - this._colorsB = new Map(); + this._bases = new Map(); + this._symbols = new Map(); + this._partColors = new Map(); + this._colorsA = new Map(); + this._colorsB = new Map(); return true; } @@ -27,9 +27,9 @@ export class GroupBadgePartsParser implements IMessageParser while(basesCount > 0) { - const id = wrapper.readInt(); - const valueA = wrapper.readString(); - const valueB = wrapper.readString(); + const id = wrapper.readInt(); + const valueA = wrapper.readString(); + const valueB = wrapper.readString(); this._bases.set(id, [valueA, valueB]); basesCount--; @@ -39,9 +39,9 @@ export class GroupBadgePartsParser implements IMessageParser while(symbolsCount > 0) { - const id = wrapper.readInt(); - const valueA = wrapper.readString(); - const valueB = wrapper.readString(); + const id = wrapper.readInt(); + const valueA = wrapper.readString(); + const valueB = wrapper.readString(); this._symbols.set(id, [valueA, valueB]); symbolsCount--; @@ -51,7 +51,7 @@ export class GroupBadgePartsParser implements IMessageParser while(partColorsCount > 0) { - const id = wrapper.readInt(); + const id = wrapper.readInt(); const color = wrapper.readString(); this._partColors.set(id, color); @@ -62,7 +62,7 @@ export class GroupBadgePartsParser implements IMessageParser while(colorsACount > 0) { - const id = wrapper.readInt(); + const id = wrapper.readInt(); const color = wrapper.readString(); this._colorsA.set(id, color); @@ -73,7 +73,7 @@ export class GroupBadgePartsParser implements IMessageParser while(colorsBCount > 0) { - const id = wrapper.readInt(); + const id = wrapper.readInt(); const color = wrapper.readString(); this._colorsB.set(id, color); diff --git a/src/nitro/communication/messages/parser/group/GroupBadgesParser.ts b/src/nitro/communication/messages/parser/group/GroupBadgesParser.ts index 85789225..2853b362 100644 --- a/src/nitro/communication/messages/parser/group/GroupBadgesParser.ts +++ b/src/nitro/communication/messages/parser/group/GroupBadgesParser.ts @@ -19,7 +19,7 @@ export class GroupBadgesParser implements IMessageParser while(badgesCount > 0) { - const id = wrapper.readInt(); + const id = wrapper.readInt(); const badge = wrapper.readString(); this._badges.set(id, badge); diff --git a/src/nitro/communication/messages/parser/group/GroupBuyDataParser.ts b/src/nitro/communication/messages/parser/group/GroupBuyDataParser.ts index fd17e5b9..74876831 100644 --- a/src/nitro/communication/messages/parser/group/GroupBuyDataParser.ts +++ b/src/nitro/communication/messages/parser/group/GroupBuyDataParser.ts @@ -7,8 +7,8 @@ export class GroupBuyDataParser implements IMessageParser flush(): boolean { - this._groupCost = 0; - this._availableRooms = new Map(); + this._groupCost = 0; + this._availableRooms = new Map(); return true; } @@ -22,8 +22,8 @@ export class GroupBuyDataParser implements IMessageParser while(availableRoomsCount > 0) { - const roomId = wrapper.readInt(); - const roomName = wrapper.readString(); + const roomId = wrapper.readInt(); + const roomName = wrapper.readString(); wrapper.readBoolean(); this._availableRooms.set(roomId, roomName); diff --git a/src/nitro/communication/messages/parser/group/GroupConfirmMemberRemoveParser.ts b/src/nitro/communication/messages/parser/group/GroupConfirmMemberRemoveParser.ts index d97cb97f..61d3ca8f 100644 --- a/src/nitro/communication/messages/parser/group/GroupConfirmMemberRemoveParser.ts +++ b/src/nitro/communication/messages/parser/group/GroupConfirmMemberRemoveParser.ts @@ -7,8 +7,8 @@ export class GroupConfirmMemberRemoveParser implements IMessageParser flush(): boolean { - this._userId = 0; - this._furnitureCount = 0; + this._userId = 0; + this._furnitureCount = 0; return true; } @@ -17,8 +17,8 @@ export class GroupConfirmMemberRemoveParser implements IMessageParser { if(!wrapper) return false; - this._userId = wrapper.readInt(); - this._furnitureCount = wrapper.readInt(); + this._userId = wrapper.readInt(); + this._furnitureCount = wrapper.readInt(); return true; } diff --git a/src/nitro/communication/messages/parser/group/GroupInformationParser.ts b/src/nitro/communication/messages/parser/group/GroupInformationParser.ts index 0100dcfa..1db278cd 100644 --- a/src/nitro/communication/messages/parser/group/GroupInformationParser.ts +++ b/src/nitro/communication/messages/parser/group/GroupInformationParser.ts @@ -22,23 +22,23 @@ export class GroupInformationParser implements IMessageParser public flush(): boolean { - this._id = 0; - this._type = 0; - this._title = null; - this._description = null; - this._badge = null; - this._roomId = 0; - this._roomName = null; - this._membershipType = 0; - this._membersCount = 0; - this._isFavorite = false; - this._createdAt = null; - this._isOwner = false; - this._isAdmin = false; - this._ownerName = null; - this._flag = false; - this._canMembersDecorate = false; - this._pendingRequestsCount = 0; + this._id = 0; + this._type = 0; + this._title = null; + this._description = null; + this._badge = null; + this._roomId = 0; + this._roomName = null; + this._membershipType = 0; + this._membersCount = 0; + this._isFavorite = false; + this._createdAt = null; + this._isOwner = false; + this._isAdmin = false; + this._ownerName = null; + this._flag = false; + this._canMembersDecorate = false; + this._pendingRequestsCount = 0; return true; } @@ -47,24 +47,24 @@ export class GroupInformationParser implements IMessageParser { if(!wrapper) return false; - this._id = wrapper.readInt(); + this._id = wrapper.readInt(); wrapper.readBoolean(); - this._type = wrapper.readInt(); - this._title = wrapper.readString(); - this._description = wrapper.readString(); - this._badge = wrapper.readString(); - this._roomId = wrapper.readInt(); - this._roomName = wrapper.readString(); - this._membershipType = wrapper.readInt(); - this._membersCount = wrapper.readInt(); - this._isFavorite = wrapper.readBoolean(); - this._createdAt = wrapper.readString(); - this._isOwner = wrapper.readBoolean(); - this._isAdmin = wrapper.readBoolean(); - this._ownerName = wrapper.readString(); - this._flag = wrapper.readBoolean(); - this._canMembersDecorate = wrapper.readBoolean(); - this._pendingRequestsCount = wrapper.readInt(); + this._type = wrapper.readInt(); + this._title = wrapper.readString(); + this._description = wrapper.readString(); + this._badge = wrapper.readString(); + this._roomId = wrapper.readInt(); + this._roomName = wrapper.readString(); + this._membershipType = wrapper.readInt(); + this._membersCount = wrapper.readInt(); + this._isFavorite = wrapper.readBoolean(); + this._createdAt = wrapper.readString(); + this._isOwner = wrapper.readBoolean(); + this._isAdmin = wrapper.readBoolean(); + this._ownerName = wrapper.readString(); + this._flag = wrapper.readBoolean(); + this._canMembersDecorate = wrapper.readBoolean(); + this._pendingRequestsCount = wrapper.readInt(); return true; } diff --git a/src/nitro/communication/messages/parser/group/GroupMembersParser.ts b/src/nitro/communication/messages/parser/group/GroupMembersParser.ts index 570b509a..5a992918 100644 --- a/src/nitro/communication/messages/parser/group/GroupMembersParser.ts +++ b/src/nitro/communication/messages/parser/group/GroupMembersParser.ts @@ -17,17 +17,17 @@ export class GroupMembersParser implements IMessageParser public flush(): boolean { - this._groupId = 0; - this._groupTitle = null; - this._roomId = 0; - this._badge = null; + this._groupId = 0; + this._groupTitle = null; + this._roomId = 0; + this._badge = null; this._totalMembersCount = 0; - this._result = []; - this._admin = false; - this._pageSize = 0; - this._pageIndex = 0; - this._level = 0; - this._query = null; + this._result = []; + this._admin = false; + this._pageSize = 0; + this._pageIndex = 0; + this._level = 0; + this._query = null; return true; } @@ -36,13 +36,13 @@ export class GroupMembersParser implements IMessageParser { if(!wrapper) return false; - this._groupId = wrapper.readInt(); - this._groupTitle = wrapper.readString(); - this._roomId = wrapper.readInt(); - this._badge = wrapper.readString(); + this._groupId = wrapper.readInt(); + this._groupTitle = wrapper.readString(); + this._roomId = wrapper.readInt(); + this._badge = wrapper.readString(); this._totalMembersCount = wrapper.readInt(); - let resultCount = wrapper.readInt(); + let resultCount = wrapper.readInt(); while(resultCount > 0) { @@ -51,11 +51,11 @@ export class GroupMembersParser implements IMessageParser resultCount--; } - this._admin = wrapper.readBoolean(); - this._pageSize = wrapper.readInt(); - this._pageIndex = wrapper.readInt(); - this._level = wrapper.readInt(); - this._query = wrapper.readString(); + this._admin = wrapper.readBoolean(); + this._pageSize = wrapper.readInt(); + this._pageIndex = wrapper.readInt(); + this._level = wrapper.readInt(); + this._query = wrapper.readString(); return true; } diff --git a/src/nitro/communication/messages/parser/group/GroupPurchasedParser.ts b/src/nitro/communication/messages/parser/group/GroupPurchasedParser.ts index 6696bd62..e58b0caf 100644 --- a/src/nitro/communication/messages/parser/group/GroupPurchasedParser.ts +++ b/src/nitro/communication/messages/parser/group/GroupPurchasedParser.ts @@ -7,8 +7,8 @@ export class GroupPurchasedParser implements IMessageParser flush(): boolean { - this._roomId = 0; - this._groupId = 0; + this._roomId = 0; + this._groupId = 0; return true; } @@ -17,8 +17,8 @@ export class GroupPurchasedParser implements IMessageParser { if(!wrapper) return false; - this._roomId = wrapper.readInt(); - this._groupId = wrapper.readInt(); + this._roomId = wrapper.readInt(); + this._groupId = wrapper.readInt(); return true; } diff --git a/src/nitro/communication/messages/parser/group/GroupSettingsParser.ts b/src/nitro/communication/messages/parser/group/GroupSettingsParser.ts index 291033fb..07f34d90 100644 --- a/src/nitro/communication/messages/parser/group/GroupSettingsParser.ts +++ b/src/nitro/communication/messages/parser/group/GroupSettingsParser.ts @@ -18,18 +18,18 @@ export class GroupSettingsParser implements IMessageParser public flush(): boolean { - this._roomId = 0; - this._roomName = null; - this._id = 0; - this._title = null; - this._description = null; - this._colorA = 0; - this._colorB = 0; - this._state = 0; - this._canMembersDecorate = false; - this._badgeParts = new Map(); - this._badgeCode = null; - this._membersCount = 0; + this._roomId = 0; + this._roomName = null; + this._id = 0; + this._title = null; + this._description = null; + this._colorA = 0; + this._colorB = 0; + this._state = 0; + this._canMembersDecorate = false; + this._badgeParts = new Map(); + this._badgeCode = null; + this._membersCount = 0; return true; } @@ -42,36 +42,36 @@ export class GroupSettingsParser implements IMessageParser if(hasRoomData === 1) { - this._roomId = wrapper.readInt(); - this._roomName = wrapper.readString(); + this._roomId = wrapper.readInt(); + this._roomName = wrapper.readString(); wrapper.readBoolean(); } wrapper.readBoolean(); - this._id = wrapper.readInt(); - this._title = wrapper.readString(); - this._description = wrapper.readString(); + this._id = wrapper.readInt(); + this._title = wrapper.readString(); + this._description = wrapper.readString(); wrapper.readInt(); - this._colorA = wrapper.readInt(); - this._colorB = wrapper.readInt(); - this._state = wrapper.readInt(); - this._canMembersDecorate = wrapper.readInt() === 0; + this._colorA = wrapper.readInt(); + this._colorB = wrapper.readInt(); + this._state = wrapper.readInt(); + this._canMembersDecorate = wrapper.readInt() === 0; wrapper.readBoolean(); wrapper.readString(); - const badgePartsCount = wrapper.readInt(); + const badgePartsCount = wrapper.readInt(); for(let i = 0; i < badgePartsCount; i++) { - const part = new GroupDataBadgePart(i === 0); + const part = new GroupDataBadgePart(i === 0); - part.key = wrapper.readInt(); - part.color = wrapper.readInt(); - part.position = wrapper.readInt(); + part.key = wrapper.readInt(); + part.color = wrapper.readInt(); + part.position = wrapper.readInt(); if(part.key === 0) { @@ -81,8 +81,8 @@ export class GroupSettingsParser implements IMessageParser this._badgeParts.set(i, part); } - this._badgeCode = wrapper.readString(); - this._membersCount = wrapper.readInt(); + this._badgeCode = wrapper.readString(); + this._membersCount = wrapper.readInt(); return true; } diff --git a/src/nitro/communication/messages/parser/group/utils/GroupMemberParser.ts b/src/nitro/communication/messages/parser/group/utils/GroupMemberParser.ts index 276eeb8c..0c12bc22 100644 --- a/src/nitro/communication/messages/parser/group/utils/GroupMemberParser.ts +++ b/src/nitro/communication/messages/parser/group/utils/GroupMemberParser.ts @@ -2,11 +2,11 @@ import { IMessageDataWrapper } from '../../../../../../core'; export class GroupRank { - public static readonly OWNER: number = 0; - public static readonly ADMIN: number = 1; - public static readonly MEMBER: number = 2; - public static readonly REQUESTED: number = 3; - public static readonly DELETED: number = 4; + public static readonly OWNER: number = 0; + public static readonly ADMIN: number = 1; + public static readonly MEMBER: number = 2; + public static readonly REQUESTED: number = 3; + public static readonly DELETED: number = 4; } export class GroupMemberParser @@ -27,11 +27,11 @@ export class GroupMemberParser public flush(): boolean { - this._rank = -1; - this._id = 0; - this._name = null; - this._figure = null; - this._joinedAt = null; + this._rank = -1; + this._id = 0; + this._name = null; + this._figure = null; + this._joinedAt = null; return true; } @@ -40,11 +40,11 @@ export class GroupMemberParser { if(!wrapper) return false; - this._rank = wrapper.readInt(); - this._id = wrapper.readInt(); - this._name = wrapper.readString(); - this._figure = wrapper.readString(); - this._joinedAt = wrapper.readString(); + this._rank = wrapper.readInt(); + this._id = wrapper.readInt(); + this._name = wrapper.readString(); + this._figure = wrapper.readString(); + this._joinedAt = wrapper.readString(); return true; } diff --git a/src/nitro/communication/messages/parser/help/CallForHelpResultMessageParser.ts b/src/nitro/communication/messages/parser/help/CallForHelpResultMessageParser.ts index a1e34395..bbdef8dd 100644 --- a/src/nitro/communication/messages/parser/help/CallForHelpResultMessageParser.ts +++ b/src/nitro/communication/messages/parser/help/CallForHelpResultMessageParser.ts @@ -7,8 +7,8 @@ export class CallForHelpResultMessageParser implements IMessageParser public flush(): boolean { - this._resultType = 0; - this._messageText = null; + this._resultType = 0; + this._messageText = null; return true; } @@ -17,8 +17,8 @@ export class CallForHelpResultMessageParser implements IMessageParser { if(!wrapper) return false; - this._resultType = wrapper.readInt(); - this._messageText = wrapper.readString(); + this._resultType = wrapper.readInt(); + this._messageText = wrapper.readString(); return true; } diff --git a/src/nitro/communication/messages/parser/inventory/achievements/AchievementsParser.ts b/src/nitro/communication/messages/parser/inventory/achievements/AchievementsParser.ts index a8c7151b..a07d0c85 100644 --- a/src/nitro/communication/messages/parser/inventory/achievements/AchievementsParser.ts +++ b/src/nitro/communication/messages/parser/inventory/achievements/AchievementsParser.ts @@ -9,8 +9,8 @@ export class AchievementsParser implements IMessageParser public flush(): boolean { - this._achievements = []; - this._defaultCategory = null; + this._achievements = []; + this._defaultCategory = null; return true; } diff --git a/src/nitro/communication/messages/parser/inventory/avatareffect/AvatarEffectActivatedParser.ts b/src/nitro/communication/messages/parser/inventory/avatareffect/AvatarEffectActivatedParser.ts index efd3f5aa..f22936d3 100644 --- a/src/nitro/communication/messages/parser/inventory/avatareffect/AvatarEffectActivatedParser.ts +++ b/src/nitro/communication/messages/parser/inventory/avatareffect/AvatarEffectActivatedParser.ts @@ -8,9 +8,9 @@ export class AvatarEffectActivatedParser implements IMessageParser public flush(): boolean { - this._type = 0; - this._duration = 0; - this._isPermanent = false; + this._type = 0; + this._duration = 0; + this._isPermanent = false; return true; } @@ -19,9 +19,9 @@ export class AvatarEffectActivatedParser implements IMessageParser { if(!wrapper) return false; - this._type = wrapper.readInt(); - this._duration = wrapper.readInt(); - this._isPermanent = wrapper.readBoolean(); + this._type = wrapper.readInt(); + this._duration = wrapper.readInt(); + this._isPermanent = wrapper.readBoolean(); return true; } diff --git a/src/nitro/communication/messages/parser/inventory/avatareffect/AvatarEffectAddedParser.ts b/src/nitro/communication/messages/parser/inventory/avatareffect/AvatarEffectAddedParser.ts index 26b498ae..be7874cd 100644 --- a/src/nitro/communication/messages/parser/inventory/avatareffect/AvatarEffectAddedParser.ts +++ b/src/nitro/communication/messages/parser/inventory/avatareffect/AvatarEffectAddedParser.ts @@ -9,10 +9,10 @@ export class AvatarEffectAddedParser implements IMessageParser public flush(): boolean { - this._type = 0; - this._subType = 0; - this._duration = 0; - this._permanent = false; + this._type = 0; + this._subType = 0; + this._duration = 0; + this._permanent = false; return true; } @@ -21,9 +21,9 @@ export class AvatarEffectAddedParser implements IMessageParser { if(!wrapper) return false; - this._type = wrapper.readInt(); - this._subType = wrapper.readInt(); - this._duration = wrapper.readInt(); + this._type = wrapper.readInt(); + this._subType = wrapper.readInt(); + this._duration = wrapper.readInt(); this._permanent = wrapper.readBoolean(); return true; diff --git a/src/nitro/communication/messages/parser/inventory/avatareffect/AvatarEffectsParser.ts b/src/nitro/communication/messages/parser/inventory/avatareffect/AvatarEffectsParser.ts index 8161a934..7b4f72a9 100644 --- a/src/nitro/communication/messages/parser/inventory/avatareffect/AvatarEffectsParser.ts +++ b/src/nitro/communication/messages/parser/inventory/avatareffect/AvatarEffectsParser.ts @@ -22,12 +22,12 @@ export class AvatarEffectsParser implements IMessageParser { const effect = new AvatarEffect(); - effect.type = wrapper.readInt(); - effect.subType = wrapper.readInt(); - effect.duration = wrapper.readInt(); - effect.inactiveEffectsInInventory = wrapper.readInt(); - effect.secondsLeftIfActive = wrapper.readInt(); - effect.isPermanent = wrapper.readBoolean(); + effect.type = wrapper.readInt(); + effect.subType = wrapper.readInt(); + effect.duration = wrapper.readInt(); + effect.inactiveEffectsInInventory = wrapper.readInt(); + effect.secondsLeftIfActive = wrapper.readInt(); + effect.isPermanent = wrapper.readBoolean(); this._effects.push(effect); diff --git a/src/nitro/communication/messages/parser/inventory/badges/BadgeAndPointLimit.ts b/src/nitro/communication/messages/parser/inventory/badges/BadgeAndPointLimit.ts index 1b0300a2..fa92f43a 100644 --- a/src/nitro/communication/messages/parser/inventory/badges/BadgeAndPointLimit.ts +++ b/src/nitro/communication/messages/parser/inventory/badges/BadgeAndPointLimit.ts @@ -9,8 +9,8 @@ export class BadgeAndPointLimit { if(!_arg_2) throw new Error('invalid_parser'); - this._badgeId = (('ACH_' + k) + _arg_2.readInt()); - this._limit = _arg_2.readInt(); + this._badgeId = (('ACH_' + k) + _arg_2.readInt()); + this._limit = _arg_2.readInt(); } public get badgeId(): string diff --git a/src/nitro/communication/messages/parser/inventory/badges/BadgeReceivedParser.ts b/src/nitro/communication/messages/parser/inventory/badges/BadgeReceivedParser.ts index 6c726548..36523ca7 100644 --- a/src/nitro/communication/messages/parser/inventory/badges/BadgeReceivedParser.ts +++ b/src/nitro/communication/messages/parser/inventory/badges/BadgeReceivedParser.ts @@ -7,8 +7,8 @@ export class BadgeReceivedParser implements IMessageParser public flush(): boolean { - this._badgeId = 0; - this._badgeCode = null; + this._badgeId = 0; + this._badgeCode = null; return true; } @@ -17,8 +17,8 @@ export class BadgeReceivedParser implements IMessageParser { if(!wrapper) return false; - this._badgeId = wrapper.readInt(); - this._badgeCode = wrapper.readString(); + this._badgeId = wrapper.readInt(); + this._badgeCode = wrapper.readString(); return true; } diff --git a/src/nitro/communication/messages/parser/inventory/badges/BadgesParser.ts b/src/nitro/communication/messages/parser/inventory/badges/BadgesParser.ts index f24420e4..334e18ee 100644 --- a/src/nitro/communication/messages/parser/inventory/badges/BadgesParser.ts +++ b/src/nitro/communication/messages/parser/inventory/badges/BadgesParser.ts @@ -9,9 +9,9 @@ export class BadgesParser implements IMessageParser public flush(): boolean { - this._allBadgeCodes = []; - this._activeBadgeCodes = []; - this._badgeIds = null; + this._allBadgeCodes = []; + this._activeBadgeCodes = []; + this._badgeIds = null; return true; } @@ -20,15 +20,15 @@ export class BadgesParser implements IMessageParser { if(!wrapper) return false; - this._allBadgeCodes = []; - this._activeBadgeCodes = []; - this._badgeIds = new AdvancedMap(); + this._allBadgeCodes = []; + this._activeBadgeCodes = []; + this._badgeIds = new AdvancedMap(); let count = wrapper.readInt(); while(count > 0) { - const badgeId = wrapper.readInt(); + const badgeId = wrapper.readInt(); const badgeCode = wrapper.readString(); this._badgeIds.add(badgeCode, badgeId); diff --git a/src/nitro/communication/messages/parser/inventory/clothing/FigureSetIdsMessageParser.ts b/src/nitro/communication/messages/parser/inventory/clothing/FigureSetIdsMessageParser.ts index 8b6b697a..18c99576 100644 --- a/src/nitro/communication/messages/parser/inventory/clothing/FigureSetIdsMessageParser.ts +++ b/src/nitro/communication/messages/parser/inventory/clothing/FigureSetIdsMessageParser.ts @@ -7,8 +7,8 @@ export class FigureSetIdsMessageParser implements IMessageParser public flush(): boolean { - this._figureSetIds = []; - this._boundFurnitureNames = []; + this._figureSetIds = []; + this._boundFurnitureNames = []; return true; } diff --git a/src/nitro/communication/messages/parser/inventory/furniture/FurnitureListParser.ts b/src/nitro/communication/messages/parser/inventory/furniture/FurnitureListParser.ts index 0464dee0..69119032 100644 --- a/src/nitro/communication/messages/parser/inventory/furniture/FurnitureListParser.ts +++ b/src/nitro/communication/messages/parser/inventory/furniture/FurnitureListParser.ts @@ -9,9 +9,9 @@ export class FurnitureListParser implements IMessageParser public flush(): boolean { - this._totalFragments = 0; - this._fragmentNumber = 0; - this._fragment = new Map(); + this._totalFragments = 0; + this._fragmentNumber = 0; + this._fragment = new Map(); return true; } @@ -20,8 +20,8 @@ export class FurnitureListParser implements IMessageParser { if(!wrapper) return false; - this._totalFragments = wrapper.readInt(); - this._fragmentNumber = wrapper.readInt(); + this._totalFragments = wrapper.readInt(); + this._fragmentNumber = wrapper.readInt(); let totalItems = wrapper.readInt(); diff --git a/src/nitro/communication/messages/parser/inventory/furniture/FurniturePostItPlacedParser.ts b/src/nitro/communication/messages/parser/inventory/furniture/FurniturePostItPlacedParser.ts index 730360c7..d6e12b0e 100644 --- a/src/nitro/communication/messages/parser/inventory/furniture/FurniturePostItPlacedParser.ts +++ b/src/nitro/communication/messages/parser/inventory/furniture/FurniturePostItPlacedParser.ts @@ -7,7 +7,7 @@ export class FurniturePostItPlacedParser implements IMessageParser public flush(): boolean { - this._itemId = 0; + this._itemId = 0; this._itemsLeft = 0; return true; @@ -17,7 +17,7 @@ export class FurniturePostItPlacedParser implements IMessageParser { if(!wrapper) return false; - this._itemId = wrapper.readInt(); + this._itemId = wrapper.readInt(); this._itemsLeft = wrapper.readInt(); return true; diff --git a/src/nitro/communication/messages/parser/inventory/furniture/utils/FurnitureListItemParser.ts b/src/nitro/communication/messages/parser/inventory/furniture/utils/FurnitureListItemParser.ts index 8a18efa4..bcc2f1ff 100644 --- a/src/nitro/communication/messages/parser/inventory/furniture/utils/FurnitureListItemParser.ts +++ b/src/nitro/communication/messages/parser/inventory/furniture/utils/FurnitureListItemParser.ts @@ -39,25 +39,25 @@ export class FurnitureListItemParser implements IFurnitureItemData public flush(): boolean { - this._rentable = false; - this._itemId = 0; - this._furniType = null; - this._ref = 0; - this._spriteId = 0; - this._category = 0; - this._stuffData = null; - this._isGroupable = false; - this._isRecyclable = false; - this._tradable = false; - this._sellable = false; - this._secondsToExpiration = 0; - this._extra = 0; - this._flatId = 0; - this._isWallItem = false; - this._hasRentPeriodStarted = false; - this._expirationTimeStamp = 0; - this._slotId = ''; - this._songId = -1; + this._rentable = false; + this._itemId = 0; + this._furniType = null; + this._ref = 0; + this._spriteId = 0; + this._category = 0; + this._stuffData = null; + this._isGroupable = false; + this._isRecyclable = false; + this._tradable = false; + this._sellable = false; + this._secondsToExpiration = 0; + this._extra = 0; + this._flatId = 0; + this._isWallItem = false; + this._hasRentPeriodStarted = false; + this._expirationTimeStamp = 0; + this._slotId = ''; + this._songId = -1; return true; } @@ -66,18 +66,18 @@ export class FurnitureListItemParser implements IFurnitureItemData { if(!wrapper) return false; - this._itemId = wrapper.readInt(); - this._furniType = wrapper.readString(); - this._ref = wrapper.readInt(); - this._spriteId = wrapper.readInt(); - this._category = wrapper.readInt(); - this._stuffData = FurnitureDataParser.parseObjectData(wrapper); - this._isRecyclable = wrapper.readBoolean(); - this._tradable = wrapper.readBoolean(); - this._isGroupable = wrapper.readBoolean(); - this._sellable = wrapper.readBoolean(); - this._secondsToExpiration = wrapper.readInt(); - this._expirationTimeStamp = Nitro.instance.time; + this._itemId = wrapper.readInt(); + this._furniType = wrapper.readString(); + this._ref = wrapper.readInt(); + this._spriteId = wrapper.readInt(); + this._category = wrapper.readInt(); + this._stuffData = FurnitureDataParser.parseObjectData(wrapper); + this._isRecyclable = wrapper.readBoolean(); + this._tradable = wrapper.readBoolean(); + this._isGroupable = wrapper.readBoolean(); + this._sellable = wrapper.readBoolean(); + this._secondsToExpiration = wrapper.readInt(); + this._expirationTimeStamp = Nitro.instance.time; if(this.secondsToExpiration > -1) { @@ -85,18 +85,18 @@ export class FurnitureListItemParser implements IFurnitureItemData } else { - this._rentable = false; - this._secondsToExpiration = -1; + this._rentable = false; + this._secondsToExpiration = -1; } - this._hasRentPeriodStarted = wrapper.readBoolean(); - this._flatId = wrapper.readInt(); - this._isWallItem = (this._furniType === FurnitureListItemParser.WALL_ITEM); + this._hasRentPeriodStarted = wrapper.readBoolean(); + this._flatId = wrapper.readInt(); + this._isWallItem = (this._furniType === FurnitureListItemParser.WALL_ITEM); if(this._furniType === FurnitureListItemParser.FLOOR_ITEM) { - this._slotId = wrapper.readString(); - this._extra = wrapper.readInt(); + this._slotId = wrapper.readString(); + this._extra = wrapper.readInt(); } return true; diff --git a/src/nitro/communication/messages/parser/inventory/pets/ConfirmBreedingRequestParser.ts b/src/nitro/communication/messages/parser/inventory/pets/ConfirmBreedingRequestParser.ts index d09d8435..23a3b424 100644 --- a/src/nitro/communication/messages/parser/inventory/pets/ConfirmBreedingRequestParser.ts +++ b/src/nitro/communication/messages/parser/inventory/pets/ConfirmBreedingRequestParser.ts @@ -37,9 +37,9 @@ export class ConfirmBreedingRequestParser implements IMessageParser { if(!wrapper) return false; - this._nestId = wrapper.readInt(); - this._pet1 = new BreedingPetInfo(wrapper); - this._pet2 = new BreedingPetInfo(wrapper); + this._nestId = wrapper.readInt(); + this._pet1 = new BreedingPetInfo(wrapper); + this._pet2 = new BreedingPetInfo(wrapper); let totalCount = wrapper.readInt(); diff --git a/src/nitro/communication/messages/parser/inventory/pets/ConfirmBreedingResultParser.ts b/src/nitro/communication/messages/parser/inventory/pets/ConfirmBreedingResultParser.ts index 5554e565..fa6b3438 100644 --- a/src/nitro/communication/messages/parser/inventory/pets/ConfirmBreedingResultParser.ts +++ b/src/nitro/communication/messages/parser/inventory/pets/ConfirmBreedingResultParser.ts @@ -7,8 +7,8 @@ export class ConfirmBreedingResultParser implements IMessageParser public flush(): boolean { - this._breedingNestStuffId = 0; - this._result = 0; + this._breedingNestStuffId = 0; + this._result = 0; return true; } @@ -17,8 +17,8 @@ export class ConfirmBreedingResultParser implements IMessageParser { if(!wrapper) return false; - this._breedingNestStuffId = wrapper.readInt(); - this._result = wrapper.readInt(); + this._breedingNestStuffId = wrapper.readInt(); + this._result = wrapper.readInt(); return true; } diff --git a/src/nitro/communication/messages/parser/inventory/pets/PetAddedToInventoryParser.ts b/src/nitro/communication/messages/parser/inventory/pets/PetAddedToInventoryParser.ts index a94682b7..7c248938 100644 --- a/src/nitro/communication/messages/parser/inventory/pets/PetAddedToInventoryParser.ts +++ b/src/nitro/communication/messages/parser/inventory/pets/PetAddedToInventoryParser.ts @@ -8,16 +8,16 @@ export class PetAddedToInventoryParser implements IMessageParser public flush(): boolean { - this._pet = null; - this._boughtAsGift = false; + this._pet = null; + this._boughtAsGift = false; return true; } public parse(wrapper: IMessageDataWrapper): boolean { - this._pet = new PetData(wrapper); - this._boughtAsGift = wrapper.readBoolean(); + this._pet = new PetData(wrapper); + this._boughtAsGift = wrapper.readBoolean(); return true; } diff --git a/src/nitro/communication/messages/parser/inventory/pets/PetBreedingMessageParser.ts b/src/nitro/communication/messages/parser/inventory/pets/PetBreedingMessageParser.ts index fadabdd0..22e56f71 100644 --- a/src/nitro/communication/messages/parser/inventory/pets/PetBreedingMessageParser.ts +++ b/src/nitro/communication/messages/parser/inventory/pets/PetBreedingMessageParser.ts @@ -12,9 +12,9 @@ export class PetBreedingMessageParser implements IMessageParser public flush(): boolean { - this._state = 0; - this._ownPetId = 0; - this._otherPetId = 0; + this._state = 0; + this._ownPetId = 0; + this._otherPetId = 0; return true; } @@ -23,9 +23,9 @@ export class PetBreedingMessageParser implements IMessageParser { if(!wrapper) return false; - this._state = wrapper.readInt(); - this._ownPetId = wrapper.readInt(); - this._otherPetId = wrapper.readInt(); + this._state = wrapper.readInt(); + this._ownPetId = wrapper.readInt(); + this._otherPetId = wrapper.readInt(); return true; } diff --git a/src/nitro/communication/messages/parser/inventory/pets/PetData.ts b/src/nitro/communication/messages/parser/inventory/pets/PetData.ts index 8b943797..293a3057 100644 --- a/src/nitro/communication/messages/parser/inventory/pets/PetData.ts +++ b/src/nitro/communication/messages/parser/inventory/pets/PetData.ts @@ -12,10 +12,10 @@ export class PetData { if(!wrapper) throw new Error('invalid_wrapper'); - this._id = wrapper.readInt(); - this._name = wrapper.readString(); - this._figureData = new PetFigureDataParser(wrapper); - this._level = wrapper.readInt(); + this._id = wrapper.readInt(); + this._name = wrapper.readString(); + this._figureData = new PetFigureDataParser(wrapper); + this._level = wrapper.readInt(); } public get id(): number diff --git a/src/nitro/communication/messages/parser/inventory/pets/PetFigureDataParser.ts b/src/nitro/communication/messages/parser/inventory/pets/PetFigureDataParser.ts index 1529468e..abf3cbe4 100644 --- a/src/nitro/communication/messages/parser/inventory/pets/PetFigureDataParser.ts +++ b/src/nitro/communication/messages/parser/inventory/pets/PetFigureDataParser.ts @@ -11,12 +11,12 @@ export class PetFigureDataParser constructor(wrapper: IMessageDataWrapper) { - this._typeId = wrapper.readInt(); - this._paletteId = wrapper.readInt(); - this._color = wrapper.readString(); - this._breedId = wrapper.readInt(); - this._customParts = []; - this._customPartCount = wrapper.readInt(); + this._typeId = wrapper.readInt(); + this._paletteId = wrapper.readInt(); + this._color = wrapper.readString(); + this._breedId = wrapper.readInt(); + this._customParts = []; + this._customPartCount = wrapper.readInt(); let i = 0; diff --git a/src/nitro/communication/messages/parser/inventory/trading/TradingAcceptParser.ts b/src/nitro/communication/messages/parser/inventory/trading/TradingAcceptParser.ts index 1c5b3ae9..afd1c590 100644 --- a/src/nitro/communication/messages/parser/inventory/trading/TradingAcceptParser.ts +++ b/src/nitro/communication/messages/parser/inventory/trading/TradingAcceptParser.ts @@ -7,8 +7,8 @@ export class TradingAcceptParser implements IMessageParser public flush(): boolean { - this._userID = -1; - this._userAccepts = false; + this._userID = -1; + this._userAccepts = false; return true; } @@ -17,8 +17,8 @@ export class TradingAcceptParser implements IMessageParser { if(!wrapper) return false; - this._userID = wrapper.readInt(); - this._userAccepts = (wrapper.readInt() > 0); + this._userID = wrapper.readInt(); + this._userAccepts = (wrapper.readInt() > 0); return true; } diff --git a/src/nitro/communication/messages/parser/inventory/trading/TradingListItemParser.ts b/src/nitro/communication/messages/parser/inventory/trading/TradingListItemParser.ts index fa520b04..4bed6361 100644 --- a/src/nitro/communication/messages/parser/inventory/trading/TradingListItemParser.ts +++ b/src/nitro/communication/messages/parser/inventory/trading/TradingListItemParser.ts @@ -14,14 +14,14 @@ export class TradingListItemParser implements IMessageParser public flush(): boolean { - this._firstUserID = -1; - this._firstUserItemArray = null; - this._firstUserNumItems = 0; - this._firstUserNumCredits = 0; - this._secondUserID = -1; - this._secondUserItemArray = null; - this._secondUserNumItems = 0; - this._secondUserNumCredits = 0; + this._firstUserID = -1; + this._firstUserItemArray = null; + this._firstUserNumItems = 0; + this._firstUserNumCredits = 0; + this._secondUserID = -1; + this._secondUserItemArray = null; + this._secondUserNumItems = 0; + this._secondUserNumCredits = 0; return true; } @@ -35,16 +35,16 @@ export class TradingListItemParser implements IMessageParser if(!this.parseItems(wrapper, this._firstUserItemArray)) return false; - this._firstUserNumItems = wrapper.readInt(); - this._firstUserNumCredits = wrapper.readInt(); + this._firstUserNumItems = wrapper.readInt(); + this._firstUserNumCredits = wrapper.readInt(); - this._secondUserID = wrapper.readInt(); - this._secondUserItemArray = []; + this._secondUserID = wrapper.readInt(); + this._secondUserItemArray = []; if(!this.parseItems(wrapper, this._secondUserItemArray)) return false; - this._secondUserNumItems = wrapper.readInt(); - this._secondUserNumCredits = wrapper.readInt(); + this._secondUserNumItems = wrapper.readInt(); + this._secondUserNumCredits = wrapper.readInt(); return true; } diff --git a/src/nitro/communication/messages/parser/inventory/trading/TradingOpenFailedParser.ts b/src/nitro/communication/messages/parser/inventory/trading/TradingOpenFailedParser.ts index afa927f8..32d728cf 100644 --- a/src/nitro/communication/messages/parser/inventory/trading/TradingOpenFailedParser.ts +++ b/src/nitro/communication/messages/parser/inventory/trading/TradingOpenFailedParser.ts @@ -17,7 +17,7 @@ export class TradingOpenFailedParser implements IMessageParser { if(!wrapper) return false; - this._reason = wrapper.readInt(); + this._reason = wrapper.readInt(); this._otherUserName = wrapper.readString(); return true; diff --git a/src/nitro/communication/messages/parser/inventory/trading/TradingOpenParser.ts b/src/nitro/communication/messages/parser/inventory/trading/TradingOpenParser.ts index 7291cf26..ca16fd61 100644 --- a/src/nitro/communication/messages/parser/inventory/trading/TradingOpenParser.ts +++ b/src/nitro/communication/messages/parser/inventory/trading/TradingOpenParser.ts @@ -9,9 +9,9 @@ export class TradingOpenParser implements IMessageParser public flush(): boolean { - this._userId = -1; - this._userCanTrade = false; - this._otherUserId = -1; + this._userId = -1; + this._userCanTrade = false; + this._otherUserId = -1; this._otherUserCanTrade = false; return true; @@ -21,9 +21,9 @@ export class TradingOpenParser implements IMessageParser { if(!wrapper) return false; - this._userId = wrapper.readInt(); - this._userCanTrade = (wrapper.readInt() === 1); - this._otherUserId = wrapper.readInt(); + this._userId = wrapper.readInt(); + this._userCanTrade = (wrapper.readInt() === 1); + this._otherUserId = wrapper.readInt(); this._otherUserCanTrade = (wrapper.readInt() === 1); return true; diff --git a/src/nitro/communication/messages/parser/moderation/IssueInfoMessageParser.ts b/src/nitro/communication/messages/parser/moderation/IssueInfoMessageParser.ts index 564748cb..8496a0dc 100644 --- a/src/nitro/communication/messages/parser/moderation/IssueInfoMessageParser.ts +++ b/src/nitro/communication/messages/parser/moderation/IssueInfoMessageParser.ts @@ -2,7 +2,7 @@ import { IMessageDataWrapper, IMessageParser } from '../../../../../core'; import { IssueMessageData } from './IssueMessageData'; import { PatternMatchData } from './PatternMatchData'; -export class IssueInfoMessageParser implements IMessageParser +export class IssueInfoMessageParser implements IMessageParser { private _issueData:IssueMessageData; diff --git a/src/nitro/communication/messages/parser/moderation/ModerationCautionParser.ts b/src/nitro/communication/messages/parser/moderation/ModerationCautionParser.ts index a815a52a..55f5c2c2 100644 --- a/src/nitro/communication/messages/parser/moderation/ModerationCautionParser.ts +++ b/src/nitro/communication/messages/parser/moderation/ModerationCautionParser.ts @@ -1,6 +1,6 @@ import { IMessageDataWrapper, IMessageParser } from '../../../../../core'; -export class ModerationCautionParser implements IMessageParser +export class ModerationCautionParser implements IMessageParser { private _message: string; private _url: string; diff --git a/src/nitro/communication/messages/parser/moderation/ModeratorInitData.ts b/src/nitro/communication/messages/parser/moderation/ModeratorInitData.ts index 215780ab..867aa41f 100644 --- a/src/nitro/communication/messages/parser/moderation/ModeratorInitData.ts +++ b/src/nitro/communication/messages/parser/moderation/ModeratorInitData.ts @@ -68,7 +68,7 @@ export class ModeratorInitData } - public dispose():void + public dispose():void { if(this._disposed) { diff --git a/src/nitro/communication/messages/parser/moderation/ModeratorInitMessageParser.ts b/src/nitro/communication/messages/parser/moderation/ModeratorInitMessageParser.ts index 90825f0d..f189bdf0 100644 --- a/src/nitro/communication/messages/parser/moderation/ModeratorInitMessageParser.ts +++ b/src/nitro/communication/messages/parser/moderation/ModeratorInitMessageParser.ts @@ -1,7 +1,7 @@ import { IMessageDataWrapper, IMessageParser } from '../../../../../core'; import { ModeratorInitData } from './ModeratorInitData'; -export class ModeratorInitMessageParser implements IMessageParser +export class ModeratorInitMessageParser implements IMessageParser { private _data: ModeratorInitData = null; public flush(): boolean diff --git a/src/nitro/communication/messages/parser/moderation/RoomVisitsMessageParser.ts b/src/nitro/communication/messages/parser/moderation/RoomVisitsMessageParser.ts index 7671829f..ae84378b 100644 --- a/src/nitro/communication/messages/parser/moderation/RoomVisitsMessageParser.ts +++ b/src/nitro/communication/messages/parser/moderation/RoomVisitsMessageParser.ts @@ -1,7 +1,7 @@ import { IMessageDataWrapper, IMessageParser } from '../../../../../core'; import { RoomVisitsData } from '../../incoming/moderation/RoomVisitsData'; -export class RoomVisitsMessageParser implements IMessageParser +export class RoomVisitsMessageParser implements IMessageParser { private _data: RoomVisitsData; diff --git a/src/nitro/communication/messages/parser/moderation/UserBannedMessageParser.ts b/src/nitro/communication/messages/parser/moderation/UserBannedMessageParser.ts index 46d384da..5dc48dd2 100644 --- a/src/nitro/communication/messages/parser/moderation/UserBannedMessageParser.ts +++ b/src/nitro/communication/messages/parser/moderation/UserBannedMessageParser.ts @@ -1,6 +1,6 @@ import { IMessageDataWrapper, IMessageParser } from '../../../../../core'; -export class UserBannedMessageParser implements IMessageParser +export class UserBannedMessageParser implements IMessageParser { private _message: string; diff --git a/src/nitro/communication/messages/parser/mysterybox/MysteryBoxKeysParser.ts b/src/nitro/communication/messages/parser/mysterybox/MysteryBoxKeysParser.ts index e107e81d..97a38074 100644 --- a/src/nitro/communication/messages/parser/mysterybox/MysteryBoxKeysParser.ts +++ b/src/nitro/communication/messages/parser/mysterybox/MysteryBoxKeysParser.ts @@ -7,8 +7,8 @@ export class MysteryBoxKeysParser implements IMessageParser public flush(): boolean { - this._boxColor = null; - this._keyColor = null; + this._boxColor = null; + this._keyColor = null; return true; } @@ -17,8 +17,8 @@ export class MysteryBoxKeysParser implements IMessageParser { if(!wrapper) return false; - this._boxColor = wrapper.readString(); - this._keyColor = wrapper.readString(); + this._boxColor = wrapper.readString(); + this._keyColor = wrapper.readString(); return true; } diff --git a/src/nitro/communication/messages/parser/navigator/NavigatorCategoryDataParser.ts b/src/nitro/communication/messages/parser/navigator/NavigatorCategoryDataParser.ts index 1659bcde..3e46ba5f 100644 --- a/src/nitro/communication/messages/parser/navigator/NavigatorCategoryDataParser.ts +++ b/src/nitro/communication/messages/parser/navigator/NavigatorCategoryDataParser.ts @@ -20,13 +20,13 @@ export class NavigatorCategoryDataParser public flush(): boolean { - this._id = -1; - this._name = null; - this._visible = false; - this._automatic = false; - this._automaticCategoryKey = null; - this._globalCategoryKey = null; - this._staffOnly = false; + this._id = -1; + this._name = null; + this._visible = false; + this._automatic = false; + this._automaticCategoryKey = null; + this._globalCategoryKey = null; + this._staffOnly = false; return true; } @@ -35,13 +35,13 @@ export class NavigatorCategoryDataParser { if(!wrapper) return false; - this._id = wrapper.readInt(); - this._name = wrapper.readString(); - this._visible = wrapper.readBoolean(); - this._automatic = wrapper.readBoolean(); - this._automaticCategoryKey = wrapper.readString(); - this._globalCategoryKey = wrapper.readString(); - this._staffOnly = wrapper.readBoolean(); + this._id = wrapper.readInt(); + this._name = wrapper.readString(); + this._visible = wrapper.readBoolean(); + this._automatic = wrapper.readBoolean(); + this._automaticCategoryKey = wrapper.readString(); + this._globalCategoryKey = wrapper.readString(); + this._staffOnly = wrapper.readBoolean(); return true; } diff --git a/src/nitro/communication/messages/parser/navigator/NavigatorEventCategoryDataParser.ts b/src/nitro/communication/messages/parser/navigator/NavigatorEventCategoryDataParser.ts index 01d5c421..58e8fc6d 100644 --- a/src/nitro/communication/messages/parser/navigator/NavigatorEventCategoryDataParser.ts +++ b/src/nitro/communication/messages/parser/navigator/NavigatorEventCategoryDataParser.ts @@ -16,9 +16,9 @@ export class NavigatorEventCategoryDataParser public flush(): boolean { - this._id = -1; - this._name = null; - this._visible = false; + this._id = -1; + this._name = null; + this._visible = false; return true; } @@ -27,9 +27,9 @@ export class NavigatorEventCategoryDataParser { if(!wrapper) return false; - this._id = wrapper.readInt(); - this._name = wrapper.readString(); - this._visible = wrapper.readBoolean(); + this._id = wrapper.readInt(); + this._name = wrapper.readString(); + this._visible = wrapper.readBoolean(); return true; } diff --git a/src/nitro/communication/messages/parser/navigator/NavigatorHomeRoomParser.ts b/src/nitro/communication/messages/parser/navigator/NavigatorHomeRoomParser.ts index 25fe78f0..10f93a45 100644 --- a/src/nitro/communication/messages/parser/navigator/NavigatorHomeRoomParser.ts +++ b/src/nitro/communication/messages/parser/navigator/NavigatorHomeRoomParser.ts @@ -7,7 +7,7 @@ export class NavigatorHomeRoomParser implements IMessageParser public flush(): boolean { - this._homeRoomId = -1; + this._homeRoomId = -1; this._roomIdToEnter = -1; return true; @@ -17,7 +17,7 @@ export class NavigatorHomeRoomParser implements IMessageParser { if(!wrapper) return false; - this._homeRoomId = wrapper.readInt(); + this._homeRoomId = wrapper.readInt(); this._roomIdToEnter = wrapper.readInt(); return true; diff --git a/src/nitro/communication/messages/parser/navigator/NavigatorLiftedDataParser.ts b/src/nitro/communication/messages/parser/navigator/NavigatorLiftedDataParser.ts index 109e57c0..1513f6c8 100644 --- a/src/nitro/communication/messages/parser/navigator/NavigatorLiftedDataParser.ts +++ b/src/nitro/communication/messages/parser/navigator/NavigatorLiftedDataParser.ts @@ -17,10 +17,10 @@ export class NavigatorLiftedDataParser public flush(): boolean { - this._roomId = -1; - this._areaId = -1; - this._image = null; - this._caption = null; + this._roomId = -1; + this._areaId = -1; + this._image = null; + this._caption = null; return true; } @@ -29,10 +29,10 @@ export class NavigatorLiftedDataParser { if(!wrapper) return false; - this._roomId = wrapper.readInt(); - this._areaId = wrapper.readInt(); - this._image = wrapper.readString(); - this._caption = wrapper.readString(); + this._roomId = wrapper.readInt(); + this._areaId = wrapper.readInt(); + this._image = wrapper.readString(); + this._caption = wrapper.readString(); return true; } diff --git a/src/nitro/communication/messages/parser/navigator/NavigatorSettingsParser.ts b/src/nitro/communication/messages/parser/navigator/NavigatorSettingsParser.ts index 7fa45d45..d630e177 100644 --- a/src/nitro/communication/messages/parser/navigator/NavigatorSettingsParser.ts +++ b/src/nitro/communication/messages/parser/navigator/NavigatorSettingsParser.ts @@ -11,12 +11,12 @@ export class NavigatorSettingsParser implements IMessageParser public flush(): boolean { - this._windowX = 0; - this._windowY = 0; - this._windowWidth = 0; - this._windowHeight = 0; - this._leftPanelHidden = false; - this._resultsMode = 0; + this._windowX = 0; + this._windowY = 0; + this._windowWidth = 0; + this._windowHeight = 0; + this._leftPanelHidden = false; + this._resultsMode = 0; return true; } @@ -25,12 +25,12 @@ export class NavigatorSettingsParser implements IMessageParser { if(!wrapper) return false; - this._windowX = wrapper.readInt(); - this._windowY = wrapper.readInt(); - this._windowWidth = wrapper.readInt(); - this._windowHeight = wrapper.readInt(); - this._leftPanelHidden = wrapper.readBoolean(); - this._resultsMode = wrapper.readInt(); + this._windowX = wrapper.readInt(); + this._windowY = wrapper.readInt(); + this._windowWidth = wrapper.readInt(); + this._windowHeight = wrapper.readInt(); + this._leftPanelHidden = wrapper.readBoolean(); + this._resultsMode = wrapper.readInt(); return true; } diff --git a/src/nitro/communication/messages/parser/navigator/utils/NavigatorSavedSearch.ts b/src/nitro/communication/messages/parser/navigator/utils/NavigatorSavedSearch.ts index 900fdc7d..26adbc1d 100644 --- a/src/nitro/communication/messages/parser/navigator/utils/NavigatorSavedSearch.ts +++ b/src/nitro/communication/messages/parser/navigator/utils/NavigatorSavedSearch.ts @@ -17,10 +17,10 @@ export class NavigatorSavedSearch public flush(): boolean { - this._id = -1; - this._code = null; - this._filter = null; - this._localization = null; + this._id = -1; + this._code = null; + this._filter = null; + this._localization = null; return true; } @@ -29,10 +29,10 @@ export class NavigatorSavedSearch { if(!wrapper) return false; - this._id = wrapper.readInt(); - this._code = wrapper.readString(); - this._filter = wrapper.readString(); - this._localization = wrapper.readString(); + this._id = wrapper.readInt(); + this._code = wrapper.readString(); + this._filter = wrapper.readString(); + this._localization = wrapper.readString(); return true; } diff --git a/src/nitro/communication/messages/parser/navigator/utils/NavigatorSearchResultList.ts b/src/nitro/communication/messages/parser/navigator/utils/NavigatorSearchResultList.ts index 83f15813..e9516029 100644 --- a/src/nitro/communication/messages/parser/navigator/utils/NavigatorSearchResultList.ts +++ b/src/nitro/communication/messages/parser/navigator/utils/NavigatorSearchResultList.ts @@ -20,12 +20,12 @@ export class NavigatorSearchResultList public flush(): boolean { - this._code = null; - this._data = null; - this._action = -1; - this._closed = false; - this._mode = -1; - this._rooms = []; + this._code = null; + this._data = null; + this._action = -1; + this._closed = false; + this._mode = -1; + this._rooms = []; return true; } @@ -34,11 +34,11 @@ export class NavigatorSearchResultList { if(!wrapper) return false; - this._code = wrapper.readString(); - this._data = wrapper.readString(); - this._action = wrapper.readInt(); - this._closed = wrapper.readBoolean(); - this._mode = wrapper.readInt(); + this._code = wrapper.readString(); + this._data = wrapper.readString(); + this._action = wrapper.readInt(); + this._closed = wrapper.readBoolean(); + this._mode = wrapper.readInt(); let totalRooms = wrapper.readInt(); diff --git a/src/nitro/communication/messages/parser/navigator/utils/NavigatorSearchResultSet.ts b/src/nitro/communication/messages/parser/navigator/utils/NavigatorSearchResultSet.ts index c1858eee..080b5f43 100644 --- a/src/nitro/communication/messages/parser/navigator/utils/NavigatorSearchResultSet.ts +++ b/src/nitro/communication/messages/parser/navigator/utils/NavigatorSearchResultSet.ts @@ -17,9 +17,9 @@ export class NavigatorSearchResultSet public flush(): boolean { - this._code = null; - this._data = null; - this._results = []; + this._code = null; + this._data = null; + this._results = []; return true; } @@ -28,8 +28,8 @@ export class NavigatorSearchResultSet { if(!wrapper) return false; - this._code = wrapper.readString(); - this._data = wrapper.readString(); + this._code = wrapper.readString(); + this._data = wrapper.readString(); let totalResults = wrapper.readInt(); diff --git a/src/nitro/communication/messages/parser/navigator/utils/NavigatorTopLevelContext.ts b/src/nitro/communication/messages/parser/navigator/utils/NavigatorTopLevelContext.ts index 3830e3c9..fd87e97a 100644 --- a/src/nitro/communication/messages/parser/navigator/utils/NavigatorTopLevelContext.ts +++ b/src/nitro/communication/messages/parser/navigator/utils/NavigatorTopLevelContext.ts @@ -16,7 +16,7 @@ export class NavigatorTopLevelContext public flush(): boolean { - this._code = null; + this._code = null; this._savedSearches = []; return true; @@ -26,7 +26,7 @@ export class NavigatorTopLevelContext { if(!wrapper) return false; - this._code = wrapper.readString(); + this._code = wrapper.readString(); let totalSavedSearches = wrapper.readInt(); diff --git a/src/nitro/communication/messages/parser/notifications/ActivityPointNotificationParser.ts b/src/nitro/communication/messages/parser/notifications/ActivityPointNotificationParser.ts index 27fa496e..738da5fc 100644 --- a/src/nitro/communication/messages/parser/notifications/ActivityPointNotificationParser.ts +++ b/src/nitro/communication/messages/parser/notifications/ActivityPointNotificationParser.ts @@ -8,9 +8,9 @@ export class ActivityPointNotificationParser implements IMessageParser public flush(): boolean { - this._amount = 0; + this._amount = 0; this._amountChanged = 0; - this._type = -1; + this._type = -1; return true; } @@ -19,9 +19,9 @@ export class ActivityPointNotificationParser implements IMessageParser { if(!wrapper) return false; - this._amount = wrapper.readInt(); + this._amount = wrapper.readInt(); this._amountChanged = wrapper.readInt(); - this._type = wrapper.readInt(); + this._type = wrapper.readInt(); return true; } diff --git a/src/nitro/communication/messages/parser/notifications/NotificationDialogMessageParser.ts b/src/nitro/communication/messages/parser/notifications/NotificationDialogMessageParser.ts index b817fbe4..979fcc07 100644 --- a/src/nitro/communication/messages/parser/notifications/NotificationDialogMessageParser.ts +++ b/src/nitro/communication/messages/parser/notifications/NotificationDialogMessageParser.ts @@ -7,8 +7,8 @@ export class NotificationDialogMessageParser implements IMessageParser public flush(): boolean { - this._type = null; - this._parameters = new Map(); + this._type = null; + this._parameters = new Map(); return true; } diff --git a/src/nitro/communication/messages/parser/notifications/UnseenItemsParser.ts b/src/nitro/communication/messages/parser/notifications/UnseenItemsParser.ts index f386819c..ab26c8ea 100644 --- a/src/nitro/communication/messages/parser/notifications/UnseenItemsParser.ts +++ b/src/nitro/communication/messages/parser/notifications/UnseenItemsParser.ts @@ -22,8 +22,8 @@ export class UnseenItemsParser implements IMessageParser { const category = wrapper.readInt(); - let totalItems = wrapper.readInt(); - const itemIds: number[] = []; + let totalItems = wrapper.readInt(); + const itemIds: number[] = []; while(totalItems > 0) { diff --git a/src/nitro/communication/messages/parser/room/access/CantConnectMessageParser.ts b/src/nitro/communication/messages/parser/room/access/CantConnectMessageParser.ts index e5d20359..6e220435 100644 --- a/src/nitro/communication/messages/parser/room/access/CantConnectMessageParser.ts +++ b/src/nitro/communication/messages/parser/room/access/CantConnectMessageParser.ts @@ -2,17 +2,17 @@ import { IMessageDataWrapper, IMessageParser } from '../../../../../../core'; export class CantConnectMessageParser implements IMessageParser { - public static REASON_FULL: number = 1; - public static REASON_CLOSED: number = 2; - public static REASON_QUEUE_ERROR: number = 3; - public static REASON_BANNED: number = 4; + public static REASON_FULL: number = 1; + public static REASON_CLOSED: number = 2; + public static REASON_QUEUE_ERROR: number = 3; + public static REASON_BANNED: number = 4; private _reason: number; private _parameter: string; public flush(): boolean { - this._reason = 0; + this._reason = 0; this._parameter = ''; return true; @@ -22,7 +22,7 @@ export class CantConnectMessageParser implements IMessageParser { if(!wrapper) return false; - this._reason = wrapper.readInt(); + this._reason = wrapper.readInt(); this._parameter = wrapper.readString(); return true; diff --git a/src/nitro/communication/messages/parser/room/bots/BotCommandConfigurationParser.ts b/src/nitro/communication/messages/parser/room/bots/BotCommandConfigurationParser.ts index 015e8596..c03a3d7e 100644 --- a/src/nitro/communication/messages/parser/room/bots/BotCommandConfigurationParser.ts +++ b/src/nitro/communication/messages/parser/room/bots/BotCommandConfigurationParser.ts @@ -8,9 +8,9 @@ export class BotCommandConfigurationParser implements IMessageParser public flush(): boolean { - this._botId = -1; + this._botId = -1; this._commandId = -1; - this._data = ''; + this._data = ''; return true; } @@ -19,9 +19,9 @@ export class BotCommandConfigurationParser implements IMessageParser { if(!wrapper) return false; - this._botId = wrapper.readInt(); + this._botId = wrapper.readInt(); this._commandId = wrapper.readInt(); - this._data = wrapper.readString(); + this._data = wrapper.readString(); return true; } diff --git a/src/nitro/communication/messages/parser/room/data/RoomChatSettings.ts b/src/nitro/communication/messages/parser/room/data/RoomChatSettings.ts index 558f8bfe..4661aabd 100644 --- a/src/nitro/communication/messages/parser/room/data/RoomChatSettings.ts +++ b/src/nitro/communication/messages/parser/room/data/RoomChatSettings.ts @@ -30,11 +30,11 @@ export class RoomChatSettings public flush(): boolean { - this._mode = 0; - this._weight = 0; - this._speed = 0; - this._distance = 0; - this._protection = 0; + this._mode = 0; + this._weight = 0; + this._speed = 0; + this._distance = 0; + this._protection = 0; return true; } @@ -43,11 +43,11 @@ export class RoomChatSettings { if(!wrapper) return false; - this._mode = wrapper.readInt(); - this._weight = wrapper.readInt(); - this._speed = wrapper.readInt(); - this._distance = wrapper.readInt(); - this._protection = wrapper.readInt(); + this._mode = wrapper.readInt(); + this._weight = wrapper.readInt(); + this._speed = wrapper.readInt(); + this._distance = wrapper.readInt(); + this._protection = wrapper.readInt(); return true; } diff --git a/src/nitro/communication/messages/parser/room/data/RoomDataParser.ts b/src/nitro/communication/messages/parser/room/data/RoomDataParser.ts index 5f079798..5a649fb2 100644 --- a/src/nitro/communication/messages/parser/room/data/RoomDataParser.ts +++ b/src/nitro/communication/messages/parser/room/data/RoomDataParser.ts @@ -2,17 +2,17 @@ import { IMessageDataWrapper } from '../../../../../../core'; export class RoomDataParser { - public static THUMBNAIL_BITMASK = 1; - public static GROUPDATA_BITMASK = 2; - public static ROOMAD_BITMASK = 4; - public static SHOWOWNER_BITMASK = 8; - public static ALLOW_PETS_BITMASK = 16; - public static DISPLAY_ROOMAD_BITMASK = 32; + public static THUMBNAIL_BITMASK = 1; + public static GROUPDATA_BITMASK = 2; + public static ROOMAD_BITMASK = 4; + public static SHOWOWNER_BITMASK = 8; + public static ALLOW_PETS_BITMASK = 16; + public static DISPLAY_ROOMAD_BITMASK = 32; - public static OPEN_STATE = 0; - public static DOORBELL_STATE = 1; - public static PASSWORD_STATE = 2; - public static INVISIBLE_STATE = 4; + public static OPEN_STATE = 0; + public static DOORBELL_STATE = 1; + public static PASSWORD_STATE = 2; + public static INVISIBLE_STATE = 4; private _roomId: number; private _roomName: string; @@ -54,35 +54,35 @@ export class RoomDataParser public flush(): boolean { - this._roomId = 0; - this._roomName = null; - this._ownerId = 0; - this._ownerName = null; - this._doorMode = 0; - this._userCount = 0; - this._maxUserCount = 0; - this._description = null; - this._tradeMode = 2; - this._score = 0; - this._ranking = 0; - this._categoryId = 0; - this._totalStars = 0; - this._groupId = 0; - this._groupName = null; - this._groupBadge = null; - this._tags = []; - this._bitMask = 0; - this._thumbnail = null; - this._allowPets = false; - this._showOwner = true; - this._displayAd = false; - this._adName = null; - this._adDescription = null; - this._adExpiresIn = 0; - this._allInRoomMuted = false; - this._canMute = false; - this._roomPicker = false; - this._officialRoomPicRef = null; + this._roomId = 0; + this._roomName = null; + this._ownerId = 0; + this._ownerName = null; + this._doorMode = 0; + this._userCount = 0; + this._maxUserCount = 0; + this._description = null; + this._tradeMode = 2; + this._score = 0; + this._ranking = 0; + this._categoryId = 0; + this._totalStars = 0; + this._groupId = 0; + this._groupName = null; + this._groupBadge = null; + this._tags = []; + this._bitMask = 0; + this._thumbnail = null; + this._allowPets = false; + this._showOwner = true; + this._displayAd = false; + this._adName = null; + this._adDescription = null; + this._adExpiresIn = 0; + this._allInRoomMuted = false; + this._canMute = false; + this._roomPicker = false; + this._officialRoomPicRef = null; return true; } @@ -91,18 +91,18 @@ export class RoomDataParser { if(!wrapper) return false; - this._roomId = wrapper.readInt(); - this._roomName = wrapper.readString(); - this._ownerId = wrapper.readInt(); - this._ownerName = wrapper.readString(); - this._doorMode = wrapper.readInt(); - this._userCount = wrapper.readInt(); - this._maxUserCount = wrapper.readInt(); - this._description = wrapper.readString(); - this._tradeMode = wrapper.readInt(); - this._score = wrapper.readInt(); - this._ranking = wrapper.readInt(); - this._categoryId = wrapper.readInt(); + this._roomId = wrapper.readInt(); + this._roomName = wrapper.readString(); + this._ownerId = wrapper.readInt(); + this._ownerName = wrapper.readString(); + this._doorMode = wrapper.readInt(); + this._userCount = wrapper.readInt(); + this._maxUserCount = wrapper.readInt(); + this._description = wrapper.readString(); + this._tradeMode = wrapper.readInt(); + this._score = wrapper.readInt(); + this._ranking = wrapper.readInt(); + this._categoryId = wrapper.readInt(); this.parseTags(wrapper); @@ -139,22 +139,22 @@ export class RoomDataParser if(this._bitMask & RoomDataParser.GROUPDATA_BITMASK) { - this._groupId = wrapper.readInt(); - this._groupName = wrapper.readString(); - this._groupBadge = wrapper.readString(); + this._groupId = wrapper.readInt(); + this._groupName = wrapper.readString(); + this._groupBadge = wrapper.readString(); } if(this._bitMask & RoomDataParser.ROOMAD_BITMASK) { - this._adName = wrapper.readString(); + this._adName = wrapper.readString(); this._adDescription = wrapper.readString(); - this._adExpiresIn = wrapper.readInt(); + this._adExpiresIn = wrapper.readInt(); } - this._showOwner = (this._bitMask & RoomDataParser.SHOWOWNER_BITMASK) > 0; - this._allowPets = (this._bitMask & RoomDataParser.ALLOW_PETS_BITMASK) > 0; - this._displayAd = (this._bitMask & RoomDataParser.DISPLAY_ROOMAD_BITMASK) > 0; - this._thumbnail = null; + this._showOwner = (this._bitMask & RoomDataParser.SHOWOWNER_BITMASK) > 0; + this._allowPets = (this._bitMask & RoomDataParser.ALLOW_PETS_BITMASK) > 0; + this._displayAd = (this._bitMask & RoomDataParser.DISPLAY_ROOMAD_BITMASK) > 0; + this._thumbnail = null; return true; } diff --git a/src/nitro/communication/messages/parser/room/data/RoomEntryInfoMessageParser.ts b/src/nitro/communication/messages/parser/room/data/RoomEntryInfoMessageParser.ts index c52da864..ffdbe51d 100644 --- a/src/nitro/communication/messages/parser/room/data/RoomEntryInfoMessageParser.ts +++ b/src/nitro/communication/messages/parser/room/data/RoomEntryInfoMessageParser.ts @@ -7,8 +7,8 @@ export class RoomEntryInfoMessageParser implements IMessageParser public flush(): boolean { - this._roomId = 0; - this._isOwner = false; + this._roomId = 0; + this._isOwner = false; return true; } @@ -17,8 +17,8 @@ export class RoomEntryInfoMessageParser implements IMessageParser { if(!wrapper) return false; - this._roomId = wrapper.readInt(); - this._isOwner = wrapper.readBoolean(); + this._roomId = wrapper.readInt(); + this._isOwner = wrapper.readBoolean(); return true; } diff --git a/src/nitro/communication/messages/parser/room/data/RoomInfoParser.ts b/src/nitro/communication/messages/parser/room/data/RoomInfoParser.ts index eec4c6a3..08b0eab6 100644 --- a/src/nitro/communication/messages/parser/room/data/RoomInfoParser.ts +++ b/src/nitro/communication/messages/parser/room/data/RoomInfoParser.ts @@ -15,13 +15,13 @@ export class RoomInfoParser implements IMessageParser public flush(): boolean { - this._roomEnter = false; - this._roomForward = false; - this._staffPick = false; - this._data = null; + this._roomEnter = false; + this._roomForward = false; + this._staffPick = false; + this._data = null; this._isGroupMember = false; - this._moderation = null; - this._chat = null; + this._moderation = null; + this._chat = null; return true; } @@ -30,15 +30,15 @@ export class RoomInfoParser implements IMessageParser { if(!wrapper) return false; - this._roomEnter = wrapper.readBoolean(); - this._data = new RoomDataParser(wrapper); - this._roomForward = wrapper.readBoolean(); + this._roomEnter = wrapper.readBoolean(); + this._data = new RoomDataParser(wrapper); + this._roomForward = wrapper.readBoolean(); this.data.roomPicker = wrapper.readBoolean(); - this._isGroupMember = wrapper.readBoolean(); - this.data.allInRoomMuted = wrapper.readBoolean(); - this._moderation = new RoomModerationSettings(wrapper); - this.data.canMute = wrapper.readBoolean(); - this._chat = new RoomChatSettings(wrapper); + this._isGroupMember = wrapper.readBoolean(); + this.data.allInRoomMuted = wrapper.readBoolean(); + this._moderation = new RoomModerationSettings(wrapper); + this.data.canMute = wrapper.readBoolean(); + this._chat = new RoomChatSettings(wrapper); return true; } diff --git a/src/nitro/communication/messages/parser/room/data/RoomModerationSettings.ts b/src/nitro/communication/messages/parser/room/data/RoomModerationSettings.ts index 12157c0b..f8473f28 100644 --- a/src/nitro/communication/messages/parser/room/data/RoomModerationSettings.ts +++ b/src/nitro/communication/messages/parser/room/data/RoomModerationSettings.ts @@ -2,9 +2,9 @@ import { IMessageDataWrapper } from '../../../../../../core'; export class RoomModerationSettings { - public static MODERATION_LEVEL_NONE: number = 0; - public static MODERATION_LEVEL_USER_WITH_RIGHTS: number = 1; - public static MODERATION_LEVEL_ALL: number = 2; + public static MODERATION_LEVEL_NONE: number = 0; + public static MODERATION_LEVEL_USER_WITH_RIGHTS: number = 1; + public static MODERATION_LEVEL_ALL: number = 2; private _allowMute: number; private _allowKick: number; @@ -20,14 +20,14 @@ export class RoomModerationSettings { this._allowMute = 0; this._allowKick = 0; - this._allowBan = 0; + this._allowBan = 0; } public parse(wrapper: IMessageDataWrapper): void { this._allowMute = wrapper.readInt(); this._allowKick = wrapper.readInt(); - this._allowBan = wrapper.readInt(); + this._allowBan = wrapper.readInt(); } public get allowMute(): number diff --git a/src/nitro/communication/messages/parser/room/data/RoomScoreParser.ts b/src/nitro/communication/messages/parser/room/data/RoomScoreParser.ts index b6cc1cd5..2de16339 100644 --- a/src/nitro/communication/messages/parser/room/data/RoomScoreParser.ts +++ b/src/nitro/communication/messages/parser/room/data/RoomScoreParser.ts @@ -7,8 +7,8 @@ export class RoomScoreParser implements IMessageParser public flush(): boolean { - this._totalLikes = 0; - this._canLike = false; + this._totalLikes = 0; + this._canLike = false; return true; } @@ -17,8 +17,8 @@ export class RoomScoreParser implements IMessageParser { if(!wrapper) return false; - this._totalLikes = wrapper.readInt(); - this._canLike = wrapper.readBoolean(); + this._totalLikes = wrapper.readInt(); + this._canLike = wrapper.readBoolean(); return true; } diff --git a/src/nitro/communication/messages/parser/room/data/RoomSettingsErrorParser.ts b/src/nitro/communication/messages/parser/room/data/RoomSettingsErrorParser.ts index 89189263..6fdcbad0 100644 --- a/src/nitro/communication/messages/parser/room/data/RoomSettingsErrorParser.ts +++ b/src/nitro/communication/messages/parser/room/data/RoomSettingsErrorParser.ts @@ -8,9 +8,9 @@ export class RoomSettingsErrorParser implements IMessageParser public flush(): boolean { - this._roomId = 0; - this._code = 0; - this._message = null; + this._roomId = 0; + this._code = 0; + this._message = null; return true; } @@ -19,9 +19,9 @@ export class RoomSettingsErrorParser implements IMessageParser { if(!wrapper) return false; - this._roomId = wrapper.readInt(); - this._code = wrapper.readInt(); - this._message = wrapper.readString(); + this._roomId = wrapper.readInt(); + this._code = wrapper.readInt(); + this._message = wrapper.readString(); return true; } diff --git a/src/nitro/communication/messages/parser/room/data/RoomSettingsParser.ts b/src/nitro/communication/messages/parser/room/data/RoomSettingsParser.ts index 692093b0..e45b2511 100644 --- a/src/nitro/communication/messages/parser/room/data/RoomSettingsParser.ts +++ b/src/nitro/communication/messages/parser/room/data/RoomSettingsParser.ts @@ -33,26 +33,26 @@ export class RoomSettingsParser implements IMessageParser { if(!wrapper) return false; - this._roomId = wrapper.readInt(); - this._name = wrapper.readString(); - this._description = wrapper.readString(); - this._state = wrapper.readInt(); - this._categoryId = wrapper.readInt(); - this._userCount = wrapper.readInt(); - this._maxUserCount = wrapper.readInt(); + this._roomId = wrapper.readInt(); + this._name = wrapper.readString(); + this._description = wrapper.readString(); + this._state = wrapper.readInt(); + this._categoryId = wrapper.readInt(); + this._userCount = wrapper.readInt(); + this._maxUserCount = wrapper.readInt(); this.parseTags(wrapper); - this._tradeMode = wrapper.readInt(); - this._allowPets = wrapper.readInt(); - this._allowPetsEat = wrapper.readInt(); - this._allowWalkthrough = wrapper.readInt(); - this._hideWalls = wrapper.readInt(); - this._thicknessWall = wrapper.readInt(); - this._thicknessFloor = wrapper.readInt(); - this._chat = new RoomChatSettings(wrapper); + this._tradeMode = wrapper.readInt(); + this._allowPets = wrapper.readInt(); + this._allowPetsEat = wrapper.readInt(); + this._allowWalkthrough = wrapper.readInt(); + this._hideWalls = wrapper.readInt(); + this._thicknessWall = wrapper.readInt(); + this._thicknessFloor = wrapper.readInt(); + this._chat = new RoomChatSettings(wrapper); wrapper.readBoolean(); - this._moderation = new RoomModerationSettings(wrapper); + this._moderation = new RoomModerationSettings(wrapper); return true; } diff --git a/src/nitro/communication/messages/parser/room/engine/ObjectsDataUpdateParser.ts b/src/nitro/communication/messages/parser/room/engine/ObjectsDataUpdateParser.ts index 9f719a78..e2226218 100644 --- a/src/nitro/communication/messages/parser/room/engine/ObjectsDataUpdateParser.ts +++ b/src/nitro/communication/messages/parser/room/engine/ObjectsDataUpdateParser.ts @@ -21,9 +21,9 @@ export class ObjectsDataUpdateParser implements IMessageParser while(totalObjects > 0) { - const id = wrapper.readInt(); + const id = wrapper.readInt(); const stuffData = FurnitureDataParser.parseObjectData(wrapper); - const state = parseFloat(stuffData.getLegacyString()); + const state = parseFloat(stuffData.getLegacyString()); this._objects.push(new ObjectData(id, state, stuffData)); diff --git a/src/nitro/communication/messages/parser/room/engine/ObjectsRollingParser.ts b/src/nitro/communication/messages/parser/room/engine/ObjectsRollingParser.ts index addb74c5..0d53a1b6 100644 --- a/src/nitro/communication/messages/parser/room/engine/ObjectsRollingParser.ts +++ b/src/nitro/communication/messages/parser/room/engine/ObjectsRollingParser.ts @@ -10,10 +10,10 @@ export class ObjectsRollingParser implements IMessageParser public flush(): boolean { - this._rollerId = 0; + this._rollerId = 0; - this._itemsRolling = []; - this._unitRolling = null; + this._itemsRolling = []; + this._unitRolling = null; return true; } @@ -22,8 +22,8 @@ export class ObjectsRollingParser implements IMessageParser { if(!wrapper) return false; - const x = wrapper.readInt(); - const y = wrapper.readInt(); + const x = wrapper.readInt(); + const y = wrapper.readInt(); const nextX = wrapper.readInt(); const nextY = wrapper.readInt(); @@ -31,10 +31,10 @@ export class ObjectsRollingParser implements IMessageParser while(totalItems > 0) { - const id = wrapper.readInt(); - const height = parseFloat(wrapper.readString()); - const nextHeight = parseFloat(wrapper.readString()); - const rollingData = new ObjectRolling(id, new Vector3d(x, y, height), new Vector3d(nextX, nextY, nextHeight)); + const id = wrapper.readInt(); + const height = parseFloat(wrapper.readString()); + const nextHeight = parseFloat(wrapper.readString()); + const rollingData = new ObjectRolling(id, new Vector3d(x, y, height), new Vector3d(nextX, nextY, nextHeight)); this._itemsRolling.push(rollingData); @@ -45,10 +45,10 @@ export class ObjectsRollingParser implements IMessageParser if(!wrapper.bytesAvailable) return true; - const movementType = wrapper.readInt(); - const unitId = wrapper.readInt(); - const height = parseFloat(wrapper.readString()); - const nextHeight = parseFloat(wrapper.readString()); + const movementType = wrapper.readInt(); + const unitId = wrapper.readInt(); + const height = parseFloat(wrapper.readString()); + const nextHeight = parseFloat(wrapper.readString()); switch(movementType) { diff --git a/src/nitro/communication/messages/parser/room/engine/RoomCreatedParser.ts b/src/nitro/communication/messages/parser/room/engine/RoomCreatedParser.ts index 759c58df..7311a5ba 100644 --- a/src/nitro/communication/messages/parser/room/engine/RoomCreatedParser.ts +++ b/src/nitro/communication/messages/parser/room/engine/RoomCreatedParser.ts @@ -7,8 +7,8 @@ export class RoomCreatedParser implements IMessageParser public flush(): boolean { - this._roomId = -1; - this._roomName = null; + this._roomId = -1; + this._roomName = null; return true; } @@ -17,8 +17,8 @@ export class RoomCreatedParser implements IMessageParser { if(!wrapper) return false; - this._roomId = wrapper.readInt(); - this._roomName = wrapper.readString(); + this._roomId = wrapper.readInt(); + this._roomName = wrapper.readString(); return true; } diff --git a/src/nitro/communication/messages/parser/room/furniture/DiceValueMessageParser.ts b/src/nitro/communication/messages/parser/room/furniture/DiceValueMessageParser.ts index 8b94c4fe..ba0d7925 100644 --- a/src/nitro/communication/messages/parser/room/furniture/DiceValueMessageParser.ts +++ b/src/nitro/communication/messages/parser/room/furniture/DiceValueMessageParser.ts @@ -7,8 +7,8 @@ export class DiceValueMessageParser implements IMessageParser public flush(): boolean { - this._itemId = 0; - this._value = 0; + this._itemId = 0; + this._value = 0; return true; } @@ -17,8 +17,8 @@ export class DiceValueMessageParser implements IMessageParser { if(!wrapper) return false; - this._itemId = wrapper.readInt(); - this._value = wrapper.readInt(); + this._itemId = wrapper.readInt(); + this._value = wrapper.readInt(); return true; } diff --git a/src/nitro/communication/messages/parser/room/furniture/FurnitureDataParser.ts b/src/nitro/communication/messages/parser/room/furniture/FurnitureDataParser.ts index e7a4cbb7..9c3cc7c7 100644 --- a/src/nitro/communication/messages/parser/room/furniture/FurnitureDataParser.ts +++ b/src/nitro/communication/messages/parser/room/furniture/FurnitureDataParser.ts @@ -9,8 +9,8 @@ export class FurnitureDataParser implements IMessageParser public flush(): boolean { - this._itemId = 0; - this._data = null; + this._itemId = 0; + this._data = null; return true; } @@ -19,8 +19,8 @@ export class FurnitureDataParser implements IMessageParser { if(!wrapper) return false; - this._itemId = parseInt(wrapper.readString()); - this._data = FurnitureDataParser.parseObjectData(wrapper); + this._itemId = parseInt(wrapper.readString()); + this._data = FurnitureDataParser.parseObjectData(wrapper); return true; } diff --git a/src/nitro/communication/messages/parser/room/furniture/FurnitureStackHeightParser.ts b/src/nitro/communication/messages/parser/room/furniture/FurnitureStackHeightParser.ts index c5a9a525..8882aa8d 100644 --- a/src/nitro/communication/messages/parser/room/furniture/FurnitureStackHeightParser.ts +++ b/src/nitro/communication/messages/parser/room/furniture/FurnitureStackHeightParser.ts @@ -7,8 +7,8 @@ export class FurnitureStackHeightParser implements IMessageParser public flush(): boolean { - this._furniId = -1; - this._height = 0; + this._furniId = -1; + this._height = 0; return true; } @@ -17,8 +17,8 @@ export class FurnitureStackHeightParser implements IMessageParser { if(!wrapper) return false; - this._furniId = wrapper.readInt(); - this._height = (wrapper.readInt() / 100); + this._furniId = wrapper.readInt(); + this._height = (wrapper.readInt() / 100); return true; } diff --git a/src/nitro/communication/messages/parser/room/furniture/GroupFurniContextMenuInfoMessageParser.ts b/src/nitro/communication/messages/parser/room/furniture/GroupFurniContextMenuInfoMessageParser.ts index da3e8320..f7e12f06 100644 --- a/src/nitro/communication/messages/parser/room/furniture/GroupFurniContextMenuInfoMessageParser.ts +++ b/src/nitro/communication/messages/parser/room/furniture/GroupFurniContextMenuInfoMessageParser.ts @@ -11,11 +11,11 @@ export class GroupFurniContextMenuInfoMessageParser implements IMessageParser public flush(): boolean { - this._objectId = 0; - this._guildId = 0; - this._guildName = null; - this._guildHomeRoomId = 0; - this._userIsMember = false; + this._objectId = 0; + this._guildId = 0; + this._guildName = null; + this._guildHomeRoomId = 0; + this._userIsMember = false; this._guildHasReadableForum = false; return true; @@ -25,11 +25,11 @@ export class GroupFurniContextMenuInfoMessageParser implements IMessageParser { if(!wrapper) return false; - this._objectId = wrapper.readInt(); - this._guildId = wrapper.readInt(); - this._guildName = wrapper.readString(); - this._guildHomeRoomId = wrapper.readInt(); - this._userIsMember = wrapper.readBoolean(); + this._objectId = wrapper.readInt(); + this._guildId = wrapper.readInt(); + this._guildName = wrapper.readString(); + this._guildHomeRoomId = wrapper.readInt(); + this._userIsMember = wrapper.readBoolean(); this._guildHasReadableForum = wrapper.readBoolean(); return true; diff --git a/src/nitro/communication/messages/parser/room/furniture/ItemDataUpdateMessageParser.ts b/src/nitro/communication/messages/parser/room/furniture/ItemDataUpdateMessageParser.ts index bf5974b5..6365c104 100644 --- a/src/nitro/communication/messages/parser/room/furniture/ItemDataUpdateMessageParser.ts +++ b/src/nitro/communication/messages/parser/room/furniture/ItemDataUpdateMessageParser.ts @@ -7,8 +7,8 @@ export class ItemDataUpdateMessageParser implements IMessageParser public flush(): boolean { - this._itemId = 0; - this._data = ''; + this._itemId = 0; + this._data = ''; return true; } @@ -17,8 +17,8 @@ export class ItemDataUpdateMessageParser implements IMessageParser { if(!wrapper) return false; - this._itemId = parseInt(wrapper.readString()); - this._data = wrapper.readString(); + this._itemId = parseInt(wrapper.readString()); + this._data = wrapper.readString(); return true; } diff --git a/src/nitro/communication/messages/parser/room/furniture/LoveLockFurniFinishedParser.ts b/src/nitro/communication/messages/parser/room/furniture/LoveLockFurniFinishedParser.ts index 01375774..23480b0d 100644 --- a/src/nitro/communication/messages/parser/room/furniture/LoveLockFurniFinishedParser.ts +++ b/src/nitro/communication/messages/parser/room/furniture/LoveLockFurniFinishedParser.ts @@ -2,7 +2,7 @@ export class LoveLockFurniFinishedParser implements IMessageParser { - private _furniId: number; + private _furniId: number; public get furniId(): number { @@ -11,13 +11,13 @@ export class LoveLockFurniFinishedParser implements IMessageParser public flush(): boolean { - this._furniId = -1; + this._furniId = -1; return true; } public parse(packet: IMessageDataWrapper): boolean { - this._furniId = packet.readInt(); + this._furniId = packet.readInt(); return true; } } diff --git a/src/nitro/communication/messages/parser/room/furniture/LoveLockFurniFriendConfirmedParser.ts b/src/nitro/communication/messages/parser/room/furniture/LoveLockFurniFriendConfirmedParser.ts index 9cee7c49..c5f20c8b 100644 --- a/src/nitro/communication/messages/parser/room/furniture/LoveLockFurniFriendConfirmedParser.ts +++ b/src/nitro/communication/messages/parser/room/furniture/LoveLockFurniFriendConfirmedParser.ts @@ -2,7 +2,7 @@ export class LoveLockFurniFriendConfirmedParser implements IMessageParser { - private _furniId: number; + private _furniId: number; public get furniId(): number { @@ -11,13 +11,13 @@ export class LoveLockFurniFriendConfirmedParser implements IMessageParser public flush(): boolean { - this._furniId = -1; + this._furniId = -1; return true; } public parse(packet: IMessageDataWrapper): boolean { - this._furniId = packet.readInt(); + this._furniId = packet.readInt(); return true; } } diff --git a/src/nitro/communication/messages/parser/room/furniture/LoveLockFurniStartParser.ts b/src/nitro/communication/messages/parser/room/furniture/LoveLockFurniStartParser.ts index 6dc832fb..1407388e 100644 --- a/src/nitro/communication/messages/parser/room/furniture/LoveLockFurniStartParser.ts +++ b/src/nitro/communication/messages/parser/room/furniture/LoveLockFurniStartParser.ts @@ -2,8 +2,8 @@ export class LoveLockFurniStartParser implements IMessageParser { - private _furniId: number; - private _start: boolean; + private _furniId: number; + private _start: boolean; public get furniId(): number { @@ -17,15 +17,15 @@ export class LoveLockFurniStartParser implements IMessageParser public flush(): boolean { - this._furniId = -1; - this._start = false; + this._furniId = -1; + this._start = false; return true; } public parse(packet: IMessageDataWrapper): boolean { - this._furniId = packet.readInt(); - this._start = packet.readBoolean(); + this._furniId = packet.readInt(); + this._start = packet.readBoolean(); return true; } } diff --git a/src/nitro/communication/messages/parser/room/furniture/OneWayDoorStatusMessageParser.ts b/src/nitro/communication/messages/parser/room/furniture/OneWayDoorStatusMessageParser.ts index db5e62d8..e905b232 100644 --- a/src/nitro/communication/messages/parser/room/furniture/OneWayDoorStatusMessageParser.ts +++ b/src/nitro/communication/messages/parser/room/furniture/OneWayDoorStatusMessageParser.ts @@ -7,8 +7,8 @@ export class OneWayDoorStatusMessageParser implements IMessageParser public flush(): boolean { - this._itemId = 0; - this._state = 0; + this._itemId = 0; + this._state = 0; return true; } @@ -17,8 +17,8 @@ export class OneWayDoorStatusMessageParser implements IMessageParser { if(!wrapper) return false; - this._itemId = wrapper.readInt(); - this._state = wrapper.readInt(); + this._itemId = wrapper.readInt(); + this._state = wrapper.readInt(); return true; } diff --git a/src/nitro/communication/messages/parser/room/furniture/floor/FurnitureFloorAddParser.ts b/src/nitro/communication/messages/parser/room/furniture/floor/FurnitureFloorAddParser.ts index 74da26a4..97f3c617 100644 --- a/src/nitro/communication/messages/parser/room/furniture/floor/FurnitureFloorAddParser.ts +++ b/src/nitro/communication/messages/parser/room/furniture/floor/FurnitureFloorAddParser.ts @@ -16,7 +16,7 @@ export class FurnitureFloorAddParser implements IMessageParser { if(!wrapper) return false; - this._item = new FurnitureFloorDataParser(wrapper); + this._item = new FurnitureFloorDataParser(wrapper); this._item.username = wrapper.readString(); return true; diff --git a/src/nitro/communication/messages/parser/room/furniture/floor/FurnitureFloorDataParser.ts b/src/nitro/communication/messages/parser/room/furniture/floor/FurnitureFloorDataParser.ts index 71179d78..b02fda4a 100644 --- a/src/nitro/communication/messages/parser/room/furniture/floor/FurnitureFloorDataParser.ts +++ b/src/nitro/communication/messages/parser/room/furniture/floor/FurnitureFloorDataParser.ts @@ -30,21 +30,21 @@ export class FurnitureFloorDataParser public flush(): boolean { - this._itemId = 0; - this._spriteId = 0; - this._spriteName = null; - this._x = 0; - this._y = 0; - this._direction = 0; - this._z = 0; - this._stackHeight = 0; - this._extra = 0; - this._data = null; - this._state = 0; - this._expires = 0; - this._usagePolicy = 0; - this._userId = 0; - this._username = null; + this._itemId = 0; + this._spriteId = 0; + this._spriteName = null; + this._x = 0; + this._y = 0; + this._direction = 0; + this._z = 0; + this._stackHeight = 0; + this._extra = 0; + this._data = null; + this._state = 0; + this._expires = 0; + this._usagePolicy = 0; + this._userId = 0; + this._username = null; return true; } @@ -53,20 +53,20 @@ export class FurnitureFloorDataParser { if(!wrapper) return false; - this._itemId = wrapper.readInt(); - this._spriteId = wrapper.readInt(); - this._x = wrapper.readInt(); - this._y = wrapper.readInt(); - this._direction = ((wrapper.readInt() % 8) * 45); - this._z = parseFloat(wrapper.readString()); - this._stackHeight = parseFloat(wrapper.readString()); - this._extra = wrapper.readInt(); - this._data = FurnitureDataParser.parseObjectData(wrapper); - this._state = parseFloat(this._data && this._data.getLegacyString()) || 0; - this._expires = wrapper.readInt(); - this._usagePolicy = wrapper.readInt(); - this._userId = wrapper.readInt(); - this._username = null; + this._itemId = wrapper.readInt(); + this._spriteId = wrapper.readInt(); + this._x = wrapper.readInt(); + this._y = wrapper.readInt(); + this._direction = ((wrapper.readInt() % 8) * 45); + this._z = parseFloat(wrapper.readString()); + this._stackHeight = parseFloat(wrapper.readString()); + this._extra = wrapper.readInt(); + this._data = FurnitureDataParser.parseObjectData(wrapper); + this._state = parseFloat(this._data && this._data.getLegacyString()) || 0; + this._expires = wrapper.readInt(); + this._usagePolicy = wrapper.readInt(); + this._userId = wrapper.readInt(); + this._username = null; if(this._spriteId < 0) this._spriteName = wrapper.readString(); diff --git a/src/nitro/communication/messages/parser/room/furniture/floor/FurnitureFloorParser.ts b/src/nitro/communication/messages/parser/room/furniture/floor/FurnitureFloorParser.ts index 75ad735d..cb378333 100644 --- a/src/nitro/communication/messages/parser/room/furniture/floor/FurnitureFloorParser.ts +++ b/src/nitro/communication/messages/parser/room/furniture/floor/FurnitureFloorParser.ts @@ -8,8 +8,8 @@ export class FurnitureFloorParser implements IMessageParser public flush(): boolean { - this._owners = new Map(); - this._items = []; + this._owners = new Map(); + this._items = []; return true; } diff --git a/src/nitro/communication/messages/parser/room/furniture/floor/FurnitureFloorRemoveParser.ts b/src/nitro/communication/messages/parser/room/furniture/floor/FurnitureFloorRemoveParser.ts index 7bec9336..773e4cd9 100644 --- a/src/nitro/communication/messages/parser/room/furniture/floor/FurnitureFloorRemoveParser.ts +++ b/src/nitro/communication/messages/parser/room/furniture/floor/FurnitureFloorRemoveParser.ts @@ -9,10 +9,10 @@ export class FurnitureFloorRemoveParser implements IMessageParser public flush(): boolean { - this._itemId = 0; + this._itemId = 0; this._isExpired = true; - this._userId = 0; - this._delay = 0; + this._userId = 0; + this._delay = 0; return true; } @@ -21,10 +21,10 @@ export class FurnitureFloorRemoveParser implements IMessageParser { if(!wrapper) return false; - this._itemId = parseInt(wrapper.readString()); + this._itemId = parseInt(wrapper.readString()); this._isExpired = wrapper.readBoolean(); - this._userId = wrapper.readInt(); - this._delay = wrapper.readInt(); + this._userId = wrapper.readInt(); + this._delay = wrapper.readInt(); return true; } diff --git a/src/nitro/communication/messages/parser/room/furniture/wall/FurnitureWallAddParser.ts b/src/nitro/communication/messages/parser/room/furniture/wall/FurnitureWallAddParser.ts index 23c07c23..ad40e635 100644 --- a/src/nitro/communication/messages/parser/room/furniture/wall/FurnitureWallAddParser.ts +++ b/src/nitro/communication/messages/parser/room/furniture/wall/FurnitureWallAddParser.ts @@ -16,7 +16,7 @@ export class FurnitureWallAddParser implements IMessageParser { if(!wrapper) return false; - this._item = new FurnitureWallDataParser(wrapper); + this._item = new FurnitureWallDataParser(wrapper); this._item.username = wrapper.readString(); return true; diff --git a/src/nitro/communication/messages/parser/room/furniture/wall/FurnitureWallDataParser.ts b/src/nitro/communication/messages/parser/room/furniture/wall/FurnitureWallDataParser.ts index 35f5b618..ca7a5d38 100644 --- a/src/nitro/communication/messages/parser/room/furniture/wall/FurnitureWallDataParser.ts +++ b/src/nitro/communication/messages/parser/room/furniture/wall/FurnitureWallDataParser.ts @@ -31,24 +31,24 @@ export class FurnitureWallDataParser public flush(): boolean { - this._itemId = 0; - this._spriteId = 0; - this._location = null; - this._stuffData = null; - this._state = 0; - this._secondsToExpiration = 0; - this._usagePolicy = -1; - this._userId = 0; - this._username = null; + this._itemId = 0; + this._spriteId = 0; + this._location = null; + this._stuffData = null; + this._state = 0; + this._secondsToExpiration = 0; + this._usagePolicy = -1; + this._userId = 0; + this._username = null; - this._width = 0; - this._height = 0; - this._localX = 0; - this._localY = 0; - this._y = 0; - this._z = 0; - this._direction = null; - this._isOldFormat = false; + this._width = 0; + this._height = 0; + this._localX = 0; + this._localY = 0; + this._y = 0; + this._z = 0; + this._direction = null; + this._isOldFormat = false; return true; } @@ -57,14 +57,14 @@ export class FurnitureWallDataParser { if(!wrapper) return false; - this._itemId = parseInt(wrapper.readString()); - this._spriteId = wrapper.readInt(); - this._location = wrapper.readString(); - this._stuffData = wrapper.readString(); - this._secondsToExpiration = wrapper.readInt(); - this._usagePolicy = wrapper.readInt(); - this._userId = wrapper.readInt(); - this._username = null; + this._itemId = parseInt(wrapper.readString()); + this._spriteId = wrapper.readInt(); + this._location = wrapper.readString(); + this._stuffData = wrapper.readString(); + this._secondsToExpiration = wrapper.readInt(); + this._usagePolicy = wrapper.readInt(); + this._userId = wrapper.readInt(); + this._username = null; const state = parseFloat(this._stuffData); @@ -79,32 +79,32 @@ export class FurnitureWallDataParser if(parts.length >= 3) { let widthHeight = parts[0]; - let leftRight = parts[1]; + let leftRight = parts[1]; const direction = parts[2]; if((widthHeight.length > 3) && (leftRight.length > 2)) { widthHeight = widthHeight.substr(3); - leftRight = leftRight.substr(2); - parts = widthHeight.split(','); + leftRight = leftRight.substr(2); + parts = widthHeight.split(','); if(parts.length >= 2) { - const width = parseInt(parts[0]); - const height = parseInt(parts[1]); + const width = parseInt(parts[0]); + const height = parseInt(parts[1]); parts = leftRight.split(','); if(parts.length >= 2) { - const localX = parseInt(parts[0]); - const localY = parseInt(parts[1]); + const localX = parseInt(parts[0]); + const localY = parseInt(parts[1]); - this._width = width; - this._height = height; - this._localX = localX; - this._localY = localY; + this._width = width; + this._height = height; + this._localX = localX; + this._localY = localY; this._direction = direction; } } diff --git a/src/nitro/communication/messages/parser/room/furniture/wall/FurnitureWallParser.ts b/src/nitro/communication/messages/parser/room/furniture/wall/FurnitureWallParser.ts index 4334ce01..5875cf6e 100644 --- a/src/nitro/communication/messages/parser/room/furniture/wall/FurnitureWallParser.ts +++ b/src/nitro/communication/messages/parser/room/furniture/wall/FurnitureWallParser.ts @@ -8,8 +8,8 @@ export class FurnitureWallParser implements IMessageParser public flush(): boolean { - this._owners = new Map(); - this._items = []; + this._owners = new Map(); + this._items = []; return true; } diff --git a/src/nitro/communication/messages/parser/room/furniture/wall/FurnitureWallRemoveParser.ts b/src/nitro/communication/messages/parser/room/furniture/wall/FurnitureWallRemoveParser.ts index fdc5203b..bd893b74 100644 --- a/src/nitro/communication/messages/parser/room/furniture/wall/FurnitureWallRemoveParser.ts +++ b/src/nitro/communication/messages/parser/room/furniture/wall/FurnitureWallRemoveParser.ts @@ -7,8 +7,8 @@ export class FurnitureWallRemoveParser implements IMessageParser public flush(): boolean { - this._itemId = 0; - this._userId = 0; + this._itemId = 0; + this._userId = 0; return true; } @@ -17,8 +17,8 @@ export class FurnitureWallRemoveParser implements IMessageParser { if(!wrapper) return false; - this._itemId = parseInt(wrapper.readString()); - this._userId = wrapper.readInt(); + this._itemId = parseInt(wrapper.readString()); + this._userId = wrapper.readInt(); return true; } diff --git a/src/nitro/communication/messages/parser/room/furniture/wall/FurnitureWallUpdateParser.ts b/src/nitro/communication/messages/parser/room/furniture/wall/FurnitureWallUpdateParser.ts index f9875063..f4149d4e 100644 --- a/src/nitro/communication/messages/parser/room/furniture/wall/FurnitureWallUpdateParser.ts +++ b/src/nitro/communication/messages/parser/room/furniture/wall/FurnitureWallUpdateParser.ts @@ -16,7 +16,7 @@ export class FurnitureWallUpdateParser implements IMessageParser { if(!wrapper) return false; - this._item = new FurnitureWallDataParser(wrapper); + this._item = new FurnitureWallDataParser(wrapper); this._item.username = wrapper.readString(); return true; diff --git a/src/nitro/communication/messages/parser/room/mapping/FloorHeightMapMessageParser.ts b/src/nitro/communication/messages/parser/room/mapping/FloorHeightMapMessageParser.ts index a86b29e4..f83db7bb 100644 --- a/src/nitro/communication/messages/parser/room/mapping/FloorHeightMapMessageParser.ts +++ b/src/nitro/communication/messages/parser/room/mapping/FloorHeightMapMessageParser.ts @@ -12,13 +12,13 @@ export class FloorHeightMapMessageParser implements IMessageParser public flush(): boolean { - this._model = null; - this._width = 0; - this._height = 0; - this._wallHeight = -1; - this._heightMap = []; - this._scale = 64; - this._model = null; + this._model = null; + this._width = 0; + this._height = 0; + this._wallHeight = -1; + this._heightMap = []; + this._scale = 64; + this._model = null; return true; } @@ -27,9 +27,9 @@ export class FloorHeightMapMessageParser implements IMessageParser { if(!wrapper) return false; - const scale = wrapper.readBoolean(); - const wallHeight = wrapper.readInt(); - const model = wrapper.readString(); + const scale = wrapper.readBoolean(); + const wallHeight = wrapper.readInt(); + const model = wrapper.readString(); return this.parseExplicitly(model, wallHeight, scale); } @@ -41,15 +41,15 @@ export class FloorHeightMapMessageParser implements IMessageParser private parseExplicitly(modelString: string, wallHeight: number, scale: boolean = true): boolean { - this._scale = scale ? 32 : 64; - this._wallHeight = wallHeight; - this._model = modelString; + this._scale = scale ? 32 : 64; + this._wallHeight = wallHeight; + this._model = modelString; - const model = this._model.split('\r'); + const model = this._model.split('\r'); const modelRows = model.length; - let width = 0; - const height = 0; + let width = 0; + const height = 0; let iterator = 0; @@ -66,7 +66,7 @@ export class FloorHeightMapMessageParser implements IMessageParser } this._heightMap = []; - iterator = 0; + iterator = 0; while(iterator < modelRows) { @@ -86,15 +86,15 @@ export class FloorHeightMapMessageParser implements IMessageParser iterator++; } - this._width = width; - this._height = modelRows; + this._width = width; + this._height = modelRows; iterator = 0; while(iterator < modelRows) { const heightMap = this._heightMap[iterator]; - const text = model[iterator]; + const text = model[iterator]; if(text.length > 0) { @@ -102,8 +102,8 @@ export class FloorHeightMapMessageParser implements IMessageParser while(subIterator < text.length) { - const char = text.charAt(subIterator); - let height = RoomPlaneParser.TILE_BLOCKED; + const char = text.charAt(subIterator); + let height = RoomPlaneParser.TILE_BLOCKED; if((char !== 'x') && (char !== 'X')) height = parseInt(char, 36); diff --git a/src/nitro/communication/messages/parser/room/mapping/RoomEntryTileMessageParser.ts b/src/nitro/communication/messages/parser/room/mapping/RoomEntryTileMessageParser.ts index 2407027f..92f74eff 100644 --- a/src/nitro/communication/messages/parser/room/mapping/RoomEntryTileMessageParser.ts +++ b/src/nitro/communication/messages/parser/room/mapping/RoomEntryTileMessageParser.ts @@ -8,8 +8,8 @@ export class RoomEntryTileMessageParser implements IMessageParser public flush(): boolean { - this._x = 0; - this._y = 0; + this._x = 0; + this._y = 0; this._direction = 0; return true; @@ -19,8 +19,8 @@ export class RoomEntryTileMessageParser implements IMessageParser { if(!wrapper) return false; - this._x = wrapper.readInt(); - this._y = wrapper.readInt(); + this._x = wrapper.readInt(); + this._y = wrapper.readInt(); this._direction = wrapper.readInt(); return true; diff --git a/src/nitro/communication/messages/parser/room/mapping/RoomHeightMapParser.ts b/src/nitro/communication/messages/parser/room/mapping/RoomHeightMapParser.ts index ced17a14..3c9c9a80 100644 --- a/src/nitro/communication/messages/parser/room/mapping/RoomHeightMapParser.ts +++ b/src/nitro/communication/messages/parser/room/mapping/RoomHeightMapParser.ts @@ -44,9 +44,9 @@ export class RoomHeightMapParser implements IMessageParser public flush(): boolean { - this._width = 0; - this._height = 0; - this._heights = []; + this._width = 0; + this._height = 0; + this._heights = []; return true; } @@ -55,9 +55,9 @@ export class RoomHeightMapParser implements IMessageParser { if(!wrapper) return false; - this._width = wrapper.readInt(); - const totalTiles = wrapper.readInt(); - this._height = totalTiles / this._width; + this._width = wrapper.readInt(); + const totalTiles = wrapper.readInt(); + this._height = totalTiles / this._width; let i = 0; diff --git a/src/nitro/communication/messages/parser/room/mapping/RoomHeightMapUpdateParser.ts b/src/nitro/communication/messages/parser/room/mapping/RoomHeightMapUpdateParser.ts index 7f1e0c43..f2c0f559 100644 --- a/src/nitro/communication/messages/parser/room/mapping/RoomHeightMapUpdateParser.ts +++ b/src/nitro/communication/messages/parser/room/mapping/RoomHeightMapUpdateParser.ts @@ -11,11 +11,11 @@ export class RoomHeightMapUpdateParser implements IMessageParser public flush(): boolean { - this._wrapper = null; - this._count = 0; - this._x = 0; - this._y = 0; - this._value = 0; + this._wrapper = null; + this._count = 0; + this._x = 0; + this._y = 0; + this._value = 0; return true; } @@ -41,9 +41,9 @@ export class RoomHeightMapUpdateParser implements IMessageParser this._count--; - this._x = this._wrapper.readByte(); - this._y = this._wrapper.readByte(); - this._value = this._wrapper.readShort(); + this._x = this._wrapper.readByte(); + this._y = this._wrapper.readByte(); + this._value = this._wrapper.readShort(); return true; } @@ -52,8 +52,8 @@ export class RoomHeightMapUpdateParser implements IMessageParser { if(!wrapper) return false; - this._wrapper = wrapper; - this._count = wrapper.readByte(); + this._wrapper = wrapper; + this._count = wrapper.readByte(); return true; } diff --git a/src/nitro/communication/messages/parser/room/mapping/RoomPaintParser.ts b/src/nitro/communication/messages/parser/room/mapping/RoomPaintParser.ts index 4abe196d..ee1fa503 100644 --- a/src/nitro/communication/messages/parser/room/mapping/RoomPaintParser.ts +++ b/src/nitro/communication/messages/parser/room/mapping/RoomPaintParser.ts @@ -9,10 +9,10 @@ export class RoomPaintParser implements IMessageParser public flush(): boolean { - this._floorType = null; - this._wallType = null; - this._landscapeType = null; - this._landscapeAnimation = null; + this._floorType = null; + this._wallType = null; + this._landscapeType = null; + this._landscapeAnimation = null; return true; } diff --git a/src/nitro/communication/messages/parser/room/mapping/RoomReadyMessageParser.ts b/src/nitro/communication/messages/parser/room/mapping/RoomReadyMessageParser.ts index 8c938352..eef60979 100644 --- a/src/nitro/communication/messages/parser/room/mapping/RoomReadyMessageParser.ts +++ b/src/nitro/communication/messages/parser/room/mapping/RoomReadyMessageParser.ts @@ -7,8 +7,8 @@ export class RoomReadyMessageParser implements IMessageParser public flush(): boolean { - this._name = null; - this._roomId = 0; + this._name = null; + this._roomId = 0; return true; } @@ -17,8 +17,8 @@ export class RoomReadyMessageParser implements IMessageParser { if(!wrapper) return false; - this._name = wrapper.readString(); - this._roomId = wrapper.readInt(); + this._name = wrapper.readString(); + this._roomId = wrapper.readInt(); return true; } diff --git a/src/nitro/communication/messages/parser/room/mapping/RoomVisualizationSettingsParser.ts b/src/nitro/communication/messages/parser/room/mapping/RoomVisualizationSettingsParser.ts index 899b5b90..b8c4e8b7 100644 --- a/src/nitro/communication/messages/parser/room/mapping/RoomVisualizationSettingsParser.ts +++ b/src/nitro/communication/messages/parser/room/mapping/RoomVisualizationSettingsParser.ts @@ -8,9 +8,9 @@ export class RoomVisualizationSettingsParser implements IMessageParser public flush(): boolean { - this._hideWalls = false; - this._thicknessWall = 0; - this._thicknessFloor = 0; + this._hideWalls = false; + this._thicknessWall = 0; + this._thicknessFloor = 0; return true; } @@ -19,16 +19,16 @@ export class RoomVisualizationSettingsParser implements IMessageParser { if(!wrapper) return false; - this._hideWalls = wrapper.readBoolean(); + this._hideWalls = wrapper.readBoolean(); - let thicknessWall = wrapper.readInt(); - let thicknessFloor = wrapper.readInt(); + let thicknessWall = wrapper.readInt(); + let thicknessFloor = wrapper.readInt(); - thicknessWall = (thicknessWall < -2) ? -2 : (thicknessWall > 1) ? 1 : thicknessWall; - thicknessFloor = (thicknessFloor < -2) ? -2 : (thicknessFloor > 1) ? 1 : thicknessFloor; + thicknessWall = (thicknessWall < -2) ? -2 : (thicknessWall > 1) ? 1 : thicknessWall; + thicknessFloor = (thicknessFloor < -2) ? -2 : (thicknessFloor > 1) ? 1 : thicknessFloor; - this._thicknessWall = Math.pow(2, thicknessWall); - this._thicknessFloor = Math.pow(2, thicknessFloor); + this._thicknessWall = Math.pow(2, thicknessWall); + this._thicknessFloor = Math.pow(2, thicknessFloor); return true; } diff --git a/src/nitro/communication/messages/parser/room/pet/PetExperienceParser.ts b/src/nitro/communication/messages/parser/room/pet/PetExperienceParser.ts index 1057ee68..798e5969 100644 --- a/src/nitro/communication/messages/parser/room/pet/PetExperienceParser.ts +++ b/src/nitro/communication/messages/parser/room/pet/PetExperienceParser.ts @@ -8,9 +8,9 @@ export class PetExperienceParser implements IMessageParser public flush(): boolean { - this._petId = -1; - this._roomIndex = -1; - this._gainedExperience = 0; + this._petId = -1; + this._roomIndex = -1; + this._gainedExperience = 0; return true; } @@ -18,9 +18,9 @@ export class PetExperienceParser implements IMessageParser { if(!wrapper) return false; - this._petId = wrapper.readInt(); - this._roomIndex = wrapper.readInt(); - this._gainedExperience = wrapper.readInt(); + this._petId = wrapper.readInt(); + this._roomIndex = wrapper.readInt(); + this._gainedExperience = wrapper.readInt(); return true; } diff --git a/src/nitro/communication/messages/parser/room/pet/PetFigureUpdateParser.ts b/src/nitro/communication/messages/parser/room/pet/PetFigureUpdateParser.ts index 84aef8f0..d6d0f0c4 100644 --- a/src/nitro/communication/messages/parser/room/pet/PetFigureUpdateParser.ts +++ b/src/nitro/communication/messages/parser/room/pet/PetFigureUpdateParser.ts @@ -18,11 +18,11 @@ export class PetFigureUpdateParser implements IMessageParser { if(!wrapper) return false; - this._roomIndex = wrapper.readInt(); - this._petId = wrapper.readInt(); - this._figureData = new PetFigureDataParser(wrapper); - this._hasSaddle = wrapper.readBoolean(); - this._isRiding = wrapper.readBoolean(); + this._roomIndex = wrapper.readInt(); + this._petId = wrapper.readInt(); + this._figureData = new PetFigureDataParser(wrapper); + this._hasSaddle = wrapper.readBoolean(); + this._isRiding = wrapper.readBoolean(); return true; } diff --git a/src/nitro/communication/messages/parser/room/pet/PetInfoParser.ts b/src/nitro/communication/messages/parser/room/pet/PetInfoParser.ts index a8894ec3..0315216d 100644 --- a/src/nitro/communication/messages/parser/room/pet/PetInfoParser.ts +++ b/src/nitro/communication/messages/parser/room/pet/PetInfoParser.ts @@ -32,8 +32,8 @@ export class PetInfoParser implements IMessageParser public flush(): boolean { - this._id = -1; - this._skillThresholds = []; + this._id = -1; + this._skillThresholds = []; return true; } @@ -42,23 +42,23 @@ export class PetInfoParser implements IMessageParser { if(!wrapper) return false; - this._id = wrapper.readInt(); - this._name = wrapper.readString(); - this._level = wrapper.readInt(); - this._maximumLevel = wrapper.readInt(); - this._experience = wrapper.readInt(); + this._id = wrapper.readInt(); + this._name = wrapper.readString(); + this._level = wrapper.readInt(); + this._maximumLevel = wrapper.readInt(); + this._experience = wrapper.readInt(); this._levelExperienceGoal = wrapper.readInt(); - this._energy = wrapper.readInt(); - this._maximumEnergy = wrapper.readInt(); - this._happyness = wrapper.readInt(); - this._maximumHappyness = wrapper.readInt(); - this._respect = wrapper.readInt(); - this._ownerId = wrapper.readInt(); - this._age = wrapper.readInt(); - this._ownerName = wrapper.readString(); - this._rarityLevel = wrapper.readInt(); - this._saddle = wrapper.readBoolean(); - this._rider = wrapper.readBoolean(); + this._energy = wrapper.readInt(); + this._maximumEnergy = wrapper.readInt(); + this._happyness = wrapper.readInt(); + this._maximumHappyness = wrapper.readInt(); + this._respect = wrapper.readInt(); + this._ownerId = wrapper.readInt(); + this._age = wrapper.readInt(); + this._ownerName = wrapper.readString(); + this._rarityLevel = wrapper.readInt(); + this._saddle = wrapper.readBoolean(); + this._rider = wrapper.readBoolean(); let total = wrapper.readInt(); @@ -70,15 +70,15 @@ export class PetInfoParser implements IMessageParser } this._skillThresholds.sort(); - this._publiclyRideable = wrapper.readInt(); - this._breedable = wrapper.readBoolean(); - this._fullyGrown = wrapper.readBoolean(); - this._dead = wrapper.readBoolean(); - this._unknownRarity = wrapper.readInt(); - this._maximumTimeToLive = wrapper.readInt(); + this._publiclyRideable = wrapper.readInt(); + this._breedable = wrapper.readBoolean(); + this._fullyGrown = wrapper.readBoolean(); + this._dead = wrapper.readBoolean(); + this._unknownRarity = wrapper.readInt(); + this._maximumTimeToLive = wrapper.readInt(); this._remainingTimeToLive = wrapper.readInt(); - this._remainingGrowTime = wrapper.readInt(); - this._publiclyBreedable = wrapper.readBoolean(); + this._remainingGrowTime = wrapper.readInt(); + this._publiclyBreedable = wrapper.readBoolean(); return true; } diff --git a/src/nitro/communication/messages/parser/room/unit/RoomUnitDanceParser.ts b/src/nitro/communication/messages/parser/room/unit/RoomUnitDanceParser.ts index c646df6c..806b7638 100644 --- a/src/nitro/communication/messages/parser/room/unit/RoomUnitDanceParser.ts +++ b/src/nitro/communication/messages/parser/room/unit/RoomUnitDanceParser.ts @@ -7,8 +7,8 @@ export class RoomUnitDanceParser implements IMessageParser public flush(): boolean { - this._unitId = null; - this._danceId = 0; + this._unitId = null; + this._danceId = 0; return true; } @@ -17,8 +17,8 @@ export class RoomUnitDanceParser implements IMessageParser { if(!wrapper) return false; - this._unitId = wrapper.readInt(); - this._danceId = wrapper.readInt(); + this._unitId = wrapper.readInt(); + this._danceId = wrapper.readInt(); return true; } diff --git a/src/nitro/communication/messages/parser/room/unit/RoomUnitEffectParser.ts b/src/nitro/communication/messages/parser/room/unit/RoomUnitEffectParser.ts index 7fbb7cab..021f27ee 100644 --- a/src/nitro/communication/messages/parser/room/unit/RoomUnitEffectParser.ts +++ b/src/nitro/communication/messages/parser/room/unit/RoomUnitEffectParser.ts @@ -8,9 +8,9 @@ export class RoomUnitEffectParser implements IMessageParser public flush(): boolean { - this._unitId = null; - this._effectId = 0; - this._delay = 0; + this._unitId = null; + this._effectId = 0; + this._delay = 0; return true; } @@ -19,9 +19,9 @@ export class RoomUnitEffectParser implements IMessageParser { if(!wrapper) return false; - this._unitId = wrapper.readInt(); - this._effectId = wrapper.readInt(); - this._delay = wrapper.readInt(); + this._unitId = wrapper.readInt(); + this._effectId = wrapper.readInt(); + this._delay = wrapper.readInt(); return true; } diff --git a/src/nitro/communication/messages/parser/room/unit/RoomUnitExpressionParser.ts b/src/nitro/communication/messages/parser/room/unit/RoomUnitExpressionParser.ts index d41ebc97..cc6ca610 100644 --- a/src/nitro/communication/messages/parser/room/unit/RoomUnitExpressionParser.ts +++ b/src/nitro/communication/messages/parser/room/unit/RoomUnitExpressionParser.ts @@ -7,8 +7,8 @@ export class RoomUnitExpressionParser implements IMessageParser public flush(): boolean { - this._unitId = null; - this._expression = 0; + this._unitId = null; + this._expression = 0; return true; } @@ -17,8 +17,8 @@ export class RoomUnitExpressionParser implements IMessageParser { if(!wrapper) return false; - this._unitId = wrapper.readInt(); - this._expression = wrapper.readInt(); + this._unitId = wrapper.readInt(); + this._expression = wrapper.readInt(); return true; } diff --git a/src/nitro/communication/messages/parser/room/unit/RoomUnitHandItemParser.ts b/src/nitro/communication/messages/parser/room/unit/RoomUnitHandItemParser.ts index b8ac8513..224534a1 100644 --- a/src/nitro/communication/messages/parser/room/unit/RoomUnitHandItemParser.ts +++ b/src/nitro/communication/messages/parser/room/unit/RoomUnitHandItemParser.ts @@ -7,8 +7,8 @@ export class RoomUnitHandItemParser implements IMessageParser public flush(): boolean { - this._unitId = null; - this._handId = 0; + this._unitId = null; + this._handId = 0; return true; } @@ -17,8 +17,8 @@ export class RoomUnitHandItemParser implements IMessageParser { if(!wrapper) return false; - this._unitId = wrapper.readInt(); - this._handId = wrapper.readInt(); + this._unitId = wrapper.readInt(); + this._handId = wrapper.readInt(); return true; } diff --git a/src/nitro/communication/messages/parser/room/unit/RoomUnitHandItemReceivedParser.ts b/src/nitro/communication/messages/parser/room/unit/RoomUnitHandItemReceivedParser.ts index 414771a8..726e78e0 100644 --- a/src/nitro/communication/messages/parser/room/unit/RoomUnitHandItemReceivedParser.ts +++ b/src/nitro/communication/messages/parser/room/unit/RoomUnitHandItemReceivedParser.ts @@ -7,8 +7,8 @@ export class RoomUnitHandItemReceivedParser implements IMessageParser public flush(): boolean { - this._giverUserId = -1; - this._handItemType = -1; + this._giverUserId = -1; + this._handItemType = -1; return true; } @@ -17,8 +17,8 @@ export class RoomUnitHandItemReceivedParser implements IMessageParser { if(!wrapper) return false; - this._giverUserId = wrapper.readInt(); - this._handItemType = wrapper.readInt(); + this._giverUserId = wrapper.readInt(); + this._handItemType = wrapper.readInt(); return true; } diff --git a/src/nitro/communication/messages/parser/room/unit/RoomUnitIdleParser.ts b/src/nitro/communication/messages/parser/room/unit/RoomUnitIdleParser.ts index 70d91292..0bc9ddc2 100644 --- a/src/nitro/communication/messages/parser/room/unit/RoomUnitIdleParser.ts +++ b/src/nitro/communication/messages/parser/room/unit/RoomUnitIdleParser.ts @@ -17,8 +17,8 @@ export class RoomUnitIdleParser implements IMessageParser { if(!wrapper) return false; - this._unitId = wrapper.readInt(); - this._isIdle = wrapper.readBoolean(); + this._unitId = wrapper.readInt(); + this._isIdle = wrapper.readBoolean(); return true; } diff --git a/src/nitro/communication/messages/parser/room/unit/RoomUnitInfoParser.ts b/src/nitro/communication/messages/parser/room/unit/RoomUnitInfoParser.ts index 0d52956b..c4e1c06b 100644 --- a/src/nitro/communication/messages/parser/room/unit/RoomUnitInfoParser.ts +++ b/src/nitro/communication/messages/parser/room/unit/RoomUnitInfoParser.ts @@ -10,11 +10,11 @@ export class RoomUnitInfoParser implements IMessageParser public flush(): boolean { - this._unitId = null; - this._figure = null; - this._gender = 'M'; - this._motto = null; - this._achievementScore = 0; + this._unitId = null; + this._figure = null; + this._gender = 'M'; + this._motto = null; + this._achievementScore = 0; return true; } @@ -23,11 +23,11 @@ export class RoomUnitInfoParser implements IMessageParser { if(!wrapper) return false; - this._unitId = wrapper.readInt(); - this._figure = wrapper.readString(); - this._gender = wrapper.readString().toLocaleUpperCase(); - this._motto = wrapper.readString(); - this._achievementScore = wrapper.readInt(); + this._unitId = wrapper.readInt(); + this._figure = wrapper.readString(); + this._gender = wrapper.readString().toLocaleUpperCase(); + this._motto = wrapper.readString(); + this._achievementScore = wrapper.readInt(); return true; } diff --git a/src/nitro/communication/messages/parser/room/unit/RoomUnitNumberParser.ts b/src/nitro/communication/messages/parser/room/unit/RoomUnitNumberParser.ts index c2d177f5..1defaad8 100644 --- a/src/nitro/communication/messages/parser/room/unit/RoomUnitNumberParser.ts +++ b/src/nitro/communication/messages/parser/room/unit/RoomUnitNumberParser.ts @@ -7,8 +7,8 @@ export class RoomUnitNumberParser implements IMessageParser public flush(): boolean { - this._unitId = null; - this._value = 0; + this._unitId = null; + this._value = 0; return true; } @@ -17,8 +17,8 @@ export class RoomUnitNumberParser implements IMessageParser { if(!wrapper) return false; - this._unitId = wrapper.readInt(); - this._value = wrapper.readInt(); + this._unitId = wrapper.readInt(); + this._value = wrapper.readInt(); return true; } diff --git a/src/nitro/communication/messages/parser/room/unit/RoomUnitParser.ts b/src/nitro/communication/messages/parser/room/unit/RoomUnitParser.ts index b841ebeb..f231a482 100644 --- a/src/nitro/communication/messages/parser/room/unit/RoomUnitParser.ts +++ b/src/nitro/communication/messages/parser/room/unit/RoomUnitParser.ts @@ -25,69 +25,69 @@ export class RoomUnitParser implements IMessageParser while(i < totalUsers) { - const id = wrapper.readInt(); - const username = wrapper.readString(); - const custom = wrapper.readString(); - let figure = wrapper.readString(); + const id = wrapper.readInt(); + const username = wrapper.readString(); + const custom = wrapper.readString(); + let figure = wrapper.readString(); const roomIndex = wrapper.readInt(); - const x = wrapper.readInt(); - const y = wrapper.readInt(); - const z = parseFloat(wrapper.readString()); + const x = wrapper.readInt(); + const y = wrapper.readInt(); + const z = parseFloat(wrapper.readString()); const direction = wrapper.readInt(); - const type = wrapper.readInt(); + const type = wrapper.readInt(); const user = new UserMessageData(roomIndex); - user.dir = direction; - user.name = username; + user.dir = direction; + user.name = username; user.custom = custom; - user.x = x; - user.y = y; - user.z = z; + user.x = x; + user.y = y; + user.z = z; this._users.push(user); if(type === 1) { - user.webID = id; - user.userType = RoomObjectType.USER; - user.sex = this.resolveSex(wrapper.readString()); - user.groupID = ('' + wrapper.readInt()); - user.groupStatus = wrapper.readInt(); - user.groupName = wrapper.readString(); + user.webID = id; + user.userType = RoomObjectType.USER; + user.sex = this.resolveSex(wrapper.readString()); + user.groupID = ('' + wrapper.readInt()); + user.groupStatus = wrapper.readInt(); + user.groupName = wrapper.readString(); const swimFigure = wrapper.readString(); if(swimFigure !== '') figure = this.convertSwimFigure(swimFigure, figure, user.sex); - user.figure = figure; + user.figure = figure; user.activityPoints = wrapper.readInt(); - user.isModerator = wrapper.readBoolean(); + user.isModerator = wrapper.readBoolean(); } else if(type === 2) { - user.userType = RoomObjectType.PET; - user.figure = figure; - user.webID = id; - user.subType = wrapper.readInt().toString(); - user.ownerId = wrapper.readInt(); - user.ownerName = wrapper.readString(); - user.rarityLevel = wrapper.readInt(); - user.hasSaddle = wrapper.readBoolean(); - user.isRiding = wrapper.readBoolean(); - user.canBreed = wrapper.readBoolean(); - user.canHarvest = wrapper.readBoolean(); - user.canRevive = wrapper.readBoolean(); - user.hasBreedingPermission = wrapper.readBoolean(); - user.petLevel = wrapper.readInt(); - user.petPosture = wrapper.readString(); + user.userType = RoomObjectType.PET; + user.figure = figure; + user.webID = id; + user.subType = wrapper.readInt().toString(); + user.ownerId = wrapper.readInt(); + user.ownerName = wrapper.readString(); + user.rarityLevel = wrapper.readInt(); + user.hasSaddle = wrapper.readBoolean(); + user.isRiding = wrapper.readBoolean(); + user.canBreed = wrapper.readBoolean(); + user.canHarvest = wrapper.readBoolean(); + user.canRevive = wrapper.readBoolean(); + user.hasBreedingPermission = wrapper.readBoolean(); + user.petLevel = wrapper.readInt(); + user.petPosture = wrapper.readString(); } else if(type === 3) { - user.userType = RoomObjectType.BOT; - user.webID = (roomIndex * -1); + user.userType = RoomObjectType.BOT; + user.webID = (roomIndex * -1); if(figure.indexOf('/') === -1) user.figure = figure; else user.figure = 'hr-100-.hd-180-1.ch-876-66.lg-270-94.sh-300-64'; @@ -97,12 +97,12 @@ export class RoomUnitParser implements IMessageParser else if(type === 4) { - user.userType = RoomObjectType.RENTABLE_BOT; - user.webID = id; - user.sex = this.resolveSex(wrapper.readString()); - user.figure = figure; - user.ownerId = wrapper.readInt(); - user.ownerName = wrapper.readString(); + user.userType = RoomObjectType.RENTABLE_BOT; + user.webID = id; + user.sex = this.resolveSex(wrapper.readString()); + user.figure = figure; + user.ownerId = wrapper.readInt(); + user.ownerName = wrapper.readString(); const totalSkills = wrapper.readInt(); @@ -138,12 +138,12 @@ export class RoomUnitParser implements IMessageParser private convertSwimFigure(k: string, _arg_2: string, _arg_3: string): string { - const _local_4 = _arg_2.split('.'); - let _local_5 = 1; - let _local_6 = 1; - let _local_7 = 1; - const _local_8 = 10000; - let i = 0; + const _local_4 = _arg_2.split('.'); + let _local_5 = 1; + let _local_6 = 1; + let _local_7 = 1; + const _local_8 = 10000; + let i = 0; while(i < _local_4.length) { diff --git a/src/nitro/communication/messages/parser/room/unit/RoomUnitStatusAction.ts b/src/nitro/communication/messages/parser/room/unit/RoomUnitStatusAction.ts index be47333b..f49e6570 100644 --- a/src/nitro/communication/messages/parser/room/unit/RoomUnitStatusAction.ts +++ b/src/nitro/communication/messages/parser/room/unit/RoomUnitStatusAction.ts @@ -5,8 +5,8 @@ export class RoomUnitStatusAction constructor(action: string, value: string) { - this._action = action; - this._value = value; + this._action = action; + this._value = value; } public get action(): string diff --git a/src/nitro/communication/messages/parser/room/unit/RoomUnitStatusMessage.ts b/src/nitro/communication/messages/parser/room/unit/RoomUnitStatusMessage.ts index 1238db85..5bc7d583 100644 --- a/src/nitro/communication/messages/parser/room/unit/RoomUnitStatusMessage.ts +++ b/src/nitro/communication/messages/parser/room/unit/RoomUnitStatusMessage.ts @@ -18,19 +18,19 @@ export class RoomUnitStatusMessage constructor(id: number, x: number, y: number, z: number, height: number, headDirection: number, direction: number, targetX: number = 0, targetY: number = 0, targetZ: number = 0, didMove: boolean, canStandUp: boolean, actions: RoomUnitStatusAction[]) { - this._id = id; - this._x = x; - this._y = y; - this._z = z; - this._height = height; + this._id = id; + this._x = x; + this._y = y; + this._z = z; + this._height = height; this._headDirection = headDirection; - this._direction = direction; - this._targetX = targetX; - this._targetY = targetY; - this._targetZ = targetZ; - this._didMove = didMove; - this._canStandUp = canStandUp; - this._actions = actions || []; + this._direction = direction; + this._targetX = targetX; + this._targetY = targetY; + this._targetZ = targetZ; + this._didMove = didMove; + this._canStandUp = canStandUp; + this._actions = actions || []; } public get id(): number diff --git a/src/nitro/communication/messages/parser/room/unit/RoomUnitStatusParser.ts b/src/nitro/communication/messages/parser/room/unit/RoomUnitStatusParser.ts index 8f717c4b..09501813 100644 --- a/src/nitro/communication/messages/parser/room/unit/RoomUnitStatusParser.ts +++ b/src/nitro/communication/messages/parser/room/unit/RoomUnitStatusParser.ts @@ -8,7 +8,7 @@ export class RoomUnitStatusParser implements IMessageParser public flush(): boolean { - this._statuses = []; + this._statuses = []; return true; } @@ -50,13 +50,13 @@ export class RoomUnitStatusParser implements IMessageParser const direction = ((wrapper.readInt() % 8) * 45); const actions = wrapper.readString(); - let targetX = 0; - let targetY = 0; - let targetZ = 0; - let height = 0; - let canStandUp = false; - let didMove = false; - const isSlide = false; + let targetX = 0; + let targetY = 0; + let targetZ = 0; + let height = 0; + let canStandUp = false; + let didMove = false; + const isSlide = false; if(actions) { diff --git a/src/nitro/communication/messages/parser/room/unit/chat/RoomUnitChatParser.ts b/src/nitro/communication/messages/parser/room/unit/chat/RoomUnitChatParser.ts index 42d851a6..625719ab 100644 --- a/src/nitro/communication/messages/parser/room/unit/chat/RoomUnitChatParser.ts +++ b/src/nitro/communication/messages/parser/room/unit/chat/RoomUnitChatParser.ts @@ -11,11 +11,11 @@ export class RoomUnitChatParser implements IMessageParser public flush(): boolean { - this._roomIndex = null; - this._message = null; - this._gesture = 0; - this._bubble = 0; - this._urls = []; + this._roomIndex = null; + this._message = null; + this._gesture = 0; + this._bubble = 0; + this._urls = []; this._messageLength = 0; return true; @@ -25,10 +25,10 @@ export class RoomUnitChatParser implements IMessageParser { if(!wrapper) return false; - this._roomIndex = wrapper.readInt(); - this._message = wrapper.readString(); - this._gesture = wrapper.readInt(); - this._bubble = wrapper.readInt(); + this._roomIndex = wrapper.readInt(); + this._message = wrapper.readString(); + this._gesture = wrapper.readInt(); + this._bubble = wrapper.readInt(); this.parseUrls(wrapper); diff --git a/src/nitro/communication/messages/parser/room/unit/chat/RoomUnitTypingParser.ts b/src/nitro/communication/messages/parser/room/unit/chat/RoomUnitTypingParser.ts index 27159a2e..e02ed09f 100644 --- a/src/nitro/communication/messages/parser/room/unit/chat/RoomUnitTypingParser.ts +++ b/src/nitro/communication/messages/parser/room/unit/chat/RoomUnitTypingParser.ts @@ -7,8 +7,8 @@ export class RoomUnitTypingParser implements IMessageParser public flush(): boolean { - this._unitId = null; - this._isTyping = false; + this._unitId = null; + this._isTyping = false; return true; } @@ -17,8 +17,8 @@ export class RoomUnitTypingParser implements IMessageParser { if(!wrapper) return false; - this._unitId = wrapper.readInt(); - this._isTyping = wrapper.readInt() === 1 ? true : false; + this._unitId = wrapper.readInt(); + this._isTyping = wrapper.readInt() === 1 ? true : false; return true; } diff --git a/src/nitro/communication/messages/parser/talent/TalentTrackParser.ts b/src/nitro/communication/messages/parser/talent/TalentTrackParser.ts index 4cf2984d..4d7b2aec 100644 --- a/src/nitro/communication/messages/parser/talent/TalentTrackParser.ts +++ b/src/nitro/communication/messages/parser/talent/TalentTrackParser.ts @@ -10,8 +10,8 @@ export class TalentTrackParser implements IMessageParser public flush(): boolean { - this._type = null; - this._levels = null; + this._type = null; + this._levels = null; return true; } diff --git a/src/nitro/communication/messages/parser/user/ApproveNameResultParser.ts b/src/nitro/communication/messages/parser/user/ApproveNameResultParser.ts index b2346674..80e913b9 100644 --- a/src/nitro/communication/messages/parser/user/ApproveNameResultParser.ts +++ b/src/nitro/communication/messages/parser/user/ApproveNameResultParser.ts @@ -7,8 +7,8 @@ export class ApproveNameResultParser implements IMessageParser public flush(): boolean { - this._result = -1; - this._validationInfo = ''; + this._result = -1; + this._validationInfo = ''; return true; } @@ -17,8 +17,8 @@ export class ApproveNameResultParser implements IMessageParser { if(!wrapper) return false; - this._result = wrapper.readInt(); - this._validationInfo = wrapper.readString(); + this._result = wrapper.readInt(); + this._validationInfo = wrapper.readString(); return true; } diff --git a/src/nitro/communication/messages/parser/user/IgnoreResultParser.ts b/src/nitro/communication/messages/parser/user/IgnoreResultParser.ts index 17539e9a..50df3d7d 100644 --- a/src/nitro/communication/messages/parser/user/IgnoreResultParser.ts +++ b/src/nitro/communication/messages/parser/user/IgnoreResultParser.ts @@ -7,8 +7,8 @@ export class IgnoreResultParser implements IMessageParser public flush(): boolean { - this._result = -1; - this._name = null; + this._result = -1; + this._name = null; return true; } @@ -17,8 +17,8 @@ export class IgnoreResultParser implements IMessageParser { if(!wrapper) return false; - this._result = wrapper.readInt(); - this._name = wrapper.readString(); + this._result = wrapper.readInt(); + this._name = wrapper.readString(); return true; } diff --git a/src/nitro/communication/messages/parser/user/RespectReceivedParser.ts b/src/nitro/communication/messages/parser/user/RespectReceivedParser.ts index fa124e2b..f4379cd2 100644 --- a/src/nitro/communication/messages/parser/user/RespectReceivedParser.ts +++ b/src/nitro/communication/messages/parser/user/RespectReceivedParser.ts @@ -7,8 +7,8 @@ export class RespectReceivedParser implements IMessageParser public flush(): boolean { - this._userId = 0; - this._respectsReceived = 0; + this._userId = 0; + this._respectsReceived = 0; return true; } @@ -17,8 +17,8 @@ export class RespectReceivedParser implements IMessageParser { if(!wrapper) return false; - this._userId = wrapper.readInt(); - this._respectsReceived = wrapper.readInt(); + this._userId = wrapper.readInt(); + this._respectsReceived = wrapper.readInt(); return true; } diff --git a/src/nitro/communication/messages/parser/user/access/UserPermissionsParser.ts b/src/nitro/communication/messages/parser/user/access/UserPermissionsParser.ts index 1e8a7d5e..833ceebf 100644 --- a/src/nitro/communication/messages/parser/user/access/UserPermissionsParser.ts +++ b/src/nitro/communication/messages/parser/user/access/UserPermissionsParser.ts @@ -8,9 +8,9 @@ export class UserPermissionsParser implements IMessageParser public flush(): boolean { - this._clubLevel = 0; + this._clubLevel = 0; this._securityLevel = 0; - this._isAmbassador = false; + this._isAmbassador = false; return true; } @@ -19,9 +19,9 @@ export class UserPermissionsParser implements IMessageParser { if(!wrapper) return false; - this._clubLevel = wrapper.readInt(); + this._clubLevel = wrapper.readInt(); this._securityLevel = wrapper.readInt(); - this._isAmbassador = wrapper.readBoolean(); + this._isAmbassador = wrapper.readBoolean(); return true; } diff --git a/src/nitro/communication/messages/parser/user/data/RelationshipStatusInfoMessageParser.ts b/src/nitro/communication/messages/parser/user/data/RelationshipStatusInfoMessageParser.ts index 5d86ae28..e7e3b5f2 100644 --- a/src/nitro/communication/messages/parser/user/data/RelationshipStatusInfoMessageParser.ts +++ b/src/nitro/communication/messages/parser/user/data/RelationshipStatusInfoMessageParser.ts @@ -9,7 +9,7 @@ export class RelationshipStatusInfoMessageParser implements IMessageParser public flush(): boolean { - this._userId = 0; + this._userId = 0; this._relationshipStatusMap = null; return true; @@ -22,7 +22,7 @@ export class RelationshipStatusInfoMessageParser implements IMessageParser this._userId = wrapper.readInt(); this._relationshipStatusMap = new AdvancedMap(); - const relationshipsCount = wrapper.readInt(); + const relationshipsCount = wrapper.readInt(); for(let i = 0; i < relationshipsCount; i++) { diff --git a/src/nitro/communication/messages/parser/user/data/UserCurrentBadgesParser.ts b/src/nitro/communication/messages/parser/user/data/UserCurrentBadgesParser.ts index e3c18147..9ddd6cdc 100644 --- a/src/nitro/communication/messages/parser/user/data/UserCurrentBadgesParser.ts +++ b/src/nitro/communication/messages/parser/user/data/UserCurrentBadgesParser.ts @@ -7,8 +7,8 @@ export class UserCurrentBadgesParser implements IMessageParser public flush(): boolean { - this._userId = null; - this._badges = []; + this._userId = null; + this._badges = []; return true; } @@ -23,7 +23,7 @@ export class UserCurrentBadgesParser implements IMessageParser while(totalBadges > 0) { - const slotId = wrapper.readInt(); + const slotId = wrapper.readInt(); const badgeCode = wrapper.readString(); this._badges.push(badgeCode); diff --git a/src/nitro/communication/messages/parser/user/data/UserFigureParser.ts b/src/nitro/communication/messages/parser/user/data/UserFigureParser.ts index cf22ce1e..09dd9edb 100644 --- a/src/nitro/communication/messages/parser/user/data/UserFigureParser.ts +++ b/src/nitro/communication/messages/parser/user/data/UserFigureParser.ts @@ -7,8 +7,8 @@ export class UserFigureParser implements IMessageParser public flush(): boolean { - this._figure = null; - this._gender = null; + this._figure = null; + this._gender = null; return true; } @@ -17,8 +17,8 @@ export class UserFigureParser implements IMessageParser { if(!wrapper) return false; - this._figure = wrapper.readString(); - this._gender = wrapper.readString(); + this._figure = wrapper.readString(); + this._gender = wrapper.readString(); return true; } diff --git a/src/nitro/communication/messages/parser/user/data/UserInfoDataParser.ts b/src/nitro/communication/messages/parser/user/data/UserInfoDataParser.ts index 247b0cf3..51c4796b 100644 --- a/src/nitro/communication/messages/parser/user/data/UserInfoDataParser.ts +++ b/src/nitro/communication/messages/parser/user/data/UserInfoDataParser.ts @@ -27,20 +27,20 @@ export class UserInfoDataParser public flush(): boolean { - this._userId = 0; - this._username = null; - this._figure = null; - this._gender = null; - this._motto = null; - this._realName = null; - this._directMail = false; - this._respectsReceived = 0; - this._respectsRemaining = 0; - this._respectsPetRemaining = 0; - this._streamPublishingAllowed = false; - this._lastAccessDate = null; - this._canChangeName = false; - this._safetyLocked = false; + this._userId = 0; + this._username = null; + this._figure = null; + this._gender = null; + this._motto = null; + this._realName = null; + this._directMail = false; + this._respectsReceived = 0; + this._respectsRemaining = 0; + this._respectsPetRemaining = 0; + this._streamPublishingAllowed = false; + this._lastAccessDate = null; + this._canChangeName = false; + this._safetyLocked = false; return true; } @@ -49,20 +49,20 @@ export class UserInfoDataParser { if(!wrapper) return false; - this._userId = wrapper.readInt(); - this._username = wrapper.readString(); - this._figure = wrapper.readString(); - this._gender = wrapper.readString(); - this._motto = wrapper.readString(); - this._realName = wrapper.readString(); - this._directMail = wrapper.readBoolean(); - this._respectsReceived = wrapper.readInt(); - this._respectsRemaining = wrapper.readInt(); - this._respectsPetRemaining = wrapper.readInt(); - this._streamPublishingAllowed = wrapper.readBoolean(); - this._lastAccessDate = wrapper.readString(); - this._canChangeName = wrapper.readBoolean(); - this._safetyLocked = wrapper.readBoolean(); + this._userId = wrapper.readInt(); + this._username = wrapper.readString(); + this._figure = wrapper.readString(); + this._gender = wrapper.readString(); + this._motto = wrapper.readString(); + this._realName = wrapper.readString(); + this._directMail = wrapper.readBoolean(); + this._respectsReceived = wrapper.readInt(); + this._respectsRemaining = wrapper.readInt(); + this._respectsPetRemaining = wrapper.readInt(); + this._streamPublishingAllowed = wrapper.readBoolean(); + this._lastAccessDate = wrapper.readString(); + this._canChangeName = wrapper.readBoolean(); + this._safetyLocked = wrapper.readBoolean(); return true; } diff --git a/src/nitro/communication/messages/parser/user/data/UserNameChangeMessageParser.ts b/src/nitro/communication/messages/parser/user/data/UserNameChangeMessageParser.ts index 4d004364..82d21c2e 100644 --- a/src/nitro/communication/messages/parser/user/data/UserNameChangeMessageParser.ts +++ b/src/nitro/communication/messages/parser/user/data/UserNameChangeMessageParser.ts @@ -8,9 +8,9 @@ export class UserNameChangeMessageParser implements IMessageParser public flush(): boolean { - this._webId = -1; - this._id = -1; - this._newName = ''; + this._webId = -1; + this._id = -1; + this._newName = ''; return true; } @@ -19,9 +19,9 @@ export class UserNameChangeMessageParser implements IMessageParser { if(!wrapper) return false; - this._webId = wrapper.readInt(); - this._id = wrapper.readInt(); - this._newName = wrapper.readString(); + this._webId = wrapper.readInt(); + this._id = wrapper.readInt(); + this._newName = wrapper.readString(); return true; } diff --git a/src/nitro/communication/messages/parser/user/data/UserProfileParser.ts b/src/nitro/communication/messages/parser/user/data/UserProfileParser.ts index 5a0124ab..ff35171f 100644 --- a/src/nitro/communication/messages/parser/user/data/UserProfileParser.ts +++ b/src/nitro/communication/messages/parser/user/data/UserProfileParser.ts @@ -19,17 +19,17 @@ export class UserProfileParser implements IMessageParser public flush(): boolean { - this._id = 0; - this._username = null; - this._figure = null; - this._motto = null; - this._registration = null; + this._id = 0; + this._username = null; + this._figure = null; + this._motto = null; + this._registration = null; this._achievementPoints = 0; - this._friendsCount = 0; - this._isMyFriend = false; - this._requestSent = false; - this._isOnline = false; - this._groups = []; + this._friendsCount = 0; + this._isMyFriend = false; + this._requestSent = false; + this._isOnline = false; + this._groups = []; this._secondsSinceLastVisit = 0; this._openProfileWindow = false; @@ -40,17 +40,17 @@ export class UserProfileParser implements IMessageParser { if(!wrapper) return false; - this._id = wrapper.readInt(); - this._username = wrapper.readString(); - this._figure = wrapper.readString(); - this._motto = wrapper.readString(); - this._registration = wrapper.readString(); + this._id = wrapper.readInt(); + this._username = wrapper.readString(); + this._figure = wrapper.readString(); + this._motto = wrapper.readString(); + this._registration = wrapper.readString(); this._achievementPoints = wrapper.readInt(); - this._friendsCount = wrapper.readInt(); - this._isMyFriend = wrapper.readBoolean(); - this._requestSent = wrapper.readBoolean(); - this._isOnline = wrapper.readBoolean(); - const groupsCount = wrapper.readInt(); + this._friendsCount = wrapper.readInt(); + this._isMyFriend = wrapper.readBoolean(); + this._requestSent = wrapper.readBoolean(); + this._isOnline = wrapper.readBoolean(); + const groupsCount = wrapper.readInt(); for(let i = 0; i < groupsCount; i++) { diff --git a/src/nitro/communication/messages/parser/user/data/UserSettingsParser.ts b/src/nitro/communication/messages/parser/user/data/UserSettingsParser.ts index b566d6f1..3714ae77 100644 --- a/src/nitro/communication/messages/parser/user/data/UserSettingsParser.ts +++ b/src/nitro/communication/messages/parser/user/data/UserSettingsParser.ts @@ -13,14 +13,14 @@ export class UserSettingsParser implements IMessageParser public flush(): boolean { - this._volumeSystem = 0; - this._volumeFurni = 0; - this._volumeTrax = 0; - this._oldChat = false; - this._roomInvites = false; - this._cameraFollow = false; - this._flags = 0; - this._chatType = 0; + this._volumeSystem = 0; + this._volumeFurni = 0; + this._volumeTrax = 0; + this._oldChat = false; + this._roomInvites = false; + this._cameraFollow = false; + this._flags = 0; + this._chatType = 0; return true; } @@ -29,14 +29,14 @@ export class UserSettingsParser implements IMessageParser { if(!wrapper) return false; - this._volumeSystem = wrapper.readInt(); - this._volumeFurni = wrapper.readInt(); - this._volumeTrax = wrapper.readInt(); - this._oldChat = wrapper.readBoolean(); - this._roomInvites = wrapper.readBoolean(); - this._cameraFollow = wrapper.readBoolean(); - this._flags = wrapper.readInt(); - this._chatType = wrapper.readInt(); + this._volumeSystem = wrapper.readInt(); + this._volumeFurni = wrapper.readInt(); + this._volumeTrax = wrapper.readInt(); + this._oldChat = wrapper.readBoolean(); + this._roomInvites = wrapper.readBoolean(); + this._cameraFollow = wrapper.readBoolean(); + this._flags = wrapper.readInt(); + this._chatType = wrapper.readInt(); return true; } diff --git a/src/nitro/communication/messages/parser/user/inventory/subscription/UserSubscriptionParser.ts b/src/nitro/communication/messages/parser/user/inventory/subscription/UserSubscriptionParser.ts index d1199e65..50bae6e7 100644 --- a/src/nitro/communication/messages/parser/user/inventory/subscription/UserSubscriptionParser.ts +++ b/src/nitro/communication/messages/parser/user/inventory/subscription/UserSubscriptionParser.ts @@ -21,17 +21,17 @@ export class UserSubscriptionParser implements IMessageParser public flush(): boolean { - this._productName = null; - this._daysToPeriodEnd = 0; - this._memberPeriods = 0; - this._periodsSubscribedAhead = 0; - this._responseType = 0; - this._hasEverBeenMember = false; - this._isVip = false; - this._pastClubDays = 0; - this._pastVipDays = 0; - this._minutesUntilExpiration = 0; - this._minutesSinceLastModified = 0; + this._productName = null; + this._daysToPeriodEnd = 0; + this._memberPeriods = 0; + this._periodsSubscribedAhead = 0; + this._responseType = 0; + this._hasEverBeenMember = false; + this._isVip = false; + this._pastClubDays = 0; + this._pastVipDays = 0; + this._minutesUntilExpiration = 0; + this._minutesSinceLastModified = 0; return true; } @@ -40,16 +40,16 @@ export class UserSubscriptionParser implements IMessageParser { if(!wrapper) return false; - this._productName = wrapper.readString(); - this._daysToPeriodEnd = wrapper.readInt(); - this._memberPeriods = wrapper.readInt(); - this._periodsSubscribedAhead = wrapper.readInt(); - this._responseType = wrapper.readInt(); - this._hasEverBeenMember = wrapper.readBoolean(); - this._isVip = wrapper.readBoolean(); - this._pastClubDays = wrapper.readInt(); - this._pastVipDays = wrapper.readInt(); - this._minutesUntilExpiration = wrapper.readInt(); + this._productName = wrapper.readString(); + this._daysToPeriodEnd = wrapper.readInt(); + this._memberPeriods = wrapper.readInt(); + this._periodsSubscribedAhead = wrapper.readInt(); + this._responseType = wrapper.readInt(); + this._hasEverBeenMember = wrapper.readBoolean(); + this._isVip = wrapper.readBoolean(); + this._pastClubDays = wrapper.readInt(); + this._pastVipDays = wrapper.readInt(); + this._minutesUntilExpiration = wrapper.readInt(); if(wrapper.bytesAvailable) this._minutesSinceLastModified = wrapper.readInt(); diff --git a/src/nitro/communication/messages/parser/user/wardrobe/UserWardrobePageParser.ts b/src/nitro/communication/messages/parser/user/wardrobe/UserWardrobePageParser.ts index 67029cb9..05e1526d 100644 --- a/src/nitro/communication/messages/parser/user/wardrobe/UserWardrobePageParser.ts +++ b/src/nitro/communication/messages/parser/user/wardrobe/UserWardrobePageParser.ts @@ -21,9 +21,9 @@ export class UserWardrobePageParser implements IMessageParser while(totalLooks > 0) { - const slotId = wrapper.readInt(); - const look = wrapper.readString(); - const gender = wrapper.readString(); + const slotId = wrapper.readInt(); + const look = wrapper.readString(); + const gender = wrapper.readString(); this._looks.set(slotId, [ look, gender ]); diff --git a/src/nitro/enums/RelationshipStatusEnum.ts b/src/nitro/enums/RelationshipStatusEnum.ts index 8c38bf9c..b64873ce 100644 --- a/src/nitro/enums/RelationshipStatusEnum.ts +++ b/src/nitro/enums/RelationshipStatusEnum.ts @@ -1,10 +1,10 @@ export class RelationshipStatusEnum { - public static NONE: number = 0; + public static NONE: number = 0; public static HEART: number = 1; public static SMILE: number = 2; public static BOBBA: number = 3; - public static RELATIONSHIP_TYPES = [ 0, 1, 2, 3 ]; - public static RELATIONSHIP_NAMES: string[] = ['None', 'Heart', 'Smile', 'Bobba']; + public static RELATIONSHIP_TYPES = [ 0, 1, 2, 3 ]; + public static RELATIONSHIP_NAMES: string[] = ['None', 'Heart', 'Smile', 'Bobba']; } \ No newline at end of file diff --git a/src/nitro/enums/ToolbarIconEnum.ts b/src/nitro/enums/ToolbarIconEnum.ts index e8b86858..d389a954 100644 --- a/src/nitro/enums/ToolbarIconEnum.ts +++ b/src/nitro/enums/ToolbarIconEnum.ts @@ -1,10 +1,10 @@ export class ToolbarIconEnum { - public static HOTEL_VIEW: string = 'hotel_view'; - public static HOME_ROOM: string = 'home_room'; - public static NAVIGATOR: string = 'navigator'; - public static CATALOG: string = 'catalog'; - public static INVENTORY: string = 'inventory'; - public static ME_MENU: string = 'me_menu'; - public static FRIEND_LIST: string = 'friendlist'; + public static HOTEL_VIEW: string = 'hotel_view'; + public static HOME_ROOM: string = 'home_room'; + public static NAVIGATOR: string = 'navigator'; + public static CATALOG: string = 'catalog'; + public static INVENTORY: string = 'inventory'; + public static ME_MENU: string = 'me_menu'; + public static FRIEND_LIST: string = 'friendlist'; } \ No newline at end of file diff --git a/src/nitro/events/NitroToolbarAnimateIconEvent.ts b/src/nitro/events/NitroToolbarAnimateIconEvent.ts index 35bd8f98..5aa3f7fb 100644 --- a/src/nitro/events/NitroToolbarAnimateIconEvent.ts +++ b/src/nitro/events/NitroToolbarAnimateIconEvent.ts @@ -13,8 +13,8 @@ export class NitroToolbarAnimateIconEvent extends NitroToolbarEvent super(NitroToolbarAnimateIconEvent.ANIMATE_ICON); this._image = image; - this._x = x; - this._y = y; + this._x = x; + this._y = y; } public get image(): HTMLImageElement diff --git a/src/nitro/localization/BadgeBaseAndLevel.ts b/src/nitro/localization/BadgeBaseAndLevel.ts index 4abbcae2..f5f7c905 100644 --- a/src/nitro/localization/BadgeBaseAndLevel.ts +++ b/src/nitro/localization/BadgeBaseAndLevel.ts @@ -1,8 +1,8 @@ export class BadgeBaseAndLevel { - private _badgeId: string = ''; - private _level: number = 1; - private _base: string = ''; + private _badgeId: string = ''; + private _level: number = 1; + private _base: string = ''; constructor(badgeId: string) { diff --git a/src/nitro/localization/NitroLocalizationEvent.ts b/src/nitro/localization/NitroLocalizationEvent.ts index 5535fc22..e4f6f3de 100644 --- a/src/nitro/localization/NitroLocalizationEvent.ts +++ b/src/nitro/localization/NitroLocalizationEvent.ts @@ -2,8 +2,8 @@ import { NitroEvent } from '../../core/events/NitroEvent'; export class NitroLocalizationEvent extends NitroEvent { - public static LOADED: string = 'NLE_LOADED'; - public static FAILED: string = 'NLE_FAILED'; + public static LOADED: string = 'NLE_LOADED'; + public static FAILED: string = 'NLE_FAILED'; constructor(type: string) { diff --git a/src/nitro/localization/NitroLocalizationManager.ts b/src/nitro/localization/NitroLocalizationManager.ts index c466d031..ed529abc 100644 --- a/src/nitro/localization/NitroLocalizationManager.ts +++ b/src/nitro/localization/NitroLocalizationManager.ts @@ -16,11 +16,11 @@ export class NitroLocalizationManager extends NitroManager implements INitroLoca { super(); - this._definitions = new Map(); - this._parameters = new Map(); + this._definitions = new Map(); + this._parameters = new Map(); this._badgePointLimits = new Map(); this._romanNumerals = ['I', 'II', 'III', 'IV', 'V', 'VI', 'VII', 'VIII', 'IX', 'X', 'XI', 'XII', 'XIII', 'XIV', 'XV', 'XVI', 'XVII', 'XVIII', 'XIX', 'XX', 'XXI', 'XXII', 'XXIII', 'XXIV', 'XXV', 'XXVI', 'XXVII', 'XXVIII', 'XXIX', 'XXX']; - this._pendingUrls = []; + this._pendingUrls = []; } protected onInit(): void @@ -143,7 +143,7 @@ export class NitroLocalizationManager extends NitroManager implements INitroLoca { const value = this.getValue(key, false); - const replacedValue = value.replace('%' + parameter + '%', replacement); + const replacedValue = value.replace('%' + parameter + '%', replacement); if(value.startsWith('%{')) { @@ -159,7 +159,7 @@ export class NitroLocalizationManager extends NitroManager implements INitroLoca if(!result) return replacedValue; - let indexKey = -1; + let indexKey = -1; const replacementAsNumber = Number.parseInt(replacement); let replace = false; @@ -210,15 +210,15 @@ export class NitroLocalizationManager extends NitroManager implements INitroLoca if(value.startsWith('%{')) { - const regex = new RegExp('%{' + parameter.toUpperCase() + '\\|([^|]*)\\|([^|]*)\\|([^|]*)}'); - const result = value.match(regex); + const regex = new RegExp('%{' + parameter.toUpperCase() + '\\|([^|]*)\\|([^|]*)\\|([^|]*)}'); + const result = value.match(regex); if(!result) continue; const replacementAsNumber = parseInt(replacement); - let indexKey = -1; - let replace = false; + let indexKey = -1; + let replace = false; switch(replacementAsNumber) { @@ -275,7 +275,7 @@ export class NitroLocalizationManager extends NitroManager implements INitroLoca public getBadgeName(key: string): string { const badge = new BadgeBaseAndLevel(key); - const keys = [ 'badge_name_' + key, 'badge_name_' + badge.base ]; + const keys = [ 'badge_name_' + key, 'badge_name_' + badge.base ]; let name = this._Str_2103(this.getExistingKey(keys)); @@ -287,7 +287,7 @@ export class NitroLocalizationManager extends NitroManager implements INitroLoca public getBadgeDesc(key: string): string { const badge = new BadgeBaseAndLevel(key); - const keys = [ 'badge_desc_' + key, 'badge_desc_' + badge.base ]; + const keys = [ 'badge_desc_' + key, 'badge_desc_' + badge.base ]; let desc = this._Str_2103(this.getExistingKey(keys)); @@ -311,7 +311,7 @@ export class NitroLocalizationManager extends NitroManager implements INitroLoca return ''; } - private _Str_2103(k: string): string + private _Str_2103(k: string): string { return k.replace('${', '$') .replace('{', '$') diff --git a/src/nitro/room/ImageResult.ts b/src/nitro/room/ImageResult.ts index a2e0ab3c..daf9d8c0 100644 --- a/src/nitro/room/ImageResult.ts +++ b/src/nitro/room/ImageResult.ts @@ -3,9 +3,9 @@ import { TextureUtils } from '../../room/utils/TextureUtils'; export class ImageResult { - public id: number = 0; - public data: RenderTexture = null; - public image: HTMLImageElement = null; + public id: number = 0; + public data: RenderTexture = null; + public image: HTMLImageElement = null; public getImage(): HTMLImageElement { diff --git a/src/nitro/room/PetColorResult.ts b/src/nitro/room/PetColorResult.ts index 72f53065..f15e473d 100644 --- a/src/nitro/room/PetColorResult.ts +++ b/src/nitro/room/PetColorResult.ts @@ -12,14 +12,14 @@ export class PetColorResult constructor(primaryColor: number, secondaryColor: number, breed: number, tag: number, id: string, isMaster: boolean, layerTags: string[]) { - this._layerTags = []; - this._primaryColor = (primaryColor & 0xFFFFFF); - this._secondaryColor = (secondaryColor & 0xFFFFFF); - this._breed = breed; - this._tag = (((tag > -1) && (tag < PetColorResult.COLOR_TAGS.length)) ? PetColorResult.COLOR_TAGS[tag] : ''); - this._id = id; - this._isMaster = isMaster; - this._layerTags = layerTags; + this._layerTags = []; + this._primaryColor = (primaryColor & 0xFFFFFF); + this._secondaryColor = (secondaryColor & 0xFFFFFF); + this._breed = breed; + this._tag = (((tag > -1) && (tag < PetColorResult.COLOR_TAGS.length)) ? PetColorResult.COLOR_TAGS[tag] : ''); + this._id = id; + this._isMaster = isMaster; + this._layerTags = layerTags; } public get primaryColor(): number diff --git a/src/nitro/room/RoomContentLoader.ts b/src/nitro/room/RoomContentLoader.ts index 2c9826e8..e6daf639 100644 --- a/src/nitro/room/RoomContentLoader.ts +++ b/src/nitro/room/RoomContentLoader.ts @@ -25,15 +25,15 @@ import { PetColorResult } from './PetColorResult'; export class RoomContentLoader implements IFurnitureDataListener { - private static PLACE_HOLDER: string = 'place_holder'; - private static PLACE_HOLDER_WALL: string = 'place_holder_wall'; - private static PLACE_HOLDER_PET: string = 'place_holder_pet'; + private static PLACE_HOLDER: string = 'place_holder'; + private static PLACE_HOLDER_WALL: string = 'place_holder_wall'; + private static PLACE_HOLDER_PET: string = 'place_holder_pet'; private static PLACE_HOLDER_DEFAULT: string = RoomContentLoader.PLACE_HOLDER; - private static ROOM: string = 'room'; - private static TILE_CURSOR: string = 'tile_cursor'; - private static SELECTION_ARROW: string = 'selection_arrow'; + private static ROOM: string = 'room'; + private static TILE_CURSOR: string = 'tile_cursor'; + private static SELECTION_ARROW: string = 'selection_arrow'; - public static LOADER_READY: string = 'RCL_LOADER_READY'; + public static LOADER_READY: string = 'RCL_LOADER_READY'; public static MANDATORY_LIBRARIES: string[] = [ RoomContentLoader.PLACE_HOLDER, RoomContentLoader.PLACE_HOLDER_WALL, RoomContentLoader.PLACE_HOLDER_PET, RoomContentLoader.ROOM, RoomContentLoader.TILE_CURSOR, RoomContentLoader.SELECTION_ARROW ]; private _logger: INitroLogger; @@ -63,30 +63,30 @@ export class RoomContentLoader implements IFurnitureDataListener constructor() { - this._logger = new NitroLogger(this.constructor.name); - this._stateEvents = null; - this._sessionDataManager = null; - this._waitingForSessionDataManager = false; - this._iconListener = null; - this._collections = new Map(); - this._images = new Map(); + this._logger = new NitroLogger(this.constructor.name); + this._stateEvents = null; + this._sessionDataManager = null; + this._waitingForSessionDataManager = false; + this._iconListener = null; + this._collections = new Map(); + this._images = new Map(); - this._events = new Map(); - this._activeObjects = {}; - this._activeObjectTypes = new Map(); - this._activeObjectTypeIds = new Map(); - this._objectTypeAdUrls = new Map(); - this._wallItems = {}; - this._wallItemTypes = new Map(); - this._wallItemTypeIds = new Map(); - this._furniRevisions = new Map(); - this._pets = {}; - this._petColors = new Map(); - this._objectAliases = new Map(); - this._objectOriginalNames = new Map(); + this._events = new Map(); + this._activeObjects = {}; + this._activeObjectTypes = new Map(); + this._activeObjectTypeIds = new Map(); + this._objectTypeAdUrls = new Map(); + this._wallItems = {}; + this._wallItemTypes = new Map(); + this._wallItemTypeIds = new Map(); + this._furniRevisions = new Map(); + this._pets = {}; + this._petColors = new Map(); + this._objectAliases = new Map(); + this._objectOriginalNames = new Map(); - this._pendingContentTypes = []; - this._dataInitialized = false; + this._pendingContentTypes = []; + this._dataInitialized = false; } public initialize(events: IEventDispatcher): void @@ -154,8 +154,8 @@ export class RoomContentLoader implements IFurnitureDataListener if(furniture.hasIndexedColor) className = ((className + '*') + furniture.colorIndex); - const revision = furniture.revision; - const adUrl = furniture.adUrl; + const revision = furniture.revision; + const adUrl = furniture.adUrl; if(adUrl && adUrl.length > 0) this._objectTypeAdUrls.set(className, adUrl); @@ -173,14 +173,14 @@ export class RoomContentLoader implements IFurnitureDataListener { if(name === 'post.it') { - className = 'post_it'; - name = 'post_it'; + className = 'post_it'; + name = 'post_it'; } if(name === 'post.it.vd') { - className = 'post_it_vd'; - name = 'post_id_vd'; + className = 'post_it_vd'; + name = 'post_id_vd'; } this._wallItemTypes.set(id, className); @@ -275,7 +275,7 @@ export class RoomContentLoader implements IFurnitureDataListener public getPetColorResultsForTag(petIndex: number, tagName: string): PetColorResult[] { - const colorResults = this._petColors.get(petIndex); + const colorResults = this._petColors.get(petIndex); const results: PetColorResult[] = []; if(colorResults) @@ -430,13 +430,13 @@ export class RoomContentLoader implements IFurnitureDataListener public downloadImage(id: number, type: string, param: string, events: IEventDispatcher = null): boolean { - let typeName: string = null; + let typeName: string = null; let assetUrls: string[] = []; if(type && (type.indexOf(',') >= 0)) { - typeName = type; - type = typeName.split(',')[0]; + typeName = type; + type = typeName.split(',')[0]; } if(typeName) @@ -556,8 +556,8 @@ export class RoomContentLoader implements IFurnitureDataListener if(resource.extension === 'nitro') { - const nitroBundle = new NitroBundle(resource.data); - const assetData = (nitroBundle.jsonFile as IAssetData); + const nitroBundle = new NitroBundle(resource.data); + const assetData = (nitroBundle.jsonFile as IAssetData); if(!assetData) { @@ -696,7 +696,7 @@ export class RoomContentLoader implements IFurnitureDataListener public getAssetIconUrl(type: string, colorIndex: string): string { - let assetName: string = null; + let assetName: string = null; let assetUrls: string[] = []; if(type &&( type.indexOf(',') >= 0)) diff --git a/src/nitro/room/RoomEngine.ts b/src/nitro/room/RoomEngine.ts index 419e674b..bb3fc678 100644 --- a/src/nitro/room/RoomEngine.ts +++ b/src/nitro/room/RoomEngine.ts @@ -119,20 +119,20 @@ import { TileObjectMap } from './utils/TileObjectMap'; export class RoomEngine extends NitroManager implements IRoomEngine, IRoomCreator, IRoomEngineServices, IRoomManagerListener, IRoomContentListener, IUpdateReceiver, IDisposable { - public static ROOM_OBJECT_ID: number = -1; - public static ROOM_OBJECT_TYPE: string = 'room'; + public static ROOM_OBJECT_ID: number = -1; + public static ROOM_OBJECT_TYPE: string = 'room'; - public static CURSOR_OBJECT_ID: number = -2; - public static CURSOR_OBJECT_TYPE: string = 'tile_cursor'; + public static CURSOR_OBJECT_ID: number = -2; + public static CURSOR_OBJECT_TYPE: string = 'tile_cursor'; - public static ARROW_OBJECT_ID: number = -3; - public static ARROW_OBJECT_TYPE: string = 'selection_arrow'; + public static ARROW_OBJECT_ID: number = -3; + public static ARROW_OBJECT_TYPE: string = 'selection_arrow'; - public static OVERLAY: string = 'overlay'; - public static OBJECT_ICON_SPRITE: string = 'object_icon_sprite'; + public static OVERLAY: string = 'overlay'; + public static OBJECT_ICON_SPRITE: string = 'object_icon_sprite'; - private static DRAG_THRESHOLD: number = 15; - private static TEMPORARY_ROOM: string = 'temporary_room'; + private static DRAG_THRESHOLD: number = 15; + private static TEMPORARY_ROOM: string = 'temporary_room'; private _communication: INitroCommunicationManager; private _roomRendererFactory: IRoomRendererFactory; @@ -172,54 +172,54 @@ export class RoomEngine extends NitroManager implements IRoomEngine, IRoomCreato { super(); - this._communication = communication; - this._sessionDataManager = null; - this._roomSessionManager = null; - this._roomManager = null; - this._roomObjectEventHandler = new RoomObjectEventHandler(this); - this._roomMessageHandler = new RoomMessageHandler(this); - this._roomContentLoader = new RoomContentLoader(); - this._ready = false; - this._roomContentLoaderReady = false; + this._communication = communication; + this._sessionDataManager = null; + this._roomSessionManager = null; + this._roomManager = null; + this._roomObjectEventHandler = new RoomObjectEventHandler(this); + this._roomMessageHandler = new RoomMessageHandler(this); + this._roomContentLoader = new RoomContentLoader(); + this._ready = false; + this._roomContentLoaderReady = false; - this._activeRoomId = -1; - this._activeRoomActiveCanvas = -1; - this._roomInstanceDatas = new Map(); - this._roomDatas = new Map(); + this._activeRoomId = -1; + this._activeRoomActiveCanvas = -1; + this._roomInstanceDatas = new Map(); + this._roomDatas = new Map(); - this._roomRendererFactory = new RoomRendererFactory(); - this._visualizationFactory = new RoomObjectVisualizationFactory(); - this._logicFactory = new RoomObjectLogicFactory(); + this._roomRendererFactory = new RoomRendererFactory(); + this._visualizationFactory = new RoomObjectVisualizationFactory(); + this._logicFactory = new RoomObjectLogicFactory(); - this._activeRoomActiveCanvasMouseX = 0; - this._activeRoomActiveCanvasMouseY = 0; - this._activeRoomIsDragged = false; - this._activeRoomWasDragged = false; - this._activeRoomDragStartX = 0; - this._activeRoomDragStartY = 0; - this._activeRoomDragX = 0; - this._activeRoomDragY = 0; + this._activeRoomActiveCanvasMouseX = 0; + this._activeRoomActiveCanvasMouseY = 0; + this._activeRoomIsDragged = false; + this._activeRoomWasDragged = false; + this._activeRoomDragStartX = 0; + this._activeRoomDragStartY = 0; + this._activeRoomDragX = 0; + this._activeRoomDragY = 0; this._skipFurnitureCreationForNextFrame = false; - this._mouseCursorUpdate = false; - this._imageObjectIdBank = null; - this._imageCallbacks = new Map(); - this._thumbnailCallbacks = new Map(); - this._roomDraggingAlwaysCenters = false; - this._roomAllowsDragging = true; - this._badgeListenerObjects = new Map(); + this._mouseCursorUpdate = false; + this._imageObjectIdBank = null; + this._imageCallbacks = new Map(); + this._thumbnailCallbacks = new Map(); + this._roomDraggingAlwaysCenters = false; + this._roomAllowsDragging = true; + this._badgeListenerObjects = new Map(); - this.runVisibilityUpdate = this.runVisibilityUpdate.bind(this); - this.processRoomObjectEvent = this.processRoomObjectEvent.bind(this); - this.onRoomSessionEvent = this.onRoomSessionEvent.bind(this); - this.onRoomContentLoaderReadyEvent = this.onRoomContentLoaderReadyEvent.bind(this); - this.onBadgeImageReadyEvent = this.onBadgeImageReadyEvent.bind(this); + this.runVisibilityUpdate = this.runVisibilityUpdate.bind(this); + this.processRoomObjectEvent = this.processRoomObjectEvent.bind(this); + this.onRoomSessionEvent = this.onRoomSessionEvent.bind(this); + this.onRoomContentLoaderReadyEvent = this.onRoomContentLoaderReadyEvent.bind(this); + this.onBadgeImageReadyEvent = this.onBadgeImageReadyEvent.bind(this); } public onInit(): void { if(this._ready) return; - this._imageObjectIdBank = new NumberBank(1000); + this._imageObjectIdBank = new NumberBank(1000); this._thumbnailObjectIdBank = new NumberBank(1000); this._logicFactory.registerEventFunction(this.processRoomObjectEvent); @@ -257,7 +257,7 @@ export class RoomEngine extends NitroManager implements IRoomEngine, IRoomCreato { if(!this._ready) return; - for(const [ key, value ] of this._roomInstanceDatas) + for(const [ key, value ] of this._roomInstanceDatas) { this.removeRoomInstance(key); } @@ -347,9 +347,9 @@ export class RoomEngine extends NitroManager implements IRoomEngine, IRoomCreato public createRoomInstance(roomId: number, roomMap: RoomMapData): void { - let floorType = '111'; - let wallType = '201'; - let landscapeType = '1'; + let floorType = '111'; + let wallType = '201'; + let landscapeType = '1'; if(!this._ready) { @@ -359,16 +359,16 @@ export class RoomEngine extends NitroManager implements IRoomEngine, IRoomCreato { this._roomDatas.delete(roomId); - floorType = data.floorType; - wallType = data.wallType; - landscapeType = data.landscapeType; + floorType = data.floorType; + wallType = data.wallType; + landscapeType = data.landscapeType; } data = new RoomData(roomId, roomMap); - data.floorType = floorType; - data.wallType = wallType; - data.landscapeType = landscapeType; + data.floorType = floorType; + data.wallType = wallType; + data.landscapeType = landscapeType; this._roomDatas.set(roomId, data); @@ -421,7 +421,7 @@ export class RoomEngine extends NitroManager implements IRoomEngine, IRoomCreato if(!instance) return null; - const category = RoomObjectCategory.ROOM; + const category = RoomObjectCategory.ROOM; const roomObject = instance.createRoomObjectAndInitalize(RoomEngine.ROOM_OBJECT_ID, RoomEngine.ROOM_OBJECT_TYPE, category) as IRoomObjectController; @@ -438,10 +438,10 @@ export class RoomEngine extends NitroManager implements IRoomEngine, IRoomCreato if(dimensions) { - const minX = roomMap.dimensions.minX; - const maxX = roomMap.dimensions.maxX; - const minY = roomMap.dimensions.minY; - const maxY = roomMap.dimensions.maxY; + const minX = roomMap.dimensions.minX; + const maxX = roomMap.dimensions.maxX; + const minY = roomMap.dimensions.minY; + const maxY = roomMap.dimensions.maxY; instance.model.setValue(RoomVariableEnum.ROOM_MIN_X, minX); instance.model.setValue(RoomVariableEnum.ROOM_MAX_X, maxX); @@ -489,13 +489,13 @@ export class RoomEngine extends NitroManager implements IRoomEngine, IRoomCreato if(door) { - const doorX = door.x; - const doorY = door.y; - const doorZ = door.z; - const doorDir = door.dir; - const maskType = ObjectRoomMaskUpdateMessage.DOOR; - const maskId = 'door_' + doorIndex; - const maskLocation = new Vector3d(doorX, doorY, doorZ); + const doorX = door.x; + const doorY = door.y; + const doorZ = door.z; + const doorDir = door.dir; + const maskType = ObjectRoomMaskUpdateMessage.DOOR; + const maskId = 'door_' + doorIndex; + const maskLocation = new Vector3d(doorX, doorY, doorZ); logic.processUpdateMessage(new ObjectRoomMaskUpdateMessage(ObjectRoomMaskUpdateMessage.ADD_MASK, maskId, maskType, maskLocation, ObjectRoomMaskUpdateMessage.HOLE)); @@ -574,11 +574,11 @@ export class RoomEngine extends NitroManager implements IRoomEngine, IRoomCreato { canvas.geometry.z_scale = instance.model.getValue(RoomVariableEnum.ROOM_Z_SCALE); - const doorX = instance.model.getValue(RoomObjectVariable.ROOM_DOOR_X); - const doorY = instance.model.getValue(RoomObjectVariable.ROOM_DOOR_Y); - const doorZ = instance.model.getValue(RoomObjectVariable.ROOM_DOOR_Z); + const doorX = instance.model.getValue(RoomObjectVariable.ROOM_DOOR_X); + const doorY = instance.model.getValue(RoomObjectVariable.ROOM_DOOR_Y); + const doorZ = instance.model.getValue(RoomObjectVariable.ROOM_DOOR_Z); const doorDirection = instance.model.getValue(RoomObjectVariable.ROOM_DOOR_DIR); - const vector = new Vector3d(doorX, doorY, doorZ); + const vector = new Vector3d(doorX, doorY, doorZ); let direction: IVector3D = null; @@ -594,7 +594,7 @@ export class RoomEngine extends NitroManager implements IRoomEngine, IRoomCreato { const overlay = new NitroSprite(Texture.EMPTY); - overlay.name = RoomEngine.OVERLAY; + overlay.name = RoomEngine.OVERLAY; overlay.interactive = false; displayObject.addChild(overlay); @@ -673,8 +673,8 @@ export class RoomEngine extends NitroManager implements IRoomEngine, IRoomCreato this.events.dispatchEvent(new RoomDragEvent(roomId, -(renderingCanvas.screenOffsetX - x), -(renderingCanvas.screenOffsetY - y))); - renderingCanvas.screenOffsetX = x; - renderingCanvas.screenOffsetY = y; + renderingCanvas.screenOffsetX = x; + renderingCanvas.screenOffsetY = y; return true; } @@ -755,8 +755,8 @@ export class RoomEngine extends NitroManager implements IRoomEngine, IRoomCreato public updateRoomInstancePlaneType(roomId: number, floorType: string = null, wallType: string = null, landscapeType: string = null, _arg_5: boolean = false): boolean { - const roomObject = this.getRoomOwnObject(roomId); - const roomInstance = this.getRoomInstance(roomId); + const roomObject = this.getRoomOwnObject(roomId); + const roomInstance = this.getRoomInstance(roomId); if(!roomObject) { @@ -822,13 +822,13 @@ export class RoomEngine extends NitroManager implements IRoomEngine, IRoomCreato if(objectId < 0) return; const roomOwnObject = this.getRoomOwnObject(roomId); - const roomObject = this.getRoomObjectFloor(roomId, objectId); + const roomObject = this.getRoomObjectFloor(roomId, objectId); if(roomOwnObject && roomOwnObject.logic && roomObject && roomObject.model) { - const location = roomObject.getLocation(); - const sizeX = roomObject.model.getValue(RoomObjectVariable.FURNITURE_SIZE_X); - const sizeY = roomObject.model.getValue(RoomObjectVariable.FURNITURE_SIZE_Y); + const location = roomObject.getLocation(); + const sizeX = roomObject.model.getValue(RoomObjectVariable.FURNITURE_SIZE_X); + const sizeY = roomObject.model.getValue(RoomObjectVariable.FURNITURE_SIZE_Y); roomOwnObject.processUpdateMessage(new ObjectRoomFloorHoleUpdateMessage(ObjectRoomFloorHoleUpdateMessage.ADD, objectId, location.x, location.y, sizeX, sizeY)); } @@ -947,17 +947,17 @@ export class RoomEngine extends NitroManager implements IRoomEngine, IRoomCreato return; } - const startTime = new Date().valueOf(); - const furniturePerTick = 5; - const hasTickLimit = true; + const startTime = new Date().valueOf(); + const furniturePerTick = 5; + const hasTickLimit = true; for(const instanceData of this._roomInstanceDatas.values()) { if(!instanceData) continue; - let pendingData: RoomFurnitureData = null; + let pendingData: RoomFurnitureData = null; let totalFurnitureAdded = 0; - let furnitureAdded = false; + let furnitureAdded = false; while((pendingData = instanceData.getNextPendingFurnitureFloor())) { @@ -1037,12 +1037,12 @@ export class RoomEngine extends NitroManager implements IRoomEngine, IRoomCreato if(!data) return false; } - let type = data.type; + let type = data.type; let didLoad = false; if(!type) { - type = this.getFurnitureFloorName(data.typeId); + type = this.getFurnitureFloorName(data.typeId); didLoad = true; } @@ -1155,8 +1155,8 @@ export class RoomEngine extends NitroManager implements IRoomEngine, IRoomCreato if(camera) { - camera.targetId = objectId; - camera.targetCategory = RoomObjectCategory.UNIT; + camera.targetId = objectId; + camera.targetCategory = RoomObjectCategory.UNIT; camera.activateFollowing(this.cameraFollowDuration); } @@ -1205,14 +1205,14 @@ export class RoomEngine extends NitroManager implements IRoomEngine, IRoomCreato private updateRoomCamera(roomId: number, canvasId: number, objectLocation: IVector3D, time: number): void { - const renderingCanvas = this.getRoomInstanceRenderingCanvas(roomId, canvasId); - const instanceData = this.getRoomInstanceData(roomId); + const renderingCanvas = this.getRoomInstanceRenderingCanvas(roomId, canvasId); + const instanceData = this.getRoomInstanceData(roomId); if(!renderingCanvas || !instanceData || (renderingCanvas.scale !== 1)) return; - const roomGeometry = (renderingCanvas.geometry as RoomGeometry); - const roomCamera = instanceData.roomCamera; - const roomInstance = this.getRoomInstance(roomId); + const roomGeometry = (renderingCanvas.geometry as RoomGeometry); + const roomCamera = instanceData.roomCamera; + const roomInstance = this.getRoomInstance(roomId); if(!roomGeometry || !roomCamera || !roomInstance) return; @@ -1220,10 +1220,10 @@ export class RoomEngine extends NitroManager implements IRoomEngine, IRoomCreato if(!canvasRectangle) return; - let _local_10 = (Math.floor(objectLocation.z) + 1); - const width = Math.round(canvasRectangle.width); - const height = Math.round(canvasRectangle.height); - const bounds = this.getCanvasBoundingRectangle(canvasId); + let _local_10 = (Math.floor(objectLocation.z) + 1); + const width = Math.round(canvasRectangle.width); + const height = Math.round(canvasRectangle.height); + const bounds = this.getCanvasBoundingRectangle(canvasId); if(bounds && ((bounds.right < 0) || (bounds.bottom < 0) || (bounds.left >= width) || (bounds.top >= height))) { @@ -1375,8 +1375,8 @@ export class RoomEngine extends NitroManager implements IRoomEngine, IRoomCreato _local_41 = 0; } - canvasRectangle.width = (canvasRectangle.width * (1 - (_local_42 * 2))); - canvasRectangle.height = (canvasRectangle.height * (1 - (_local_40 + _local_41))); + canvasRectangle.width = (canvasRectangle.width * (1 - (_local_42 * 2))); + canvasRectangle.height = (canvasRectangle.height * (1 - (_local_40 + _local_41))); if(canvasRectangle.width < _local_43) { @@ -1512,20 +1512,20 @@ export class RoomEngine extends NitroManager implements IRoomEngine, IRoomCreato if(!visualization) return null; - const rectangle = visualization.getBoundingRectangle(); - const canvas = this.getRoomInstanceRenderingCanvas(roomId, canvasId); - const scale = ((canvas) ? canvas.scale : 1); - const screenPoint = geometry.getScreenPoint(roomObject.getLocation()); + const rectangle = visualization.getBoundingRectangle(); + const canvas = this.getRoomInstanceRenderingCanvas(roomId, canvasId); + const scale = ((canvas) ? canvas.scale : 1); + const screenPoint = geometry.getScreenPoint(roomObject.getLocation()); if(!screenPoint) return null; - rectangle.x = (rectangle.x * scale); - rectangle.y = (rectangle.y * scale); - rectangle.width = (rectangle.width * scale); - rectangle.height = (rectangle.height * scale); + rectangle.x = (rectangle.x * scale); + rectangle.y = (rectangle.y * scale); + rectangle.width = (rectangle.width * scale); + rectangle.height = (rectangle.height * scale); - screenPoint.x = (screenPoint.x * scale); - screenPoint.y = (screenPoint.y * scale); + screenPoint.x = (screenPoint.x * scale); + screenPoint.y = (screenPoint.y * scale); rectangle.x += screenPoint.x; rectangle.y += screenPoint.y; @@ -1832,11 +1832,11 @@ export class RoomEngine extends NitroManager implements IRoomEngine, IRoomCreato if(!disabledPickingAnimation) { - const typeId = roomObject.model.getValue(RoomObjectVariable.FURNITURE_TYPE_ID); - const extras = roomObject.model.getValue(RoomObjectVariable.FURNITURE_EXTRAS); - const dataKey = roomObject.model.getValue(RoomObjectVariable.FURNITURE_DATA_FORMAT); - const objectData = ObjectDataFactory.getData(dataKey); - const icon = this.getFurnitureFloorIcon(typeId, null, extras, objectData).data; + const typeId = roomObject.model.getValue(RoomObjectVariable.FURNITURE_TYPE_ID); + const extras = roomObject.model.getValue(RoomObjectVariable.FURNITURE_EXTRAS); + const dataKey = roomObject.model.getValue(RoomObjectVariable.FURNITURE_DATA_FORMAT); + const objectData = ObjectDataFactory.getData(dataKey); + const icon = this.getFurnitureFloorIcon(typeId, null, extras, objectData).data; if(icon) { @@ -1879,9 +1879,9 @@ export class RoomEngine extends NitroManager implements IRoomEngine, IRoomCreato if(screenLocation) { - const typeId = roomObject.model.getValue(RoomObjectVariable.FURNITURE_TYPE_ID); - const objectData = roomObject.model.getValue(RoomObjectVariable.FURNITURE_DATA); - const icon = this.getFurnitureWallIcon(typeId, null, objectData).data; + const typeId = roomObject.model.getValue(RoomObjectVariable.FURNITURE_TYPE_ID); + const objectData = roomObject.model.getValue(RoomObjectVariable.FURNITURE_DATA); + const icon = this.getFurnitureWallIcon(typeId, null, objectData).data; if(icon) { @@ -1982,8 +1982,8 @@ export class RoomEngine extends NitroManager implements IRoomEngine, IRoomCreato if(!object || !object.logic) return false; - const updateMessage = new RoomObjectUpdateMessage(location, direction); - const data = new LegacyDataType(); + const updateMessage = new RoomObjectUpdateMessage(location, direction); + const data = new LegacyDataType(); const dataUpdateMessage = new ObjectDataUpdateMessage(state, data); data.setString(extra); @@ -2044,8 +2044,8 @@ export class RoomEngine extends NitroManager implements IRoomEngine, IRoomCreato public updateRoomObjectMask(roomId: number, objectId: number, _arg_3: boolean = true): void { - const maskName = RoomObjectCategory.WALL + '_' + objectId; - const roomObject = this.getRoomObjectWall(roomId, objectId); + const maskName = RoomObjectCategory.WALL + '_' + objectId; + const roomObject = this.getRoomObjectWall(roomId, objectId); let maskUpdate: ObjectRoomMaskUpdateMessage = null; @@ -2053,8 +2053,8 @@ export class RoomEngine extends NitroManager implements IRoomEngine, IRoomCreato { if(roomObject.model.getValue(RoomObjectVariable.FURNITURE_USES_PLANE_MASK) > 0) { - const maskType = roomObject.model.getValue(RoomObjectVariable.FURNITURE_PLANE_MASK_TYPE); - const location = roomObject.getLocation(); + const maskType = roomObject.model.getValue(RoomObjectVariable.FURNITURE_PLANE_MASK_TYPE); + const location = roomObject.getLocation(); if(_arg_3) maskUpdate = new ObjectRoomMaskUpdateMessage(ObjectRoomMaskUpdateMessage.ADD_MASK, maskName, maskType, location); else maskUpdate = new ObjectRoomMaskUpdateMessage(ObjectRoomMaskUpdateMessage.REMOVE_MASK, maskName); @@ -2145,8 +2145,8 @@ export class RoomEngine extends NitroManager implements IRoomEngine, IRoomCreato { if(!location) return null; - const heightMap = this.getFurnitureStackingHeightMap(roomId); - const wallGeometry = this.getLegacyWallGeometry(roomId); + const heightMap = this.getFurnitureStackingHeightMap(roomId); + const wallGeometry = this.getLegacyWallGeometry(roomId); if(!heightMap || !wallGeometry) return location; @@ -2371,7 +2371,7 @@ export class RoomEngine extends NitroManager implements IRoomEngine, IRoomCreato roomObject.model.setValue(RoomObjectVariable.FURNITURE_AUTOMATIC_STATE_INDEX, stateIndex); const objectDataKey = roomObject.model.getValue(RoomObjectVariable.FURNITURE_DATA_FORMAT); - const objectData = ObjectDataFactory.getData(objectDataKey); + const objectData = ObjectDataFactory.getData(objectDataKey); objectData.initializeFromRoomObjectModel(roomObject.model); @@ -2457,8 +2457,8 @@ export class RoomEngine extends NitroManager implements IRoomEngine, IRoomCreato { if(!this._roomContentLoader || !this._sessionDataManager) return; - const badgeName = (groupBadge) ? this._sessionDataManager.loadGroupBadgeImage(badgeId) : this._sessionDataManager.loadBadgeImage(badgeId); - const badgeImage = (groupBadge) ? this._sessionDataManager.getGroupBadgeImage(badgeId) : this._sessionDataManager.getBadgeImage(badgeId); + const badgeName = (groupBadge) ? this._sessionDataManager.loadGroupBadgeImage(badgeId) : this._sessionDataManager.loadBadgeImage(badgeId); + const badgeImage = (groupBadge) ? this._sessionDataManager.getGroupBadgeImage(badgeId) : this._sessionDataManager.getBadgeImage(badgeId); if(badgeImage) this._roomContentLoader.addAssetToCollection(object.type, badgeName, badgeImage, false); } @@ -2469,8 +2469,8 @@ export class RoomEngine extends NitroManager implements IRoomEngine, IRoomCreato if(!canvas) return; - const overlay = this.getRenderingCanvasOverlay(canvas); - const sprite = this.getOverlayIconSprite(overlay, RoomEngine.OBJECT_ICON_SPRITE); + const overlay = this.getRenderingCanvasOverlay(canvas); + const sprite = this.getOverlayIconSprite(overlay, RoomEngine.OBJECT_ICON_SPRITE); if(sprite) { @@ -2510,9 +2510,9 @@ export class RoomEngine extends NitroManager implements IRoomEngine, IRoomCreato } } - this._activeRoomActiveCanvas = canvasId; - this._activeRoomActiveCanvasMouseX = x; - this._activeRoomActiveCanvasMouseY = y; + this._activeRoomActiveCanvas = canvasId; + this._activeRoomActiveCanvasMouseX = x; + this._activeRoomActiveCanvasMouseY = y; } private handleRoomDragging(canvas: IRoomRenderingCanvas, x: number, y: number, type: string, altKey: boolean, ctrlKey: boolean, shiftKey: boolean): boolean @@ -2526,10 +2526,10 @@ export class RoomEngine extends NitroManager implements IRoomEngine, IRoomCreato { if(this._roomAllowsDragging) { - this._activeRoomIsDragged = true; - this._activeRoomWasDragged = false; - this._activeRoomDragStartX = this._activeRoomActiveCanvasMouseX; - this._activeRoomDragStartY = this._activeRoomActiveCanvasMouseY; + this._activeRoomIsDragged = true; + this._activeRoomWasDragged = false; + this._activeRoomDragStartX = this._activeRoomActiveCanvasMouseX; + this._activeRoomDragStartY = this._activeRoomActiveCanvasMouseY; } } } @@ -2712,7 +2712,7 @@ export class RoomEngine extends NitroManager implements IRoomEngine, IRoomCreato const geometry = this.getRoomInstanceGeometry(roomId, canvasId); - if(!geometry) return null; + if(!geometry) return null; const roomObject = this.getRoomObject(roomId, objectId, objectType); @@ -2803,10 +2803,10 @@ export class RoomEngine extends NitroManager implements IRoomEngine, IRoomCreato public setObjectMoverIconSprite(objectId: number, category: number, _arg_3: boolean, instanceData: string = null, stuffData: IObjectData = null, state: number = -1, frameNumber: number = -1, posture: string = null): void { - let type: string = null; - let colorIndex = 0; - let imageResult: ImageResult = null; - const scale = 1; + let type: string = null; + let colorIndex = 0; + let imageResult: ImageResult = null; + const scale = 1; if(_arg_3) { @@ -2818,14 +2818,14 @@ export class RoomEngine extends NitroManager implements IRoomEngine, IRoomCreato { if(category === RoomObjectCategory.FLOOR) { - type = this._roomContentLoader.getFurnitureFloorNameForTypeId(objectId); - colorIndex = this._roomContentLoader.getFurnitureFloorColorIndex(objectId); + type = this._roomContentLoader.getFurnitureFloorNameForTypeId(objectId); + colorIndex = this._roomContentLoader.getFurnitureFloorColorIndex(objectId); } else if(category === RoomObjectCategory.WALL) { - type = this._roomContentLoader.getFurnitureWallNameForTypeId(objectId, instanceData); - colorIndex = this._roomContentLoader.getFurnitureWallColorIndex(objectId); + type = this._roomContentLoader.getFurnitureWallNameForTypeId(objectId, instanceData); + colorIndex = this._roomContentLoader.getFurnitureWallColorIndex(objectId); } if(category === RoomObjectCategory.UNIT) @@ -2875,14 +2875,14 @@ export class RoomEngine extends NitroManager implements IRoomEngine, IRoomCreato { if(!this._roomManager) return null; - let id = -1; - let type: string = null; - let data: IObjectData = null; - let color = ''; - let extras: string = null; + let id = -1; + let type: string = null; + let data: IObjectData = null; + let color = ''; + let extras: string = null; - const roomIdString = this.getRoomId(roomId); - const roomInstance = this._roomManager.getRoomInstance(roomIdString); + const roomIdString = this.getRoomId(roomId); + const roomInstance = this._roomManager.getRoomInstance(roomIdString); if(roomInstance) { @@ -2890,15 +2890,15 @@ export class RoomEngine extends NitroManager implements IRoomEngine, IRoomCreato if(roomObject && roomObject.model) { - id = roomObject.id; - type = roomObject.type; + id = roomObject.id; + type = roomObject.type; switch(category) { case RoomObjectCategory.FLOOR: case RoomObjectCategory.WALL: { - color = (roomObject.model.getValue(RoomObjectVariable.FURNITURE_COLOR).toString()); - extras = roomObject.model.getValue(RoomObjectVariable.FURNITURE_EXTRAS); + color = (roomObject.model.getValue(RoomObjectVariable.FURNITURE_COLOR).toString()); + extras = roomObject.model.getValue(RoomObjectVariable.FURNITURE_EXTRAS); const dataFormat = roomObject.model.getValue(RoomObjectVariable.FURNITURE_DATA_FORMAT); @@ -2923,13 +2923,13 @@ export class RoomEngine extends NitroManager implements IRoomEngine, IRoomCreato public getFurnitureFloorIconUrl(typeId: number): string { - let type: string = null; - let color = ''; + let type: string = null; + let color = ''; if(this._roomContentLoader) { - type = this._roomContentLoader.getFurnitureFloorNameForTypeId(typeId); - color = (this._roomContentLoader.getFurnitureFloorColorIndex(typeId).toString()); + type = this._roomContentLoader.getFurnitureFloorNameForTypeId(typeId); + color = (this._roomContentLoader.getFurnitureFloorColorIndex(typeId).toString()); return this._roomContentLoader.getAssetIconUrl(type, color); } @@ -2944,13 +2944,13 @@ export class RoomEngine extends NitroManager implements IRoomEngine, IRoomCreato public getFurnitureWallIconUrl(typeId: number, extra: string = null): string { - let type: string = null; - let color = ''; + let type: string = null; + let color = ''; if(this._roomContentLoader) { - type = this._roomContentLoader.getFurnitureWallNameForTypeId(typeId, extra); - color = (this._roomContentLoader.getFurnitureWallColorIndex(typeId).toString()); + type = this._roomContentLoader.getFurnitureWallNameForTypeId(typeId, extra); + color = (this._roomContentLoader.getFurnitureWallColorIndex(typeId).toString()); return this._roomContentLoader.getAssetIconUrl(type, color); } @@ -2965,13 +2965,13 @@ export class RoomEngine extends NitroManager implements IRoomEngine, IRoomCreato public getFurnitureFloorImage(typeId: number, direction: IVector3D, scale: number, listener: IGetImageListener, bgColor: number = 0, extras: string = null, state: number = -1, frameCount: number = -1, objectData: IObjectData = null): ImageResult { - let type: string = null; - let color = ''; + let type: string = null; + let color = ''; if(this._roomContentLoader) { - type = this._roomContentLoader.getFurnitureFloorNameForTypeId(typeId); - color = (this._roomContentLoader.getFurnitureFloorColorIndex(typeId).toString()); + type = this._roomContentLoader.getFurnitureFloorNameForTypeId(typeId); + color = (this._roomContentLoader.getFurnitureFloorColorIndex(typeId).toString()); } if((scale === 1) && listener) @@ -2984,13 +2984,13 @@ export class RoomEngine extends NitroManager implements IRoomEngine, IRoomCreato public getFurnitureWallImage(typeId: number, direction: IVector3D, scale: number, listener: IGetImageListener, bgColor: number = 0, extras: string = null, state: number =-1, frameCount: number = -1): ImageResult { - let type: string = null; - let color = ''; + let type: string = null; + let color = ''; if(this._roomContentLoader) { - type = this._roomContentLoader.getFurnitureWallNameForTypeId(typeId); - color = this._roomContentLoader.getFurnitureWallColorIndex(typeId).toString(); + type = this._roomContentLoader.getFurnitureWallNameForTypeId(typeId); + color = this._roomContentLoader.getFurnitureWallColorIndex(typeId).toString(); } if((scale === 1) && listener) @@ -3042,8 +3042,8 @@ export class RoomEngine extends NitroManager implements IRoomEngine, IRoomCreato if(!roomInstance) return imageResult; } - let objectId = this._imageObjectIdBank.reserveNumber(); - const objectCategory = this.getRoomObjectCategoryForType(type); + let objectId = this._imageObjectIdBank.reserveNumber(); + const objectCategory = this.getRoomObjectCategoryForType(type); if(objectId < 0) return imageResult; @@ -3131,8 +3131,8 @@ export class RoomEngine extends NitroManager implements IRoomEngine, IRoomCreato const texture = visualization.getImage(bgColor, originalId); - imageResult.data = texture; - imageResult.id = objectId; + imageResult.data = texture; + imageResult.id = objectId; if(!this.isRoomContentTypeLoaded(type) && listener) { @@ -3182,16 +3182,16 @@ export class RoomEngine extends NitroManager implements IRoomEngine, IRoomCreato if(!roomInstance) return imageResult; } - let objectId = this._thumbnailObjectIdBank.reserveNumber(); - const objectCategory = this.getRoomObjectCategoryForType(type); + let objectId = this._thumbnailObjectIdBank.reserveNumber(); + const objectCategory = this.getRoomObjectCategoryForType(type); if(objectId < 0) return imageResult; objectId++; - imageResult.id = objectId; - imageResult.data = null; - imageResult.image = null; + imageResult.id = objectId; + imageResult.data = null; + imageResult.image = null; const assetName = [ type, param ].join('_'); @@ -3233,11 +3233,11 @@ export class RoomEngine extends NitroManager implements IRoomEngine, IRoomCreato if(!roomInstance || !this._roomContentLoader) return; - const objectCategory = this._roomContentLoader.getCategoryForType(type); - const objectManager = roomInstance.getManager(objectCategory); + const objectCategory = this._roomContentLoader.getCategoryForType(type); + const objectManager = roomInstance.getManager(objectCategory); - let geometry: RoomGeometry = null; - let scale = 0; + let geometry: RoomGeometry = null; + let scale = 0; if(objectManager && objectManager.objects.length) { @@ -3245,7 +3245,7 @@ export class RoomEngine extends NitroManager implements IRoomEngine, IRoomCreato { if(roomObject && roomObject.model && (roomObject.type === type)) { - const objectId = roomObject.id; + const objectId = roomObject.id; const visualization = roomObject.visualization; let texture: RenderTexture = null; @@ -3304,8 +3304,8 @@ export class RoomEngine extends NitroManager implements IRoomEngine, IRoomCreato if(!canvas) return; - const overlay = this.getRenderingCanvasOverlay(canvas); - const sprite = this.getOverlayIconSprite(overlay, RoomEngine.OBJECT_ICON_SPRITE); + const overlay = this.getRenderingCanvasOverlay(canvas); + const sprite = this.getOverlayIconSprite(overlay, RoomEngine.OBJECT_ICON_SPRITE); if(sprite) { diff --git a/src/nitro/room/RoomMessageHandler.ts b/src/nitro/room/RoomMessageHandler.ts index c20ad52f..25f5a38a 100644 --- a/src/nitro/room/RoomMessageHandler.ts +++ b/src/nitro/room/RoomMessageHandler.ts @@ -80,25 +80,25 @@ export class RoomMessageHandler extends Disposable { super(); - this._connection = null; - this._roomCreator = roomCreator; - this._planeParser = new RoomPlaneParser(); - this._latestEntryTileEvent = null; + this._connection = null; + this._roomCreator = roomCreator; + this._planeParser = new RoomPlaneParser(); + this._latestEntryTileEvent = null; - this._currentRoomId = 0; - this._ownUserId = 0; + this._currentRoomId = 0; + this._ownUserId = 0; this._initialConnection = true; - this._guideId = -1; - this._requesterId = -1; + this._guideId = -1; + this._requesterId = -1; } protected onDispose(): void { super.onDispose(); - this._connection = null; - this._roomCreator = null; - this._latestEntryTileEvent = null; + this._connection = null; + this._roomCreator = null; + this._latestEntryTileEvent = null; if(this._planeParser) { @@ -167,14 +167,14 @@ export class RoomMessageHandler extends Disposable if(this._roomCreator) this._roomCreator.destroyRoom(this._currentRoomId); } - this._currentRoomId = id; - this._latestEntryTileEvent = null; + this._currentRoomId = id; + this._latestEntryTileEvent = null; } public clearRoomId(): void { - this._currentRoomId = 0; - this._latestEntryTileEvent = null; + this._currentRoomId = 0; + this._latestEntryTileEvent = null; } private onUserInfoEvent(event: UserInfoEvent): void @@ -222,8 +222,8 @@ export class RoomMessageHandler extends Disposable if(!parser) return; - const floorType = parser.floorType; - const wallType = parser.wallType; + const floorType = parser.floorType; + const wallType = parser.wallType; const landscapeType = parser.landscapeType; if(this._roomCreator) @@ -246,8 +246,8 @@ export class RoomMessageHandler extends Disposable this._planeParser.reset(); - const width = parser.width; - const height = parser.height; + const width = parser.width; + const height = parser.height; this._planeParser.initializeTileMap(width, height); @@ -255,10 +255,10 @@ export class RoomMessageHandler extends Disposable if(this._latestEntryTileEvent) entryTile = this._latestEntryTileEvent.getParser(); - let doorX = -1; - let doorY = -1; - let doorZ = 0; - let doorDirection = 0; + let doorX = -1; + let doorY = -1; + let doorZ = 0; + let doorDirection = 0; let y = 0; @@ -274,18 +274,18 @@ export class RoomMessageHandler extends Disposable { if(((parser.getHeight(x, (y - 1)) == RoomPlaneParser.TILE_BLOCKED) && (parser.getHeight((x - 1), y) == RoomPlaneParser.TILE_BLOCKED)) && (parser.getHeight(x, (y + 1)) == RoomPlaneParser.TILE_BLOCKED)) { - doorX = (x + 0.5); - doorY = y; - doorZ = tileHeight; - doorDirection = 90; + doorX = (x + 0.5); + doorY = y; + doorZ = tileHeight; + doorDirection = 90; } if(((parser.getHeight(x, (y - 1)) == RoomPlaneParser.TILE_BLOCKED) && (parser.getHeight((x - 1), y) == RoomPlaneParser.TILE_BLOCKED)) && (parser.getHeight((x + 1), y) == RoomPlaneParser.TILE_BLOCKED)) { - doorX = x; - doorY = (y + 0.5); - doorZ = tileHeight; - doorDirection = 180; + doorX = x; + doorY = (y + 0.5); + doorZ = tileHeight; + doorDirection = 180; } } @@ -304,14 +304,14 @@ export class RoomMessageHandler extends Disposable if(parser.scale === 64) { this._planeParser.restrictsDragging = true; - this._planeParser.restrictsScaling = true; - this._planeParser.restrictedScale = 0.5; + this._planeParser.restrictsScaling = true; + this._planeParser.restrictedScale = 0.5; } else { this._planeParser.restrictsDragging = false; - this._planeParser.restrictsScaling = false; - this._planeParser.restrictedScale = 1; + this._planeParser.restrictsScaling = false; + this._planeParser.restrictedScale = 1; } wallGeometry.scale = LegacyWallGeometry.DEFAULT_SCALE; @@ -352,8 +352,8 @@ export class RoomMessageHandler extends Disposable if(!parser) return; - const width = parser.width; - const height = parser.height; + const width = parser.width; + const height = parser.height; const heightMap = new FurnitureStackingHeightMap(width, height); let y = 0; @@ -407,10 +407,10 @@ export class RoomMessageHandler extends Disposable if(!parser) return; - const visibleWall = !parser.hideWalls; - const visibleFloor = true; - const thicknessWall = parser.thicknessWall; - const thicknessFloor = parser.thicknessFloor; + const visibleWall = !parser.hideWalls; + const visibleFloor = true; + const thicknessWall = parser.thicknessWall; + const thicknessFloor = parser.thicknessFloor; if(this._roomCreator) { @@ -559,8 +559,8 @@ export class RoomMessageHandler extends Disposable if(!item) return; - const location: IVector3D = new Vector3d(item.x, item.y, item.z); - const direction: IVector3D = new Vector3d(item.direction); + const location: IVector3D = new Vector3d(item.x, item.y, item.z); + const direction: IVector3D = new Vector3d(item.direction); this._roomCreator.updateRoomObjectFloor(this._currentRoomId, item.itemId, location, direction, item.data.state, item.data, item.extra); this._roomCreator.updateRoomObjectFloorHeight(this._currentRoomId, item.itemId, item.stackHeight); @@ -623,7 +623,7 @@ export class RoomMessageHandler extends Disposable if(!item) return; - const location = wallGeometry.getLocation(item.width, item.height, item.localX, item.localY, item.direction); + const location = wallGeometry.getLocation(item.width, item.height, item.localX, item.localY, item.direction); const direction = new Vector3d(wallGeometry.getDirection(item.direction)); this._roomCreator.updateRoomObjectWall(this._currentRoomId, item.itemId, location, direction, item.state, item.stuffData); @@ -692,7 +692,7 @@ export class RoomMessageHandler extends Disposable { if(!user) continue; - const location = new Vector3d(user.x, user.y, user.z); + const location = new Vector3d(user.x, user.y, user.z); const direction = new Vector3d(user.dir); this._roomCreator.addRoomObjectUser(this._currentRoomId, user.roomIndex, location, direction, user.dir, user.userType, user.figure); @@ -789,7 +789,7 @@ export class RoomMessageHandler extends Disposable if(height) height = (height / zScale); - const location = new Vector3d(status.x, status.y, (status.z + height)); + const location = new Vector3d(status.x, status.y, (status.z + height)); const direction = new Vector3d(status.direction); let goal: IVector3D = null; @@ -799,10 +799,10 @@ export class RoomMessageHandler extends Disposable this._roomCreator.updateRoomObjectUserLocation(this._currentRoomId, status.id, location, goal, status.canStandUp, height, direction, status.headDirection); this._roomCreator.updateRoomObjectUserFlatControl(this._currentRoomId, status.id, null); - let isPosture = true; - let postureUpdate = false; - let postureType = RoomObjectVariable.STD; - let parameter = ''; + let isPosture = true; + let postureUpdate = false; + let postureType = RoomObjectVariable.STD; + let parameter = ''; if(status.actions && status.actions.length) { @@ -827,15 +827,15 @@ export class RoomMessageHandler extends Disposable break; case 'wav': case 'mv': - postureUpdate = true; - postureType = action.action; - parameter = action.value; + postureUpdate = true; + postureType = action.action; + parameter = action.value; break; case 'trd': break; default: - postureUpdate = true; - postureType = action.action; - parameter = action.value; + postureUpdate = true; + postureType = action.action; + parameter = action.value; break; } } @@ -902,7 +902,7 @@ export class RoomMessageHandler extends Disposable { if(!data || !this._roomCreator) return; - const location = new Vector3d(data.x, data.y, data.z); + const location = new Vector3d(data.x, data.y, data.z); const direction = new Vector3d(data.direction); if(data.spriteName) diff --git a/src/nitro/room/RoomObjectEventHandler.ts b/src/nitro/room/RoomObjectEventHandler.ts index 51cb476e..b211ddce 100644 --- a/src/nitro/room/RoomObjectEventHandler.ts +++ b/src/nitro/room/RoomObjectEventHandler.ts @@ -87,15 +87,15 @@ export class RoomObjectEventHandler extends Disposable implements IRoomCanvasMou { super(); - this._roomEngine = roomEngine; + this._roomEngine = roomEngine; - this._eventIds = new Map(); + this._eventIds = new Map(); - this._selectedAvatarId = -1; - this._selectedObjectId = -1; - this._selectedObjectCategory = -2; + this._selectedAvatarId = -1; + this._selectedObjectId = -1; + this._selectedObjectCategory = -2; this._whereYouClickIsWhereYouGo = true; - this._objectPlacementSource = null; + this._objectPlacementSource = null; this.onRoomEngineObjectEvent = this.onRoomEngineObjectEvent.bind(this); @@ -182,7 +182,7 @@ export class RoomObjectEventHandler extends Disposable implements IRoomCanvasMou { this._objectPlacementSource = placementSource; - const location = new Vector3d(-100, -100); + const location = new Vector3d(-100, -100); const direction = new Vector3d(0); this.setSelectedRoomObjectData(roomId, id, category, location, direction, RoomObjectOperationType.OBJECT_PLACE, typeId, extra, stuffData, state, frameNumber, posture); @@ -661,9 +661,9 @@ export class RoomObjectEventHandler extends Disposable implements IRoomCanvasMou private handleRoomObjectMouseEnterEvent(event: RoomObjectMouseEvent, roomId: number): void { - const id = event.objectId; - const type = event.objectType; - const category = this._roomEngine.getRoomObjectCategoryForType(type); + const id = event.objectId; + const type = event.objectType; + const category = this._roomEngine.getRoomObjectCategoryForType(type); if(this._roomEngine.events) { @@ -673,9 +673,9 @@ export class RoomObjectEventHandler extends Disposable implements IRoomCanvasMou private handleRoomObjectMouseLeaveEvent(event: RoomObjectMouseEvent, roomId: number): void { - const id = event.objectId; - const type = event.objectType; - const category = this._roomEngine.getRoomObjectCategoryForType(type); + const id = event.objectId; + const type = event.objectType; + const category = this._roomEngine.getRoomObjectCategoryForType(type); if(category !== RoomObjectCategory.ROOM) { @@ -729,11 +729,11 @@ export class RoomObjectEventHandler extends Disposable implements IRoomCanvasMou switch(event.type) { case RoomObjectMoveEvent.POSITION_CHANGED: { - const objectId = event.objectId; - const objectType = event.objectType; - const objectCategory = this._roomEngine.getRoomObjectCategoryForType(objectType); - const object = this._roomEngine.getRoomObject(roomId, objectId, objectCategory); - const selectionArrow = this._roomEngine.getRoomObjectSelectionArrow(roomId); + const objectId = event.objectId; + const objectType = event.objectType; + const objectCategory = this._roomEngine.getRoomObjectCategoryForType(objectType); + const object = this._roomEngine.getRoomObject(roomId, objectId, objectCategory); + const selectionArrow = this._roomEngine.getRoomObjectSelectionArrow(roomId); if(object && selectionArrow && selectionArrow.logic) { @@ -753,10 +753,10 @@ export class RoomObjectEventHandler extends Disposable implements IRoomCanvasMou { if(!event || !this._roomEngine) return; - const objectId = event.objectId; - const objectType = event.objectType; - const objectCategory = this._roomEngine.getRoomObjectCategoryForType(objectType); - const eventDispatcher = this._roomEngine.events; + const objectId = event.objectId; + const objectType = event.objectType; + const objectCategory = this._roomEngine.getRoomObjectCategoryForType(objectType); + const eventDispatcher = this._roomEngine.events; if(!eventDispatcher) return; @@ -1003,9 +1003,9 @@ export class RoomObjectEventHandler extends Disposable implements IRoomCanvasMou switch(event.type) { case RoomObjectBadgeAssetEvent.LOAD_BADGE: { - const objectId = event.objectId; - const objectType = event.objectType; - const objectCategory = this._roomEngine.getRoomObjectCategoryForType(objectType); + const objectId = event.objectId; + const objectType = event.objectType; + const objectCategory = this._roomEngine.getRoomObjectCategoryForType(objectType); this._roomEngine.loadRoomObjectBadgeImage(roomId, objectId, objectCategory, event.badgeId, event.groupBadge); return; @@ -1336,7 +1336,7 @@ export class RoomObjectEventHandler extends Disposable implements IRoomCanvasMou { if(!k || !_arg_2) return false; - const _local_9 = new Vector3d(_arg_8); + const _local_9 = new Vector3d(_arg_8); const _local_10 = this.validateWallItemLocation(k, _arg_3, _arg_4, _arg_5, _arg_6, _arg_7, _arg_2); if(!_local_10) return false; @@ -1378,12 +1378,12 @@ export class RoomObjectEventHandler extends Disposable implements IRoomCanvasMou if(sizeY < 1) sizeY = 1; - const _local_9 = _arg_3.x; - const _local_10 = _arg_3.y; - let _local_11 = sizeX; - let _local_12 = sizeY; - let _local_13 = 0; - let _local_14 = (Math.trunc((Math.trunc(_local_6.x + 45) % 360) / 90)); + const _local_9 = _arg_3.x; + const _local_10 = _arg_3.y; + let _local_11 = sizeX; + let _local_12 = sizeY; + let _local_13 = 0; + let _local_14 = (Math.trunc((Math.trunc(_local_6.x + 45) % 360) / 90)); if((_local_14 === 1) || (_local_14 === 3)) { @@ -1579,7 +1579,7 @@ export class RoomObjectEventHandler extends Disposable implements IRoomCanvasMou if(!model) return null; - const location = k.getLocation(); + const location = k.getLocation(); const direction = k.getDirection(); let sizeX = model.getValue(RoomObjectVariable.FURNITURE_SIZE_X); @@ -1595,7 +1595,7 @@ export class RoomObjectEventHandler extends Disposable implements IRoomCanvasMou if(!renderingCanvas) return null; - const scale = renderingCanvas.geometry.scale; + const scale = renderingCanvas.geometry.scale; const _local_13 = furniData.canSitOn ? 0.5 : 0; const _local_14 = ((((scale / 2) + _arg_2.spriteOffsetX) + _arg_2.localX) / (scale / 4)); const _local_15 = (((_arg_2.spriteOffsetY + _arg_2.localY) + (((sizeZ - _local_13) * scale) / 2)) / (scale / 4)); @@ -1638,7 +1638,7 @@ export class RoomObjectEventHandler extends Disposable implements IRoomCanvasMou if(_local_8) { - const _local_9 = _local_8.getObjectIntTile(_local_4, _local_5); + const _local_9 = _local_8.getObjectIntTile(_local_4, _local_5); const _local_10 = this._roomEngine.getFurnitureStackingHeightMap(roomId); if(_local_10) @@ -1666,15 +1666,15 @@ export class RoomObjectEventHandler extends Disposable implements IRoomCanvasMou if(!selectedData) return; - let roomObject: IRoomObjectController = null; - let objectId = selectedData.id; - const category = selectedData.category; + let roomObject: IRoomObjectController = null; + let objectId = selectedData.id; + const category = selectedData.category; - let x = 0; - let y = 0; - let z = 0; - let direction = 0; - let wallLocation = ''; + let x = 0; + let y = 0; + let z = 0; + let direction = 0; + let wallLocation = ''; if(this._roomEngine && this._roomEngine.connection) { @@ -1688,16 +1688,16 @@ export class RoomObjectEventHandler extends Disposable implements IRoomCanvasMou if((category === RoomObjectCategory.FLOOR) || (category === RoomObjectCategory.UNIT)) { - x = location.x; - y = location.y; - z = location.z; + x = location.x; + y = location.y; + z = location.z; } else if(category === RoomObjectCategory.WALL) { - x = location.x; - y = location.y; - z = location.z; + x = location.x; + y = location.y; + z = location.z; const wallGeometry = this._roomEngine.getLegacyWallGeometry(roomId); @@ -1851,8 +1851,8 @@ export class RoomObjectEventHandler extends Disposable implements IRoomCanvasMou { if(category === RoomObjectCategory.FLOOR) { - const angle = ((roomObject.getDirection().x) % 360); - const location = roomObject.getLocation(); + const angle = ((roomObject.getDirection().x) % 360); + const location = roomObject.getLocation(); const direction = (angle / 45); this._roomEngine.connection.send(new FurnitureFloorUpdateComposer(objectId, location.x, location.y, direction)); @@ -1860,8 +1860,8 @@ export class RoomObjectEventHandler extends Disposable implements IRoomCanvasMou else if(category === RoomObjectCategory.WALL) { - const angle = ((roomObject.getDirection().x) % 360); - const wallGeometry = this._roomEngine.getLegacyWallGeometry(roomId); + const angle = ((roomObject.getDirection().x) % 360); + const wallGeometry = this._roomEngine.getLegacyWallGeometry(roomId); if(wallGeometry) { @@ -1873,11 +1873,11 @@ export class RoomObjectEventHandler extends Disposable implements IRoomCanvasMou else if(category === RoomObjectCategory.UNIT) { - const angle = ((roomObject.getDirection().x) % 360); - const location = roomObject.getLocation(); - const direction = (angle / 45); - const race = parseInt(roomObject.model.getValue(RoomObjectVariable.RACE)); - const roomSession = this._roomEngine.roomSessionManager.getSession(roomId); + const angle = ((roomObject.getDirection().x) % 360); + const location = roomObject.getLocation(); + const direction = (angle / 45); + const race = parseInt(roomObject.model.getValue(RoomObjectVariable.RACE)); + const roomSession = this._roomEngine.roomSessionManager.getSession(roomId); if(roomSession) { @@ -1940,8 +1940,8 @@ export class RoomObjectEventHandler extends Disposable implements IRoomCanvasMou { if(!k || !k.model) return 0; - let _local_6 = 0; - let _local_7 = 0; + let _local_6 = 0; + let _local_7 = 0; let allowedDirections: number[] = []; if(k.type === RoomObjectUserType.MONSTER_PLANT) @@ -1961,8 +1961,8 @@ export class RoomObjectEventHandler extends Disposable implements IRoomCanvasMou if(_local_6 < 0) { - _local_6 = 0; - _local_7 = 0; + _local_6 = 0; + _local_7 = 0; while(_local_7 < allowedDirections.length) { @@ -1989,7 +1989,7 @@ export class RoomObjectEventHandler extends Disposable implements IRoomCanvasMou if(!object || !object.model || !goalDirection) return false; const direction = object.getDirection(); - const location = object.getLocation(); + const location = object.getLocation(); if(!direction || !location) return false; @@ -2002,8 +2002,8 @@ export class RoomObjectEventHandler extends Disposable implements IRoomCanvasMou if(sizeY < 1) sizeY = 1; - let _local_8 = sizeX; - let _local_9 = sizeY; + let _local_8 = sizeX; + let _local_9 = sizeY; let _local_11 = (Math.trunc((Math.trunc((goalDirection.x + 45)) % 360) / 90)); @@ -2070,8 +2070,8 @@ export class RoomObjectEventHandler extends Disposable implements IRoomCanvasMou { roomObject.logic.processUpdateMessage(new ObjectSelectedMessage(true)); - this._selectedObjectId = objectId; - this._selectedObjectCategory = category; + this._selectedObjectId = objectId; + this._selectedObjectCategory = category; } } } @@ -2092,8 +2092,8 @@ export class RoomObjectEventHandler extends Disposable implements IRoomCanvasMou { object.logic.processUpdateMessage(new ObjectSelectedMessage(false)); - this._selectedObjectId = -1; - this._selectedObjectCategory = RoomObjectCategory.MINIMUM; + this._selectedObjectId = -1; + this._selectedObjectCategory = RoomObjectCategory.MINIMUM; } } @@ -2172,8 +2172,8 @@ export class RoomObjectEventHandler extends Disposable implements IRoomCanvasMou else if((selectedData.operation === RoomObjectOperationType.OBJECT_PLACE)) { - const objectId = selectedData.id; - const category = selectedData.category; + const objectId = selectedData.id; + const category = selectedData.category; switch(category) { @@ -2219,7 +2219,7 @@ export class RoomObjectEventHandler extends Disposable implements IRoomCanvasMou return true; } - private setSelectedRoomObjectData(roomId: number, id: number, category: number, location: IVector3D, direction: IVector3D, operation: string, typeId: number = 0, instanceData: string = null, stuffData: IObjectData =null, state: number = -1, frameNumber: number = -1, posture: string = null): void + private setSelectedRoomObjectData(roomId: number, id: number, category: number, location: IVector3D, direction: IVector3D, operation: string, typeId: number = 0, instanceData: string = null, stuffData: IObjectData =null, state: number = -1, frameNumber: number = -1, posture: string = null): void { this.resetSelectedObjectData(roomId); diff --git a/src/nitro/room/RoomObjectLogicFactory.ts b/src/nitro/room/RoomObjectLogicFactory.ts index 7b59fdc0..933a417a 100644 --- a/src/nitro/room/RoomObjectLogicFactory.ts +++ b/src/nitro/room/RoomObjectLogicFactory.ts @@ -62,11 +62,11 @@ export class RoomObjectLogicFactory implements IRoomObjectLogicFactory constructor() { - this._events = new EventDispatcher(); + this._events = new EventDispatcher(); - this._cachedEvents = new Map(); - this._registeredEvents = new Map(); - this._functions = []; + this._cachedEvents = new Map(); + this._registeredEvents = new Map(); + this._functions = []; } public getLogic(type: string): IRoomObjectEventHandler diff --git a/src/nitro/room/RoomVariableEnum.ts b/src/nitro/room/RoomVariableEnum.ts index 288efb2f..e41e8b79 100644 --- a/src/nitro/room/RoomVariableEnum.ts +++ b/src/nitro/room/RoomVariableEnum.ts @@ -1,14 +1,14 @@ export class RoomVariableEnum { - public static ROOM_MIN_X: string = 'room_min_x'; - public static ROOM_MAX_X: string = 'room_max_x'; - public static ROOM_MIN_Y: string = 'room_min_y'; - public static ROOM_MAX_Y: string = 'room_max_y'; - public static ROOM_IS_PUBLIC: string = 'room_is_public'; - public static ROOM_Z_SCALE: string = 'room_z_scale'; - public static AD_DISPLAY_DELAY: string = 'ad_display_delay'; - public static IS_PLAYING_GAME: string = 'is_playing_game'; - public static RESTRICTS_DRAGGING: string = 'restricts_dragging'; - public static RESTRICTS_SCALING: string = 'restricts_scaling'; - public static RESTRICTED_SCALE: string = 'room_scale'; + public static ROOM_MIN_X: string = 'room_min_x'; + public static ROOM_MAX_X: string = 'room_max_x'; + public static ROOM_MIN_Y: string = 'room_min_y'; + public static ROOM_MAX_Y: string = 'room_max_y'; + public static ROOM_IS_PUBLIC: string = 'room_is_public'; + public static ROOM_Z_SCALE: string = 'room_z_scale'; + public static AD_DISPLAY_DELAY: string = 'ad_display_delay'; + public static IS_PLAYING_GAME: string = 'is_playing_game'; + public static RESTRICTS_DRAGGING: string = 'restricts_dragging'; + public static RESTRICTS_SCALING: string = 'restricts_scaling'; + public static RESTRICTED_SCALE: string = 'room_scale'; } \ No newline at end of file diff --git a/src/nitro/room/enums/RoomObjectPlacementSource.ts b/src/nitro/room/enums/RoomObjectPlacementSource.ts index 218a07ca..629bec47 100644 --- a/src/nitro/room/enums/RoomObjectPlacementSource.ts +++ b/src/nitro/room/enums/RoomObjectPlacementSource.ts @@ -1,5 +1,5 @@ export class RoomObjectPlacementSource { - public static CATALOG: string = 'catalog'; + public static CATALOG: string = 'catalog'; public static INVENTORY: string = 'inventory'; } diff --git a/src/nitro/room/events/RoomBackgroundColorEvent.ts b/src/nitro/room/events/RoomBackgroundColorEvent.ts index e05b7057..03152df4 100644 --- a/src/nitro/room/events/RoomBackgroundColorEvent.ts +++ b/src/nitro/room/events/RoomBackgroundColorEvent.ts @@ -12,9 +12,9 @@ export class RoomBackgroundColorEvent extends RoomEngineEvent { super(RoomBackgroundColorEvent.ROOM_COLOR, roomId); - this._color = color; + this._color = color; this._brightness = _arg_3; - this._bgOnly = _arg_4; + this._bgOnly = _arg_4; } public get color(): number diff --git a/src/nitro/room/events/RoomDragEvent.ts b/src/nitro/room/events/RoomDragEvent.ts index c51e1cba..e41931b0 100644 --- a/src/nitro/room/events/RoomDragEvent.ts +++ b/src/nitro/room/events/RoomDragEvent.ts @@ -11,8 +11,8 @@ export class RoomDragEvent extends RoomEngineEvent { super(RoomDragEvent.ROOM_DRAG, roomId); - this._offsetX = offsetX; - this._offsetY = offsetY; + this._offsetX = offsetX; + this._offsetY = offsetY; } public get offsetX(): number diff --git a/src/nitro/room/events/RoomEngineDimmerStateEvent.ts b/src/nitro/room/events/RoomEngineDimmerStateEvent.ts index c0bd9e3e..85ca480c 100644 --- a/src/nitro/room/events/RoomEngineDimmerStateEvent.ts +++ b/src/nitro/room/events/RoomEngineDimmerStateEvent.ts @@ -14,11 +14,11 @@ export class RoomEngineDimmerStateEvent extends RoomEngineEvent { super(RoomEngineDimmerStateEvent.ROOM_COLOR, k); - this._state = state; - this._presetId = presetId; - this._effectId = effectId; - this._color = color; - this._brightness = brightness; + this._state = state; + this._presetId = presetId; + this._effectId = effectId; + this._color = color; + this._brightness = brightness; } public get state(): number diff --git a/src/nitro/room/events/RoomEngineEvent.ts b/src/nitro/room/events/RoomEngineEvent.ts index 067ed9fd..7a1b8078 100644 --- a/src/nitro/room/events/RoomEngineEvent.ts +++ b/src/nitro/room/events/RoomEngineEvent.ts @@ -2,13 +2,13 @@ import { NitroEvent } from '../../../core/events/NitroEvent'; export class RoomEngineEvent extends NitroEvent { - public static INITIALIZED: string = 'REE_INITIALIZED'; - public static ENGINE_INITIALIZED: string = 'REE_ENGINE_INITIALIZED'; - public static OBJECTS_INITIALIZED: string = 'REE_OBJECTS_INITIALIZED'; - public static NORMAL_MODE: string = 'REE_NORMAL_MODE'; - public static GAME_MODE: string = 'REE_GAME_MODE'; - public static ROOM_ZOOMED: string = 'REE_ROOM_ZOOMED'; - public static DISPOSED: string = 'REE_DISPOSED'; + public static INITIALIZED: string = 'REE_INITIALIZED'; + public static ENGINE_INITIALIZED: string = 'REE_ENGINE_INITIALIZED'; + public static OBJECTS_INITIALIZED: string = 'REE_OBJECTS_INITIALIZED'; + public static NORMAL_MODE: string = 'REE_NORMAL_MODE'; + public static GAME_MODE: string = 'REE_GAME_MODE'; + public static ROOM_ZOOMED: string = 'REE_ROOM_ZOOMED'; + public static DISPOSED: string = 'REE_DISPOSED'; private _roomId: number; diff --git a/src/nitro/room/events/RoomEngineObjectEvent.ts b/src/nitro/room/events/RoomEngineObjectEvent.ts index ac88815f..a447f7e4 100644 --- a/src/nitro/room/events/RoomEngineObjectEvent.ts +++ b/src/nitro/room/events/RoomEngineObjectEvent.ts @@ -2,18 +2,18 @@ import { RoomEngineEvent } from './RoomEngineEvent'; export class RoomEngineObjectEvent extends RoomEngineEvent { - public static SELECTED: string = 'REOE_SELECTED'; - public static DESELECTED: string = 'REOE_DESELECTED'; - public static ADDED: string = 'REOE_ADDED'; - public static REMOVED: string = 'REOE_REMOVED'; - public static PLACED: string = 'REOE_PLACED'; - public static PLACED_ON_USER: string = 'REOE_PLACED_ON_USER'; - public static CONTENT_UPDATED: string = 'REOE_CONTENT_UPDATED'; - public static REQUEST_MOVE: string = 'REOE_REQUEST_MOVE'; - public static REQUEST_ROTATE: string = 'REOE_REQUEST_ROTATE'; - public static REQUEST_MANIPULATION: string = 'REOE_REQUEST_MANIPULATION'; - public static MOUSE_ENTER: string = 'REOE_MOUSE_ENTER'; - public static MOUSE_LEAVE: string = 'REOE_MOUSE_LEAVE'; + public static SELECTED: string = 'REOE_SELECTED'; + public static DESELECTED: string = 'REOE_DESELECTED'; + public static ADDED: string = 'REOE_ADDED'; + public static REMOVED: string = 'REOE_REMOVED'; + public static PLACED: string = 'REOE_PLACED'; + public static PLACED_ON_USER: string = 'REOE_PLACED_ON_USER'; + public static CONTENT_UPDATED: string = 'REOE_CONTENT_UPDATED'; + public static REQUEST_MOVE: string = 'REOE_REQUEST_MOVE'; + public static REQUEST_ROTATE: string = 'REOE_REQUEST_ROTATE'; + public static REQUEST_MANIPULATION: string = 'REOE_REQUEST_MANIPULATION'; + public static MOUSE_ENTER: string = 'REOE_MOUSE_ENTER'; + public static MOUSE_LEAVE: string = 'REOE_MOUSE_LEAVE'; private _objectId: number; private _category: number; @@ -22,8 +22,8 @@ export class RoomEngineObjectEvent extends RoomEngineEvent { super(type, roomId); - this._objectId = objectId; - this._category = category; + this._objectId = objectId; + this._category = category; } public get objectId(): number diff --git a/src/nitro/room/events/RoomEngineObjectPlacedEvent.ts b/src/nitro/room/events/RoomEngineObjectPlacedEvent.ts index 660dd1d5..cd008df8 100644 --- a/src/nitro/room/events/RoomEngineObjectPlacedEvent.ts +++ b/src/nitro/room/events/RoomEngineObjectPlacedEvent.ts @@ -16,15 +16,15 @@ export class RoomEngineObjectPlacedEvent extends RoomEngineObjectEvent { super(type, roomId, objectId, category); - this._wallLocation = wallLocation; - this._x = x; - this._y = y; - this._z = z; - this._direction = direction; - this._placedInRoom = placedInRoom; + this._wallLocation = wallLocation; + this._x = x; + this._y = y; + this._z = z; + this._direction = direction; + this._placedInRoom = placedInRoom; this._placedOnFloor = placedOnFloor; - this._placedOnWall = placedOnWall; - this._instanceData = instanceData; + this._placedOnWall = placedOnWall; + this._instanceData = instanceData; } public get wallLocation(): string diff --git a/src/nitro/room/events/RoomEngineObjectPlacedOnUserEvent.ts b/src/nitro/room/events/RoomEngineObjectPlacedOnUserEvent.ts index 21f1e18e..0ccb0871 100644 --- a/src/nitro/room/events/RoomEngineObjectPlacedOnUserEvent.ts +++ b/src/nitro/room/events/RoomEngineObjectPlacedOnUserEvent.ts @@ -9,7 +9,7 @@ export class RoomEngineObjectPlacedOnUserEvent extends RoomEngineObjectEvent { super(k, roomId, objectId, category); - this._droppedObjectId = droppedObjectId; + this._droppedObjectId = droppedObjectId; this._droppedObjectCategory = droppedObjectCategory; } diff --git a/src/nitro/room/events/RoomEngineObjectPlaySoundEvent.ts b/src/nitro/room/events/RoomEngineObjectPlaySoundEvent.ts index d4e13050..c5e39fdd 100644 --- a/src/nitro/room/events/RoomEngineObjectPlaySoundEvent.ts +++ b/src/nitro/room/events/RoomEngineObjectPlaySoundEvent.ts @@ -2,8 +2,8 @@ import { RoomEngineObjectEvent } from './RoomEngineObjectEvent'; export class RoomEngineObjectPlaySoundEvent extends RoomEngineObjectEvent { - public static PLAY_SOUND: string = 'REOPSE_PLAY_SOUND'; - public static PLAY_SOUND_AT_PITCH: string = 'REOPSE_PLAY_SOUND_AT_PITCH'; + public static PLAY_SOUND: string = 'REOPSE_PLAY_SOUND'; + public static PLAY_SOUND_AT_PITCH: string = 'REOPSE_PLAY_SOUND_AT_PITCH'; private _soundId: string; private _pitch: number; @@ -12,8 +12,8 @@ export class RoomEngineObjectPlaySoundEvent extends RoomEngineObjectEvent { super(type, roomId, objectId, objectCategory); - this._soundId = soundId; - this._pitch = pitch; + this._soundId = soundId; + this._pitch = pitch; } public get soundId(): string diff --git a/src/nitro/room/events/RoomEngineSamplePlaybackEvent.ts b/src/nitro/room/events/RoomEngineSamplePlaybackEvent.ts index e0ad285e..ba4e04e2 100644 --- a/src/nitro/room/events/RoomEngineSamplePlaybackEvent.ts +++ b/src/nitro/room/events/RoomEngineSamplePlaybackEvent.ts @@ -2,10 +2,10 @@ import { RoomEngineObjectEvent } from './RoomEngineObjectEvent'; export class RoomEngineSamplePlaybackEvent extends RoomEngineObjectEvent { - public static ROOM_OBJECT_INITIALIZED: string = 'ROPSPE_ROOM_OBJECT_INITIALIZED'; - public static ROOM_OBJECT_DISPOSED: string = 'ROPSPE_ROOM_OBJECT_DISPOSED'; - public static PLAY_SAMPLE: string = 'ROPSPE_PLAY_SAMPLE'; - public static CHANGE_PITCH: string = 'ROPSPE_CHANGE_PITCH'; + public static ROOM_OBJECT_INITIALIZED: string = 'ROPSPE_ROOM_OBJECT_INITIALIZED'; + public static ROOM_OBJECT_DISPOSED: string = 'ROPSPE_ROOM_OBJECT_DISPOSED'; + public static PLAY_SAMPLE: string = 'ROPSPE_PLAY_SAMPLE'; + public static CHANGE_PITCH: string = 'ROPSPE_CHANGE_PITCH'; private _sampleId: number; private _pitch: number; @@ -14,8 +14,8 @@ export class RoomEngineSamplePlaybackEvent extends RoomEngineObjectEvent { super(k, roomId, objectId, objectCategory); - this._sampleId = sampleId; - this._pitch = pitch; + this._sampleId = sampleId; + this._pitch = pitch; } public get sampleId(): number diff --git a/src/nitro/room/events/RoomEngineTriggerWidgetEvent.ts b/src/nitro/room/events/RoomEngineTriggerWidgetEvent.ts index afc99d3e..2c22fddb 100644 --- a/src/nitro/room/events/RoomEngineTriggerWidgetEvent.ts +++ b/src/nitro/room/events/RoomEngineTriggerWidgetEvent.ts @@ -2,37 +2,37 @@ export class RoomEngineTriggerWidgetEvent extends RoomEngineObjectEvent { - public static OPEN_WIDGET: string = 'RETWE_OPEN_WIDGET'; - public static CLOSE_WIDGET: string = 'RETWE_CLOSE_WIDGET'; - public static OPEN_FURNI_CONTEXT_MENU: string = 'RETWE_OPEN_FURNI_CONTEXT_MENU'; - public static CLOSE_FURNI_CONTEXT_MENU: string = 'RETWE_CLOSE_FURNI_CONTEXT_MENU'; - public static REQUEST_PLACEHOLDER: string = 'RETWE_REQUEST_PLACEHOLDER'; - public static REQUEST_CREDITFURNI: string = 'RETWE_REQUEST_CREDITFURNI'; - public static REQUEST_STICKIE: string = 'RETWE_REQUEST_STICKIE'; - public static REQUEST_PRESENT: string = 'RETWE_REQUEST_PRESENT'; - public static REQUEST_TROPHY: string = 'RETWE_REQUEST_TROPHY'; - public static REQUEST_TEASER: string = 'RETWE_REQUEST_TEASER'; - public static REQUEST_ECOTRONBOX: string = 'RETWE_REQUEST_ECOTRONBOX'; - public static REQUEST_DIMMER: string = 'RETWE_REQUEST_DIMMER'; - public static REMOVE_DIMMER: string = 'RETWE_REMOVE_DIMMER'; - public static REQUEST_CLOTHING_CHANGE: string = 'RETWE_REQUEST_CLOTHING_CHANGE'; - public static REQUEST_PLAYLIST_EDITOR: string = 'RETWE_REQUEST_PLAYLIST_EDITOR'; - public static REQUEST_MANNEQUIN: string = 'RETWE_REQUEST_MANNEQUIN'; + public static OPEN_WIDGET: string = 'RETWE_OPEN_WIDGET'; + public static CLOSE_WIDGET: string = 'RETWE_CLOSE_WIDGET'; + public static OPEN_FURNI_CONTEXT_MENU: string = 'RETWE_OPEN_FURNI_CONTEXT_MENU'; + public static CLOSE_FURNI_CONTEXT_MENU: string = 'RETWE_CLOSE_FURNI_CONTEXT_MENU'; + public static REQUEST_PLACEHOLDER: string = 'RETWE_REQUEST_PLACEHOLDER'; + public static REQUEST_CREDITFURNI: string = 'RETWE_REQUEST_CREDITFURNI'; + public static REQUEST_STICKIE: string = 'RETWE_REQUEST_STICKIE'; + public static REQUEST_PRESENT: string = 'RETWE_REQUEST_PRESENT'; + public static REQUEST_TROPHY: string = 'RETWE_REQUEST_TROPHY'; + public static REQUEST_TEASER: string = 'RETWE_REQUEST_TEASER'; + public static REQUEST_ECOTRONBOX: string = 'RETWE_REQUEST_ECOTRONBOX'; + public static REQUEST_DIMMER: string = 'RETWE_REQUEST_DIMMER'; + public static REMOVE_DIMMER: string = 'RETWE_REMOVE_DIMMER'; + public static REQUEST_CLOTHING_CHANGE: string = 'RETWE_REQUEST_CLOTHING_CHANGE'; + public static REQUEST_PLAYLIST_EDITOR: string = 'RETWE_REQUEST_PLAYLIST_EDITOR'; + public static REQUEST_MANNEQUIN: string = 'RETWE_REQUEST_MANNEQUIN'; public static REQUEST_MONSTERPLANT_SEED_PLANT_CONFIRMATION_DIALOG: string = 'ROWRE_REQUEST_MONSTERPLANT_SEED_PLANT_CONFIRMATION_DIALOG'; - public static REQUEST_PURCHASABLE_CLOTHING_CONFIRMATION_DIALOG: string = 'ROWRE_REQUEST_PURCHASABLE_CLOTHING_CONFIRMATION_DIALOG'; - public static REQUEST_BACKGROUND_COLOR: string = 'RETWE_REQUEST_BACKGROUND_COLOR'; - public static REQUEST_MYSTERYBOX_OPEN_DIALOG: string = 'RETWE_REQUEST_MYSTERYBOX_OPEN_DIALOG'; - public static REQUEST_EFFECTBOX_OPEN_DIALOG: string = 'RETWE_REQUEST_EFFECTBOX_OPEN_DIALOG'; - public static REQUEST_MYSTERYTROPHY_OPEN_DIALOG: string = 'RETWE_REQUEST_MYSTERYTROPHY_OPEN_DIALOG'; - public static REQUEST_ACHIEVEMENT_RESOLUTION_ENGRAVING: string = 'RETWE_REQUEST_ACHIEVEMENT_RESOLUTION_ENGRAVING'; - public static REQUEST_ACHIEVEMENT_RESOLUTION_FAILED: string = 'RETWE_REQUEST_ACHIEVEMENT_RESOLUTION_FAILED'; - public static REQUEST_FRIEND_FURNITURE_CONFIRM: string = 'RETWE_REQUEST_FRIEND_FURNITURE_CONFIRM'; - public static REQUEST_FRIEND_FURNITURE_ENGRAVING: string = 'RETWE_REQUEST_FRIEND_FURNITURE_ENGRAVING'; - public static REQUEST_BADGE_DISPLAY_ENGRAVING: string = 'RETWE_REQUEST_BADGE_DISPLAY_ENGRAVING'; - public static REQUEST_HIGH_SCORE_DISPLAY: string = 'RETWE_REQUEST_HIGH_SCORE_DISPLAY'; - public static REQUEST_HIDE_HIGH_SCORE_DISPLAY: string = 'RETWE_REQUEST_HIDE_HIGH_SCORE_DISPLAY'; - public static REQUEST_INTERNAL_LINK: string = 'RETWE_REQUEST_INTERNAL_LINK'; - public static REQUEST_ROOM_LINK: string = 'RETWE_REQUEST_ROOM_LINK'; + public static REQUEST_PURCHASABLE_CLOTHING_CONFIRMATION_DIALOG: string = 'ROWRE_REQUEST_PURCHASABLE_CLOTHING_CONFIRMATION_DIALOG'; + public static REQUEST_BACKGROUND_COLOR: string = 'RETWE_REQUEST_BACKGROUND_COLOR'; + public static REQUEST_MYSTERYBOX_OPEN_DIALOG: string = 'RETWE_REQUEST_MYSTERYBOX_OPEN_DIALOG'; + public static REQUEST_EFFECTBOX_OPEN_DIALOG: string = 'RETWE_REQUEST_EFFECTBOX_OPEN_DIALOG'; + public static REQUEST_MYSTERYTROPHY_OPEN_DIALOG: string = 'RETWE_REQUEST_MYSTERYTROPHY_OPEN_DIALOG'; + public static REQUEST_ACHIEVEMENT_RESOLUTION_ENGRAVING: string = 'RETWE_REQUEST_ACHIEVEMENT_RESOLUTION_ENGRAVING'; + public static REQUEST_ACHIEVEMENT_RESOLUTION_FAILED: string = 'RETWE_REQUEST_ACHIEVEMENT_RESOLUTION_FAILED'; + public static REQUEST_FRIEND_FURNITURE_CONFIRM: string = 'RETWE_REQUEST_FRIEND_FURNITURE_CONFIRM'; + public static REQUEST_FRIEND_FURNITURE_ENGRAVING: string = 'RETWE_REQUEST_FRIEND_FURNITURE_ENGRAVING'; + public static REQUEST_BADGE_DISPLAY_ENGRAVING: string = 'RETWE_REQUEST_BADGE_DISPLAY_ENGRAVING'; + public static REQUEST_HIGH_SCORE_DISPLAY: string = 'RETWE_REQUEST_HIGH_SCORE_DISPLAY'; + public static REQUEST_HIDE_HIGH_SCORE_DISPLAY: string = 'RETWE_REQUEST_HIDE_HIGH_SCORE_DISPLAY'; + public static REQUEST_INTERNAL_LINK: string = 'RETWE_REQUEST_INTERNAL_LINK'; + public static REQUEST_ROOM_LINK: string = 'RETWE_REQUEST_ROOM_LINK'; private _widget: string; diff --git a/src/nitro/room/events/RoomObjectBadgeAssetEvent.ts b/src/nitro/room/events/RoomObjectBadgeAssetEvent.ts index 7708c997..3025c765 100644 --- a/src/nitro/room/events/RoomObjectBadgeAssetEvent.ts +++ b/src/nitro/room/events/RoomObjectBadgeAssetEvent.ts @@ -12,8 +12,8 @@ export class RoomObjectBadgeAssetEvent extends RoomObjectEvent { super(k, _arg_2); - this._badgeId = badgeId; - this._groupBadge = groupBadge; + this._badgeId = badgeId; + this._groupBadge = groupBadge; } public get badgeId(): string diff --git a/src/nitro/room/events/RoomObjectDataRequestEvent.ts b/src/nitro/room/events/RoomObjectDataRequestEvent.ts index 382bae57..f0b93b33 100644 --- a/src/nitro/room/events/RoomObjectDataRequestEvent.ts +++ b/src/nitro/room/events/RoomObjectDataRequestEvent.ts @@ -4,7 +4,7 @@ import { IRoomObject } from '../../../room/object/IRoomObject'; export class RoomObjectDataRequestEvent extends RoomObjectEvent { public static RODRE_CURRENT_USER_ID: string = 'RODRE_CURRENT_USER_ID'; - public static RODRE_URL_PREFIX: string = 'RODRE_URL_PREFIX'; + public static RODRE_URL_PREFIX: string = 'RODRE_URL_PREFIX'; constructor(type: string, object: IRoomObject) { diff --git a/src/nitro/room/events/RoomObjectDimmerStateUpdateEvent.ts b/src/nitro/room/events/RoomObjectDimmerStateUpdateEvent.ts index 57d98a11..c5bd72e1 100644 --- a/src/nitro/room/events/RoomObjectDimmerStateUpdateEvent.ts +++ b/src/nitro/room/events/RoomObjectDimmerStateUpdateEvent.ts @@ -15,11 +15,11 @@ export class RoomObjectDimmerStateUpdateEvent extends RoomObjectEvent { super(RoomObjectDimmerStateUpdateEvent.DIMMER_STATE, object); - this._state = state; - this._presetId = presetId; - this._effectId = effectId; - this._color = color; - this._brightness = brightness; + this._state = state; + this._presetId = presetId; + this._effectId = effectId; + this._color = color; + this._brightness = brightness; } public get state(): number diff --git a/src/nitro/room/events/RoomObjectFloorHoleEvent.ts b/src/nitro/room/events/RoomObjectFloorHoleEvent.ts index 610884cc..43d25f7e 100644 --- a/src/nitro/room/events/RoomObjectFloorHoleEvent.ts +++ b/src/nitro/room/events/RoomObjectFloorHoleEvent.ts @@ -3,7 +3,7 @@ import { IRoomObject } from '../../../room/object/IRoomObject'; export class RoomObjectFloorHoleEvent extends RoomObjectEvent { - public static ADD_HOLE: string = 'ROFHO_ADD_HOLE'; + public static ADD_HOLE: string = 'ROFHO_ADD_HOLE'; public static REMOVE_HOLE: string = 'ROFHO_REMOVE_HOLE'; constructor(k: string, _arg_2: IRoomObject) diff --git a/src/nitro/room/events/RoomObjectFurnitureActionEvent.ts b/src/nitro/room/events/RoomObjectFurnitureActionEvent.ts index 2845ad61..350b9ba9 100644 --- a/src/nitro/room/events/RoomObjectFurnitureActionEvent.ts +++ b/src/nitro/room/events/RoomObjectFurnitureActionEvent.ts @@ -2,19 +2,19 @@ import { RoomObjectEvent } from '../../../room/events/RoomObjectEvent'; export class RoomObjectFurnitureActionEvent extends RoomObjectEvent { - public static DICE_OFF: string = 'ROFCAE_DICE_OFF'; - public static DICE_ACTIVATE: string = 'ROFCAE_DICE_ACTIVATE'; - public static USE_HABBOWHEEL: string = 'ROFCAE_USE_HABBOWHEEL'; - public static STICKIE: string = 'ROFCAE_STICKIE'; - public static ENTER_ONEWAYDOOR: string = 'ROFCAE_ENTER_ONEWAYDOOR'; - public static SOUND_MACHINE_INIT: string = 'ROFCAE_SOUND_MACHINE_INIT'; - public static SOUND_MACHINE_START: string = 'ROFCAE_SOUND_MACHINE_START'; - public static SOUND_MACHINE_STOP: string = 'ROFCAE_SOUND_MACHINE_STOP'; + public static DICE_OFF: string = 'ROFCAE_DICE_OFF'; + public static DICE_ACTIVATE: string = 'ROFCAE_DICE_ACTIVATE'; + public static USE_HABBOWHEEL: string = 'ROFCAE_USE_HABBOWHEEL'; + public static STICKIE: string = 'ROFCAE_STICKIE'; + public static ENTER_ONEWAYDOOR: string = 'ROFCAE_ENTER_ONEWAYDOOR'; + public static SOUND_MACHINE_INIT: string = 'ROFCAE_SOUND_MACHINE_INIT'; + public static SOUND_MACHINE_START: string = 'ROFCAE_SOUND_MACHINE_START'; + public static SOUND_MACHINE_STOP: string = 'ROFCAE_SOUND_MACHINE_STOP'; public static SOUND_MACHINE_DISPOSE: string = 'ROFCAE_SOUND_MACHINE_DISPOSE'; - public static JUKEBOX_INIT: string = 'ROFCAE_JUKEBOX_INIT'; - public static JUKEBOX_START: string = 'ROFCAE_JUKEBOX_START'; - public static JUKEBOX_MACHINE_STOP: string = 'ROFCAE_JUKEBOX_MACHINE_STOP'; - public static JUKEBOX_DISPOSE: string = 'ROFCAE_JUKEBOX_DISPOSE'; - public static MOUSE_BUTTON: string = 'ROFCAE_MOUSE_BUTTON'; - public static MOUSE_ARROW: string = 'ROFCAE_MOUSE_ARROW'; + public static JUKEBOX_INIT: string = 'ROFCAE_JUKEBOX_INIT'; + public static JUKEBOX_START: string = 'ROFCAE_JUKEBOX_START'; + public static JUKEBOX_MACHINE_STOP: string = 'ROFCAE_JUKEBOX_MACHINE_STOP'; + public static JUKEBOX_DISPOSE: string = 'ROFCAE_JUKEBOX_DISPOSE'; + public static MOUSE_BUTTON: string = 'ROFCAE_MOUSE_BUTTON'; + public static MOUSE_ARROW: string = 'ROFCAE_MOUSE_ARROW'; } \ No newline at end of file diff --git a/src/nitro/room/events/RoomObjectHSLColorEnableEvent.ts b/src/nitro/room/events/RoomObjectHSLColorEnableEvent.ts index cfa0e7a4..c2f42762 100644 --- a/src/nitro/room/events/RoomObjectHSLColorEnableEvent.ts +++ b/src/nitro/room/events/RoomObjectHSLColorEnableEvent.ts @@ -14,10 +14,10 @@ export class RoomObjectHSLColorEnableEvent extends RoomObjectEvent { super(k, _arg_2); - this._enable = _arg_3; - this._hue = _arg_4; - this._saturation = _arg_5; - this._lightness = _arg_6; + this._enable = _arg_3; + this._hue = _arg_4; + this._saturation = _arg_5; + this._lightness = _arg_6; } public get enable(): boolean diff --git a/src/nitro/room/events/RoomObjectHSLColorEnabledEvent.ts b/src/nitro/room/events/RoomObjectHSLColorEnabledEvent.ts index 9908e841..b4a3f9e0 100644 --- a/src/nitro/room/events/RoomObjectHSLColorEnabledEvent.ts +++ b/src/nitro/room/events/RoomObjectHSLColorEnabledEvent.ts @@ -13,10 +13,10 @@ export class RoomObjectHSLColorEnabledEvent extends RoomEngineEvent { super(k, _arg_2); - this._enable = _arg_3; - this._hue = _arg_4; - this._saturation = _arg_5; - this._lightness = _arg_6; + this._enable = _arg_3; + this._hue = _arg_4; + this._saturation = _arg_5; + this._lightness = _arg_6; } public get enable(): boolean diff --git a/src/nitro/room/events/RoomObjectMoveEvent.ts b/src/nitro/room/events/RoomObjectMoveEvent.ts index 513870f3..4ed801db 100644 --- a/src/nitro/room/events/RoomObjectMoveEvent.ts +++ b/src/nitro/room/events/RoomObjectMoveEvent.ts @@ -3,8 +3,8 @@ import { IRoomObject } from '../../../room/object/IRoomObject'; export class RoomObjectMoveEvent extends RoomObjectEvent { - public static POSITION_CHANGED: string = 'ROME_POSITION_CHANGED'; - public static OBJECT_REMOVED: string = 'ROME_OBJECT_REMOVED'; + public static POSITION_CHANGED: string = 'ROME_POSITION_CHANGED'; + public static OBJECT_REMOVED: string = 'ROME_OBJECT_REMOVED'; constructor(k: string, _arg_2: IRoomObject) { diff --git a/src/nitro/room/events/RoomObjectPlaySoundIdEvent.ts b/src/nitro/room/events/RoomObjectPlaySoundIdEvent.ts index bdcf98be..b4d56a37 100644 --- a/src/nitro/room/events/RoomObjectPlaySoundIdEvent.ts +++ b/src/nitro/room/events/RoomObjectPlaySoundIdEvent.ts @@ -3,8 +3,8 @@ import { RoomObjectFurnitureActionEvent } from './RoomObjectFurnitureActionEvent export class RoomObjectPlaySoundIdEvent extends RoomObjectFurnitureActionEvent { - public static PLAY_SOUND: string = 'ROPSIE_PLAY_SOUND'; - public static PLAY_SOUND_AT_PITCH: string = 'ROPSIE_PLAY_SOUND_AT_PITCH'; + public static PLAY_SOUND: string = 'ROPSIE_PLAY_SOUND'; + public static PLAY_SOUND_AT_PITCH: string = 'ROPSIE_PLAY_SOUND_AT_PITCH'; private _soundId: string; private _pitch: number; @@ -13,8 +13,8 @@ export class RoomObjectPlaySoundIdEvent extends RoomObjectFurnitureActionEvent { super(type, object); - this._soundId = soundId; - this._pitch = pitch; + this._soundId = soundId; + this._pitch = pitch; } public get soundId(): string diff --git a/src/nitro/room/events/RoomObjectSamplePlaybackEvent.ts b/src/nitro/room/events/RoomObjectSamplePlaybackEvent.ts index 712e4d39..13d9bb6a 100644 --- a/src/nitro/room/events/RoomObjectSamplePlaybackEvent.ts +++ b/src/nitro/room/events/RoomObjectSamplePlaybackEvent.ts @@ -1,12 +1,12 @@ import { RoomObjectEvent } from '../../../room/events/RoomObjectEvent'; import { IRoomObject } from '../../../room/object/IRoomObject'; -export class RoomObjectSamplePlaybackEvent extends RoomObjectEvent +export class RoomObjectSamplePlaybackEvent extends RoomObjectEvent { - public static ROOM_OBJECT_INITIALIZED: string = 'ROPSPE_ROOM_OBJECT_INITIALIZED'; - public static ROOM_OBJECT_DISPOSED: string = 'ROPSPE_ROOM_OBJECT_DISPOSED'; - public static PLAY_SAMPLE: string = 'ROPSPE_PLAY_SAMPLE'; - public static CHANGE_PITCH: string = 'ROPSPE_CHANGE_PITCH'; + public static ROOM_OBJECT_INITIALIZED: string = 'ROPSPE_ROOM_OBJECT_INITIALIZED'; + public static ROOM_OBJECT_DISPOSED: string = 'ROPSPE_ROOM_OBJECT_DISPOSED'; + public static PLAY_SAMPLE: string = 'ROPSPE_PLAY_SAMPLE'; + public static CHANGE_PITCH: string = 'ROPSPE_CHANGE_PITCH'; private _sampleId: number; private _pitch: number; @@ -15,8 +15,8 @@ export class RoomObjectSamplePlaybackEvent extends RoomObjectEvent { super(k, object); - this._sampleId = sampleId; - this._pitch = pitch; + this._sampleId = sampleId; + this._pitch = pitch; } public get sampleId(): number diff --git a/src/nitro/room/events/RoomObjectStateChangedEvent.ts b/src/nitro/room/events/RoomObjectStateChangedEvent.ts index 252adb88..e6946ecc 100644 --- a/src/nitro/room/events/RoomObjectStateChangedEvent.ts +++ b/src/nitro/room/events/RoomObjectStateChangedEvent.ts @@ -3,8 +3,8 @@ import { IRoomObject } from '../../../room/object/IRoomObject'; export class RoomObjectStateChangedEvent extends RoomObjectEvent { - public static STATE_CHANGE: string = 'ROSCE_STATE_CHANGE'; - public static STATE_RANDOM: string = 'ROSCE_STATE_RANDOM'; + public static STATE_CHANGE: string = 'ROSCE_STATE_CHANGE'; + public static STATE_RANDOM: string = 'ROSCE_STATE_RANDOM'; private _state: number; diff --git a/src/nitro/room/events/RoomObjectWallMouseEvent.ts b/src/nitro/room/events/RoomObjectWallMouseEvent.ts index 1b8a1820..bcfe8438 100644 --- a/src/nitro/room/events/RoomObjectWallMouseEvent.ts +++ b/src/nitro/room/events/RoomObjectWallMouseEvent.ts @@ -16,16 +16,16 @@ export class RoomObjectWallMouseEvent extends RoomObjectMouseEvent { super(type, object, eventId, altKey, ctrlKey, shiftKey, buttonDown); - this._wallLocation = new Vector3d(); - this._wallWd = new Vector3d(); - this._wallHt = new Vector3d(); + this._wallLocation = new Vector3d(); + this._wallWd = new Vector3d(); + this._wallHt = new Vector3d(); this._wallLocation.assign(wallLocation); this._wallWd.assign(wallWidth); this._wallHt.assign(wallHeight); - this._x = x; - this._y = y; + this._x = x; + this._y = y; this._direction = direction; } diff --git a/src/nitro/room/events/RoomObjectWidgetRequestEvent.ts b/src/nitro/room/events/RoomObjectWidgetRequestEvent.ts index 5f1508f0..46a02cfd 100644 --- a/src/nitro/room/events/RoomObjectWidgetRequestEvent.ts +++ b/src/nitro/room/events/RoomObjectWidgetRequestEvent.ts @@ -3,40 +3,40 @@ import { IRoomObject } from '../../../room/object/IRoomObject'; export class RoomObjectWidgetRequestEvent extends RoomObjectEvent { - public static OPEN_WIDGET: string = 'ROWRE_OPEN_WIDGET'; - public static CLOSE_WIDGET: string = 'ROWRE_CLOSE_WIDGET'; - public static OPEN_FURNI_CONTEXT_MENU: string = 'ROWRE_OPEN_FURNI_CONTEXT_MENU'; - public static CLOSE_FURNI_CONTEXT_MENU: string = 'ROWRE_CLOSE_FURNI_CONTEXT_MENU'; - public static PLACEHOLDER: string = 'ROWRE_PLACEHOLDER'; - public static CREDITFURNI: string = 'ROWRE_CREDITFURNI'; - public static STICKIE: string = 'ROWRE_STICKIE'; - public static PRESENT: string = 'ROWRE_PRESENT'; - public static TROPHY: string = 'ROWRE_TROPHY'; - public static TEASER: string = 'ROWRE_TEASER'; - public static ECOTRONBOX: string = 'ROWRE_ECOTRONBOX'; - public static DIMMER: string = 'ROWRE_DIMMER'; - public static WIDGET_REMOVE_DIMMER: string = 'ROWRE_WIDGET_REMOVE_DIMMER'; - public static CLOTHING_CHANGE: string = 'ROWRE_CLOTHING_CHANGE'; - public static JUKEBOX_PLAYLIST_EDITOR: string = 'ROWRE_JUKEBOX_PLAYLIST_EDITOR'; - public static MANNEQUIN: string = 'ROWRE_MANNEQUIN'; - public static PET_PRODUCT_MENU: string = 'ROWRE_PET_PRODUCT_MENU'; - public static GUILD_FURNI_CONTEXT_MENU: string = 'ROWRE_GUILD_FURNI_CONTEXT_MENU'; + public static OPEN_WIDGET: string = 'ROWRE_OPEN_WIDGET'; + public static CLOSE_WIDGET: string = 'ROWRE_CLOSE_WIDGET'; + public static OPEN_FURNI_CONTEXT_MENU: string = 'ROWRE_OPEN_FURNI_CONTEXT_MENU'; + public static CLOSE_FURNI_CONTEXT_MENU: string = 'ROWRE_CLOSE_FURNI_CONTEXT_MENU'; + public static PLACEHOLDER: string = 'ROWRE_PLACEHOLDER'; + public static CREDITFURNI: string = 'ROWRE_CREDITFURNI'; + public static STICKIE: string = 'ROWRE_STICKIE'; + public static PRESENT: string = 'ROWRE_PRESENT'; + public static TROPHY: string = 'ROWRE_TROPHY'; + public static TEASER: string = 'ROWRE_TEASER'; + public static ECOTRONBOX: string = 'ROWRE_ECOTRONBOX'; + public static DIMMER: string = 'ROWRE_DIMMER'; + public static WIDGET_REMOVE_DIMMER: string = 'ROWRE_WIDGET_REMOVE_DIMMER'; + public static CLOTHING_CHANGE: string = 'ROWRE_CLOTHING_CHANGE'; + public static JUKEBOX_PLAYLIST_EDITOR: string = 'ROWRE_JUKEBOX_PLAYLIST_EDITOR'; + public static MANNEQUIN: string = 'ROWRE_MANNEQUIN'; + public static PET_PRODUCT_MENU: string = 'ROWRE_PET_PRODUCT_MENU'; + public static GUILD_FURNI_CONTEXT_MENU: string = 'ROWRE_GUILD_FURNI_CONTEXT_MENU'; public static MONSTERPLANT_SEED_PLANT_CONFIRMATION_DIALOG: string = 'ROWRE_MONSTERPLANT_SEED_PLANT_CONFIRMATION_DIALOG'; - public static PURCHASABLE_CLOTHING_CONFIRMATION_DIALOG: string = 'ROWRE_PURCHASABLE_CLOTHING_CONFIRMATION_DIALOG'; - public static BACKGROUND_COLOR: string = 'ROWRE_BACKGROUND_COLOR'; - public static MYSTERYBOX_OPEN_DIALOG: string = 'ROWRE_MYSTERYBOX_OPEN_DIALOG'; - public static EFFECTBOX_OPEN_DIALOG: string = 'ROWRE_EFFECTBOX_OPEN_DIALOG'; - public static MYSTERYTROPHY_OPEN_DIALOG: string = 'ROWRE_MYSTERYTROPHY_OPEN_DIALOG'; - public static ACHIEVEMENT_RESOLUTION_OPEN: string = 'ROWRE_ACHIEVEMENT_RESOLUTION_OPEN'; - public static ACHIEVEMENT_RESOLUTION_ENGRAVING: string = 'ROWRE_ACHIEVEMENT_RESOLUTION_ENGRAVING'; - public static ACHIEVEMENT_RESOLUTION_FAILED: string = 'ROWRE_ACHIEVEMENT_RESOLUTION_FAILED'; - public static FRIEND_FURNITURE_CONFIRM: string = 'ROWRE_FRIEND_FURNITURE_CONFIRM'; - public static FRIEND_FURNITURE_ENGRAVING: string = 'ROWRE_FRIEND_FURNITURE_ENGRAVING'; - public static BADGE_DISPLAY_ENGRAVING: string = 'ROWRE_BADGE_DISPLAY_ENGRAVING'; - public static HIGH_SCORE_DISPLAY: string = 'ROWRE_HIGH_SCORE_DISPLAY'; - public static HIDE_HIGH_SCORE_DISPLAY: string = 'ROWRE_HIDE_HIGH_SCORE_DISPLAY'; - public static INERNAL_LINK: string = 'ROWRE_INTERNAL_LINK'; - public static ROOM_LINK: string = 'ROWRE_ROOM_LINK'; + public static PURCHASABLE_CLOTHING_CONFIRMATION_DIALOG: string = 'ROWRE_PURCHASABLE_CLOTHING_CONFIRMATION_DIALOG'; + public static BACKGROUND_COLOR: string = 'ROWRE_BACKGROUND_COLOR'; + public static MYSTERYBOX_OPEN_DIALOG: string = 'ROWRE_MYSTERYBOX_OPEN_DIALOG'; + public static EFFECTBOX_OPEN_DIALOG: string = 'ROWRE_EFFECTBOX_OPEN_DIALOG'; + public static MYSTERYTROPHY_OPEN_DIALOG: string = 'ROWRE_MYSTERYTROPHY_OPEN_DIALOG'; + public static ACHIEVEMENT_RESOLUTION_OPEN: string = 'ROWRE_ACHIEVEMENT_RESOLUTION_OPEN'; + public static ACHIEVEMENT_RESOLUTION_ENGRAVING: string = 'ROWRE_ACHIEVEMENT_RESOLUTION_ENGRAVING'; + public static ACHIEVEMENT_RESOLUTION_FAILED: string = 'ROWRE_ACHIEVEMENT_RESOLUTION_FAILED'; + public static FRIEND_FURNITURE_CONFIRM: string = 'ROWRE_FRIEND_FURNITURE_CONFIRM'; + public static FRIEND_FURNITURE_ENGRAVING: string = 'ROWRE_FRIEND_FURNITURE_ENGRAVING'; + public static BADGE_DISPLAY_ENGRAVING: string = 'ROWRE_BADGE_DISPLAY_ENGRAVING'; + public static HIGH_SCORE_DISPLAY: string = 'ROWRE_HIGH_SCORE_DISPLAY'; + public static HIDE_HIGH_SCORE_DISPLAY: string = 'ROWRE_HIDE_HIGH_SCORE_DISPLAY'; + public static INERNAL_LINK: string = 'ROWRE_INTERNAL_LINK'; + public static ROOM_LINK: string = 'ROWRE_ROOM_LINK'; constructor(type: string, roomObject: IRoomObject) { diff --git a/src/nitro/room/events/RoomZoomEvent.ts b/src/nitro/room/events/RoomZoomEvent.ts index caa4fc8c..1119774a 100644 --- a/src/nitro/room/events/RoomZoomEvent.ts +++ b/src/nitro/room/events/RoomZoomEvent.ts @@ -12,9 +12,9 @@ export class RoomZoomEvent extends RoomEngineEvent { super(RoomZoomEvent.ROOM_ZOOM, roomId); - this._level = level; + this._level = level; this._forceFlip = forceFlip; - this._asDelta = asDelta; + this._asDelta = asDelta; } public get level(): number diff --git a/src/nitro/room/messages/ObjectAdUpdateMessage.ts b/src/nitro/room/messages/ObjectAdUpdateMessage.ts index 537796ab..35d74cb4 100644 --- a/src/nitro/room/messages/ObjectAdUpdateMessage.ts +++ b/src/nitro/room/messages/ObjectAdUpdateMessage.ts @@ -2,8 +2,8 @@ import { RoomObjectUpdateMessage } from '../../../room/messages/RoomObjectUpdate export class ObjectAdUpdateMessage extends RoomObjectUpdateMessage { - public static IMAGE_LOADED: string = 'ROAUM_IMAGE_LOADED'; - public static IMAGE_LOADING_FAILED: string = 'ROAUM_IMAGE_FAILED'; + public static IMAGE_LOADED: string = 'ROAUM_IMAGE_LOADED'; + public static IMAGE_LOADING_FAILED: string = 'ROAUM_IMAGE_FAILED'; private _type: string; diff --git a/src/nitro/room/messages/ObjectAvatarCarryObjectUpdateMessage.ts b/src/nitro/room/messages/ObjectAvatarCarryObjectUpdateMessage.ts index 7c39d8f1..46717514 100644 --- a/src/nitro/room/messages/ObjectAvatarCarryObjectUpdateMessage.ts +++ b/src/nitro/room/messages/ObjectAvatarCarryObjectUpdateMessage.ts @@ -9,8 +9,8 @@ export class ObjectAvatarCarryObjectUpdateMessage extends ObjectStateUpdateMessa { super(); - this._itemType = itemType; - this._itemName = itemName; + this._itemType = itemType; + this._itemName = itemName; } public get itemType(): number diff --git a/src/nitro/room/messages/ObjectAvatarEffectUpdateMessage.ts b/src/nitro/room/messages/ObjectAvatarEffectUpdateMessage.ts index bed13e1c..99c82a02 100644 --- a/src/nitro/room/messages/ObjectAvatarEffectUpdateMessage.ts +++ b/src/nitro/room/messages/ObjectAvatarEffectUpdateMessage.ts @@ -9,7 +9,7 @@ export class ObjectAvatarEffectUpdateMessage extends ObjectStateUpdateMessage { super(); - this._effect = effect; + this._effect = effect; this._delayMilliseconds = delayMilliseconds; } diff --git a/src/nitro/room/messages/ObjectAvatarFigureUpdateMessage.ts b/src/nitro/room/messages/ObjectAvatarFigureUpdateMessage.ts index 0abe10db..004e0aed 100644 --- a/src/nitro/room/messages/ObjectAvatarFigureUpdateMessage.ts +++ b/src/nitro/room/messages/ObjectAvatarFigureUpdateMessage.ts @@ -11,10 +11,10 @@ export class ObjectAvatarFigureUpdateMessage extends ObjectStateUpdateMessage { super(); - this._figure = figure; - this._gender = gender; - this._subType = subType; - this._isRiding = isRiding; + this._figure = figure; + this._gender = gender; + this._subType = subType; + this._isRiding = isRiding; } public get figure(): string diff --git a/src/nitro/room/messages/ObjectAvatarPostureUpdateMessage.ts b/src/nitro/room/messages/ObjectAvatarPostureUpdateMessage.ts index 008b3f6b..b7e5ec02 100644 --- a/src/nitro/room/messages/ObjectAvatarPostureUpdateMessage.ts +++ b/src/nitro/room/messages/ObjectAvatarPostureUpdateMessage.ts @@ -9,8 +9,8 @@ export class ObjectAvatarPostureUpdateMessage extends ObjectStateUpdateMessage { super(); - this._postureType = postureType; - this._parameter = parameter; + this._postureType = postureType; + this._parameter = parameter; } public get postureType(): string diff --git a/src/nitro/room/messages/ObjectAvatarUpdateMessage.ts b/src/nitro/room/messages/ObjectAvatarUpdateMessage.ts index 4b255a2c..8144d91a 100644 --- a/src/nitro/room/messages/ObjectAvatarUpdateMessage.ts +++ b/src/nitro/room/messages/ObjectAvatarUpdateMessage.ts @@ -12,8 +12,8 @@ export class ObjectAvatarUpdateMessage extends ObjectMoveUpdateMessage super(location, targetLocation, direction); this._headDirection = headDirection; - this._canStandUp = canStandUp; - this._baseY = baseY; + this._canStandUp = canStandUp; + this._baseY = baseY; } public get headDirection(): number diff --git a/src/nitro/room/messages/ObjectDataUpdateMessage.ts b/src/nitro/room/messages/ObjectDataUpdateMessage.ts index 01e23e77..3ca56b4a 100644 --- a/src/nitro/room/messages/ObjectDataUpdateMessage.ts +++ b/src/nitro/room/messages/ObjectDataUpdateMessage.ts @@ -12,7 +12,7 @@ export class ObjectDataUpdateMessage extends RoomObjectUpdateMessage super(null, null); this._state = state; - this._data = data; + this._data = data; this._extra = extra; } diff --git a/src/nitro/room/messages/ObjectGroupBadgeUpdateMessage.ts b/src/nitro/room/messages/ObjectGroupBadgeUpdateMessage.ts index 8c66a2b1..88a870ed 100644 --- a/src/nitro/room/messages/ObjectGroupBadgeUpdateMessage.ts +++ b/src/nitro/room/messages/ObjectGroupBadgeUpdateMessage.ts @@ -11,7 +11,7 @@ export class ObjectGroupBadgeUpdateMessage extends RoomObjectUpdateMessage { super(null, null); - this._badgeId = badgeId; + this._badgeId = badgeId; this._assetName = assetName; } diff --git a/src/nitro/room/messages/ObjectModelDataUpdateMessage.ts b/src/nitro/room/messages/ObjectModelDataUpdateMessage.ts index c4052973..99ec987b 100644 --- a/src/nitro/room/messages/ObjectModelDataUpdateMessage.ts +++ b/src/nitro/room/messages/ObjectModelDataUpdateMessage.ts @@ -9,8 +9,8 @@ export class ObjectModelDataUpdateMessage extends RoomObjectUpdateMessage { super(null, null); - this._numberKey = numberKey; - this._numberValue = numberValue; + this._numberKey = numberKey; + this._numberValue = numberValue; } public get numberKey(): string diff --git a/src/nitro/room/messages/ObjectMoveUpdateMessage.ts b/src/nitro/room/messages/ObjectMoveUpdateMessage.ts index d0f6efdf..0315a685 100644 --- a/src/nitro/room/messages/ObjectMoveUpdateMessage.ts +++ b/src/nitro/room/messages/ObjectMoveUpdateMessage.ts @@ -10,8 +10,8 @@ export class ObjectMoveUpdateMessage extends RoomObjectUpdateMessage { super(location, direction); - this._targetLocation = targetLocation; - this._isSlide = isSlide; + this._targetLocation = targetLocation; + this._isSlide = isSlide; } public get targetLocation(): IVector3D diff --git a/src/nitro/room/messages/ObjectRoomColorUpdateMessage.ts b/src/nitro/room/messages/ObjectRoomColorUpdateMessage.ts index 6b6ca3a4..c8bf533b 100644 --- a/src/nitro/room/messages/ObjectRoomColorUpdateMessage.ts +++ b/src/nitro/room/messages/ObjectRoomColorUpdateMessage.ts @@ -13,10 +13,10 @@ export class ObjectRoomColorUpdateMessage extends RoomObjectUpdateMessage { super(null, null); - this._type = type; - this._color = color; - this._light = light; - this._backgroundOnly = backgroundOnly; + this._type = type; + this._color = color; + this._light = light; + this._backgroundOnly = backgroundOnly; } public get type(): string diff --git a/src/nitro/room/messages/ObjectRoomFloorHoleUpdateMessage.ts b/src/nitro/room/messages/ObjectRoomFloorHoleUpdateMessage.ts index da287088..a37401a5 100644 --- a/src/nitro/room/messages/ObjectRoomFloorHoleUpdateMessage.ts +++ b/src/nitro/room/messages/ObjectRoomFloorHoleUpdateMessage.ts @@ -16,12 +16,12 @@ export class ObjectRoomFloorHoleUpdateMessage extends RoomObjectUpdateMessage { super(null, null); - this._type = type; - this._id = id; - this._x = x; - this._y = y; - this._width = width; - this._height = height; + this._type = type; + this._id = id; + this._x = x; + this._y = y; + this._width = width; + this._height = height; } public get type(): string diff --git a/src/nitro/room/messages/ObjectRoomMapUpdateMessage.ts b/src/nitro/room/messages/ObjectRoomMapUpdateMessage.ts index 31d1d011..af1fb464 100644 --- a/src/nitro/room/messages/ObjectRoomMapUpdateMessage.ts +++ b/src/nitro/room/messages/ObjectRoomMapUpdateMessage.ts @@ -12,8 +12,8 @@ export class ObjectRoomMapUpdateMessage extends RoomObjectUpdateMessage { super(null, null); - this._type = ObjectRoomMapUpdateMessage.UPDATE_MAP; - this._mapData = mapData; + this._type = ObjectRoomMapUpdateMessage.UPDATE_MAP; + this._mapData = mapData; } public get type(): string diff --git a/src/nitro/room/messages/ObjectRoomMaskUpdateMessage.ts b/src/nitro/room/messages/ObjectRoomMaskUpdateMessage.ts index d8dd5337..a450ecdb 100644 --- a/src/nitro/room/messages/ObjectRoomMaskUpdateMessage.ts +++ b/src/nitro/room/messages/ObjectRoomMaskUpdateMessage.ts @@ -4,11 +4,11 @@ import { Vector3d } from '../../../room/utils/Vector3d'; export class ObjectRoomMaskUpdateMessage extends RoomObjectUpdateMessage { - public static ADD_MASK: string = 'RORMUM_ADD_MASK'; - public static REMOVE_MASK: string = 'RORMUM_ADD_MASK'; - public static DOOR: string = 'door'; - public static WINDOW: string = 'window'; - public static HOLE: string = 'hole'; + public static ADD_MASK: string = 'RORMUM_ADD_MASK'; + public static REMOVE_MASK: string = 'RORMUM_ADD_MASK'; + public static DOOR: string = 'door'; + public static WINDOW: string = 'window'; + public static HOLE: string = 'hole'; private _type: string; private _maskId: string; @@ -20,11 +20,11 @@ export class ObjectRoomMaskUpdateMessage extends RoomObjectUpdateMessage { super(null, null); - this._type = type; - this._maskId = maskId; - this._maskType = maskType; - this._maskLocation = maskLocation ? new Vector3d(maskLocation.x, maskLocation.y, maskLocation.z) : null; - this._maskCategory = maskCategory; + this._type = type; + this._maskId = maskId; + this._maskType = maskType; + this._maskLocation = maskLocation ? new Vector3d(maskLocation.x, maskLocation.y, maskLocation.z) : null; + this._maskCategory = maskCategory; } public get type(): string diff --git a/src/nitro/room/messages/ObjectRoomPlanePropertyUpdateMessage.ts b/src/nitro/room/messages/ObjectRoomPlanePropertyUpdateMessage.ts index e842baf5..d5152977 100644 --- a/src/nitro/room/messages/ObjectRoomPlanePropertyUpdateMessage.ts +++ b/src/nitro/room/messages/ObjectRoomPlanePropertyUpdateMessage.ts @@ -2,8 +2,8 @@ import { RoomObjectUpdateMessage } from '../../../room/messages/RoomObjectUpdate export class ObjectRoomPlanePropertyUpdateMessage extends RoomObjectUpdateMessage { - public static WALL_THICKNESS: string = 'RORPPUM_WALL_THICKNESS'; - public static FLOOR_THICKNESS: string = 'RORPVUM_FLOOR_THICKNESS'; + public static WALL_THICKNESS: string = 'RORPPUM_WALL_THICKNESS'; + public static FLOOR_THICKNESS: string = 'RORPVUM_FLOOR_THICKNESS'; private _type: string; private _value: number; @@ -12,7 +12,7 @@ export class ObjectRoomPlanePropertyUpdateMessage extends RoomObjectUpdateMessag { super(null, null); - this._type = type; + this._type = type; this._value = value; } diff --git a/src/nitro/room/messages/ObjectRoomPlaneVisibilityUpdateMessage.ts b/src/nitro/room/messages/ObjectRoomPlaneVisibilityUpdateMessage.ts index 5c91640d..17cd8609 100644 --- a/src/nitro/room/messages/ObjectRoomPlaneVisibilityUpdateMessage.ts +++ b/src/nitro/room/messages/ObjectRoomPlaneVisibilityUpdateMessage.ts @@ -2,8 +2,8 @@ import { RoomObjectUpdateMessage } from '../../../room/messages/RoomObjectUpdate export class ObjectRoomPlaneVisibilityUpdateMessage extends RoomObjectUpdateMessage { - public static WALL_VISIBILITY: string = 'RORPVUM_WALL_VISIBILITY'; - public static FLOOR_VISIBILITY: string = 'RORPVUM_FLOOR_VISIBILITY'; + public static WALL_VISIBILITY: string = 'RORPVUM_WALL_VISIBILITY'; + public static FLOOR_VISIBILITY: string = 'RORPVUM_FLOOR_VISIBILITY'; private _type: string; private _visible: boolean; @@ -12,8 +12,8 @@ export class ObjectRoomPlaneVisibilityUpdateMessage extends RoomObjectUpdateMess { super(null, null); - this._type = type; - this._visible = visible; + this._type = type; + this._visible = visible; } public get type(): string diff --git a/src/nitro/room/messages/ObjectRoomUpdateMessage.ts b/src/nitro/room/messages/ObjectRoomUpdateMessage.ts index 6f871a60..e8093c23 100644 --- a/src/nitro/room/messages/ObjectRoomUpdateMessage.ts +++ b/src/nitro/room/messages/ObjectRoomUpdateMessage.ts @@ -2,8 +2,8 @@ import { RoomObjectUpdateMessage } from '../../../room/messages/RoomObjectUpdate export class ObjectRoomUpdateMessage extends RoomObjectUpdateMessage { - public static ROOM_WALL_UPDATE: string = 'RORUM_ROOM_WALL_UPDATE'; - public static ROOM_FLOOR_UPDATE: string = 'RORUM_ROOM_FLOOR_UPDATE'; + public static ROOM_WALL_UPDATE: string = 'RORUM_ROOM_WALL_UPDATE'; + public static ROOM_FLOOR_UPDATE: string = 'RORUM_ROOM_FLOOR_UPDATE'; public static ROOM_LANDSCAPE_UPDATE: string = 'RORUM_ROOM_LANDSCAPE_UPDATE'; private _type: string; @@ -13,8 +13,8 @@ export class ObjectRoomUpdateMessage extends RoomObjectUpdateMessage { super(null, null); - this._type = type; - this._value = value; + this._type = type; + this._value = value; } public get type(): string diff --git a/src/nitro/room/messages/ObjectVisibilityUpdateMessage.ts b/src/nitro/room/messages/ObjectVisibilityUpdateMessage.ts index 1db1f5e9..45b44a1d 100644 --- a/src/nitro/room/messages/ObjectVisibilityUpdateMessage.ts +++ b/src/nitro/room/messages/ObjectVisibilityUpdateMessage.ts @@ -2,8 +2,8 @@ import { RoomObjectUpdateMessage } from '../../../room/messages/RoomObjectUpdate export class ObjectVisibilityUpdateMessage extends RoomObjectUpdateMessage { - public static ENABLED: string = 'ROVUM_ENABLED'; - public static DISABLED: string = 'ROVUM_DISABLED'; + public static ENABLED: string = 'ROVUM_ENABLED'; + public static DISABLED: string = 'ROVUM_DISABLED'; private _type: string; diff --git a/src/nitro/room/object/RoomMapData.ts b/src/nitro/room/object/RoomMapData.ts index 1f9a83f0..92fccd53 100644 --- a/src/nitro/room/object/RoomMapData.ts +++ b/src/nitro/room/object/RoomMapData.ts @@ -15,22 +15,22 @@ export class RoomMapData constructor() { - this._width = 0; - this._height = 0; - this._wallHeight = 0; - this._fixedWallsHeight = 0; - this._tileMap = []; - this._holeMap = []; - this._doors = []; - this._dimensions = { + this._width = 0; + this._height = 0; + this._wallHeight = 0; + this._fixedWallsHeight = 0; + this._tileMap = []; + this._holeMap = []; + this._doors = []; + this._dimensions = { minX: 0, maxX: 0, minY: 0, maxY: 0 }; this._restrictsDragging = false; - this._restrictedScale = 1; - this._restrictsScaling = false; + this._restrictedScale = 1; + this._restrictsScaling = false; } public get width(): number diff --git a/src/nitro/room/object/RoomObjectCategory.ts b/src/nitro/room/object/RoomObjectCategory.ts index 0acf6c46..6e932738 100644 --- a/src/nitro/room/object/RoomObjectCategory.ts +++ b/src/nitro/room/object/RoomObjectCategory.ts @@ -1,9 +1,9 @@ export class RoomObjectCategory { - public static MINIMUM: number = -2; - public static ROOM: number = 0; - public static FLOOR: number = 10; - public static WALL: number = 20; - public static UNIT: number = 100; - public static CURSOR: number = 200; + public static MINIMUM: number = -2; + public static ROOM: number = 0; + public static FLOOR: number = 10; + public static WALL: number = 20; + public static UNIT: number = 100; + public static CURSOR: number = 200; } \ No newline at end of file diff --git a/src/nitro/room/object/RoomObjectLogicType.ts b/src/nitro/room/object/RoomObjectLogicType.ts index 21024f42..bb16bef2 100644 --- a/src/nitro/room/object/RoomObjectLogicType.ts +++ b/src/nitro/room/object/RoomObjectLogicType.ts @@ -1,74 +1,74 @@ export class RoomObjectLogicType { - public static FURNITURE_BASIC = 'furniture_basic'; - public static FURNITURE_MULTISTATE = 'furniture_multistate'; - public static FURNITURE_MULTIHEIGHT = 'furniture_multiheight'; - public static FURNITURE_RANDOMSTATE = 'furniture_randomstate'; - public static FURNITURE_PLACEHOLDER = 'furniture_placeholder'; - public static FURNITURE_CREDIT = 'furniture_credit'; - public static FURNITURE_STICKIE = 'furniture_stickie'; - public static FURNITURE_PRESENT = 'furniture_present'; - public static FURNITURE_TROPHY = 'furniture_trophy'; - public static FURNITURE_ECOTRON_BOX = 'furniture_ecotron_box'; - public static FURNITURE_DICE = 'furniture_dice'; - public static FURNITURE_HOCKEY_SCORE = 'furniture_hockey_score'; - public static FURNITURE_HABBOWHEEL = 'furniture_habbowheel'; - public static FURNITURE_ONE_WAY_DOOR = 'furniture_one_way_door'; - public static FURNITURE_PLANET_SYSTEM = 'furniture_planet_system'; - public static FURNITURE_WINDOW = 'furniture_window'; - public static FURNITURE_EXTERNAL_IMAGE_WALLITEM = 'furniture_external_image_wallitem'; - public static FURNITURE_ROOMDIMMER = 'furniture_roomdimmer'; - public static FURNITURE_SOUND_MACHINE = 'furniture_sound_machine'; - public static FURNITURE_JUKEBOX = 'furniture_jukebox'; - public static FURNITURE_CRACKABLE = 'furniture_crackable'; - public static FURNITURE_PUSHABLE = 'furniture_pushable'; - public static FURNITURE_CLOTHING_CHANGE = 'furniture_clothing_change'; - public static FURNITURE_COUNTER_CLOCK = 'furniture_counter_clock'; - public static FURNITURE_SCORE = 'furniture_score'; - public static FURNITURE_ES = 'furniture_es'; - public static FURNITURE_FIREWORKS = 'furniture_fireworks'; - public static FURNITURE_SONG_DISK = 'furniture_song_disk'; - public static FURNITURE_BB = 'furniture_bb'; - public static FURNITURE_BG = 'furniture_bg'; - public static FURNITURE_WELCOME_GIFT = 'furniture_welcome_gift'; - public static FURNITURE_FLOOR_HOLE = 'furniture_floor_hole'; - public static FURNITURE_MANNEQUIN = 'furniture_mannequin'; - public static FURNITURE_GUILD_CUSTOMIZED = 'furniture_guild_customized'; - public static FURNITURE_GROUP_FORUM_TERMINAL = 'furniture_group_forum_terminal'; - public static FURNITURE_PET_CUSTOMIZATION = 'furniture_pet_customization'; - public static FURNITURE_CUCKOO_CLOCK = 'furniture_cuckoo_clock'; - public static FURNITURE_VOTE_COUNTER = 'furniture_vote_counter'; - public static FURNITURE_VOTE_MAJORITY = 'furniture_vote_majority'; - public static FURNITURE_SOUNDBLOCK = 'furniture_soundblock'; - public static FURNITURE_RANDOM_TELEPORT = 'furniture_random_teleport'; - public static FURNITURE_MONSTERPLANT_SEED = 'furniture_monsterplant_seed'; - public static FURNITURE_PURCHASABLE_CLOTHING = 'furniture_purchasable_clothing'; - public static FURNITURE_BACKGROUND_COLOR = 'furniture_background_color'; - public static FURNITURE_MYSTERYBOX = 'furniture_mysterybox'; - public static FURNITURE_EFFECTBOX = 'furniture_effectbox'; - public static FURNITURE_MYSTERYTROPHY = 'furniture_mysterytrophy'; - public static FURNITURE_ACHIEVEMENT_RESOLUTION = 'furniture_achievement_resolution'; - public static FURNITURE_LOVELOCK = 'furniture_lovelock'; - public static FURNITURE_WILDWEST_WANTED = 'furniture_wildwest_wanted'; - public static FURNITURE_HWEEN_LOVELOCK = 'furniture_hween_lovelock'; - public static FURNITURE_BADGE_DISPLAY = 'furniture_badge_display'; - public static FURNITURE_HIGH_SCORE = 'furniture_high_score'; - public static FURNITURE_INTERNAL_LINK = 'furniture_internal_link'; - public static FURNITURE_CUSTOM_STACK_HEIGHT = 'furniture_custom_stack_height'; - public static FURNITURE_YOUTUBE = 'furniture_youtube'; - public static FURNITURE_RENTABLE_SPACE = 'furniture_rentable_space'; + public static FURNITURE_BASIC = 'furniture_basic'; + public static FURNITURE_MULTISTATE = 'furniture_multistate'; + public static FURNITURE_MULTIHEIGHT = 'furniture_multiheight'; + public static FURNITURE_RANDOMSTATE = 'furniture_randomstate'; + public static FURNITURE_PLACEHOLDER = 'furniture_placeholder'; + public static FURNITURE_CREDIT = 'furniture_credit'; + public static FURNITURE_STICKIE = 'furniture_stickie'; + public static FURNITURE_PRESENT = 'furniture_present'; + public static FURNITURE_TROPHY = 'furniture_trophy'; + public static FURNITURE_ECOTRON_BOX = 'furniture_ecotron_box'; + public static FURNITURE_DICE = 'furniture_dice'; + public static FURNITURE_HOCKEY_SCORE = 'furniture_hockey_score'; + public static FURNITURE_HABBOWHEEL = 'furniture_habbowheel'; + public static FURNITURE_ONE_WAY_DOOR = 'furniture_one_way_door'; + public static FURNITURE_PLANET_SYSTEM = 'furniture_planet_system'; + public static FURNITURE_WINDOW = 'furniture_window'; + public static FURNITURE_EXTERNAL_IMAGE_WALLITEM = 'furniture_external_image_wallitem'; + public static FURNITURE_ROOMDIMMER = 'furniture_roomdimmer'; + public static FURNITURE_SOUND_MACHINE = 'furniture_sound_machine'; + public static FURNITURE_JUKEBOX = 'furniture_jukebox'; + public static FURNITURE_CRACKABLE = 'furniture_crackable'; + public static FURNITURE_PUSHABLE = 'furniture_pushable'; + public static FURNITURE_CLOTHING_CHANGE = 'furniture_clothing_change'; + public static FURNITURE_COUNTER_CLOCK = 'furniture_counter_clock'; + public static FURNITURE_SCORE = 'furniture_score'; + public static FURNITURE_ES = 'furniture_es'; + public static FURNITURE_FIREWORKS = 'furniture_fireworks'; + public static FURNITURE_SONG_DISK = 'furniture_song_disk'; + public static FURNITURE_BB = 'furniture_bb'; + public static FURNITURE_BG = 'furniture_bg'; + public static FURNITURE_WELCOME_GIFT = 'furniture_welcome_gift'; + public static FURNITURE_FLOOR_HOLE = 'furniture_floor_hole'; + public static FURNITURE_MANNEQUIN = 'furniture_mannequin'; + public static FURNITURE_GUILD_CUSTOMIZED = 'furniture_guild_customized'; + public static FURNITURE_GROUP_FORUM_TERMINAL = 'furniture_group_forum_terminal'; + public static FURNITURE_PET_CUSTOMIZATION = 'furniture_pet_customization'; + public static FURNITURE_CUCKOO_CLOCK = 'furniture_cuckoo_clock'; + public static FURNITURE_VOTE_COUNTER = 'furniture_vote_counter'; + public static FURNITURE_VOTE_MAJORITY = 'furniture_vote_majority'; + public static FURNITURE_SOUNDBLOCK = 'furniture_soundblock'; + public static FURNITURE_RANDOM_TELEPORT = 'furniture_random_teleport'; + public static FURNITURE_MONSTERPLANT_SEED = 'furniture_monsterplant_seed'; + public static FURNITURE_PURCHASABLE_CLOTHING = 'furniture_purchasable_clothing'; + public static FURNITURE_BACKGROUND_COLOR = 'furniture_background_color'; + public static FURNITURE_MYSTERYBOX = 'furniture_mysterybox'; + public static FURNITURE_EFFECTBOX = 'furniture_effectbox'; + public static FURNITURE_MYSTERYTROPHY = 'furniture_mysterytrophy'; + public static FURNITURE_ACHIEVEMENT_RESOLUTION = 'furniture_achievement_resolution'; + public static FURNITURE_LOVELOCK = 'furniture_lovelock'; + public static FURNITURE_WILDWEST_WANTED = 'furniture_wildwest_wanted'; + public static FURNITURE_HWEEN_LOVELOCK = 'furniture_hween_lovelock'; + public static FURNITURE_BADGE_DISPLAY = 'furniture_badge_display'; + public static FURNITURE_HIGH_SCORE = 'furniture_high_score'; + public static FURNITURE_INTERNAL_LINK = 'furniture_internal_link'; + public static FURNITURE_CUSTOM_STACK_HEIGHT = 'furniture_custom_stack_height'; + public static FURNITURE_YOUTUBE = 'furniture_youtube'; + public static FURNITURE_RENTABLE_SPACE = 'furniture_rentable_space'; public static FURNITURE_CHANGE_STATE_WHEN_STEP_ON = 'furniture_change_state_when_step_on'; - public static FURNITURE_VIMEO = 'furniture_vimeo'; - public static FURNITURE_EDITABLE_INTERNAL_LINK = 'furniture_editable_internal_link'; - public static FURNITURE_EDITABLE_ROOM_LINK = 'furniture_editable_room_link'; - public static FURNITURE_CRAFTING_GIZMO = 'furniture_crafting_gizmo'; - public static ROOM = 'room'; - public static USER = 'user'; - public static BOT = 'bot'; - public static RENTABLE_BOT = 'rentable_bot'; - public static PET = 'pet'; - public static TILE_CURSOR = 'tile_cursor'; - public static SELECTION_ARROW = 'selection_arrow'; - public static GAME_SNOWBALL = 'game_snowball'; - public static GAME_SNOWSPLASH = 'game_snowsplash'; + public static FURNITURE_VIMEO = 'furniture_vimeo'; + public static FURNITURE_EDITABLE_INTERNAL_LINK = 'furniture_editable_internal_link'; + public static FURNITURE_EDITABLE_ROOM_LINK = 'furniture_editable_room_link'; + public static FURNITURE_CRAFTING_GIZMO = 'furniture_crafting_gizmo'; + public static ROOM = 'room'; + public static USER = 'user'; + public static BOT = 'bot'; + public static RENTABLE_BOT = 'rentable_bot'; + public static PET = 'pet'; + public static TILE_CURSOR = 'tile_cursor'; + public static SELECTION_ARROW = 'selection_arrow'; + public static GAME_SNOWBALL = 'game_snowball'; + public static GAME_SNOWSPLASH = 'game_snowsplash'; } \ No newline at end of file diff --git a/src/nitro/room/object/RoomObjectOperationType.ts b/src/nitro/room/object/RoomObjectOperationType.ts index 655d6092..61b8b83c 100644 --- a/src/nitro/room/object/RoomObjectOperationType.ts +++ b/src/nitro/room/object/RoomObjectOperationType.ts @@ -1,15 +1,15 @@ export class RoomObjectOperationType { - public static OBJECT_UNDEFINED: string = 'OBJECT_UNDEFINED'; - public static OBJECT_MOVE: string = 'OBJECT_MOVE'; - public static OBJECT_PLACE: string = 'OBJECT_PLACE'; - public static OBJECT_ROTATE_POSITIVE: string = 'OBJECT_ROTATE_POSITIVE'; - public static OBJECT_ROTATE_NEGATIVE: string = 'OBJECT_ROTATE_NEGATIVE'; - public static OBJECT_MOVE_TO: string = 'OBJECT_MOVE_TO'; - public static OBJECT_PLACE_TO: string = 'OBJECT_PLACE_TO'; - public static OBJECT_PICKUP: string = 'OBJECT_PICKUP'; - public static OBJECT_PICKUP_BOT: string = 'OBJECT_PICKUP_BOT'; - public static OBJECT_PICKUP_PET: string = 'OBJECT_PICKUP_PET'; - public static OBJECT_EJECT: string = 'OBJECT_EJECT'; - public static OBJECT_SAVE_STUFF_DATA: string = 'OBJECT_SAVE_STUFF_DATA'; + public static OBJECT_UNDEFINED: string = 'OBJECT_UNDEFINED'; + public static OBJECT_MOVE: string = 'OBJECT_MOVE'; + public static OBJECT_PLACE: string = 'OBJECT_PLACE'; + public static OBJECT_ROTATE_POSITIVE: string = 'OBJECT_ROTATE_POSITIVE'; + public static OBJECT_ROTATE_NEGATIVE: string = 'OBJECT_ROTATE_NEGATIVE'; + public static OBJECT_MOVE_TO: string = 'OBJECT_MOVE_TO'; + public static OBJECT_PLACE_TO: string = 'OBJECT_PLACE_TO'; + public static OBJECT_PICKUP: string = 'OBJECT_PICKUP'; + public static OBJECT_PICKUP_BOT: string = 'OBJECT_PICKUP_BOT'; + public static OBJECT_PICKUP_PET: string = 'OBJECT_PICKUP_PET'; + public static OBJECT_EJECT: string = 'OBJECT_EJECT'; + public static OBJECT_SAVE_STUFF_DATA: string = 'OBJECT_SAVE_STUFF_DATA'; } \ No newline at end of file diff --git a/src/nitro/room/object/RoomObjectType.ts b/src/nitro/room/object/RoomObjectType.ts index 391cd992..dbfc3c7f 100644 --- a/src/nitro/room/object/RoomObjectType.ts +++ b/src/nitro/room/object/RoomObjectType.ts @@ -1,7 +1,7 @@ export class RoomObjectType { - public static USER: number = 1; - public static PET: number = 2; - public static BOT: number = 3; - public static RENTABLE_BOT: number = 4; + public static USER: number = 1; + public static PET: number = 2; + public static BOT: number = 3; + public static RENTABLE_BOT: number = 4; } \ No newline at end of file diff --git a/src/nitro/room/object/RoomObjectUserType.ts b/src/nitro/room/object/RoomObjectUserType.ts index 9b5906ce..e476a24d 100644 --- a/src/nitro/room/object/RoomObjectUserType.ts +++ b/src/nitro/room/object/RoomObjectUserType.ts @@ -1,11 +1,11 @@ export class RoomObjectUserType { - public static USER: string = 'user'; - public static PET: string = 'pet'; - public static BOT: string = 'bot'; - public static RENTABLE_BOT: string = 'rentable_bot'; - public static MONSTER_PLANT: string = 'monsterplant'; - public static AVATAR_TYPES: { [key: string]: number } = { 'user': 1, 'pet': 2, 'bot': 3, 'rentable_bot': 4 }; + public static USER: string = 'user'; + public static PET: string = 'pet'; + public static BOT: string = 'bot'; + public static RENTABLE_BOT: string = 'rentable_bot'; + public static MONSTER_PLANT: string = 'monsterplant'; + public static AVATAR_TYPES: { [key: string]: number } = { 'user': 1, 'pet': 2, 'bot': 3, 'rentable_bot': 4 }; public static getTypeNumber(type: string): number { diff --git a/src/nitro/room/object/RoomObjectVariable.ts b/src/nitro/room/object/RoomObjectVariable.ts index db3c790d..3819ca58 100644 --- a/src/nitro/room/object/RoomObjectVariable.ts +++ b/src/nitro/room/object/RoomObjectVariable.ts @@ -1,144 +1,144 @@ export class RoomObjectVariable { - public static OBJECT_ROOM_ID: string = 'object_room_id'; - public static OBJECT_ACCURATE_Z_VALUE: string = 'object_accurate_z_value'; - public static TILE_CURSOR_HEIGHT: string = 'tile_cursor_height'; - public static FIGURE: string = 'figure'; - public static GENDER: string = 'gender'; - public static OWN_USER: string = 'own_user'; - public static FIGURE_CAN_STAND_UP: string = 'figure_can_stand_up'; - public static FIGURE_VERTICAL_OFFSET: string = 'figure_vertical_offset'; - public static FIGURE_TALK: string = 'figure_talk'; - public static FIGURE_DANCE: string = 'figure_dance'; - public static FIGURE_SLEEP: string = 'figure_sleep'; - public static FIGURE_BLINK: string = 'figure_blink'; - public static FIGURE_EFFECT: string = 'figure_effect'; - public static FIGURE_CARRY_OBJECT: string = 'figure_carry_object'; - public static FIGURE_USE_OBJECT: string = 'figure_use_object'; - public static FIGURE_GESTURE: string = 'figure_gesture'; - public static FIGURE_POSTURE: string = 'figure_posture'; - public static FIGURE_POSTURE_PARAMETER: string = 'figure_posture_parameter'; - public static FIGURE_HIGHLIGHT_ENABLE: string = 'figure_highlight_enable'; - public static FIGURE_HIGHLIGHT: string = 'figure_highlight'; - public static FURNITURE_PURCHASER_NAME: string = 'furniture_purchaser_name'; - public static FURNITURE_PURCHASER_FIGURE: string = 'furniture_purchaser_figure'; - public static STD: string = 'std'; - public static FIGURE_SIGN: string = 'figure_sign'; - public static FIGURE_FLAT_CONTROL: string = 'figure_flat_control'; - public static FIGURE_IS_TYPING: string = 'figure_is_typing'; - public static FIGURE_IS_MUTED: string = 'figure_is_muted'; - public static FIGURE_GAINED_EXPERIENCE: string = 'figure_gained_experience'; - public static FIGURE_EXPERIENCE_TIMESTAMP: string = 'figure_experience_timestamp'; - public static FIGURE_NUMBER_VALUE: string = 'figure_number_value'; - public static FIGURE_IS_PLAYING_GAME: string = 'figure_is_playing_game'; - public static FIGURE_GUIDE_STATUS: string = 'figure_guide_status'; - public static FIGURE_EXPRESSION: string = 'figure_expression'; - public static HEAD_DIRECTION: string = 'head_direction'; - public static FURNITURE_CUSTOM_VARIABLES: string = 'furniture_custom_variables'; - public static FURNITURE_AUTOMATIC_STATE_INDEX: string = 'furniture_automatic_state_index'; - public static FURNITURE_ALWAYS_STACKABLE: string = 'furniture_always_stackable'; - public static FURNITURE_DISABLE_PICKING_ANIMATION: string = 'furniture_disable_picking_animation'; - public static FURNITURE_DATA_FORMAT: string = 'furniture_data_format'; - public static FURNITURE_UNIQUE_SERIAL_NUMBER: string = 'furniture_unique_serial_number'; - public static FURNITURE_UNIQUE_EDITION_SIZE: string = 'furniture_unique_edition_size'; - public static FURNITURE_CRACKABLE_STATE: string = 'furniture_crackable_state'; - public static FURNITURE_CRACKABLE_HITS: string = 'furniture_crackable_hits'; - public static FURNITURE_CRACKABLE_TARGET: string = 'furniture_crackable_target'; - public static FURNITURE_CREDIT_VALUE: string = 'furniture_credit_value'; - public static FURNITURE_DATA: string = 'furniture_data'; - public static FURNITURE_ITEMDATA: string = 'furniture_itemdata'; - public static FURNITURE_COLOR: string = 'furniture_color'; - public static FURNITURE_LIFT_AMOUNT: string = 'furniure_lift_amount'; - public static FURNITURE_GUILD_CUSTOMIZED_GUILD_ID: string = 'furniture_guild_customized_guild_id'; - public static FURNITURE_GUILD_CUSTOMIZED_ASSET_NAME: string = 'furniture_guild_customized_asset_name'; - public static FURNITURE_GUILD_CUSTOMIZED_COLOR_1: string = 'furniture_guild_customized_color_1'; - public static FURNITURE_GUILD_CUSTOMIZED_COLOR_2: string = 'furniture_guild_customized_color_2'; - public static FURNITURE_STATE_UPDATE_TIME: string = 'furniture_state_update_time'; - public static FURNITURE_SELECTION_DISABLED: string = 'furniture_selection_disabled'; - public static FURNITURE_SIZE_X: string = 'furniture_size_x'; - public static FURNITURE_SIZE_Y: string = 'furniture_size_y'; - public static FURNITURE_SIZE_Z: string = 'furniture_size_z'; - public static FURNITURE_CENTER_X: string = 'furniture_center_x'; - public static FURNITURE_CENTER_Y: string = 'furniture_center_y'; - public static FURNITURE_CENTER_Z: string = 'furniture_center_z'; - public static FURNITURE_ALLOWED_DIRECTIONS: string = 'furniture_allowed_directions'; - public static FURNITURE_AD_URL: string = 'furniture_ad_url'; - public static FURNITURE_TYPE_ID: string = 'furniture_type_id'; - public static FURNITURE_EXTRAS: string = 'furniture_extras'; - public static FURNITURE_EXPIRY_TIME: string = 'furniture_expiry_time'; - public static FURNITURE_EXPIRTY_TIMESTAMP: string = 'furniture_expiry_timestamp'; - public static FURNITURE_REAL_ROOM_OBJECT: string = 'furniture_real_room_object'; - public static FURNITURE_IS_STICKIE: string = 'furniture_is_stickie'; - public static FURNITURE_BRANDING_IMAGE_STATUS: string = 'furniture_branding_image_status'; - public static FURNITURE_BRANDING_IMAGE_URL: string = 'furniture_branding_image_url'; - public static FURNITURE_BRANDING_URL: string = 'furniture_branding_url'; - public static FURNITURE_BRANDING_OFFSET_X: string = 'furniture_branding_offset_x'; - public static FURNITURE_BRANDING_OFFSET_Y: string = 'furniture_branding_offset_y'; - public static FURNITURE_BRANDING_OFFSET_Z: string = 'furniture_branding_offset_z'; - public static FURNITURE_BADGE_IMAGE_STATUS: string = 'furniture_badge_image_status'; - public static FURNITURE_BADGE_ASSET_NAME: string = 'furniture_badge_asset_name'; - public static FURNITURE_BADGE_VISIBLE_IN_STATE: string = 'furniture_badge_visible_in_state'; - public static FURNITURE_ALPHA_MULTIPLIER: string = 'furniture_alpha_multiplier'; - public static FURNITURE_USAGE_POLICY: string = 'furniture_usage_policy'; - public static FURNITURE_OWNER_ID: string = 'furniture_owner_id'; - public static FURNITURE_OWNER_NAME: string = 'furniture_owner_name'; - public static FURNITURE_ROOM_BACKGROUND_COLOR_HUE: string = 'furniture_room_background_color_hue'; - public static FURNITURE_ROOM_BACKGROUND_COLOR_SATURATION: string = 'furniture_room_background_color_saturation'; - public static FURNITURE_ROOM_BACKGROUND_COLOR_LIGHTNESS: string = 'furniture_room_background_color_lightness'; - public static FURNITURE_USES_PLANE_MASK: string = 'furniture_uses_plane_mask'; - public static FURNITURE_PLANE_MASK_TYPE: string = 'furniture_plane_mask_type'; - public static FURNITURE_IS_VARIABLE_HEIGHT: string = 'furniture_is_variable_height'; - public static FURNITURE_VOTE_MAJORITY_RESULT: string = 'furniture_vote_majority_result'; - public static FURNITURE_VOTE_COUNTER_COUNT: string = 'furniture_vote_counter_count'; + public static OBJECT_ROOM_ID: string = 'object_room_id'; + public static OBJECT_ACCURATE_Z_VALUE: string = 'object_accurate_z_value'; + public static TILE_CURSOR_HEIGHT: string = 'tile_cursor_height'; + public static FIGURE: string = 'figure'; + public static GENDER: string = 'gender'; + public static OWN_USER: string = 'own_user'; + public static FIGURE_CAN_STAND_UP: string = 'figure_can_stand_up'; + public static FIGURE_VERTICAL_OFFSET: string = 'figure_vertical_offset'; + public static FIGURE_TALK: string = 'figure_talk'; + public static FIGURE_DANCE: string = 'figure_dance'; + public static FIGURE_SLEEP: string = 'figure_sleep'; + public static FIGURE_BLINK: string = 'figure_blink'; + public static FIGURE_EFFECT: string = 'figure_effect'; + public static FIGURE_CARRY_OBJECT: string = 'figure_carry_object'; + public static FIGURE_USE_OBJECT: string = 'figure_use_object'; + public static FIGURE_GESTURE: string = 'figure_gesture'; + public static FIGURE_POSTURE: string = 'figure_posture'; + public static FIGURE_POSTURE_PARAMETER: string = 'figure_posture_parameter'; + public static FIGURE_HIGHLIGHT_ENABLE: string = 'figure_highlight_enable'; + public static FIGURE_HIGHLIGHT: string = 'figure_highlight'; + public static FURNITURE_PURCHASER_NAME: string = 'furniture_purchaser_name'; + public static FURNITURE_PURCHASER_FIGURE: string = 'furniture_purchaser_figure'; + public static STD: string = 'std'; + public static FIGURE_SIGN: string = 'figure_sign'; + public static FIGURE_FLAT_CONTROL: string = 'figure_flat_control'; + public static FIGURE_IS_TYPING: string = 'figure_is_typing'; + public static FIGURE_IS_MUTED: string = 'figure_is_muted'; + public static FIGURE_GAINED_EXPERIENCE: string = 'figure_gained_experience'; + public static FIGURE_EXPERIENCE_TIMESTAMP: string = 'figure_experience_timestamp'; + public static FIGURE_NUMBER_VALUE: string = 'figure_number_value'; + public static FIGURE_IS_PLAYING_GAME: string = 'figure_is_playing_game'; + public static FIGURE_GUIDE_STATUS: string = 'figure_guide_status'; + public static FIGURE_EXPRESSION: string = 'figure_expression'; + public static HEAD_DIRECTION: string = 'head_direction'; + public static FURNITURE_CUSTOM_VARIABLES: string = 'furniture_custom_variables'; + public static FURNITURE_AUTOMATIC_STATE_INDEX: string = 'furniture_automatic_state_index'; + public static FURNITURE_ALWAYS_STACKABLE: string = 'furniture_always_stackable'; + public static FURNITURE_DISABLE_PICKING_ANIMATION: string = 'furniture_disable_picking_animation'; + public static FURNITURE_DATA_FORMAT: string = 'furniture_data_format'; + public static FURNITURE_UNIQUE_SERIAL_NUMBER: string = 'furniture_unique_serial_number'; + public static FURNITURE_UNIQUE_EDITION_SIZE: string = 'furniture_unique_edition_size'; + public static FURNITURE_CRACKABLE_STATE: string = 'furniture_crackable_state'; + public static FURNITURE_CRACKABLE_HITS: string = 'furniture_crackable_hits'; + public static FURNITURE_CRACKABLE_TARGET: string = 'furniture_crackable_target'; + public static FURNITURE_CREDIT_VALUE: string = 'furniture_credit_value'; + public static FURNITURE_DATA: string = 'furniture_data'; + public static FURNITURE_ITEMDATA: string = 'furniture_itemdata'; + public static FURNITURE_COLOR: string = 'furniture_color'; + public static FURNITURE_LIFT_AMOUNT: string = 'furniure_lift_amount'; + public static FURNITURE_GUILD_CUSTOMIZED_GUILD_ID: string = 'furniture_guild_customized_guild_id'; + public static FURNITURE_GUILD_CUSTOMIZED_ASSET_NAME: string = 'furniture_guild_customized_asset_name'; + public static FURNITURE_GUILD_CUSTOMIZED_COLOR_1: string = 'furniture_guild_customized_color_1'; + public static FURNITURE_GUILD_CUSTOMIZED_COLOR_2: string = 'furniture_guild_customized_color_2'; + public static FURNITURE_STATE_UPDATE_TIME: string = 'furniture_state_update_time'; + public static FURNITURE_SELECTION_DISABLED: string = 'furniture_selection_disabled'; + public static FURNITURE_SIZE_X: string = 'furniture_size_x'; + public static FURNITURE_SIZE_Y: string = 'furniture_size_y'; + public static FURNITURE_SIZE_Z: string = 'furniture_size_z'; + public static FURNITURE_CENTER_X: string = 'furniture_center_x'; + public static FURNITURE_CENTER_Y: string = 'furniture_center_y'; + public static FURNITURE_CENTER_Z: string = 'furniture_center_z'; + public static FURNITURE_ALLOWED_DIRECTIONS: string = 'furniture_allowed_directions'; + public static FURNITURE_AD_URL: string = 'furniture_ad_url'; + public static FURNITURE_TYPE_ID: string = 'furniture_type_id'; + public static FURNITURE_EXTRAS: string = 'furniture_extras'; + public static FURNITURE_EXPIRY_TIME: string = 'furniture_expiry_time'; + public static FURNITURE_EXPIRTY_TIMESTAMP: string = 'furniture_expiry_timestamp'; + public static FURNITURE_REAL_ROOM_OBJECT: string = 'furniture_real_room_object'; + public static FURNITURE_IS_STICKIE: string = 'furniture_is_stickie'; + public static FURNITURE_BRANDING_IMAGE_STATUS: string = 'furniture_branding_image_status'; + public static FURNITURE_BRANDING_IMAGE_URL: string = 'furniture_branding_image_url'; + public static FURNITURE_BRANDING_URL: string = 'furniture_branding_url'; + public static FURNITURE_BRANDING_OFFSET_X: string = 'furniture_branding_offset_x'; + public static FURNITURE_BRANDING_OFFSET_Y: string = 'furniture_branding_offset_y'; + public static FURNITURE_BRANDING_OFFSET_Z: string = 'furniture_branding_offset_z'; + public static FURNITURE_BADGE_IMAGE_STATUS: string = 'furniture_badge_image_status'; + public static FURNITURE_BADGE_ASSET_NAME: string = 'furniture_badge_asset_name'; + public static FURNITURE_BADGE_VISIBLE_IN_STATE: string = 'furniture_badge_visible_in_state'; + public static FURNITURE_ALPHA_MULTIPLIER: string = 'furniture_alpha_multiplier'; + public static FURNITURE_USAGE_POLICY: string = 'furniture_usage_policy'; + public static FURNITURE_OWNER_ID: string = 'furniture_owner_id'; + public static FURNITURE_OWNER_NAME: string = 'furniture_owner_name'; + public static FURNITURE_ROOM_BACKGROUND_COLOR_HUE: string = 'furniture_room_background_color_hue'; + public static FURNITURE_ROOM_BACKGROUND_COLOR_SATURATION: string = 'furniture_room_background_color_saturation'; + public static FURNITURE_ROOM_BACKGROUND_COLOR_LIGHTNESS: string = 'furniture_room_background_color_lightness'; + public static FURNITURE_USES_PLANE_MASK: string = 'furniture_uses_plane_mask'; + public static FURNITURE_PLANE_MASK_TYPE: string = 'furniture_plane_mask_type'; + public static FURNITURE_IS_VARIABLE_HEIGHT: string = 'furniture_is_variable_height'; + public static FURNITURE_VOTE_MAJORITY_RESULT: string = 'furniture_vote_majority_result'; + public static FURNITURE_VOTE_COUNTER_COUNT: string = 'furniture_vote_counter_count'; public static FURNITURE_SOUNDBLOCK_RELATIVE_ANIMATION_SPEED: string = 'furniture_soundblock_relative_animation_speed'; - public static FURNITURE_MANNEQUIN_NAME: string = 'furniture_mannequin_name'; - public static FURNITURE_MANNEQUIN_GENDER: string = 'furniture_mannequin_gender'; - public static FURNITURE_MANNEQUIN_FIGURE: string = 'furniture_mannequin_figure'; - public static FURNITURE_HIGHSCORE_SCORE_TYPE: string = 'furniture_highscore_score_type'; - public static FURNITURE_HIGHSCORE_CLEAR_TYPE: string = 'furniture_highscore_clear_type'; - public static FURNITURE_HIGHSCORE_DATA_ENTRY_COUNT: string = 'furniture_highscore_data_entry_count'; - public static FURNITURE_HIGHSCORE_DATA_ENTRY_BASE_USERS_: string = 'furniture_highscore_data_entry_base_users_'; - public static FURNITURE_HIGHSCORE_DATA_ENTRY_BASE_SCORE_: string = 'furniture_highscore_data_entry_base_score_'; - public static FURNITURE_INTERNAL_LINK: string = 'furniture_internal_link'; - public static FURNITURE_CLOTHING_BOY: string = 'furniture_clothing_boy'; - public static FURNITURE_CLOTHING_GIRL: string = 'furniture_clothing_girl'; - public static FURNITURE_PLANETSYSTEM_DATA: string = 'furniture_planetsystem_data'; - public static FURNITURE_FIREWORKS_DATA: string = 'furniture_fireworks_data'; - public static PET_PALETTE_INDEX: string = 'pet_palette_index'; - public static PET_COLOR: string = 'pet_color'; - public static PET_HEAD_ONLY: string = 'pet_head_only'; - public static PET_CUSTOM_LAYER_IDS: string = 'pet_custom_layer_ids'; - public static PET_CUSTOM_PARTS_IDS: string = 'pet_custom_part_ids'; - public static PET_CUSTOM_PALETTE_IDS: string = 'pet_custom_palette_ids'; - public static PET_IS_RIDING: string = 'pet_is_riding'; - public static PET_TYPE: string = 'pet_type'; - public static PET_ALLOWED_DIRECTIONS: string = 'pet_allowed_directions'; - public static RACE: string = 'race'; - public static ROOM_MAP_DATA: string = 'room_map_data'; - public static ROOM_PLANE_MASK_XML: string = 'room_plane_mask_xml'; - public static ROOM_FLOOR_TYPE: string = 'room_floor_type'; - public static ROOM_WALL_TYPE: string = 'room_wall_type'; - public static ROOM_LANDSCAPE_TYPE: string = 'room_landscape_type'; - public static ROOM_WALL_THICKNESS: string = 'room_wall_thickness'; - public static ROOM_FLOOR_THICKNESS: string = 'room_floor_thickness'; - public static ROOM_FLOOR_HOLE_UPDATE_TIME: string = 'room_floor_hole_update_time'; - public static ROOM_FLOOR_VISIBILITY: string = 'room_floor_visibility'; - public static ROOM_WALL_VISIBILITY: string = 'room_wall_visibility'; - public static ROOM_LANDSCAPE_VISIBILITY: string = 'room_landscape_visibility'; - public static ROOM_DOOR_X: string = 'room_door_x'; - public static ROOM_DOOR_Y: string = 'room_door_y'; - public static ROOM_DOOR_Z: string = 'room_door_z'; - public static ROOM_DOOR_DIR: string = 'room_door_dir'; - public static ROOM_BACKGROUND_COLOR: string = 'room_background_color'; - public static ROOM_COLORIZE_BG_ONLY: string = 'room_colorize_bg_only'; - public static ROOM_RANDOM_SEED: string = 'room_random_seed'; - public static ROOM_WORLD_TYPE: string = 'room_world_type'; - public static ROOM_SELECTED_X: string = 'room_selected_x'; - public static ROOM_SELECTED_Y: string = 'room_selected_y'; - public static ROOM_SELECTED_Z: string = 'room_selected_z'; - public static ROOM_SELECTED_PLANE: string = 'room_selected_plane'; - public static IMAGE_QUERY_SCALE: string = 'image_query_scale'; - public static FURNITURE_FRIENDFURNI_ENGRAVING: string = 'furniture_friendfurni_engraving_type'; - public static SESSION_URL_PREFIX: string = 'session_url_prefix'; - public static SESSION_CURRENT_USER_ID: string = 'session_current_user_id'; + public static FURNITURE_MANNEQUIN_NAME: string = 'furniture_mannequin_name'; + public static FURNITURE_MANNEQUIN_GENDER: string = 'furniture_mannequin_gender'; + public static FURNITURE_MANNEQUIN_FIGURE: string = 'furniture_mannequin_figure'; + public static FURNITURE_HIGHSCORE_SCORE_TYPE: string = 'furniture_highscore_score_type'; + public static FURNITURE_HIGHSCORE_CLEAR_TYPE: string = 'furniture_highscore_clear_type'; + public static FURNITURE_HIGHSCORE_DATA_ENTRY_COUNT: string = 'furniture_highscore_data_entry_count'; + public static FURNITURE_HIGHSCORE_DATA_ENTRY_BASE_USERS_: string = 'furniture_highscore_data_entry_base_users_'; + public static FURNITURE_HIGHSCORE_DATA_ENTRY_BASE_SCORE_: string = 'furniture_highscore_data_entry_base_score_'; + public static FURNITURE_INTERNAL_LINK: string = 'furniture_internal_link'; + public static FURNITURE_CLOTHING_BOY: string = 'furniture_clothing_boy'; + public static FURNITURE_CLOTHING_GIRL: string = 'furniture_clothing_girl'; + public static FURNITURE_PLANETSYSTEM_DATA: string = 'furniture_planetsystem_data'; + public static FURNITURE_FIREWORKS_DATA: string = 'furniture_fireworks_data'; + public static PET_PALETTE_INDEX: string = 'pet_palette_index'; + public static PET_COLOR: string = 'pet_color'; + public static PET_HEAD_ONLY: string = 'pet_head_only'; + public static PET_CUSTOM_LAYER_IDS: string = 'pet_custom_layer_ids'; + public static PET_CUSTOM_PARTS_IDS: string = 'pet_custom_part_ids'; + public static PET_CUSTOM_PALETTE_IDS: string = 'pet_custom_palette_ids'; + public static PET_IS_RIDING: string = 'pet_is_riding'; + public static PET_TYPE: string = 'pet_type'; + public static PET_ALLOWED_DIRECTIONS: string = 'pet_allowed_directions'; + public static RACE: string = 'race'; + public static ROOM_MAP_DATA: string = 'room_map_data'; + public static ROOM_PLANE_MASK_XML: string = 'room_plane_mask_xml'; + public static ROOM_FLOOR_TYPE: string = 'room_floor_type'; + public static ROOM_WALL_TYPE: string = 'room_wall_type'; + public static ROOM_LANDSCAPE_TYPE: string = 'room_landscape_type'; + public static ROOM_WALL_THICKNESS: string = 'room_wall_thickness'; + public static ROOM_FLOOR_THICKNESS: string = 'room_floor_thickness'; + public static ROOM_FLOOR_HOLE_UPDATE_TIME: string = 'room_floor_hole_update_time'; + public static ROOM_FLOOR_VISIBILITY: string = 'room_floor_visibility'; + public static ROOM_WALL_VISIBILITY: string = 'room_wall_visibility'; + public static ROOM_LANDSCAPE_VISIBILITY: string = 'room_landscape_visibility'; + public static ROOM_DOOR_X: string = 'room_door_x'; + public static ROOM_DOOR_Y: string = 'room_door_y'; + public static ROOM_DOOR_Z: string = 'room_door_z'; + public static ROOM_DOOR_DIR: string = 'room_door_dir'; + public static ROOM_BACKGROUND_COLOR: string = 'room_background_color'; + public static ROOM_COLORIZE_BG_ONLY: string = 'room_colorize_bg_only'; + public static ROOM_RANDOM_SEED: string = 'room_random_seed'; + public static ROOM_WORLD_TYPE: string = 'room_world_type'; + public static ROOM_SELECTED_X: string = 'room_selected_x'; + public static ROOM_SELECTED_Y: string = 'room_selected_y'; + public static ROOM_SELECTED_Z: string = 'room_selected_z'; + public static ROOM_SELECTED_PLANE: string = 'room_selected_plane'; + public static IMAGE_QUERY_SCALE: string = 'image_query_scale'; + public static FURNITURE_FRIENDFURNI_ENGRAVING: string = 'furniture_friendfurni_engraving_type'; + public static SESSION_URL_PREFIX: string = 'session_url_prefix'; + public static SESSION_CURRENT_USER_ID: string = 'session_current_user_id'; } diff --git a/src/nitro/room/object/RoomObjectVisualizationFactory.ts b/src/nitro/room/object/RoomObjectVisualizationFactory.ts index 8f782e78..e268a383 100644 --- a/src/nitro/room/object/RoomObjectVisualizationFactory.ts +++ b/src/nitro/room/object/RoomObjectVisualizationFactory.ts @@ -238,7 +238,7 @@ export class RoomObjectVisualizationFactory implements IRoomObjectVisualizationF visualizationData = new FurnitureMannequinVisualizationData(); break; case RoomObjectVisualizationType.ROOM: - visualizationData = new RoomVisualizationData(); + visualizationData = new RoomVisualizationData(); break; case RoomObjectVisualizationType.USER: case RoomObjectVisualizationType.BOT: diff --git a/src/nitro/room/object/RoomObjectVisualizationType.ts b/src/nitro/room/object/RoomObjectVisualizationType.ts index 48572465..175bc81a 100644 --- a/src/nitro/room/object/RoomObjectVisualizationType.ts +++ b/src/nitro/room/object/RoomObjectVisualizationType.ts @@ -1,39 +1,39 @@ export class RoomObjectVisualizationType { - public static FURNITURE_STATIC = 'furniture_static'; - public static FURNITURE_ANIMATED = 'furniture_animated'; - public static FURNITURE_RESETTING_ANIMATED = 'furniture_resetting_animated'; - public static FURNITURE_POSTER = 'furniture_poster'; - public static FURNITURE_EXTERNAL_IMAGE = 'furniture_external_image'; - public static FURNITURE_HABBOWHEEL = 'furniture_habbowheel'; - public static FURNITURE_VAL_RANDOMIZER = 'furniture_val_randomizer'; - public static FURNITURE_BOTTLE = 'furniture_bottle'; - public static FURNITURE_PLANET_SYSTEM = 'furniture_planet_system'; - public static FURNITURE_QUEUE_TILE = 'furniture_queue_tile'; - public static FURNITURE_PARTY_BEAMER = 'furniture_party_beamer'; - public static FURNITURE_CUBOID = 'furniture_cuboid'; - public static FURNITURE_GIFT_WRAPPED = 'furniture_gift_wrapped'; + public static FURNITURE_STATIC = 'furniture_static'; + public static FURNITURE_ANIMATED = 'furniture_animated'; + public static FURNITURE_RESETTING_ANIMATED = 'furniture_resetting_animated'; + public static FURNITURE_POSTER = 'furniture_poster'; + public static FURNITURE_EXTERNAL_IMAGE = 'furniture_external_image'; + public static FURNITURE_HABBOWHEEL = 'furniture_habbowheel'; + public static FURNITURE_VAL_RANDOMIZER = 'furniture_val_randomizer'; + public static FURNITURE_BOTTLE = 'furniture_bottle'; + public static FURNITURE_PLANET_SYSTEM = 'furniture_planet_system'; + public static FURNITURE_QUEUE_TILE = 'furniture_queue_tile'; + public static FURNITURE_PARTY_BEAMER = 'furniture_party_beamer'; + public static FURNITURE_CUBOID = 'furniture_cuboid'; + public static FURNITURE_GIFT_WRAPPED = 'furniture_gift_wrapped'; public static FURNITURE_GIFT_WRAPPED_FIREWORKS = 'furniture_gift_wrapped_fireworks'; - public static FURNITURE_COUNTER_CLOCK = 'furniture_counter_clock'; - public static FURNITURE_WATER_AREA = 'furniture_water_area'; - public static FURNITURE_SCORE_BOARD = 'furniture_score_board'; - public static FURNITURE_FIREWORKS = 'furniture_fireworks'; - public static FURNITURE_BB = 'furniture_bb'; - public static FURNITURE_BG = 'furniture_bg'; - public static FURNITURE_STICKIE = 'furniture_stickie'; - public static FURNITURE_MANNEQUIN = 'furniture_mannequin'; - public static FURNITURE_GUILD_CUSTOMIZED = 'furniture_guild_customized'; - public static FURNITURE_GUILD_ISOMETRIC_BADGE = 'furniture_guild_isometric_badge'; - public static FURNITURE_VOTE_COUNTER = 'furniture_vote_counter'; - public static FURNITURE_VOTE_MAJORITY = 'furniture_vote_majority'; - public static FURNITURE_SOUNDBLOCK = 'furniture_soundblock'; - public static FURNITURE_BADGE_DISPLAY = 'furniture_badge_display'; - public static FURNITURE_YOUTUBE = 'furniture_youtube'; - public static FURNITURE_BUILDER_PLACEHOLDER = 'furniture_builder_placeholder'; - public static ROOM = 'room'; - public static USER = 'user'; - public static PET_ANIMATED = 'pet_animated'; - public static BOT = 'bot'; - public static RENTABLE_BOT = 'rentable_bot'; - public static TILE_CURSOR = 'tile_cursor'; + public static FURNITURE_COUNTER_CLOCK = 'furniture_counter_clock'; + public static FURNITURE_WATER_AREA = 'furniture_water_area'; + public static FURNITURE_SCORE_BOARD = 'furniture_score_board'; + public static FURNITURE_FIREWORKS = 'furniture_fireworks'; + public static FURNITURE_BB = 'furniture_bb'; + public static FURNITURE_BG = 'furniture_bg'; + public static FURNITURE_STICKIE = 'furniture_stickie'; + public static FURNITURE_MANNEQUIN = 'furniture_mannequin'; + public static FURNITURE_GUILD_CUSTOMIZED = 'furniture_guild_customized'; + public static FURNITURE_GUILD_ISOMETRIC_BADGE = 'furniture_guild_isometric_badge'; + public static FURNITURE_VOTE_COUNTER = 'furniture_vote_counter'; + public static FURNITURE_VOTE_MAJORITY = 'furniture_vote_majority'; + public static FURNITURE_SOUNDBLOCK = 'furniture_soundblock'; + public static FURNITURE_BADGE_DISPLAY = 'furniture_badge_display'; + public static FURNITURE_YOUTUBE = 'furniture_youtube'; + public static FURNITURE_BUILDER_PLACEHOLDER = 'furniture_builder_placeholder'; + public static ROOM = 'room'; + public static USER = 'user'; + public static PET_ANIMATED = 'pet_animated'; + public static BOT = 'bot'; + public static RENTABLE_BOT = 'rentable_bot'; + public static TILE_CURSOR = 'tile_cursor'; } \ No newline at end of file diff --git a/src/nitro/room/object/RoomPlaneBitmapMaskData.ts b/src/nitro/room/object/RoomPlaneBitmapMaskData.ts index baf6511b..a697aa70 100644 --- a/src/nitro/room/object/RoomPlaneBitmapMaskData.ts +++ b/src/nitro/room/object/RoomPlaneBitmapMaskData.ts @@ -3,8 +3,8 @@ import { Vector3d } from '../../../room/utils/Vector3d'; export class RoomPlaneBitmapMaskData { - public static WINDOW: string = 'window'; - public static HOLE: string = 'hole'; + public static WINDOW: string = 'window'; + public static HOLE: string = 'hole'; private _loc: Vector3d; private _type: string; @@ -12,9 +12,9 @@ export class RoomPlaneBitmapMaskData constructor(type: string, loc: IVector3D, category: string) { - this.type = type; - this.loc = loc; - this.category = category; + this.type = type; + this.loc = loc; + this.category = category; } public get loc(): IVector3D diff --git a/src/nitro/room/object/RoomPlaneBitmapMaskParser.ts b/src/nitro/room/object/RoomPlaneBitmapMaskParser.ts index e763fdc3..659ab970 100644 --- a/src/nitro/room/object/RoomPlaneBitmapMaskParser.ts +++ b/src/nitro/room/object/RoomPlaneBitmapMaskParser.ts @@ -93,9 +93,9 @@ export class RoomPlaneBitmapMaskParser { if(!mask) continue; - const type = this.getMaskType(mask); - const category = this.getMaskCategory(mask); - const location = this.getMaskLocation(mask); + const type = this.getMaskType(mask); + const category = this.getMaskCategory(mask); + const location = this.getMaskLocation(mask); if(type && category && location) { diff --git a/src/nitro/room/object/RoomPlaneData.ts b/src/nitro/room/object/RoomPlaneData.ts index 7efde482..87804678 100644 --- a/src/nitro/room/object/RoomPlaneData.ts +++ b/src/nitro/room/object/RoomPlaneData.ts @@ -4,11 +4,11 @@ import { RoomPlaneMaskData } from './RoomPlaneMaskData'; export class RoomPlaneData { - public static PLANE_UNDEFINED: number = 0; - public static PLANE_FLOOR: number = 1; - public static PLANE_WALL: number = 2; - public static PLANE_LANDSCAPE: number = 3; - public static PLANE_BILLBOARD: number = 4; + public static PLANE_UNDEFINED: number = 0; + public static PLANE_FLOOR: number = 1; + public static PLANE_WALL: number = 2; + public static PLANE_LANDSCAPE: number = 3; + public static PLANE_BILLBOARD: number = 4; private _type: number = 0; private _loc: Vector3d = null; diff --git a/src/nitro/room/object/RoomPlaneMaskData.ts b/src/nitro/room/object/RoomPlaneMaskData.ts index b06eae26..7baf59cf 100644 --- a/src/nitro/room/object/RoomPlaneMaskData.ts +++ b/src/nitro/room/object/RoomPlaneMaskData.ts @@ -7,10 +7,10 @@ constructor(k: number, _arg_2: number, _arg_3: number, _arg_4: number) { - this._leftSideLoc = k; - this._rightSideLoc = _arg_2; - this._leftSideLength = _arg_3; - this._rightSideLength = _arg_4; + this._leftSideLoc = k; + this._rightSideLoc = _arg_2; + this._leftSideLength = _arg_3; + this._rightSideLength = _arg_4; } public get leftSideLoc(): number diff --git a/src/nitro/room/object/RoomPlaneParser.ts b/src/nitro/room/object/RoomPlaneParser.ts index 9f3aae4d..1ef9e3f6 100644 --- a/src/nitro/room/object/RoomPlaneParser.ts +++ b/src/nitro/room/object/RoomPlaneParser.ts @@ -8,12 +8,12 @@ import { RoomWallData } from './RoomWallData'; export class RoomPlaneParser { - private static FLOOR_THICKNESS: number = 0.25; - private static WALL_THICKNESS: number = 0.25; - private static MAX_WALL_ADDITIONAL_HEIGHT: number = 20; + private static FLOOR_THICKNESS: number = 0.25; + private static WALL_THICKNESS: number = 0.25; + private static MAX_WALL_ADDITIONAL_HEIGHT: number = 20; - public static TILE_BLOCKED: number = -110; - public static TILE_HOLE: number = -100; + public static TILE_BLOCKED: number = -110; + public static TILE_HOLE: number = -100; private _tileMatrix: number[][]; private _tileMatrixOriginal: number[][]; @@ -415,25 +415,25 @@ export class RoomPlaneParser if(height < 0) height = 0; - this._tileMatrix = []; - this._tileMatrixOriginal = []; - this._floorHoleMatrix = []; + this._tileMatrix = []; + this._tileMatrixOriginal = []; + this._floorHoleMatrix = []; let y = 0; while(y < height) { - const tileMatrix = []; - const tileMatrixOriginal = []; - const floorHoleMatrix = []; + const tileMatrix = []; + const tileMatrixOriginal = []; + const floorHoleMatrix = []; let x = 0; while(x < width) { - tileMatrix[x] = RoomPlaneParser.TILE_BLOCKED; - tileMatrixOriginal[x] = RoomPlaneParser.TILE_BLOCKED; - floorHoleMatrix[x] = false; + tileMatrix[x] = RoomPlaneParser.TILE_BLOCKED; + tileMatrixOriginal[x] = RoomPlaneParser.TILE_BLOCKED; + floorHoleMatrix[x] = false; x++; } @@ -445,12 +445,12 @@ export class RoomPlaneParser y++; } - this._width = width; - this._height = height; - this._minX = this._width; - this._maxX = -1; - this._minY = this._height; - this._maxY = -1; + this._width = width; + this._height = height; + this._minX = this._width; + this._maxX = -1; + this._minY = this._height; + this._maxY = -1; return true; } @@ -1228,10 +1228,10 @@ export class RoomPlaneParser this.resetFloorHoles(); - const width = data.width; - const height = data.height; - const wallHeight = data.wallHeight; - const fixedWallsHeight = data.fixedWallsHeight; + const width = data.width; + const height = data.height; + const wallHeight = data.wallHeight; + const fixedWallsHeight = data.fixedWallsHeight; this.initializeTileMap(width, height); @@ -1279,10 +1279,10 @@ export class RoomPlaneParser this.initializeHoleMap(); } - this.wallHeight = wallHeight; - this.restrictsDragging = data.restrictsDragging; - this.restrictsScaling = data.restrictsScaling; - this.restrictedScale = data.restrictedScale; + this.wallHeight = wallHeight; + this.restrictsDragging = data.restrictsDragging; + this.restrictsScaling = data.restrictsScaling; + this.restrictedScale = data.restrictedScale; this.initializeFromTileData(fixedWallsHeight); @@ -1304,24 +1304,24 @@ export class RoomPlaneParser { const data = new RoomMapData(); - data.width = this._width; - data.height = this._height; - data.wallHeight = this._wallHeight; - data.fixedWallsHeight = this._fixedWallHeight; - data.dimensions.minX = this.minX; - data.dimensions.maxX = this.maxX; - data.dimensions.minY = this.minY; - data.dimensions.maxY = this.maxY; - data.restrictsDragging = this.restrictsDragging; - data.restrictsScaling = this.restrictsScaling; - data.restrictedScale = this.restrictedScale; + data.width = this._width; + data.height = this._height; + data.wallHeight = this._wallHeight; + data.fixedWallsHeight = this._fixedWallHeight; + data.dimensions.minX = this.minX; + data.dimensions.maxX = this.maxX; + data.dimensions.minY = this.minY; + data.dimensions.maxY = this.maxY; + data.restrictsDragging = this.restrictsDragging; + data.restrictsScaling = this.restrictsScaling; + data.restrictedScale = this.restrictedScale; let y = 0; while(y < this._height) { const tileRow: { height: number }[] = []; - const tileMatrix = this._tileMatrixOriginal[y]; + const tileMatrix = this._tileMatrixOriginal[y]; let x = 0; diff --git a/src/nitro/room/object/RoomWallData.ts b/src/nitro/room/object/RoomWallData.ts index 44dc5a55..3b0cdba3 100644 --- a/src/nitro/room/object/RoomWallData.ts +++ b/src/nitro/room/object/RoomWallData.ts @@ -32,17 +32,17 @@ export class RoomWallData constructor() { - this._corners = []; - this._endPoints = []; - this._directions = []; - this._lengths = []; - this._leftTurns = []; - this._borders = []; - this._hideWalls = []; - this._manuallyLeftCut = []; - this._manuallyRightCut = []; - this._addDuplicates = false; - this._count = 0; + this._corners = []; + this._endPoints = []; + this._directions = []; + this._lengths = []; + this._leftTurns = []; + this._borders = []; + this._hideWalls = []; + this._manuallyLeftCut = []; + this._manuallyRightCut = []; + this._addDuplicates = false; + this._count = 0; } public addWall(k: Point, _arg_2: number, _arg_3: number, _arg_4: boolean, _arg_5: boolean): void diff --git a/src/nitro/room/object/data/ObjectDataBase.ts b/src/nitro/room/object/data/ObjectDataBase.ts index a5cc3350..b5302950 100644 --- a/src/nitro/room/object/data/ObjectDataBase.ts +++ b/src/nitro/room/object/data/ObjectDataBase.ts @@ -12,24 +12,24 @@ export class ObjectDataBase implements IObjectData constructor() { - this._flags = 0; - this._uniqueNumber = 0; - this._uniqueSeries = 0; + this._flags = 0; + this._uniqueNumber = 0; + this._uniqueSeries = 0; } public parseWrapper(wrapper: IMessageDataWrapper): void { if((this._flags & ObjectDataFlags.UNIQUE_SET) > 0) { - this._uniqueNumber = wrapper.readInt(); - this._uniqueSeries = wrapper.readInt(); + this._uniqueNumber = wrapper.readInt(); + this._uniqueSeries = wrapper.readInt(); } } public initializeFromRoomObjectModel(model: IRoomObjectModel): void { - this._uniqueNumber = model.getValue(RoomObjectVariable.FURNITURE_UNIQUE_SERIAL_NUMBER); - this._uniqueSeries = model.getValue(RoomObjectVariable.FURNITURE_UNIQUE_EDITION_SIZE); + this._uniqueNumber = model.getValue(RoomObjectVariable.FURNITURE_UNIQUE_SERIAL_NUMBER); + this._uniqueSeries = model.getValue(RoomObjectVariable.FURNITURE_UNIQUE_EDITION_SIZE); } public writeRoomObjectModel(model: IRoomObjectModel): void diff --git a/src/nitro/room/object/data/ObjectDataFlags.ts b/src/nitro/room/object/data/ObjectDataFlags.ts index bbcd44b2..5d5a1199 100644 --- a/src/nitro/room/object/data/ObjectDataFlags.ts +++ b/src/nitro/room/object/data/ObjectDataFlags.ts @@ -1,4 +1,4 @@ export class ObjectDataFlags { - public static UNIQUE_SET = 256; + public static UNIQUE_SET = 256; } \ No newline at end of file diff --git a/src/nitro/room/object/data/ObjectDataKey.ts b/src/nitro/room/object/data/ObjectDataKey.ts index ea5bd0b2..eff1160c 100644 --- a/src/nitro/room/object/data/ObjectDataKey.ts +++ b/src/nitro/room/object/data/ObjectDataKey.ts @@ -1,11 +1,11 @@ export class ObjectDataKey { - public static LEGACY_KEY: number = 0; - public static MAP_KEY: number = 1; - public static STRING_KEY: number = 2; - public static VOTE_KEY: number = 3; - public static EMPTY_KEY: number = 4; - public static NUMBER_KEY: number = 5; + public static LEGACY_KEY: number = 0; + public static MAP_KEY: number = 1; + public static STRING_KEY: number = 2; + public static VOTE_KEY: number = 3; + public static EMPTY_KEY: number = 4; + public static NUMBER_KEY: number = 5; public static HIGHSCORE_KEY: number = 6; public static CRACKABLE_KEY: number = 7; } \ No newline at end of file diff --git a/src/nitro/room/object/data/type/CrackableDataType.ts b/src/nitro/room/object/data/type/CrackableDataType.ts index 0e32561c..e4378ea1 100644 --- a/src/nitro/room/object/data/type/CrackableDataType.ts +++ b/src/nitro/room/object/data/type/CrackableDataType.ts @@ -17,18 +17,18 @@ export class CrackableDataType extends ObjectDataBase implements IObjectData { super(); - this._state = ''; - this._hits = 0; - this._target = 0; + this._state = ''; + this._hits = 0; + this._target = 0; } public parseWrapper(wrapper: IMessageDataWrapper): void { if(!wrapper) return; - this._state = wrapper.readString(); - this._hits = wrapper.readInt(); - this._target = wrapper.readInt(); + this._state = wrapper.readString(); + this._hits = wrapper.readInt(); + this._target = wrapper.readInt(); super.parseWrapper(wrapper); } @@ -37,9 +37,9 @@ export class CrackableDataType extends ObjectDataBase implements IObjectData { super.initializeFromRoomObjectModel(model); - this._state = model.getValue(RoomObjectVariable.FURNITURE_CRACKABLE_STATE); - this._hits = model.getValue(RoomObjectVariable.FURNITURE_CRACKABLE_HITS); - this._target = model.getValue(RoomObjectVariable.FURNITURE_CRACKABLE_TARGET); + this._state = model.getValue(RoomObjectVariable.FURNITURE_CRACKABLE_STATE); + this._hits = model.getValue(RoomObjectVariable.FURNITURE_CRACKABLE_HITS); + this._target = model.getValue(RoomObjectVariable.FURNITURE_CRACKABLE_TARGET); } public writeRoomObjectModel(model: IRoomObjectModel): void diff --git a/src/nitro/room/object/data/type/HighScoreDataType.ts b/src/nitro/room/object/data/type/HighScoreDataType.ts index 39d4bf90..99167e9a 100644 --- a/src/nitro/room/object/data/type/HighScoreDataType.ts +++ b/src/nitro/room/object/data/type/HighScoreDataType.ts @@ -19,17 +19,17 @@ export class HighScoreDataType extends ObjectDataBase implements IObjectData { super(); - this._state = ''; + this._state = ''; this._scoreType = -1; this._clearType = -1; - this._entries = []; + this._entries = []; } public parseWrapper(wrapper: IMessageDataWrapper): void { if(!wrapper) return; - this._state = wrapper.readString(); + this._state = wrapper.readString(); this._scoreType = wrapper.readInt(); this._clearType = wrapper.readInt(); @@ -39,7 +39,7 @@ export class HighScoreDataType extends ObjectDataBase implements IObjectData { const data = new HighScoreData(); - data.score = wrapper.readInt(); + data.score = wrapper.readInt(); let totalUsers = wrapper.readInt(); @@ -62,7 +62,7 @@ export class HighScoreDataType extends ObjectDataBase implements IObjectData { this._scoreType = model.getValue(RoomObjectVariable.FURNITURE_HIGHSCORE_SCORE_TYPE); this._clearType = model.getValue(RoomObjectVariable.FURNITURE_HIGHSCORE_CLEAR_TYPE); - this._entries = []; + this._entries = []; const totalEntries = model.getValue(RoomObjectVariable.FURNITURE_HIGHSCORE_DATA_ENTRY_COUNT); @@ -72,8 +72,8 @@ export class HighScoreDataType extends ObjectDataBase implements IObjectData { const data = new HighScoreData(); - data.score = model.getValue(RoomObjectVariable.FURNITURE_HIGHSCORE_DATA_ENTRY_BASE_SCORE_ + i); - data.users = model.getValue(RoomObjectVariable.FURNITURE_HIGHSCORE_DATA_ENTRY_BASE_USERS_ + i); + data.score = model.getValue(RoomObjectVariable.FURNITURE_HIGHSCORE_DATA_ENTRY_BASE_SCORE_ + i); + data.users = model.getValue(RoomObjectVariable.FURNITURE_HIGHSCORE_DATA_ENTRY_BASE_USERS_ + i); this._entries.push(data); diff --git a/src/nitro/room/object/data/type/MapDataType.ts b/src/nitro/room/object/data/type/MapDataType.ts index b90dbe83..bcdaebc9 100644 --- a/src/nitro/room/object/data/type/MapDataType.ts +++ b/src/nitro/room/object/data/type/MapDataType.ts @@ -9,8 +9,8 @@ export class MapDataType extends ObjectDataBase { public static FORMAT_KEY = ObjectDataKey.MAP_KEY; - private static STATE: string = 'state'; - private static RARITY: string = 'rarity'; + private static STATE: string = 'state'; + private static RARITY: string = 'rarity'; private _data: { [index: string]: string }; diff --git a/src/nitro/room/object/data/type/VoteDataType.ts b/src/nitro/room/object/data/type/VoteDataType.ts index ff362924..eb735c4a 100644 --- a/src/nitro/room/object/data/type/VoteDataType.ts +++ b/src/nitro/room/object/data/type/VoteDataType.ts @@ -16,16 +16,16 @@ export class VoteDataType extends ObjectDataBase { super(); - this._state = ''; - this._result = 0; + this._state = ''; + this._result = 0; } public parseWrapper(wrapper: IMessageDataWrapper): void { if(!wrapper) return; - this._state = wrapper.readString(); - this._result = wrapper.readInt(); + this._state = wrapper.readString(); + this._result = wrapper.readInt(); super.parseWrapper(wrapper); } diff --git a/src/nitro/room/object/logic/MovingObjectLogic.ts b/src/nitro/room/object/logic/MovingObjectLogic.ts index 8ce77b34..c25840e3 100644 --- a/src/nitro/room/object/logic/MovingObjectLogic.ts +++ b/src/nitro/room/object/logic/MovingObjectLogic.ts @@ -22,12 +22,12 @@ export class MovingObjectLogic extends RoomObjectLogicBase { super(); - this._liftAmount = 0; + this._liftAmount = 0; - this._location = new Vector3d(); - this._locationDelta = new Vector3d(); - this._lastUpdateTime = 0; - this._changeTime = 0; + this._location = new Vector3d(); + this._locationDelta = new Vector3d(); + this._lastUpdateTime = 0; + this._changeTime = 0; } protected onDispose(): void @@ -41,8 +41,8 @@ export class MovingObjectLogic extends RoomObjectLogicBase { super.update(time); - const locationOffset = this.getLocationOffset(); - const model = this.object && this.object.model; + const locationOffset = this.getLocationOffset(); + const model = this.object && this.object.model; if(model) { diff --git a/src/nitro/room/object/logic/avatar/AvatarLogic.ts b/src/nitro/room/object/logic/avatar/AvatarLogic.ts index 133c7a1d..80d2af34 100644 --- a/src/nitro/room/object/logic/avatar/AvatarLogic.ts +++ b/src/nitro/room/object/logic/avatar/AvatarLogic.ts @@ -34,13 +34,13 @@ import { MovingObjectLogic } from '../MovingObjectLogic'; export class AvatarLogic extends MovingObjectLogic { - private static MAX_HAND_ID: number = 999999999; - private static MAX_HAND_USE_ID: number = 999; - private static EFFECT_TYPE_SPLASH: number = 28; - private static EFFECT_SPLASH_LENGTH: number = 500; - private static EFFECT_TYPE_SWIM: number = 29; - private static EFFECT_TYPE_SPLASH_DARK: number = 184; - private static EFFECT_TYPE_SWIM_DARK: number = 185; + private static MAX_HAND_ID: number = 999999999; + private static MAX_HAND_USE_ID: number = 999; + private static EFFECT_TYPE_SPLASH: number = 28; + private static EFFECT_SPLASH_LENGTH: number = 500; + private static EFFECT_TYPE_SWIM: number = 29; + private static EFFECT_TYPE_SPLASH_DARK: number = 184; + private static EFFECT_TYPE_SWIM_DARK: number = 185; private _selected: boolean; private _reportedLocation: Vector3d; @@ -63,22 +63,22 @@ export class AvatarLogic extends MovingObjectLogic { super(); - this._selected = false; - this._reportedLocation = null; - this._effectChangeTimeStamp = 0; - this._newEffect = 0; - this._blinkingStartTimestamp = Nitro.instance.time + this.randomBlinkStartTimestamp(); - this._blinkingEndTimestamp = 0; - this._talkingEndTimestamp = 0; - this._talkingPauseStartTimestamp = 0; - this._talkingPauseEndTimestamp = 0; - this._carryObjectStartTimestamp = 0; - this._carryObjectEndTimestamp = 0; - this._allowUseCarryObject = false; - this._animationEndTimestamp = 0; - this._signEndTimestamp = 0; - this._gestureEndTimestamp = 0; - this._numberValueEndTimestamp = 0; + this._selected = false; + this._reportedLocation = null; + this._effectChangeTimeStamp = 0; + this._newEffect = 0; + this._blinkingStartTimestamp = Nitro.instance.time + this.randomBlinkStartTimestamp(); + this._blinkingEndTimestamp = 0; + this._talkingEndTimestamp = 0; + this._talkingPauseStartTimestamp = 0; + this._talkingPauseEndTimestamp = 0; + this._carryObjectStartTimestamp = 0; + this._carryObjectEndTimestamp = 0; + this._allowUseCarryObject = false; + this._animationEndTimestamp = 0; + this._signEndTimestamp = 0; + this._gestureEndTimestamp = 0; + this._numberValueEndTimestamp = 0; } public getEventTypes(): string[] @@ -134,16 +134,16 @@ export class AvatarLogic extends MovingObjectLogic { model.setValue(RoomObjectVariable.FIGURE_TALK, 0); - this._talkingEndTimestamp = 0; - this._talkingPauseStartTimestamp = 0; - this._talkingPauseEndTimestamp = 0; + this._talkingEndTimestamp = 0; + this._talkingPauseStartTimestamp = 0; + this._talkingPauseEndTimestamp = 0; } else { if(!this._talkingPauseEndTimestamp && !this._talkingPauseStartTimestamp) { - this._talkingPauseStartTimestamp = time + this.randomTalkingPauseStartTimestamp(); - this._talkingPauseEndTimestamp = this._talkingPauseStartTimestamp + this.randomTalkingPauseEndTimestamp(); + this._talkingPauseStartTimestamp = time + this.randomTalkingPauseStartTimestamp(); + this._talkingPauseEndTimestamp = this._talkingPauseStartTimestamp + this.randomTalkingPauseEndTimestamp(); } else { @@ -195,8 +195,8 @@ export class AvatarLogic extends MovingObjectLogic model.setValue(RoomObjectVariable.FIGURE_USE_OBJECT, 0); this._carryObjectStartTimestamp = 0; - this._carryObjectEndTimestamp = 0; - this._allowUseCarryObject = false; + this._carryObjectEndTimestamp = 0; + this._allowUseCarryObject = false; } } @@ -219,8 +219,8 @@ export class AvatarLogic extends MovingObjectLogic { model.setValue(RoomObjectVariable.FIGURE_BLINK, 1); - this._blinkingStartTimestamp = time + this.randomBlinkStartTimestamp(); - this._blinkingEndTimestamp = time + this.randomBlinkEndTimestamp(); + this._blinkingStartTimestamp = time + this.randomBlinkStartTimestamp(); + this._blinkingEndTimestamp = time + this.randomBlinkEndTimestamp(); } if((this._blinkingEndTimestamp > 0) && (time > this._blinkingEndTimestamp)) @@ -363,8 +363,8 @@ export class AvatarLogic extends MovingObjectLogic if(message.itemType === 0) { this._carryObjectStartTimestamp = 0; - this._carryObjectEndTimestamp = 0; - this._allowUseCarryObject = false; + this._carryObjectEndTimestamp = 0; + this._allowUseCarryObject = false; } else { @@ -372,13 +372,13 @@ export class AvatarLogic extends MovingObjectLogic if(message.itemType < AvatarLogic.MAX_HAND_ID) { - this._carryObjectEndTimestamp = 0; - this._allowUseCarryObject = message.itemType <= AvatarLogic.MAX_HAND_USE_ID; + this._carryObjectEndTimestamp = 0; + this._allowUseCarryObject = message.itemType <= AvatarLogic.MAX_HAND_USE_ID; } else { - this._carryObjectEndTimestamp = this._carryObjectStartTimestamp + 1500; - this._allowUseCarryObject = false; + this._carryObjectEndTimestamp = this._carryObjectStartTimestamp + 1500; + this._allowUseCarryObject = false; } } @@ -418,8 +418,8 @@ export class AvatarLogic extends MovingObjectLogic if(message instanceof ObjectAvatarSelectedMessage) { - this._selected = message.selected; - this._reportedLocation = null; + this._selected = message.selected; + this._reportedLocation = null; return; } @@ -437,19 +437,19 @@ export class AvatarLogic extends MovingObjectLogic if(effect === AvatarLogic.EFFECT_TYPE_SPLASH) { this._effectChangeTimeStamp = (Nitro.instance.time + AvatarLogic.EFFECT_SPLASH_LENGTH); - this._newEffect = AvatarLogic.EFFECT_TYPE_SWIM; + this._newEffect = AvatarLogic.EFFECT_TYPE_SWIM; } else if(effect === AvatarLogic.EFFECT_TYPE_SPLASH_DARK) { this._effectChangeTimeStamp = (Nitro.instance.time + AvatarLogic.EFFECT_SPLASH_LENGTH); - this._newEffect = AvatarLogic.EFFECT_TYPE_SWIM_DARK; + this._newEffect = AvatarLogic.EFFECT_TYPE_SWIM_DARK; } else if(model.getValue(RoomObjectVariable.FIGURE_EFFECT) === AvatarLogic.EFFECT_TYPE_SWIM) { this._effectChangeTimeStamp = (Nitro.instance.time + AvatarLogic.EFFECT_SPLASH_LENGTH); - this._newEffect = effect; + this._newEffect = effect; effect = AvatarLogic.EFFECT_TYPE_SPLASH; } @@ -457,7 +457,7 @@ export class AvatarLogic extends MovingObjectLogic else if(model.getValue(RoomObjectVariable.FIGURE_EFFECT) === AvatarLogic.EFFECT_TYPE_SWIM_DARK) { this._effectChangeTimeStamp = (Nitro.instance.time + AvatarLogic.EFFECT_SPLASH_LENGTH); - this._newEffect = effect; + this._newEffect = effect; effect = AvatarLogic.EFFECT_TYPE_SPLASH_DARK; } @@ -470,7 +470,7 @@ export class AvatarLogic extends MovingObjectLogic else { this._effectChangeTimeStamp = (Nitro.instance.time + delay); - this._newEffect = effect; + this._newEffect = effect; return; } diff --git a/src/nitro/room/object/logic/furniture/FurnitureChangeStateWhenStepOnLogic.ts b/src/nitro/room/object/logic/furniture/FurnitureChangeStateWhenStepOnLogic.ts index 483fa570..2ca21e1e 100644 --- a/src/nitro/room/object/logic/furniture/FurnitureChangeStateWhenStepOnLogic.ts +++ b/src/nitro/room/object/logic/furniture/FurnitureChangeStateWhenStepOnLogic.ts @@ -30,13 +30,13 @@ export class FurnitureChangeStateWhenStepOnLogic extends FurnitureLogic { if(!event || !this.object) return; - const location = this.object.getLocation(); - const targetLocation = event.targetLocation; + const location = this.object.getLocation(); + const targetLocation = event.targetLocation; if(!targetLocation) return; - let sizeX = this.object.model.getValue(RoomObjectVariable.FURNITURE_SIZE_X); - let sizeY = this.object.model.getValue(RoomObjectVariable.FURNITURE_SIZE_Y); + let sizeX = this.object.model.getValue(RoomObjectVariable.FURNITURE_SIZE_X); + let sizeY = this.object.model.getValue(RoomObjectVariable.FURNITURE_SIZE_Y); const direction = (((Math.floor(this.object.getDirection().x) + 45) % 360) / 90); diff --git a/src/nitro/room/object/logic/furniture/FurnitureDiceLogic.ts b/src/nitro/room/object/logic/furniture/FurnitureDiceLogic.ts index 7fed860e..15c3a38b 100644 --- a/src/nitro/room/object/logic/furniture/FurnitureDiceLogic.ts +++ b/src/nitro/room/object/logic/furniture/FurnitureDiceLogic.ts @@ -14,8 +14,8 @@ export class FurnitureDiceLogic extends FurnitureLogic { super(); - this._noTags = false; - this._noTagsLastStateActivate = false; + this._noTags = false; + this._noTagsLastStateActivate = false; } public getEventTypes(): string[] diff --git a/src/nitro/room/object/logic/furniture/FurnitureEditableInternalLinkLogic.ts b/src/nitro/room/object/logic/furniture/FurnitureEditableInternalLinkLogic.ts index 3360fef8..ef4290de 100644 --- a/src/nitro/room/object/logic/furniture/FurnitureEditableInternalLinkLogic.ts +++ b/src/nitro/room/object/logic/furniture/FurnitureEditableInternalLinkLogic.ts @@ -16,7 +16,7 @@ export class FurnitureEditableInternalLinkLogic extends FurnitureLogic super(); this._showStateOnceRendered = false; - this._updateCount = 0; + this._updateCount = 0; } public getEventTypes(): string[] diff --git a/src/nitro/room/object/logic/furniture/FurnitureFloorHoleLogic.ts b/src/nitro/room/object/logic/furniture/FurnitureFloorHoleLogic.ts index 2bf38bb5..9566082f 100644 --- a/src/nitro/room/object/logic/furniture/FurnitureFloorHoleLogic.ts +++ b/src/nitro/room/object/logic/furniture/FurnitureFloorHoleLogic.ts @@ -16,8 +16,8 @@ export class FurnitureFloorHoleLogic extends FurnitureMultiStateLogic { super(); - this._currentState = -1; - this._currentLocation = null; + this._currentState = -1; + this._currentLocation = null; } public getEventTypes(): string[] diff --git a/src/nitro/room/object/logic/furniture/FurnitureGuildCustomizedLogic.ts b/src/nitro/room/object/logic/furniture/FurnitureGuildCustomizedLogic.ts index ff2ff8f6..104544ff 100644 --- a/src/nitro/room/object/logic/furniture/FurnitureGuildCustomizedLogic.ts +++ b/src/nitro/room/object/logic/furniture/FurnitureGuildCustomizedLogic.ts @@ -11,10 +11,10 @@ import { FurnitureMultiStateLogic } from './FurnitureMultiStateLogic'; export class FurnitureGuildCustomizedLogic extends FurnitureMultiStateLogic { - public static GROUPID_KEY: number = 1; - public static BADGE_KEY: number = 2; - public static COLOR1_KEY: number = 3; - public static COLOR2_KEY: number = 4; + public static GROUPID_KEY: number = 1; + public static BADGE_KEY: number = 2; + public static COLOR1_KEY: number = 3; + public static COLOR2_KEY: number = 4; public getEventTypes(): string[] { diff --git a/src/nitro/room/object/logic/furniture/FurnitureIceStormLogic.ts b/src/nitro/room/object/logic/furniture/FurnitureIceStormLogic.ts index 56a19b5a..1205565b 100644 --- a/src/nitro/room/object/logic/furniture/FurnitureIceStormLogic.ts +++ b/src/nitro/room/object/logic/furniture/FurnitureIceStormLogic.ts @@ -12,8 +12,8 @@ export class FurnitureIceStormLogic extends FurnitureMultiStateLogic { super(); - this._nextState = 0; - this._nextStateTimestamp = 0; + this._nextState = 0; + this._nextStateTimestamp = 0; } public update(totalTimeRunning: number): void @@ -44,7 +44,7 @@ export class FurnitureIceStormLogic extends FurnitureMultiStateLogic if(!message) return; const state = message.state / 1000; - const time = message.state % 1000; + const time = message.state % 1000; if(!time) { @@ -58,8 +58,8 @@ export class FurnitureIceStormLogic extends FurnitureMultiStateLogic } else { - this._nextState = state; - this._nextStateTimestamp = this.time + time; + this._nextState = state; + this._nextStateTimestamp = this.time + time; } } } \ No newline at end of file diff --git a/src/nitro/room/object/logic/furniture/FurnitureLogic.ts b/src/nitro/room/object/logic/furniture/FurnitureLogic.ts index f15c0571..46ad42fb 100644 --- a/src/nitro/room/object/logic/furniture/FurnitureLogic.ts +++ b/src/nitro/room/object/logic/furniture/FurnitureLogic.ts @@ -22,8 +22,8 @@ import { MovingObjectLogic } from '../MovingObjectLogic'; export class FurnitureLogic extends MovingObjectLogic { - private static BOUNCING_STEPS: number = -1; - private static BOUNCING_Z: number = -1; + private static BOUNCING_STEPS: number = -1; + private static BOUNCING_Z: number = -1; private _sizeX: number; private _sizeY: number; @@ -45,21 +45,21 @@ export class FurnitureLogic extends MovingObjectLogic { super(); - this._sizeX = 0; - this._sizeY = 0; - this._sizeZ = 0; - this._centerX = 0; - this._centerY = 0; - this._centerZ = 0; + this._sizeX = 0; + this._sizeY = 0; + this._sizeZ = 0; + this._centerX = 0; + this._centerY = 0; + this._centerZ = 0; - this._directions = []; + this._directions = []; - this._mouseOver = false; + this._mouseOver = false; - this._locationOffset = new Vector3d(); - this._bouncingStep = 0; - this._storedRotateMessage = null; - this._directionInitialized = false; + this._locationOffset = new Vector3d(); + this._bouncingStep = 0; + this._storedRotateMessage = null; + this._directionInitialized = false; if(FurnitureLogic.BOUNCING_STEPS === -1) { @@ -111,9 +111,9 @@ export class FurnitureLogic extends MovingObjectLogic this._sizeY = dimensions.y; this._sizeZ = dimensions.z; - this._centerX = (this._sizeX / 2); - this._centerY = (this._sizeY / 2); - this._centerZ = (this._sizeZ / 2); + this._centerX = (this._sizeX / 2); + this._centerY = (this._sizeY / 2); + this._centerZ = (this._sizeZ / 2); } const directions = asset.logic.model.directions; @@ -149,8 +149,8 @@ export class FurnitureLogic extends MovingObjectLogic protected onDispose(): void { - this._storedRotateMessage = null; - this._directions = null; + this._storedRotateMessage = null; + this._directions = null; super.onDispose(); } @@ -216,14 +216,14 @@ export class FurnitureLogic extends MovingObjectLogic if(!(message instanceof ObjectMoveUpdateMessage)) { const direction = this.object.getDirection(); - const location = this.object.getLocation(); + const location = this.object.getLocation(); if((direction.x !== message.direction.x) && this._directionInitialized) { if((location.x === message.location.x) && (location.y === message.location.y) && (location.z === message.location.z)) { - this._bouncingStep = 1; - this._storedRotateMessage = new RoomObjectUpdateMessage(message.location, message.direction); + this._bouncingStep = 1; + this._storedRotateMessage = new RoomObjectUpdateMessage(message.location, message.direction); message = null; } @@ -284,10 +284,10 @@ export class FurnitureLogic extends MovingObjectLogic { const mouseEvent = new RoomObjectMouseEvent(RoomObjectMouseEvent.MOUSE_MOVE, this.object, event.eventId, event.altKey, event.ctrlKey, event.shiftKey, event.buttonDown); - mouseEvent.localX = event.localX; - mouseEvent.localY = event.localY; - mouseEvent.spriteOffsetX = event.spriteOffsetX; - mouseEvent.spriteOffsetY = event.spriteOffsetY; + mouseEvent.localX = event.localX; + mouseEvent.localY = event.localY; + mouseEvent.spriteOffsetX = event.spriteOffsetX; + mouseEvent.spriteOffsetY = event.spriteOffsetY; this.eventDispatcher.dispatchEvent(mouseEvent); } @@ -304,10 +304,10 @@ export class FurnitureLogic extends MovingObjectLogic const mouseEvent = new RoomObjectMouseEvent(RoomObjectMouseEvent.MOUSE_ENTER, this.object, event.eventId, event.altKey, event.ctrlKey, event.shiftKey, event.buttonDown); - mouseEvent.localX = event.localX; - mouseEvent.localY = event.localY; - mouseEvent.spriteOffsetX = event.spriteOffsetX; - mouseEvent.spriteOffsetY = event.spriteOffsetY; + mouseEvent.localX = event.localX; + mouseEvent.localY = event.localY; + mouseEvent.spriteOffsetX = event.spriteOffsetX; + mouseEvent.spriteOffsetY = event.spriteOffsetY; this.eventDispatcher.dispatchEvent(mouseEvent); } @@ -327,10 +327,10 @@ export class FurnitureLogic extends MovingObjectLogic const mouseEvent = new RoomObjectMouseEvent(RoomObjectMouseEvent.MOUSE_LEAVE, this.object, event.eventId, event.altKey, event.ctrlKey, event.shiftKey, event.buttonDown); - mouseEvent.localX = event.localX; - mouseEvent.localY = event.localY; - mouseEvent.spriteOffsetX = event.spriteOffsetX; - mouseEvent.spriteOffsetY = event.spriteOffsetY; + mouseEvent.localX = event.localX; + mouseEvent.localY = event.localY; + mouseEvent.spriteOffsetX = event.spriteOffsetX; + mouseEvent.spriteOffsetY = event.spriteOffsetY; this.eventDispatcher.dispatchEvent(mouseEvent); } @@ -346,10 +346,10 @@ export class FurnitureLogic extends MovingObjectLogic { const mouseEvent = new RoomObjectMouseEvent(RoomObjectMouseEvent.CLICK, this.object, event.eventId, event.altKey, event.ctrlKey, event.shiftKey, event.buttonDown); - mouseEvent.localX = event.localX; - mouseEvent.localY = event.localY; - mouseEvent.spriteOffsetX = event.spriteOffsetX; - mouseEvent.spriteOffsetY = event.spriteOffsetY; + mouseEvent.localX = event.localX; + mouseEvent.localY = event.localY; + mouseEvent.spriteOffsetX = event.spriteOffsetX; + mouseEvent.spriteOffsetY = event.spriteOffsetY; this.eventDispatcher.dispatchEvent(mouseEvent); @@ -384,8 +384,8 @@ export class FurnitureLogic extends MovingObjectLogic { if(this._bouncingStep <= 0) return null; - this._locationOffset.x = 0; - this._locationOffset.y = 0; + this._locationOffset.x = 0; + this._locationOffset.y = 0; if(this._bouncingStep <= (FurnitureLogic.BOUNCING_STEPS / 2)) { diff --git a/src/nitro/room/object/logic/furniture/FurnitureMannequinLogic.ts b/src/nitro/room/object/logic/furniture/FurnitureMannequinLogic.ts index ce5f1d76..827cde7c 100644 --- a/src/nitro/room/object/logic/furniture/FurnitureMannequinLogic.ts +++ b/src/nitro/room/object/logic/furniture/FurnitureMannequinLogic.ts @@ -7,9 +7,9 @@ import { FurnitureLogic } from './FurnitureLogic'; export class FurnitureMannequinLogic extends FurnitureLogic { - private static GENDER: string = 'GENDER'; - private static FIGURE: string = 'FIGURE'; - private static OUTFIT_NAME: string = 'OUTFIT_NAME'; + private static GENDER: string = 'GENDER'; + private static FIGURE: string = 'FIGURE'; + private static OUTFIT_NAME: string = 'OUTFIT_NAME'; public getEventTypes(): string[] { diff --git a/src/nitro/room/object/logic/furniture/FurniturePresentLogic.ts b/src/nitro/room/object/logic/furniture/FurniturePresentLogic.ts index 4e0ed98f..5212b2ae 100644 --- a/src/nitro/room/object/logic/furniture/FurniturePresentLogic.ts +++ b/src/nitro/room/object/logic/furniture/FurniturePresentLogic.ts @@ -13,10 +13,10 @@ import { FurnitureLogic } from './FurnitureLogic'; export class FurniturePresentLogic extends FurnitureLogic { - private static MESSAGE: string = 'MESSAGE'; - private static PRODUCT_CODE: string = 'PRODUCT_CODE'; - private static EXTRA_PARAM: string = 'EXTRA_PARAM'; - private static PURCHASER_NAME: string = 'PURCHASER_NAME'; + private static MESSAGE: string = 'MESSAGE'; + private static PRODUCT_CODE: string = 'PRODUCT_CODE'; + private static EXTRA_PARAM: string = 'EXTRA_PARAM'; + private static PURCHASER_NAME: string = 'PURCHASER_NAME'; private static PURCHASER_FIGURE: string = 'PURCHASER_FIGURE'; public getEventTypes(): string[] @@ -69,8 +69,8 @@ export class FurniturePresentLogic extends FurnitureLogic stuffData.initializeFromRoomObjectModel(this.object.model); - const message = stuffData.getValue(FurniturePresentLogic.MESSAGE); - const data = this.object.model.getValue(RoomObjectVariable.FURNITURE_DATA); + const message = stuffData.getValue(FurniturePresentLogic.MESSAGE); + const data = this.object.model.getValue(RoomObjectVariable.FURNITURE_DATA); if(!message && (typeof data === 'string')) { diff --git a/src/nitro/room/object/logic/furniture/FurnitureRoomBackgroundColorLogic.ts b/src/nitro/room/object/logic/furniture/FurnitureRoomBackgroundColorLogic.ts index 39268cab..42a0f6d9 100644 --- a/src/nitro/room/object/logic/furniture/FurnitureRoomBackgroundColorLogic.ts +++ b/src/nitro/room/object/logic/furniture/FurnitureRoomBackgroundColorLogic.ts @@ -73,10 +73,10 @@ export class FurnitureRoomBackgroundColorLogic extends FurnitureMultiStateLogic numberData.initializeFromRoomObjectModel(this.object.model); - const state = numberData.getValue(0); - const hue = numberData.getValue(1); - const saturation = numberData.getValue(2); - const lightness = numberData.getValue(3); + const state = numberData.getValue(0); + const hue = numberData.getValue(1); + const saturation = numberData.getValue(2); + const lightness = numberData.getValue(3); if((state > -1) && (hue > -1) && (saturation > -1) && (lightness > -1)) { diff --git a/src/nitro/room/object/logic/furniture/FurnitureRoomBrandingLogic.ts b/src/nitro/room/object/logic/furniture/FurnitureRoomBrandingLogic.ts index d102d02f..5c9a3c4d 100644 --- a/src/nitro/room/object/logic/furniture/FurnitureRoomBrandingLogic.ts +++ b/src/nitro/room/object/logic/furniture/FurnitureRoomBrandingLogic.ts @@ -13,12 +13,12 @@ import { FurnitureLogic } from './FurnitureLogic'; export class FurnitureRoomBrandingLogic extends FurnitureLogic { - public static STATE: string = 'state'; - public static IMAGEURL_KEY: string = 'imageUrl'; - public static CLICKURL_KEY: string = 'clickUrl'; - public static OFFSETX_KEY: string = 'offsetX'; - public static OFFSETY_KEY: string = 'offsetY'; - public static OFFSETZ_KEY: string = 'offsetZ'; + public static STATE: string = 'state'; + public static IMAGEURL_KEY: string = 'imageUrl'; + public static CLICKURL_KEY: string = 'clickUrl'; + public static OFFSETX_KEY: string = 'offsetX'; + public static OFFSETY_KEY: string = 'offsetY'; + public static OFFSETZ_KEY: string = 'offsetZ'; protected _disableFurnitureSelection: boolean; protected _hasClickUrl: boolean; @@ -69,8 +69,8 @@ export class FurnitureRoomBrandingLogic extends FurnitureLogic if(!isNaN(state) && (this.object.getState(0) !== state)) this.object.setState(state, 0); - const imageUrl = objectData.getValue(FurnitureRoomBrandingLogic.IMAGEURL_KEY); - const existingUrl = this.object.model.getValue(RoomObjectVariable.FURNITURE_BRANDING_IMAGE_URL); + const imageUrl = objectData.getValue(FurnitureRoomBrandingLogic.IMAGEURL_KEY); + const existingUrl = this.object.model.getValue(RoomObjectVariable.FURNITURE_BRANDING_IMAGE_URL); if(!existingUrl || (existingUrl !== imageUrl)) { @@ -144,8 +144,8 @@ export class FurnitureRoomBrandingLogic extends FurnitureLogic if(!model) return; - const imageUrl = model.getValue(RoomObjectVariable.FURNITURE_BRANDING_IMAGE_URL); - const imageStatus = model.getValue(RoomObjectVariable.FURNITURE_BRANDING_IMAGE_STATUS); + const imageUrl = model.getValue(RoomObjectVariable.FURNITURE_BRANDING_IMAGE_URL); + const imageStatus = model.getValue(RoomObjectVariable.FURNITURE_BRANDING_IMAGE_STATUS); if(!imageUrl || (imageUrl === '') || (imageStatus === 1)) return; diff --git a/src/nitro/room/object/logic/furniture/FurnitureRoomDimmerLogic.ts b/src/nitro/room/object/logic/furniture/FurnitureRoomDimmerLogic.ts index 57663855..15093042 100644 --- a/src/nitro/room/object/logic/furniture/FurnitureRoomDimmerLogic.ts +++ b/src/nitro/room/object/logic/furniture/FurnitureRoomDimmerLogic.ts @@ -88,13 +88,13 @@ export class FurnitureRoomDimmerLogic extends FurnitureLogic if(parts.length >= 5) { - const state = this.getStateFromDimmerData(data); - const presetId = parseInt(parts[1]); - const effectId = parseInt(parts[2]); - const color = parts[3]; + const state = this.getStateFromDimmerData(data); + const presetId = parseInt(parts[1]); + const effectId = parseInt(parts[2]); + const color = parts[3]; - let colorCode = parseInt(color.substr(1), 16); - let brightness = parseInt(parts[4]); + let colorCode = parseInt(color.substr(1), 16); + let brightness = parseInt(parts[4]); if(!state) { diff --git a/src/nitro/room/object/logic/furniture/FurnitureScoreLogic.ts b/src/nitro/room/object/logic/furniture/FurnitureScoreLogic.ts index 01fde8ff..42b06b3b 100644 --- a/src/nitro/room/object/logic/furniture/FurnitureScoreLogic.ts +++ b/src/nitro/room/object/logic/furniture/FurnitureScoreLogic.ts @@ -16,9 +16,9 @@ export class FurnitureScoreLogic extends FurnitureLogic { super(); - this._score = 0; - this._scoreIncreaser = 50; - this._scoreTimer = 0; + this._score = 0; + this._scoreIncreaser = 50; + this._scoreTimer = 0; } public processUpdateMessage(message: RoomObjectUpdateMessage): void diff --git a/src/nitro/room/object/logic/furniture/FurnitureVoteCounterLogic.ts b/src/nitro/room/object/logic/furniture/FurnitureVoteCounterLogic.ts index 578cbf36..78e98508 100644 --- a/src/nitro/room/object/logic/furniture/FurnitureVoteCounterLogic.ts +++ b/src/nitro/room/object/logic/furniture/FurnitureVoteCounterLogic.ts @@ -18,9 +18,9 @@ export class FurnitureVoteCounterLogic extends FurnitureMultiStateLogic { super(); - this._total = 0; - this._lastUpdate = 0; - this._interval = 33; + this._total = 0; + this._lastUpdate = 0; + this._interval = 33; } public processUpdateMessage(message: RoomObjectUpdateMessage): void diff --git a/src/nitro/room/object/logic/pet/PetLogic.ts b/src/nitro/room/object/logic/pet/PetLogic.ts index dd073460..d07af0cf 100644 --- a/src/nitro/room/object/logic/pet/PetLogic.ts +++ b/src/nitro/room/object/logic/pet/PetLogic.ts @@ -37,16 +37,16 @@ export class PetLogic extends MovingObjectLogic { super(); - this._selected = false; - this._reportedLocation = null; - this._postureIndex = 0; - this._gestureIndex = 0; - this._headDirectionDelta = 0; - this._directions = []; + this._selected = false; + this._reportedLocation = null; + this._postureIndex = 0; + this._gestureIndex = 0; + this._headDirectionDelta = 0; + this._directions = []; - this._talkingEndTimestamp = 0; - this._gestureEndTimestamp = 0; - this._expressionEndTimestamp = 0; + this._talkingEndTimestamp = 0; + this._gestureEndTimestamp = 0; + this._expressionEndTimestamp = 0; } public getEventTypes(): string[] @@ -89,8 +89,8 @@ export class PetLogic extends MovingObjectLogic if(this.eventDispatcher) this.eventDispatcher.dispatchEvent(new RoomObjectMoveEvent(RoomObjectMoveEvent.OBJECT_REMOVED, this.object)); } - this._directions = null; - this._reportedLocation = null; + this._directions = null; + this._reportedLocation = null; } public update(totalTimeRunning: number): void @@ -212,8 +212,8 @@ export class PetLogic extends MovingObjectLogic if(message instanceof ObjectAvatarSelectedMessage) { - this._selected = message.selected; - this._reportedLocation = null; + this._selected = message.selected; + this._reportedLocation = null; return; } diff --git a/src/nitro/room/object/logic/room/RoomLogic.ts b/src/nitro/room/object/logic/room/RoomLogic.ts index aed19460..d6bb4ab5 100644 --- a/src/nitro/room/object/logic/room/RoomLogic.ts +++ b/src/nitro/room/object/logic/room/RoomLogic.ts @@ -46,19 +46,19 @@ export class RoomLogic extends RoomObjectLogicBase { super(); - this._planeParser = new RoomPlaneParser(); + this._planeParser = new RoomPlaneParser(); this._planeBitmapMaskParser = new RoomPlaneBitmapMaskParser(); - this._color = 0xFFFFFF; - this._light = 0xFF; - this._originalColor = 0xFFFFFF; - this._originalLight = 0xFF; - this._targetColor = 0xFFFFFF; - this._targetLight = 0xFF; - this._colorChangedTime = 0; + this._color = 0xFFFFFF; + this._light = 0xFF; + this._originalColor = 0xFFFFFF; + this._originalLight = 0xFF; + this._targetColor = 0xFFFFFF; + this._targetLight = 0xFF; + this._colorChangedTime = 0; this._colorTransitionLength = 1500; - this._lastHoleUpdate = 0; - this._needsMapUpdate = false; - this._skipColorTransition = false; + this._lastHoleUpdate = 0; + this._needsMapUpdate = false; + this._skipColorTransition = false; } public getEventTypes(): string[] @@ -126,8 +126,8 @@ export class RoomLogic extends RoomObjectLogicBase this._planeParser.initializeFromMapData(mapData); } - this._lastHoleUpdate = 0; - this._needsMapUpdate = false; + this._lastHoleUpdate = 0; + this._needsMapUpdate = false; } } @@ -136,13 +136,13 @@ export class RoomLogic extends RoomObjectLogicBase { if(!this.object || !this._colorChangedTime) return; - let color = this._color; - let newColor = this._light; + let color = this._color; + let newColor = this._light; if((k - this._colorChangedTime) >= this._colorTransitionLength) { - color = this._targetColor; - newColor = this._targetLight; + color = this._targetColor; + newColor = this._targetLight; this._colorChangedTime = 0; } @@ -161,17 +161,17 @@ export class RoomLogic extends RoomObjectLogicBase _local_8 = (_local_8 + ((_local_11 - _local_8) * _local_13)); _local_9 = (_local_9 + ((_local_12 - _local_9) * _local_13)); - color = (((_local_7 << 16) + (_local_8 << 8)) + _local_9); - newColor = (this._originalLight + ((this._targetLight - this._originalLight) * _local_13)); + color = (((_local_7 << 16) + (_local_8 << 8)) + _local_9); + newColor = (this._originalLight + ((this._targetLight - this._originalLight) * _local_13)); - this._color = color; - this._light = newColor; + this._color = color; + this._light = newColor; } let _local_5 = ColorConverter.rgbToHSL(color); - _local_5 = ((_local_5 & 0xFFFF00) + newColor); - color = ColorConverter.hslToRGB(_local_5); + _local_5 = ((_local_5 & 0xFFFF00) + newColor); + color = ColorConverter.hslToRGB(_local_5); if(this.object.model) this.object.model.setValue(RoomObjectVariable.ROOM_BACKGROUND_COLOR, color); } @@ -250,8 +250,8 @@ export class RoomLogic extends RoomObjectLogicBase private onObjectRoomMaskUpdateMessage(message: ObjectRoomMaskUpdateMessage, _arg_2: IRoomObjectModel): void { - let maskType: string = null; - let update = false; + let maskType: string = null; + let update = false; switch(message.type) { @@ -329,7 +329,7 @@ export class RoomLogic extends RoomObjectLogicBase this._originalLight = this._light; this._targetColor = message.color; this._targetLight = message.light; - this._colorChangedTime = this.time; + this._colorChangedTime = this.time; if(this._skipColorTransition) this._colorTransitionLength = 0; @@ -376,11 +376,11 @@ export class RoomLogic extends RoomObjectLogicBase let planePosition: Point = null; - const planeLocation = this._planeParser.getPlaneLocation(planeId); - const planeLeftSide = this._planeParser.getPlaneLeftSide(planeId); - const planeRightSide = this._planeParser.getPlaneRightSide(planeId); - const planeNormalDirection = this._planeParser.getPlaneNormalDirection(planeId); - const planeType = this._planeParser.getPlaneType(planeId); + const planeLocation = this._planeParser.getPlaneLocation(planeId); + const planeLeftSide = this._planeParser.getPlaneLeftSide(planeId); + const planeRightSide = this._planeParser.getPlaneRightSide(planeId); + const planeNormalDirection = this._planeParser.getPlaneNormalDirection(planeId); + const planeType = this._planeParser.getPlaneType(planeId); if(((((planeLocation == null) || (planeLeftSide == null)) || (planeRightSide == null)) || (planeNormalDirection == null))) return; @@ -389,9 +389,9 @@ export class RoomLogic extends RoomObjectLogicBase if(((leftSideLength == 0) || (rightSideLength == 0))) return; - const screenX = event.screenX; - const screenY = event.screenY; - const screenPoint = new Point(screenX, screenY); + const screenX = event.screenX; + const screenY = event.screenY; + const screenPoint = new Point(screenX, screenY); planePosition = geometry.getPlanePosition(screenPoint, planeLocation, planeLeftSide, planeRightSide); diff --git a/src/nitro/room/object/logic/room/TileCursorLogic.ts b/src/nitro/room/object/logic/room/TileCursorLogic.ts index 19ac9ab3..309b4dfe 100644 --- a/src/nitro/room/object/logic/room/TileCursorLogic.ts +++ b/src/nitro/room/object/logic/room/TileCursorLogic.ts @@ -7,8 +7,8 @@ import { RoomObjectVariable } from '../../RoomObjectVariable'; export class TileCursorLogic extends RoomObjectLogicBase { private static CURSOR_VISIBLE_STATE: number = 0; - private static CURSOR_HIDDEN_STATE: number = 1; - private static CURSOR_HEIGHT_STATE: number = 6; + private static CURSOR_HIDDEN_STATE: number = 1; + private static CURSOR_HEIGHT_STATE: number = 6; private _lastEventId: string; private _isHidden: boolean; @@ -17,8 +17,8 @@ export class TileCursorLogic extends RoomObjectLogicBase { super(); - this._lastEventId = null; - this._isHidden = false; + this._lastEventId = null; + this._isHidden = false; } public initialize(data: IAssetData): void diff --git a/src/nitro/room/object/visualization/avatar/AvatarVisualization.ts b/src/nitro/room/object/visualization/avatar/AvatarVisualization.ts index e761affb..02c347f8 100644 --- a/src/nitro/room/object/visualization/avatar/AvatarVisualization.ts +++ b/src/nitro/room/object/visualization/avatar/AvatarVisualization.ts @@ -28,28 +28,28 @@ import { AvatarVisualizationData } from './AvatarVisualizationData'; export class AvatarVisualization extends RoomObjectSpriteVisualization implements IAvatarImageListener, IAvatarEffectListener { - private static AVATAR: string = 'avatar'; - private static FLOATING_IDLE_Z_ID: number = 1; - private static TYPING_BUBBLE_ID: number = 2; - private static EXPRESSION_ID: number = 3; - private static NUMBER_BUBBLE_ID: number = 4; - private static GAME_CLICK_TARGET_ID: number = 5; - private static MUTED_BUBBLE_ID: number = 6; - private static GUIDE_BUBBLE_ID: number = 7; - private static OWN_USER_ID: number = 4; - private static UPDATE_TIME_INCREASER: number = 41; - private static AVATAR_LAYER_ID: number = 0; - private static SHADOW_LAYER_ID: number = 1; - private static SNOWBOARDING_EFFECT: number = 97; + private static AVATAR: string = 'avatar'; + private static FLOATING_IDLE_Z_ID: number = 1; + private static TYPING_BUBBLE_ID: number = 2; + private static EXPRESSION_ID: number = 3; + private static NUMBER_BUBBLE_ID: number = 4; + private static GAME_CLICK_TARGET_ID: number = 5; + private static MUTED_BUBBLE_ID: number = 6; + private static GUIDE_BUBBLE_ID: number = 7; + private static OWN_USER_ID: number = 4; + private static UPDATE_TIME_INCREASER: number = 41; + private static AVATAR_LAYER_ID: number = 0; + private static SHADOW_LAYER_ID: number = 1; + private static SNOWBOARDING_EFFECT: number = 97; private static INITIAL_RESERVED_SPRITES: number = 2; private static ANIMATION_FRAME_UPDATE_INTERVAL: number = 2; private static DEFAULT_CANVAS_OFFSETS: number[] = [0, 0, 0]; - private static MAX_EFFECT_CACHE: number = 2; - private static SPRITE_INDEX_AVATAR: number = 0; - private static BASE_Y_SCALE: number = 1000; + private static MAX_EFFECT_CACHE: number = 2; + private static SPRITE_INDEX_AVATAR: number = 0; + private static BASE_Y_SCALE: number = 1000; private static AVATAR_SPRITE_DEFAULT_DEPTH: number = -0.01; - private static AVATAR_OWN_DEPTH_ADJUST: number = 0.001; - private static AVATAR_SPRITE_LAYING_DEPTH: number = -0.409; + private static AVATAR_OWN_DEPTH_ADJUST: number = 0.001; + private static AVATAR_SPRITE_LAYING_DEPTH: number = -0.409; protected _data: AvatarVisualizationData; @@ -102,59 +102,59 @@ export class AvatarVisualization extends RoomObjectSpriteVisualization implement { super(); - this._data = null; + this._data = null; - this._avatarImage = null; - this._cachedAvatars = new AdvancedMap(); - this._cachedAvatarEffects = new AdvancedMap(); - this._shadow = null; - this._lastUpdate = -1000; - this._disposed = false; + this._avatarImage = null; + this._cachedAvatars = new AdvancedMap(); + this._cachedAvatarEffects = new AdvancedMap(); + this._shadow = null; + this._lastUpdate = -1000; + this._disposed = false; - this._figure = null; - this._gender = null; - this._direction = -1; - this._headDirection = -1; - this._posture = ''; - this._postureParameter = ''; - this._canStandUp = false; - this._postureOffset = 0; - this._verticalOffset = 0; - this._angle = -1; - this._headAngle = -1; - this._talk = false; - this._expression = 0; - this._sleep = false; - this._blink = false; - this._gesture = 0; - this._sign = -1; - this._highlightEnabled = false; - this._highlight = false; - this._dance = 0; - this._effect = 0; - this._carryObject = 0; - this._useObject = 0; - this._ownUser = false; + this._figure = null; + this._gender = null; + this._direction = -1; + this._headDirection = -1; + this._posture = ''; + this._postureParameter = ''; + this._canStandUp = false; + this._postureOffset = 0; + this._verticalOffset = 0; + this._angle = -1; + this._headAngle = -1; + this._talk = false; + this._expression = 0; + this._sleep = false; + this._blink = false; + this._gesture = 0; + this._sign = -1; + this._highlightEnabled = false; + this._highlight = false; + this._dance = 0; + this._effect = 0; + this._carryObject = 0; + this._useObject = 0; + this._ownUser = false; - this._isLaying = false; - this._layInside = false; - this._isAnimating = false; + this._isLaying = false; + this._layInside = false; + this._isAnimating = false; this._extraSpritesStartIndex = 2; - this._forcedAnimFrames = 0; + this._forcedAnimFrames = 0; this._updatesUntilFrameUpdate = 0; - this._isAvatarReady = false; - this._needsUpdate = false; + this._isAvatarReady = false; + this._needsUpdate = false; this._geometryUpdateCounter = -1; - this._additions = new Map(); + this._additions = new Map(); } public initialize(data: IObjectVisualizationData): boolean { if(!(data instanceof AvatarVisualizationData)) return false; - this._data = data; + this._data = data; this.createSprites(AvatarVisualization.INITIAL_RESERVED_SPRITES); @@ -171,8 +171,8 @@ export class AvatarVisualization extends RoomObjectSpriteVisualization implement if(this._avatarImage) this._avatarImage.dispose(); - this._shadow = null; - this._disposed = true; + this._shadow = null; + this._disposed = true; } public update(geometry: IRoomGeometry, time: number, update: boolean, skipUpdate: boolean): void @@ -185,14 +185,14 @@ export class AvatarVisualization extends RoomObjectSpriteVisualization implement if((this._lastUpdate + AvatarVisualization.UPDATE_TIME_INCREASER) < time) this._lastUpdate = (time - AvatarVisualization.UPDATE_TIME_INCREASER); - const model = this.object.model; - const scale = geometry.scale; - const effect = this._effect; + const model = this.object.model; + const scale = geometry.scale; + const effect = this._effect; - let didScaleUpdate = false; + let didScaleUpdate = false; let didEffectUpdate = false; - let otherUpdate = false; - let objectUpdate = false; + let otherUpdate = false; + let objectUpdate = false; const updateModel = this.updateModel(model, scale); @@ -356,8 +356,8 @@ export class AvatarVisualization extends RoomObjectSpriteVisualization implement this._isAnimating = this._avatarImage.isAnimating(); - let _local_21 = AvatarVisualization.INITIAL_RESERVED_SPRITES; - const direction = this._avatarImage.getDirection(); + let _local_21 = AvatarVisualization.INITIAL_RESERVED_SPRITES; + const direction = this._avatarImage.getDirection(); for(const spriteData of this._avatarImage.getSprites()) { @@ -397,25 +397,25 @@ export class AvatarVisualization extends RoomObjectSpriteVisualization implement if(sprite) { - sprite.alphaTolerance = AlphaTolerance.MATCH_NOTHING; - sprite.visible = true; + sprite.alphaTolerance = AlphaTolerance.MATCH_NOTHING; + sprite.visible = true; const layerData = this._avatarImage.getLayerData(spriteData); let frameNumber = 0; - let offsetX = spriteData.getDirectionOffsetX(direction); - let offsetY = spriteData.getDirectionOffsetY(direction); - const offsetZ = spriteData.getDirectionOffsetZ(direction); - let dd = 0; + let offsetX = spriteData.getDirectionOffsetX(direction); + let offsetY = spriteData.getDirectionOffsetY(direction); + const offsetZ = spriteData.getDirectionOffsetZ(direction); + let dd = 0; if(spriteData.hasDirections) dd = direction; if(layerData) { frameNumber = layerData.animationFrame; - offsetX += layerData.dx; - offsetY += layerData.dy; - dd += layerData.dd; + offsetX += layerData.dx; + offsetY += layerData.dy; + dd += layerData.dd; } if(scale < 48) @@ -436,10 +436,10 @@ export class AvatarVisualization extends RoomObjectSpriteVisualization implement if(!asset) continue; - sprite.texture = asset.texture; - sprite.offsetX = ((asset.offsetX - (scale / 2)) + offsetX); - sprite.offsetY = (asset.offsetY + offsetY); - sprite.flipH = asset.flipH; + sprite.texture = asset.texture; + sprite.offsetX = ((asset.offsetX - (scale / 2)) + offsetX); + sprite.offsetY = (asset.offsetY + offsetY); + sprite.flipH = asset.flipH; if(spriteData.hasStaticY) { @@ -471,8 +471,8 @@ export class AvatarVisualization extends RoomObjectSpriteVisualization implement private createAvatarImage(scale: number, effectId: number): IAvatarImage { - let cachedImage: IAvatarImage = null; - let imageName = 'avatarImage' + scale.toString(); + let cachedImage: IAvatarImage = null; + let imageName = 'avatarImage' + scale.toString(); if(!effectId) { @@ -517,18 +517,18 @@ export class AvatarVisualization extends RoomObjectSpriteVisualization implement { if((!_arg_4 && (this.updateObjectCounter === object.updateCounter)) && (this._geometryUpdateCounter === geometry.updateId)) return false; - let direction = (object.getDirection().x - geometry.direction.x); - let headDirection = (this._headDirection - geometry.direction.x); + let direction = (object.getDirection().x - geometry.direction.x); + let headDirection = (this._headDirection - geometry.direction.x); if(this._posture === 'float') headDirection = direction; - direction = (((direction % 360) + 360) % 360); - headDirection = (((headDirection % 360) + 360) % 360); + direction = (((direction % 360) + 360) % 360); + headDirection = (((headDirection % 360) + 360) % 360); if((this._posture === 'sit') && this._canStandUp) { - direction -= ((direction % 90) - 45); - headDirection -= ((headDirection % 90) - 45); + direction -= ((direction % 90) - 45); + headDirection -= ((headDirection % 90) - 45); } if((direction !== this._angle) || _arg_4) @@ -918,7 +918,7 @@ export class AvatarVisualization extends RoomObjectSpriteVisualization implement } this._layInside = false; - this._isLaying = false; + this._isLaying = false; if(this._posture === 'lay') { @@ -1029,8 +1029,8 @@ export class AvatarVisualization extends RoomObjectSpriteVisualization implement if(sprite) { - sprite.texture = Texture.EMPTY; - sprite.alpha = 255; + sprite.texture = Texture.EMPTY; + sprite.alpha = 255; } } @@ -1109,11 +1109,11 @@ export class AvatarVisualization extends RoomObjectSpriteVisualization implement if(this._shadow) { - sprite.texture = this._shadow.texture; - sprite.offsetX = offsetX; - sprite.offsetY = offsetY; - sprite.alpha = 50; - sprite.relativeDepth = 1; + sprite.texture = this._shadow.texture; + sprite.offsetX = offsetX; + sprite.offsetY = offsetY; + sprite.alpha = 50; + sprite.relativeDepth = 1; } else { diff --git a/src/nitro/room/object/visualization/avatar/additions/ExpressionAddition.ts b/src/nitro/room/object/visualization/avatar/additions/ExpressionAddition.ts index a76b19bd..3ffdd446 100644 --- a/src/nitro/room/object/visualization/avatar/additions/ExpressionAddition.ts +++ b/src/nitro/room/object/visualization/avatar/additions/ExpressionAddition.ts @@ -10,8 +10,8 @@ export class ExpressionAddition implements IExpressionAddition constructor(id: number, type: number, visualization: AvatarVisualization) { - this._id = id; - this._type = type; + this._id = id; + this._type = type; this._visualization = visualization; } diff --git a/src/nitro/room/object/visualization/avatar/additions/ExpressionAdditionFactory.ts b/src/nitro/room/object/visualization/avatar/additions/ExpressionAdditionFactory.ts index 1e5bcd9f..7276544b 100644 --- a/src/nitro/room/object/visualization/avatar/additions/ExpressionAdditionFactory.ts +++ b/src/nitro/room/object/visualization/avatar/additions/ExpressionAdditionFactory.ts @@ -5,11 +5,11 @@ import { IExpressionAddition } from './IExpressionAddition'; export class ExpressionAdditionFactory { - public static WAVE: number = 1; - public static BLOW: number = 2; + public static WAVE: number = 1; + public static BLOW: number = 2; public static LAUGH: number = 3; - public static CRY: number = 4; - public static IDLE: number = 5; + public static CRY: number = 4; + public static IDLE: number = 5; public static getExpressionAddition(id: number, type: number, visualization: AvatarVisualization): IExpressionAddition { diff --git a/src/nitro/room/object/visualization/avatar/additions/FloatingHeartAddition.ts b/src/nitro/room/object/visualization/avatar/additions/FloatingHeartAddition.ts index 5d45a4cf..3ba4dd58 100644 --- a/src/nitro/room/object/visualization/avatar/additions/FloatingHeartAddition.ts +++ b/src/nitro/room/object/visualization/avatar/additions/FloatingHeartAddition.ts @@ -7,11 +7,11 @@ import { ExpressionAddition } from './ExpressionAddition'; export class FloatingHeartAddition extends ExpressionAddition { - private static DELAY_BEFORE_ANIMATION: number = 300; - private static STATE_DELAY: number = 0; - private static STATE_FADE_IN: number = 1; - private static STATE_FLOAT: number = 2; - private static STATE_COMPLETE: number = 3; + private static DELAY_BEFORE_ANIMATION: number = 300; + private static STATE_DELAY: number = 0; + private static STATE_FADE_IN: number = 1; + private static STATE_FLOAT: number = 2; + private static STATE_COMPLETE: number = 3; private _asset: Texture; private _startTime: number; @@ -24,12 +24,12 @@ export class FloatingHeartAddition extends ExpressionAddition { super(id, type, visualization); - this._asset = null; - this._startTime = Nitro.instance.time; - this._delta = 0; - this._offsetY = 0; - this._scale = 0; - this._state = 0; + this._asset = null; + this._startTime = Nitro.instance.time; + this._delta = 0; + this._offsetY = 0; + this._scale = 0; + this._state = 0; } public update(sprite: IRoomObjectSprite, scale: number): void @@ -38,8 +38,8 @@ export class FloatingHeartAddition extends ExpressionAddition this._scale = scale; - let additionScale = 64; - let offsetX = 0; + let additionScale = 64; + let offsetX = 0; if(scale < 48) { @@ -92,11 +92,11 @@ export class FloatingHeartAddition extends ExpressionAddition if(this._asset) { - sprite.texture = this._asset; - sprite.offsetX = offsetX; - sprite.offsetY = this._offsetY; - sprite.relativeDepth = -0.02; - sprite.alpha = 0; + sprite.texture = this._asset; + sprite.offsetX = offsetX; + sprite.offsetY = this._offsetY; + sprite.relativeDepth = -0.02; + sprite.alpha = 0; const delta = this._delta; @@ -118,8 +118,8 @@ export class FloatingHeartAddition extends ExpressionAddition this._state = FloatingHeartAddition.STATE_FADE_IN; - sprite.alpha = 0; - sprite.visible = true; + sprite.alpha = 0; + sprite.visible = true; this._delta = 0; @@ -131,7 +131,7 @@ export class FloatingHeartAddition extends ExpressionAddition this._delta += 0.1; sprite.offsetY = this._offsetY; - sprite.alpha = (Math.pow(this._delta, 0.9) * 255); + sprite.alpha = (Math.pow(this._delta, 0.9) * 255); if(this._delta >= 1) { @@ -152,8 +152,8 @@ export class FloatingHeartAddition extends ExpressionAddition const offset = ((this._scale < 48) ? -30 : -40); - sprite.offsetY = (this._offsetY + (((this._delta < 1) ? alpha : 1) * offset)); - sprite.alpha = ((1 - alpha) * 255); + sprite.offsetY = (this._offsetY + (((this._delta < 1) ? alpha : 1) * offset)); + sprite.alpha = ((1 - alpha) * 255); if(sprite.alpha <= 0) { diff --git a/src/nitro/room/object/visualization/avatar/additions/FloatingIdleZAddition.ts b/src/nitro/room/object/visualization/avatar/additions/FloatingIdleZAddition.ts index 3abb8141..691a6776 100644 --- a/src/nitro/room/object/visualization/avatar/additions/FloatingIdleZAddition.ts +++ b/src/nitro/room/object/visualization/avatar/additions/FloatingIdleZAddition.ts @@ -7,11 +7,11 @@ import { IAvatarAddition } from './IAvatarAddition'; export class FloatingIdleZAddition implements IAvatarAddition { - private static DELAY_BEFORE_ANIMATION: number = 2000; - private static DELAY_PER_FRAME: number = 2000; - private static STATE_DELAY: number = 0; - private static STATE_FRAME_A: number = 1; - private static STATE_FRAME_B: number = 2; + private static DELAY_BEFORE_ANIMATION: number = 2000; + private static DELAY_PER_FRAME: number = 2000; + private static STATE_DELAY: number = 0; + private static STATE_FRAME_A: number = 1; + private static STATE_FRAME_B: number = 2; private _id: number; private _visualization: AvatarVisualization; @@ -23,19 +23,19 @@ export class FloatingIdleZAddition implements IAvatarAddition constructor(id: number, visualization: AvatarVisualization) { - this._id = id; + this._id = id; this._visualization = visualization; - this._asset = null; - this._startTime = Nitro.instance.time; - this._offsetY = 0; - this._scale = 0; - this._state = 0; + this._asset = null; + this._startTime = Nitro.instance.time; + this._offsetY = 0; + this._scale = 0; + this._state = 0; } public dispose(): void { this._visualization = null; - this._asset = null; + this._asset = null; } private getSpriteAssetName(state: number): string @@ -54,8 +54,8 @@ export class FloatingIdleZAddition implements IAvatarAddition this._scale = scale; this._asset = this._visualization.getAvatarRenderAsset(this.getSpriteAssetName((this._state === FloatingIdleZAddition.STATE_FRAME_A) ? 1 : 2)); - let additionScale = 64; - let offsetX = 0; + let additionScale = 64; + let offsetX = 0; if(scale < 48) { @@ -98,11 +98,11 @@ export class FloatingIdleZAddition implements IAvatarAddition if(this._asset) { - sprite.texture = this._asset; - sprite.offsetX = offsetX; - sprite.offsetY = this._offsetY; - sprite.relativeDepth = -0.02; - sprite.alpha = 0; + sprite.texture = this._asset; + sprite.offsetX = offsetX; + sprite.offsetY = this._offsetY; + sprite.relativeDepth = -0.02; + sprite.alpha = 0; } } @@ -116,9 +116,9 @@ export class FloatingIdleZAddition implements IAvatarAddition { if((totalTimeRunning - this._startTime) >= FloatingIdleZAddition.DELAY_BEFORE_ANIMATION) { - this._state = FloatingIdleZAddition.STATE_FRAME_A; + this._state = FloatingIdleZAddition.STATE_FRAME_A; this._startTime = totalTimeRunning; - this._asset = this._visualization.getAvatarRenderAsset(this.getSpriteAssetName(1)); + this._asset = this._visualization.getAvatarRenderAsset(this.getSpriteAssetName(1)); } } @@ -126,9 +126,9 @@ export class FloatingIdleZAddition implements IAvatarAddition { if((totalTimeRunning - this._startTime) >= FloatingIdleZAddition.DELAY_PER_FRAME) { - this._state = FloatingIdleZAddition.STATE_FRAME_B; + this._state = FloatingIdleZAddition.STATE_FRAME_B; this._startTime = totalTimeRunning; - this._asset = this._visualization.getAvatarRenderAsset(this.getSpriteAssetName(2)); + this._asset = this._visualization.getAvatarRenderAsset(this.getSpriteAssetName(2)); } } @@ -136,17 +136,17 @@ export class FloatingIdleZAddition implements IAvatarAddition { if((totalTimeRunning - this._startTime) >= FloatingIdleZAddition.DELAY_PER_FRAME) { - this._state = FloatingIdleZAddition.STATE_FRAME_A; + this._state = FloatingIdleZAddition.STATE_FRAME_A; this._startTime = totalTimeRunning; - this._asset = this._visualization.getAvatarRenderAsset(this.getSpriteAssetName(1)); + this._asset = this._visualization.getAvatarRenderAsset(this.getSpriteAssetName(1)); } } if(this._asset) { - sprite.texture = this._asset; - sprite.alpha = 255; - sprite.visible = true; + sprite.texture = this._asset; + sprite.alpha = 255; + sprite.visible = true; } else { diff --git a/src/nitro/room/object/visualization/avatar/additions/GuideStatusBubbleAddition.ts b/src/nitro/room/object/visualization/avatar/additions/GuideStatusBubbleAddition.ts index 82bcab6c..282673be 100644 --- a/src/nitro/room/object/visualization/avatar/additions/GuideStatusBubbleAddition.ts +++ b/src/nitro/room/object/visualization/avatar/additions/GuideStatusBubbleAddition.ts @@ -15,9 +15,9 @@ export class GuideStatusBubbleAddition implements IAvatarAddition constructor(id: number, visualization: AvatarVisualization, status: number) { - this._id = id; + this._id = id; this._visualization = visualization; - this._asset = null; + this._asset = null; this._relativeDepth = 0; this._status = status; } @@ -25,20 +25,20 @@ export class GuideStatusBubbleAddition implements IAvatarAddition public dispose(): void { this._visualization = null; - this._asset = null; + this._asset = null; } public update(sprite: IRoomObjectSprite, scale: number): void { if(!sprite) return; - sprite.visible = true; - sprite.relativeDepth = this._relativeDepth; - sprite.alpha = 255; + sprite.visible = true; + sprite.relativeDepth = this._relativeDepth; + sprite.alpha = 255; - let additionScale = 64; - let offsetX = 0; - let offsetY = 0; + let additionScale = 64; + let offsetX = 0; + let offsetY = 0; this._asset = this._visualization.getAvatarRenderAsset((this._status === AvatarGuideStatus.GUIDE) ? 'avatar_addition_user_guide_bubble' : 'avatar_addition_user_guide_requester_bubble'); @@ -66,10 +66,10 @@ export class GuideStatusBubbleAddition implements IAvatarAddition if(this._asset) { - sprite.texture = this._asset; - sprite.offsetX = offsetX; - sprite.offsetY = offsetY; - sprite.relativeDepth = (-0.02 + 0); + sprite.texture = this._asset; + sprite.offsetX = offsetX; + sprite.offsetY = offsetY; + sprite.relativeDepth = (-0.02 + 0); } } diff --git a/src/nitro/room/object/visualization/avatar/additions/MutedBubbleAddition.ts b/src/nitro/room/object/visualization/avatar/additions/MutedBubbleAddition.ts index 655208b2..0f856cc2 100644 --- a/src/nitro/room/object/visualization/avatar/additions/MutedBubbleAddition.ts +++ b/src/nitro/room/object/visualization/avatar/additions/MutedBubbleAddition.ts @@ -12,32 +12,32 @@ export class MutedBubbleAddition implements IAvatarAddition constructor(id: number, visualization: AvatarVisualization) { - this._id = id; + this._id = id; this._visualization = visualization; - this._asset = null; + this._asset = null; } public dispose(): void { this._visualization = null; - this._asset = null; + this._asset = null; } public update(sprite: IRoomObjectSprite, scale: number): void { if(!sprite) return; - let additionScale = 64; - let offsetX = 0; - let offsetY = 0; + let additionScale = 64; + let offsetX = 0; + let offsetY = 0; if(scale < 48) { this._asset = this._visualization.getAvatarRenderAsset('avatar_addition_user_muted_small'); - additionScale = 32; - offsetX = -12; - offsetY = -66; + additionScale = 32; + offsetX = -12; + offsetY = -66; } else { @@ -52,11 +52,11 @@ export class MutedBubbleAddition implements IAvatarAddition if(this._asset) { - sprite.visible = true; - sprite.texture = this._asset; - sprite.offsetX = offsetX; - sprite.offsetY = offsetY; - sprite.relativeDepth = -0.02; + sprite.visible = true; + sprite.texture = this._asset; + sprite.offsetX = offsetX; + sprite.offsetY = offsetY; + sprite.relativeDepth = -0.02; } else { diff --git a/src/nitro/room/object/visualization/avatar/additions/NumberBubbleAddition.ts b/src/nitro/room/object/visualization/avatar/additions/NumberBubbleAddition.ts index 5ab078c3..4c01db1a 100644 --- a/src/nitro/room/object/visualization/avatar/additions/NumberBubbleAddition.ts +++ b/src/nitro/room/object/visualization/avatar/additions/NumberBubbleAddition.ts @@ -17,20 +17,20 @@ export class NumberBubbleAddition implements IAvatarAddition constructor(id: number, number: number, visualization: AvatarVisualization) { - this._id = id; - this._visualization = visualization; - this._asset = null; - this._scale = 0; - this._number = number; - this._numberValueFadeDirection = 0; - this._numberValueMoving = false; - this._numberValueMoveCounter = 0; + this._id = id; + this._visualization = visualization; + this._asset = null; + this._scale = 0; + this._number = number; + this._numberValueFadeDirection = 0; + this._numberValueMoving = false; + this._numberValueMoveCounter = 0; } public dispose(): void { this._visualization = null; - this._asset = null; + this._asset = null; } public update(sprite: IRoomObjectSprite, scale: number): void @@ -39,9 +39,9 @@ export class NumberBubbleAddition implements IAvatarAddition this._scale = scale; - let additionScale = 64; - let offsetX = 0; - let offsetY = 0; + let additionScale = 64; + let offsetX = 0; + let offsetY = 0; if(this._number > 0) { @@ -49,9 +49,9 @@ export class NumberBubbleAddition implements IAvatarAddition { this._asset = this._visualization.getAvatarRenderAsset('avatar_addition_number_' + this._number + '_small'); - additionScale = 32; - offsetX = -6; - offsetY = -52; + additionScale = 32; + offsetX = -6; + offsetY = -52; } else { @@ -73,16 +73,16 @@ export class NumberBubbleAddition implements IAvatarAddition if(this._asset) { - sprite.visible = true; - sprite.texture = this._asset; - sprite.offsetX = offsetX; - sprite.offsetY = offsetY; - sprite.relativeDepth = -0.01; - sprite.alpha = 0; + sprite.visible = true; + sprite.texture = this._asset; + sprite.offsetX = offsetX; + sprite.offsetY = offsetY; + sprite.relativeDepth = -0.01; + sprite.alpha = 0; - this._numberValueFadeDirection = 1; - this._numberValueMoving = true; - this._numberValueMoveCounter = 0; + this._numberValueFadeDirection = 1; + this._numberValueMoving = true; + this._numberValueMoveCounter = 0; } else { @@ -104,8 +104,8 @@ export class NumberBubbleAddition implements IAvatarAddition sprite.texture = this._asset; } - let alpha = sprite.alpha; - let didAnimate = false; + let alpha = sprite.alpha; + let didAnimate = false; if(this._numberValueMoving) { @@ -161,8 +161,8 @@ export class NumberBubbleAddition implements IAvatarAddition if(alpha <= 0) { - this._numberValueFadeDirection = 0; - this._numberValueMoving = false; + this._numberValueFadeDirection = 0; + this._numberValueMoving = false; alpha = 0; diff --git a/src/nitro/room/object/visualization/avatar/additions/TypingBubbleAddition.ts b/src/nitro/room/object/visualization/avatar/additions/TypingBubbleAddition.ts index acbf28c6..9830571c 100644 --- a/src/nitro/room/object/visualization/avatar/additions/TypingBubbleAddition.ts +++ b/src/nitro/room/object/visualization/avatar/additions/TypingBubbleAddition.ts @@ -13,29 +13,29 @@ export class TypingBubbleAddition implements IAvatarAddition constructor(id: number, visualization: AvatarVisualization) { - this._id = id; + this._id = id; this._visualization = visualization; - this._asset = null; + this._asset = null; this._relativeDepth = 0; } public dispose(): void { this._visualization = null; - this._asset = null; + this._asset = null; } public update(sprite: IRoomObjectSprite, scale: number): void { if(!sprite) return; - sprite.visible = true; - sprite.relativeDepth = this._relativeDepth; - sprite.alpha = 255; + sprite.visible = true; + sprite.relativeDepth = this._relativeDepth; + sprite.alpha = 255; - let additionScale = 64; - let offsetX = 0; - let offsetY = 0; + let additionScale = 64; + let offsetX = 0; + let offsetY = 0; if(scale < 48) { @@ -66,10 +66,10 @@ export class TypingBubbleAddition implements IAvatarAddition if(this._asset) { - sprite.texture = this._asset; - sprite.offsetX = offsetX; - sprite.offsetY = offsetY; - sprite.relativeDepth = (-0.02 + 0); + sprite.texture = this._asset; + sprite.offsetX = offsetX; + sprite.offsetY = offsetY; + sprite.relativeDepth = (-0.02 + 0); } } diff --git a/src/nitro/room/object/visualization/data/AnimationData.ts b/src/nitro/room/object/visualization/data/AnimationData.ts index bd5eefd3..440fa940 100644 --- a/src/nitro/room/object/visualization/data/AnimationData.ts +++ b/src/nitro/room/object/visualization/data/AnimationData.ts @@ -5,10 +5,10 @@ import { DirectionalOffsetData } from './DirectionalOffsetData'; export class AnimationData { - private static TRANSITION_TO_ANIMATION_OFFSET: number = 1000000; + private static TRANSITION_TO_ANIMATION_OFFSET: number = 1000000; private static TRANSITION_FROM_ANIMATION_OFFSET: number = 2000000; - public static DEFAULT_FRAME_NUMBER: number = 0; + public static DEFAULT_FRAME_NUMBER: number = 0; private _layers: Map; private _frameCount: number; @@ -17,10 +17,10 @@ export class AnimationData constructor() { - this._layers = new Map(); - this._frameCount = -1; - this._randomStart = false; - this._immediateChanges = null; + this._layers = new Map(); + this._frameCount = -1; + this._randomStart = false; + this._immediateChanges = null; } public static getTransitionToAnimationId(animationId: number): number @@ -90,9 +90,9 @@ export class AnimationData const animationId = parseInt(key); - const loopCount = (layer.loopCount !== undefined) ? layer.loopCount : 1; + const loopCount = (layer.loopCount !== undefined) ? layer.loopCount : 1; const frameRepeat = (layer.frameRepeat !== undefined) ? layer.frameRepeat : 1; - const isRandom = ((layer.random !== undefined) && (layer.random !== 0)) ? true : false; + const isRandom = ((layer.random !== undefined) && (layer.random !== 0)) ? true : false; if(!this.addLayer(animationId, loopCount, frameRepeat, isRandom, layer)) return false; } @@ -113,7 +113,7 @@ export class AnimationData if(!animationSequence) continue; - const loopCount = (animationSequence.loopCount !== undefined) ? animationSequence.loopCount : 1; + const loopCount = (animationSequence.loopCount !== undefined) ? animationSequence.loopCount : 1; const isSequenceRandom = ((animationSequence.random !== undefined) && (animationSequence.random !== 0)) ? true : false; const frame = layerData.addFrameSequence(loopCount, isSequenceRandom); diff --git a/src/nitro/room/object/visualization/data/AnimationFrame.ts b/src/nitro/room/object/visualization/data/AnimationFrame.ts index ad55715a..53663dbd 100644 --- a/src/nitro/room/object/visualization/data/AnimationFrame.ts +++ b/src/nitro/room/object/visualization/data/AnimationFrame.ts @@ -4,8 +4,8 @@ export class AnimationFrame public static FRAME_REPEAT_FOREVER: number = -1; public static SEQUENCE_NOT_DEFINED: number = -1; - private static POOL_SIZE_LIMIT: number = 3000; - private static POOL: AnimationFrame[] = []; + private static POOL_SIZE_LIMIT: number = 3000; + private static POOL: AnimationFrame[] = []; private _id: number; private _x: number; @@ -26,23 +26,23 @@ export class AnimationFrame if(frameRepeats < 0) frameRepeats = AnimationFrame.FRAME_REPEAT_FOREVER; - frame._id = id; - frame._x = x || 0; - frame._y = y || 0; - frame._repeats = repeats; - frame._frameRepeats = frameRepeats; - frame._remainingFrameRepeats = frameRepeats; - frame._isLastFrame = isLastFrame; - frame._isRecycled = false; + frame._id = id; + frame._x = x || 0; + frame._y = y || 0; + frame._repeats = repeats; + frame._frameRepeats = frameRepeats; + frame._remainingFrameRepeats = frameRepeats; + frame._isLastFrame = isLastFrame; + frame._isRecycled = false; if(activeSequence >= 0) { - frame._activeSequence = activeSequence; + frame._activeSequence = activeSequence; frame._activeSequenceOffset = sequenceOffset; } else { - frame._activeSequence = -1; + frame._activeSequence = -1; frame._activeSequenceOffset = 0; } diff --git a/src/nitro/room/object/visualization/data/AnimationFrameData.ts b/src/nitro/room/object/visualization/data/AnimationFrameData.ts index 008a0d77..6f7b7992 100644 --- a/src/nitro/room/object/visualization/data/AnimationFrameData.ts +++ b/src/nitro/room/object/visualization/data/AnimationFrameData.ts @@ -9,12 +9,12 @@ export class AnimationFrameData constructor(id: number, x: number, y: number, randomX: number, randomY: number, repeats: number) { - this._id = id; - this._x = x; - this._y = y; - this._randomX = randomX; - this._randomY = randomY; - this._repeats = repeats; + this._id = id; + this._x = x; + this._y = y; + this._randomX = randomX; + this._randomY = randomY; + this._repeats = repeats; } public get id(): number diff --git a/src/nitro/room/object/visualization/data/AnimationFrameSequenceData.ts b/src/nitro/room/object/visualization/data/AnimationFrameSequenceData.ts index b1c2a39e..5522587e 100644 --- a/src/nitro/room/object/visualization/data/AnimationFrameSequenceData.ts +++ b/src/nitro/room/object/visualization/data/AnimationFrameSequenceData.ts @@ -12,11 +12,11 @@ export class AnimationFrameSequenceData constructor(loopCount: number, isRandom: boolean) { - this._frames = []; - this._frameIndexes = []; - this._frameRepeats = []; - this._isRandom = isRandom; - this._loopCount = (loopCount < 1) ? 1 : loopCount; + this._frames = []; + this._frameIndexes = []; + this._frameRepeats = []; + this._isRandom = isRandom; + this._loopCount = (loopCount < 1) ? 1 : loopCount; } public get isRandom(): boolean @@ -36,9 +36,9 @@ export class AnimationFrameSequenceData public initialize(): void { - let frameIndex: number = (this._frameIndexes.length - 1); - let realIndex = -1; - let nextIndex = 1; + let frameIndex: number = (this._frameIndexes.length - 1); + let realIndex = -1; + let nextIndex = 1; while(frameIndex >= 0) { diff --git a/src/nitro/room/object/visualization/data/AnimationLayerData.ts b/src/nitro/room/object/visualization/data/AnimationLayerData.ts index f4fa9308..6271524d 100644 --- a/src/nitro/room/object/visualization/data/AnimationLayerData.ts +++ b/src/nitro/room/object/visualization/data/AnimationLayerData.ts @@ -11,11 +11,11 @@ export class AnimationLayerData constructor(loopCount: number, frameRepeat: number, isRandom: boolean) { - this._frameSequences = []; - this._frameCount = -1; - this._loopCount = (loopCount < 0) ? 0 : loopCount; - this._frameRepeat = (frameRepeat < 1) ? 1 : frameRepeat; - this._isRandom = isRandom; + this._frameSequences = []; + this._frameCount = -1; + this._loopCount = (loopCount < 0) ? 0 : loopCount; + this._frameRepeat = (frameRepeat < 1) ? 1 : frameRepeat; + this._isRandom = isRandom; } public get frameCount(): number @@ -69,19 +69,19 @@ export class AnimationLayerData if(!this._isRandom) { const count = Math.floor(frameCount / this._frameCount); - frameCount = Math.floor(frameCount % this._frameCount); + frameCount = Math.floor(frameCount % this._frameCount); - let doesRepeat = false; - let sequence: AnimationFrameSequenceData = null; + let doesRepeat = false; + let sequence: AnimationFrameSequenceData = null; if(((this._loopCount > 0) && (count >= this._loopCount)) || ((this._loopCount <= 0) && (this._frameCount === 1))) { - frameCount = (this._frameCount - 1); - doesRepeat = true; + frameCount = (this._frameCount - 1); + doesRepeat = true; } - let sequenceFrameCount = 0; - let sequenceId = 0; + let sequenceFrameCount = 0; + let sequenceId = 0; while(sequenceId < this._frameSequences.length) { @@ -100,8 +100,8 @@ export class AnimationLayerData return this.getFrameFromSpecificSequence(direction, sequence, sequenceId, (frameCount - sequenceFrameCount), doesRepeat); } - const sequenceId = Math.trunc(this._frameSequences.length * Math.random()); - const sequence = this._frameSequences[sequenceId]; + const sequenceId = Math.trunc(this._frameSequences.length * Math.random()); + const sequence = this._frameSequences[sequenceId]; if(sequence.frameCount < 1) return null; @@ -125,16 +125,16 @@ export class AnimationLayerData { if(!sequence) return null; - const frameIndex = sequence.getFrameIndex(offset); - const frame = sequence.getFrame(frameIndex); + const frameIndex = sequence.getFrameIndex(offset); + const frame = sequence.getFrame(frameIndex); if(!frame) return null; - let x = frame.getX(direction); - let y = frame.getY(direction); - const randomX = frame.randomX; - const randomY = frame.randomY; - let repeats = frame.repeats; + let x = frame.getX(direction); + let y = frame.getY(direction); + const randomX = frame.randomX; + const randomY = frame.randomY; + let repeats = frame.repeats; let isLastFrame = false; if(randomX) x = Math.trunc(x + randomX * Math.random()); diff --git a/src/nitro/room/object/visualization/data/AnimationSizeData.ts b/src/nitro/room/object/visualization/data/AnimationSizeData.ts index e3d2c749..c96a38ab 100644 --- a/src/nitro/room/object/visualization/data/AnimationSizeData.ts +++ b/src/nitro/room/object/visualization/data/AnimationSizeData.ts @@ -12,8 +12,8 @@ export class AnimationSizeData extends SizeData { super(layerCount, angle); - this._animations = new Map(); - this._animationIds = []; + this._animations = new Map(); + this._animationIds = []; } public dispose(): void @@ -42,22 +42,22 @@ export class AnimationSizeData extends SizeData if(!animation) return false; - let animationId = parseInt(key.split('_')[0]); - let isTransition = false; + let animationId = parseInt(key.split('_')[0]); + let isTransition = false; - const transitionTo = animation.transitionTo; - const transitionFrom = animation.transitionFrom; + const transitionTo = animation.transitionTo; + const transitionFrom = animation.transitionFrom; if(transitionTo !== undefined) { - animationId = AnimationData.getTransitionToAnimationId(transitionTo); - isTransition = true; + animationId = AnimationData.getTransitionToAnimationId(transitionTo); + isTransition = true; } if(transitionFrom !== undefined) { - animationId = AnimationData.getTransitionFromAnimationId(transitionFrom); - isTransition = true; + animationId = AnimationData.getTransitionFromAnimationId(transitionFrom); + isTransition = true; } const animationData = this.createAnimationData(); @@ -73,7 +73,7 @@ export class AnimationSizeData extends SizeData if(immediateChangeFrom !== undefined) { - const changes = immediateChangeFrom.split(','); + const changes = immediateChangeFrom.split(','); const changeIds = []; for(const change of changes) diff --git a/src/nitro/room/object/visualization/data/AnimationStateData.ts b/src/nitro/room/object/visualization/data/AnimationStateData.ts index 07c42095..ad7a13ed 100644 --- a/src/nitro/room/object/visualization/data/AnimationStateData.ts +++ b/src/nitro/room/object/visualization/data/AnimationStateData.ts @@ -13,14 +13,14 @@ export class AnimationStateData constructor() { - this._animationId = -1; - this._animationAfterTransitionId = 0; - this._animationOver = false; - this._frameCounter = 0; - this._frames = []; - this._lastFramePlayed = []; - this._animationPlayed = []; - this._layerCount = 0; + this._animationId = -1; + this._animationAfterTransitionId = 0; + this._animationOver = false; + this._frameCounter = 0; + this._frames = []; + this._lastFramePlayed = []; + this._animationPlayed = []; + this._layerCount = 0; } public get animationOver(): boolean @@ -71,9 +71,9 @@ export class AnimationStateData { this.recycleFrames(); - this._frames = null; - this._lastFramePlayed = null; - this._animationPlayed = null; + this._frames = null; + this._lastFramePlayed = null; + this._animationPlayed = null; } public setLayerCount(k: number): void @@ -92,10 +92,10 @@ export class AnimationStateData this._frames = []; } - this._lastFramePlayed = []; - this._animationPlayed = []; - this._animationOver = false; - this._frameCounter = 0; + this._lastFramePlayed = []; + this._animationPlayed = []; + this._animationOver = false; + this._frameCounter = 0; let layerId = 0; @@ -117,8 +117,8 @@ export class AnimationStateData } } - this._lastFramePlayed[layerId] = false; - this._animationPlayed[layerId] = false; + this._lastFramePlayed[layerId] = false; + this._animationPlayed[layerId] = false; layerId++; } diff --git a/src/nitro/room/object/visualization/data/DirectionData.ts b/src/nitro/room/object/visualization/data/DirectionData.ts index e3308387..9e256022 100644 --- a/src/nitro/room/object/visualization/data/DirectionData.ts +++ b/src/nitro/room/object/visualization/data/DirectionData.ts @@ -35,8 +35,8 @@ export class DirectionData for(let i = 0; i < totalLayers; i++) { - const localLayer = this.getLayer(i); - const directionLayer = directionData.getLayer(i); + const localLayer = this.getLayer(i); + const directionLayer = directionData.getLayer(i); if(!localLayer) continue; diff --git a/src/nitro/room/object/visualization/data/DirectionalOffsetData.ts b/src/nitro/room/object/visualization/data/DirectionalOffsetData.ts index 59018177..6d1993db 100644 --- a/src/nitro/room/object/visualization/data/DirectionalOffsetData.ts +++ b/src/nitro/room/object/visualization/data/DirectionalOffsetData.ts @@ -5,8 +5,8 @@ export class DirectionalOffsetData constructor() { - this._offsetX = new Map(); - this._offsetY = new Map(); + this._offsetX = new Map(); + this._offsetY = new Map(); } public getXOffset(direction: number, defaultX: number): number diff --git a/src/nitro/room/object/visualization/data/LayerData.ts b/src/nitro/room/object/visualization/data/LayerData.ts index 9e009d6f..f7264d61 100644 --- a/src/nitro/room/object/visualization/data/LayerData.ts +++ b/src/nitro/room/object/visualization/data/LayerData.ts @@ -2,15 +2,15 @@ import { BLEND_MODES } from '@pixi/constants'; export class LayerData { - public static DEFAULT_COUNT: number = 0; - public static DEFAULT_DIRECTION: number = 0; - public static DEFAULT_TAG: string = ''; - public static DEFAULT_INK: number = BLEND_MODES.NORMAL; - public static DEFAULT_ALPHA: number = 255; + public static DEFAULT_COUNT: number = 0; + public static DEFAULT_DIRECTION: number = 0; + public static DEFAULT_TAG: string = ''; + public static DEFAULT_INK: number = BLEND_MODES.NORMAL; + public static DEFAULT_ALPHA: number = 255; public static DEFAULT_IGNORE_MOUSE: boolean = false; - public static DEFAULT_XOFFSET: number = 0; - public static DEFAULT_YOFFSET: number = 0; - public static DEFAULT_ZOFFSET: number = 0; + public static DEFAULT_XOFFSET: number = 0; + public static DEFAULT_YOFFSET: number = 0; + public static DEFAULT_ZOFFSET: number = 0; private _tag: string; private _ink: number; @@ -22,26 +22,26 @@ export class LayerData constructor() { - this._tag = LayerData.DEFAULT_TAG; - this._ink = LayerData.DEFAULT_INK; - this._alpha = LayerData.DEFAULT_ALPHA; - this._ignoreMouse = LayerData.DEFAULT_IGNORE_MOUSE; - this._xOffset = LayerData.DEFAULT_XOFFSET; - this._yOffset = LayerData.DEFAULT_YOFFSET; - this._zOffset = LayerData.DEFAULT_ZOFFSET; + this._tag = LayerData.DEFAULT_TAG; + this._ink = LayerData.DEFAULT_INK; + this._alpha = LayerData.DEFAULT_ALPHA; + this._ignoreMouse = LayerData.DEFAULT_IGNORE_MOUSE; + this._xOffset = LayerData.DEFAULT_XOFFSET; + this._yOffset = LayerData.DEFAULT_YOFFSET; + this._zOffset = LayerData.DEFAULT_ZOFFSET; } public setFromLayer(layer: LayerData): void { if(!layer) return; - this._tag = layer.tag; - this._ink = layer.ink; - this._alpha = layer.alpha; - this._ignoreMouse = layer.ignoreMouse; - this._xOffset = layer.xOffset; - this._yOffset = layer.yOffset; - this._zOffset = layer.zOffset; + this._tag = layer.tag; + this._ink = layer.ink; + this._alpha = layer.alpha; + this._ignoreMouse = layer.ignoreMouse; + this._xOffset = layer.xOffset; + this._yOffset = layer.yOffset; + this._zOffset = layer.zOffset; } public get tag(): string diff --git a/src/nitro/room/object/visualization/data/PetSizeData.ts b/src/nitro/room/object/visualization/data/PetSizeData.ts index 8b50a016..03f530ab 100644 --- a/src/nitro/room/object/visualization/data/PetSizeData.ts +++ b/src/nitro/room/object/visualization/data/PetSizeData.ts @@ -13,9 +13,9 @@ export class PetSizeData extends AnimationSizeData { super(layerCount, angle); - this._posturesToAnimations = new Map(); - this._gesturesToAnimations = new Map(); - this._defaultPosture = null; + this._posturesToAnimations = new Map(); + this._gesturesToAnimations = new Map(); + this._defaultPosture = null; } public processPostures(postures: { defaultPosture?: string, postures: IAssetPosture[] }): boolean diff --git a/src/nitro/room/object/visualization/data/SizeData.ts b/src/nitro/room/object/visualization/data/SizeData.ts index ba9e942d..bffcfe0b 100644 --- a/src/nitro/room/object/visualization/data/SizeData.ts +++ b/src/nitro/room/object/visualization/data/SizeData.ts @@ -19,14 +19,14 @@ export class SizeData constructor(layerCount: number, angle: number) { - this._layerCount = ((layerCount < 0) ? 0 : ((layerCount > SizeData.MAX_LAYERS) ? SizeData.MAX_LAYERS : layerCount)); - this._angle = angle < 1 ? 1 : angle > 360 ? 360 : angle; + this._layerCount = ((layerCount < 0) ? 0 : ((layerCount > SizeData.MAX_LAYERS) ? SizeData.MAX_LAYERS : layerCount)); + this._angle = angle < 1 ? 1 : angle > 360 ? 360 : angle; - this._defaultDirection = new DirectionData(this._layerCount); - this._directions = new Map(); - this._colors = []; + this._defaultDirection = new DirectionData(this._layerCount); + this._directions = new Map(); + this._colors = []; this._lastDirectionData = null; - this._lastDirection = -1; + this._lastDirection = -1; } public dispose(): void @@ -52,10 +52,10 @@ export class SizeData protected reset(): void { - this._defaultDirection = null; - this._colors = []; + this._defaultDirection = null; + this._colors = []; this._lastDirectionData = null; - this._lastDirection = -1; + this._lastDirection = -1; this._directions.clear(); } @@ -90,7 +90,7 @@ export class SizeData this._directions.set(directionNumber, directionData); this._lastDirectionData = null; - this._lastDirection = -1; + this._lastDirection = -1; } return true; @@ -118,8 +118,8 @@ export class SizeData if(!colorLayer) continue; - const layerId = parseInt(layer); - const colorId = colorLayer.color; + const layerId = parseInt(layer); + const colorId = colorLayer.color; colorData.setColorLayer(layerId, colorId); } @@ -170,8 +170,8 @@ export class SizeData direction = (((direction % 360) + 360) % 360); - let currentAngle = -1; - let validDirection = -1; + let currentAngle = -1; + let validDirection = -1; for(const key of this._directions.keys()) { @@ -181,8 +181,8 @@ export class SizeData if((angle < currentAngle) || (currentAngle < 0)) { - currentAngle = angle; - validDirection = key; + currentAngle = angle; + validDirection = key; } } @@ -199,7 +199,7 @@ export class SizeData if(!directionData) directionData = this._defaultDirection; - this._lastDirection = direction; + this._lastDirection = direction; this._lastDirectionData = directionData; return this._lastDirectionData; diff --git a/src/nitro/room/object/visualization/furniture/FurnitureAnimatedVisualization.ts b/src/nitro/room/object/visualization/furniture/FurnitureAnimatedVisualization.ts index 7c3324b1..c4b6dbf9 100644 --- a/src/nitro/room/object/visualization/furniture/FurnitureAnimatedVisualization.ts +++ b/src/nitro/room/object/visualization/furniture/FurnitureAnimatedVisualization.ts @@ -9,8 +9,8 @@ import { FurnitureVisualization } from './FurnitureVisualization'; export class FurnitureAnimatedVisualization extends FurnitureVisualization { - public static TYPE: string = RoomObjectVisualizationType.FURNITURE_ANIMATED; - public static DEFAULT_ANIMATION_ID: number = 0; + public static TYPE: string = RoomObjectVisualizationType.FURNITURE_ANIMATED; + public static DEFAULT_ANIMATION_ID: number = 0; protected _data: FurnitureAnimatedVisualizationData; @@ -26,13 +26,13 @@ export class FurnitureAnimatedVisualization extends FurnitureVisualization { super(); - this._state = -1; - this._frameIncrease = 1; - this._animationData = new AnimationStateData(); - this._animationScale = 0; - this._animationChangeTime = 0; - this._animatedLayerCount = 0; - this._directionChanged = false; + this._state = -1; + this._frameIncrease = 1; + this._animationData = new AnimationStateData(); + this._animationScale = 0; + this._animationChangeTime = 0; + this._animatedLayerCount = 0; + this._directionChanged = false; } public initialize(data: IObjectVisualizationData): boolean @@ -250,8 +250,8 @@ export class FurnitureAnimatedVisualization extends FurnitureVisualization if(scale !== this._animationScale) { - this._animationScale = scale; - this._animatedLayerCount = this._data.getLayerCount(scale); + this._animationScale = scale; + this._animatedLayerCount = this._data.getLayerCount(scale); this.resetAllAnimationFrames(); } @@ -286,18 +286,18 @@ export class FurnitureAnimatedVisualization extends FurnitureVisualization if(animationData.animationOver && !this._directionChanged) return 0; const animationId = this.getAnimationId(animationData); - let frameCount = animationData.frameCounter; + let frameCount = animationData.frameCounter; if(!frameCount) frameCount = this._data.getStartFrame(scale, animationId, this._direction); - frameCount += this.frameIncrease; - animationData.frameCounter = frameCount; + frameCount += this.frameIncrease; + animationData.frameCounter = frameCount; animationData.animationOver = true; let animationPlayed = false; - let layerId = (this._animatedLayerCount - 1); - let update = 0; - let layerUpdate = (1 << (this._animatedLayerCount - 1)); + let layerId = (this._animatedLayerCount - 1); + let update = 0; + let layerUpdate = (1 << (this._animatedLayerCount - 1)); while(layerId >= 0) { @@ -308,7 +308,7 @@ export class FurnitureAnimatedVisualization extends FurnitureVisualization if(!animationPlayed || this._directionChanged) { let lastFramePlayed = animationData.getLastFramePlayed(layerId); - let frame = animationData.getFrame(layerId); + let frame = animationData.getFrame(layerId); if(frame) { @@ -402,7 +402,7 @@ export class FurnitureAnimatedVisualization extends FurnitureVisualization super.setDirection(direction); - this._directionChanged = true; + this._directionChanged = true; } protected get frameIncrease(): number diff --git a/src/nitro/room/object/visualization/furniture/FurnitureBadgeDisplayVisualization.ts b/src/nitro/room/object/visualization/furniture/FurnitureBadgeDisplayVisualization.ts index 617e4f0c..e31b4d86 100644 --- a/src/nitro/room/object/visualization/furniture/FurnitureBadgeDisplayVisualization.ts +++ b/src/nitro/room/object/visualization/furniture/FurnitureBadgeDisplayVisualization.ts @@ -14,18 +14,18 @@ export class FurnitureBadgeDisplayVisualization extends FurnitureAnimatedVisuali { super(); - this._badgeId = ''; + this._badgeId = ''; this._badgeAssetNameNormalScale = ''; - this._badgeAssetNameSmallScale = ''; - this._badgeVisibleInState = -1; + this._badgeAssetNameSmallScale = ''; + this._badgeVisibleInState = -1; } protected updateModel(scale: number): boolean { let updateModel = super.updateModel(scale); - const badgeStatus = this.object.model.getValue(RoomObjectVariable.FURNITURE_BADGE_IMAGE_STATUS); - const badgeId = this.object.model.getValue(RoomObjectVariable.FURNITURE_BADGE_ASSET_NAME); + const badgeStatus = this.object.model.getValue(RoomObjectVariable.FURNITURE_BADGE_IMAGE_STATUS); + const badgeId = this.object.model.getValue(RoomObjectVariable.FURNITURE_BADGE_ASSET_NAME); if(badgeStatus === -1) { @@ -35,7 +35,7 @@ export class FurnitureBadgeDisplayVisualization extends FurnitureAnimatedVisuali else if((badgeStatus === 1) && (badgeId !== this._badgeId)) { - this._badgeId = badgeId; + this._badgeId = badgeId; this._badgeAssetNameNormalScale = this._badgeId; if(this._badgeAssetNameSmallScale === '') this._badgeAssetNameSmallScale = this._badgeAssetNameNormalScale + '_32'; diff --git a/src/nitro/room/object/visualization/furniture/FurnitureBottleVisualization.ts b/src/nitro/room/object/visualization/furniture/FurnitureBottleVisualization.ts index 6a7ecaaf..344eefeb 100644 --- a/src/nitro/room/object/visualization/furniture/FurnitureBottleVisualization.ts +++ b/src/nitro/room/object/visualization/furniture/FurnitureBottleVisualization.ts @@ -2,9 +2,9 @@ import { FurnitureAnimatedVisualization } from './FurnitureAnimatedVisualization export class FurnitureBottleVisualization extends FurnitureAnimatedVisualization { - private static ANIMATION_ID_OFFSET_SLOW1: number = 20; - private static ANIMATION_ID_OFFSET_SLOW2: number = 9; - private static ANIMATION_ID_ROLL: number = -1; + private static ANIMATION_ID_OFFSET_SLOW1: number = 20; + private static ANIMATION_ID_OFFSET_SLOW2: number = 9; + private static ANIMATION_ID_ROLL: number = -1; private _stateQueue: number[]; private _running: boolean; @@ -13,8 +13,8 @@ export class FurnitureBottleVisualization extends FurnitureAnimatedVisualization { super(); - this._stateQueue = []; - this._running = false; + this._stateQueue = []; + this._running = false; } protected setAnimation(animationId: number): void @@ -23,8 +23,8 @@ export class FurnitureBottleVisualization extends FurnitureAnimatedVisualization { if(!this._running) { - this._running = true; - this._stateQueue = []; + this._running = true; + this._stateQueue = []; this._stateQueue.push(FurnitureBottleVisualization.ANIMATION_ID_ROLL); @@ -36,8 +36,8 @@ export class FurnitureBottleVisualization extends FurnitureAnimatedVisualization { if(this._running) { - this._running = false; - this._stateQueue = []; + this._running = false; + this._stateQueue = []; this._stateQueue.push(FurnitureBottleVisualization.ANIMATION_ID_OFFSET_SLOW1); this._stateQueue.push(FurnitureBottleVisualization.ANIMATION_ID_OFFSET_SLOW2 + animationId); diff --git a/src/nitro/room/object/visualization/furniture/FurnitureBrandedImageVisualization.ts b/src/nitro/room/object/visualization/furniture/FurnitureBrandedImageVisualization.ts index b95543a3..6c6316cb 100644 --- a/src/nitro/room/object/visualization/furniture/FurnitureBrandedImageVisualization.ts +++ b/src/nitro/room/object/visualization/furniture/FurnitureBrandedImageVisualization.ts @@ -23,13 +23,13 @@ export class FurnitureBrandedImageVisualization extends FurnitureVisualization { super(); - this._imageUrl = null; - this._shortUrl = null; - this._imageReady = false; + this._imageUrl = null; + this._shortUrl = null; + this._imageReady = false; - this._offsetX = 0; - this._offsetY = 0; - this._offsetZ = 0; + this._offsetX = 0; + this._offsetY = 0; + this._offsetZ = 0; } public dispose(): void @@ -54,9 +54,9 @@ export class FurnitureBrandedImageVisualization extends FurnitureVisualization if(flag) { - this._offsetX = this.object.model.getValue(RoomObjectVariable.FURNITURE_BRANDING_OFFSET_X); - this._offsetY = this.object.model.getValue(RoomObjectVariable.FURNITURE_BRANDING_OFFSET_Y); - this._offsetZ = this.object.model.getValue(RoomObjectVariable.FURNITURE_BRANDING_OFFSET_Z); + this._offsetX = this.object.model.getValue(RoomObjectVariable.FURNITURE_BRANDING_OFFSET_X); + this._offsetY = this.object.model.getValue(RoomObjectVariable.FURNITURE_BRANDING_OFFSET_Y); + this._offsetZ = this.object.model.getValue(RoomObjectVariable.FURNITURE_BRANDING_OFFSET_Z); } if(!this._imageReady) @@ -74,8 +74,8 @@ export class FurnitureBrandedImageVisualization extends FurnitureVisualization { if(this.checkIfImageChanged()) { - this._imageReady = false; - this._imageUrl = null; + this._imageReady = false; + this._imageUrl = null; return true; } @@ -123,7 +123,7 @@ export class FurnitureBrandedImageVisualization extends FurnitureVisualization if(imageStatus === 1) { - const texture = Nitro.instance.core.asset.getTexture(imageUrl); + const texture = Nitro.instance.core.asset.getTexture(imageUrl); if(!texture) return false; @@ -139,7 +139,7 @@ export class FurnitureBrandedImageVisualization extends FurnitureVisualization { if(!this._imageUrl) return; - const texture = Nitro.instance.core.asset.getTexture(this._imageUrl); + const texture = Nitro.instance.core.asset.getTexture(this._imageUrl); if(!texture) return; diff --git a/src/nitro/room/object/visualization/furniture/FurnitureCounterClockVisualization.ts b/src/nitro/room/object/visualization/furniture/FurnitureCounterClockVisualization.ts index 33757b42..22ca401d 100644 --- a/src/nitro/room/object/visualization/furniture/FurnitureCounterClockVisualization.ts +++ b/src/nitro/room/object/visualization/furniture/FurnitureCounterClockVisualization.ts @@ -2,14 +2,14 @@ import { FurnitureAnimatedVisualization } from './FurnitureAnimatedVisualization export class FurnitureCounterClockVisualization extends FurnitureAnimatedVisualization { - private static SECONDS_SPRITE: string = 'seconds_sprite'; - private static TEN_SECONDS_SPRITE: string = 'ten_seconds_sprite'; - private static MINUTES_SPRITE: string = 'minutes_sprite'; - private static TEN_MINUTES_SPRITE: string = 'ten_minutes_sprite'; + private static SECONDS_SPRITE: string = 'seconds_sprite'; + private static TEN_SECONDS_SPRITE: string = 'ten_seconds_sprite'; + private static MINUTES_SPRITE: string = 'minutes_sprite'; + private static TEN_MINUTES_SPRITE: string = 'ten_minutes_sprite'; protected getFrameNumber(scale: number, layerId: number): number { - const tag = this.getLayerTag(scale, this.direction, layerId); + const tag = this.getLayerTag(scale, this.direction, layerId); const animation = this.object.getState(0); switch(tag) diff --git a/src/nitro/room/object/visualization/furniture/FurnitureDynamicThumbnailVisualization.ts b/src/nitro/room/object/visualization/furniture/FurnitureDynamicThumbnailVisualization.ts index a9ffbf30..a3b266a7 100644 --- a/src/nitro/room/object/visualization/furniture/FurnitureDynamicThumbnailVisualization.ts +++ b/src/nitro/room/object/visualization/furniture/FurnitureDynamicThumbnailVisualization.ts @@ -28,8 +28,8 @@ export class FurnitureDynamicThumbnailVisualization extends IsometricImageFurniV { const image = new Image(); - image.src = thumbnailUrl; - image.crossOrigin = '*'; + image.src = thumbnailUrl; + image.crossOrigin = '*'; image.onload = () => { diff --git a/src/nitro/room/object/visualization/furniture/FurnitureExternalImageVisualization.ts b/src/nitro/room/object/visualization/furniture/FurnitureExternalImageVisualization.ts index 5c45e89e..fa60c2d2 100644 --- a/src/nitro/room/object/visualization/furniture/FurnitureExternalImageVisualization.ts +++ b/src/nitro/room/object/visualization/furniture/FurnitureExternalImageVisualization.ts @@ -10,8 +10,8 @@ export class FurnitureExternalImageVisualization extends FurnitureDynamicThumbna { super(); - this._url = null; - this._typePrefix = null; + this._url = null; + this._typePrefix = null; } protected getThumbnailURL(): string diff --git a/src/nitro/room/object/visualization/furniture/FurnitureGiftWrappedFireworksVisualization.ts b/src/nitro/room/object/visualization/furniture/FurnitureGiftWrappedFireworksVisualization.ts index 0963989f..07e86160 100644 --- a/src/nitro/room/object/visualization/furniture/FurnitureGiftWrappedFireworksVisualization.ts +++ b/src/nitro/room/object/visualization/furniture/FurnitureGiftWrappedFireworksVisualization.ts @@ -4,13 +4,13 @@ import { FurnitureFireworksVisualization } from './FurnitureFireworksVisualizati export class FurnitureGiftWrappedFireworksVisualization extends FurnitureFireworksVisualization { - private static PRESENT_DEFAULT_STATE: number = 0; - private static MAX_PACKET_TYPE_VALUE: number = 9; - private static MAX_RIBBON_TYPE_VALUE: number = 11; + private static PRESENT_DEFAULT_STATE: number = 0; + private static MAX_PACKET_TYPE_VALUE: number = 9; + private static MAX_RIBBON_TYPE_VALUE: number = 11; - private _packetType: number = 0; - private _ribbonType: number = 0; - private _lastAnimationId: number = 0; + private _packetType: number = 0; + private _ribbonType: number = 0; + private _lastAnimationId: number = 0; public update(geometry: IRoomGeometry, time: number, update: boolean, skipUpdate: boolean) { @@ -23,12 +23,12 @@ export class FurnitureGiftWrappedFireworksVisualization extends FurnitureFirewor { if(!this.object) return; - const local3 = 1000; - const extras = this.object.model.getValue(RoomObjectVariable.FURNITURE_EXTRAS); + const local3 = 1000; + const extras = this.object.model.getValue(RoomObjectVariable.FURNITURE_EXTRAS); - const typeIndex = parseInt(extras); - const packetType = Math.floor((typeIndex / local3)); - const ribbonType = (typeIndex % local3); + const typeIndex = parseInt(extras); + const packetType = Math.floor((typeIndex / local3)); + const ribbonType = (typeIndex % local3); this._packetType = ((packetType > FurnitureGiftWrappedFireworksVisualization.MAX_PACKET_TYPE_VALUE) ? 0 : packetType); this._ribbonType = ((ribbonType > FurnitureGiftWrappedFireworksVisualization.MAX_RIBBON_TYPE_VALUE) ? 0 : ribbonType); @@ -50,8 +50,8 @@ export class FurnitureGiftWrappedFireworksVisualization extends FurnitureFirewor { const size = this.getValidSize(scale); - let assetName = this._type; - let layerCode = ''; + let assetName = this._type; + let layerCode = ''; if(layerId < (this.spriteCount - 1)) { diff --git a/src/nitro/room/object/visualization/furniture/FurnitureGiftWrappedVisualization.ts b/src/nitro/room/object/visualization/furniture/FurnitureGiftWrappedVisualization.ts index 467e1475..885156f3 100644 --- a/src/nitro/room/object/visualization/furniture/FurnitureGiftWrappedVisualization.ts +++ b/src/nitro/room/object/visualization/furniture/FurnitureGiftWrappedVisualization.ts @@ -20,7 +20,7 @@ export class FurnitureGiftWrappedVisualization extends FurnitureVisualization const extras = this.object.model.getValue(RoomObjectVariable.FURNITURE_EXTRAS); - const local3 = 1000; + const local3 = 1000; const typeIndex = parseInt(extras); this._packetType = Math.floor((typeIndex / local3)); @@ -38,8 +38,8 @@ export class FurnitureGiftWrappedVisualization extends FurnitureVisualization { const size = this.getValidSize(scale); - let assetName = this._type; - let layerCode = ''; + let assetName = this._type; + let layerCode = ''; if(layerId < (this.spriteCount - 1)) { diff --git a/src/nitro/room/object/visualization/furniture/FurnitureHabboWheelVisualization.ts b/src/nitro/room/object/visualization/furniture/FurnitureHabboWheelVisualization.ts index 13c14e70..628d8111 100644 --- a/src/nitro/room/object/visualization/furniture/FurnitureHabboWheelVisualization.ts +++ b/src/nitro/room/object/visualization/furniture/FurnitureHabboWheelVisualization.ts @@ -2,10 +2,10 @@ import { FurnitureAnimatedVisualization } from './FurnitureAnimatedVisualization export class FurnitureHabboWheelVisualization extends FurnitureAnimatedVisualization { - private static ANIMATION_ID_OFFSET_SLOW1: number = 10; - private static ANIMATION_ID_OFFSET_SLOW2: number = 20; - private static ANIMATION_ID_START_ROLL: number = 31; - private static ANIMATION_ID_ROLL: number = 32; + private static ANIMATION_ID_OFFSET_SLOW1: number = 10; + private static ANIMATION_ID_OFFSET_SLOW2: number = 20; + private static ANIMATION_ID_START_ROLL: number = 31; + private static ANIMATION_ID_ROLL: number = 32; private _stateQueue: number[]; private _running: boolean; @@ -14,8 +14,8 @@ export class FurnitureHabboWheelVisualization extends FurnitureAnimatedVisualiza { super(); - this._stateQueue = []; - this._running = false; + this._stateQueue = []; + this._running = false; } protected setAnimation(animationId: number): void @@ -24,8 +24,8 @@ export class FurnitureHabboWheelVisualization extends FurnitureAnimatedVisualiza { if(!this._running) { - this._running = true; - this._stateQueue = []; + this._running = true; + this._stateQueue = []; this._stateQueue.push(FurnitureHabboWheelVisualization.ANIMATION_ID_START_ROLL); this._stateQueue.push(FurnitureHabboWheelVisualization.ANIMATION_ID_ROLL); @@ -38,8 +38,8 @@ export class FurnitureHabboWheelVisualization extends FurnitureAnimatedVisualiza { if(this._running) { - this._running = false; - this._stateQueue = []; + this._running = false; + this._stateQueue = []; this._stateQueue.push(FurnitureHabboWheelVisualization.ANIMATION_ID_OFFSET_SLOW1 + animationId); this._stateQueue.push(FurnitureHabboWheelVisualization.ANIMATION_ID_OFFSET_SLOW2 + animationId); diff --git a/src/nitro/room/object/visualization/furniture/FurnitureMannequinVisualization.ts b/src/nitro/room/object/visualization/furniture/FurnitureMannequinVisualization.ts index c88030bb..453c54e7 100644 --- a/src/nitro/room/object/visualization/furniture/FurnitureMannequinVisualization.ts +++ b/src/nitro/room/object/visualization/furniture/FurnitureMannequinVisualization.ts @@ -25,15 +25,15 @@ export class FurnitureMannequinVisualization extends FurnitureVisualization impl { super(); - this._mannequinScale = -1; - this._figure = null; - this._gender = null; - this._dynamicAssetName = null; - this._needsUpdate = false; + this._mannequinScale = -1; + this._figure = null; + this._gender = null; + this._dynamicAssetName = null; + this._needsUpdate = false; this._placeHolderFigure = 'hd-99999-99998'; - this._disposed = false; + this._disposed = false; } public initialize(data: IObjectVisualizationData): boolean @@ -86,8 +86,8 @@ export class FurnitureMannequinVisualization extends FurnitureVisualization impl if(figure) { - this._figure = (figure + '.' + this._placeHolderFigure); - this._gender = (this.object.model.getValue(RoomObjectVariable.FURNITURE_MANNEQUIN_GENDER) || null); + this._figure = (figure + '.' + this._placeHolderFigure); + this._gender = (this.object.model.getValue(RoomObjectVariable.FURNITURE_MANNEQUIN_GENDER) || null); this.updateAvatar(); } @@ -114,8 +114,8 @@ export class FurnitureMannequinVisualization extends FurnitureVisualization impl this.asset.addAsset(this.getAvatarAssetName(), avatarImage.getImage(AvatarSetType.FULL, false, 1, false), true); - this._dynamicAssetName = this.getAvatarAssetName(); - this._needsUpdate = true; + this._dynamicAssetName = this.getAvatarAssetName(); + this._needsUpdate = true; avatarImage.dispose(); } diff --git a/src/nitro/room/object/visualization/furniture/FurnitureParticleSystemEmitter.ts b/src/nitro/room/object/visualization/furniture/FurnitureParticleSystemEmitter.ts index 918610f0..dfbb179c 100644 --- a/src/nitro/room/object/visualization/furniture/FurnitureParticleSystemEmitter.ts +++ b/src/nitro/room/object/visualization/furniture/FurnitureParticleSystemEmitter.ts @@ -41,8 +41,8 @@ export class FurnitureParticleSystemEmitter extends FurnitureParticleSystemParti { for(const k of this._particles) k.dispose(); - this._particles = null; - this._particleConfigurations = null; + this._particles = null; + this._particleConfigurations = null; super.dispose(); } diff --git a/src/nitro/room/object/visualization/furniture/FurnitureQueueTileVisualization.ts b/src/nitro/room/object/visualization/furniture/FurnitureQueueTileVisualization.ts index df47fc52..9a1e5dee 100644 --- a/src/nitro/room/object/visualization/furniture/FurnitureQueueTileVisualization.ts +++ b/src/nitro/room/object/visualization/furniture/FurnitureQueueTileVisualization.ts @@ -2,10 +2,10 @@ import { FurnitureAnimatedVisualization } from './FurnitureAnimatedVisualization export class FurnitureQueueTileVisualization extends FurnitureAnimatedVisualization { - private static ANIMATION_ID_ROLL: number = 3; - private static ANIMATION_ID_ROLL_ONCE: number = 2; - private static ANIMATION_ID_NORMAL: number = 1; - private static ANIMATION_DURATION: number = 15; + private static ANIMATION_ID_ROLL: number = 3; + private static ANIMATION_ID_ROLL_ONCE: number = 2; + private static ANIMATION_ID_NORMAL: number = 1; + private static ANIMATION_DURATION: number = 15; private _stateQueue: number[]; private _animationCounter: number; @@ -14,15 +14,15 @@ export class FurnitureQueueTileVisualization extends FurnitureAnimatedVisualizat { super(); - this._stateQueue = []; - this._animationCounter = -1; + this._stateQueue = []; + this._animationCounter = -1; } protected setAnimation(animationId: number): void { if(animationId === FurnitureQueueTileVisualization.ANIMATION_ID_ROLL_ONCE) { - this._stateQueue = []; + this._stateQueue = []; this._stateQueue.push(FurnitureQueueTileVisualization.ANIMATION_ID_NORMAL); this._animationCounter = FurnitureQueueTileVisualization.ANIMATION_DURATION; diff --git a/src/nitro/room/object/visualization/furniture/FurnitureScoreBoardVisualization.ts b/src/nitro/room/object/visualization/furniture/FurnitureScoreBoardVisualization.ts index 05371c6d..0ec747e4 100644 --- a/src/nitro/room/object/visualization/furniture/FurnitureScoreBoardVisualization.ts +++ b/src/nitro/room/object/visualization/furniture/FurnitureScoreBoardVisualization.ts @@ -2,14 +2,14 @@ import { FurnitureAnimatedVisualization } from './FurnitureAnimatedVisualization export class FurnitureScoreBoardVisualization extends FurnitureAnimatedVisualization { - private static ONES_SPRITE: string = 'ones_sprite'; - private static TENS_SPRITE: string = 'tens_sprite'; - private static HUNDREDS_SPRITE: string = 'hundreds_sprite'; + private static ONES_SPRITE: string = 'ones_sprite'; + private static TENS_SPRITE: string = 'tens_sprite'; + private static HUNDREDS_SPRITE: string = 'hundreds_sprite'; private static THOUSANDS_SPRITE: string = 'thousands_sprite'; protected getFrameNumber(scale: number, layerId: number): number { - const tag = this.getLayerTag(scale, this.direction, layerId); + const tag = this.getLayerTag(scale, this.direction, layerId); const animation = this.object.getState(0); switch(tag) diff --git a/src/nitro/room/object/visualization/furniture/FurnitureValRandomizerVisualization.ts b/src/nitro/room/object/visualization/furniture/FurnitureValRandomizerVisualization.ts index 371418ed..b95769c1 100644 --- a/src/nitro/room/object/visualization/furniture/FurnitureValRandomizerVisualization.ts +++ b/src/nitro/room/object/visualization/furniture/FurnitureValRandomizerVisualization.ts @@ -2,11 +2,11 @@ import { FurnitureAnimatedVisualization } from './FurnitureAnimatedVisualization export class FurnitureValRandomizerVisualization extends FurnitureAnimatedVisualization { - private static ANIMATION_ID_OFFSET_SLOW1: number = 20; - private static ANIMATION_ID_OFFSET_SLOW2: number = 10; - private static ANIMATION_ID_START_ROLL: number = 31; - private static ANIMATION_ID_ROLL: number = 32; - private static ANIMATION_ID_OFF: number = 30; + private static ANIMATION_ID_OFFSET_SLOW1: number = 20; + private static ANIMATION_ID_OFFSET_SLOW2: number = 10; + private static ANIMATION_ID_START_ROLL: number = 31; + private static ANIMATION_ID_ROLL: number = 32; + private static ANIMATION_ID_OFF: number = 30; private _stateQueue: number[]; private _running: boolean; @@ -15,8 +15,8 @@ export class FurnitureValRandomizerVisualization extends FurnitureAnimatedVisual { super(); - this._stateQueue = []; - this._running = false; + this._stateQueue = []; + this._running = false; super.setAnimation(FurnitureValRandomizerVisualization.ANIMATION_ID_OFF); } @@ -27,8 +27,8 @@ export class FurnitureValRandomizerVisualization extends FurnitureAnimatedVisual { if(!this._running) { - this._running = true; - this._stateQueue = []; + this._running = true; + this._stateQueue = []; this._stateQueue.push(FurnitureValRandomizerVisualization.ANIMATION_ID_START_ROLL); this._stateQueue.push(FurnitureValRandomizerVisualization.ANIMATION_ID_ROLL); @@ -41,8 +41,8 @@ export class FurnitureValRandomizerVisualization extends FurnitureAnimatedVisual { if(this._running) { - this._running = false; - this._stateQueue = []; + this._running = false; + this._stateQueue = []; if(this.direction === 2) { diff --git a/src/nitro/room/object/visualization/furniture/FurnitureVisualization.ts b/src/nitro/room/object/visualization/furniture/FurnitureVisualization.ts index fd1a3aff..6843e10e 100644 --- a/src/nitro/room/object/visualization/furniture/FurnitureVisualization.ts +++ b/src/nitro/room/object/visualization/furniture/FurnitureVisualization.ts @@ -51,36 +51,36 @@ export class FurnitureVisualization extends RoomObjectSpriteVisualization { super(); - this._data = null; + this._data = null; - this._type = null; - this._direction = 0; - this._lastCameraAngle = NaN; - this._selectedColor = 0; - this._furnitureLift = 0; - this._alphaMultiplier = 1; - this._alphaChanged = false; - this._clickUrl = null; - this._clickHandling = false; + this._type = null; + this._direction = 0; + this._lastCameraAngle = NaN; + this._selectedColor = 0; + this._furnitureLift = 0; + this._alphaMultiplier = 1; + this._alphaChanged = false; + this._clickUrl = null; + this._clickHandling = false; - this._cacheDirection = -1; - this._cacheScale = 0; - this._cacheSize = -1; + this._cacheDirection = -1; + this._cacheScale = 0; + this._cacheSize = -1; - this._layerCount = 0; - this._shadowLayerIndex = -1; - this._updatedLayers = []; - this._assetNames = []; - this._spriteTags = []; - this._spriteInks = []; - this._spriteAlphas = []; - this._spriteColors = []; - this._spriteMouseCaptures = []; - this._spriteXOffsets = []; - this._spriteYOffsets = []; - this._spriteZOffsets = []; + this._layerCount = 0; + this._shadowLayerIndex = -1; + this._updatedLayers = []; + this._assetNames = []; + this._spriteTags = []; + this._spriteInks = []; + this._spriteAlphas = []; + this._spriteColors = []; + this._spriteMouseCaptures = []; + this._spriteXOffsets = []; + this._spriteYOffsets = []; + this._spriteZOffsets = []; - this._animationNumber = 0; + this._animationNumber = 0; } public initialize(data: IObjectVisualizationData): boolean @@ -89,8 +89,8 @@ export class FurnitureVisualization extends RoomObjectSpriteVisualization if(!(data instanceof FurnitureVisualizationData)) return false; - this._type = data.type; - this._data = data; + this._type = data.type; + this._data = data; return true; } @@ -99,17 +99,17 @@ export class FurnitureVisualization extends RoomObjectSpriteVisualization { super.dispose(); - this._data = null; - this._updatedLayers = null; - this._assetNames = null; - this._spriteTags = null; - this._spriteInks = null; - this._spriteAlphas = null; - this._spriteColors = null; - this._spriteMouseCaptures = null; - this._spriteXOffsets = null; - this._spriteYOffsets = null; - this._spriteZOffsets = null; + this._data = null; + this._updatedLayers = null; + this._assetNames = null; + this._spriteTags = null; + this._spriteInks = null; + this._spriteAlphas = null; + this._spriteColors = null; + this._spriteMouseCaptures = null; + this._spriteXOffsets = null; + this._spriteYOffsets = null; + this._spriteZOffsets = null; } protected reset(): void @@ -118,17 +118,17 @@ export class FurnitureVisualization extends RoomObjectSpriteVisualization this.setDirection(-1); - this._data = null; - this._updatedLayers = []; - this._assetNames = []; - this._spriteTags = []; - this._spriteInks = []; - this._spriteAlphas = []; - this._spriteColors = []; - this._spriteMouseCaptures = []; - this._spriteXOffsets = []; - this._spriteYOffsets = []; - this._spriteZOffsets = []; + this._data = null; + this._updatedLayers = []; + this._assetNames = []; + this._spriteTags = []; + this._spriteInks = []; + this._spriteAlphas = []; + this._spriteColors = []; + this._spriteMouseCaptures = []; + this._spriteXOffsets = []; + this._spriteYOffsets = []; + this._spriteZOffsets = []; this.createSprites(0); } @@ -137,20 +137,20 @@ export class FurnitureVisualization extends RoomObjectSpriteVisualization { if((this._cacheDirection === direction) && (this._cacheScale === scale)) return; - this._updatedLayers = []; - this._assetNames = []; - this._spriteTags = []; - this._spriteInks = []; - this._spriteAlphas = []; - this._spriteColors = []; - this._spriteMouseCaptures = []; - this._spriteXOffsets = []; - this._spriteYOffsets = []; - this._spriteZOffsets = []; + this._updatedLayers = []; + this._assetNames = []; + this._spriteTags = []; + this._spriteInks = []; + this._spriteAlphas = []; + this._spriteColors = []; + this._spriteMouseCaptures = []; + this._spriteXOffsets = []; + this._spriteYOffsets = []; + this._spriteZOffsets = []; - this._cacheDirection = direction; - this._cacheScale = scale; - this._cacheSize = this.getValidSize(scale); + this._cacheDirection = direction; + this._cacheScale = scale; + this._cacheSize = this.getValidSize(scale); this.setLayerCount(((this._data && this._data.getLayerCount(scale)) || 0) + this.getAdditionalLayerCount()); } @@ -159,8 +159,8 @@ export class FurnitureVisualization extends RoomObjectSpriteVisualization { if(!geometry) return; - const scale = geometry.scale; - let updateSprites = false; + const scale = geometry.scale; + let updateSprites = false; if(this.updateObject(scale, geometry.direction.x)) updateSprites = true; @@ -206,8 +206,8 @@ export class FurnitureVisualization extends RoomObjectSpriteVisualization this.setDirection(validDirection); } - this._lastCameraAngle = direction; - this._scale = scale; + this._lastCameraAngle = direction; + this._scale = scale; this.updateObjectCounter = this.object.updateCounter; @@ -225,7 +225,7 @@ export class FurnitureVisualization extends RoomObjectSpriteVisualization if(this.updateModelCounter === model.updateCounter) return false; this._selectedColor = model.getValue(RoomObjectVariable.FURNITURE_COLOR); - this._clickUrl = model.getValue(RoomObjectVariable.FURNITURE_AD_URL); + this._clickUrl = model.getValue(RoomObjectVariable.FURNITURE_AD_URL); this._clickHandling = ((this._clickUrl && (this._clickUrl !== '') && (this._clickUrl.indexOf('http') === 0)) || false); this._furnitureLift = (model.getValue(RoomObjectVariable.FURNITURE_LIFT_AMOUNT) || 0); @@ -279,7 +279,7 @@ export class FurnitureVisualization extends RoomObjectSpriteVisualization protected updateSprite(scale: number, layerId: number): void { const assetName = this.getSpriteAssetName(scale, layerId); - const sprite = this.getSprite(layerId); + const sprite = this.getSprite(layerId); if(assetName && sprite) { @@ -287,43 +287,43 @@ export class FurnitureVisualization extends RoomObjectSpriteVisualization if(assetData && assetData.texture) { - sprite.visible = true; - sprite.type = this._type; - sprite.texture = assetData.texture; - sprite.flipH = assetData.flipH; - sprite.flipV = assetData.flipV; - sprite.direction = this._direction; + sprite.visible = true; + sprite.type = this._type; + sprite.texture = assetData.texture; + sprite.flipH = assetData.flipH; + sprite.flipV = assetData.flipV; + sprite.direction = this._direction; let relativeDepth = 0; if(layerId !== this._shadowLayerIndex) { - sprite.tag = this.getLayerTag(scale, this._direction, layerId); - sprite.alpha = this.getLayerAlpha(scale, this._direction, layerId); - sprite.color = this.getLayerColor(scale, layerId, this._selectedColor); - sprite.offsetX = (assetData.offsetX + this.getLayerXOffset(scale, this._direction, layerId)); - sprite.offsetY = (assetData.offsetY + this.getLayerYOffset(scale, this._direction, layerId)); - sprite.blendMode = this.getLayerInk(scale, this._direction, layerId); - sprite.alphaTolerance = (this.getLayerIgnoreMouse(scale, this._direction, layerId) ? AlphaTolerance.MATCH_NOTHING : AlphaTolerance.MATCH_OPAQUE_PIXELS); + sprite.tag = this.getLayerTag(scale, this._direction, layerId); + sprite.alpha = this.getLayerAlpha(scale, this._direction, layerId); + sprite.color = this.getLayerColor(scale, layerId, this._selectedColor); + sprite.offsetX = (assetData.offsetX + this.getLayerXOffset(scale, this._direction, layerId)); + sprite.offsetY = (assetData.offsetY + this.getLayerYOffset(scale, this._direction, layerId)); + sprite.blendMode = this.getLayerInk(scale, this._direction, layerId); + sprite.alphaTolerance = (this.getLayerIgnoreMouse(scale, this._direction, layerId) ? AlphaTolerance.MATCH_NOTHING : AlphaTolerance.MATCH_OPAQUE_PIXELS); relativeDepth = this.getLayerZOffset(scale, this._direction, layerId); relativeDepth = (relativeDepth - (layerId * 0.001)); } else { - sprite.offsetX = assetData.offsetX; - sprite.offsetY = (assetData.offsetY + this.getLayerYOffset(scale, this._direction, layerId)); - sprite.alpha = (48 * this._alphaMultiplier); - sprite.alphaTolerance = AlphaTolerance.MATCH_NOTHING; + sprite.offsetX = assetData.offsetX; + sprite.offsetY = (assetData.offsetY + this.getLayerYOffset(scale, this._direction, layerId)); + sprite.alpha = (48 * this._alphaMultiplier); + sprite.alphaTolerance = AlphaTolerance.MATCH_NOTHING; relativeDepth = 1; } - sprite.relativeDepth = (relativeDepth * FurnitureVisualization.DEPTH_MULTIPLIER); - sprite.name = assetName; + sprite.relativeDepth = (relativeDepth * FurnitureVisualization.DEPTH_MULTIPLIER); + sprite.name = assetName; sprite.libraryAssetName = this.getLibraryAssetNameForSprite(assetData, sprite); - sprite.posture = this.getPostureForAsset(scale, assetData.source); - sprite.clickHandling = this._clickHandling; + sprite.posture = this.getPostureForAsset(scale, assetData.source); + sprite.clickHandling = this._clickHandling; } else { @@ -350,29 +350,29 @@ export class FurnitureVisualization extends RoomObjectSpriteVisualization { if(!sprite) return; - sprite.texture = null; + sprite.texture = null; sprite.libraryAssetName = ''; - sprite.posture = ''; - sprite.tag = ''; - sprite.offsetX = 0; - sprite.offsetY = 0; - sprite.flipH = false; - sprite.flipV = false; - sprite.relativeDepth = 0; - sprite.clickHandling = false; + sprite.posture = ''; + sprite.tag = ''; + sprite.offsetX = 0; + sprite.offsetY = 0; + sprite.flipH = false; + sprite.flipV = false; + sprite.relativeDepth = 0; + sprite.clickHandling = false; } protected getSpriteAssetName(scale: number, layerId: number): string { if(!this._data || (layerId >= FurnitureVisualizationData.LAYER_LETTERS.length)) return ''; - let assetName = this._assetNames[layerId]; - let updated = this._updatedLayers[layerId]; + let assetName = this._assetNames[layerId]; + let updated = this._updatedLayers[layerId]; if(!assetName || !assetName.length) { - assetName = this.cacheSpriteAssetName(scale, layerId, true); - updated = (this._cacheSize !== 1); + assetName = this.cacheSpriteAssetName(scale, layerId, true); + updated = (this._cacheSize !== 1); } if(updated) assetName += this.getFrameNumber(scale, layerId); @@ -382,10 +382,10 @@ export class FurnitureVisualization extends RoomObjectSpriteVisualization protected cacheSpriteAssetName(scale: number, layerId: number, cache: boolean): string { - const type = this._type; - const size = (cache) ? this._cacheSize : this.getValidSize(scale); - let layerCode = ''; - const isntIcon = (size !== 1); + const type = this._type; + const size = (cache) ? this._cacheSize : this.getValidSize(scale); + let layerCode = ''; + const isntIcon = (size !== 1); if(layerId !== this._shadowLayerIndex) { @@ -402,8 +402,8 @@ export class FurnitureVisualization extends RoomObjectSpriteVisualization if(cache) { - this._assetNames[layerId] = assetName; - this._updatedLayers[layerId] = isntIcon; + this._assetNames[layerId] = assetName; + this._updatedLayers[layerId] = isntIcon; } return assetName; @@ -545,8 +545,8 @@ export class FurnitureVisualization extends RoomObjectSpriteVisualization protected setLayerCount(count: number): void { - this._layerCount = count; - this._shadowLayerIndex = count - this.getAdditionalLayerCount(); + this._layerCount = count; + this._shadowLayerIndex = count - this.getAdditionalLayerCount(); } protected setDirection(direction: number): void diff --git a/src/nitro/room/object/visualization/furniture/FurnitureVisualizationData.ts b/src/nitro/room/object/visualization/furniture/FurnitureVisualizationData.ts index 4cd66118..afeecdcb 100644 --- a/src/nitro/room/object/visualization/furniture/FurnitureVisualizationData.ts +++ b/src/nitro/room/object/visualization/furniture/FurnitureVisualizationData.ts @@ -19,12 +19,12 @@ export class FurnitureVisualizationData implements IObjectVisualizationData constructor() { - this._type = ''; - this._sizes = []; - this._sizeDatas = new Map(); - this._lastSize = -1; - this._lastSizeScale = -1; - this._lastSizeData = null; + this._type = ''; + this._sizes = []; + this._sizeDatas = new Map(); + this._lastSize = -1; + this._lastSizeScale = -1; + this._lastSizeData = null; this._lastSizeDataScale = -1; } @@ -55,8 +55,8 @@ export class FurnitureVisualizationData implements IObjectVisualizationData this._sizeDatas = null; } - this._lastSizeData = null; - this._sizes = null; + this._lastSizeData = null; + this._sizes = null; } private reset(): void @@ -70,8 +70,8 @@ export class FurnitureVisualizationData implements IObjectVisualizationData this._sizeDatas.clear(); - this._sizes = []; - this._lastSizeData = null; + this._sizes = []; + this._lastSizeData = null; this._lastSizeDataScale = -1; } @@ -88,8 +88,8 @@ export class FurnitureVisualizationData implements IObjectVisualizationData { const visualization = visualizations[visualizationId]; - const layerCount = visualization.layerCount; - const angle = visualization.angle; + const layerCount = visualization.layerCount; + const angle = visualization.angle; let size = visualization.size; @@ -155,7 +155,7 @@ export class FurnitureVisualizationData implements IObjectVisualizationData if(sizeIndex < this._sizes.length) newScale = this._sizes[sizeIndex]; this._lastSizeScale = scale; - this._lastSize = newScale; + this._lastSize = newScale; return newScale; } @@ -164,8 +164,8 @@ export class FurnitureVisualizationData implements IObjectVisualizationData { if(size <= 0) return 0; - let index = 0; - let iterator = 1; + let index = 0; + let iterator = 1; while(iterator < this._sizes.length) { diff --git a/src/nitro/room/object/visualization/furniture/FurnitureVoteCounterVisualization.ts b/src/nitro/room/object/visualization/furniture/FurnitureVoteCounterVisualization.ts index cc23d3c0..4557b904 100644 --- a/src/nitro/room/object/visualization/furniture/FurnitureVoteCounterVisualization.ts +++ b/src/nitro/room/object/visualization/furniture/FurnitureVoteCounterVisualization.ts @@ -3,10 +3,10 @@ import { FurnitureAnimatedVisualization } from './FurnitureAnimatedVisualization export class FurnitureVoteCounterVisualization extends FurnitureAnimatedVisualization { - private static ONES_SPRITE: string = 'ones_sprite'; - private static TENS_SPRITE: string = 'tens_sprite'; - private static HUNDREDS_SPRITE: string = 'hundreds_sprite'; - private static HIDE_COUNTER_SCORE: number = -1; + private static ONES_SPRITE: string = 'ones_sprite'; + private static TENS_SPRITE: string = 'tens_sprite'; + private static HUNDREDS_SPRITE: string = 'hundreds_sprite'; + private static HIDE_COUNTER_SCORE: number = -1; protected updateObject(scale: number, direction: number): boolean { @@ -17,8 +17,8 @@ export class FurnitureVoteCounterVisualization extends FurnitureAnimatedVisualiz protected getFrameNumber(scale: number, layerId: number): number { - const result = this.object.model.getValue(RoomObjectVariable.FURNITURE_VOTE_COUNTER_COUNT); - const tag = this.getLayerTag(scale, this.direction, layerId); + const result = this.object.model.getValue(RoomObjectVariable.FURNITURE_VOTE_COUNTER_COUNT); + const tag = this.getLayerTag(scale, this.direction, layerId); switch(tag) { diff --git a/src/nitro/room/object/visualization/furniture/FurnitureVoteMajorityVisualization.ts b/src/nitro/room/object/visualization/furniture/FurnitureVoteMajorityVisualization.ts index 4bb9ddd1..2cfd3586 100644 --- a/src/nitro/room/object/visualization/furniture/FurnitureVoteMajorityVisualization.ts +++ b/src/nitro/room/object/visualization/furniture/FurnitureVoteMajorityVisualization.ts @@ -3,16 +3,16 @@ import { FurnitureAnimatedVisualization } from './FurnitureAnimatedVisualization export class FurnitureVoteMajorityVisualization extends FurnitureAnimatedVisualization { - private static ONES_SPRITE: string = 'ones_sprite'; - private static TENS_SPRITE: string = 'tens_sprite'; - private static HUNDREDS_SPRITE: string = 'hundreds_sprite'; - private static HIDE_RESULTS_STATES: number[] = [-1, 1]; - private static HIDE_RESULTS_VALUE: number = -1; + private static ONES_SPRITE: string = 'ones_sprite'; + private static TENS_SPRITE: string = 'tens_sprite'; + private static HUNDREDS_SPRITE: string = 'hundreds_sprite'; + private static HIDE_RESULTS_STATES: number[] = [-1, 1]; + private static HIDE_RESULTS_VALUE: number = -1; protected getFrameNumber(scale: number, layerId: number): number { - const result = this.object.model.getValue(RoomObjectVariable.FURNITURE_VOTE_MAJORITY_RESULT); - const tag = this.getLayerTag(scale, this.direction, layerId); + const result = this.object.model.getValue(RoomObjectVariable.FURNITURE_VOTE_MAJORITY_RESULT); + const tag = this.getLayerTag(scale, this.direction, layerId); switch(tag) { diff --git a/src/nitro/room/object/visualization/furniture/IsometricImageFurniVisualization.ts b/src/nitro/room/object/visualization/furniture/IsometricImageFurniVisualization.ts index 59a447f5..153a01d4 100644 --- a/src/nitro/room/object/visualization/furniture/IsometricImageFurniVisualization.ts +++ b/src/nitro/room/object/visualization/furniture/IsometricImageFurniVisualization.ts @@ -74,7 +74,7 @@ export class IsometricImageFurniVisualization extends FurnitureAnimatedVisualiza if(this.getLayerTag(scale, this.direction, layerId) === IsometricImageFurniVisualization.THUMBNAIL) { const assetName = (this.cacheSpriteAssetName(scale, layerId, false) + this.getFrameNumber(scale, layerId)); - const asset = this.getAsset(assetName, layerId); + const asset = this.getAsset(assetName, layerId); if(asset) { @@ -94,9 +94,9 @@ export class IsometricImageFurniVisualization extends FurnitureAnimatedVisualiza private generateTransformedThumbnail(texture: Texture, asset: IGraphicAsset): Texture { - const scale = 1.1; - const matrix = new Matrix(); - const _local_5 = (asset.width / texture.width); + const scale = 1.1; + const matrix = new Matrix(); + const _local_5 = (asset.width / texture.width); switch(this.direction) { diff --git a/src/nitro/room/object/visualization/pet/ExperienceData.ts b/src/nitro/room/object/visualization/pet/ExperienceData.ts index b8ad5673..852a4ebc 100644 --- a/src/nitro/room/object/visualization/pet/ExperienceData.ts +++ b/src/nitro/room/object/visualization/pet/ExperienceData.ts @@ -14,10 +14,10 @@ export class ExperienceData constructor(texture: Texture) { - this._sprite = new NitroSprite(texture); - this._texture = null; - this._amount = -1; - this._alpha = 0; + this._sprite = new NitroSprite(texture); + this._texture = null; + this._amount = -1; + this._alpha = 0; } public renderBubble(amount: number): RenderTexture diff --git a/src/nitro/room/object/visualization/pet/PetVisualization.ts b/src/nitro/room/object/visualization/pet/PetVisualization.ts index d94681b7..0d23c12f 100644 --- a/src/nitro/room/object/visualization/pet/PetVisualization.ts +++ b/src/nitro/room/object/visualization/pet/PetVisualization.ts @@ -18,15 +18,15 @@ export class PetVisualization extends FurnitureAnimatedVisualization { public static TYPE: string = RoomObjectVisualizationType.PET_ANIMATED; - private static HEAD: string = 'head'; - private static SADDLE: string = 'saddle'; - private static HAIR: string = 'hair'; - private static ADDITIONAL_SPRITE_COUNT: number = 1; - private static EXPERIENCE_BUBBLE_VISIBLE_IN_MS: number = 1000; - private static PET_EXPERIENCE_BUBBLE: string = 'avatar_addition_pet_experience_bubble'; - private static POSTURE_ANIMATION_INDEX: number = 0; - private static GESTURE_ANIMATION_INDEX: number = 1; - private static ANIMATION_INDEX_COUNT: number = 2; + private static HEAD: string = 'head'; + private static SADDLE: string = 'saddle'; + private static HAIR: string = 'hair'; + private static ADDITIONAL_SPRITE_COUNT: number = 1; + private static EXPERIENCE_BUBBLE_VISIBLE_IN_MS: number = 1000; + private static PET_EXPERIENCE_BUBBLE: string = 'avatar_addition_pet_experience_bubble'; + private static POSTURE_ANIMATION_INDEX: number = 0; + private static GESTURE_ANIMATION_INDEX: number = 1; + private static ANIMATION_INDEX_COUNT: number = 2; protected _data: PetVisualizationData; @@ -57,30 +57,30 @@ export class PetVisualization extends FurnitureAnimatedVisualization { super(); - this._data = null; + this._data = null; - this._posture = ''; - this._gesture = ''; - this._isSleeping = false; - this._headDirection = -1; - this._headOnly = false; - this._nonHeadSprites = []; - this._headSprites = []; - this._saddleSprites = []; - this._animationOver = false; - this._paletteIndex = -1; - this._paletteName = ''; - this._customLayerIds = []; - this._customPartIds = []; - this._customPaletteIds = []; - this._isRiding = false; - this._color = 0xFFFFFF; - this._experience = 0; - this._experienceTimestamp = 0; - this._experienceData = null; + this._posture = ''; + this._gesture = ''; + this._isSleeping = false; + this._headDirection = -1; + this._headOnly = false; + this._nonHeadSprites = []; + this._headSprites = []; + this._saddleSprites = []; + this._animationOver = false; + this._paletteIndex = -1; + this._paletteName = ''; + this._customLayerIds = []; + this._customPartIds = []; + this._customPaletteIds = []; + this._isRiding = false; + this._color = 0xFFFFFF; + this._experience = 0; + this._experienceTimestamp = 0; + this._experienceData = null; - this._previousAnimationDirection = -1; - this._animationStates = []; + this._previousAnimationDirection = -1; + this._animationStates = []; while(this._animationStates.length < PetVisualization.ANIMATION_INDEX_COUNT) this._animationStates.push(new AnimationStateData()); } @@ -159,11 +159,11 @@ export class PetVisualization extends FurnitureAnimatedVisualization if(texture) { - sprite.texture = texture; - sprite.offsetX = -20; - sprite.offsetY = -80; - sprite.alpha = this._experienceData.alpha; - sprite.visible = true; + sprite.texture = texture; + sprite.offsetX = -20; + sprite.offsetY = -80; + sprite.alpha = this._experienceData.alpha; + sprite.visible = true; sprite.relativeDepth = -0.2; return; @@ -216,25 +216,25 @@ export class PetVisualization extends FurnitureAnimatedVisualization this._experience = (model.getValue(RoomObjectVariable.FIGURE_GAINED_EXPERIENCE)); this._experienceTimestamp = (model.getValue(RoomObjectVariable.FIGURE_EXPERIENCE_TIMESTAMP)); - const customPaletteIndex = model.getValue(RoomObjectVariable.PET_PALETTE_INDEX); - const customLayerIds = model.getValue(RoomObjectVariable.PET_CUSTOM_LAYER_IDS); - const customPartIds = model.getValue(RoomObjectVariable.PET_CUSTOM_PARTS_IDS); - const customPaletteIds = model.getValue(RoomObjectVariable.PET_CUSTOM_PALETTE_IDS); - const isRiding = model.getValue(RoomObjectVariable.PET_IS_RIDING); - const headOnly = model.getValue(RoomObjectVariable.PET_HEAD_ONLY); - const color = model.getValue(RoomObjectVariable.PET_COLOR); + const customPaletteIndex = model.getValue(RoomObjectVariable.PET_PALETTE_INDEX); + const customLayerIds = model.getValue(RoomObjectVariable.PET_CUSTOM_LAYER_IDS); + const customPartIds = model.getValue(RoomObjectVariable.PET_CUSTOM_PARTS_IDS); + const customPaletteIds = model.getValue(RoomObjectVariable.PET_CUSTOM_PALETTE_IDS); + const isRiding = model.getValue(RoomObjectVariable.PET_IS_RIDING); + const headOnly = model.getValue(RoomObjectVariable.PET_HEAD_ONLY); + const color = model.getValue(RoomObjectVariable.PET_COLOR); if(customPaletteIndex !== this._paletteIndex) { - this._paletteIndex = customPaletteIndex; - this._paletteName = this._paletteIndex.toString(); + this._paletteIndex = customPaletteIndex; + this._paletteName = this._paletteIndex.toString(); } - this._customLayerIds = (customLayerIds) ? customLayerIds : []; - this._customPartIds = (customPartIds) ? customPartIds : []; - this._customPaletteIds = (customPaletteIds) ? customPaletteIds : []; - this._isRiding = (!isNaN(isRiding) && (isRiding > 0)); - this._headOnly = (!isNaN(headOnly) && (headOnly > 0)); + this._customLayerIds = (customLayerIds) ? customLayerIds : []; + this._customPartIds = (customPartIds) ? customPartIds : []; + this._customPaletteIds = (customPaletteIds) ? customPaletteIds : []; + this._isRiding = (!isNaN(isRiding) && (isRiding > 0)); + this._headOnly = (!isNaN(headOnly) && (headOnly > 0)); if(!isNaN(color) && this._color !== color) this._color = color; @@ -316,9 +316,9 @@ export class PetVisualization extends FurnitureAnimatedVisualization { if(this._animationOver) return 0; - let animationOver = true; - let _local_3 = 0; - let index = 0; + let animationOver = true; + let _local_3 = 0; + let index = 0; while(index < this._animationStates.length) { @@ -394,8 +394,8 @@ export class PetVisualization extends FurnitureAnimatedVisualization protected getLayerXOffset(scale: number, direction: number, layerId: number): number { - let offset = super.getLayerXOffset(scale, direction, layerId); - let index = (this._animationStates.length - 1); + let offset = super.getLayerXOffset(scale, direction, layerId); + let index = (this._animationStates.length - 1); while(index >= 0) { @@ -416,8 +416,8 @@ export class PetVisualization extends FurnitureAnimatedVisualization protected getLayerYOffset(scale: number, direction: number, layerId: number): number { - let offset = super.getLayerYOffset(scale, direction, layerId); - let index = (this._animationStates.length - 1); + let offset = super.getLayerYOffset(scale, direction, layerId); + let index = (this._animationStates.length - 1); while(index >= 0) { @@ -532,15 +532,15 @@ export class PetVisualization extends FurnitureAnimatedVisualization { if(!this.asset) return null; - const layerIndex = this._customLayerIds.indexOf(layerId); + const layerIndex = this._customLayerIds.indexOf(layerId); let paletteName = this._paletteName; - let partId = -1; - let paletteId = -1; + let partId = -1; + let paletteId = -1; if(layerIndex > -1) { - partId = this._customPartIds[layerIndex]; - paletteId = this._customPaletteIds[layerIndex]; + partId = this._customPartIds[layerIndex]; + paletteId = this._customPaletteIds[layerIndex]; paletteName = ((paletteId > -1) ? paletteId.toString() : this._paletteName); } @@ -566,9 +566,9 @@ export class PetVisualization extends FurnitureAnimatedVisualization protected getPostureForAsset(scale: number, name: string): string { - const parts = name.split('_'); - let length = parts.length; - let i = 0; + const parts = name.split('_'); + let length = parts.length; + let i = 0; while(i < parts.length) { diff --git a/src/nitro/room/object/visualization/room/PlaneDrawingData.ts b/src/nitro/room/object/visualization/room/PlaneDrawingData.ts index e8d6a7ba..af4c446f 100644 --- a/src/nitro/room/object/visualization/room/PlaneDrawingData.ts +++ b/src/nitro/room/object/visualization/room/PlaneDrawingData.ts @@ -15,22 +15,22 @@ export class PlaneDrawingData implements IPlaneDrawingData constructor(k: PlaneDrawingData = null, _arg_2: number = 0, _arg_3: boolean = false) { - this._assetNames = []; - this._maskAssetNames = []; - this._maskAssetLocations = []; - this._maskAssetFlipHs = []; - this._maskAssetFlipVs = []; + this._assetNames = []; + this._maskAssetNames = []; + this._maskAssetLocations = []; + this._maskAssetFlipHs = []; + this._maskAssetFlipVs = []; if(k != null) { - this._maskAssetNames = k._maskAssetNames; - this._maskAssetLocations = k._maskAssetLocations; - this._maskAssetFlipHs = k._maskAssetFlipHs; - this._maskAssetFlipVs = k._maskAssetFlipVs; + this._maskAssetNames = k._maskAssetNames; + this._maskAssetLocations = k._maskAssetLocations; + this._maskAssetFlipHs = k._maskAssetFlipHs; + this._maskAssetFlipVs = k._maskAssetFlipVs; } - this._color = _arg_2; - this._alignBottom = _arg_3; + this._color = _arg_2; + this._alignBottom = _arg_3; } public addMask(k: string, _arg_2: Point, _arg_3: boolean, _arg_4: boolean): void diff --git a/src/nitro/room/object/visualization/room/RoomPlane.ts b/src/nitro/room/object/visualization/room/RoomPlane.ts index a7a12cf8..16e140a5 100644 --- a/src/nitro/room/object/visualization/room/RoomPlane.ts +++ b/src/nitro/room/object/visualization/room/RoomPlane.ts @@ -76,10 +76,10 @@ export class RoomPlane implements IRoomPlane this._bitmapMasksOld = []; this._rectangleMasksOld = []; this._randomSeed = randomSeed; - this._bitmapData = null; - this._maskBitmapData = null; - this._maskChanged = false; - this._activeTexture = null; + this._bitmapData = null; + this._maskBitmapData = null; + this._maskChanged = false; + this._activeTexture = null; this._origin = new Vector3d(); this._origin.assign(origin); this._location = new Vector3d(); @@ -108,24 +108,24 @@ export class RoomPlane implements IRoomPlane this._secondaryNormals.push(vector); } } - this._disposed = false; - this._isVisible = false; - this._id = null; + this._disposed = false; + this._isVisible = false; + this._id = null; this._hasTexture = true; - this._geometryUpdateId = -1; + this._geometryUpdateId = -1; this._offset = new Point(); this._relativeDepth = 0; this._type = type; - this._color = 0; - this._rasterizer = null; - this._canBeVisible = true; + this._color = 0; + this._rasterizer = null; + this._canBeVisible = true; this._textures = new Map(); this._cornerA = new Vector3d(); this._cornerB = new Vector3d(); this._cornerC = new Vector3d(); this._cornerD = new Vector3d(); - this._width = 0; - this._height = 0; + this._width = 0; + this._height = 0; this._textureOffsetX = textureOffsetX; this._textureOffsetY = textureOffsetY; this._textureMaxX = textureMaxX; @@ -277,19 +277,19 @@ export class RoomPlane implements IRoomPlane this._textures = null; } - this._activeTexture = null; - this._location = null; - this._origin = null; - this._leftSide = null; - this._rightSide = null; - this._normal = null; - this._rasterizer = null; - this._cornerA = null; - this._cornerB = null; - this._cornerC = null; - this._cornerD = null; - this._bitmapMasks = null; - this._rectangleMasks = null; + this._activeTexture = null; + this._location = null; + this._origin = null; + this._leftSide = null; + this._rightSide = null; + this._normal = null; + this._rasterizer = null; + this._cornerA = null; + this._cornerB = null; + this._cornerC = null; + this._cornerD = null; + this._bitmapMasks = null; + this._rectangleMasks = null; if(this._maskBitmapData) { @@ -466,13 +466,13 @@ export class RoomPlane implements IRoomPlane if(assetName) { - const position = k.getCoordinatePosition(this._normal); - const asset = planeMask.getGraphicAsset(k.scale, position); + const position = k.getCoordinatePosition(this._normal); + const asset = planeMask.getGraphicAsset(k.scale, position); if(asset) { - const _local_3 = (this._maskBitmapData.width * (1 - (mask.leftSideLoc / this._leftSide.length))); - const _local_4 = (this._maskBitmapData.height * (1 - (mask.rightSideLoc / this._rightSide.length))); + const _local_3 = (this._maskBitmapData.width * (1 - (mask.leftSideLoc / this._leftSide.length))); + const _local_4 = (this._maskBitmapData.height * (1 - (mask.rightSideLoc / this._rightSide.length))); const _local_11 = new Point((_local_3 + asset.offsetX), (_local_4 + asset.offsetY)); _local_5.addMask(assetName, _local_11, asset.flipH, asset.flipV); @@ -499,8 +499,8 @@ export class RoomPlane implements IRoomPlane if(this._isVisible) { - const maskData = this.resolveMasks(geometry); - const layers = this._rasterizer.getLayers(this._id); + const maskData = this.resolveMasks(geometry); + const layers = this._rasterizer.getLayers(this._id); let i = 0; @@ -512,10 +512,10 @@ export class RoomPlane implements IRoomPlane { if(this._hasTexture && layer.getMaterial()) { - const normal = geometry.getCoordinatePosition(this._normal); - const cm = layer.getMaterial().getMaterialCellMatrix(normal); + const normal = geometry.getCoordinatePosition(this._normal); + const cm = layer.getMaterial().getMaterialCellMatrix(normal); //const data = new PlaneDrawingData(maskData, blend(this._color, layer.getColor()), cm.isBottomAligned()); - const data = new PlaneDrawingData(maskData, this._color, cm.isBottomAligned()); + const data = new PlaneDrawingData(maskData, this._color, cm.isBottomAligned()); Randomizer.setSeed(this._randomSeed); @@ -632,8 +632,8 @@ export class RoomPlane implements IRoomPlane } this._relativeDepth = relativeDepth; - this._isVisible = true; - this._geometryUpdateId = geometry.updateId; + this._isVisible = true; + this._geometryUpdateId = geometry.updateId; } if(geometryChanged || this.needsNewTexture(geometry, timeSinceStartMs)) @@ -894,8 +894,8 @@ export class RoomPlane implements IRoomPlane if(((!this._useMask) || ((!this._bitmapMasks.length && !this._rectangleMasks.length) && !this._maskChanged)) || !this._maskManager) return; - const width = texture.width; - const height = texture.height; + const width = texture.width; + const height = texture.height; this.updateMaskChangeStatus(); @@ -920,7 +920,7 @@ export class RoomPlane implements IRoomPlane if(this._maskChanged) { - this._bitmapMasksOld = []; + this._bitmapMasksOld = []; this._rectangleMasksOld = []; if(this._maskBitmapData) @@ -935,10 +935,10 @@ export class RoomPlane implements IRoomPlane const normal = geometry.getCoordinatePosition(this._normal); - let type: string = null; - let posX = 0; - let posY = 0; - let i = 0; + let type: string = null; + let posX = 0; + let posY = 0; + let i = 0; while(i < this._bitmapMasks.length) { @@ -965,11 +965,11 @@ export class RoomPlane implements IRoomPlane if(rectMask) { - posX = (this._maskBitmapData.width - ((this._maskBitmapData.width * rectMask.leftSideLoc) / this._leftSide.length)); - posY = (this._maskBitmapData.height - ((this._maskBitmapData.height * rectMask.rightSideLoc) / this._rightSide.length)); + posX = (this._maskBitmapData.width - ((this._maskBitmapData.width * rectMask.leftSideLoc) / this._leftSide.length)); + posY = (this._maskBitmapData.height - ((this._maskBitmapData.height * rectMask.rightSideLoc) / this._rightSide.length)); - const wd = ((this._maskBitmapData.width * rectMask.leftSideLength) / this._leftSide.length); - const ht = ((this._maskBitmapData.height * rectMask.rightSideLength) / this._rightSide.length); + const wd = ((this._maskBitmapData.width * rectMask.leftSideLength) / this._leftSide.length); + const ht = ((this._maskBitmapData.height * rectMask.rightSideLength) / this._rightSide.length); this._maskBitmapData .beginFill(0xFF0000) @@ -992,20 +992,20 @@ export class RoomPlane implements IRoomPlane { if(!texture || !mask) return; - const maskCanvas = TextureUtils.generateCanvas(mask); + const maskCanvas = TextureUtils.generateCanvas(mask); const textureCanvas = TextureUtils.generateCanvas(texture); - const textureCtx = textureCanvas.getContext('2d'); + const textureCtx = textureCanvas.getContext('2d'); textureCtx.drawImage(maskCanvas, 0, 0); - const textureImageData = textureCtx.getImageData(0, 0, textureCanvas.width, textureCanvas.height); - const data = textureImageData.data; + const textureImageData = textureCtx.getImageData(0, 0, textureCanvas.width, textureCanvas.height); + const data = textureImageData.data; for(let i = 0; i < data.length; i += 4) { - const red = data[ i ]; + const red = data[ i ]; const green = data[ i + 1 ]; - const blue = data[ i + 2 ]; + const blue = data[ i + 2 ]; const alpha = data[ i + 3 ]; if(!red && !green && !blue) data[ i + 3 ] = 0; diff --git a/src/nitro/room/object/visualization/room/RoomPlaneBitmapMask.ts b/src/nitro/room/object/visualization/room/RoomPlaneBitmapMask.ts index fb725f35..f2164042 100644 --- a/src/nitro/room/object/visualization/room/RoomPlaneBitmapMask.ts +++ b/src/nitro/room/object/visualization/room/RoomPlaneBitmapMask.ts @@ -6,9 +6,9 @@ constructor(k: string, _arg_2: number, _arg_3: number) { - this._type = k; - this._leftSideLoc = _arg_2; - this._rightSideLoc = _arg_3; + this._type = k; + this._leftSideLoc = _arg_2; + this._rightSideLoc = _arg_3; } public get type(): string diff --git a/src/nitro/room/object/visualization/room/RoomPlaneRectangleMask.ts b/src/nitro/room/object/visualization/room/RoomPlaneRectangleMask.ts index 1647c479..807dc200 100644 --- a/src/nitro/room/object/visualization/room/RoomPlaneRectangleMask.ts +++ b/src/nitro/room/object/visualization/room/RoomPlaneRectangleMask.ts @@ -7,10 +7,10 @@ constructor(k: number, _arg_2: number, _arg_3: number, _arg_4: number) { - this._leftSideLoc = k; - this._rightSideLoc = _arg_2; - this._leftSideLength = _arg_3; - this._rightSideLength = _arg_4; + this._leftSideLoc = k; + this._rightSideLoc = _arg_2; + this._leftSideLength = _arg_3; + this._rightSideLength = _arg_4; } public get leftSideLoc(): number diff --git a/src/nitro/room/object/visualization/room/RoomVisualization.ts b/src/nitro/room/object/visualization/room/RoomVisualization.ts index 3621528f..5901b3bd 100644 --- a/src/nitro/room/object/visualization/room/RoomVisualization.ts +++ b/src/nitro/room/object/visualization/room/RoomVisualization.ts @@ -27,17 +27,17 @@ export class RoomVisualization extends RoomObjectSpriteVisualization implements public static RENDER_TEXTURE_CACHE: Map> = new Map(); - public static FLOOR_COLOR: number = 0xFFFFFF; - public static FLOOR_COLOR_LEFT: number = 0xDDDDDD; - public static FLOOR_COLOR_RIGHT: number = 0xBBBBBB; - private static WALL_COLOR_TOP: number = 0xFFFFFF; - private static WALL_COLOR_SIDE: number = 0xCCCCCC; - private static WALL_COLOR_BOTTOM: number = 0x999999; - private static WALL_COLOR_BORDER: number = 0x999999; - public static LANDSCAPE_COLOR_TOP: number = 0xFFFFFF; - public static LANDSCAPE_COLOR_SIDE: number = 0xCCCCCC; - public static LANDSCAPE_COLOR_BOTTOM: number = 0x999999; - private static ROOM_DEPTH_OFFSET: number = 1000; + public static FLOOR_COLOR: number = 0xFFFFFF; + public static FLOOR_COLOR_LEFT: number = 0xDDDDDD; + public static FLOOR_COLOR_RIGHT: number = 0xBBBBBB; + private static WALL_COLOR_TOP: number = 0xFFFFFF; + private static WALL_COLOR_SIDE: number = 0xCCCCCC; + private static WALL_COLOR_BOTTOM: number = 0x999999; + private static WALL_COLOR_BORDER: number = 0x999999; + public static LANDSCAPE_COLOR_TOP: number = 0xFFFFFF; + public static LANDSCAPE_COLOR_SIDE: number = 0xCCCCCC; + public static LANDSCAPE_COLOR_BOTTOM: number = 0x999999; + private static ROOM_DEPTH_OFFSET: number = 1000; protected _data: RoomVisualizationData; @@ -75,41 +75,41 @@ export class RoomVisualization extends RoomObjectSpriteVisualization implements { super(); - this._data = null; + this._data = null; - this._roomPlaneParser = new RoomPlaneParser(); + this._roomPlaneParser = new RoomPlaneParser(); this._roomPlaneBitmapMaskParser = new RoomPlaneBitmapMaskParser(); - this._geometryUpdateId = -1; - this._directionX = 0; - this._directionY = 0; - this._directionZ = 0; - this._floorThickness = 1; - this._wallThickness = 1; - this._holeUpdateTime = NaN; - this._planes = []; - this._visiblePlanes = []; - this._visiblePlaneSpriteNumbers = []; - this._roomScale = 0; - this._lastUpdateTime = -1000; - this._updateIntervalTime = 250; - this._wallType = null; - this._floorType = null; - this._landscapeType = null; - this._colorBackgroundOnly = true; - this._color = 0xFFFFFF; - this._redColor = 0xFF; - this._greenColor = 0xFF; - this._blueColor = 0xFF; - this._typeVisibility = []; - this._assetUpdateCounter = 0; - this._maskData = null; - this._isPlaneSet = false; + this._geometryUpdateId = -1; + this._directionX = 0; + this._directionY = 0; + this._directionZ = 0; + this._floorThickness = 1; + this._wallThickness = 1; + this._holeUpdateTime = NaN; + this._planes = []; + this._visiblePlanes = []; + this._visiblePlaneSpriteNumbers = []; + this._roomScale = 0; + this._lastUpdateTime = -1000; + this._updateIntervalTime = 250; + this._wallType = null; + this._floorType = null; + this._landscapeType = null; + this._colorBackgroundOnly = true; + this._color = 0xFFFFFF; + this._redColor = 0xFF; + this._greenColor = 0xFF; + this._blueColor = 0xFF; + this._typeVisibility = []; + this._assetUpdateCounter = 0; + this._maskData = null; + this._isPlaneSet = false; - this._typeVisibility[RoomPlane.TYPE_UNDEFINED] = false; - this._typeVisibility[RoomPlane.TYPE_FLOOR] = true; - this._typeVisibility[RoomPlane.TYPE_WALL] = true; - this._typeVisibility[RoomPlane.TYPE_LANDSCAPE] = true; + this._typeVisibility[RoomPlane.TYPE_UNDEFINED] = false; + this._typeVisibility[RoomPlane.TYPE_FLOOR] = true; + this._typeVisibility[RoomPlane.TYPE_WALL] = true; + this._typeVisibility[RoomPlane.TYPE_LANDSCAPE] = true; } public static getTextureCache(key: any): RenderTexture @@ -156,9 +156,9 @@ export class RoomVisualization extends RoomObjectSpriteVisualization implements this.clearPlanes(); - this._planes = null; - this._visiblePlanes = null; - this._visiblePlaneSpriteNumbers = null; + this._planes = null; + this._visiblePlanes = null; + this._visiblePlaneSpriteNumbers = null; if(this._roomPlaneParser) { @@ -200,12 +200,12 @@ export class RoomVisualization extends RoomObjectSpriteVisualization implements { super.reset(); - this._floorType = null; - this._wallType = null; - this._landscapeType = null; - this._maskData = null; - this._geometryUpdateId = -1; - this._roomScale = 0; + this._floorType = null; + this._wallType = null; + this._landscapeType = null; + this._maskData = null; + this._geometryUpdateId = -1; + this._roomScale = 0; } public update(geometry: IRoomGeometry, time: number, update: boolean, skipUpdate: boolean): void @@ -220,8 +220,8 @@ export class RoomVisualization extends RoomObjectSpriteVisualization implements if(existing) removeCount = existing.length; - const geometryUpdate = this.updateGeometry(geometry); - const objectModel = this.object.model; + const geometryUpdate = this.updateGeometry(geometry); + const objectModel = this.object.model; let needsUpdate = false; @@ -266,9 +266,9 @@ export class RoomVisualization extends RoomObjectSpriteVisualization implements while(index < this._visiblePlanes.length) { - const spriteIndex = this._visiblePlaneSpriteNumbers[index]; - const sprite = this.getSprite(spriteIndex); - const plane = this._visiblePlanes[index]; + const spriteIndex = this._visiblePlaneSpriteNumbers[index]; + const sprite = this.getSprite(spriteIndex); + const plane = this._visiblePlanes[index]; if(sprite && plane && (plane.type !== RoomPlane.TYPE_LANDSCAPE)) { @@ -298,7 +298,7 @@ export class RoomVisualization extends RoomObjectSpriteVisualization implements } this.updateModelCounter = objectModel.updateCounter; - this._lastUpdateTime = time; + this._lastUpdateTime = time; } private updateGeometry(k: IRoomGeometry): boolean @@ -307,17 +307,17 @@ export class RoomVisualization extends RoomObjectSpriteVisualization implements if(this._geometryUpdateId === k.updateId) return false; - this._geometryUpdateId = k.updateId; + this._geometryUpdateId = k.updateId; this._boundingRectangle = null; const direction = k.direction; if(direction && ((direction.x !== this._directionX) || (direction.y !== this._directionY) || (direction.z !== this._directionZ) || (k.scale !== this._roomScale))) { - this._directionX = direction.x; - this._directionY = direction.y; - this._directionZ = direction.z; - this._roomScale = k.scale; + this._directionX = direction.x; + this._directionY = direction.y; + this._directionZ = direction.z; + this._roomScale = k.scale; return true; } @@ -329,13 +329,13 @@ export class RoomVisualization extends RoomObjectSpriteVisualization implements { if(this.updateModelCounter === k.updateCounter) return false; - const floorThickness = k.getValue(RoomObjectVariable.ROOM_FLOOR_THICKNESS); - const wallThickness = k.getValue(RoomObjectVariable.ROOM_WALL_THICKNESS); + const floorThickness = k.getValue(RoomObjectVariable.ROOM_FLOOR_THICKNESS); + const wallThickness = k.getValue(RoomObjectVariable.ROOM_WALL_THICKNESS); if((!isNaN(floorThickness) && !isNaN(wallThickness)) && ((floorThickness !== this._floorThickness) || (wallThickness !== this._wallThickness))) { - this._floorThickness = floorThickness; - this._wallThickness = wallThickness; + this._floorThickness = floorThickness; + this._wallThickness = wallThickness; this.clearPlanes(); @@ -384,10 +384,10 @@ export class RoomVisualization extends RoomObjectSpriteVisualization implements if(backgroundColor !== this._color) { - this._color = backgroundColor; - this._redColor = (this._color & 0xFF); - this._greenColor = ((this._color >> 8) & 0xFF); - this._blueColor = ((this._color >> 16) & 0xFF); + this._color = backgroundColor; + this._redColor = (this._color & 0xFF); + this._greenColor = ((this._color >> 8) & 0xFF); + this._blueColor = ((this._color >> 16) & 0xFF); didUpdate = true; } @@ -408,15 +408,15 @@ export class RoomVisualization extends RoomObjectSpriteVisualization implements { if(this.updateModelCounter === model.updateCounter) return false; - const floorType = model.getValue(RoomObjectVariable.ROOM_FLOOR_TYPE); - const wallType = model.getValue(RoomObjectVariable.ROOM_WALL_TYPE); + const floorType = model.getValue(RoomObjectVariable.ROOM_FLOOR_TYPE); + const wallType = model.getValue(RoomObjectVariable.ROOM_WALL_TYPE); const landscapeType = model.getValue(RoomObjectVariable.ROOM_LANDSCAPE_TYPE); this.updatePlaneTypes(floorType, wallType, landscapeType); - const floorVisibility = (model.getValue(RoomObjectVariable.ROOM_FLOOR_VISIBILITY) === 1); - const wallVisibility = (model.getValue(RoomObjectVariable.ROOM_WALL_VISIBILITY) === 1); - const landscapeVisibility = (model.getValue(RoomObjectVariable.ROOM_LANDSCAPE_VISIBILITY) === 1); + const floorVisibility = (model.getValue(RoomObjectVariable.ROOM_FLOOR_VISIBILITY) === 1); + const wallVisibility = (model.getValue(RoomObjectVariable.ROOM_WALL_VISIBILITY) === 1); + const landscapeVisibility = (model.getValue(RoomObjectVariable.ROOM_LANDSCAPE_VISIBILITY) === 1); this.updatePlaneVisibility(floorVisibility, wallVisibility, landscapeVisibility); @@ -440,8 +440,8 @@ export class RoomVisualization extends RoomObjectSpriteVisualization implements this._planes = []; } - this._isPlaneSet = false; - this._assetUpdateCounter = (this._assetUpdateCounter + 1); + this._isPlaneSet = false; + this._assetUpdateCounter = (this._assetUpdateCounter + 1); this.reset(); } @@ -460,17 +460,17 @@ export class RoomVisualization extends RoomObjectSpriteVisualization implements const _local_3 = this.getLandscapeWidth(); const _local_4 = this.getLandscapeHeight(); - let _local_5 = 0; - let randomSeed = this.object.model.getValue(RoomObjectVariable.ROOM_RANDOM_SEED); - let index = 0; + let _local_5 = 0; + let randomSeed = this.object.model.getValue(RoomObjectVariable.ROOM_RANDOM_SEED); + let index = 0; while(index < this._roomPlaneParser.planeCount) { - const location = this._roomPlaneParser.getPlaneLocation(index); - const leftSide = this._roomPlaneParser.getPlaneLeftSide(index); - const rightSide = this._roomPlaneParser.getPlaneRightSide(index); - const secondaryNormals = this._roomPlaneParser.getPlaneSecondaryNormals(index); - const planeType = this._roomPlaneParser.getPlaneType(index); + const location = this._roomPlaneParser.getPlaneLocation(index); + const leftSide = this._roomPlaneParser.getPlaneLeftSide(index); + const rightSide = this._roomPlaneParser.getPlaneRightSide(index); + const secondaryNormals = this._roomPlaneParser.getPlaneSecondaryNormals(index); + const planeType = this._roomPlaneParser.getPlaneType(index); let plane: RoomPlane = null; @@ -478,8 +478,8 @@ export class RoomVisualization extends RoomObjectSpriteVisualization implements { const _local_14 = Vector3d.crossProduct(leftSide, rightSide); - randomSeed = ((randomSeed * 7613) + 517); - plane = null; + randomSeed = ((randomSeed * 7613) + 517); + plane = null; if(planeType === RoomPlaneData.PLANE_FLOOR) { @@ -641,8 +641,8 @@ export class RoomVisualization extends RoomObjectSpriteVisualization implements while(planeIndex < this._planes.length) { - const plane = this._planes[planeIndex]; - const sprite = this.getSprite(planeIndex); + const plane = this._planes[planeIndex]; + const sprite = this.getSprite(planeIndex); if(plane && sprite && plane.leftSide && plane.rightSide) { @@ -679,8 +679,8 @@ export class RoomVisualization extends RoomObjectSpriteVisualization implements private getLandscapeWidth(): number { - let length = 0; - let index = 0; + let length = 0; + let index = 0; while(index < this._roomPlaneParser.planeCount) { @@ -701,8 +701,8 @@ export class RoomVisualization extends RoomObjectSpriteVisualization implements private getLandscapeHeight(): number { - let length = 0; - let index = 0; + let length = 0; + let index = 0; while(index < this._roomPlaneParser.planeCount) { @@ -770,9 +770,9 @@ export class RoomVisualization extends RoomObjectSpriteVisualization implements { if((k === this._typeVisibility[RoomPlane.TYPE_FLOOR]) && (_arg_2 === this._typeVisibility[RoomPlane.TYPE_WALL]) && (_arg_3 === this._typeVisibility[RoomPlane.TYPE_LANDSCAPE])) return; - this._typeVisibility[RoomPlane.TYPE_FLOOR] = k; - this._typeVisibility[RoomPlane.TYPE_WALL] = _arg_2; - this._typeVisibility[RoomPlane.TYPE_LANDSCAPE] = _arg_3; + this._typeVisibility[RoomPlane.TYPE_FLOOR] = k; + this._typeVisibility[RoomPlane.TYPE_WALL] = _arg_2; + this._typeVisibility[RoomPlane.TYPE_LANDSCAPE] = _arg_3; this._visiblePlanes = []; this._visiblePlaneSpriteNumbers = []; @@ -796,9 +796,9 @@ export class RoomVisualization extends RoomObjectSpriteVisualization implements if(!this._visiblePlanes.length) _local_6 = this._planes; - let depth = 0; + let depth = 0; let updated = false; - let index = 0; + let index = 0; while(index < _local_6.length) { @@ -877,8 +877,8 @@ export class RoomVisualization extends RoomObjectSpriteVisualization implements const _local_4: number[] = []; const _local_5: number[] = []; - let _local_6 = false; - let index = 0; + let _local_6 = false; + let index = 0; while(index < this._planes.length) { @@ -896,9 +896,9 @@ export class RoomVisualization extends RoomObjectSpriteVisualization implements for(const mask of this._roomPlaneBitmapMaskParser.masks.values()) { - const maskType = this._roomPlaneBitmapMaskParser.getMaskType(mask); - const maskLocation = this._roomPlaneBitmapMaskParser.getMaskLocation(mask); - const maskCategory = this._roomPlaneBitmapMaskParser.getMaskCategory(mask); + const maskType = this._roomPlaneBitmapMaskParser.getMaskType(mask); + const maskLocation = this._roomPlaneBitmapMaskParser.getMaskLocation(mask); + const maskCategory = this._roomPlaneBitmapMaskParser.getMaskCategory(mask); if(maskLocation) { @@ -957,8 +957,8 @@ export class RoomVisualization extends RoomObjectSpriteVisualization implements { const plane = this._planes[planeIndex]; - plane.canBeVisible = false; - _local_6 = true; + plane.canBeVisible = false; + _local_6 = true; } index++; @@ -975,12 +975,12 @@ export class RoomVisualization extends RoomObjectSpriteVisualization implements { const offset = _arg_2.offset; - k.offsetX = -(offset.x); - k.offsetY = -(offset.y); - k.relativeDepth = _arg_4; - k.color = _arg_2.color; - k.texture = this.getPlaneBitmap(_arg_2, _arg_3); - k.name = ((_arg_3 + '_') + this._assetUpdateCounter); + k.offsetX = -(offset.x); + k.offsetY = -(offset.y); + k.relativeDepth = _arg_4; + k.color = _arg_2.color; + k.texture = this.getPlaneBitmap(_arg_2, _arg_3); + k.name = ((_arg_3 + '_') + this._assetUpdateCounter); } private getPlaneBitmap(k: RoomPlane, _arg_2: string): Texture diff --git a/src/nitro/room/object/visualization/room/RoomVisualizationData.ts b/src/nitro/room/object/visualization/room/RoomVisualizationData.ts index e4bf9cbd..303f6189 100644 --- a/src/nitro/room/object/visualization/room/RoomVisualizationData.ts +++ b/src/nitro/room/object/visualization/room/RoomVisualizationData.ts @@ -19,11 +19,11 @@ export class RoomVisualizationData extends Disposable implements IObjectVisualiz { super(); - this._wallRasterizer = new WallRasterizer(); - this._floorRasterizer = new FloorRasterizer(); - this._landscapeRasterizer = new LandscapeRasterizer(); - this._maskManager = new PlaneMaskManager(); - this._initialized = false; + this._wallRasterizer = new WallRasterizer(); + this._floorRasterizer = new FloorRasterizer(); + this._landscapeRasterizer = new LandscapeRasterizer(); + this._maskManager = new PlaneMaskManager(); + this._initialized = false; } public initialize(asset: IAssetData): boolean diff --git a/src/nitro/room/object/visualization/room/mask/PlaneMask.ts b/src/nitro/room/object/visualization/room/mask/PlaneMask.ts index dabd4e57..5bffa4ef 100644 --- a/src/nitro/room/object/visualization/room/mask/PlaneMask.ts +++ b/src/nitro/room/object/visualization/room/mask/PlaneMask.ts @@ -12,11 +12,11 @@ export class PlaneMask constructor() { - this._sizes = []; - this._maskVisualizations = new Map(); - this._assetNames = new Map(); + this._sizes = []; + this._maskVisualizations = new Map(); + this._assetNames = new Map(); this._lastMaskVisualization = null; - this._lastSize = -1; + this._lastSize = -1; } public dispose(): void @@ -34,7 +34,7 @@ export class PlaneMask } this._lastMaskVisualization = null; - this._sizes = null; + this._sizes = null; } public createMaskVisualization(size: number): PlaneMaskVisualization @@ -55,8 +55,8 @@ export class PlaneMask private getSizeIndex(k: number): number { - let sizeIndex = 0; - const index = 1; + let sizeIndex = 0; + const index = 1; while(index < this._sizes.length) { diff --git a/src/nitro/room/object/visualization/room/mask/PlaneMaskBitmap.ts b/src/nitro/room/object/visualization/room/mask/PlaneMaskBitmap.ts index 2432408b..8f509443 100644 --- a/src/nitro/room/object/visualization/room/mask/PlaneMaskBitmap.ts +++ b/src/nitro/room/object/visualization/room/mask/PlaneMaskBitmap.ts @@ -13,11 +13,11 @@ export class PlaneMaskBitmap constructor(k: IGraphicAsset, _arg_2: number = -1, _arg_3: number = 1, _arg_4: number = -1, _arg_5: number = 1) { - this._normalMinX = _arg_2; - this._normalMaxX = _arg_3; - this._normalMinY = _arg_4; - this._normalMaxY = _arg_5; - this._asset = k; + this._normalMinX = _arg_2; + this._normalMaxX = _arg_3; + this._normalMinY = _arg_4; + this._normalMaxY = _arg_5; + this._asset = k; } public get asset(): IGraphicAsset diff --git a/src/nitro/room/object/visualization/room/mask/PlaneMaskManager.ts b/src/nitro/room/object/visualization/room/mask/PlaneMaskManager.ts index 61f9e551..1f7a1699 100644 --- a/src/nitro/room/object/visualization/room/mask/PlaneMaskManager.ts +++ b/src/nitro/room/object/visualization/room/mask/PlaneMaskManager.ts @@ -13,9 +13,9 @@ export class PlaneMaskManager constructor() { - this._assetCollection = null; - this._masks = new Map(); - this._data = null; + this._assetCollection = null; + this._masks = new Map(); + this._data = null; } public get data(): any @@ -25,8 +25,8 @@ export class PlaneMaskManager public dispose(): void { - this._assetCollection = null; - this._data = null; + this._assetCollection = null; + this._data = null; if(this._masks && this._masks.size) { @@ -69,8 +69,8 @@ export class PlaneMaskManager if(mask) { - const id = mask.id; - const existing = this._masks.get(id); + const id = mask.id; + const existing = this._masks.get(id); if(existing) continue; @@ -86,7 +86,7 @@ export class PlaneMaskManager if(visualization) { - const size = visualization.size as number; + const size = visualization.size as number; const maskVisualization = newMask.createMaskVisualization(size); if(maskVisualization) @@ -120,14 +120,14 @@ export class PlaneMaskManager if(!bitmap) continue; const assetName = bitmap.assetName; - const asset = _arg_3.getAsset(assetName); + const asset = _arg_3.getAsset(assetName); if(!asset) continue; - let normalMinX = PlaneMaskVisualization.MIN_NORMAL_COORDINATE_VALUE; - let normalMaxX = PlaneMaskVisualization.MAX_NORMAL_COORDINATE_VALUE; - let normalMinY = PlaneMaskVisualization.MIN_NORMAL_COORDINATE_VALUE; - let normalMaxY = PlaneMaskVisualization.MAX_NORMAL_COORDINATE_VALUE; + let normalMinX = PlaneMaskVisualization.MIN_NORMAL_COORDINATE_VALUE; + let normalMaxX = PlaneMaskVisualization.MAX_NORMAL_COORDINATE_VALUE; + let normalMinY = PlaneMaskVisualization.MIN_NORMAL_COORDINATE_VALUE; + let normalMaxY = PlaneMaskVisualization.MAX_NORMAL_COORDINATE_VALUE; if(bitmap.normalMinX !== undefined) normalMinX = bitmap.normalMinX; if(bitmap.normalMaxX !== undefined) normalMaxX = bitmap.normalMaxX; diff --git a/src/nitro/room/object/visualization/room/rasterizer/animated/AnimationItem.ts b/src/nitro/room/object/visualization/room/rasterizer/animated/AnimationItem.ts index 862e6071..cdaf94cd 100644 --- a/src/nitro/room/object/visualization/room/rasterizer/animated/AnimationItem.ts +++ b/src/nitro/room/object/visualization/room/rasterizer/animated/AnimationItem.ts @@ -11,11 +11,11 @@ export class AnimationItem constructor(k: number, _arg_2: number, _arg_3: number, _arg_4: number, _arg_5: IGraphicAsset) { - this._x = k; - this._y = _arg_2; - this._speedX = _arg_3; - this._speedY = _arg_4; - this._bitmapData = _arg_5; + this._x = k; + this._y = _arg_2; + this._speedX = _arg_3; + this._speedY = _arg_4; + this._bitmapData = _arg_5; if(isNaN(this._x)) this._x = 0; diff --git a/src/nitro/room/object/visualization/room/rasterizer/animated/LandscapePlane.ts b/src/nitro/room/object/visualization/room/rasterizer/animated/LandscapePlane.ts index 7075555b..7d9981b5 100644 --- a/src/nitro/room/object/visualization/room/rasterizer/animated/LandscapePlane.ts +++ b/src/nitro/room/object/visualization/room/rasterizer/animated/LandscapePlane.ts @@ -29,8 +29,8 @@ export class LandscapePlane extends Plane if((k !== this._width) || (_arg_2 !== this._height)) { - this._width = k; - this._height = _arg_2; + this._width = k; + this._height = _arg_2; } } diff --git a/src/nitro/room/object/visualization/room/rasterizer/animated/LandscapeRasterizer.ts b/src/nitro/room/object/visualization/room/rasterizer/animated/LandscapeRasterizer.ts index 5a9e6cdd..e6ee6409 100644 --- a/src/nitro/room/object/visualization/room/rasterizer/animated/LandscapeRasterizer.ts +++ b/src/nitro/room/object/visualization/room/rasterizer/animated/LandscapeRasterizer.ts @@ -21,8 +21,8 @@ export class LandscapeRasterizer extends PlaneRasterizer if(_arg_2 < 0) _arg_2 = 0; - this._landscapeWidth = k; - this._landscapeHeight = _arg_2; + this._landscapeWidth = k; + this._landscapeHeight = _arg_2; return true; } @@ -48,8 +48,8 @@ export class LandscapeRasterizer extends PlaneRasterizer if(!landscape) continue; - const id = landscape.id; - const visualizations = landscape.animatedVisualizations; + const id = landscape.id; + const visualizations = landscape.animatedVisualizations; const plane = new LandscapePlane(); @@ -60,16 +60,16 @@ export class LandscapeRasterizer extends PlaneRasterizer const size = visualization.size; let horizontalAngle = LandscapePlane.HORIZONTAL_ANGLE_DEFAULT; - let verticalAngle = LandscapePlane.VERTICAL_ANGLE_DEFAULT; + let verticalAngle = LandscapePlane.VERTICAL_ANGLE_DEFAULT; - if(visualization.horizontalAngle) horizontalAngle = visualization.horizontalAngle; - if(visualization.verticalAngle) verticalAngle = visualization.verticalAngle; + if(visualization.horizontalAngle) horizontalAngle = visualization.horizontalAngle; + if(visualization.verticalAngle) verticalAngle = visualization.verticalAngle; - const basicLayers = visualization.layers; - const animatedLayers = visualization.animationLayers; - const totalBasicLayers = ((basicLayers && basicLayers.length) || 0); - const totalAnimatedLayers = ((animatedLayers && animatedLayers.length) || 0); - const totalLayers = (totalBasicLayers + totalAnimatedLayers); + const basicLayers = visualization.layers; + const animatedLayers = visualization.animationLayers; + const totalBasicLayers = ((basicLayers && basicLayers.length) || 0); + const totalAnimatedLayers = ((animatedLayers && animatedLayers.length) || 0); + const totalLayers = (totalBasicLayers + totalAnimatedLayers); const planeVisualization = plane.createPlaneVisualization(size, (totalLayers || 0), this.getGeometry(size, horizontalAngle, verticalAngle)); @@ -87,10 +87,10 @@ export class LandscapeRasterizer extends PlaneRasterizer if(layer) { - let material: PlaneMaterial = null; - let align: number = PlaneVisualizationLayer.ALIGN_DEFAULT; - let color: number = LandscapePlane.DEFAULT_COLOR; - let offset: number = PlaneVisualizationLayer.DEFAULT_OFFSET; + let material: PlaneMaterial = null; + let align: number = PlaneVisualizationLayer.ALIGN_DEFAULT; + let color: number = LandscapePlane.DEFAULT_COLOR; + let offset: number = PlaneVisualizationLayer.DEFAULT_OFFSET; if(layer.materialId) material = this.getMaterial(layer.materialId); @@ -135,12 +135,12 @@ export class LandscapeRasterizer extends PlaneRasterizer { if(item) { - const id = item.id; - const assetId = item.assetId; - const x = this.getCoordinateValue(item.x || '', item.randomX || ''); - const y = this.getCoordinateValue(item.y || '', item.randomY || ''); - const speedX = item.speedX ? item.speedX / Nitro.instance.getConfiguration('system.animation.fps') : 0; - const speedY = item.speedY ? item.speedY / Nitro.instance.getConfiguration('system.animation.fps') : 0; + const id = item.id; + const assetId = item.assetId; + const x = this.getCoordinateValue(item.x || '', item.randomX || ''); + const y = this.getCoordinateValue(item.y || '', item.randomY || ''); + const speedX = item.speedX ? item.speedX / Nitro.instance.getConfiguration('system.animation.fps') : 0; + const speedY = item.speedY ? item.speedY / Nitro.instance.getConfiguration('system.animation.fps') : 0; animationItems.push({ asset: assetId, @@ -182,9 +182,9 @@ export class LandscapeRasterizer extends PlaneRasterizer if((_arg_2.length > 0)) { - const _local_4 = 10000; - const _local_5 = Randomizer.getValues(1, 0, _local_4); - const _local_6 = (_local_5[0] / _local_4); + const _local_4 = 10000; + const _local_5 = Randomizer.getValues(1, 0, _local_4); + const _local_6 = (_local_5[0] / _local_4); if(_arg_2.charAt((_arg_2.length - 1)) === '%') { diff --git a/src/nitro/room/object/visualization/room/rasterizer/animated/PlaneVisualizationAnimationLayer.ts b/src/nitro/room/object/visualization/room/rasterizer/animated/PlaneVisualizationAnimationLayer.ts index 178f09d2..fee11632 100644 --- a/src/nitro/room/object/visualization/room/rasterizer/animated/PlaneVisualizationAnimationLayer.ts +++ b/src/nitro/room/object/visualization/room/rasterizer/animated/PlaneVisualizationAnimationLayer.ts @@ -14,10 +14,10 @@ export class PlaneVisualizationAnimationLayer implements IDisposable constructor(k: any, _arg_2: IGraphicAssetCollection) { - this._color = 0; - this._bitmapData = null; - this._isDisposed = false; - this._items = []; + this._color = 0; + this._bitmapData = null; + this._isDisposed = false; + this._items = []; if(k && _arg_2) { diff --git a/src/nitro/room/object/visualization/room/rasterizer/basic/FloorPlane.ts b/src/nitro/room/object/visualization/room/rasterizer/basic/FloorPlane.ts index 6006c27c..e26c25e8 100644 --- a/src/nitro/room/object/visualization/room/rasterizer/basic/FloorPlane.ts +++ b/src/nitro/room/object/visualization/room/rasterizer/basic/FloorPlane.ts @@ -19,8 +19,8 @@ export class FloorPlane extends Plane const _local_11 = visualization.geometry.getScreenPoint(new Vector3d(0, (height / visualization.geometry.scale), 0)); const _local_12 = visualization.geometry.getScreenPoint(new Vector3d((width / visualization.geometry.scale), 0, 0)); - let x = 0; - let y = 0; + let x = 0; + let y = 0; if(_local_10 && _local_11 && _local_12) { diff --git a/src/nitro/room/object/visualization/room/rasterizer/basic/FloorRasterizer.ts b/src/nitro/room/object/visualization/room/rasterizer/basic/FloorRasterizer.ts index c3a5790f..76fcbf33 100644 --- a/src/nitro/room/object/visualization/room/rasterizer/basic/FloorRasterizer.ts +++ b/src/nitro/room/object/visualization/room/rasterizer/basic/FloorRasterizer.ts @@ -25,9 +25,9 @@ export class FloorRasterizer extends PlaneRasterizer if(!floor) continue; - const id = floor.id; + const id = floor.id; const visualization = floor.visualizations; - const plane = new FloorPlane(); + const plane = new FloorPlane(); this.parseVisualizations(plane, visualization); diff --git a/src/nitro/room/object/visualization/room/rasterizer/basic/Plane.ts b/src/nitro/room/object/visualization/room/rasterizer/basic/Plane.ts index d7e434c6..05912511 100644 --- a/src/nitro/room/object/visualization/room/rasterizer/basic/Plane.ts +++ b/src/nitro/room/object/visualization/room/rasterizer/basic/Plane.ts @@ -11,10 +11,10 @@ export class Plane constructor() { - this._planeVisualizations = new Map(); - this._sizes = []; - this._lastPlaneVisualization = null; - this._lastSize = -1; + this._planeVisualizations = new Map(); + this._sizes = []; + this._lastPlaneVisualization = null; + this._lastSize = -1; } public isStatic(size: number): boolean @@ -31,10 +31,10 @@ export class Plane visualization.dispose(); } - this._planeVisualizations = null; - this._lastPlaneVisualization = null; - this._sizes = null; - this._lastSize = -1; + this._planeVisualizations = null; + this._lastPlaneVisualization = null; + this._sizes = null; + this._lastSize = -1; } public clearCache(): void diff --git a/src/nitro/room/object/visualization/room/rasterizer/basic/PlaneMaterial.ts b/src/nitro/room/object/visualization/room/rasterizer/basic/PlaneMaterial.ts index 972c3bef..e263e1df 100644 --- a/src/nitro/room/object/visualization/room/rasterizer/basic/PlaneMaterial.ts +++ b/src/nitro/room/object/visualization/room/rasterizer/basic/PlaneMaterial.ts @@ -12,8 +12,8 @@ export class PlaneMaterial constructor() { - this._planeMaterialItems = []; - this._isCached = false; + this._planeMaterialItems = []; + this._isCached = false; } public dispose(): void diff --git a/src/nitro/room/object/visualization/room/rasterizer/basic/PlaneMaterialCell.ts b/src/nitro/room/object/visualization/room/rasterizer/basic/PlaneMaterialCell.ts index 5f1daba4..f4894031 100644 --- a/src/nitro/room/object/visualization/room/rasterizer/basic/PlaneMaterialCell.ts +++ b/src/nitro/room/object/visualization/room/rasterizer/basic/PlaneMaterialCell.ts @@ -15,11 +15,11 @@ export class PlaneMaterialCell constructor(texture: PlaneTexture, assets: IGraphicAsset[] = null, offsetPoints: Point[] = null, limit: number = 0) { - this._cachedSprite = null; - this._texture = texture; - this._extraItemOffsets = []; - this._extraItemAssets = []; - this._extraItemCount = 0; + this._cachedSprite = null; + this._texture = texture; + this._extraItemOffsets = []; + this._extraItemAssets = []; + this._extraItemCount = 0; if(assets && assets.length && (limit > 0)) { @@ -76,9 +76,9 @@ export class PlaneMaterialCell this._cachedSprite = null; } - this._extraItemAssets = null; - this._extraItemOffsets = null; - this._extraItemCount = 0; + this._extraItemAssets = null; + this._extraItemOffsets = null; + this._extraItemCount = 0; } public clearCache(): void @@ -125,13 +125,13 @@ export class PlaneMaterialCell if(textureOffsetX) { bitmap.anchor.x = 1; - bitmap.scale.x = -1; + bitmap.scale.x = -1; } if(textureOffsetY) { bitmap.anchor.y = 1; - bitmap.scale.y = -1; + bitmap.scale.y = -1; } } @@ -154,16 +154,16 @@ export class PlaneMaterialCell this._cachedSprite = new NitroSprite(texture); } - const limitMin = Math.min(this._extraItemCount, this._extraItemOffsets.length); - const limitMax = Math.max(this._extraItemCount, this._extraItemOffsets.length); + const limitMin = Math.min(this._extraItemCount, this._extraItemOffsets.length); + const limitMax = Math.max(this._extraItemCount, this._extraItemOffsets.length); const offsetIndexes = Randomizer.getArray(this._extraItemCount, limitMax); let i = 0; while(i < limitMin) { - const offset = this._extraItemOffsets[offsetIndexes[i]]; - const item = this._extraItemAssets[(i % this._extraItemAssets.length)]; + const offset = this._extraItemOffsets[offsetIndexes[i]]; + const item = this._extraItemAssets[(i % this._extraItemAssets.length)]; if(offset && item) { @@ -171,24 +171,24 @@ export class PlaneMaterialCell if(assetTexture) { - const offsetFinal = new Point((offset.x + item.offsetX), (offset.y + item.offsetY)); - const flipMatrix = new Matrix(); + const offsetFinal = new Point((offset.x + item.offsetX), (offset.y + item.offsetY)); + const flipMatrix = new Matrix(); - let x = 1; - let y = 1; - let translateX = 0; - let translateY = 0; + let x = 1; + let y = 1; + let translateX = 0; + let translateY = 0; if(item.flipH) { - x = -1; - translateX = assetTexture.width; + x = -1; + translateX = assetTexture.width; } if(item.flipV) { - y = -1; - translateY = assetTexture.height; + y = -1; + translateY = assetTexture.height; } let offsetX = (offsetFinal.x + translateX); diff --git a/src/nitro/room/object/visualization/room/rasterizer/basic/PlaneMaterialCellColumn.ts b/src/nitro/room/object/visualization/room/rasterizer/basic/PlaneMaterialCellColumn.ts index 508ba008..c8f02b76 100644 --- a/src/nitro/room/object/visualization/room/rasterizer/basic/PlaneMaterialCellColumn.ts +++ b/src/nitro/room/object/visualization/room/rasterizer/basic/PlaneMaterialCellColumn.ts @@ -26,15 +26,15 @@ export class PlaneMaterialCellColumn constructor(width: number, cells: PlaneMaterialCell[], repeatMode: number = 1) { - this._cells = []; - this._repeatMode = repeatMode; - this._width = (width < 1) ? 1 : width; - this._cachedBitmapData = null; - this._cachedBitmapNormal = null; - this._cachedBitmapDataOffsetX = 0; - this._cachedBitmapDataOffsetY = 0; - this._isCached = false; - this._isStatic = true; + this._cells = []; + this._repeatMode = repeatMode; + this._width = (width < 1) ? 1 : width; + this._cachedBitmapData = null; + this._cachedBitmapNormal = null; + this._cachedBitmapDataOffsetX = 0; + this._cachedBitmapDataOffsetY = 0; + this._isCached = false; + this._isStatic = true; if(cells && cells.length) { @@ -132,8 +132,8 @@ export class PlaneMaterialCellColumn if(this._repeatMode == PlaneMaterialCellColumn.REPEAT_MODE_NONE) { - ht = this.getCellsHeight(this._cells, normal); - height = ht; + ht = this.getCellsHeight(this._cells, normal); + height = ht; } if(!this._cachedBitmapNormal) this._cachedBitmapNormal = new Vector3d(); @@ -221,8 +221,8 @@ export class PlaneMaterialCellColumn { if(!cells || !cells.length) return 0; - let height = 0; - let cellIterator = 0; + let height = 0; + let cellIterator = 0; while(cellIterator < cells.length) { diff --git a/src/nitro/room/object/visualization/room/rasterizer/basic/PlaneMaterialCellMatrix.ts b/src/nitro/room/object/visualization/room/rasterizer/basic/PlaneMaterialCellMatrix.ts index 1305456b..96735f5b 100644 --- a/src/nitro/room/object/visualization/room/rasterizer/basic/PlaneMaterialCellMatrix.ts +++ b/src/nitro/room/object/visualization/room/rasterizer/basic/PlaneMaterialCellMatrix.ts @@ -10,18 +10,18 @@ import { PlaneMaterialCellColumn } from './PlaneMaterialCellColumn'; export class PlaneMaterialCellMatrix { - public static REPEAT_MODE_ALL: number = 1; - public static REPEAT_MODE_BORDERS: number = 2; - public static REPEAT_MODE_CENTER: number = 3; - public static REPEAT_MODE_FIRST: number = 4; - public static REPEAT_MODE_LAST: number = 5; - public static REPEAT_MODE_RANDOM: number = 6; - public static REPEAT_MODE_DEFAULT: number = PlaneMaterialCellMatrix.REPEAT_MODE_ALL;//1 - public static MIN_NORMAL_COORDINATE_VALUE: number = -1; - public static MAX_NORMAL_COORDINATE_VALUE: number = 1; - public static ALIGN_TOP: number = 1; - public static ALIGN_BOTTOM: number = 2; - public static ALIGN_DEFAULT: number = PlaneMaterialCellMatrix.ALIGN_TOP;//1 + public static REPEAT_MODE_ALL: number = 1; + public static REPEAT_MODE_BORDERS: number = 2; + public static REPEAT_MODE_CENTER: number = 3; + public static REPEAT_MODE_FIRST: number = 4; + public static REPEAT_MODE_LAST: number = 5; + public static REPEAT_MODE_RANDOM: number = 6; + public static REPEAT_MODE_DEFAULT: number = PlaneMaterialCellMatrix.REPEAT_MODE_ALL;//1 + public static MIN_NORMAL_COORDINATE_VALUE: number = -1; + public static MAX_NORMAL_COORDINATE_VALUE: number = 1; + public static ALIGN_TOP: number = 1; + public static ALIGN_BOTTOM: number = 2; + public static ALIGN_DEFAULT: number = PlaneMaterialCellMatrix.ALIGN_TOP;//1 private _columns: PlaneMaterialCellColumn[]; private _repeatMode: number = 1; @@ -408,8 +408,8 @@ export class PlaneMaterialCellMatrix const totalWidth: number = this.getColumnsWidth(columns); - let x = 0; - let y = 0; + let x = 0; + let y = 0; while(x < canvas.width) { diff --git a/src/nitro/room/object/visualization/room/rasterizer/basic/PlaneRasterizer.ts b/src/nitro/room/object/visualization/room/rasterizer/basic/PlaneRasterizer.ts index dd77a660..7ca1fa3f 100644 --- a/src/nitro/room/object/visualization/room/rasterizer/basic/PlaneRasterizer.ts +++ b/src/nitro/room/object/visualization/room/rasterizer/basic/PlaneRasterizer.ts @@ -32,12 +32,12 @@ export class PlaneRasterizer implements IPlaneRasterizer constructor() { - this._assetCollection = null; - this._textures = new Map(); - this._materials = new Map(); - this._planes = new Map(); - this._geometries = new Map(); - this._data = null; + this._assetCollection = null; + this._textures = new Map(); + this._materials = new Map(); + this._planes = new Map(); + this._geometries = new Map(); + this._data = null; } protected get data(): any @@ -95,8 +95,8 @@ export class PlaneRasterizer implements IPlaneRasterizer this._geometries = null; } - this._data = null; - this._assetCollection = null; + this._data = null; + this._assetCollection = null; } public clearCache(): void @@ -281,8 +281,8 @@ export class PlaneRasterizer implements IPlaneRasterizer { if(!material) continue; - const id = material.id; - const newMaterial = new PlaneMaterial(); + const id = material.id; + const newMaterial = new PlaneMaterial(); if(material.matrices && material.matrices.length) { @@ -290,12 +290,12 @@ export class PlaneRasterizer implements IPlaneRasterizer { if(!matrix) continue; - let repeatMode = matrix.repeatMode; - let align = matrix.align; - const normalMinX = PlaneMaterialCellMatrix.MIN_NORMAL_COORDINATE_VALUE; - const normalMaxX = PlaneMaterialCellMatrix.MAX_NORMAL_COORDINATE_VALUE; - const normalMinY = PlaneMaterialCellMatrix.MIN_NORMAL_COORDINATE_VALUE; - const normalMaxY = PlaneMaterialCellMatrix.MAX_NORMAL_COORDINATE_VALUE; + let repeatMode = matrix.repeatMode; + let align = matrix.align; + const normalMinX = PlaneMaterialCellMatrix.MIN_NORMAL_COORDINATE_VALUE; + const normalMaxX = PlaneMaterialCellMatrix.MAX_NORMAL_COORDINATE_VALUE; + const normalMinY = PlaneMaterialCellMatrix.MIN_NORMAL_COORDINATE_VALUE; + const normalMaxY = PlaneMaterialCellMatrix.MAX_NORMAL_COORDINATE_VALUE; switch(repeatMode) { @@ -405,27 +405,27 @@ export class PlaneRasterizer implements IPlaneRasterizer { const textureId = cell.textureId; - let assetNames: string[] = null; - let offsetPoints: Point[] = null; - let graphics: IGraphicAsset[] = null; - let limit = 0; + let assetNames: string[] = null; + let offsetPoints: Point[] = null; + let graphics: IGraphicAsset[] = null; + let limit = 0; if(cell.extras && cell.extras.length) { - const extra = cell.extras[0]; - const types = extra.types; - const offsets = extra.offsets; + const extra = cell.extras[0]; + const types = extra.types; + const offsets = extra.offsets; if(types && offsets) { if(types.length && offsets.length) { - const type = types[0]; - const offset = offsets[0]; + const type = types[0]; + const offset = offsets[0]; - assetNames = this.parseExtraItemTypes(type); - offsetPoints = this.parseExtraItemOffsets(offset); - limit = offsetPoints.length; + assetNames = this.parseExtraItemTypes(type); + offsetPoints = this.parseExtraItemOffsets(offset); + limit = offsetPoints.length; if(extra.limitMax) limit = extra.limitMax; } @@ -448,8 +448,8 @@ export class PlaneRasterizer implements IPlaneRasterizer } } - const texture = this.getTexture(textureId); - const newCell = new PlaneMaterialCell(texture, graphics, offsetPoints, limit); + const texture = this.getTexture(textureId); + const newCell = new PlaneMaterialCell(texture, graphics, offsetPoints, limit); cells.push(newCell); } @@ -543,10 +543,10 @@ export class PlaneRasterizer implements IPlaneRasterizer const size = visualization.size; let horizontalAngle = FloorPlane.HORIZONTAL_ANGLE_DEFAULT; - let verticalAngle = FloorPlane.VERTICAL_ANGLE_DEFAULT; + let verticalAngle = FloorPlane.VERTICAL_ANGLE_DEFAULT; - if(visualization.horizontalAngle) horizontalAngle = visualization.horizontalAngle; - if(visualization.verticalAngle) verticalAngle = visualization.verticalAngle; + if(visualization.horizontalAngle) horizontalAngle = visualization.horizontalAngle; + if(visualization.verticalAngle) verticalAngle = visualization.verticalAngle; const layers = visualization.layers; @@ -562,10 +562,10 @@ export class PlaneRasterizer implements IPlaneRasterizer if(layer) { - let material: PlaneMaterial = null; - let align: number = PlaneVisualizationLayer.ALIGN_DEFAULT; - let color: number = FloorPlane.DEFAULT_COLOR; - let offset: number = PlaneVisualizationLayer.DEFAULT_OFFSET; + let material: PlaneMaterial = null; + let align: number = PlaneVisualizationLayer.ALIGN_DEFAULT; + let color: number = FloorPlane.DEFAULT_COLOR; + let offset: number = PlaneVisualizationLayer.DEFAULT_OFFSET; if(layer.materialId) material = this.getMaterial(layer.materialId); diff --git a/src/nitro/room/object/visualization/room/rasterizer/basic/PlaneTextureBitmap.ts b/src/nitro/room/object/visualization/room/rasterizer/basic/PlaneTextureBitmap.ts index adcd06a3..7049a66a 100644 --- a/src/nitro/room/object/visualization/room/rasterizer/basic/PlaneTextureBitmap.ts +++ b/src/nitro/room/object/visualization/room/rasterizer/basic/PlaneTextureBitmap.ts @@ -14,12 +14,12 @@ export class PlaneTextureBitmap constructor(texture: Texture, normalMinX: number = -1, normalMaxX: number = 1, normalMinY: number = -1, normalMaxY: number = 1, assetName: string = null) { - this._normalMinX = normalMinX; - this._normalMaxX = normalMaxX; - this._normalMinY = normalMinY; - this._normalMaxY = normalMaxY; - this._assetName = assetName; - this._bitmap = texture; + this._normalMinX = normalMinX; + this._normalMaxX = normalMaxX; + this._normalMinY = normalMinY; + this._normalMaxY = normalMaxY; + this._assetName = assetName; + this._bitmap = texture; } public get bitmap(): Texture diff --git a/src/nitro/room/object/visualization/room/rasterizer/basic/PlaneVisualization.ts b/src/nitro/room/object/visualization/room/rasterizer/basic/PlaneVisualization.ts index 68c2f28a..f586e475 100644 --- a/src/nitro/room/object/visualization/room/rasterizer/basic/PlaneVisualization.ts +++ b/src/nitro/room/object/visualization/room/rasterizer/basic/PlaneVisualization.ts @@ -19,12 +19,12 @@ export class PlaneVisualization constructor(size: number, totalLayers: number, geometry: IRoomGeometry) { - this._layers = []; - this._geometry = geometry; - this._cachedBitmapData = null; - this._cachedBitmapNormal = new Vector3d(); - this._isCached = false; - this._hasAnimationLayers = false; + this._layers = []; + this._geometry = geometry; + this._cachedBitmapData = null; + this._cachedBitmapNormal = new Vector3d(); + this._isCached = false; + this._hasAnimationLayers = false; if(totalLayers < 0) totalLayers = 0; @@ -130,8 +130,8 @@ export class PlaneVisualization layer = new PlaneVisualizationAnimationLayer(animationItems, collection); - this._layers[layerId] = layer; - this._hasAnimationLayers = true; + this._layers[layerId] = layer; + this._hasAnimationLayers = true; return true; } diff --git a/src/nitro/room/object/visualization/room/rasterizer/basic/PlaneVisualizationLayer.ts b/src/nitro/room/object/visualization/room/rasterizer/basic/PlaneVisualizationLayer.ts index 9e93c2ba..babb4f50 100644 --- a/src/nitro/room/object/visualization/room/rasterizer/basic/PlaneVisualizationLayer.ts +++ b/src/nitro/room/object/visualization/room/rasterizer/basic/PlaneVisualizationLayer.ts @@ -21,12 +21,12 @@ export class PlaneVisualizationLayer constructor(material: PlaneMaterial, color: number, align: number, offset: number = 0) { - this._material = material; - this._offset = offset; - this._align = align; - this._color = color; - this._bitmapData = null; - this._isDisposed = false; + this._material = material; + this._offset = offset; + this._align = align; + this._color = color; + this._bitmapData = null; + this._isDisposed = false; } public get offset(): number @@ -46,8 +46,8 @@ export class PlaneVisualizationLayer public dispose(): void { - this._isDisposed = true; - this._material = null; + this._isDisposed = true; + this._material = null; this.clearCache(); } diff --git a/src/nitro/room/object/visualization/room/rasterizer/basic/WallRasterizer.ts b/src/nitro/room/object/visualization/room/rasterizer/basic/WallRasterizer.ts index 7956cfa2..33ab6f18 100644 --- a/src/nitro/room/object/visualization/room/rasterizer/basic/WallRasterizer.ts +++ b/src/nitro/room/object/visualization/room/rasterizer/basic/WallRasterizer.ts @@ -25,9 +25,9 @@ export class WallRasterizer extends PlaneRasterizer if(!wall) continue; - const id = wall.id; + const id = wall.id; const visualization = wall.visualizations; - const plane = new WallPlane(); + const plane = new WallPlane(); this.parseVisualizations(plane, visualization); diff --git a/src/nitro/room/object/visualization/room/utils/PlaneBitmapData.ts b/src/nitro/room/object/visualization/room/utils/PlaneBitmapData.ts index d9811b96..1ccd7312 100644 --- a/src/nitro/room/object/visualization/room/utils/PlaneBitmapData.ts +++ b/src/nitro/room/object/visualization/room/utils/PlaneBitmapData.ts @@ -7,7 +7,7 @@ export class PlaneBitmapData constructor(k: Graphics, _arg_2: number) { - this._bitmap = k; + this._bitmap = k; this._timeStamp = _arg_2; } diff --git a/src/nitro/room/object/visualization/room/utils/Randomizer.ts b/src/nitro/room/object/visualization/room/utils/Randomizer.ts index 88464e74..22a90d0d 100644 --- a/src/nitro/room/object/visualization/room/utils/Randomizer.ts +++ b/src/nitro/room/object/visualization/room/utils/Randomizer.ts @@ -1,7 +1,7 @@ export class Randomizer { - public static DEFAULT_SEED: number = 1; - public static DEFAULT_MODULUS: number = 16777216; + public static DEFAULT_SEED: number = 1; + public static DEFAULT_MODULUS: number = 16777216; private static _randomizer:Randomizer = null; diff --git a/src/nitro/room/preview/RoomPreviewer.ts b/src/nitro/room/preview/RoomPreviewer.ts index 11bd9eeb..864c02dd 100644 --- a/src/nitro/room/preview/RoomPreviewer.ts +++ b/src/nitro/room/preview/RoomPreviewer.ts @@ -29,17 +29,17 @@ import { LegacyWallGeometry } from '../utils/LegacyWallGeometry'; export class RoomPreviewer { - public static SCALE_NORMAL: number = 64; - public static SCALE_SMALL: number = 32; - public static PREVIEW_COUNTER: number = 0; - public static PREVIEW_CANVAS_ID: number = 1; - public static PREVIEW_OBJECT_ID: number = 1; - public static PREVIEW_OBJECT_LOCATION_X: number = 2; - public static PREVIEW_OBJECT_LOCATION_Y: number = 2; + public static SCALE_NORMAL: number = 64; + public static SCALE_SMALL: number = 32; + public static PREVIEW_COUNTER: number = 0; + public static PREVIEW_CANVAS_ID: number = 1; + public static PREVIEW_OBJECT_ID: number = 1; + public static PREVIEW_OBJECT_LOCATION_X: number = 2; + public static PREVIEW_OBJECT_LOCATION_Y: number = 2; - private static ALLOWED_IMAGE_CUT: number = 0.25; - private static AUTOMATIC_STATE_CHANGE_INTERVAL: number = 2500; - private static ZOOM_ENABLED: boolean = true; + private static ALLOWED_IMAGE_CUT: number = 0.25; + private static AUTOMATIC_STATE_CHANGE_INTERVAL: number = 2500; + private static ZOOM_ENABLED: boolean = true; private _roomEngine: IRoomEngine; private _planeParser: RoomPlaneParser; @@ -61,12 +61,12 @@ export class RoomPreviewer constructor(roomEngine: IRoomEngine, roomId: number = 1) { - this._roomEngine = roomEngine; - this._planeParser = new RoomPlaneParser(); + this._roomEngine = roomEngine; + this._planeParser = new RoomPlaneParser(); this._previewRoomId = RoomId.makeRoomPreviewerId(roomId); this._addViewOffset = new Point(0, 0); - this.onRoomObjectAdded = this.onRoomObjectAdded.bind(this); + this.onRoomObjectAdded = this.onRoomObjectAdded.bind(this); this.onRoomInitializedonRoomInitialized = this.onRoomInitializedonRoomInitialized.bind(this); if(this.isRoomEngineReady && this._roomEngine.events) @@ -167,17 +167,17 @@ export class RoomPreviewer this._planeParser.reset(); - const width = parser.width; - const height = parser.height; + const width = parser.width; + const height = parser.height; this._planeParser.initializeTileMap(width, height); const entryTile: RoomEntryTileMessageParser = null; - let doorX = -1; - let doorY = -1; - let doorZ = 0; - let doorDirection = 0; + let doorX = -1; + let doorY = -1; + let doorZ = 0; + let doorDirection = 0; let y = 0; @@ -193,18 +193,18 @@ export class RoomPreviewer { if(((parser.getHeight(x, (y - 1)) == RoomPlaneParser.TILE_BLOCKED) && (parser.getHeight((x - 1), y) == RoomPlaneParser.TILE_BLOCKED)) && (parser.getHeight(x, (y + 1)) == RoomPlaneParser.TILE_BLOCKED)) { - doorX = (x + 0.5); - doorY = y; - doorZ = tileHeight; - doorDirection = 90; + doorX = (x + 0.5); + doorY = y; + doorZ = tileHeight; + doorDirection = 90; } if(((parser.getHeight(x, (y - 1)) == RoomPlaneParser.TILE_BLOCKED) && (parser.getHeight((x - 1), y) == RoomPlaneParser.TILE_BLOCKED)) && (parser.getHeight((x + 1), y) == RoomPlaneParser.TILE_BLOCKED)) { - doorX = x; - doorY = (y + 0.5); - doorZ = tileHeight; - doorDirection = 180; + doorX = x; + doorY = (y + 0.5); + doorZ = tileHeight; + doorDirection = 180; } } @@ -260,14 +260,14 @@ export class RoomPreviewer { this.reset(false); - this._currentPreviewObjectType = classId; - this._currentPreviewObjectCategory = RoomObjectCategory.FLOOR; - this._currentPreviewObjectData = ''; + this._currentPreviewObjectType = classId; + this._currentPreviewObjectCategory = RoomObjectCategory.FLOOR; + this._currentPreviewObjectData = ''; if(this._roomEngine.addFurnitureFloor(this._previewRoomId, RoomPreviewer.PREVIEW_OBJECT_ID, classId, new Vector3d(RoomPreviewer.PREVIEW_OBJECT_LOCATION_X, RoomPreviewer.PREVIEW_OBJECT_LOCATION_Y, 0), direction, 0, objectData, NaN, -1, 0, -1, '', true, false)) { - this._previousAutomaticStateChangeTime = Nitro.instance.time; - this._automaticStateChange = true; + this._previousAutomaticStateChangeTime = Nitro.instance.time; + this._automaticStateChange = true; const roomObject = this._roomEngine.getRoomObject(this._previewRoomId, RoomPreviewer.PREVIEW_OBJECT_ID, this._currentPreviewObjectCategory); @@ -290,14 +290,14 @@ export class RoomPreviewer this.reset(false); - this._currentPreviewObjectType = classId; - this._currentPreviewObjectCategory = RoomObjectCategory.WALL; - this._currentPreviewObjectData = objectData; + this._currentPreviewObjectType = classId; + this._currentPreviewObjectCategory = RoomObjectCategory.WALL; + this._currentPreviewObjectData = objectData; if(this._roomEngine.addFurnitureWall(this._previewRoomId, RoomPreviewer.PREVIEW_OBJECT_ID, classId, new Vector3d(0.5, 2.3, 1.8), direction, 0, objectData, 0, 0, -1, '', false)) { - this._previousAutomaticStateChangeTime = Nitro.instance.time; - this._automaticStateChange = true; + this._previousAutomaticStateChangeTime = Nitro.instance.time; + this._automaticStateChange = true; this.updatePreviewRoomView(); @@ -314,14 +314,14 @@ export class RoomPreviewer { this.reset(false); - this._currentPreviewObjectType = 1; - this._currentPreviewObjectCategory = RoomObjectCategory.UNIT; - this._currentPreviewObjectData = figure; + this._currentPreviewObjectType = 1; + this._currentPreviewObjectCategory = RoomObjectCategory.UNIT; + this._currentPreviewObjectData = figure; if(this._roomEngine.addRoomObjectUser(this._previewRoomId, RoomPreviewer.PREVIEW_OBJECT_ID, new Vector3d(RoomPreviewer.PREVIEW_OBJECT_LOCATION_X, RoomPreviewer.PREVIEW_OBJECT_LOCATION_Y, 0), new Vector3d(90, 0, 0), 135, RoomObjectUserType.getTypeNumber(RoomObjectUserType.USER), figure)) { - this._previousAutomaticStateChangeTime = Nitro.instance.time; - this._automaticStateChange = true; + this._previousAutomaticStateChangeTime = Nitro.instance.time; + this._automaticStateChange = true; this.updateUserGesture(1); this.updateUserEffect(effect); @@ -342,14 +342,14 @@ export class RoomPreviewer { this.reset(false); - this._currentPreviewObjectType = 1; - this._currentPreviewObjectCategory = RoomObjectCategory.UNIT; - this._currentPreviewObjectData = figure; + this._currentPreviewObjectType = 1; + this._currentPreviewObjectCategory = RoomObjectCategory.UNIT; + this._currentPreviewObjectData = figure; if(this._roomEngine.addRoomObjectUser(this._previewRoomId, RoomPreviewer.PREVIEW_OBJECT_ID, new Vector3d(RoomPreviewer.PREVIEW_OBJECT_LOCATION_X, RoomPreviewer.PREVIEW_OBJECT_LOCATION_Y, 0), new Vector3d(90, 0, 0), 90, RoomObjectUserType.getTypeNumber(RoomObjectUserType.PET), figure)) { - this._previousAutomaticStateChangeTime = Nitro.instance.time; - this._automaticStateChange = false; + this._previousAutomaticStateChangeTime = Nitro.instance.time; + this._automaticStateChange = false; this.updateUserGesture(1); this.updateUserPosture('std'); @@ -418,8 +418,8 @@ export class RoomPreviewer switch(this._currentPreviewObjectCategory) { case RoomObjectCategory.FLOOR: { - const floorLocation = new Vector3d(RoomPreviewer.PREVIEW_OBJECT_LOCATION_X, RoomPreviewer.PREVIEW_OBJECT_LOCATION_Y); - const floorDirection = new Vector3d(direction, direction, direction); + const floorLocation = new Vector3d(RoomPreviewer.PREVIEW_OBJECT_LOCATION_X, RoomPreviewer.PREVIEW_OBJECT_LOCATION_Y); + const floorDirection = new Vector3d(direction, direction, direction); this._roomEngine.updateRoomObjectFloor(this._previewRoomId, RoomPreviewer.PREVIEW_OBJECT_ID, floorLocation, floorDirection, null, null); return; @@ -463,9 +463,9 @@ export class RoomPreviewer displayObject.addChildAt(backgroundSprite, 0); } - backgroundSprite.width = width; - backgroundSprite.height = height; - backgroundSprite.tint = this._backgroundColor; + backgroundSprite.width = width; + backgroundSprite.height = height; + backgroundSprite.tint = this._backgroundColor; } this._roomEngine.setRoomInstanceRenderingCanvasMask(this._previewRoomId, RoomPreviewer.PREVIEW_CANVAS_ID, true); @@ -474,8 +474,8 @@ export class RoomPreviewer if(geometry) geometry.adjustLocation(new Vector3d(RoomPreviewer.PREVIEW_OBJECT_LOCATION_X, RoomPreviewer.PREVIEW_OBJECT_LOCATION_Y, 0), 30); - this._currentPreviewCanvasWidth = width; - this._currentPreviewCanvasHeight = height; + this._currentPreviewCanvasWidth = width; + this._currentPreviewCanvasHeight = height; return displayObject; } @@ -487,13 +487,13 @@ export class RoomPreviewer { if(this.isRoomEngineReady) { - this._currentPreviewCanvasWidth = width; - this._currentPreviewCanvasHeight = height; + this._currentPreviewCanvasWidth = width; + this._currentPreviewCanvasHeight = height; if(this._backgroundSprite) { - this._backgroundSprite.width = width; - this._backgroundSprite.height = height; + this._backgroundSprite.width = width; + this._backgroundSprite.height = height; } this._roomEngine.initializeRoomInstanceRenderingCanvas(this._previewRoomId, RoomPreviewer.PREVIEW_CANVAS_ID, width, height); @@ -554,16 +554,16 @@ export class RoomPreviewer { this._roomEngine.setRoomInstanceRenderingCanvasScale(this._previewRoomId, RoomPreviewer.PREVIEW_CANVAS_ID, 0.5, null, null); - this._currentPreviewScale = RoomPreviewer.SCALE_SMALL; + this._currentPreviewScale = RoomPreviewer.SCALE_SMALL; this._currentPreviewNeedsZoomOut = true; point.x = (point.x >> 1); point.y = (point.y >> 1); - this._currentPreviewRectangle.x = (this._currentPreviewRectangle.x >> 2); - this._currentPreviewRectangle.y = (this._currentPreviewRectangle.y >> 2); - this._currentPreviewRectangle.width = (this._currentPreviewRectangle.width >> 2); - this._currentPreviewRectangle.height = (this._currentPreviewRectangle.height >> 2); + this._currentPreviewRectangle.x = (this._currentPreviewRectangle.x >> 2); + this._currentPreviewRectangle.y = (this._currentPreviewRectangle.y >> 2); + this._currentPreviewRectangle.width = (this._currentPreviewRectangle.width >> 2); + this._currentPreviewRectangle.height = (this._currentPreviewRectangle.height >> 2); } } else @@ -666,9 +666,9 @@ export class RoomPreviewer { if(((this._currentPreviewRectangle.width < 1) || (this._currentPreviewRectangle.height < 1))) return point; - let x = (-(this._currentPreviewRectangle.left + this._currentPreviewRectangle.right) >> 1); - let y = (-(this._currentPreviewRectangle.top + this._currentPreviewRectangle.bottom) >> 1); - const height = ((this._currentPreviewCanvasHeight - this._currentPreviewRectangle.height) >> 1); + let x = (-(this._currentPreviewRectangle.left + this._currentPreviewRectangle.right) >> 1); + let y = (-(this._currentPreviewRectangle.top + this._currentPreviewRectangle.bottom) >> 1); + const height = ((this._currentPreviewCanvasHeight - this._currentPreviewRectangle.height) >> 1); if(height > 10) { @@ -770,15 +770,15 @@ export class RoomPreviewer { if((event.roomId === this._previewRoomId) && (event.objectId === RoomPreviewer.PREVIEW_OBJECT_ID) && (event.category === this._currentPreviewObjectCategory)) { - this._currentPreviewRectangle = null; - this._currentPreviewNeedsZoomOut = false; + this._currentPreviewRectangle = null; + this._currentPreviewNeedsZoomOut = false; const roomObject = this._roomEngine.getRoomObject(event.roomId, event.objectId, event.category); if(roomObject && roomObject.model && (event.category === RoomObjectCategory.WALL)) { - const sizeZ = roomObject.model.getValue(RoomObjectVariable.FURNITURE_SIZE_Z); - const centerZ = roomObject.model.getValue(RoomObjectVariable.FURNITURE_CENTER_Z); + const sizeZ = roomObject.model.getValue(RoomObjectVariable.FURNITURE_SIZE_Z); + const centerZ = roomObject.model.getValue(RoomObjectVariable.FURNITURE_CENTER_Z); if((sizeZ !== null) || (centerZ !== null)) { diff --git a/src/nitro/room/utils/FurnitureStackingHeightMap.ts b/src/nitro/room/utils/FurnitureStackingHeightMap.ts index e198ec5e..867585df 100644 --- a/src/nitro/room/utils/FurnitureStackingHeightMap.ts +++ b/src/nitro/room/utils/FurnitureStackingHeightMap.ts @@ -8,11 +8,11 @@ export class FurnitureStackingHeightMap constructor(width: number, height: number) { - this._width = width; - this._height = height; - this._heights = []; - this._isNotStackable = []; - this._isRoomTile = []; + this._width = width; + this._height = height; + this._heights = []; + this._isNotStackable = []; + this._isRoomTile = []; let total = (width * height); @@ -28,11 +28,11 @@ export class FurnitureStackingHeightMap public dispose(): void { - this._width = 0; - this._height =0; - this._height = null; - this._isNotStackable = null; - this._isRoomTile = null; + this._width = 0; + this._height =0; + this._height = null; + this._isNotStackable = null; + this._isRoomTile = null; } private validPosition(x: number, y: number): boolean diff --git a/src/nitro/room/utils/LegacyWallGeometry.ts b/src/nitro/room/utils/LegacyWallGeometry.ts index d0e33aaa..38d5de3d 100644 --- a/src/nitro/room/utils/LegacyWallGeometry.ts +++ b/src/nitro/room/utils/LegacyWallGeometry.ts @@ -17,12 +17,12 @@ export class LegacyWallGeometry constructor() { - this._isDisposed = false; - this._scale = 64; - this._heightMap = []; - this._width = 0; - this._height = 0; - this._floorHeight = 0; + this._isDisposed = false; + this._scale = 64; + this._heightMap = []; + this._width = 0; + this._height = 0; + this._floorHeight = 0; } public get disposed(): boolean @@ -50,9 +50,9 @@ export class LegacyWallGeometry { if((width <= this._width) && (height <= this._height)) { - this._width = width; - this._height = height; - this._floorHeight = floorHeight; + this._width = width; + this._height = height; + this._floorHeight = floorHeight; return; } @@ -79,9 +79,9 @@ export class LegacyWallGeometry y++; } - this._width = width; - this._height = height; - this._floorHeight = floorHeight; + this._width = width; + this._height = height; + this._floorHeight = floorHeight; } private reset(): void diff --git a/src/nitro/room/utils/ObjectRolling.ts b/src/nitro/room/utils/ObjectRolling.ts index 46512ddb..a49592e2 100644 --- a/src/nitro/room/utils/ObjectRolling.ts +++ b/src/nitro/room/utils/ObjectRolling.ts @@ -2,7 +2,7 @@ import { IVector3D } from '../../../room/utils/IVector3D'; export class ObjectRolling { - public static MOVE: string = 'mv'; + public static MOVE: string = 'mv'; public static SLIDE: string = 'sld'; private _id: number; @@ -12,10 +12,10 @@ export class ObjectRolling constructor(id: number, location: IVector3D, targetLocation: IVector3D, movementType: string = null) { - this._id = id; - this._location = location; - this._targetLocation = targetLocation; - this._movementType = movementType; + this._id = id; + this._location = location; + this._targetLocation = targetLocation; + this._movementType = movementType; } public get id(): number diff --git a/src/nitro/room/utils/RoomData.ts b/src/nitro/room/utils/RoomData.ts index 2c7e14cd..47042d62 100644 --- a/src/nitro/room/utils/RoomData.ts +++ b/src/nitro/room/utils/RoomData.ts @@ -10,10 +10,10 @@ export class RoomData constructor(roomId: number, data: RoomMapData) { - this._roomId = roomId; - this._data = data; - this._floorType = null; - this._wallType = null; + this._roomId = roomId; + this._data = data; + this._floorType = null; + this._wallType = null; this._landscapeType = null; } diff --git a/src/nitro/room/utils/RoomFurnitureData.ts b/src/nitro/room/utils/RoomFurnitureData.ts index 3e52b160..6e023488 100644 --- a/src/nitro/room/utils/RoomFurnitureData.ts +++ b/src/nitro/room/utils/RoomFurnitureData.ts @@ -22,22 +22,22 @@ export class RoomFurnitureData constructor(id: number, typeId: number, type: string, location: IVector3D, direction: IVector3D, state: number, objectData: IObjectData, extra: number = NaN, expires: number = -1, usagePolicy: number = 0, ownerId: number = 0, ownerName: string = '', synchronized: boolean = true, realRoomObject: boolean = true, sizeZ: number = -1) { - this._id = id; - this._typeId = typeId; - this._type = type; - this._state = state; - this._data = objectData; - this._extra = extra; - this._expiryTime = expires; - this._usagePolicy = usagePolicy; - this._ownerId = ownerId; - this._ownerName = ownerName; - this._synchronized = synchronized; - this._realRoomObject = realRoomObject; - this._sizeZ = sizeZ; + this._id = id; + this._typeId = typeId; + this._type = type; + this._state = state; + this._data = objectData; + this._extra = extra; + this._expiryTime = expires; + this._usagePolicy = usagePolicy; + this._ownerId = ownerId; + this._ownerName = ownerName; + this._synchronized = synchronized; + this._realRoomObject = realRoomObject; + this._sizeZ = sizeZ; - this._location = new Vector3d(); - this._direction = new Vector3d(); + this._location = new Vector3d(); + this._direction = new Vector3d(); this._location.assign(location); this._direction.assign(direction); diff --git a/src/nitro/room/utils/RoomInstanceData.ts b/src/nitro/room/utils/RoomInstanceData.ts index 0c61630d..0cf0bb0c 100644 --- a/src/nitro/room/utils/RoomInstanceData.ts +++ b/src/nitro/room/utils/RoomInstanceData.ts @@ -23,19 +23,19 @@ export class RoomInstanceData constructor(roomId: number) { - this._roomId = roomId; + this._roomId = roomId; - this._modelName = null; - this._legacyGeometry = new LegacyWallGeometry(); - this._tileObjectMap = null; - this._roomCamera = new RoomCamera(); - this._selectedObject = null; - this._placedObject = null; - this._furnitureStackingHeightMap = null; + this._modelName = null; + this._legacyGeometry = new LegacyWallGeometry(); + this._tileObjectMap = null; + this._roomCamera = new RoomCamera(); + this._selectedObject = null; + this._placedObject = null; + this._furnitureStackingHeightMap = null; - this._floorStack = new Map(); - this._wallStack = new Map(); - this._mouseButtonCursorOwners = []; + this._floorStack = new Map(); + this._wallStack = new Map(); + this._mouseButtonCursorOwners = []; } public dispose(): void diff --git a/src/nitro/room/utils/RoomObjectBadgeImageAssetListener.ts b/src/nitro/room/utils/RoomObjectBadgeImageAssetListener.ts index f8442392..91346e1c 100644 --- a/src/nitro/room/utils/RoomObjectBadgeImageAssetListener.ts +++ b/src/nitro/room/utils/RoomObjectBadgeImageAssetListener.ts @@ -7,8 +7,8 @@ export class RoomObjectBadgeImageAssetListener constructor(object: IRoomObjectController, groupBadge: boolean) { - this._object = object; - this._groupBadge = groupBadge; + this._object = object; + this._groupBadge = groupBadge; } public get object(): IRoomObjectController diff --git a/src/nitro/room/utils/SpriteDataCollector.ts b/src/nitro/room/utils/SpriteDataCollector.ts index 859ffe2f..9d5bd90b 100644 --- a/src/nitro/room/utils/SpriteDataCollector.ts +++ b/src/nitro/room/utils/SpriteDataCollector.ts @@ -13,10 +13,10 @@ import { RoomEngine } from '../RoomEngine'; export class SpriteDataCollector { - private static MANNEQUIN_MAGIC_X_OFFSET: number = 1; - private static MANNEQUIN_MAGIC_Y_OFFSET: number = -16; - private static AVATAR_WATER_EFFECT_MAGIC_Y_OFFSET: number = -52; - private static MAX_EXTERNAL_IMAGE_COUNT: number = 30; + private static MANNEQUIN_MAGIC_X_OFFSET: number = 1; + private static MANNEQUIN_MAGIC_Y_OFFSET: number = -16; + private static AVATAR_WATER_EFFECT_MAGIC_Y_OFFSET: number = -52; + private static MAX_EXTERNAL_IMAGE_COUNT: number = 30; private maxZ: number; private spriteCount: number = 0; @@ -285,7 +285,7 @@ export class SpriteDataCollector if(_local_6.indexOf('http') === 0) { - _local_5.width = k.width; + _local_5.width = k.width; _local_5.height = k.height; this.externalImageCount++; @@ -323,8 +323,8 @@ export class SpriteDataCollector const _local_10 = new PlaneDrawingData(null, _arg_2); - _local_10.cornerPoints = _local_8; - _local_10.z = _local_9; + _local_10.cornerPoints = _local_8; + _local_10.z = _local_9; return _local_10; } @@ -389,13 +389,13 @@ export class SpriteDataCollector { const _local_5: PlaneDrawingData[] = []; - const roomObject = _arg_3.getRoomObject(_arg_3.activeRoomId, RoomEngine.ROOM_OBJECT_ID, RoomObjectCategory.ROOM); + const roomObject = _arg_3.getRoomObject(_arg_3.activeRoomId, RoomEngine.ROOM_OBJECT_ID, RoomObjectCategory.ROOM); const visualization = (roomObject.visualization as unknown as IPlaneVisualization); if(visualization) { - const _local_8 = _arg_2.geometry; - const _local_9 = this.sortRoomPlanes(visualization.planes, _arg_2, _arg_3); + const _local_8 = _arg_2.geometry; + const _local_9 = this.sortRoomPlanes(visualization.planes, _arg_2, _arg_3); const _local_10 = Nitro.instance.stage; for(const _local_11 of _local_9) @@ -444,8 +444,8 @@ export class SpriteDataCollector for(const _local_23 of _local_12.getDrawingDatas(_local_8)) { - _local_23.cornerPoints = _local_22; - _local_23.z = _local_11.z; + _local_23.cornerPoints = _local_22; + _local_23.z = _local_11.z; _local_5.push(_local_23); } diff --git a/src/nitro/room/utils/TileObjectMap.ts b/src/nitro/room/utils/TileObjectMap.ts index 448f54c3..0e9d534e 100644 --- a/src/nitro/room/utils/TileObjectMap.ts +++ b/src/nitro/room/utils/TileObjectMap.ts @@ -21,8 +21,8 @@ export class TileObjectMap index++; } - this._width = k; - this._height = _arg_2; + this._width = k; + this._height = _arg_2; } public clear(): void @@ -47,8 +47,8 @@ export class TileObjectMap public dispose(): void { this._tileObjectMap = null; - this._width = 0; - this._height = 0; + this._width = 0; + this._height = 0; } public getObjectIntTile(k: number, _arg_2: number): IRoomObject @@ -84,7 +84,7 @@ export class TileObjectMap { if(!k || !k.model || !k.isReady) return; - const location = k.getLocation(); + const location = k.getLocation(); const direction = k.getDirection(); if(!location || !direction) return; diff --git a/src/nitro/session/GroupInformationManager.ts b/src/nitro/session/GroupInformationManager.ts index a989551a..60ca36f0 100644 --- a/src/nitro/session/GroupInformationManager.ts +++ b/src/nitro/session/GroupInformationManager.ts @@ -13,8 +13,8 @@ export class GroupInformationManager implements IDisposable constructor(sessionDataManager: SessionDataManager) { - this._sessionDataManager = sessionDataManager; - this._groupBadges = new Map(); + this._sessionDataManager = sessionDataManager; + this._groupBadges = new Map(); } public init(): void diff --git a/src/nitro/session/IgnoredUsersManager.ts b/src/nitro/session/IgnoredUsersManager.ts index a3360676..e5243136 100644 --- a/src/nitro/session/IgnoredUsersManager.ts +++ b/src/nitro/session/IgnoredUsersManager.ts @@ -17,8 +17,8 @@ export class IgnoredUsersManager implements IDisposable constructor(sessionDataManager: SessionDataManager) { - this._sessionDataManager = sessionDataManager; - this._ignoredUsers = []; + this._sessionDataManager = sessionDataManager; + this._ignoredUsers = []; } public init(): void diff --git a/src/nitro/session/RoomSession.ts b/src/nitro/session/RoomSession.ts index 06050bdd..5ce340b8 100644 --- a/src/nitro/session/RoomSession.ts +++ b/src/nitro/session/RoomSession.ts @@ -56,22 +56,22 @@ export class RoomSession extends Disposable implements IRoomSession { super(); - this._connection = null; - this._userData = new UserDataManager(); + this._connection = null; + this._userData = new UserDataManager(); - this._roomId = 0; - this._password = null; - this._state = RoomSessionEvent.CREATED; - this._tradeMode = RoomTradingLevelEnum.NO_TRADING; - this._doorMode = 0; - this._controllerLevel = RoomControllerLevel.NONE; - this._ownRoomIndex = -1; - this._isGuildRoom = false; - this._isRoomOwner = false; - this._isDecorating = false; - this._isSpectator = false; + this._roomId = 0; + this._password = null; + this._state = RoomSessionEvent.CREATED; + this._tradeMode = RoomTradingLevelEnum.NO_TRADING; + this._doorMode = 0; + this._controllerLevel = RoomControllerLevel.NONE; + this._ownRoomIndex = -1; + this._isGuildRoom = false; + this._isRoomOwner = false; + this._isDecorating = false; + this._isSpectator = false; - this._moderationSettings = null; + this._moderationSettings = null; } protected onDispose(): void diff --git a/src/nitro/session/RoomSessionManager.ts b/src/nitro/session/RoomSessionManager.ts index 6b2817c7..2c032c77 100644 --- a/src/nitro/session/RoomSessionManager.ts +++ b/src/nitro/session/RoomSessionManager.ts @@ -35,15 +35,15 @@ export class RoomSessionManager extends NitroManager implements IRoomSessionMana { super(); - this._communication = communication; - this._roomEngine = roomEngine; + this._communication = communication; + this._roomEngine = roomEngine; - this._handlers = []; - this._sessions = new Map(); - this._pendingSession = null; + this._handlers = []; + this._sessions = new Map(); + this._pendingSession = null; - this._sessionStarting = false; - this._viewerSession = null; + this._sessionStarting = false; + this._viewerSession = null; this.onRoomEngineEvent = this.onRoomEngineEvent.bind(this); } @@ -123,8 +123,8 @@ export class RoomSessionManager extends NitroManager implements IRoomSessionMana { const session = new RoomSession(); - session.roomId = roomId; - session.password = password; + session.roomId = roomId; + session.password = password; return this.addSession(session); } diff --git a/src/nitro/session/SessionDataManager.ts b/src/nitro/session/SessionDataManager.ts index 912cb8fb..efd49edc 100644 --- a/src/nitro/session/SessionDataManager.ts +++ b/src/nitro/session/SessionDataManager.ts @@ -79,40 +79,40 @@ export class SessionDataManager extends NitroManager implements ISessionDataMana { super(); - this._communication = communication; + this._communication = communication; this.resetUserInfo(); - this._ignoredUsersManager = new IgnoredUsersManager(this); - this._groupInformationManager = new GroupInformationManager(this); + this._ignoredUsersManager = new IgnoredUsersManager(this); + this._groupInformationManager = new GroupInformationManager(this); - this._clubLevel = 0; - this._securityLevel = 0; - this._isAmbassador = false; + this._clubLevel = 0; + this._securityLevel = 0; + this._isAmbassador = false; - this._systemOpen = false; - this._systemShutdown = false; - this._isAuthenticHabbo = false; - this._isRoomCameraFollowDisabled = false; - this._chatStyle = 0; - this._uiFlags = 0; + this._systemOpen = false; + this._systemShutdown = false; + this._isAuthenticHabbo = false; + this._isRoomCameraFollowDisabled = false; + this._chatStyle = 0; + this._uiFlags = 0; - this._floorItems = new Map(); - this._wallItems = new Map(); - this._products = new Map(); - this._furnitureData = null; + this._floorItems = new Map(); + this._wallItems = new Map(); + this._products = new Map(); + this._furnitureData = null; - this._furnitureReady = false; - this._productsReady = false; - this._furnitureListenersNotified = false; - this._pendingFurnitureListeners = []; - this._pendingProductListeners = []; + this._furnitureReady = false; + this._productsReady = false; + this._furnitureListenersNotified = false; + this._pendingFurnitureListeners = []; + this._pendingProductListeners = []; - this._badgeImageManager = null; + this._badgeImageManager = null; - this.onFurnitureDataReadyEvent = this.onFurnitureDataReadyEvent.bind(this); - this.onProductDataReadyEvent = this.onProductDataReadyEvent.bind(this); - this.onNitroSettingsEvent = this.onNitroSettingsEvent.bind(this); + this.onFurnitureDataReadyEvent = this.onFurnitureDataReadyEvent.bind(this); + this.onProductDataReadyEvent = this.onProductDataReadyEvent.bind(this); + this.onNitroSettingsEvent = this.onNitroSettingsEvent.bind(this); } groupInformationManager: GroupInformationManager; @@ -163,11 +163,11 @@ export class SessionDataManager extends NitroManager implements ISessionDataMana private resetUserInfo(): void { - this._userId = 0; - this._name = null; - this._figure = null; - this._gender = null; - this._realName = null; + this._userId = 0; + this._name = null; + this._figure = null; + this._gender = null; + this._realName = null; this._canChangeName = false; } @@ -253,8 +253,8 @@ export class SessionDataManager extends NitroManager implements ISessionDataMana { if(!event || !event.connection) return; - this._figure = event.getParser().figure; - this._gender = event.getParser().gender; + this._figure = event.getParser().figure; + this._gender = event.getParser().gender; HabboWebTools.updateFigure(this._figure); } @@ -269,15 +269,15 @@ export class SessionDataManager extends NitroManager implements ISessionDataMana if(!userInfo) return; - this._userId = userInfo.userId; - this._name = userInfo.username; - this._figure = userInfo.figure; - this._gender = userInfo.gender; - this._realName = userInfo.realName; - this._respectsReceived = userInfo.respectsReceived; - this._respectsLeft = userInfo.respectsRemaining; - this._respectsPetLeft = userInfo.respectsPetRemaining; - this._canChangeName = userInfo.canChangeName; + this._userId = userInfo.userId; + this._name = userInfo.username; + this._figure = userInfo.figure; + this._gender = userInfo.gender; + this._realName = userInfo.realName; + this._respectsReceived = userInfo.respectsReceived; + this._respectsLeft = userInfo.respectsRemaining; + this._respectsPetLeft = userInfo.respectsPetRemaining; + this._canChangeName = userInfo.canChangeName; (this._ignoredUsersManager && this._ignoredUsersManager.requestIgnoredUsers()); } @@ -286,9 +286,9 @@ export class SessionDataManager extends NitroManager implements ISessionDataMana { if(!event || !event.connection) return; - this._clubLevel = event.getParser().clubLevel; + this._clubLevel = event.getParser().clubLevel; this._securityLevel = event.getParser().securityLevel; - this._isAmbassador = event.getParser().isAmbassador; + this._isAmbassador = event.getParser().isAmbassador; } private onAvailabilityStatusMessageEvent(event: AvailabilityStatusMessageEvent): void @@ -299,9 +299,9 @@ export class SessionDataManager extends NitroManager implements ISessionDataMana if(!parser) return; - this._systemOpen = parser.isOpen; - this._systemShutdown = parser.onShutdown; - this._isAuthenticHabbo = parser.isAuthenticUser; + this._systemOpen = parser.isOpen; + this._systemShutdown = parser.onShutdown; + this._isAuthenticHabbo = parser.isAuthenticUser; } private onChangeNameUpdateEvent(event: ChangeUserNameResultMessageEvent): void @@ -329,7 +329,7 @@ export class SessionDataManager extends NitroManager implements ISessionDataMana if(parser.webId !== this.userId) return; - this._name = parser.newName; + this._name = parser.newName; this._canChangeName = false; this.events.dispatchEvent(new UserNameUpdateEvent(this._name)); @@ -400,9 +400,9 @@ export class SessionDataManager extends NitroManager implements ISessionDataMana private onNitroSettingsEvent(event: NitroSettingsEvent): void { - this._isRoomCameraFollowDisabled = event.cameraFollow; - this._chatStyle = event.chatType; - this._uiFlags = event.flags; + this._isRoomCameraFollowDisabled = event.cameraFollow; + this._chatStyle = event.chatType; + this._uiFlags = event.flags; this.events.dispatchEvent(new SessionDataPreferencesEvent(this._uiFlags)); } diff --git a/src/nitro/session/UserDataManager.ts b/src/nitro/session/UserDataManager.ts index 8b0f58f0..f06f6a8b 100644 --- a/src/nitro/session/UserDataManager.ts +++ b/src/nitro/session/UserDataManager.ts @@ -6,10 +6,10 @@ import { RoomUserData } from './RoomUserData'; export class UserDataManager extends Disposable { - private static TYPE_USER: number = 1; - private static TYPE_PET: number = 2; - private static TYPE_BOT: number = 3; - private static TYPE_RENTABLE_BOT: number = 4; + private static TYPE_USER: number = 1; + private static TYPE_PET: number = 2; + private static TYPE_BOT: number = 3; + private static TYPE_RENTABLE_BOT: number = 4; private _connection: IConnection; @@ -21,11 +21,11 @@ export class UserDataManager extends Disposable { super(); - this._connection = null; + this._connection = null; - this._userDataByType = new Map(); - this._userDataByRoomIndex = new Map(); - this._userBadges = new Map(); + this._userDataByType = new Map(); + this._userDataByRoomIndex = new Map(); + this._userBadges = new Map(); } protected onDispose(): void @@ -150,10 +150,10 @@ export class UserDataManager extends Disposable if(!userData) return; - userData.figure = figure; - userData.sex = sex; - userData.hasSaddle = hasSaddle; - userData.isRiding = isRiding; + userData.figure = figure; + userData.sex = sex; + userData.hasSaddle = hasSaddle; + userData.isRiding = isRiding; } public updateName(roomIndex: number, name: string): void diff --git a/src/nitro/session/badge/BadgeImageManager.ts b/src/nitro/session/badge/BadgeImageManager.ts index 846b555f..96401a11 100644 --- a/src/nitro/session/badge/BadgeImageManager.ts +++ b/src/nitro/session/badge/BadgeImageManager.ts @@ -15,8 +15,8 @@ import { GroupBadgePart } from './GroupBadgePart'; export class BadgeImageManager implements IDisposable { - public static GROUP_BADGE: string = 'group_badge'; - public static NORMAL_BADGE: string = 'normal_badge'; + public static GROUP_BADGE: string = 'group_badge'; + public static NORMAL_BADGE: string = 'normal_badge'; private _assets: IAssetManager; private _sessionDataManager: SessionDataManager; @@ -33,15 +33,15 @@ export class BadgeImageManager implements IDisposable constructor(assetManager: IAssetManager, sessionDataManager: SessionDataManager) { - this._assets = assetManager; - this._sessionDataManager = sessionDataManager; + this._assets = assetManager; + this._sessionDataManager = sessionDataManager; - this._groupBases = new Map(); - this._groupSymbols = new Map(); - this._groupPartColors = new Map(); + this._groupBases = new Map(); + this._groupSymbols = new Map(); + this._groupPartColors = new Map(); - this._requestedBadges = new Map(); - this._groupBadgesQueue = new Map(); + this._requestedBadges = new Map(); + this._groupBadgesQueue = new Map(); this._readyToGenerateGroupBadges = false; } diff --git a/src/nitro/session/badge/BadgeInfo.ts b/src/nitro/session/badge/BadgeInfo.ts index 7cd89975..45d4a18f 100644 --- a/src/nitro/session/badge/BadgeInfo.ts +++ b/src/nitro/session/badge/BadgeInfo.ts @@ -7,8 +7,8 @@ export class BadgeInfo constructor(image: Texture, placeHolder: boolean) { - this._image = image; - this._placeHolder = placeHolder; + this._image = image; + this._placeHolder = placeHolder; } public get image(): Texture diff --git a/src/nitro/session/enum/GenericErrorEnum.ts b/src/nitro/session/enum/GenericErrorEnum.ts index 378f9012..611139b8 100644 --- a/src/nitro/session/enum/GenericErrorEnum.ts +++ b/src/nitro/session/enum/GenericErrorEnum.ts @@ -1,5 +1,5 @@ export class GenericErrorEnum { - public static KICKED_OUT_OF_ROOM: number = 4008; + public static KICKED_OUT_OF_ROOM: number = 4008; public static STRIP_LOCKED_FOR_TRADING: number = -13001; } diff --git a/src/nitro/session/enum/RoomControllerLevel.ts b/src/nitro/session/enum/RoomControllerLevel.ts index 9f45bc6e..ecd6309e 100644 --- a/src/nitro/session/enum/RoomControllerLevel.ts +++ b/src/nitro/session/enum/RoomControllerLevel.ts @@ -1,9 +1,9 @@ export class RoomControllerLevel { - public static NONE: number = 0; - public static GUEST: number = 1; - public static GUILD_MEMBER: number = 2; - public static GUILD_ADMIN: number = 3; - public static ROOM_OWNER: number = 4; - public static MODERATOR: number = 5; + public static NONE: number = 0; + public static GUEST: number = 1; + public static GUILD_MEMBER: number = 2; + public static GUILD_ADMIN: number = 3; + public static ROOM_OWNER: number = 4; + public static MODERATOR: number = 5; } \ No newline at end of file diff --git a/src/nitro/session/enum/SecurityLevel.ts b/src/nitro/session/enum/SecurityLevel.ts index 4f9b6934..9b3011ef 100644 --- a/src/nitro/session/enum/SecurityLevel.ts +++ b/src/nitro/session/enum/SecurityLevel.ts @@ -1,13 +1,13 @@ export class SecurityLevel { - public static SUPER_USER: number = 9; - public static ADMINISTRATOR: number = 8; - public static COMMUNITY: number = 7; - public static PLAYER_SUPPORT: number = 6; - public static MODERATOR: number = 5; - public static EMPLOYEE: number = 4; - public static BUS_PARTNER: number = 3; - public static PARTNER: number = 2; - public static CELEBRITY: number = 1; - public static NONE: number = 0; + public static SUPER_USER: number = 9; + public static ADMINISTRATOR: number = 8; + public static COMMUNITY: number = 7; + public static PLAYER_SUPPORT: number = 6; + public static MODERATOR: number = 5; + public static EMPLOYEE: number = 4; + public static BUS_PARTNER: number = 3; + public static PARTNER: number = 2; + public static CELEBRITY: number = 1; + public static NONE: number = 0; } \ No newline at end of file diff --git a/src/nitro/session/events/BadgeImageReadyEvent.ts b/src/nitro/session/events/BadgeImageReadyEvent.ts index d060fb99..b3295a76 100644 --- a/src/nitro/session/events/BadgeImageReadyEvent.ts +++ b/src/nitro/session/events/BadgeImageReadyEvent.ts @@ -12,8 +12,8 @@ export class BadgeImageReadyEvent extends NitroEvent { super(BadgeImageReadyEvent.IMAGE_READY); - this._badgeId = badgeId; - this._image = image; + this._badgeId = badgeId; + this._image = image; } public get badgeId(): string diff --git a/src/nitro/session/events/RoomSessionChatEvent.ts b/src/nitro/session/events/RoomSessionChatEvent.ts index d9214e04..4d2a7ba3 100644 --- a/src/nitro/session/events/RoomSessionChatEvent.ts +++ b/src/nitro/session/events/RoomSessionChatEvent.ts @@ -3,20 +3,20 @@ import { RoomSessionEvent } from './RoomSessionEvent'; export class RoomSessionChatEvent extends RoomSessionEvent { - public static CHAT_EVENT: string = 'RSCE_CHAT_EVENT'; - public static FLOOD_EVENT: string = 'RSCE_FLOOD_EVENT'; + public static CHAT_EVENT: string = 'RSCE_CHAT_EVENT'; + public static FLOOD_EVENT: string = 'RSCE_FLOOD_EVENT'; - public static CHAT_TYPE_SPEAK: number = 0; - public static CHAT_TYPE_WHISPER: number = 1; - public static CHAT_TYPE_SHOUT: number = 2; - public static CHAT_TYPE_RESPECT: number = 3; - public static CHAT_TYPE_PETRESPECT: number = 4; - public static CHAT_TYPE_HAND_ITEM_RECEIVED: number = 5; - public static CHAT_TYPE_PETTREAT: number = 6; - public static CHAT_TYPE_PETREVIVE: number = 7; - public static CHAT_TYPE_PET_REBREED_FERTILIZE: number = 8; - public static CHAT_TYPE_PET_SPEED_FERTILIZE: number = 9; - public static CHAT_TYPE_MUTE_REMAINING: number = 10; + public static CHAT_TYPE_SPEAK: number = 0; + public static CHAT_TYPE_WHISPER: number = 1; + public static CHAT_TYPE_SHOUT: number = 2; + public static CHAT_TYPE_RESPECT: number = 3; + public static CHAT_TYPE_PETRESPECT: number = 4; + public static CHAT_TYPE_HAND_ITEM_RECEIVED: number = 5; + public static CHAT_TYPE_PETTREAT: number = 6; + public static CHAT_TYPE_PETREVIVE: number = 7; + public static CHAT_TYPE_PET_REBREED_FERTILIZE: number = 8; + public static CHAT_TYPE_PET_SPEED_FERTILIZE: number = 9; + public static CHAT_TYPE_MUTE_REMAINING: number = 10; private _objectId: number; private _message: string; @@ -29,12 +29,12 @@ export class RoomSessionChatEvent extends RoomSessionEvent { super(type, session); - this._objectId = objectId; - this._message = message; - this._chatType = chatType; - this._links = links; - this._extraParam = extraParam; - this._style = style; + this._objectId = objectId; + this._message = message; + this._chatType = chatType; + this._links = links; + this._extraParam = extraParam; + this._style = style; } public get objectId(): number diff --git a/src/nitro/session/events/RoomSessionDanceEvent.ts b/src/nitro/session/events/RoomSessionDanceEvent.ts index 16260185..dfda5a47 100644 --- a/src/nitro/session/events/RoomSessionDanceEvent.ts +++ b/src/nitro/session/events/RoomSessionDanceEvent.ts @@ -13,7 +13,7 @@ export class RoomSessionDanceEvent extends RoomSessionEvent super(RoomSessionDanceEvent.RSDE_DANCE, session); this._roomIndex = roomIndex; - this._danceId = danceId; + this._danceId = danceId; } public get roomIndex(): number diff --git a/src/nitro/session/events/RoomSessionDoorbellEvent.ts b/src/nitro/session/events/RoomSessionDoorbellEvent.ts index fde5de07..e173865a 100644 --- a/src/nitro/session/events/RoomSessionDoorbellEvent.ts +++ b/src/nitro/session/events/RoomSessionDoorbellEvent.ts @@ -3,9 +3,9 @@ import { RoomSessionEvent } from './RoomSessionEvent'; export class RoomSessionDoorbellEvent extends RoomSessionEvent { - public static DOORBELL: string = 'RSDE_DOORBELL'; - public static RSDE_REJECTED: string = 'RSDE_REJECTED'; - public static RSDE_ACCEPTED: string = 'RSDE_ACCEPTED'; + public static DOORBELL: string = 'RSDE_DOORBELL'; + public static RSDE_REJECTED: string = 'RSDE_REJECTED'; + public static RSDE_ACCEPTED: string = 'RSDE_ACCEPTED'; private _userName: string = ''; diff --git a/src/nitro/session/events/RoomSessionEvent.ts b/src/nitro/session/events/RoomSessionEvent.ts index ed10277f..ce0a6fd9 100644 --- a/src/nitro/session/events/RoomSessionEvent.ts +++ b/src/nitro/session/events/RoomSessionEvent.ts @@ -3,9 +3,9 @@ import { IRoomSession } from '../IRoomSession'; export class RoomSessionEvent extends NitroEvent { - public static CREATED: string = 'RSE_CREATED'; - public static STARTED: string = 'RSE_STARTED'; - public static ENDED: string = 'RSE_ENDED'; + public static CREATED: string = 'RSE_CREATED'; + public static STARTED: string = 'RSE_STARTED'; + public static ENDED: string = 'RSE_ENDED'; public static ROOM_DATA: string = 'RSE_ROOM_DATA'; private _session: IRoomSession; @@ -15,8 +15,8 @@ export class RoomSessionEvent extends NitroEvent { super(type); - this._session = session; - this._openLandingView = openLandingView; + this._session = session; + this._openLandingView = openLandingView; } public get session(): IRoomSession diff --git a/src/nitro/session/events/RoomSessionFriendRequestEvent.ts b/src/nitro/session/events/RoomSessionFriendRequestEvent.ts index 557bdb82..fc8be383 100644 --- a/src/nitro/session/events/RoomSessionFriendRequestEvent.ts +++ b/src/nitro/session/events/RoomSessionFriendRequestEvent.ts @@ -14,8 +14,8 @@ export class RoomSessionFriendRequestEvent extends RoomSessionEvent super(RoomSessionFriendRequestEvent.RSFRE_FRIEND_REQUEST, session); this._requestId = requestId; - this._userId = userId; - this._userName = userName; + this._userId = userId; + this._userName = userName; } public get requestId(): number diff --git a/src/nitro/session/events/RoomSessionPetBreedingResultEvent.ts b/src/nitro/session/events/RoomSessionPetBreedingResultEvent.ts index 634eacb4..cba4e23f 100644 --- a/src/nitro/session/events/RoomSessionPetBreedingResultEvent.ts +++ b/src/nitro/session/events/RoomSessionPetBreedingResultEvent.ts @@ -13,8 +13,8 @@ export class RoomSessionPetBreedingResultEvent extends RoomSessionEvent { super(RoomSessionPetBreedingResultEvent.PET_BREEDING_RESULT, k); - this._resultData = _arg_2; - this._otherResultData = _arg_3; + this._resultData = _arg_2; + this._otherResultData = _arg_3; } public get resultData(): PetBreedingResultData diff --git a/src/nitro/session/furniture/FurnitureData.ts b/src/nitro/session/furniture/FurnitureData.ts index 5207d39e..ee364885 100644 --- a/src/nitro/session/furniture/FurnitureData.ts +++ b/src/nitro/session/furniture/FurnitureData.ts @@ -34,35 +34,35 @@ export class FurnitureData implements IFurnitureData constructor(type: string, id: number, fullName: string, className: string, category: string, localizedName: string, description: string, revision: number, tileSizeX: number, tileSizeY: number, tileSizeZ: number, colors: number[], hadIndexedColor: boolean, colorIndex: number, adUrl: string, purchaseOfferId: number, purchaseCouldBeUsedForBuyout: boolean, rentOfferId: number, rentCouldBeUsedForBuyout: boolean, availableForBuildersClub: boolean, customParams: string, specialType: number, canStandOn: boolean, canSitOn: boolean, canLayOn: boolean, excludedfromDynamic: boolean, furniLine: string, environment: string, rare: boolean) { - this._type = type; - this._id = id; - this._fullName = fullName; - this._className = className; - this._category = category; - this._revision = revision; - this._tileSizeX = tileSizeX; - this._tileSizeY = tileSizeY; - this._tileSizeZ = tileSizeZ; - this._colors = colors; - this._hasIndexedColor = hadIndexedColor; - this._colourIndex = colorIndex; - this._localizedName = localizedName; - this._description = description; - this._adUrl = adUrl; - this._purchaseOfferId = purchaseOfferId; + this._type = type; + this._id = id; + this._fullName = fullName; + this._className = className; + this._category = category; + this._revision = revision; + this._tileSizeX = tileSizeX; + this._tileSizeY = tileSizeY; + this._tileSizeZ = tileSizeZ; + this._colors = colors; + this._hasIndexedColor = hadIndexedColor; + this._colourIndex = colorIndex; + this._localizedName = localizedName; + this._description = description; + this._adUrl = adUrl; + this._purchaseOfferId = purchaseOfferId; this._purchaseCouldBeUsedForBuyout = purchaseCouldBeUsedForBuyout; - this._rentOfferId = rentOfferId; - this._rentCouldBeUsedForBuyout = rentCouldBeUsedForBuyout; - this._customParams = customParams; - this._specialType = specialType; - this._availableForBuildersClub = availableForBuildersClub; - this._canStandOn = canStandOn; - this._canSitOn = canSitOn; - this._canLayOn = canLayOn; - this._excludedFromDynamic = excludedfromDynamic; - this._furniLine = furniLine; - this._environment = environment; - this._rare = rare; + this._rentOfferId = rentOfferId; + this._rentCouldBeUsedForBuyout = rentCouldBeUsedForBuyout; + this._customParams = customParams; + this._specialType = specialType; + this._availableForBuildersClub = availableForBuildersClub; + this._canStandOn = canStandOn; + this._canSitOn = canSitOn; + this._canLayOn = canLayOn; + this._excludedFromDynamic = excludedfromDynamic; + this._furniLine = furniLine; + this._environment = environment; + this._rare = rare; } public get type(): string diff --git a/src/nitro/session/furniture/FurnitureDataLoader.ts b/src/nitro/session/furniture/FurnitureDataLoader.ts index fb57519c..43441986 100644 --- a/src/nitro/session/furniture/FurnitureDataLoader.ts +++ b/src/nitro/session/furniture/FurnitureDataLoader.ts @@ -20,9 +20,9 @@ export class FurnitureDataLoader extends EventDispatcher { super(); - this._floorItems = floorItems; - this._wallItems = wallItems; - this._localization = localization; + this._floorItems = floorItems; + this._wallItems = wallItems; + this._localization = localization; this._nitroLogger = new NitroLogger(this.constructor.name); } @@ -87,9 +87,9 @@ export class FurnitureDataLoader extends EventDispatcher } } - const classSplit = (furniture.classname as string).split('*'); - const className = classSplit[0]; - const colorIndex = ((classSplit.length > 1) ? parseInt(classSplit[1]) : 0); + const classSplit = (furniture.classname as string).split('*'); + const className = classSplit[0]; + const colorIndex = ((classSplit.length > 1) ? parseInt(classSplit[1]) : 0); const hasColorIndex = (classSplit.length > 1); const furnitureData = new FurnitureData(FurnitureType.FLOOR, furniture.id, furniture.classname, className, furniture.category, furniture.name, furniture.description, furniture.revision, furniture.xdim, furniture.ydim, 0, colors, hasColorIndex, colorIndex, furniture.adurl, furniture.offerid, furniture.buyout, furniture.rentofferid, furniture.rentbuyout, furniture.bc, furniture.customparams, furniture.specialtype, furniture.canstandon, furniture.cansiton, furniture.canlayon, furniture.excludeddynamic, furniture.furniline, furniture.environment, furniture.rare); diff --git a/src/nitro/session/furniture/FurnitureType.ts b/src/nitro/session/furniture/FurnitureType.ts index a63ca207..7f8aff0e 100644 --- a/src/nitro/session/furniture/FurnitureType.ts +++ b/src/nitro/session/furniture/FurnitureType.ts @@ -1,10 +1,10 @@ export enum FurnitureType { - FLOOR = 'S', - WALL = 'I', - EFFECT = 'E', - BADGE = 'B', - ROBOT = 'R', - HABBO_CLUB = 'H', - PET = 'P' + FLOOR = 'S', + WALL = 'I', + EFFECT = 'E', + BADGE = 'B', + ROBOT = 'R', + HABBO_CLUB = 'H', + PET = 'P' } \ No newline at end of file diff --git a/src/nitro/session/handler/BaseHandler.ts b/src/nitro/session/handler/BaseHandler.ts index 642aa624..23d7d660 100644 --- a/src/nitro/session/handler/BaseHandler.ts +++ b/src/nitro/session/handler/BaseHandler.ts @@ -12,15 +12,15 @@ export class BaseHandler extends Disposable { super(); - this._connection = connection; - this._listener = listener; - this._roomId = 0; + this._connection = connection; + this._listener = listener; + this._roomId = 0; } protected onDispose(): void { - this._connection = null; - this._listener = null; + this._connection = null; + this._listener = null; } public setRoomId(id: number): void diff --git a/src/nitro/session/handler/RoomDataHandler.ts b/src/nitro/session/handler/RoomDataHandler.ts index 66773f0d..5c0c3920 100644 --- a/src/nitro/session/handler/RoomDataHandler.ts +++ b/src/nitro/session/handler/RoomDataHandler.ts @@ -30,11 +30,11 @@ export class RoomDataHandler extends BaseHandler const roomData = parser.data; - roomSession.tradeMode = roomData.tradeMode; - roomSession.isGuildRoom = (roomData.habboGroupId !== 0); - roomSession.doorMode = roomData.doorMode; - roomSession.allowPets = roomData.allowPets; - roomSession.moderationSettings = parser.moderation; + roomSession.tradeMode = roomData.tradeMode; + roomSession.isGuildRoom = (roomData.habboGroupId !== 0); + roomSession.doorMode = roomData.doorMode; + roomSession.allowPets = roomData.allowPets; + roomSession.moderationSettings = parser.moderation; this.listener.events.dispatchEvent(new RoomSessionPropertyUpdateEvent(RoomSessionPropertyUpdateEvent.RSDUE_ALLOW_PETS, roomSession)); this.listener.events.dispatchEvent(new RoomSessionEvent(RoomSessionEvent.ROOM_DATA, roomSession)); diff --git a/src/nitro/session/handler/RoomSessionHandler.ts b/src/nitro/session/handler/RoomSessionHandler.ts index e5198523..a9fe995e 100644 --- a/src/nitro/session/handler/RoomSessionHandler.ts +++ b/src/nitro/session/handler/RoomSessionHandler.ts @@ -11,9 +11,9 @@ import { BaseHandler } from './BaseHandler'; export class RoomSessionHandler extends BaseHandler { - public static RS_CONNECTED: string = 'RS_CONNECTED'; - public static RS_READY: string = 'RS_READY'; - public static RS_DISCONNECTED: string = 'RS_DISCONNECTED'; + public static RS_CONNECTED: string = 'RS_CONNECTED'; + public static RS_READY: string = 'RS_READY'; + public static RS_DISCONNECTED: string = 'RS_DISCONNECTED'; constructor(connection: IConnection, listener: IRoomHandlerListener) { @@ -37,8 +37,8 @@ export class RoomSessionHandler extends BaseHandler { if(!(event instanceof RoomReadyMessageEvent)) return; - const fromRoomId = this.roomId; - const toRoomId = event.getParser().roomId; + const fromRoomId = this.roomId; + const toRoomId = event.getParser().roomId; if(this.listener) { diff --git a/src/nitro/session/handler/RoomUsersHandler.ts b/src/nitro/session/handler/RoomUsersHandler.ts index d6bca846..30b1da95 100644 --- a/src/nitro/session/handler/RoomUsersHandler.ts +++ b/src/nitro/session/handler/RoomUsersHandler.ts @@ -66,28 +66,28 @@ export class RoomUsersHandler extends BaseHandler const userData = new RoomUserData(user.roomIndex); - userData.name = user.name; - userData.custom = user.custom; - userData.activityPoints = user.activityPoints; - userData.figure = user.figure; - userData.type = user.userType; - userData.webID = user.webID; - userData.guildId = user.groupID; - userData.groupName = user.groupName; - userData.groupStatus = user.groupStatus; - userData.sex = user.sex; - userData.ownerId = user.ownerId; - userData.ownerName = user.ownerName; - userData.rarityLevel = user.rarityLevel; - userData.hasSaddle = user.hasSaddle; - userData.isRiding = user.isRiding; - userData.canBreed = user.canBreed; - userData.canHarvest = user.canHarvest; - userData.canRevive = user.canRevive; - userData.hasBreedingPermission = user.hasBreedingPermission; - userData.petLevel = user.petLevel; - userData.botSkills = user.botSkills; - userData.isModerator = user.isModerator; + userData.name = user.name; + userData.custom = user.custom; + userData.activityPoints = user.activityPoints; + userData.figure = user.figure; + userData.type = user.userType; + userData.webID = user.webID; + userData.guildId = user.groupID; + userData.groupName = user.groupName; + userData.groupStatus = user.groupStatus; + userData.sex = user.sex; + userData.ownerId = user.ownerId; + userData.ownerName = user.ownerName; + userData.rarityLevel = user.rarityLevel; + userData.hasSaddle = user.hasSaddle; + userData.isRiding = user.isRiding; + userData.canBreed = user.canBreed; + userData.canHarvest = user.canHarvest; + userData.canRevive = user.canRevive; + userData.hasBreedingPermission = user.hasBreedingPermission; + userData.petLevel = user.petLevel; + userData.botSkills = user.botSkills; + userData.isModerator = user.isModerator; if(!session.userDataManager.getUserData(user.roomIndex)) usersToAdd.push(userData); @@ -226,32 +226,32 @@ export class RoomUsersHandler extends BaseHandler const petData = new RoomPetData(); - petData.id = parser.id; - petData.level = parser.level; - petData.maximumLevel = parser.maximumLevel; - petData.experience = parser.experience; + petData.id = parser.id; + petData.level = parser.level; + petData.maximumLevel = parser.maximumLevel; + petData.experience = parser.experience; petData.levelExperienceGoal = parser.levelExperienceGoal; - petData.energy = parser.energy; - petData.maximumEnergy = parser.maximumEnergy; - petData.happyness = parser.happyness; - petData.maximumHappyness = parser.maximumHappyness; - petData.ownerId = parser.ownerId; - petData.ownerName = parser.ownerName; - petData.respect = parser.respect; - petData.age = parser.age; - petData.unknownRarity = parser.unknownRarity; - petData.saddle = parser.saddle; - petData.rider = parser.rider; - petData.breedable = parser.breedable; - petData.fullyGrown = parser.fullyGrown; - petData.rarityLevel = parser.rarityLevel; - petData.dead = parser.dead; - petData.skillTresholds = parser.skillTresholds; - petData.publiclyRideable = parser.publiclyRideable; - petData.maximumTimeToLive = parser.maximumTimeToLive; + petData.energy = parser.energy; + petData.maximumEnergy = parser.maximumEnergy; + petData.happyness = parser.happyness; + petData.maximumHappyness = parser.maximumHappyness; + petData.ownerId = parser.ownerId; + petData.ownerName = parser.ownerName; + petData.respect = parser.respect; + petData.age = parser.age; + petData.unknownRarity = parser.unknownRarity; + petData.saddle = parser.saddle; + petData.rider = parser.rider; + petData.breedable = parser.breedable; + petData.fullyGrown = parser.fullyGrown; + petData.rarityLevel = parser.rarityLevel; + petData.dead = parser.dead; + petData.skillTresholds = parser.skillTresholds; + petData.publiclyRideable = parser.publiclyRideable; + petData.maximumTimeToLive = parser.maximumTimeToLive; petData.remainingTimeToLive = parser.remainingTimeToLive; - petData.remainingGrowTime = parser.remainingGrowTime; - petData.publiclyBreedable = parser.publiclyBreedable; + petData.remainingGrowTime = parser.remainingGrowTime; + petData.publiclyBreedable = parser.publiclyBreedable; this.listener.events.dispatchEvent(new RoomSessionPetInfoUpdateEvent(session, petData)); } diff --git a/src/nitro/session/product/ProductData.ts b/src/nitro/session/product/ProductData.ts index f1754ee1..d3279833 100644 --- a/src/nitro/session/product/ProductData.ts +++ b/src/nitro/session/product/ProductData.ts @@ -8,9 +8,9 @@ export class ProductData implements IProductData constructor(type: string, name: string, description: string) { - this._type = type; - this._name = name; - this._description = description; + this._type = type; + this._name = name; + this._description = description; } public get type(): string diff --git a/src/nitro/sound/SoundManager.ts b/src/nitro/sound/SoundManager.ts index d0107eb9..9020c41b 100644 --- a/src/nitro/sound/SoundManager.ts +++ b/src/nitro/sound/SoundManager.ts @@ -56,9 +56,9 @@ export class SoundManager extends NitroManager const volumeFurniUpdated = castedEvent.volumeFurni !== this._volumeFurni; - this._volumeSystem = (castedEvent.volumeSystem / 100); - this._volumeFurni = (castedEvent.volumeFurni / 100); - this._volumeTrax = (castedEvent.volumeTrax / 100); + this._volumeSystem = (castedEvent.volumeSystem / 100); + this._volumeFurni = (castedEvent.volumeFurni / 100); + this._volumeTrax = (castedEvent.volumeTrax / 100); if(volumeFurniUpdated) this.updateFurniSamplesVolume(this._volumeFurni); return; diff --git a/src/nitro/ui/MouseEventType.ts b/src/nitro/ui/MouseEventType.ts index c2bf6114..b5c5f841 100644 --- a/src/nitro/ui/MouseEventType.ts +++ b/src/nitro/ui/MouseEventType.ts @@ -1,12 +1,12 @@ export class MouseEventType { - public static MOUSE_CLICK: string = 'click'; - public static DOUBLE_CLICK: string = 'double_click'; - public static MOUSE_MOVE: string = 'mousemove'; - public static MOUSE_DOWN: string = 'mousedown'; - public static MOUSE_DOWN_LONG: string = 'mousedown_long'; - public static MOUSE_UP: string = 'mouseup'; - public static ROLL_OVER: string = 'mouseover'; - public static ROLL_OUT: string = 'mouseout'; - public static RIGHT_CLICK: string = 'contextmenu'; + public static MOUSE_CLICK: string = 'click'; + public static DOUBLE_CLICK: string = 'double_click'; + public static MOUSE_MOVE: string = 'mousemove'; + public static MOUSE_DOWN: string = 'mousedown'; + public static MOUSE_DOWN_LONG: string = 'mousedown_long'; + public static MOUSE_UP: string = 'mouseup'; + public static ROLL_OVER: string = 'mouseover'; + public static ROLL_OUT: string = 'mouseout'; + public static RIGHT_CLICK: string = 'contextmenu'; } diff --git a/src/nitro/ui/TouchEventType.ts b/src/nitro/ui/TouchEventType.ts index 0944c48f..3f6eec98 100644 --- a/src/nitro/ui/TouchEventType.ts +++ b/src/nitro/ui/TouchEventType.ts @@ -1,8 +1,8 @@ export class TouchEventType { - public static TOUCH_START: string = 'touchstart'; - public static TOUCH_MOVE: string = 'touchmove'; - public static TOUCH_CANCEL: string = 'touchcancel'; - public static TOUCH_END: string = 'touchend'; - public static TOUCH_LONG: string = 'touchlong'; + public static TOUCH_START: string = 'touchstart'; + public static TOUCH_MOVE: string = 'touchmove'; + public static TOUCH_CANCEL: string = 'touchcancel'; + public static TOUCH_END: string = 'touchend'; + public static TOUCH_LONG: string = 'touchlong'; } diff --git a/src/nitro/ui/widget/enums/ContextMenuEnum.ts b/src/nitro/ui/widget/enums/ContextMenuEnum.ts index 94896ffa..7c53378e 100644 --- a/src/nitro/ui/widget/enums/ContextMenuEnum.ts +++ b/src/nitro/ui/widget/enums/ContextMenuEnum.ts @@ -1,12 +1,12 @@ export class ContextMenuEnum { - public static DUMMY: string = 'DUMMY'; - public static FRIEND_FURNITURE: string = 'FRIEND_FURNITURE'; - public static MONSTERPLANT_SEED: string = 'MONSTERPLANT_SEED'; - public static MYSTERY_BOX: string = 'MYSTERY_BOX'; - public static EFFECT_BOX: string = 'EFFECT_BOX'; - public static MYSTERY_TROPHY: string = 'MYSTERY_TROPHY'; - public static RANDOM_TELEPORT: string = 'RANDOM_TELEPORT'; - public static PURCHASABLE_CLOTHING: string = 'PURCHASABLE_CLOTHING'; - public static GENERIC_USABLE: string = 'GENERIC_USABLE'; + public static DUMMY: string = 'DUMMY'; + public static FRIEND_FURNITURE: string = 'FRIEND_FURNITURE'; + public static MONSTERPLANT_SEED: string = 'MONSTERPLANT_SEED'; + public static MYSTERY_BOX: string = 'MYSTERY_BOX'; + public static EFFECT_BOX: string = 'EFFECT_BOX'; + public static MYSTERY_TROPHY: string = 'MYSTERY_TROPHY'; + public static RANDOM_TELEPORT: string = 'RANDOM_TELEPORT'; + public static PURCHASABLE_CLOTHING: string = 'PURCHASABLE_CLOTHING'; + public static GENERIC_USABLE: string = 'GENERIC_USABLE'; } diff --git a/src/nitro/ui/widget/enums/RoomWidgetEnum.ts b/src/nitro/ui/widget/enums/RoomWidgetEnum.ts index 8b1ff827..4b746b50 100644 --- a/src/nitro/ui/widget/enums/RoomWidgetEnum.ts +++ b/src/nitro/ui/widget/enums/RoomWidgetEnum.ts @@ -1,57 +1,57 @@ export class RoomWidgetEnum { - public static CHAT_WIDGET: string = 'RWE_CHAT_WIDGET'; - public static INFOSTAND: string = 'RWE_INFOSTAND'; - public static ME_MENU: string = 'RWE_ME_MENU'; - public static CHAT_INPUT_WIDGET: string = 'RWE_CHAT_INPUT_WIDGET'; - public static FURNI_PLACEHOLDER: string = 'RWE_FURNI_PLACEHOLDER'; - public static FURNI_CREDIT_WIDGET: string = 'RWE_FURNI_CREDIT_WIDGET'; - public static FURNI_STICKIE_WIDGET: string = 'RWE_FURNI_STICKIE_WIDGET'; - public static FURNI_TROPHY_WIDGET: string = 'RWE_FURNI_TROPHY_WIDGET'; - public static FURNI_LOVELOCK_WIDGET: string = 'RWE_FURNI_LOVELOCK_WIDGET'; - public static FURNI_PRESENT_WIDGET: string = 'RWE_FURNI_PRESENT_WIDGET'; - public static FURNI_ECOTRONBOX_WIDGET: string = 'RWE_FURNI_ECOTRONBOX_WIDGET'; - public static FURNI_PET_PACKAGE_WIDGET: string = 'RWE_FURNI_PET_PACKAGE_WIDGET'; - public static PLAYLIST_EDITOR_WIDGET: string = 'RWE_PLAYLIST_EDITOR_WIDGET'; - public static DOORBELL: string = 'RWE_DOORBELL'; - public static LOADINGBAR: string = 'RWE_LOADINGBAR'; - public static ROOM_QUEUE: string = 'RWE_ROOM_QUEUE'; - public static ROOM_POLL: string = 'RWE_ROOM_POLL'; - public static ROOM_VOTE: string = 'RWE_ROOM_VOTE'; - public static USER_CHOOSER: string = 'RWE_USER_CHOOSER'; - public static FURNI_CHOOSER: string = 'RWE_FURNI_CHOOSER'; - public static ROOM_DIMMER: string = 'RWE_ROOM_DIMMER'; - public static FRIEND_REQUEST: string = 'RWE_FRIEND_REQUEST'; - public static CLOTHING_CHANGE: string = 'RWE_CLOTHING_CHANGE'; - public static CONVERSION_TRACKING: string = 'RWE_CONVERSION_TRACKING'; - public static USER_NOTIFICATION: string = 'RWE_USER_NOTIFICATION'; - public static FRIENDS_BAR: string = 'RWE_FRIENDS_BAR'; - public static PURSE_WIDGET: string = 'RWE_PURSE_WIDGET'; - public static AVATAR_INFO: string = 'RWE_AVATAR_INFO'; - public static WELCOME_GIFT: string = 'RWE_WELCOME_GIFT'; - public static SPAMWALL_POSTIT_WIDGET: string = 'RWE_SPAMWALL_POSTIT_WIDGET'; - public static EFFECTS: string = 'RWE_EFFECTS'; - public static MANNEQUIN: string = 'RWE_MANNEQUIN'; - public static FURNITURE_CONTEXT_MENU: string = 'RWE_FURNITURE_CONTEXT_MENU'; - public static LOCATION_WIDGET: string = 'RWE_LOCATION_WIDGET'; - public static CAMERA: string = 'RWE_CAMERA'; - public static ROOM_THUMBNAIL_CAMERA: string = 'RWE_ROOM_THUMBNAIL_CAMERA'; - public static ROOM_BACKGROUND_COLOR: string = 'RWE_ROOM_BACKGROUND_COLOR'; - public static CUSTOM_USER_NOTIFICATION: string = 'RWE_CUSTOM_USER_NOTIFICATION'; + public static CHAT_WIDGET: string = 'RWE_CHAT_WIDGET'; + public static INFOSTAND: string = 'RWE_INFOSTAND'; + public static ME_MENU: string = 'RWE_ME_MENU'; + public static CHAT_INPUT_WIDGET: string = 'RWE_CHAT_INPUT_WIDGET'; + public static FURNI_PLACEHOLDER: string = 'RWE_FURNI_PLACEHOLDER'; + public static FURNI_CREDIT_WIDGET: string = 'RWE_FURNI_CREDIT_WIDGET'; + public static FURNI_STICKIE_WIDGET: string = 'RWE_FURNI_STICKIE_WIDGET'; + public static FURNI_TROPHY_WIDGET: string = 'RWE_FURNI_TROPHY_WIDGET'; + public static FURNI_LOVELOCK_WIDGET: string = 'RWE_FURNI_LOVELOCK_WIDGET'; + public static FURNI_PRESENT_WIDGET: string = 'RWE_FURNI_PRESENT_WIDGET'; + public static FURNI_ECOTRONBOX_WIDGET: string = 'RWE_FURNI_ECOTRONBOX_WIDGET'; + public static FURNI_PET_PACKAGE_WIDGET: string = 'RWE_FURNI_PET_PACKAGE_WIDGET'; + public static PLAYLIST_EDITOR_WIDGET: string = 'RWE_PLAYLIST_EDITOR_WIDGET'; + public static DOORBELL: string = 'RWE_DOORBELL'; + public static LOADINGBAR: string = 'RWE_LOADINGBAR'; + public static ROOM_QUEUE: string = 'RWE_ROOM_QUEUE'; + public static ROOM_POLL: string = 'RWE_ROOM_POLL'; + public static ROOM_VOTE: string = 'RWE_ROOM_VOTE'; + public static USER_CHOOSER: string = 'RWE_USER_CHOOSER'; + public static FURNI_CHOOSER: string = 'RWE_FURNI_CHOOSER'; + public static ROOM_DIMMER: string = 'RWE_ROOM_DIMMER'; + public static FRIEND_REQUEST: string = 'RWE_FRIEND_REQUEST'; + public static CLOTHING_CHANGE: string = 'RWE_CLOTHING_CHANGE'; + public static CONVERSION_TRACKING: string = 'RWE_CONVERSION_TRACKING'; + public static USER_NOTIFICATION: string = 'RWE_USER_NOTIFICATION'; + public static FRIENDS_BAR: string = 'RWE_FRIENDS_BAR'; + public static PURSE_WIDGET: string = 'RWE_PURSE_WIDGET'; + public static AVATAR_INFO: string = 'RWE_AVATAR_INFO'; + public static WELCOME_GIFT: string = 'RWE_WELCOME_GIFT'; + public static SPAMWALL_POSTIT_WIDGET: string = 'RWE_SPAMWALL_POSTIT_WIDGET'; + public static EFFECTS: string = 'RWE_EFFECTS'; + public static MANNEQUIN: string = 'RWE_MANNEQUIN'; + public static FURNITURE_CONTEXT_MENU: string = 'RWE_FURNITURE_CONTEXT_MENU'; + public static LOCATION_WIDGET: string = 'RWE_LOCATION_WIDGET'; + public static CAMERA: string = 'RWE_CAMERA'; + public static ROOM_THUMBNAIL_CAMERA: string = 'RWE_ROOM_THUMBNAIL_CAMERA'; + public static ROOM_BACKGROUND_COLOR: string = 'RWE_ROOM_BACKGROUND_COLOR'; + public static CUSTOM_USER_NOTIFICATION: string = 'RWE_CUSTOM_USER_NOTIFICATION'; public static FURNI_ACHIEVEMENT_RESOLUTION_ENGRAVING: string = 'RWE_FURNI_ACHIEVEMENT_RESOLUTION_ENGRAVING'; - public static FRIEND_FURNI_CONFIRM: string = 'RWE_FRIEND_FURNI_CONFIRM'; - public static FRIEND_FURNI_ENGRAVING: string = 'RWE_FRIEND_FURNI_ENGRAVING'; - public static HIGH_SCORE_DISPLAY: string = 'RWE_HIGH_SCORE_DISPLAY'; - public static INTERNAL_LINK: string = 'RWE_INTERNAL_LINK'; - public static CUSTOM_STACK_HEIGHT: string = 'RWE_CUSTOM_STACK_HEIGHT'; - public static YOUTUBE: string = 'RWE_YOUTUBE'; - public static RENTABLESPACE: string = 'RWE_RENTABLESPACE'; - public static VIMEO: string = 'RWE_VIMEO'; - public static ROOM_TOOLS: string = 'RWE_ROOM_TOOLS'; - public static EXTERNAL_IMAGE: string = 'RWE_EXTERNAL_IMAGE'; - public static WORD_QUIZZ: string = 'RWE_WORD_QUIZZ'; - public static UI_HELP_BUBBLE: string = 'RWE_UI_HELP_BUBBLE'; - public static ROOM_LINK: string = 'RWE_ROOM_LINK'; - public static CRAFTING: string = 'RWE_CRAFTING'; - public static ROOMGAME_CHECKERS: string = 'RWE_GAME_CHECKERS'; + public static FRIEND_FURNI_CONFIRM: string = 'RWE_FRIEND_FURNI_CONFIRM'; + public static FRIEND_FURNI_ENGRAVING: string = 'RWE_FRIEND_FURNI_ENGRAVING'; + public static HIGH_SCORE_DISPLAY: string = 'RWE_HIGH_SCORE_DISPLAY'; + public static INTERNAL_LINK: string = 'RWE_INTERNAL_LINK'; + public static CUSTOM_STACK_HEIGHT: string = 'RWE_CUSTOM_STACK_HEIGHT'; + public static YOUTUBE: string = 'RWE_YOUTUBE'; + public static RENTABLESPACE: string = 'RWE_RENTABLESPACE'; + public static VIMEO: string = 'RWE_VIMEO'; + public static ROOM_TOOLS: string = 'RWE_ROOM_TOOLS'; + public static EXTERNAL_IMAGE: string = 'RWE_EXTERNAL_IMAGE'; + public static WORD_QUIZZ: string = 'RWE_WORD_QUIZZ'; + public static UI_HELP_BUBBLE: string = 'RWE_UI_HELP_BUBBLE'; + public static ROOM_LINK: string = 'RWE_ROOM_LINK'; + public static CRAFTING: string = 'RWE_CRAFTING'; + public static ROOMGAME_CHECKERS: string = 'RWE_GAME_CHECKERS'; } diff --git a/src/nitro/ui/widget/enums/SystemChatStyleEnum.ts b/src/nitro/ui/widget/enums/SystemChatStyleEnum.ts index f49f8804..15e34285 100644 --- a/src/nitro/ui/widget/enums/SystemChatStyleEnum.ts +++ b/src/nitro/ui/widget/enums/SystemChatStyleEnum.ts @@ -1,6 +1,6 @@ export class SystemChatStyleEnum { - public static NORMAL: number = 0; - public static GENERIC: number = 1; - public static BOT: number = 2; + public static NORMAL: number = 0; + public static GENERIC: number = 1; + public static BOT: number = 2; } \ No newline at end of file diff --git a/src/nitro/utils/FigureDataContainer.ts b/src/nitro/utils/FigureDataContainer.ts index d45641e5..5ca6fda5 100644 --- a/src/nitro/utils/FigureDataContainer.ts +++ b/src/nitro/utils/FigureDataContainer.ts @@ -1,25 +1,25 @@ export class FigureDataContainer { - private static MALE: string = 'M'; - private static FEMALE: string = 'F'; - private static UNISEX: string = 'U'; - private static SCALE: string = 'h'; - private static STD: string = 'std'; - private static DEFAULT_FRAME: string = '0'; - private static HD: string = 'hd'; - private static HAIR: string = 'hr'; - private static HAT: string = 'ha'; - private static HEAD_ACCESSORIES: string = 'he'; - private static EYE_ACCESSORIES: string = 'ea'; - private static FACE_ACCESSORIES: string = 'fa'; - private static JACKET: string = 'cc'; - private static SHIRT: string = 'ch'; - private static CHEST_ACCESSORIES: string = 'ca'; - private static CHEST_PRINTS: string = 'cp'; - private static TROUSERS: string = 'lg'; - private static SHOES: string = 'sh'; - private static TROUSER_ACCESSORIES: string = 'wa'; - private static BLOCKED_FX_TYPES: number[] = [28, 29, 30, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 68]; + private static MALE: string = 'M'; + private static FEMALE: string = 'F'; + private static UNISEX: string = 'U'; + private static SCALE: string = 'h'; + private static STD: string = 'std'; + private static DEFAULT_FRAME: string = '0'; + private static HD: string = 'hd'; + private static HAIR: string = 'hr'; + private static HAT: string = 'ha'; + private static HEAD_ACCESSORIES: string = 'he'; + private static EYE_ACCESSORIES: string = 'ea'; + private static FACE_ACCESSORIES: string = 'fa'; + private static JACKET: string = 'cc'; + private static SHIRT: string = 'ch'; + private static CHEST_ACCESSORIES: string = 'ca'; + private static CHEST_PRINTS: string = 'cp'; + private static TROUSERS: string = 'lg'; + private static SHOES: string = 'sh'; + private static TROUSER_ACCESSORIES: string = 'wa'; + private static BLOCKED_FX_TYPES: number[] = [28, 29, 30, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 68]; private _data: Map; private _colors: Map; @@ -29,18 +29,18 @@ public loadAvatarData(k: string, _arg_2: string): void { - this._data = new Map(); - this._colors = new Map(); - this._gender = _arg_2; + this._data = new Map(); + this._colors = new Map(); + this._gender = _arg_2; this.parseFigureString(k); } public dispose(): void { - this._data = null; - this._colors = null; - this._isDisposed = true; + this._data = null; + this._colors = null; + this._isDisposed = true; } public get disposed(): boolean @@ -58,9 +58,9 @@ if(_local_3.length > 0) { - const part = _local_3[0]; - const setId = parseInt(_local_3[1]); - const colors: number[] = []; + const part = _local_3[0]; + const setId = parseInt(_local_3[1]); + const colors: number[] = []; let i = 2; @@ -189,8 +189,8 @@ { const partSets: string[] = [ FigureDataContainer.HD ]; - let figure = ''; - const sets: string[] = []; + let figure = ''; + const sets: string[] = []; for(const part of partSets) { diff --git a/src/nitro/utils/FixedSizeStack.ts b/src/nitro/utils/FixedSizeStack.ts index a52b7d07..af8e09aa 100644 --- a/src/nitro/utils/FixedSizeStack.ts +++ b/src/nitro/utils/FixedSizeStack.ts @@ -6,9 +6,9 @@ constructor(k: number) { - this._data = []; - this._maxSize = k; - this._index = 0; + this._data = []; + this._maxSize = k; + this._index = 0; } public reset(): void diff --git a/src/nitro/utils/FriendlyTime.ts b/src/nitro/utils/FriendlyTime.ts index acee315a..f6e08409 100644 --- a/src/nitro/utils/FriendlyTime.ts +++ b/src/nitro/utils/FriendlyTime.ts @@ -2,12 +2,12 @@ export class FriendlyTime { - private static MINUTE: number = 60; - private static HOUR: number = (60 * FriendlyTime.MINUTE); - private static DAY: number = (24 * FriendlyTime.HOUR); - private static WEEK: number = (7 * FriendlyTime.DAY); - private static MONTH: number = (30 * FriendlyTime.DAY); - private static YEAR: number = (365 * FriendlyTime.DAY); + private static MINUTE: number = 60; + private static HOUR: number = (60 * FriendlyTime.MINUTE); + private static DAY: number = (24 * FriendlyTime.HOUR); + private static WEEK: number = (7 * FriendlyTime.DAY); + private static MONTH: number = (30 * FriendlyTime.DAY); + private static YEAR: number = (365 * FriendlyTime.DAY); public static format(seconds: number, key: string = '', threshold: number = 3): string diff --git a/src/nitro/utils/HabboWebTools.ts b/src/nitro/utils/HabboWebTools.ts index b089d650..945c1f5a 100644 --- a/src/nitro/utils/HabboWebTools.ts +++ b/src/nitro/utils/HabboWebTools.ts @@ -4,8 +4,8 @@ import { LegacyExternalInterface } from '../externalInterface/LegacyExternalInte export class HabboWebTools { public static ADVERTISEMENT: string = 'advertisement'; - public static OPENLINK: string = 'openlink'; - public static OPENROOM: string = 'openroom'; + public static OPENLINK: string = 'openlink'; + public static OPENROOM: string = 'openroom'; public static logEventLog(data: string): void { diff --git a/src/nitro/window/motion/Interval.ts b/src/nitro/window/motion/Interval.ts index 1afb7231..763235e3 100644 --- a/src/nitro/window/motion/Interval.ts +++ b/src/nitro/window/motion/Interval.ts @@ -10,8 +10,8 @@ export class Interval extends Motion { super(target); - this._complete = false; - this._duration = duration; + this._complete = false; + this._duration = duration; } public get duration(): number @@ -23,8 +23,8 @@ export class Interval extends Motion { super.start(); - this._complete = false; - this._startTimeMs = Nitro.instance.time; + this._complete = false; + this._startTimeMs = Nitro.instance.time; } public tick(time: number): void diff --git a/src/nitro/window/motion/JumpBy.ts b/src/nitro/window/motion/JumpBy.ts index a5cd8a7f..1b956c96 100644 --- a/src/nitro/window/motion/JumpBy.ts +++ b/src/nitro/window/motion/JumpBy.ts @@ -13,10 +13,10 @@ export class JumpBy extends Interval { super(target, duration); - this._deltaX = deltaX; - this._deltaY = deltaY; - this._height = -(height); - this._numJumps = numJumps; + this._deltaX = deltaX; + this._deltaY = deltaY; + this._height = -(height); + this._numJumps = numJumps; } public start(): void @@ -31,7 +31,7 @@ export class JumpBy extends Interval { super.update(k); - this.target.style.left = ((this._startX + (this._deltaX * k)) + 'px'); - this.target.style.top = (((this._startY + (this._height * Math.abs(Math.sin(((k * Math.PI) * this._numJumps))))) + (this._deltaY * k)) + 'px'); + this.target.style.left = ((this._startX + (this._deltaX * k)) + 'px'); + this.target.style.top = (((this._startY + (this._height * Math.abs(Math.sin(((k * Math.PI) * this._numJumps))))) + (this._deltaY * k)) + 'px'); } } \ No newline at end of file diff --git a/src/nitro/window/motion/Motions.ts b/src/nitro/window/motion/Motions.ts index cbb2c773..31f5009d 100644 --- a/src/nitro/window/motion/Motions.ts +++ b/src/nitro/window/motion/Motions.ts @@ -3,11 +3,11 @@ import { Motion } from './Motion'; export class Motions { - private static _QUEUED_MOTIONS: Motion[] = []; - private static _RUNNING_MOTIONS: Motion[] = []; - private static _REMOVED_MOTIONS: Motion[] = []; - private static _TIMER: ReturnType = null; - private static _IS_UPDATING: boolean = false; + private static _QUEUED_MOTIONS: Motion[] = []; + private static _RUNNING_MOTIONS: Motion[] = []; + private static _REMOVED_MOTIONS: Motion[] = []; + private static _TIMER: ReturnType = null; + private static _IS_UPDATING: boolean = false; public static get TIMER_TIME(): number { diff --git a/src/nitro/window/motion/MoveTo.ts b/src/nitro/window/motion/MoveTo.ts index 0c936196..3d7fe2a9 100644 --- a/src/nitro/window/motion/MoveTo.ts +++ b/src/nitro/window/motion/MoveTo.ts @@ -29,7 +29,7 @@ export class MoveTo extends Interval public update(k: number): void { - this.target.style.left = ((this._startX + (this._deltaX * k)) + 'px'); - this.target.style.top = ((this._startY + (this._deltaY * k)) + 'px'); + this.target.style.left = ((this._startX + (this._deltaX * k)) + 'px'); + this.target.style.top = ((this._startY + (this._deltaY * k)) + 'px'); } } \ No newline at end of file diff --git a/src/nitro/window/motion/Queue.ts b/src/nitro/window/motion/Queue.ts index e63baf47..990d9da1 100644 --- a/src/nitro/window/motion/Queue.ts +++ b/src/nitro/window/motion/Queue.ts @@ -13,8 +13,8 @@ export class Queue extends Motion for(const motion of motions) this._queue.push(motion); - this._motion = motions[0]; - this._complete = !this._motion; + this._motion = motions[0]; + this._complete = !this._motion; } public get running(): boolean diff --git a/src/nitro/window/motion/ResizeTo.ts b/src/nitro/window/motion/ResizeTo.ts index 62a5563d..d5e706b5 100644 --- a/src/nitro/window/motion/ResizeTo.ts +++ b/src/nitro/window/motion/ResizeTo.ts @@ -29,7 +29,7 @@ export class ResizeTo extends Interval public update(k: number): void { - this.target.style.width = ((this._startW + (this._deltaW * k)) + 'px'); - this.target.style.height = ((this._startH + (this._deltaH * k)) + 'px'); + this.target.style.width = ((this._startW + (this._deltaW * k)) + 'px'); + this.target.style.height = ((this._startH + (this._deltaH * k)) + 'px'); } } \ No newline at end of file diff --git a/src/nitro/window/motion/Wait.ts b/src/nitro/window/motion/Wait.ts index e51c06eb..04a6ec21 100644 --- a/src/nitro/window/motion/Wait.ts +++ b/src/nitro/window/motion/Wait.ts @@ -22,8 +22,8 @@ export class Wait extends Motion { super.start(); - this._complete = false; - this._startTimeMs = Nitro.instance.time; + this._complete = false; + this._startTimeMs = Nitro.instance.time; } public tick(k: number): void diff --git a/src/room/RoomInstance.ts b/src/room/RoomInstance.ts index c54129b4..dbab9f1d 100644 --- a/src/room/RoomInstance.ts +++ b/src/room/RoomInstance.ts @@ -21,12 +21,12 @@ export class RoomInstance extends Disposable implements IRoomInstance { super(); - this._id = id; - this._container = container; - this._renderer = null; - this._managers = new Map(); - this._updateCategories = []; - this._model = new RoomObjectModel(); + this._id = id; + this._container = container; + this._renderer = null; + this._managers = new Map(); + this._updateCategories = []; + this._model = new RoomObjectModel(); } protected onDispose(): void diff --git a/src/room/RoomManager.ts b/src/room/RoomManager.ts index 1363bf1e..bf6085b4 100644 --- a/src/room/RoomManager.ts +++ b/src/room/RoomManager.ts @@ -16,12 +16,12 @@ import { RoomObjectManager } from './RoomObjectManager'; export class RoomManager extends NitroManager implements IRoomManager, IRoomInstanceContainer { - public static ROOM_MANAGER_ERROR: number = -1; - public static ROOM_MANAGER_LOADING: number = 0; - public static ROOM_MANAGER_LOADED: number = 1; - public static ROOM_MANAGER_INITIALIZING: number = 2; - public static ROOM_MANAGER_INITIALIZED: number = 3; - private static CONTENT_PROCESSING_TIME_LIMIT_MILLISECONDS: number = 40; + public static ROOM_MANAGER_ERROR: number = -1; + public static ROOM_MANAGER_LOADING: number = 0; + public static ROOM_MANAGER_LOADED: number = 1; + public static ROOM_MANAGER_INITIALIZING: number = 2; + public static ROOM_MANAGER_INITIALIZED: number = 3; + private static CONTENT_PROCESSING_TIME_LIMIT_MILLISECONDS: number = 40; private _state: number; private _rooms: Map; @@ -42,20 +42,20 @@ export class RoomManager extends NitroManager implements IRoomManager, IRoomInst { super(); - this._state = RoomManager.ROOM_MANAGER_LOADED; - this._rooms = new Map(); - this._contentLoader = null; - this._updateCategories = []; + this._state = RoomManager.ROOM_MANAGER_LOADED; + this._rooms = new Map(); + this._contentLoader = null; + this._updateCategories = []; - this._listener = listener; - this._visualizationFactory = visualizationFactory; - this._logicFactory = logicFactory; + this._listener = listener; + this._visualizationFactory = visualizationFactory; + this._logicFactory = logicFactory; - this._initialLoadList = []; - this._pendingContentTypes = []; + this._initialLoadList = []; + this._pendingContentTypes = []; this._skipContentProcessing = false; - this._disposed = false; + this._disposed = false; this.onRoomContentLoadedEvent = this.onRoomContentLoadedEvent.bind(this); @@ -132,11 +132,11 @@ export class RoomManager extends NitroManager implements IRoomManager, IRoomInst if(!instance) return null; - let visualization = type; - let logic = type; - let assetName = type; - let asset: IGraphicAssetCollection = null; - let isLoading = false; + let visualization = type; + let logic = type; + let assetName = type; + let asset: IGraphicAssetCollection = null; + let isLoading = false; if(this._contentLoader.isLoaderType(type)) { @@ -148,14 +148,14 @@ export class RoomManager extends NitroManager implements IRoomManager, IRoomInst this._contentLoader.downloadAsset(type, this.events); - assetName = this._contentLoader.getPlaceholderName(type); - asset = this._contentLoader.getCollection(assetName); + assetName = this._contentLoader.getPlaceholderName(type); + asset = this._contentLoader.getCollection(assetName); if(!asset) return null; } - visualization = asset.data.visualizationType; - logic = asset.data.logicType; + visualization = asset.data.visualizationType; + logic = asset.data.logicType; } const object = (instance.createRoomObject(objectId, 1, type, category) as IRoomObjectController); @@ -214,8 +214,8 @@ export class RoomManager extends NitroManager implements IRoomManager, IRoomInst if(!asset) return; - const visualization = asset.data.visualizationType; - const logic = asset.data.logicType; + const visualization = asset.data.visualizationType; + const logic = asset.data.logicType; const visualizationData = this._visualizationFactory.getVisualizationData(type, visualization, asset.data); for(const room of this._rooms.values()) diff --git a/src/room/RoomObjectManager.ts b/src/room/RoomObjectManager.ts index 5d345248..0e3f0286 100644 --- a/src/room/RoomObjectManager.ts +++ b/src/room/RoomObjectManager.ts @@ -10,8 +10,8 @@ export class RoomObjectManager implements IRoomObjectManager constructor() { - this._objects = new AdvancedMap(); - this._objectsPerType = new AdvancedMap(); + this._objects = new AdvancedMap(); + this._objectsPerType = new AdvancedMap(); } public dispose(): void diff --git a/src/room/events/RoomObjectMouseEvent.ts b/src/room/events/RoomObjectMouseEvent.ts index 18ebb530..df10b8be 100644 --- a/src/room/events/RoomObjectMouseEvent.ts +++ b/src/room/events/RoomObjectMouseEvent.ts @@ -3,14 +3,14 @@ import { RoomObjectEvent } from './RoomObjectEvent'; export class RoomObjectMouseEvent extends RoomObjectEvent { - public static CLICK: string = 'ROE_MOUSE_CLICK'; - public static DOUBLE_CLICK: string = 'ROE_MOUSE_DOUBLE_CLICK'; - public static MOUSE_MOVE: string = 'ROE_MOUSE_MOVE'; - public static MOUSE_DOWN: string = 'ROE_MOUSE_DOWN'; - public static MOUSE_DOWN_LONG: string = 'ROE_MOUSE_DOWN_LONG'; - public static MOUSE_UP: string = 'ROE_MOUSE_UP'; - public static MOUSE_ENTER: string = 'ROE_MOUSE_ENTER'; - public static MOUSE_LEAVE: string = 'ROE_MOUSE_LEAVE'; + public static CLICK: string = 'ROE_MOUSE_CLICK'; + public static DOUBLE_CLICK: string = 'ROE_MOUSE_DOUBLE_CLICK'; + public static MOUSE_MOVE: string = 'ROE_MOUSE_MOVE'; + public static MOUSE_DOWN: string = 'ROE_MOUSE_DOWN'; + public static MOUSE_DOWN_LONG: string = 'ROE_MOUSE_DOWN_LONG'; + public static MOUSE_UP: string = 'ROE_MOUSE_UP'; + public static MOUSE_ENTER: string = 'ROE_MOUSE_ENTER'; + public static MOUSE_LEAVE: string = 'ROE_MOUSE_LEAVE'; private _eventId: string = ''; private _altKey: boolean; @@ -26,11 +26,11 @@ export class RoomObjectMouseEvent extends RoomObjectEvent { super(type, object); - this._eventId = eventId; - this._altKey = altKey; - this._ctrlKey = ctrlKey; - this._shiftKey = shiftKey; - this._buttonDown = buttonDown; + this._eventId = eventId; + this._altKey = altKey; + this._ctrlKey = ctrlKey; + this._shiftKey = shiftKey; + this._buttonDown = buttonDown; } public get eventId(): string diff --git a/src/room/events/RoomSpriteMouseEvent.ts b/src/room/events/RoomSpriteMouseEvent.ts index 457f55af..bb6bab0d 100644 --- a/src/room/events/RoomSpriteMouseEvent.ts +++ b/src/room/events/RoomSpriteMouseEvent.ts @@ -17,18 +17,18 @@ export class RoomSpriteMouseEvent constructor(type: string, eventId: string, canvasId: string, spriteTag: string, screenX: number, screenY: number, localX: number = 0, localY: number = 0, ctrlKey: boolean = false, altKey: boolean = false, shiftKey: boolean = false, buttonDown: boolean = false) { - this._type = type; - this._eventId = eventId; - this._canvasId = canvasId; - this._spriteTag = spriteTag; - this._screenX = screenX; - this._screenY = screenY; - this._localX = localX; - this._localY = localY; - this._ctrlKey = ctrlKey; - this._altKey = altKey; - this._shiftKey = shiftKey; - this._buttonDown = buttonDown; + this._type = type; + this._eventId = eventId; + this._canvasId = canvasId; + this._spriteTag = spriteTag; + this._screenX = screenX; + this._screenY = screenY; + this._localX = localX; + this._localY = localY; + this._ctrlKey = ctrlKey; + this._altKey = altKey; + this._shiftKey = shiftKey; + this._buttonDown = buttonDown; this._spriteOffsetX = 0; this._spriteOffsetY = 0; } diff --git a/src/room/messages/RoomObjectUpdateMessage.ts b/src/room/messages/RoomObjectUpdateMessage.ts index 80e7b63b..93d61986 100644 --- a/src/room/messages/RoomObjectUpdateMessage.ts +++ b/src/room/messages/RoomObjectUpdateMessage.ts @@ -7,7 +7,7 @@ export class RoomObjectUpdateMessage constructor(location: IVector3D, direction: IVector3D) { - this._location = location; + this._location = location; this._direction = direction; } diff --git a/src/room/object/RoomObject.ts b/src/room/object/RoomObject.ts index 34d8c08a..bb7d7064 100644 --- a/src/room/object/RoomObject.ts +++ b/src/room/object/RoomObject.ts @@ -33,21 +33,21 @@ export class RoomObject extends Disposable implements IRoomObjectController { super(); - this._id = id; - this._instanceId = RoomObject.OBJECT_COUNTER++; - this._type = type; - this._model = new RoomObjectModel(); + this._id = id; + this._instanceId = RoomObject.OBJECT_COUNTER++; + this._type = type; + this._model = new RoomObjectModel(); - this._location = new Vector3d(); - this._direction = new Vector3d(); - this._states = []; + this._location = new Vector3d(); + this._direction = new Vector3d(); + this._states = []; - this._visualization = null; - this._logic = null; - this._pendingLogicMessages = []; + this._visualization = null; + this._logic = null; + this._pendingLogicMessages = []; - this._updateCounter = 0; - this._isReady = false; + this._updateCounter = 0; + this._isReady = false; let i = (stateCount - 1); @@ -82,9 +82,9 @@ export class RoomObject extends Disposable implements IRoomObjectController if((vector.x === this._location.x) && (vector.y === this._location.y) && (vector.z === this._location.z)) return; - this._location.x = vector.x; - this._location.y = vector.y; - this._location.z = vector.z; + this._location.x = vector.x; + this._location.y = vector.y; + this._location.z = vector.z; this._updateCounter++; } diff --git a/src/room/object/RoomObjectModel.ts b/src/room/object/RoomObjectModel.ts index d2fc0b27..d610ce24 100644 --- a/src/room/object/RoomObjectModel.ts +++ b/src/room/object/RoomObjectModel.ts @@ -7,7 +7,7 @@ export class RoomObjectModel implements IRoomObjectModel constructor() { - this._map = new Map(); + this._map = new Map(); this._updateCounter = 0; } diff --git a/src/room/object/enum/AlphaTolerance.ts b/src/room/object/enum/AlphaTolerance.ts index 3f41a289..94b695ec 100644 --- a/src/room/object/enum/AlphaTolerance.ts +++ b/src/room/object/enum/AlphaTolerance.ts @@ -1,6 +1,6 @@ export class AlphaTolerance { - public static MATCH_ALL_PIXELS: number = -1; - public static MATCH_OPAQUE_PIXELS: number = 128; - public static MATCH_NOTHING: number = 256; + public static MATCH_ALL_PIXELS: number = -1; + public static MATCH_OPAQUE_PIXELS: number = 128; + public static MATCH_NOTHING: number = 256; } diff --git a/src/room/object/enum/RoomObjectSpriteType.ts b/src/room/object/enum/RoomObjectSpriteType.ts index eda5e353..ec4f9537 100644 --- a/src/room/object/enum/RoomObjectSpriteType.ts +++ b/src/room/object/enum/RoomObjectSpriteType.ts @@ -1,7 +1,7 @@ export class RoomObjectSpriteType { - public static DEFAULT: number = 1; - public static ROOM_PLANE: number = 2; - public static AVATAR: number = 3; - public static AVATAR_OWN: number = 4; + public static DEFAULT: number = 1; + public static ROOM_PLANE: number = 2; + public static AVATAR: number = 3; + public static AVATAR_OWN: number = 4; } diff --git a/src/room/object/logic/RoomObjectLogicBase.ts b/src/room/object/logic/RoomObjectLogicBase.ts index f86b6d9b..9eda0d8e 100644 --- a/src/room/object/logic/RoomObjectLogicBase.ts +++ b/src/room/object/logic/RoomObjectLogicBase.ts @@ -17,10 +17,10 @@ export class RoomObjectLogicBase extends Disposable implements IRoomObjectEventH { super(); - this._object = null; - this._events = null; + this._object = null; + this._events = null; - this._time = 0; + this._time = 0; } public initialize(data: unknown): void diff --git a/src/room/object/visualization/RoomObjectSprite.ts b/src/room/object/visualization/RoomObjectSprite.ts index 43a0dc24..6a295cf0 100644 --- a/src/room/object/visualization/RoomObjectSprite.ts +++ b/src/room/object/visualization/RoomObjectSprite.ts @@ -42,43 +42,43 @@ export class RoomObjectSprite implements IRoomObjectSprite constructor() { - this._id = RoomObjectSprite.SPRITE_COUNTER++; - this._name = ''; - this._type = ''; - this._spriteType = RoomObjectSpriteType.DEFAULT; - this._texture = null; - this._container = null; + this._id = RoomObjectSprite.SPRITE_COUNTER++; + this._name = ''; + this._type = ''; + this._spriteType = RoomObjectSpriteType.DEFAULT; + this._texture = null; + this._container = null; - this._width = 0; - this._height = 0; - this._offsetX = 0; - this._offsetY = 0; - this._flipH = false; - this._flipV = false; - this._direction = 0; + this._width = 0; + this._height = 0; + this._offsetX = 0; + this._offsetY = 0; + this._flipH = false; + this._flipV = false; + this._direction = 0; - this._alpha = 255; - this._blendMode = BLEND_MODES.NORMAL; - this._color = 0xFFFFFF; - this._relativeDepth = 0; - this._varyingDepth = false; - this._libraryAssetName = ''; - this._clickHandling = false; - this._visible = true; - this._tag = ''; - this._posture = null; - this._alphaTolerance = AlphaTolerance.MATCH_OPAQUE_PIXELS; - this._filters = []; + this._alpha = 255; + this._blendMode = BLEND_MODES.NORMAL; + this._color = 0xFFFFFF; + this._relativeDepth = 0; + this._varyingDepth = false; + this._libraryAssetName = ''; + this._clickHandling = false; + this._visible = true; + this._tag = ''; + this._posture = null; + this._alphaTolerance = AlphaTolerance.MATCH_OPAQUE_PIXELS; + this._filters = []; - this._updateCounter = 0; - this._updateContainer = false; + this._updateCounter = 0; + this._updateContainer = false; } public dispose(): void { - this._texture = null; - this._width = 0; - this._height = 0; + this._texture = null; + this._width = 0; + this._height = 0; } public get id(): number @@ -136,8 +136,8 @@ export class RoomObjectSprite implements IRoomObjectSprite if(texture) { - this._width = texture.width; - this._height = texture.height; + this._width = texture.width; + this._height = texture.height; } this._texture = texture; @@ -158,8 +158,8 @@ export class RoomObjectSprite implements IRoomObjectSprite if(container) { - this._width = container.width; - this._height = container.height; + this._width = container.width; + this._height = container.height; } this._container = container; diff --git a/src/room/object/visualization/RoomObjectSpriteVisualization.ts b/src/room/object/visualization/RoomObjectSpriteVisualization.ts index 90953008..4227f2d1 100644 --- a/src/room/object/visualization/RoomObjectSpriteVisualization.ts +++ b/src/room/object/visualization/RoomObjectSpriteVisualization.ts @@ -28,16 +28,16 @@ export class RoomObjectSpriteVisualization implements IRoomObjectSpriteVisualiza constructor() { - this._id = RoomObjectSpriteVisualization.VISUALIZATION_COUNTER++; - this._object = null; - this._asset = null; - this._sprites = []; + this._id = RoomObjectSpriteVisualization.VISUALIZATION_COUNTER++; + this._object = null; + this._asset = null; + this._sprites = []; - this._scale = -1; + this._scale = -1; - this._updateObjectCounter = -1; - this._updateModelCounter = -1; - this._updateSpriteCounter = -1; + this._updateObjectCounter = -1; + this._updateModelCounter = -1; + this._updateSpriteCounter = -1; } public initialize(data: IObjectVisualizationData): boolean @@ -71,8 +71,8 @@ export class RoomObjectSpriteVisualization implements IRoomObjectSpriteVisualiza this._sprites = null; } - this._object = null; - this._asset = null; + this._object = null; + this._asset = null; } public getSprite(index: number): IRoomObjectSprite @@ -136,7 +136,7 @@ export class RoomObjectSpriteVisualization implements IRoomObjectSpriteVisualiza if((boundingRectangle.width * boundingRectangle.height) === 0) return null; - const spriteCount = this.totalSprites; + const spriteCount = this.totalSprites; const spriteList: IRoomObjectSprite[] = []; let index = 0; @@ -161,19 +161,19 @@ export class RoomObjectSpriteVisualization implements IRoomObjectSpriteVisualiza while(index < spriteList.length) { - const objectSprite = spriteList[index]; - const texture = objectSprite.texture; + const objectSprite = spriteList[index]; + const texture = objectSprite.texture; if(texture) { const sprite = new NitroSprite(texture); - sprite.alpha = (objectSprite.alpha / 255); - sprite.tint = objectSprite.color; - sprite.x = objectSprite.offsetX; - sprite.y = objectSprite.offsetY; - sprite.blendMode = objectSprite.blendMode; - sprite.filters = objectSprite.filters; + sprite.alpha = (objectSprite.alpha / 255); + sprite.tint = objectSprite.color; + sprite.x = objectSprite.offsetX; + sprite.y = objectSprite.offsetY; + sprite.blendMode = objectSprite.blendMode; + sprite.filters = objectSprite.filters; if(objectSprite.flipH) sprite.scale.x = -1; @@ -194,8 +194,8 @@ export class RoomObjectSpriteVisualization implements IRoomObjectSpriteVisualiza public getBoundingRectangle(): Rectangle { - const totalSprites = this.totalSprites; - const rectangle = new Rectangle(); + const totalSprites = this.totalSprites; + const rectangle = new Rectangle(); let iterator = 0; @@ -212,10 +212,10 @@ export class RoomObjectSpriteVisualization implements IRoomObjectSpriteVisualiza if(iterator === 0) { - rectangle.x = point.x; - rectangle.y = point.y; - rectangle.width = sprite.width; - rectangle.height = sprite.height; + rectangle.x = point.x; + rectangle.y = point.y; + rectangle.width = sprite.width; + rectangle.height = sprite.height; } else { diff --git a/src/room/object/visualization/utils/GraphicAsset.ts b/src/room/object/visualization/utils/GraphicAsset.ts index a9d8e75c..7b717978 100644 --- a/src/room/object/visualization/utils/GraphicAsset.ts +++ b/src/room/object/visualization/utils/GraphicAsset.ts @@ -23,26 +23,26 @@ export class GraphicAsset implements IGraphicAsset { const graphicAsset = (GraphicAsset.GRAPHIC_POOL.length ? GraphicAsset.GRAPHIC_POOL.pop() : new GraphicAsset()); - graphicAsset._name = name; - graphicAsset._source = source || null; + graphicAsset._name = name; + graphicAsset._source = source || null; if(texture) { - graphicAsset._texture = texture; - graphicAsset._initialized = false; + graphicAsset._texture = texture; + graphicAsset._initialized = false; } else { - graphicAsset._texture = null; - graphicAsset._initialized = true; + graphicAsset._texture = null; + graphicAsset._initialized = true; } - graphicAsset._usesPalette = usesPalette; - graphicAsset._x = x; - graphicAsset._y = y; - graphicAsset._flipH = flipH; - graphicAsset._flipV = flipV; - graphicAsset._rectangle = null; + graphicAsset._usesPalette = usesPalette; + graphicAsset._x = x; + graphicAsset._y = y; + graphicAsset._flipH = flipH; + graphicAsset._flipV = flipV; + graphicAsset._rectangle = null; return graphicAsset; } @@ -58,8 +58,8 @@ export class GraphicAsset implements IGraphicAsset { if(this._initialized || !this._texture) return; - this._width = this._texture.width; - this._height = this._texture.height; + this._width = this._texture.width; + this._height = this._texture.height; this._initialized = true; } diff --git a/src/room/object/visualization/utils/GraphicAssetCollection.ts b/src/room/object/visualization/utils/GraphicAssetCollection.ts index 953c9a70..00a78930 100644 --- a/src/room/object/visualization/utils/GraphicAssetCollection.ts +++ b/src/room/object/visualization/utils/GraphicAssetCollection.ts @@ -27,11 +27,11 @@ export class GraphicAssetCollection implements IGraphicAssetCollection { if(!data) throw new Error('invalid_collection'); - this._name = data.name; - this._data = data; - this._textures = new Map(); - this._assets = new Map(); - this._palettes = new Map(); + this._name = data.name; + this._data = data; + this._textures = new Map(); + this._assets = new Map(); + this._palettes = new Map(); this._paletteAssetNames = []; if(spritesheet) this.addLibraryAsset(spritesheet.textures); @@ -75,8 +75,8 @@ export class GraphicAssetCollection implements IGraphicAssetCollection if(this._referenceCount <= 0) { - this._referenceCount = 0; - this._referenceTimestamp = Nitro.instance.time; + this._referenceCount = 0; + this._referenceTimestamp = Nitro.instance.time; this.disposePaletteAssets(false); } @@ -84,8 +84,8 @@ export class GraphicAssetCollection implements IGraphicAssetCollection public define(data: IAssetData): void { - const assets = data.assets; - const palettes = data.palettes; + const assets = data.assets; + const palettes = data.palettes; if(assets) this.defineAssets(assets); @@ -102,12 +102,12 @@ export class GraphicAssetCollection implements IGraphicAssetCollection if(!asset) continue; - const x = (-(asset.x) || 0); - const y = (-(asset.y) || 0); - let flipH = false; - const flipV = false; + const x = (-(asset.x) || 0); + const y = (-(asset.y) || 0); + let flipH = false; + const flipV = false; const usesPalette = (asset.usesPalette || false); - let source = (asset.source || ''); + let source = (asset.source || ''); if(asset.flipH && source.length) flipH = true; @@ -147,8 +147,8 @@ export class GraphicAssetCollection implements IGraphicAssetCollection if(this._palettes.get(id)) continue; - let colorOne = 0xFFFFFF; - let colorTwo = 0xFFFFFF; + let colorOne = 0xFFFFFF; + let colorTwo = 0xFFFFFF; let color = palette.color1; @@ -271,8 +271,8 @@ export class GraphicAssetCollection implements IGraphicAssetCollection if(override) { existingTexture.baseTexture = texture.baseTexture; - existingTexture.frame = texture.frame; - existingTexture.trim = texture.trim; + existingTexture.frame = texture.frame; + existingTexture.trim = texture.trim; existingTexture.updateUvs(); diff --git a/src/room/object/visualization/utils/GraphicAssetPalette.ts b/src/room/object/visualization/utils/GraphicAssetPalette.ts index 7032354b..23ec85fa 100644 --- a/src/room/object/visualization/utils/GraphicAssetPalette.ts +++ b/src/room/object/visualization/utils/GraphicAssetPalette.ts @@ -14,8 +14,8 @@ export class GraphicAssetPalette while(this._palette.length < 256) this._palette.push([ 0, 0, 0 ]); - this._primaryColor = primaryColor; - this._secondaryColor = secondaryColor; + this._primaryColor = primaryColor; + this._secondaryColor = secondaryColor; } public dispose(): void @@ -25,11 +25,11 @@ export class GraphicAssetPalette public applyPalette(texture: Texture): Texture { - const sprite = new NitroSprite(texture); - const textureCanvas = TextureUtils.generateCanvas(sprite); - const textureCtx = textureCanvas.getContext('2d'); - const textureImageData = textureCtx.getImageData(0, 0, textureCanvas.width, textureCanvas.height); - const data = textureImageData.data; + const sprite = new NitroSprite(texture); + const textureCanvas = TextureUtils.generateCanvas(sprite); + const textureCtx = textureCanvas.getContext('2d'); + const textureImageData = textureCtx.getImageData(0, 0, textureCanvas.width, textureCanvas.height); + const data = textureImageData.data; for(let i = 0; i < data.length; i += 4) { @@ -37,9 +37,9 @@ export class GraphicAssetPalette if(paletteColor === undefined) paletteColor = [ 0, 0, 0 ]; - data[ i ] = paletteColor[0]; - data[ i + 1 ] = paletteColor[1]; - data[ i + 2 ] = paletteColor[2]; + data[ i ] = paletteColor[0]; + data[ i + 1 ] = paletteColor[1]; + data[ i + 2 ] = paletteColor[2]; } textureCtx.putImageData(textureImageData, 0, 0); diff --git a/src/room/renderer/RoomRenderer.ts b/src/room/renderer/RoomRenderer.ts index a2f3057f..530e78a7 100644 --- a/src/room/renderer/RoomRenderer.ts +++ b/src/room/renderer/RoomRenderer.ts @@ -14,11 +14,11 @@ export class RoomRenderer implements IRoomRenderer, IRoomSpriteCanvasContainer constructor() { - this._objects = new Map(); - this._canvases = new Map(); + this._objects = new Map(); + this._canvases = new Map(); - this._disposed = false; - this._roomObjectVariableAccurateZ = null; + this._disposed = false; + this._roomObjectVariableAccurateZ = null; } public dispose(): void diff --git a/src/room/renderer/RoomSpriteCanvas.ts b/src/room/renderer/RoomSpriteCanvas.ts index 8652c9d1..e80a35fe 100644 --- a/src/room/renderer/RoomSpriteCanvas.ts +++ b/src/room/renderer/RoomSpriteCanvas.ts @@ -84,51 +84,51 @@ export class RoomSpriteCanvas implements IRoomRenderingCanvas constructor(container: IRoomSpriteCanvasContainer, id: number, width: number, height: number, scale: number) { - this._id = id; - this._container = container; + this._id = id; + this._container = container; - this._geometry = new RoomGeometry(scale, new Vector3d(-135, 30, 0), new Vector3d(11, 11, 5), new Vector3d(-135, 0.5, 0)); - this._animationFPS = Nitro.instance.getConfiguration('system.animation.fps', 24); - this._renderTimestamp = 0; - this._totalTimeRunning = 0; - this._lastFrame = 0; + this._geometry = new RoomGeometry(scale, new Vector3d(-135, 30, 0), new Vector3d(11, 11, 5), new Vector3d(-135, 0.5, 0)); + this._animationFPS = Nitro.instance.getConfiguration('system.animation.fps', 24); + this._renderTimestamp = 0; + this._totalTimeRunning = 0; + this._lastFrame = 0; - this._master = null; - this._display = null; - this._mask = null; + this._master = null; + this._display = null; + this._mask = null; - this._sortableSprites = []; - this._spriteCount = 0; - this._activeSpriteCount = 0; - this._spritePool = []; - this._skipObjectUpdate = false; - this._runningSlow = false; + this._sortableSprites = []; + this._spriteCount = 0; + this._activeSpriteCount = 0; + this._spritePool = []; + this._skipObjectUpdate = false; + this._runningSlow = false; - this._width = 0; - this._height = 0; - this._renderedWidth = 0; - this._renderedHeight = 0; - this._screenOffsetX = 0; - this._screenOffsetY = 0; - this._mouseLocation = new Point; - this._mouseOldX = 0; - this._mouseOldY = 0; - this._mouseCheckCount = 0; - this._mouseSpriteWasHit = false; - this._mouseActiveObjects = new Map(); - this._eventCache = new Map(); - this._eventId = 0; - this._scale = 1; + this._width = 0; + this._height = 0; + this._renderedWidth = 0; + this._renderedHeight = 0; + this._screenOffsetX = 0; + this._screenOffsetY = 0; + this._mouseLocation = new Point; + this._mouseOldX = 0; + this._mouseOldY = 0; + this._mouseCheckCount = 0; + this._mouseSpriteWasHit = false; + this._mouseActiveObjects = new Map(); + this._eventCache = new Map(); + this._eventId = 0; + this._scale = 1; - this._restrictsScaling = false; - this._noSpriteVisibilityChecking = false; - this._usesExclusionRectangles = false; - this._usesMask = true; - this._canvasUpdated = false; + this._restrictsScaling = false; + this._noSpriteVisibilityChecking = false; + this._usesExclusionRectangles = false; + this._usesMask = true; + this._canvasUpdated = false; - this._objectCache = new RoomObjectCache(this._container.roomObjectVariableAccurateZ); + this._objectCache = new RoomObjectCache(this._container.roomObjectVariableAccurateZ); - this._mouseListener = null; + this._mouseListener = null; this.setupCanvas(); this.initialize(width, height); @@ -189,8 +189,8 @@ export class RoomSpriteCanvas implements IRoomRenderingCanvas this._master = null; } - this._display = null; - this._sortableSprites = []; + this._display = null; + this._sortableSprites = []; if(this._mouseActiveObjects) { @@ -221,8 +221,8 @@ export class RoomSpriteCanvas implements IRoomRenderingCanvas public initialize(width: number, height: number): void { - width = width < 1 ? 1 : width; - height = height < 1 ? 1 : height; + width = width < 1 ? 1 : width; + height = height < 1 ? 1 : height; if(this._usesMask) { @@ -256,8 +256,8 @@ export class RoomSpriteCanvas implements IRoomRenderingCanvas { const hitArea = (this._master.hitArea as Rectangle); - hitArea.width = width; - hitArea.height = height; + hitArea.width = width; + hitArea.height = height; } else { @@ -268,8 +268,8 @@ export class RoomSpriteCanvas implements IRoomRenderingCanvas { const filterArea = this._master.filterArea; - filterArea.width = width; - filterArea.height = height; + filterArea.width = width; + filterArea.height = height; } else { @@ -277,8 +277,8 @@ export class RoomSpriteCanvas implements IRoomRenderingCanvas } } - this._width = width; - this._height = height; + this._width = width; + this._height = height; } public setMask(flag: boolean): void @@ -329,8 +329,8 @@ export class RoomSpriteCanvas implements IRoomRenderingCanvas this._scale = scale; } - this.screenOffsetX = (offsetPoint.x - (point.x * this._scale)); - this.screenOffsetY = (offsetPoint.y - (point.y * this._scale)); + this.screenOffsetX = (offsetPoint.x - (point.x * this._scale)); + this.screenOffsetY = (offsetPoint.y - (point.y * this._scale)); } public render(time: number, update: boolean = false): void @@ -414,9 +414,9 @@ export class RoomSpriteCanvas implements IRoomRenderingCanvas if(update || updateVisuals) this._canvasUpdated = true; - this._renderTimestamp = this._totalTimeRunning; - this._renderedWidth = this._width; - this._renderedHeight = this._height; + this._renderTimestamp = this._totalTimeRunning; + this._renderedWidth = this._width; + this._renderedHeight = this._height; } public skipSpriteVisibilityChecking(): void @@ -483,9 +483,9 @@ export class RoomSpriteCanvas implements IRoomRenderingCanvas return sortableCache.spriteCount; } - let x = vector.x; - let y = vector.y; - let z = vector.z; + let x = vector.x; + let y = vector.y; + let z = vector.z; if(x > 0) z = (z + (x * 1.2E-7)); else z = (z + (-(x) * 1.2E-7)); @@ -499,8 +499,8 @@ export class RoomSpriteCanvas implements IRoomRenderingCanvas { if(!sprite || !sprite.visible) continue; - const texture = sprite.texture; - const baseTexture = texture && texture.baseTexture; + const texture = sprite.texture; + const baseTexture = texture && texture.baseTexture; if(!texture || !baseTexture) continue; @@ -546,9 +546,9 @@ export class RoomSpriteCanvas implements IRoomRenderingCanvas sortableSprite.sprite.libraryAssetName = 'avatar_' + object.id; } - sortableSprite.x = (spriteX - this._screenOffsetX); - sortableSprite.y = (spriteY - this._screenOffsetY); - sortableSprite.z = ((z + sprite.relativeDepth) + (3.7E-11 * count)); + sortableSprite.x = (spriteX - this._screenOffsetX); + sortableSprite.y = (spriteY - this._screenOffsetY); + sortableSprite.z = ((z + sprite.relativeDepth) + (3.7E-11 * count)); spriteCount++; count++; @@ -590,8 +590,8 @@ export class RoomSpriteCanvas implements IRoomRenderingCanvas if(!sprite) return false; - const objectSprite = sprite.sprite; - const extendedSprite = this.getExtendedSprite(index); + const objectSprite = sprite.sprite; + const extendedSprite = this.getExtendedSprite(index); if(!objectSprite || !extendedSprite) return false; @@ -613,12 +613,12 @@ export class RoomSpriteCanvas implements IRoomRenderingCanvas if(extendedSprite.needsUpdate(objectSprite.id, objectSprite.updateCounter) || RoomEnterEffect.isVisualizationOn()) { - extendedSprite.tag = objectSprite.tag; - extendedSprite.alphaTolerance = objectSprite.alphaTolerance; - extendedSprite.name = sprite.name; - extendedSprite.varyingDepth = objectSprite.varyingDepth; - extendedSprite.clickHandling = objectSprite.clickHandling; - extendedSprite.filters = objectSprite.filters; + extendedSprite.tag = objectSprite.tag; + extendedSprite.alphaTolerance = objectSprite.alphaTolerance; + extendedSprite.name = sprite.name; + extendedSprite.varyingDepth = objectSprite.varyingDepth; + extendedSprite.clickHandling = objectSprite.clickHandling; + extendedSprite.filters = objectSprite.filters; const alpha = (objectSprite.alpha / 255); @@ -685,19 +685,19 @@ export class RoomSpriteCanvas implements IRoomRenderingCanvas if(extendedSprite.children.length) extendedSprite.removeChildren(); - extendedSprite.tag = sprite.tag; - extendedSprite.alphaTolerance = sprite.alphaTolerance; - extendedSprite.alpha = (sprite.alpha / 255); - extendedSprite.tint = sprite.color; - extendedSprite.x = sortableSprite.x; - extendedSprite.y = sortableSprite.y; - extendedSprite.offsetX = sprite.offsetX; - extendedSprite.offsetY = sprite.offsetY; - extendedSprite.name = sprite.name; - extendedSprite.varyingDepth = sprite.varyingDepth; - extendedSprite.clickHandling = sprite.clickHandling; - extendedSprite.blendMode = sprite.blendMode; - extendedSprite.filters = sprite.filters; + extendedSprite.tag = sprite.tag; + extendedSprite.alphaTolerance = sprite.alphaTolerance; + extendedSprite.alpha = (sprite.alpha / 255); + extendedSprite.tint = sprite.color; + extendedSprite.x = sortableSprite.x; + extendedSprite.y = sortableSprite.y; + extendedSprite.offsetX = sprite.offsetX; + extendedSprite.offsetY = sprite.offsetY; + extendedSprite.name = sprite.name; + extendedSprite.varyingDepth = sprite.varyingDepth; + extendedSprite.clickHandling = sprite.clickHandling; + extendedSprite.blendMode = sprite.blendMode; + extendedSprite.filters = sprite.filters; extendedSprite.setTexture(sprite.texture); @@ -812,10 +812,10 @@ export class RoomSpriteCanvas implements IRoomRenderingCanvas { if(this._noSpriteVisibilityChecking) return true; - x = (((x - this._screenOffsetX) * this._scale) + this._screenOffsetX); - y = (((y - this._screenOffsetY) * this._scale) + this._screenOffsetY); - width = (width * this._scale); - height = (height * this._scale); + x = (((x - this._screenOffsetX) * this._scale) + this._screenOffsetX); + y = (((y - this._screenOffsetY) * this._scale) + this._screenOffsetY); + width = (width * this._scale); + height = (height * this._scale); if(((x < this._width) && ((x + width) >= 0)) && ((y < this._height) && ((y + height) >= 0))) { @@ -846,9 +846,9 @@ export class RoomSpriteCanvas implements IRoomRenderingCanvas { const checkedSprites: string[] = []; - let didHitSprite = false; - let mouseEvent: RoomSpriteMouseEvent = null; - let spriteId = (this._activeSpriteCount - 1); + let didHitSprite = false; + let mouseEvent: RoomSpriteMouseEvent = null; + let spriteId = (this._activeSpriteCount - 1); while(spriteId >= 0) { @@ -961,9 +961,9 @@ export class RoomSpriteCanvas implements IRoomRenderingCanvas protected createMouseEvent(x: number, y: number, localX: number, localY: number, type: string, tag: string, altKey: boolean, ctrlKey: boolean, shiftKey: boolean, buttonDown: boolean): RoomSpriteMouseEvent { - const screenX: number = (x - (this._width / 2)); - const screenY: number = (y - (this._height / 2)); - const canvasName = `canvas_${ this._id }`; + const screenX: number = (x - (this._width / 2)); + const screenY: number = (y - (this._height / 2)); + const canvasName = `canvas_${ this._id }`; return new RoomSpriteMouseEvent(type, ((canvasName + '_') + this._eventId), canvasName, tag, screenX, screenY, localX, localY, ctrlKey, altKey, shiftKey, buttonDown); } @@ -1244,8 +1244,8 @@ export class RoomSpriteCanvas implements IRoomRenderingCanvas { x = Math.trunc(x); - this._mouseLocation.x = (this._mouseLocation.x - (x - this._screenOffsetX)); - this._screenOffsetX = x; + this._mouseLocation.x = (this._mouseLocation.x - (x - this._screenOffsetX)); + this._screenOffsetX = x; } public get screenOffsetY(): number @@ -1257,8 +1257,8 @@ export class RoomSpriteCanvas implements IRoomRenderingCanvas { y = Math.trunc(y); - this._mouseLocation.y = (this._mouseLocation.y - (y - this._screenOffsetY)); - this._screenOffsetY = y; + this._mouseLocation.y = (this._mouseLocation.y - (y - this._screenOffsetY)); + this._screenOffsetY = y; } public get scale(): number diff --git a/src/room/renderer/cache/RoomObjectCache.ts b/src/room/renderer/cache/RoomObjectCache.ts index ba320ca8..5c79084a 100644 --- a/src/room/renderer/cache/RoomObjectCache.ts +++ b/src/room/renderer/cache/RoomObjectCache.ts @@ -13,8 +13,8 @@ export class RoomObjectCache constructor(accurateZ: string) { - this._data = new Map(); - this._roomObjectVariableAccurateZ = accurateZ; + this._data = new Map(); + this._roomObjectVariableAccurateZ = accurateZ; } public dispose(): void @@ -79,19 +79,19 @@ export class RoomObjectCache { const data = new RoomObjectSpriteData(); - data.objectId = item.objectId; - data.x = sprite.x; - data.y = sprite.y; - data.z = sprite.z; - data.name = sprite.sprite.name || ''; - data.flipH = sprite.sprite.flipH; - data.alpha = sprite.sprite.alpha; - data.color = sprite.sprite.color.toString(); - data.blendMode = sprite.sprite.blendMode.toString(); - data.width = sprite.sprite.width; - data.height = sprite.sprite.height; - data.type = sprite.sprite.type; - data.posture = sprite.sprite.posture; + data.objectId = item.objectId; + data.x = sprite.x; + data.y = sprite.y; + data.z = sprite.z; + data.name = sprite.sprite.name || ''; + data.flipH = sprite.sprite.flipH; + data.alpha = sprite.sprite.alpha; + data.color = sprite.sprite.color.toString(); + data.blendMode = sprite.sprite.blendMode.toString(); + data.width = sprite.sprite.width; + data.height = sprite.sprite.height; + data.type = sprite.sprite.type; + data.posture = sprite.sprite.posture; const isSkewed = this.isSkewedSprite(sprite.sprite); diff --git a/src/room/renderer/cache/RoomObjectCacheItem.ts b/src/room/renderer/cache/RoomObjectCacheItem.ts index 7e334889..2fcbede7 100644 --- a/src/room/renderer/cache/RoomObjectCacheItem.ts +++ b/src/room/renderer/cache/RoomObjectCacheItem.ts @@ -9,8 +9,8 @@ export class RoomObjectCacheItem constructor(accurateZ: string) { - this._location = new RoomObjectLocationCacheItem(accurateZ); - this._sprites = new RoomObjectSortableSpriteCacheItem(); + this._location = new RoomObjectLocationCacheItem(accurateZ); + this._sprites = new RoomObjectSortableSpriteCacheItem(); } public get location(): RoomObjectLocationCacheItem diff --git a/src/room/renderer/cache/RoomObjectLocationCacheItem.ts b/src/room/renderer/cache/RoomObjectLocationCacheItem.ts index d58e1d2f..6a4444bc 100644 --- a/src/room/renderer/cache/RoomObjectLocationCacheItem.ts +++ b/src/room/renderer/cache/RoomObjectLocationCacheItem.ts @@ -16,14 +16,14 @@ export class RoomObjectLocationCacheItem constructor(accurateZ: string) { - this._roomObjectVariableAccurateZ = accurateZ || ''; + this._roomObjectVariableAccurateZ = accurateZ || ''; - this._location = new Vector3d(); - this._screenLocation = new Vector3d(); - this._locationChanged = false; + this._location = new Vector3d(); + this._screenLocation = new Vector3d(); + this._locationChanged = false; - this._geometryUpdateId = -1; - this._objectUpdateId = -1; + this._geometryUpdateId = -1; + this._objectUpdateId = -1; } public dispose(): void diff --git a/src/room/renderer/cache/RoomObjectSortableSpriteCacheItem.ts b/src/room/renderer/cache/RoomObjectSortableSpriteCacheItem.ts index e90db65d..70ecc4e3 100644 --- a/src/room/renderer/cache/RoomObjectSortableSpriteCacheItem.ts +++ b/src/room/renderer/cache/RoomObjectSortableSpriteCacheItem.ts @@ -9,10 +9,10 @@ export class RoomObjectSortableSpriteCacheItem constructor() { - this._sprites = []; + this._sprites = []; this._updateId1 = -1; this._updateId2 = -1; - this._isEmpty = false; + this._isEmpty = false; } public get spriteCount(): number diff --git a/src/room/renderer/utils/ExtendedSprite.ts b/src/room/renderer/utils/ExtendedSprite.ts index 4cc92437..25efdbe7 100644 --- a/src/room/renderer/utils/ExtendedSprite.ts +++ b/src/room/renderer/utils/ExtendedSprite.ts @@ -23,14 +23,14 @@ export class ExtendedSprite extends Sprite { super(texture); - this._offsetX = 0; - this._offsetY = 0; - this._tag = ''; - this._alphaTolerance = 128; - this._varyingDepth = false; - this._clickHandling = false; + this._offsetX = 0; + this._offsetY = 0; + this._tag = ''; + this._alphaTolerance = 128; + this._varyingDepth = false; + this._clickHandling = false; - this._pairedSpriteId = -1; + this._pairedSpriteId = -1; this._pairedSpriteUpdateCounter = -1; } @@ -38,7 +38,7 @@ export class ExtendedSprite extends Sprite { if((this._pairedSpriteId === pairedSpriteId) && (this._pairedSpriteUpdateCounter === pairedSpriteUpdateCounter)) return false; - this._pairedSpriteId = pairedSpriteId; + this._pairedSpriteId = pairedSpriteId; this._pairedSpriteUpdateCounter = pairedSpriteUpdateCounter; return true; @@ -59,7 +59,7 @@ export class ExtendedSprite extends Sprite if(texture === Texture.EMPTY) { - this._pairedSpriteId = -1; + this._pairedSpriteId = -1; this._pairedSpriteUpdateCounter = -1; } @@ -138,12 +138,12 @@ export class ExtendedSprite extends Sprite private static generateHitMap(baseTexture: BaseTexture, tempCanvas: HTMLCanvasElement = null): boolean { - let canvas: HTMLCanvasElement = null; - let context: CanvasRenderingContext2D = null; + let canvas: HTMLCanvasElement = null; + let context: CanvasRenderingContext2D = null; if(tempCanvas) { - canvas = tempCanvas; + canvas = tempCanvas; context = canvas.getContext('2d'); } else @@ -157,16 +157,16 @@ export class ExtendedSprite extends Sprite if(source.getContext) { - canvas = source; + canvas = source; context = canvas.getContext('2d'); } else if(source instanceof Image) { - canvas = document.createElement('canvas'); - canvas.width = source.width; - canvas.height = source.height; - context = canvas.getContext('2d'); + canvas = document.createElement('canvas'); + canvas.width = source.width; + canvas.height = source.height; + context = canvas.getContext('2d'); context.drawImage(source, 0, 0); } @@ -174,8 +174,8 @@ export class ExtendedSprite extends Sprite else return false; } - const width = canvas.width; - const height = canvas.height; + const width = canvas.width; + const height = canvas.height; const imageData = context.getImageData(0, 0, width, height); const hitmap = new Uint32Array(Math.ceil(width * height / 32)); diff --git a/src/room/renderer/utils/ObjectMouseData.ts b/src/room/renderer/utils/ObjectMouseData.ts index 3ab52075..ed474374 100644 --- a/src/room/renderer/utils/ObjectMouseData.ts +++ b/src/room/renderer/utils/ObjectMouseData.ts @@ -5,7 +5,7 @@ constructor() { - this._objectId = ''; + this._objectId = ''; this._spriteTag = ''; } diff --git a/src/room/renderer/utils/SortableSprite.ts b/src/room/renderer/utils/SortableSprite.ts index f220a94d..24912b16 100644 --- a/src/room/renderer/utils/SortableSprite.ts +++ b/src/room/renderer/utils/SortableSprite.ts @@ -14,18 +14,18 @@ export class SortableSprite implements ISortableSprite constructor() { - this._name = ''; - this._sprite = null; + this._name = ''; + this._sprite = null; - this._x = 0; - this._y = 0; - this._z = 0; + this._x = 0; + this._y = 0; + this._z = 0; } public dispose(): void { - this._z = -(SortableSprite.Z_INFINITY); - this._sprite = null; + this._z = -(SortableSprite.Z_INFINITY); + this._sprite = null; } public get name(): string diff --git a/src/room/utils/NumberBank.ts b/src/room/utils/NumberBank.ts index 631f5374..271ab1f1 100644 --- a/src/room/utils/NumberBank.ts +++ b/src/room/utils/NumberBank.ts @@ -7,8 +7,8 @@ { if(k < 0) k = 0; - this._reservedNumbers = []; - this._freeNumbers = []; + this._reservedNumbers = []; + this._freeNumbers = []; let i = 0; @@ -22,8 +22,8 @@ public dispose(): void { - this._reservedNumbers = null; - this._freeNumbers = null; + this._reservedNumbers = null; + this._freeNumbers = null; } public reserveNumber(): number diff --git a/src/room/utils/RoomEnterEffect.ts b/src/room/utils/RoomEnterEffect.ts index 30dcc667..b172407b 100644 --- a/src/room/utils/RoomEnterEffect.ts +++ b/src/room/utils/RoomEnterEffect.ts @@ -2,25 +2,25 @@ export class RoomEnterEffect { - public static STATE_NOT_INITIALIZED: number = 0; - public static STATE_START_DELAY: number = 1; - public static STATE_RUNNING: number = 2; - public static STATE_OVER: number = 3; + public static STATE_NOT_INITIALIZED: number = 0; + public static STATE_START_DELAY: number = 1; + public static STATE_RUNNING: number = 2; + public static STATE_OVER: number = 3; - private static _state: number = RoomEnterEffect.STATE_NOT_INITIALIZED; - private static _visualizationOn: boolean = false; - private static _currentDelta: number = 0; - private static _initializationTimeMs: number = 0; - private static _startDelayMs: number = (20 * 1000); - private static _effectDurationMs: number = 2000; + private static _state: number = RoomEnterEffect.STATE_NOT_INITIALIZED; + private static _visualizationOn: boolean = false; + private static _currentDelta: number = 0; + private static _initializationTimeMs: number = 0; + private static _startDelayMs: number = (20 * 1000); + private static _effectDurationMs: number = 2000; public static init(delay: number, duration: number): void { - RoomEnterEffect._currentDelta = 0; - RoomEnterEffect._startDelayMs = delay; - RoomEnterEffect._effectDurationMs = duration; - RoomEnterEffect._initializationTimeMs = Nitro.instance.time; - RoomEnterEffect._state = RoomEnterEffect.STATE_START_DELAY; + RoomEnterEffect._currentDelta = 0; + RoomEnterEffect._startDelayMs = delay; + RoomEnterEffect._effectDurationMs = duration; + RoomEnterEffect._initializationTimeMs = Nitro.instance.time; + RoomEnterEffect._state = RoomEnterEffect.STATE_START_DELAY; } public static turnVisualizationOn(): void @@ -45,8 +45,8 @@ export class RoomEnterEffect return; } - RoomEnterEffect._state = RoomEnterEffect.STATE_RUNNING; - RoomEnterEffect._currentDelta = ((k - RoomEnterEffect._startDelayMs) / RoomEnterEffect._effectDurationMs); + RoomEnterEffect._state = RoomEnterEffect.STATE_RUNNING; + RoomEnterEffect._currentDelta = ((k - RoomEnterEffect._startDelayMs) / RoomEnterEffect._effectDurationMs); } public static turnVisualizationOff(): void diff --git a/src/room/utils/Vector3d.ts b/src/room/utils/Vector3d.ts index 2f0937dd..0f185c1c 100644 --- a/src/room/utils/Vector3d.ts +++ b/src/room/utils/Vector3d.ts @@ -9,10 +9,10 @@ export class Vector3d implements IVector3D constructor(x: number = 0, y: number = 0, z: number = 0) { - this._x = x; - this._y = y; - this._z = z; - this._length = NaN; + this._x = x; + this._y = y; + this._z = z; + this._length = NaN; } public static sum(vector1: IVector3D, vector2: IVector3D): Vector3d @@ -95,48 +95,48 @@ export class Vector3d implements IVector3D { if(!vector) return; - this._x += vector.x; - this._y += vector.y; - this._z += vector.z; - this._length = NaN; + this._x += vector.x; + this._y += vector.y; + this._z += vector.z; + this._length = NaN; } public subtract(vector: IVector3D): void { if(!vector) return; - this._x -= vector.x; - this._y -= vector.y; - this._z -= vector.z; - this._length = NaN; + this._x -= vector.x; + this._y -= vector.y; + this._z -= vector.z; + this._length = NaN; } public multiply(amount: number): void { - this._x *= amount; - this._y *= amount; - this._z *= amount; - this._length = NaN; + this._x *= amount; + this._y *= amount; + this._z *= amount; + this._length = NaN; } public divide(amount: number): void { if(!amount) return; - this._x /= amount; - this._y /= amount; - this._z /= amount; - this._length = NaN; + this._x /= amount; + this._y /= amount; + this._z /= amount; + this._length = NaN; } public assign(vector: IVector3D): void { if(!vector) return; - this._x = vector.x; - this._y = vector.y; - this._z = vector.z; - this._length = NaN; + this._x = vector.x; + this._y = vector.y; + this._z = vector.z; + this._length = NaN; } public get x(): number @@ -146,8 +146,8 @@ export class Vector3d implements IVector3D public set x(k: number) { - this._x = k; - this._length = NaN; + this._x = k; + this._length = NaN; } public get y(): number @@ -157,8 +157,8 @@ export class Vector3d implements IVector3D public set y(k: number) { - this._y = k; - this._length = NaN; + this._y = k; + this._length = NaN; } public get z(): number @@ -168,8 +168,8 @@ export class Vector3d implements IVector3D public set z(k: number) { - this._z = k; - this._length = NaN; + this._z = k; + this._length = NaN; } public get length(): number