From 69ebf1629d52be533082e2543cb628ee1a512148 Mon Sep 17 00:00:00 2001 From: Oren Hurvitz Date: Sun, 3 Mar 2019 15:33:40 +0200 Subject: [PATCH] Allow copying grandchild entities. Using Copy/Paste on entities only worked for one level of children, but not for grandchildren. --- scripts/system/edit.js | 2 +- scripts/system/libraries/entitySelectionTool.js | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/scripts/system/edit.js b/scripts/system/edit.js index 894ea2b696..bc38dc8fde 100644 --- a/scripts/system/edit.js +++ b/scripts/system/edit.js @@ -1620,7 +1620,7 @@ function recursiveDelete(entities, childrenList, deletedIDs, entityHostType) { if (entityHostTypes[i].entityHostType !== entityHostType) { if (wantDebug) { console.log("Skipping deletion of entity " + entityID + " with conflicting entityHostType: " + - entityHostTypes[i].entityHostType); + entityHostTypes[i].entityHostType + ", expected: " + entityHostType); } continue; } diff --git a/scripts/system/libraries/entitySelectionTool.js b/scripts/system/libraries/entitySelectionTool.js index 064dafec06..d777bf222c 100644 --- a/scripts/system/libraries/entitySelectionTool.js +++ b/scripts/system/libraries/entitySelectionTool.js @@ -206,7 +206,7 @@ SelectionManager = (function() { if (entityHostTypes[i].entityHostType !== entityHostType) { if (wantDebug) { console.log("Skipping addition of entity " + childID + " with conflicting entityHostType: " + - entityHostTypes[i].entityHostType); + entityHostTypes[i].entityHostType + ", expected: " + entityHostType); } continue; } @@ -398,15 +398,15 @@ SelectionManager = (function() { if (entityHostTypes[i].entityHostType !== entityHostType) { if (wantDebug) { - console.warn("Skipping deletion of entity " + id + " with conflicting entityHostType: " + - entityHostTypes[i].entityHostType); + console.warn("Skipping addition of entity " + id + " with conflicting entityHostType: " + + entityHostTypes[i].entityHostType + ", expected: " + entityHostType); } continue; } if (!(id in entities)) { entities[id] = Entities.getEntityProperties(id); - appendChildren(id, entities); + appendChildren(id, entities, entityHostType); } } }