From 50e1a11f6c00c3cbc91016255d900936afcf0063 Mon Sep 17 00:00:00 2001 From: ericrius1 Date: Thu, 31 Mar 2016 15:16:57 -0700 Subject: [PATCH] change flower name --- .../Home/growingPlant/waterCanEntityScript.js | 16 +--------------- .../DomainContent/Home/growingPlant/wrapper.js | 9 +++++---- 2 files changed, 6 insertions(+), 19 deletions(-) diff --git a/unpublishedScripts/DomainContent/Home/growingPlant/waterCanEntityScript.js b/unpublishedScripts/DomainContent/Home/growingPlant/waterCanEntityScript.js index 70448c2b9c..200c2df6df 100644 --- a/unpublishedScripts/DomainContent/Home/growingPlant/waterCanEntityScript.js +++ b/unpublishedScripts/DomainContent/Home/growingPlant/waterCanEntityScript.js @@ -21,7 +21,7 @@ _this.waterSound = SoundCache.getSound("atp:/growingPlant/watering_can_pour.L.wav"); _this.POUR_ANGLE_THRESHOLD = 0; _this.waterPouring = false; - _this.WATER_SPOUT_NAME = "hifi-water-spout"; + _this.WATER_SPOUT_NAME = "home_box_waterSpout"; _this.GROWABLE_ENTITIES_SEARCH_RANGE = 100; }; @@ -229,20 +229,6 @@ print("EBL PRELOADING WATER CAN") _this.entityID = entityID; _this.position = Entities.getEntityProperties(_this.entityID, "position").position; - // Wait a a bit for spout to spawn for case where preload is initial spawn, then save it - Script.setTimeout(function() { - var entities = Entities.findEntities(_this.position, 2); - print("EBL SEARCHING FOR SPOUT"); - entities.forEach(function(entity) { - var name = Entities.getEntityProperties(entity, "name").name; - if (name === _this.WATER_SPOUT_NAME) { - print("EBL FOUND SPOUT"); - _this.waterSpout = entity; - } - }); - - }, 2000); - }, diff --git a/unpublishedScripts/DomainContent/Home/growingPlant/wrapper.js b/unpublishedScripts/DomainContent/Home/growingPlant/wrapper.js index c6be7e2e4c..840dd3b2e4 100644 --- a/unpublishedScripts/DomainContent/Home/growingPlant/wrapper.js +++ b/unpublishedScripts/DomainContent/Home/growingPlant/wrapper.js @@ -44,7 +44,7 @@ Plant = function(spawnPosition, spawnRotation) { // dynamic: true, shapeType: 'box', // compoundShapeURL: BOWL_COLLISION_HULL_URL, - name: "plant bowl", + name: "home_model_plantNowl", position: bowlPosition, userData: JSON.stringify({ 'hifiHomeKey': { @@ -71,7 +71,7 @@ Plant = function(spawnPosition, spawnRotation) { var plant = Entities.addEntity({ type: "Model", modelURL: PLANT_MODEL_URL, - name: "hifi-growable-plant", + name: "home_model_growablePlant", dimensions: plantDimensions, position: plantPosition, script: PLANT_SCRIPT_URL, @@ -94,7 +94,7 @@ Plant = function(spawnPosition, spawnRotation) { type: "Model", shapeType: 'box', // compoundShapeURL: WATER_CAN_COLLIISION_HULL_URL, - name: "hifi-water-can", + name: "home_model_waterCan", modelURL: WATER_CAN_MODEL_URL, script: WATER_CAN_SCRIPT_URL, dimensions: { @@ -151,9 +151,10 @@ Plant = function(spawnPosition, spawnRotation) { var waterSpoutPosition = Vec3.sum(waterCanPosition, Vec3.multiply(0.2, Quat.getFront(orientation))) var waterSpoutRotation = Quat.multiply(waterCanRotation, Quat.fromPitchYawRollDegrees(10, 0, 0)); + var WATER_SPOUT_NAME = "home_box_waterSpout"; var waterSpout = Entities.addEntity({ type: "Box", - name: "hifi-water-spout", + name: WATER_SPOUT_NAME, dimensions: { x: 0.02, y: 0.02,