Some recent development updates:
Lua was updated to Lua 5.3 (actually some time ago, but nobody seems to have mentioned it here yet). This was necessary to support 64-bit integers properly, since Lua 5.2 didn't support those. Unfortunately, this will cause a few things to fail that used to work before:
- Assigning a floating-point number to a DF field that is an integer
- Assigning a string to a DF integer field
- Passing a floating-point number to a C function (DF/DFHack) that expects an integer
Basically, strings and integers can be converted to floating point numbers automatically, but not to integers. If your scripts do any of those things above, you'll need to update them. In most cases, "math.floor()" should be enough to convert anything to an integer, and it should be consistent with the previous behavior.
DFHack changes:
- The manager-quantity script was re-added as gui/manager-quantity after Enay pointed out that it's still useful for changing work order quantities (oops).
- The lua interpreter (both the interactive and single-expression uses) and gui/gm-editor now support exactly the same "shortcuts" - e.g. scr, screen, world, building, bld, enabler, unit, etc.. These have been moved to utils.lua, so it should be easy for other scripts to use them too.
Structures:
- The viewscreen_setupadventurest layout has been incorrect for a long time, but I finally managed to get it mostly aligned properly and identified a bunch of new fields. (Having both 32 and 64-bit support was really helpful here, incidentally.)
- enabler was incorrect on x64 due to the "flags" bitfield varying in size, which was just fixed. This bitfield will have 32 flags or 64 flags on OS X/Linux depending on the architecture, but only the first two are used regardless of the platform/build.
(Also, I recently discovered that [
x] can be used for bulleted lists.)