diff --git a/scripts/cottage.js b/scripts/cottage.js index 47e1474..5643278 100644 --- a/scripts/cottage.js +++ b/scripts/cottage.js @@ -1,3 +1,5 @@ +var scriptDir = $SCRIPT_DIR; +load(scriptDir + "/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() @@ -6,8 +8,6 @@ // current script resides. // $SCRIPT is a special javascript variable whose value is the full name of the current script. // -var scriptDir = $SCRIPT_DIR; -load(scriptDir + "/../drone.js"); // assumes cottage.js and drone.js are in same directory // // usage: // [1] to build a cottage at the player's current location or the cross-hairs location... diff --git a/scripts/dancefloor.js b/scripts/dancefloor.js index 38b258b..d594df2 100644 --- a/scripts/dancefloor.js +++ b/scripts/dancefloor.js @@ -1,10 +1,10 @@ +load($SCRIPT_DIR + "/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. // // See it in action here => http://www.youtube.com/watch?v=UEooBt6NTFo // -load($SCRIPT_DIR + "/../drone.js"); Drone.extend('dancefloor',function(width,length) { if (typeof width == "undefined") diff --git a/scripts/fort.js b/scripts/fort.js index 5c6ad1c..6b05545 100644 --- a/scripts/fort.js +++ b/scripts/fort.js @@ -1,4 +1,4 @@ -load($SCRIPT_DIR + "/../drone.js"); +load($SCRIPT_DIR + "/drone.js"); // // constructs a medieval fort //