Commit Graph

33 Commits (153fef934b612d58b2e1692ae1eb315205c121c2)

Author SHA1 Message Date
myk002 97fab76bba lay down tiles in order when using buildingplan
improves on implementation in 22ac163d5. we don't need to set the anchor
at all when using buildingplan.
2021-09-09 00:35:15 -07:00
lethosor e7754ea890
Enable -Wunused-variable and fix most errors 2021-09-07 01:16:21 -04:00
Myk Taylor 65114d904c fix typo in comment 2020-10-29 11:53:31 -07:00
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
Ben Lubar a7dfacd1c5
Fix warnings in supported plugins. 2018-04-06 01:25:21 -05:00
lethosor ae809afde7 Add Gui::refreshSidebar()
This handles feeding CURSOR_DOWN_Z and CURSOR_UP_Z properly, avoiding issues
when on the lowest z-level.
2017-06-23 00:02:21 -04:00
lethosor 62c9f2695a automaterial: use uicommon.h, draw to map 2017-06-02 15:00:51 -04:00
lethosor 3ebe59859b box-select: Fix "tiles to fill" count 2015-11-06 20:04:54 -05:00
DoctorVanGogh e9be1aa657 Fix for construction over existing construction & on top of walls
Fix to allow constructions on top of (natural) down stairs
2015-11-06 19:00:43 +01:00
DoctorVanGogh d692458038 Formatting 2015-11-03 10:07:27 +01:00
DoctorVanGogh a7fe1d9d73 Formatting 2015-11-02 05:05:17 +01:00
DoctorVanGogh 092979f362 Prevent building floor on top of constructed floor (mostly) 2015-11-02 02:51:52 +01:00
lethosor 10cfef0553 Fix whitespace issues 2015-02-14 22:53:06 -05:00
lethosor cac2245438 Update some plugins to use REQUIRE_GLOBAL 2014-12-03 23:26:54 -05:00
lethosor f069676fc2 Fix automaterial/box-select cursor color
Only use a dark green cursor when actually building a construction
2014-11-08 19:05:45 -05:00
Quietust 97de21357c First pass for 0.40 compatibility; still lots left to do, but this will at least build 2014-07-21 13:18:29 -05:00
Anuradha Dissanayake a14f31fbfe Show box select dimensions in Automaterial 2014-05-03 11:44:35 +12:00
Alexander Gavrilov a273327c6a Remove "using namespace std" from MiscUtils.h. 2013-10-10 12:15:50 +04:00
Alexander Gavrilov d7e35c2d23 Add built-in enable and disable commands. 2013-09-30 13:19:51 +04:00
Petr Mrázek c39f4bc182 Fix build bug in automaterial. 2013-04-24 17:49:18 +02:00
Anuradha Dissanayake f69f245732 Allow planned constructions orthogonal to stairs 2013-03-16 12:26:37 +13:00
Anuradha Dissanayake 83ef94774b A better format for toggle strings. 2013-01-12 23:32:30 +13:00
Anuradha Dissanayake 7df7b1758c Merge branch 'automaterial' of https://github.com/Falconne/dfhack into automaterial_box 2013-01-01 19:51:29 +13:00
Anuradha Dissanayake a1eadd0f08 Allocate sky blocks when needed.
Allow stairs to be designated on top of each other in open space.
2013-01-01 19:46:11 +13:00
Anuradha Dissanayake 5d04148aad Make gcc happy 2012-12-27 20:15:32 +13:00
Anuradha Dissanayake 1ed129e1a7 Allow placing constructions in unconnected open space, with sensible restrictions 2012-12-26 01:02:57 +13:00
falconne 40e25b6a1f Better handling of open space construction placement 2012-12-25 18:08:41 +13:00
Anuradha Dissanayake 5e54c9919a Improved check for figuring out what tiles can have constructions. 2012-12-24 00:59:12 +13:00
Anuradha Dissanayake 03aedf6895 Enabling designation like rectangular selection for constructions, with unlimited selection size and auto skipping of tiles that can't be built on. 2012-12-23 03:04:41 +13:00
Alexander Gavrilov 966deb4647 Fix crash and confusing behavior in automaterial. 2012-12-11 22:05:00 +13:00
Anuradha Dissanayake 2a83d92290 Code cleanup 2012-11-21 23:45:26 +13:00
Anuradha Dissanayake 0d9efec062 Disable plugin in non construction menu 2012-11-21 20:17:36 +13:00
Anuradha Dissanayake 9cb1a45855 Automaterial branch commit 2012-11-20 23:12:11 +13:00