Commit Graph

16 Commits (3e4863bc80de2844e795a086599c68b6506ca57f)

Author SHA1 Message Date
Alexander Gavrilov 14709e5d45 Add an official core lua context, and allow plugins to send events to it.
- This context requires core suspend lock and asserts it in a few places.
- Special 'event' objects are introduced. They can be invoked as
  functions, in which case they iterate all their fields and call
  them as functions. Errors are printed and consumed.
- When a plugin is opened by the core context, events registered in
  a special array are linked to it. The system is organized so as to
  avoid even trying to pass the event to lua if the module isn't loaded.
2012-04-15 19:09:25 +04:00
Alexander Gavrilov 7a34a89f53 Add burrow subcommands to modify burrow unit and tile sets. 2012-04-14 14:12:59 +04:00
Alexander Gavrilov 37cfb1fdcd Add unit position and container api. 2012-04-13 16:10:19 +04:00
Alexander Gavrilov 2d8611a480 Add core api for moving items between ground and containers. 2012-04-12 18:37:27 +04:00
Alexander Gavrilov 5d5502ae34 Update the item owner modification api and export it to lua. 2012-04-11 20:10:31 +04:00
Alexander Gavrilov 0c2b78b96b Add api for manipulating burrows to the core. 2012-04-11 19:42:05 +04:00
Alexander Gavrilov 61245711f7 Export a few maps functions to lua. 2012-04-11 16:20:16 +04:00
Alexander Gavrilov 93c795cfc3 Job module api tweaks: add a namespace to match others and some funcs. 2012-04-10 11:43:36 +04:00
Alexander Gavrilov 0e0740fddf Stop printall(df.global) from breaking if there are unknown addresses. 2012-04-10 10:34:03 +04:00
Alexander Gavrilov 45ae2ed67f Pull a few utility functions into the core and publish to lua. 2012-04-07 19:08:30 +04:00
Alexander Gavrilov e74788cb26 Add a generic facility for object finalization during stack unwind.
Supports two modes of finalization:

- try {...} finally {...}
- try {...} catch { ...; throw }

Argument passing discipline is designed with vararg tail calls in mind.
2012-04-07 14:21:38 +04:00
Alexander Gavrilov 0daafef690 Wrap MaterialInfo for lua. 2012-04-06 19:56:19 +04:00
Alexander Gavrilov 903e9ee716 Export a few more functions to lua. 2012-04-06 11:21:28 +04:00
Alexander Gavrilov 9eed9f0d24 Wrap a few utility functions defined on the c++ side for lua. 2012-04-05 19:55:59 +04:00
Petr Mrázek a6dd17919f Update Lua API doc html. 2012-04-05 02:42:08 +02:00
Petr Mrázek 7fa4ffeb9e Add a html version of the LUA API doc, package it. 2012-04-05 02:39:38 +02:00