From 42dec77d854204381a17a7bdd4df30215b54ce60 Mon Sep 17 00:00:00 2001 From: walterhiggins Date: Sun, 6 Jan 2013 19:57:47 +0000 Subject: [PATCH] Don't re-init Drone if already loaded --- scripts/drone.js | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/scripts/drone.js b/scripts/drone.js index 2200a99..7a3d416 100644 --- a/scripts/drone.js +++ b/scripts/drone.js @@ -6,7 +6,7 @@ var global = this; // // Please read the following section to understand what a Minecraft Drone can do. // -var Drone = { +var Drone = Drone || { // // TLDNR; (Just read this if you're impatient) // ====== @@ -248,6 +248,12 @@ var Drone = { // There is no need to read any further unless you want to understand how the Drone object works. // (function(){ + // + // don't want to declare object more than once + // + if (ScriptCraft.Drone){ + return; + } // // Drone Constructor //