From 12ff59f2e540c1d7f59f28f91479e856603b0007 Mon Sep 17 00:00:00 2001 From: walterhiggins Date: Sat, 23 Aug 2014 16:43:45 +0100 Subject: [PATCH] Removing streamer because it's not used anywhere. --- src/main/js/plugins/drone/contrib/streamer.js | 31 ------------------- 1 file changed, 31 deletions(-) delete mode 100644 src/main/js/plugins/drone/contrib/streamer.js diff --git a/src/main/js/plugins/drone/contrib/streamer.js b/src/main/js/plugins/drone/contrib/streamer.js deleted file mode 100644 index 28c8d75..0000000 --- a/src/main/js/plugins/drone/contrib/streamer.js +++ /dev/null @@ -1,31 +0,0 @@ -var Drone = require('../drone').Drone; -/** -* Creates a stream of blocks in a given direction until it hits something other than air -* -* Parameters: -* block - blockId -* dir - "up", "down", "left", "right", "fwd", "back -* maxIterations - (Optional) maximum number of cubes to generate, defaults to 1000 -*/ -Drone.extend('streamer', function(block, dir, maxIterations) { - if (typeof maxIterations == 'undefined') - maxIterations = 1000; - - var usage = "Usage: streamer({block-type}, {direction: 'up', 'down', 'fwd', 'back', 'left', 'right'}, {maximum-iterations: default 1000})\nE.g.\n" + - "streamer(5, 'up', 200)"; - if (typeof dir == 'undefined'){ - throw new Error(usage); - } - if (typeof block == 'undefined') { - throw new Error(usage); - } - for ( var i = 0; i < maxIterations || 1000; ++i ) { - this.box(block); - this[dir].call(this); - var block = this.world.getBlockAt(this.x, this.y, this.z); - if ( block.typeId != 0 && block.data != 0) { - break; - } - } - return this; -});