deprecating Drone.copy() and Drone.paste() and updating to 3.1.0

This commit is contained in:
walterhiggins 2015-01-10 11:45:08 +00:00
parent ea84afde09
commit 4819a0531f
4 changed files with 21 additions and 56 deletions

View file

@ -1,2 +1 @@
bukkit-version=1.7.10
scriptcraft-version=3.0.3
scriptcraft-version=3.1.0

View file

@ -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

View file

@ -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(adir<bdir) return -1;
if(adir>bdir) 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){

View file

@ -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([] );