Skip to content
This repository has been archived by the owner on Apr 17, 2018. It is now read-only.
Nephi (AKA Lupus590) edited this page Dec 29, 2015 · 1 revision

lama (By KingofGamesYami)

A rewrite of the original by Sangar

Want to just install lama? Try this:

pastebin run vyBeH8ZV lama

or, if you already have the installer, run it with "lama" as an argument (without quotes).

Files and Directories

  • /.lama/ - All files created by lama are stored here
  • /.lama/position - stores coordinates {x,y,z}
  • /.lama/facing - stores facing and direction {f,d}
  • /.lama/fuel - stores the last fuel level

Exposed Functions

  • lama.overwrite( [table t] ) - _overwrites G.turtle, or the table provided
  • lama.getPosition() - returns the current position in (x, y, z, facing)
  • lama.setPosition( number x, number y, number z[, string facing] ) - sets the current position
  • lama.turnRight() - turtle.turnRight, with tracking
  • lama.turnLeft() - turtle.turnLeft, with tracking
  • lama.forward() - turtle.forward, but with tracking
  • lama.back() - turtle.back, but with tracking
  • lama.down() - turtle.down, but with tracking
  • lama.up() - turtle.up, but with tracking
  • lama.refuel( [number amount] ) - turtle.refuel, but with tracking

Internal Tables

  • fuel - stores fuel level and saving/loading functions for fuel level
  • facing - stores the current facing (north/south/east/west) and the direction (facing/up/down), and saving/loading functions for those values
  • position - stores x, y, z position, and the save/load functions for those values. Also includes update function
  • env - the environment (anything set in it is available at lama.name)

Internal Functions

  • facing.load - if previous data is available, it'll load it, otherwise it'll try GPS then default to north
  • facing.save - saves facing
  • facing.turnRight - changes the internal facing value clockwise on a compass (ei north -> east)
  • position.load - if previous data is available, it'll load it, otherwise it'll try GPS then default to {1,1,1}
  • position.save - saves position
  • position.update - updates the position based on current direction and difference in fuel level
  • fuel.load - loads fuel data or defaults to current fuel level
  • fuel.save - saves fuel data
Clone this wiki locally