From 458a74b5a765644fce4f0f834e89e1d1e75d7ff8 Mon Sep 17 00:00:00 2001 From: Bill Date: Sat, 21 Aug 2021 00:52:44 -0400 Subject: [PATCH] Updates --- src/core/asset/AssetManager.ts | 2 -- .../object/visualization/data/PetSizeData.ts | 12 ++++---- .../visualization/pet/PetVisualization.ts | 29 ++----------------- 3 files changed, 8 insertions(+), 35 deletions(-) diff --git a/src/core/asset/AssetManager.ts b/src/core/asset/AssetManager.ts index 57dec196..e97f8651 100644 --- a/src/core/asset/AssetManager.ts +++ b/src/core/asset/AssetManager.ts @@ -82,8 +82,6 @@ export class AssetManager extends Disposable implements IAssetManager { if(!data) return null; - console.log(data); - const collection = new GraphicAssetCollection(data, spritesheet); if(collection) diff --git a/src/nitro/room/object/visualization/data/PetSizeData.ts b/src/nitro/room/object/visualization/data/PetSizeData.ts index 31e357fb..8b50a016 100644 --- a/src/nitro/room/object/visualization/data/PetSizeData.ts +++ b/src/nitro/room/object/visualization/data/PetSizeData.ts @@ -24,14 +24,14 @@ export class PetSizeData extends AnimationSizeData if(postures.defaultPosture && postures.defaultPosture.length) this._defaultPosture = postures.defaultPosture; - // for(const posture of postures.postures) - // { - // if(this._posturesToAnimations.get(posture.id)) continue; + for(const posture of postures.postures) + { + if(this._posturesToAnimations.get(posture.id)) continue; - // if(this._defaultPosture === null) this._defaultPosture = posture.id; + if(this._defaultPosture === null) this._defaultPosture = posture.id; - // this._posturesToAnimations.set(posture.id, posture.animationId); - // } + this._posturesToAnimations.set(posture.id, posture.animationId); + } if(this._posturesToAnimations.get(this._defaultPosture) === undefined) return false; diff --git a/src/nitro/room/object/visualization/pet/PetVisualization.ts b/src/nitro/room/object/visualization/pet/PetVisualization.ts index 1bc4042b..12c1a837 100644 --- a/src/nitro/room/object/visualization/pet/PetVisualization.ts +++ b/src/nitro/room/object/visualization/pet/PetVisualization.ts @@ -184,33 +184,8 @@ export class PetVisualization extends FurnitureAnimatedVisualization if(this.updateModelCounter === model.updateCounter) return false; - let posture = model.getValue(RoomObjectVariable.FIGURE_POSTURE); - let gesture = model.getValue(RoomObjectVariable.FIGURE_GESTURE); - - const tempPosture = model.getValue(RoomObjectVariable.FIGURE_POSTURE); - - if(!isNaN(tempPosture)) - { - const totalPostures = this._data.totalPostures(this._scale); - - if(totalPostures > 0) - { - posture = this._data.animationToPosture(this._scale, (tempPosture % totalPostures), true); - gesture = null; - } - } - - const tempGesture = model.getValue(RoomObjectVariable.FIGURE_GESTURE); - - if(!isNaN(tempGesture)) - { - const totalGestures = this._data.totalGestures(this._scale); - - if(totalGestures > 0) - { - gesture = this._data.animationToGesture(this._scale, (tempGesture % totalGestures)); - } - } + const posture = model.getValue(RoomObjectVariable.FIGURE_POSTURE); + const gesture = model.getValue(RoomObjectVariable.FIGURE_GESTURE); this.setPostureAndGesture(posture, gesture);