Skip to content

Commit 67f84d7

Browse files
committed
Documenting Drone.MAX_SIDE and Drone.MAX_VOLUME
1 parent 207d922 commit 67f84d7

1 file changed

Lines changed: 18 additions & 2 deletions

File tree

docs/API-Reference.md

Lines changed: 18 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3722,7 +3722,7 @@ Alternatively if you provide just a function as a parameter, then the function n
37223722

37233723
// submitted by [edonaldson][edonaldson]
37243724
var Drone = require('drone');
3725-
Drone.extend('pyramid', function( block,height) {
3725+
Drone.extend('pyramid', function( block, height ) {
37263726
this.chkpt('pyramid');
37273727
for ( var i = height; i > 0; i -= 2) {
37283728
this.box(block, i, 1, i).up().right().fwd();
@@ -3733,7 +3733,7 @@ Alternatively if you provide just a function as a parameter, then the function n
37333733
#### Example 2 Using just a named function as a parameter
37343734

37353735
var Drone = require('drone');
3736-
function pyramid( block,height) {
3736+
function pyramid( block, height ) {
37373737
this.chkpt('pyramid');
37383738
for ( var i = height; i > 0; i -= 2) {
37393739
this.box(block, i, 1, i).up().right().fwd();
@@ -3791,6 +3791,22 @@ If you want to place a torch so it faces _away_ from the drone:
37913791

37923792
drone.box( blocks.torch + ':' + Drone.PLAYER_TORCH_FACING[(drone.dir + 2) % 4]);
37933793

3794+
#### Drone.MAX_SIDE
3795+
3796+
Specifies the maximum length (in any dimension) when calling the Drone.cuboidX (box) method.
3797+
The default value is 1,000 blocks.
3798+
3799+
If you see an error message in the console `Build too big!` It's because the width, height or length paramete was greater than the Drone.MAX_SIDE value.
3800+
3801+
#### Drone.MAX_VOLUME
3802+
3803+
Specifies the maximum value for any call to Drone.cuboidX (box) method.
3804+
The default value is 1,000,000 (1 million) blocks.
3805+
3806+
If the volume (width X height X length) of any single call to the Drone.cuboidX() method exceeds this value, you will see an error message in the console `Build too big!` .
3807+
3808+
The values of both the `Drone.MAX_SiDE` and `Drone.MAX_VOLUME` variables _can_ be overridden but it's not recommended.
3809+
37943810
### Drone.times() Method
37953811

37963812
The `times()` method makes building multiple copies of buildings

0 commit comments

Comments
 (0)