The spent command was tracked in a table flag, which is lost whenever the speed
table is rebuilt - the cell would go back to being a stop point. The memcell
already knows: StopCommandSent() drops the pending flag and keeps the text, so
the event now answers is_command_spent() and the table point follows it.
OrderNextGet() read one past the end of OrderList when the current order sat in
the last slot; it now reports Wait_for_orders there, which is what OrderNext()
wraps to anyway.
- Lua bindings are no longer using FFI in favor of the "classic" Lua C API.
- This makes it work properly on native Linux builds.
- Changed the Lua API slightly:
- Removed the `api.event_preparefunc()` function because it is no longer necessary. Instead, you can pass any function you want without preparing it first.
- Added an `api.event_exists()` function. Takes a single `name` argument.
- Any `api.find_*()` functions return `nil` instead of an userdata representing a null pointer when the requested object is not found.