From 4819a0531fe703580d76c78a5369c67d02e06529 Mon Sep 17 00:00:00 2001 From: walterhiggins Date: Sat, 10 Jan 2015 11:45:08 +0000 Subject: [PATCH] deprecating Drone.copy() and Drone.paste() and updating to 3.1.0 --- build.properties | 3 +- docs/API-Reference.md | 40 ++++++-------------------- src/docs/js/generateApiDocs.js | 23 --------------- src/main/js/modules/drone/copypaste.js | 11 +++++++ 4 files changed, 21 insertions(+), 56 deletions(-) diff --git a/build.properties b/build.properties index dac3edd..e93e31b 100644 --- a/build.properties +++ b/build.properties @@ -1,2 +1 @@ -bukkit-version=1.7.10 -scriptcraft-version=3.0.3 +scriptcraft-version=3.1.0 diff --git a/docs/API-Reference.md b/docs/API-Reference.md index 8eb7d2b..6137ad8 100644 --- a/docs/API-Reference.md +++ b/docs/API-Reference.md @@ -366,7 +366,6 @@ Walter Higgins * [Drone Trees methods](#drone-trees-methods) * [Drone.rainbow() method](#dronerainbow-method) * [Drone.spiral_stairs() method](#dronespiral_stairs-method) - * [Drone.stairs() function](#dronestairs-function-1) * [Blocks Module](#blocks-module) * [Examples](#examples) * [Fireworks Module](#fireworks-module) @@ -3627,6 +3626,15 @@ To create a 2-line high message using glowstone... A drone can be used to copy and paste areas of the game world. +#### Deprecated +As of January 10 2015 the copy-paste functions in Drone are no longer +supported. Copy/Paste is: + +1. Difficult to do correctly in a way which works for both Minecraft 1.7 and 1.8 + due to how blocks changed in 1.8 +2. Not aligned with the purpose of ScriptCraft's Drone module which is to provide + a simple set of functions for scripting and in-game building. + ### Drone.copy() method Copies an area so it can be pasted elsewhere. The name can be used for @@ -4112,36 +4120,6 @@ To construct a spiral staircase 5 floors high made of oak... spiral_stairs('oak', 5); -### Drone.stairs() function - -The stairs() function will build a flight of stairs - -#### Parameters - - * blockType - should be one of the following: - - * blocks.stairs.oak - * blocks.stairs.cobblestone - * blocks.stairs.brick - * blocks.stairs.stone - * blocks.stairs.nether - * blocks.stairs.sandstone - * blocks.stairs.spruce - * blocks.stairs.birch - * blocks.stairs.jungle - * blocks.stairs.quartz - - * width - The width of the staircase - default is 1 - * height - The height of the staircase - default is 1 - -#### Example - -To build an oak staircase 3 blocks wide and 5 blocks tall: - - /js stairs(blocks.stairs.oak, 3, 5) - -Staircases do not have any blocks beneath them. - ## Blocks Module You hate having to lookup [Data Values][dv] when you use ScriptCraft's diff --git a/src/docs/js/generateApiDocs.js b/src/docs/js/generateApiDocs.js index 24fd30f..467dbf7 100644 --- a/src/docs/js/generateApiDocs.js +++ b/src/docs/js/generateApiDocs.js @@ -76,29 +76,7 @@ function sorter( precedence ){ } }; } -function sortByModule(a,b) -{ - var aparts = (''+a).split(/\//); - var bparts = (''+b).split(/\//); - var adir = aparts[aparts.length-2]; - var afile = aparts[aparts.length-1]; - var bdir = bparts[bparts.length-2]; - var bfile = bparts[bparts.length-1]; - if (afile == '_scriptcraft.js') - return -1; - if (bfile == '_scriptcraft.js') - return 1; - if(adirbdir) return 1; - if (afile.indexOf(adir) == 0) - return -1; - else - return 1; -} - - var err = java.lang.System.err; - args = Array.prototype.slice.call(args,1); if (typeof importPackage == 'undefined'){ @@ -126,7 +104,6 @@ store.sort(sorter([ /modules\//, /examples\// ])); -//err.println("store=" + JSON.stringify(store)); var contents = []; foreach(store, function(filename){ diff --git a/src/main/js/modules/drone/copypaste.js b/src/main/js/modules/drone/copypaste.js index 8b41b0b..d6dbb64 100644 --- a/src/main/js/modules/drone/copypaste.js +++ b/src/main/js/modules/drone/copypaste.js @@ -6,6 +6,15 @@ A drone can be used to copy and paste areas of the game world. +#### Deprecated +As of January 10 2015 the copy-paste functions in Drone are no longer +supported. Copy/Paste is: + +1. Difficult to do correctly in a way which works for both Minecraft 1.7 and 1.8 + due to how blocks changed in 1.8 +2. Not aligned with the purpose of ScriptCraft's Drone module which is to provide + a simple set of functions for scripting and in-game building. + ### Drone.copy() method Copies an area so it can be pasted elsewhere. The name can be used for @@ -40,6 +49,7 @@ point) into memory. the copied area can be referenced using the name var clipBoard = {}; function paste( name, immediate ){ + console.warn('Drone copy/paste is no longer in active development'); var Drone = this.constructor; var ccContent = clipBoard[name]; if (ccContent == undefined){ @@ -128,6 +138,7 @@ function paste( name, immediate ){ } ); } function copy( name, w, h, d ) { + console.warn('Drone copy/paste is no longer in active development'); var ccContent = []; this.traverseWidth(w,function( ww ) { ccContent.push([] );