diff --git a/src/core/utils/proxy/NitroPolygon.ts b/src/core/utils/proxy/NitroPolygon.ts new file mode 100644 index 00000000..de946083 --- /dev/null +++ b/src/core/utils/proxy/NitroPolygon.ts @@ -0,0 +1,4 @@ +import { Polygon } from '@pixi/math'; + +export class NitroPolygon extends Polygon +{} diff --git a/src/core/utils/proxy/index.ts b/src/core/utils/proxy/index.ts index 594d75f3..3e9d870a 100644 --- a/src/core/utils/proxy/index.ts +++ b/src/core/utils/proxy/index.ts @@ -5,6 +5,7 @@ export * from './NitroBaseTexture'; export * from './NitroContainer'; export * from './NitroFilter'; export * from './NitroPoint'; +export * from './NitroPolygon'; export * from './NitroRectangle'; export * from './NitroRenderTexture'; export * from './NitroSprite'; diff --git a/src/nitro/localization/NitroLocalizationManager.ts b/src/nitro/localization/NitroLocalizationManager.ts index d558b0f8..c466d031 100644 --- a/src/nitro/localization/NitroLocalizationManager.ts +++ b/src/nitro/localization/NitroLocalizationManager.ts @@ -117,6 +117,8 @@ export class NitroLocalizationManager extends NitroManager implements INitroLoca public getValue(key: string, doParams: boolean = true): string { + if(!key || !key.length) return null; + if(key.startsWith('${')) key = key.substr(2, (key.length - 3)); let value = (this._definitions.get(key) || null); diff --git a/src/nitro/room/RoomObjectEventHandler.ts b/src/nitro/room/RoomObjectEventHandler.ts index 57a93491..51cb476e 100644 --- a/src/nitro/room/RoomObjectEventHandler.ts +++ b/src/nitro/room/RoomObjectEventHandler.ts @@ -1550,6 +1550,8 @@ export class RoomObjectEventHandler extends Disposable implements IRoomCanvasMou private handleMoveTargetFurni(k: number, _arg_2: RoomObjectMouseEvent): boolean { + if((_arg_2.objectType === RoomObjectUserType.USER) || (_arg_2.objectType === RoomObjectUserType.PET) || (_arg_2.objectType === RoomObjectUserType.BOT) || (_arg_2.objectType === RoomObjectUserType.RENTABLE_BOT) || (_arg_2.objectType === RoomObjectUserType.MONSTER_PLANT)) return; + const _local_3 = this._roomEngine.getRoomObject(k, _arg_2.objectId, RoomObjectCategory.FLOOR); const _local_4 = this.getActiveSurfaceLocation(_local_3, _arg_2); diff --git a/src/nitro/room/object/visualization/data/AnimationSizeData.ts b/src/nitro/room/object/visualization/data/AnimationSizeData.ts index 4bce6a21..e3d2c749 100644 --- a/src/nitro/room/object/visualization/data/AnimationSizeData.ts +++ b/src/nitro/room/object/visualization/data/AnimationSizeData.ts @@ -42,7 +42,7 @@ export class AnimationSizeData extends SizeData if(!animation) return false; - let animationId = parseInt(key); + let animationId = parseInt(key.split('_')[0]); let isTransition = false; const transitionTo = animation.transitionTo; diff --git a/src/nitro/room/object/visualization/furniture/FurnitureYoutubeVisualization.ts b/src/nitro/room/object/visualization/furniture/FurnitureYoutubeVisualization.ts index 1e7a9811..89a43e56 100644 --- a/src/nitro/room/object/visualization/furniture/FurnitureYoutubeVisualization.ts +++ b/src/nitro/room/object/visualization/furniture/FurnitureYoutubeVisualization.ts @@ -9,8 +9,10 @@ export class FurnitureYoutubeVisualization extends FurnitureDynamicThumbnailVisu { if(!this.object) return null; - const url = this.object.model.getValue(RoomObjectVariable.SESSION_URL_PREFIX); + const furnitureData = this.object.model.getValue<{ [index: string]: string }>(RoomObjectVariable.FURNITURE_DATA); - return (url + FurnitureYoutubeVisualization.THUMBNAIL); + if(furnitureData) return (furnitureData[FurnitureYoutubeVisualization.THUMBNAIL_URL] || null); + + return null; } } diff --git a/src/room/utils/Vector3d.ts b/src/room/utils/Vector3d.ts index ee46c94a..2f0937dd 100644 --- a/src/room/utils/Vector3d.ts +++ b/src/room/utils/Vector3d.ts @@ -121,6 +121,8 @@ export class Vector3d implements IVector3D public divide(amount: number): void { + if(!amount) return; + this._x /= amount; this._y /= amount; this._z /= amount; @@ -184,4 +186,4 @@ export class Vector3d implements IVector3D { return `[Vector3d: ${ this._x }, ${ this._y }, ${ this._z }]`; } -} \ No newline at end of file +}