Merge pull request #45 from rupl/some-docs

Just some docs
This commit is contained in:
Walter Higgins 2013-01-27 05:01:16 -08:00
commit 99d8d3ce41
2 changed files with 31 additions and 8 deletions

View file

@ -1,14 +1,27 @@
var global = this; var global = this;
// //
// Define these primitive methods used by drone.js (and potentiall others) // Define these primitive methods used by drone.js (and potentially others)
// //
// getPlayerPos returns the player's x,y,z and yaw (direction) // getPlayerPos
// getMousePos returns the x,y,z of the current block being targeted. // returns the player's x,y,z and yaw (direction)
// putBlock(x,y,z,blockId,metadata) puts a block at a location in current world //
// getBlock(x,y,z) gets the block and metadata (returned as a string in form '35:15') // getMousePos
// putSign(texts,x,y,z,blockId,metadata) puts a sign at the given location // returns the x,y,z of the current block being targeted.
// notifyAdministrators(msg) sends a message to all admins/ops. //
// echo(msg) prints a message on screen to current user. // putBlock(x,y,z,blockId,metadata)
// puts a block at a location in current world
//
// getBlock(x,y,z)
// gets the block and metadata (returned as a string in form '35:15')
//
// putSign(texts,x,y,z,blockId,metadata)
// puts a sign at the given location
//
// notifyAdministrators(msg)
// sends a message to all admins/ops.
//
// echo(msg)
// prints a message on screen to current user.
// //
(function(){ (function(){

View file

@ -296,6 +296,16 @@ load(__folder + "drone.js");
} }
} }
} }
//
// Creates the text out of blocks
//
// message
// string with text to be displayed
// fg
// foreground material. The material the text will be in.
// bg
// background material, optional. The negative space within the bounding box of the text.
//
Drone.extend('blocktype', function(message,fg,bg){ Drone.extend('blocktype', function(message,fg,bg){
this.chkpt('blocktext'); this.chkpt('blocktext');