Skip to content

Releases: fnuecke/lama

v1.4c

22 Aug 22:48
Compare
Choose a tag to compare

This version brings the following changes:

  • Fixed lama.back().

v1.4b

09 Aug 13:59
Compare
Choose a tag to compare

This version brings the following changes:

  • Fixed potential infinite loop in path resolver for longest path first multiblock movement.

v1.4a

08 Aug 07:35
Compare
Choose a tag to compare

This version brings the following changes:

  • Improvements on turtles' awareness of each other. Previously turtles may have (with a very, very small chance) moved into and/or out of the way of other turtles in such a way that the blocked turtle may have wrongly diagnosed the reason for its movement failure. This should not happen anymore.

v1.4

06 Aug 12:51
Compare
Choose a tag to compare

This version brings the following changes:

  • Important: from now on you must use lama.refuel() instead of turtle.refuel().
  • Extended state validation to cases when the turtle isn't moving. This is achieved by also replacing turtle.refuel() and comparing the command ID we got from that to a newly generated one during initialization, where we'd expect a higher one. There's a slight chance for this to fail if a rollback only went back a couple of ticks. But if the game crashes so hard it can't save anymore it usually involves a lot more rollback.
  • When the API enters an invalid state (command ID indicating rollback or fuel level mismatch) it will now lock down and throw errors whenever any function other than lama.set() is called. This is to avoid turtles running amok when they don't know where they are. They'll just stay put until reinitialized by the player.
  • Added parameter to lama.moveto(), lama.navigate() and lama.waypoint.moveto() that can be used to tell the turtle to move along the short (default) or long axes first. For example: when going from (0, 0, 0) to (3, 1, 0) the first axis would be the long axis, the second the short one. This gives more control over which areas turtles will avoid when moving.
  • Went back to blocking when encountering invulnerable entities (sorry). This is to avoid having to use constructs like repeat until lama.moveto(x, y, z, f, math.huge, true, true --[[ longest axis first ]]) to cover players blocking turtles, and turtles changing paths in such cases.

v1.3

02 Aug 10:51
Compare
Choose a tag to compare

This version brings the following changes:

  • Important: Changed / introduced folder structure. The API is now in an apis folder and the programs (lama-conf) in a programs folder. This breaks the old installer on pastebin, get the new one if you plan on using it, please. You'll also have to either move the files or adjust your os.loadAPI paths. Sorry for the inconvenience.
  • Switched to lazy initialization. This means calling os.loadAPI("apis/lama") will no longer block due to the API finishing pending moves. Instead, the first call to any function in the API will trigger initialization and may block. A new function, lama.init() has been added specifically for this, but any function will trigger the same logic before doing its own thing. The intention is to allow other startup programs to run before continuing interruped movement.
  • Fixed broken math.huge serialization, which means resuming moves using an infinite number of tries didn't work. This was actually textutils.serialize/unserialize's fault, it writes inf and then reads that back as nil, because it's interpreted as a variable.
  • Fixed waypoints being deleted if some other part of the state was invalid.
  • Changed how indestructible blocks and invulnerable entities are handled. When one is encountered, the move will now fail immediately. This is because moves with an infinite number of tries would otherwise never return when hitting bedrock, for example.
  • Tested some more for robustness using my own [mining program][jam]. It even survived two game crashes, so I feel this can safely be called stable now.