dfhack/plugins/Dfusion
Alexander Gavrilov a1756a864c Implement a way to do prompts from core context.
The trick obviously is doing it without forcing DF to wait suspended.
Fortunately, lua has built-in coroutine support, so the interactive
prompt can simply yield and rely on the external loop to do the job.
To use this however the REPL had to be replaced with lua code.
2012-04-15 21:50:22 +04:00
..
include Added ability to call dfuse as a hotkey. 2012-04-03 16:17:43 +03:00
luafiles Fix to init (no need to add " around). Added experimental (crashy as hell) tools.project 2012-04-14 13:30:48 +03:00
src Added ability to call dfuse as a hotkey. 2012-04-03 16:17:43 +03:00
CMakeLists.txt Commented non working parts... Not very much left... 2012-03-25 01:16:41 +02:00
dfusion.cpp Implement a way to do prompts from core context. 2012-04-15 21:50:22 +04:00
readme.txt updated readme.txt 2012-03-18 02:22:26 +02:00

readme.txt

Dfusion plugin offers four DFhack commands: 'dfusion', 'dfuse' and 'lua', 'runlua'.
lua:
Runs an interactive lua console. For more on lua commands see [http://www.lua.org/manual/5.1/manual.html Lua reference manual] or google "lua". Also this command could be ran with filepath as an argument. Then it runs that file as a lua script file. E.g. ''lua dfusion/temp.lua'' runs a file  <your df path>/dfusion/temp.lua.
runlua:
Similar to ''lua <filename>'' but not interactive, to be used with hotkeys
dfusion:
First this command runs all plugins' init.lua part then show a menu. Type number to run specified plugin.
dfuse:
Similar to dfusion but not interactive. To be used with hotkeys (later will have command support).

Also dfuse/dfusion runs an init script located at 'save directory/dfusion/init.lua'. And 'initcustom.lua' if it exists
More info http://dwarffortresswiki.org/index.php/Utility:DFusion