dfhack/plugins/lua
Myk Taylor 22ac163d55 improve UX between automaterial and buildingplan
solves the confusing behavior when both automaterial and buildingplan
are enabled for constructions. the two plugins now communicate with each
other over the Lua layer to negotiate consistent behavior.

if neither plugin is enabled, the standard DF UI acts as normal

if automaterial is enabled but buildingplan is not, then automaterial
behavior is unchanged.

if buildingplan is enabled and automaterial is not then behavior is
the same as other buildings with buildingplan (no material selection
screen, screen stays on building placement screen after placement).
this commit fixes a bug, though, where buildingplan would only lay
down a single tile of contruction instead of a solid block when a
block is requested.

if both plugins are enabled but buildingplan is not enabled for the
building type then automaterial is unchanged from previous behavior,
execpt for an additional header showing the separation between
automaterial hotkeys and buildingplan hotkeys.

finally, if both plugins are enabled and buildingplan is enabled for the
building type then buildingplan behavior prevails, but the box select and
hollow designations features of automaterial are still usable and
useful. the 'Auto Mat-select', 'Reselect Type', and "Open Placement"
automaterial hotkeys are hidden in the UI and ignored in the feed. This
is because buildingplan takes over material selection, so 'Auto
Mat-select' doesn't make sense. Buildingplan also already stays on the
placement screen after placement, so 'Reselect Type' is not necessary.
And all buildingplan-placed buildings have relaxed placement
restrictions (e.g. they can be built in mid-air) so 'Open Placement' is
also not necessary. The missing options are replaced with blank lines so
the vertical alignment of all other options stays constant.

we also remove a few extra lua_pop() calls that are made superfluous by
the StackUnwinder.
2020-10-29 11:00:49 -07:00
..
sort follow rename unit.military.squad_index to squad_id in df-structures 2012-10-20 22:35:39 +02:00
automaterial.lua improve UX between automaterial and buildingplan 2020-10-29 11:00:49 -07:00
blueprint.lua update comments 2018-05-08 13:04:14 -07:00
building-hacks.lua Merge remote-tracking branch 'KlonZK/patch-1' into develop 2018-07-20 23:16:28 -04:00
buildingplan.lua improve UX between automaterial and buildingplan 2020-10-29 11:00:49 -07:00
burrows.lua Split off the burrows api from Maps and Units. 2012-04-26 12:56:28 +04:00
confirm.lua Add confirmation for convicting dwarves of crimes 2020-06-20 12:06:50 -04:00
cxxrandom.lua [Release] cxxrandom v2.0.1 2019-04-15 16:21:54 -07:00
dwarfmonitor.lua dwarfmonitor.lua: use dmerror() consistently 2018-05-21 21:23:52 -04:00
eventful.lua Show sidebar when moving from screen to screen 2016-04-10 16:51:58 +03:00
fortplan.lua buildingplan: construct buildings from lua 2020-10-16 14:03:05 -07:00
liquids.lua Expose the liquids plugin engine to lua, and make a wrapper gui script. 2012-08-25 10:37:03 +04:00
luasocket.lua Fix luasocket receive with byte count 2017-08-12 15:42:56 +03:00
map-render.lua Also rename the plugin lua file 2018-10-12 10:44:56 +03:00
pathable.lua Add new "pathable" plugin 2017-07-05 23:54:55 -04:00
power-meter.lua Implement a pressure plate sensitive to machine power. 2012-09-06 12:37:29 +04:00
rename.lua Support renaming some buildings, and arbitrary units, via gui script. 2012-09-05 21:27:42 +04:00
rendermax.lua Another file forgotten 2014-03-07 19:58:27 +02:00
siege-engine.lua Fix a few Lua 5.3-related errors 2018-08-02 14:36:15 -04:00
sort.lua Support sorting items in the trade screens. 2012-05-18 19:18:49 +04:00
stockflow.lua Many build fixes 2018-03-10 16:53:45 -05:00
stockpiles.lua stockpiles: Restrict characters in filenames when saving 2015-07-29 14:17:14 -04:00
workflow.lua Fix crafts advanced constraints in workflow 2018-07-04 19:10:51 +03:00
xlsxreader.lua update sample code for xlsxreader to use finalize 2020-08-10 09:18:49 -07:00
zone.lua Added lua GUI front-end for autobutcher. 2013-04-24 23:37:05 +12:00