Keridos/Shape-Builder — pull request #21 by Happydude11209 (2013-04-11 22:52:52+00:00)
Title: Command Line Access

I have tested it in a few different cases and it has worked each time. I am confidant that this works all of the time.

Added:
* Command line access
* shape.lua takes command line arguments and trys to use them
* Format: `shape [ [param1 param2 ...]] [-c] [-h] [-r] [-z]`
* -c: set count_only flag to true
* -h: show help info
* -r: resume build
* -z: set chain_next_shape flag to true
* Work like normal if called without arguments
* Added a few functions to facilitate this
* Ability to chain multiple shapes together through a flag, the program still has to be run once per shape needed
* Help page
* Help option to page 2
* Exit "shape" closes the program, can be also called with "end", on page 2
* Several flags to help with certain features
* Added some other shapes that aren't shown on the menu, but help speed up the program (straight call to bowl/dome, etc.) Full listing soon.

-----

Changed:
* Added code for `WriteShapeParams()`
* Calls goHome() after all shapes are built
* Replaced spaces in names with "-" this makes using them as command line arguments easier, still can be called with the space though
* Made resuming functions recognize command line input
* Made several other functions
* Cleaned up a little bit
* `safeForward` and `safeBack` now increment/decrement `positionx` and `positiony` based on facing. This is because some shapes (cough cough, line, cough cough) don't use navigateTo()
* `moveX` and `moveY` no longer increment/decrement `positionx` and `positiony`

-----

Known Issues:
* Cost_only will cause the turtle to crash with big shapes >_>