From b744c602abdf965e0fcd73237827e45e58b9e4dc Mon Sep 17 00:00:00 2001 From: Dank074 Date: Mon, 7 Jun 2021 03:28:52 -0500 Subject: [PATCH] cleaned SelectedRoomObjectData --- .../avatar/geometry/AvatarModelGeometry.ts | 4 ++-- src/nitro/avatar/geometry/AvatarSet.ts | 4 ++-- src/nitro/avatar/geometry/GeometryItem.ts | 4 ++-- src/nitro/room/ISelectedRoomObjectData.ts | 4 ++-- src/nitro/room/RoomObjectEventHandler.ts | 22 +++++++++---------- .../events/RoomEngineObjectPlacedEvent.ts | 4 ++-- .../room/object/logic/avatar/AvatarLogic.ts | 2 +- .../object/logic/furniture/FurnitureLogic.ts | 12 +++++----- src/nitro/room/object/logic/pet/PetLogic.ts | 6 ++--- src/nitro/room/object/logic/room/RoomLogic.ts | 4 ++-- .../object/visualization/room/RoomPlane.ts | 2 +- .../visualization/room/mask/PlaneMask.ts | 10 ++++----- .../room/mask/PlaneMaskManager.ts | 6 ++--- .../room/utils/SelectedRoomObjectData.ts | 6 ++--- src/room/events/RoomSpriteMouseEvent.ts | 4 ++-- 15 files changed, 47 insertions(+), 47 deletions(-) diff --git a/src/nitro/avatar/geometry/AvatarModelGeometry.ts b/src/nitro/avatar/geometry/AvatarModelGeometry.ts index 501f1be9..f8fd57cf 100644 --- a/src/nitro/avatar/geometry/AvatarModelGeometry.ts +++ b/src/nitro/avatar/geometry/AvatarModelGeometry.ts @@ -106,7 +106,7 @@ export class AvatarModelGeometry public getBodyPartIdsInAvatarSet(k: string): string[] { - const avatarSet = this._avatarSet._Str_1498(k); + const avatarSet = this._avatarSet.findAvatarSet(k); if(!avatarSet) return []; @@ -115,7 +115,7 @@ export class AvatarModelGeometry public isMainAvatarSet(k: string): boolean { - const avatarSet = this._avatarSet._Str_1498(k); + const avatarSet = this._avatarSet.findAvatarSet(k); if(!avatarSet) return false; diff --git a/src/nitro/avatar/geometry/AvatarSet.ts b/src/nitro/avatar/geometry/AvatarSet.ts index e11d0ce6..7aea7dca 100644 --- a/src/nitro/avatar/geometry/AvatarSet.ts +++ b/src/nitro/avatar/geometry/AvatarSet.ts @@ -48,7 +48,7 @@ this._allBodyParts = bodyParts; } - public _Str_1498(k: string): AvatarSet + public findAvatarSet(k: string): AvatarSet { if(k === this._id) return this; @@ -56,7 +56,7 @@ { if(!avatarSet) continue; - if(!avatarSet._Str_1498(k)) continue; + if(!avatarSet.findAvatarSet(k)) continue; return avatarSet; } diff --git a/src/nitro/avatar/geometry/GeometryItem.ts b/src/nitro/avatar/geometry/GeometryItem.ts index 0431cdcd..189a4061 100644 --- a/src/nitro/avatar/geometry/GeometryItem.ts +++ b/src/nitro/avatar/geometry/GeometryItem.ts @@ -38,7 +38,7 @@ export class GeometryItem extends Node3D return this._normal; } - public get _Str_2207(): boolean + public get isDoubleSided(): boolean { return this._isDoubleSided; } @@ -48,7 +48,7 @@ export class GeometryItem extends Node3D return ((((this._id + ': ') + this.location) + ' - ') + this.transformedLocation); } - public get _Str_1457(): boolean + public get isDynamic(): boolean { return this._isDynamic; } diff --git a/src/nitro/room/ISelectedRoomObjectData.ts b/src/nitro/room/ISelectedRoomObjectData.ts index da80dc1d..eb46a127 100644 --- a/src/nitro/room/ISelectedRoomObjectData.ts +++ b/src/nitro/room/ISelectedRoomObjectData.ts @@ -6,9 +6,9 @@ export interface ISelectedRoomObjectData category: number; operation: string; typeId: number; - _Str_4766: string; + instanceData: string; stuffData: IObjectData; state: number; - _Str_15896: number; + animFrame: number; posture: string; } diff --git a/src/nitro/room/RoomObjectEventHandler.ts b/src/nitro/room/RoomObjectEventHandler.ts index 66a8b265..fa2a02be 100644 --- a/src/nitro/room/RoomObjectEventHandler.ts +++ b/src/nitro/room/RoomObjectEventHandler.ts @@ -134,7 +134,7 @@ export class RoomObjectEventHandler extends Disposable implements IRoomCanvasMou roomObject.setDirection(direction); - this._Str_16022(event.roomId, selectedData.id, selectedData.category, selectedData.loc, direction, selectedData.operation, selectedData.typeId, selectedData._Str_4766, selectedData.stuffData, selectedData.state, selectedData._Str_15896, selectedData.posture); + this._Str_16022(event.roomId, selectedData.id, selectedData.category, selectedData.loc, direction, selectedData.operation, selectedData.typeId, selectedData.instanceData, selectedData.stuffData, selectedData.state, selectedData.animFrame, selectedData.posture); selectedData = this.getSelectedRoomObjectData(event.roomId); @@ -161,15 +161,15 @@ export class RoomObjectEventHandler extends Disposable implements IRoomCanvasMou const _local_7 = this._Str_18648(category, event.type); - if(_local_7 === event._Str_3463) + if(_local_7 === event.eventId) { if((event.type === MouseEventType.MOUSE_CLICK) || (event.type === MouseEventType.DOUBLE_CLICK) || (event.type === MouseEventType.MOUSE_DOWN) || (event.type === MouseEventType.MOUSE_UP) || (event.type === MouseEventType.MOUSE_MOVE)) return; } else { - if(event._Str_3463) + if(event.eventId) { - this._Str_11142(category, event.type, event._Str_3463); + this._Str_11142(category, event.type, event.eventId); } } @@ -970,12 +970,12 @@ export class RoomObjectEventHandler extends Disposable implements IRoomCanvasMou { if(selectedData.category === RoomObjectCategory.FLOOR) { - this._roomEngine.addFurnitureFloor(roomId, selectedData.id, selectedData.typeId, selectedData.loc, selectedData.dir, 0, selectedData.stuffData, parseFloat(selectedData._Str_4766), -1, 0, 0, '', false); + this._roomEngine.addFurnitureFloor(roomId, selectedData.id, selectedData.typeId, selectedData.loc, selectedData.dir, 0, selectedData.stuffData, parseFloat(selectedData.instanceData), -1, 0, 0, '', false); } else if(selectedData.category === RoomObjectCategory.UNIT) { - this._roomEngine.addRoomObjectUser(roomId, selectedData.id, new Vector3d(), new Vector3d(180), 180, selectedData.typeId, selectedData._Str_4766); + this._roomEngine.addRoomObjectUser(roomId, selectedData.id, new Vector3d(), new Vector3d(180), 180, selectedData.typeId, selectedData.instanceData); const roomObject = this._roomEngine.getRoomObject(roomId, selectedData.id, selectedData.category); @@ -987,7 +987,7 @@ export class RoomObjectEventHandler extends Disposable implements IRoomCanvasMou { if(selectedData.category === RoomObjectCategory.WALL) { - this._roomEngine.addFurnitureWall(roomId, selectedData.id, selectedData.typeId, selectedData.loc, selectedData.dir, 0, selectedData._Str_4766, 0); + this._roomEngine.addFurnitureWall(roomId, selectedData.id, selectedData.typeId, selectedData.loc, selectedData.dir, 0, selectedData.instanceData, 0); } } @@ -1005,7 +1005,7 @@ export class RoomObjectEventHandler extends Disposable implements IRoomCanvasMou roomObject.setDirection(direction); - this._Str_16022(roomId, selectedData.id, selectedData.category, selectedData.loc, direction, selectedData.operation, selectedData.typeId, selectedData._Str_4766, selectedData.stuffData, selectedData.state, selectedData._Str_15896, selectedData.posture); + this._Str_16022(roomId, selectedData.id, selectedData.category, selectedData.loc, direction, selectedData.operation, selectedData.typeId, selectedData.instanceData, selectedData.stuffData, selectedData.state, selectedData.animFrame, selectedData.posture); selectedData = this.getSelectedRoomObjectData(roomId); @@ -1524,7 +1524,7 @@ export class RoomObjectEventHandler extends Disposable implements IRoomCanvasMou { const placedInRoom = (roomObject && (roomObject.id === selectedData.id)); - this._roomEngine.events.dispatchEvent(new RoomEngineObjectPlacedEvent(RoomEngineObjectEvent.PLACED, roomId, objectId, category, wallLocation, x, y, z, direction, placedInRoom, isTileEvent, isWallEvent, selectedData._Str_4766)); + this._roomEngine.events.dispatchEvent(new RoomEngineObjectPlacedEvent(RoomEngineObjectEvent.PLACED, roomId, objectId, category, wallLocation, x, y, z, direction, placedInRoom, isTileEvent, isWallEvent, selectedData.instanceData)); } } @@ -1653,7 +1653,7 @@ export class RoomObjectEventHandler extends Disposable implements IRoomCanvasMou case RoomObjectOperationType.OBJECT_MOVE_TO: { const selectedData = this.getSelectedRoomObjectData(roomId); - this._Str_16022(roomId, selectedData.id, selectedData.category, selectedData.loc, selectedData.dir, RoomObjectOperationType.OBJECT_MOVE_TO, selectedData.typeId, selectedData._Str_4766, selectedData.stuffData, selectedData.state, selectedData._Str_15896, selectedData.posture); + this._Str_16022(roomId, selectedData.id, selectedData.category, selectedData.loc, selectedData.dir, RoomObjectOperationType.OBJECT_MOVE_TO, selectedData.typeId, selectedData.instanceData, selectedData.stuffData, selectedData.state, selectedData.animFrame, selectedData.posture); this.setFurnitureAlphaMultiplier(roomObject, 1); this._roomEngine._Str_17948(); @@ -1938,7 +1938,7 @@ export class RoomObjectEventHandler extends Disposable implements IRoomCanvasMou this._roomEngine.updateRoomObjectMask(roomId, selectedData.id, true); } - this._Str_16022(roomId, selectedData.id, selectedData.category, selectedData.loc, selectedData.dir, RoomObjectOperationType.OBJECT_MOVE, selectedData.typeId, selectedData._Str_4766, selectedData.stuffData, selectedData.state, selectedData._Str_15896, selectedData.posture); + this._Str_16022(roomId, selectedData.id, selectedData.category, selectedData.loc, selectedData.dir, RoomObjectOperationType.OBJECT_MOVE, selectedData.typeId, selectedData.instanceData, selectedData.stuffData, selectedData.state, selectedData.animFrame, selectedData.posture); } else if((selectedData.operation === RoomObjectOperationType.OBJECT_PLACE)) diff --git a/src/nitro/room/events/RoomEngineObjectPlacedEvent.ts b/src/nitro/room/events/RoomEngineObjectPlacedEvent.ts index b9667a21..929ff615 100644 --- a/src/nitro/room/events/RoomEngineObjectPlacedEvent.ts +++ b/src/nitro/room/events/RoomEngineObjectPlacedEvent.ts @@ -67,8 +67,8 @@ export class RoomEngineObjectPlacedEvent extends RoomEngineObjectEvent return this._placedOnWall; } - public get _Str_4766(): string + public get instanceData(): string { return this._instanceData; } -} \ No newline at end of file +} diff --git a/src/nitro/room/object/logic/avatar/AvatarLogic.ts b/src/nitro/room/object/logic/avatar/AvatarLogic.ts index 1ac68b28..2930fc97 100644 --- a/src/nitro/room/object/logic/avatar/AvatarLogic.ts +++ b/src/nitro/room/object/logic/avatar/AvatarLogic.ts @@ -503,7 +503,7 @@ export class AvatarLogic extends MovingObjectLogic break; } - if(eventType && this.eventDispatcher) this.eventDispatcher.dispatchEvent(new RoomObjectMouseEvent(eventType, this.object, event._Str_3463, event.altKey, event.ctrlKey, event.shiftKey, event.buttonDown)); + if(eventType && this.eventDispatcher) this.eventDispatcher.dispatchEvent(new RoomObjectMouseEvent(eventType, this.object, event.eventId, event.altKey, event.ctrlKey, event.shiftKey, event.buttonDown)); } private randomTalkingPauseStartTimestamp(): number diff --git a/src/nitro/room/object/logic/furniture/FurnitureLogic.ts b/src/nitro/room/object/logic/furniture/FurnitureLogic.ts index c3e70a6d..c485cb12 100644 --- a/src/nitro/room/object/logic/furniture/FurnitureLogic.ts +++ b/src/nitro/room/object/logic/furniture/FurnitureLogic.ts @@ -241,7 +241,7 @@ export class FurnitureLogic extends MovingObjectLogic case MouseEventType.MOUSE_MOVE: if(this.eventDispatcher) { - const mouseEvent = new RoomObjectMouseEvent(RoomObjectMouseEvent.MOUSE_MOVE, this.object, event._Str_3463, event.altKey, event.ctrlKey, event.shiftKey, event.buttonDown); + 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; @@ -256,7 +256,7 @@ export class FurnitureLogic extends MovingObjectLogic { if(this.eventDispatcher) { - const mouseEvent = new RoomObjectMouseEvent(RoomObjectMouseEvent.MOUSE_ENTER, this.object, event._Str_3463, event.altKey, event.ctrlKey, event.shiftKey, event.buttonDown); + 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; @@ -274,7 +274,7 @@ export class FurnitureLogic extends MovingObjectLogic { if(this.eventDispatcher) { - const mouseEvent = new RoomObjectMouseEvent(RoomObjectMouseEvent.MOUSE_LEAVE, this.object, event._Str_3463, event.altKey, event.ctrlKey, event.shiftKey, event.buttonDown); + 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; @@ -293,7 +293,7 @@ export class FurnitureLogic extends MovingObjectLogic case MouseEventType.MOUSE_CLICK: if(this.eventDispatcher) { - const mouseEvent = new RoomObjectMouseEvent(RoomObjectMouseEvent.CLICK, this.object, event._Str_3463, event.altKey, event.ctrlKey, event.shiftKey, event.buttonDown); + 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; @@ -311,7 +311,7 @@ export class FurnitureLogic extends MovingObjectLogic case MouseEventType.MOUSE_DOWN: if(this.eventDispatcher) { - const mouseEvent = new RoomObjectMouseEvent(RoomObjectMouseEvent.MOUSE_DOWN, this.object, event._Str_3463, event.altKey, event.ctrlKey, event.shiftKey, event.buttonDown); + const mouseEvent = new RoomObjectMouseEvent(RoomObjectMouseEvent.MOUSE_DOWN, this.object, event.eventId, event.altKey, event.ctrlKey, event.shiftKey, event.buttonDown); this.eventDispatcher.dispatchEvent(mouseEvent); } @@ -371,4 +371,4 @@ export class FurnitureLogic extends MovingObjectLogic super.tearDown(); } -} \ No newline at end of file +} diff --git a/src/nitro/room/object/logic/pet/PetLogic.ts b/src/nitro/room/object/logic/pet/PetLogic.ts index e14580c0..0b8779e9 100644 --- a/src/nitro/room/object/logic/pet/PetLogic.ts +++ b/src/nitro/room/object/logic/pet/PetLogic.ts @@ -231,12 +231,12 @@ export class PetLogic extends MovingObjectLogic if(petType == PetType.MONSTERPLANT) { - if(this.eventDispatcher) this.eventDispatcher.dispatchEvent(new RoomObjectMouseEvent(RoomObjectMouseEvent.MOUSE_DOWN, this.object, event._Str_3463, event.altKey, event.ctrlKey, event.shiftKey, event.buttonDown)); + if(this.eventDispatcher) this.eventDispatcher.dispatchEvent(new RoomObjectMouseEvent(RoomObjectMouseEvent.MOUSE_DOWN, this.object, event.eventId, event.altKey, event.ctrlKey, event.shiftKey, event.buttonDown)); } break; } } - if(eventType && this.eventDispatcher) this.eventDispatcher.dispatchEvent(new RoomObjectMouseEvent(eventType, this.object, event._Str_3463, event.altKey, event.ctrlKey, event.shiftKey, event.buttonDown)); + if(eventType && this.eventDispatcher) this.eventDispatcher.dispatchEvent(new RoomObjectMouseEvent(eventType, this.object, event.eventId, event.altKey, event.ctrlKey, event.shiftKey, event.buttonDown)); } -} \ No newline at end of file +} diff --git a/src/nitro/room/object/logic/room/RoomLogic.ts b/src/nitro/room/object/logic/room/RoomLogic.ts index f8082915..07ced056 100644 --- a/src/nitro/room/object/logic/room/RoomLogic.ts +++ b/src/nitro/room/object/logic/room/RoomLogic.ts @@ -430,7 +430,7 @@ export class RoomLogic extends RoomObjectLogicBase if(_local_12 === RoomPlaneData.PLANE_FLOOR) { - newEvent = new RoomObjectTileMouseEvent(eventType, this.object, event._Str_3463, _local_19, _local_20, _local_21, event.altKey, event.ctrlKey, event.shiftKey, event.buttonDown); + newEvent = new RoomObjectTileMouseEvent(eventType, this.object, event.eventId, _local_19, _local_20, _local_21, event.altKey, event.ctrlKey, event.shiftKey, event.buttonDown); } else if((_local_12 === RoomPlaneData.PLANE_WALL) || (_local_12 === RoomPlaneData.PLANE_LANDSCAPE)) @@ -447,7 +447,7 @@ export class RoomLogic extends RoomObjectLogicBase const _local_27 = ((_local_9.length * _local_7.x) / _local_13); const _local_28 = ((_local_10.length * _local_7.y) / _local_14); - newEvent = new RoomObjectWallMouseEvent(eventType, this.object, event._Str_3463, _local_8, _local_9, _local_10, _local_27, _local_28, direction, event.altKey, event.ctrlKey, event.shiftKey, event.buttonDown); + newEvent = new RoomObjectWallMouseEvent(eventType, this.object, event.eventId, _local_8, _local_9, _local_10, _local_27, _local_28, direction, event.altKey, event.ctrlKey, event.shiftKey, event.buttonDown); } if(this.eventDispatcher) this.eventDispatcher.dispatchEvent(newEvent); diff --git a/src/nitro/room/object/visualization/room/RoomPlane.ts b/src/nitro/room/object/visualization/room/RoomPlane.ts index 5f1d324a..ca9aaf41 100644 --- a/src/nitro/room/object/visualization/room/RoomPlane.ts +++ b/src/nitro/room/object/visualization/room/RoomPlane.ts @@ -462,7 +462,7 @@ export class RoomPlane implements IRoomPlane if(assetName) { const position = k.getCoordinatePosition(this._normal); - const asset = planeMask._Str_21021(k.scale, position); + const asset = planeMask.getGraphicAsset(k.scale, position); if(asset) { diff --git a/src/nitro/room/object/visualization/room/mask/PlaneMask.ts b/src/nitro/room/object/visualization/room/mask/PlaneMask.ts index 7e6ba4e5..dabd4e57 100644 --- a/src/nitro/room/object/visualization/room/mask/PlaneMask.ts +++ b/src/nitro/room/object/visualization/room/mask/PlaneMask.ts @@ -37,7 +37,7 @@ export class PlaneMask this._sizes = null; } - public _Str_24540(size: number): PlaneMaskVisualization + public createMaskVisualization(size: number): PlaneMaskVisualization { const existing = this._maskVisualizations.get(size); @@ -73,7 +73,7 @@ export class PlaneMask return sizeIndex; } - protected _Str_24650(k: number): PlaneMaskVisualization + protected getMaskVisualization(k: number): PlaneMaskVisualization { if(k === this._lastSize) return this._lastMaskVisualization; @@ -93,9 +93,9 @@ export class PlaneMask return this._lastMaskVisualization; } - public _Str_21021(k: number, _arg_2: IVector3D): IGraphicAsset + public getGraphicAsset(k: number, _arg_2: IVector3D): IGraphicAsset { - const visualization = this._Str_24650(k); + const visualization = this.getMaskVisualization(k); if(!visualization) return null; @@ -109,7 +109,7 @@ export class PlaneMask return this._assetNames.get(k) || null; } - public _Str_24425(k: number, _arg_2: string): void + public setAssetName(k: number, _arg_2: string): void { if(!this._assetNames) return; diff --git a/src/nitro/room/object/visualization/room/mask/PlaneMaskManager.ts b/src/nitro/room/object/visualization/room/mask/PlaneMaskManager.ts index 63c9329f..b56b6b00 100644 --- a/src/nitro/room/object/visualization/room/mask/PlaneMaskManager.ts +++ b/src/nitro/room/object/visualization/room/mask/PlaneMaskManager.ts @@ -86,13 +86,13 @@ export class PlaneMaskManager if(visualization) { const size = visualization.size as number; - const maskVisualization = newMask._Str_24540(size); + const maskVisualization = newMask.createMaskVisualization(size); if(maskVisualization) { const assetName = this._Str_25815(visualization.bitmaps, maskVisualization, _arg_2); - newMask._Str_24425(size, assetName); + newMask.setAssetName(size, assetName); } } @@ -147,7 +147,7 @@ export class PlaneMaskManager if(!mask) return true; - const asset = mask._Str_21021(_arg_3, _arg_4); + const asset = mask.getGraphicAsset(_arg_3, _arg_4); if(!asset) return true; diff --git a/src/nitro/room/utils/SelectedRoomObjectData.ts b/src/nitro/room/utils/SelectedRoomObjectData.ts index 23667e98..e56b57a6 100644 --- a/src/nitro/room/utils/SelectedRoomObjectData.ts +++ b/src/nitro/room/utils/SelectedRoomObjectData.ts @@ -64,7 +64,7 @@ export class SelectedRoomObjectData implements ISelectedRoomObjectData return this._typeId; } - public get _Str_4766(): string + public get instanceData(): string { return this._instanceData; } @@ -79,7 +79,7 @@ export class SelectedRoomObjectData implements ISelectedRoomObjectData return this._state; } - public get _Str_15896(): number + public get animFrame(): number { return this._animFrame; } @@ -94,4 +94,4 @@ export class SelectedRoomObjectData implements ISelectedRoomObjectData this._loc = null; this._dir = null; } -} \ No newline at end of file +} diff --git a/src/room/events/RoomSpriteMouseEvent.ts b/src/room/events/RoomSpriteMouseEvent.ts index db2656d8..457f55af 100644 --- a/src/room/events/RoomSpriteMouseEvent.ts +++ b/src/room/events/RoomSpriteMouseEvent.ts @@ -38,7 +38,7 @@ export class RoomSpriteMouseEvent return this._type; } - public get _Str_3463(): string + public get eventId(): string { return this._eventId; } @@ -112,4 +112,4 @@ export class RoomSpriteMouseEvent { this._spriteOffsetY = k; } -} \ No newline at end of file +}