diff --git a/js-plugins/core/_primitives.js b/js-plugins/core/_primitives.js index 9d8e89c..21745cc 100644 --- a/js-plugins/core/_primitives.js +++ b/js-plugins/core/_primitives.js @@ -1,3 +1,4 @@ +var global = this; // // Define these primitive methods used by drone.js (and potentiall others) // @@ -120,12 +121,12 @@ __self.sendMessage(msg); }; - getPlayerPos = _getPlayerPos; - getMousePos = _getMousePos; - putBlock = _putBlock; - getBlock = _getBlock; - putSign = _putSign; - notifyAdministrators = _notifyAdministrators; - echo = _echo; + global.getPlayerPos = _getPlayerPos; + global.getMousePos = _getMousePos; + global.putBlock = _putBlock; + global.getBlock = _getBlock; + global.putSign = _putSign; + global.notifyAdministrators = _notifyAdministrators; + global.echo = _echo; }()); diff --git a/js-plugins/drone/castle.js b/js-plugins/drone/castle.js index 3337c7e..f714426 100644 --- a/js-plugins/drone/castle.js +++ b/js-plugins/drone/castle.js @@ -1,4 +1,3 @@ -load(__folder + "fort.js"); // // a castle is just a big wide fort with 4 taller forts at each corner // diff --git a/js-plugins/drone/cottage.js b/js-plugins/drone/cottage.js index 93189fc..e5a2321 100644 --- a/js-plugins/drone/cottage.js +++ b/js-plugins/drone/cottage.js @@ -1,4 +1,3 @@ -load(__folder + "drone.js"); // assumes cottage.js and drone.js are in same directory // // need to use the drone module to create buildings easily // it can be done using calls to putBlock(), putSign(), getPlayerPos() and getMousePos() diff --git a/js-plugins/drone/dancefloor.js b/js-plugins/drone/dancefloor.js index 44c45c1..e9b2713 100644 --- a/js-plugins/drone/dancefloor.js +++ b/js-plugins/drone/dancefloor.js @@ -1,4 +1,3 @@ -load(__folder + "drone.js"); // // Create a floor of colored tiles some of which emit light. // The tiles change color every second creating a strobe-lit dance-floor. diff --git a/js-plugins/drone/drone.js b/js-plugins/drone/drone.js index af2f528..7d0516f 100644 --- a/js-plugins/drone/drone.js +++ b/js-plugins/drone/drone.js @@ -1,5 +1,5 @@ -load(__folder + "../core/_primitives.js"); var global = this; +load(__folder + "../core/_primitives.js",true); // // Interface // ========= diff --git a/js-plugins/drone/fort.js b/js-plugins/drone/fort.js index 15dab6f..c73e051 100644 --- a/js-plugins/drone/fort.js +++ b/js-plugins/drone/fort.js @@ -1,4 +1,3 @@ -load(__folder + "drone.js"); // // constructs a medieval fort // diff --git a/js-plugins/drone/sphere.js b/js-plugins/drone/sphere.js index 766ec64..c91db41 100644 --- a/js-plugins/drone/sphere.js +++ b/js-plugins/drone/sphere.js @@ -1,5 +1,3 @@ -load(__folder + "drone.js"); - Drone.extend('sphere', function(block,radius) { var lastRadius = radius; diff --git a/js-plugins/drone/temple.js b/js-plugins/drone/temple.js index e121e35..90ba27e 100644 --- a/js-plugins/drone/temple.js +++ b/js-plugins/drone/temple.js @@ -1,4 +1,3 @@ -load(__folder + "drone.js"); // // constructs a mayan temple //