repo: janusweb
action: commit
revision: 
path_from: 
revision_from: 42e563ee219d23d8fe3911afdfdb7b0d7cb2d4fb:
path_to: 
revision_to: 
git.thebackupbox.net
janusweb
git clone git://git.thebackupbox.net/janusweb
commit 42e563ee219d23d8fe3911afdfdb7b0d7cb2d4fb
Author: James Baicoianu 
Date:   Sun Oct 25 10:42:45 2020 -0700

    Added room.contains(object)

diff --git a/scripts/room.js b/scripts/room.js
index a7fe4ddcfd9ee2b13093f32b95e025ba16cbfd86..
index ..786457d9c8d5d89bd5fddeb93844934848672cb0 100644
--- a/scripts/room.js
+++ b/scripts/room.js
@@ -2481,6 +2481,14 @@ console.log('dispatch to parent', event, this, event.target);
       }
       this.loaded = false;
     }
+    this.contains = function(obj) {
+      let ptr = obj;
+      while (ptr.parent) {
+        if (ptr.parent == this) return true;
+        ptr = ptr.parent;
+      }
+      return false;
+    }
   }, elation.engine.things.generic);
 });

-----END OF PAGE-----