From b672e40851cb862f8ab1277de6aee1fc56341c7f Mon Sep 17 00:00:00 2001 From: Myk Taylor Date: Sat, 30 Sep 2023 22:37:27 -0700 Subject: [PATCH 1/5] clean up changelog --- docs/changelog.txt | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/docs/changelog.txt b/docs/changelog.txt index 4db2bbf77..8d3d45778 100644 --- a/docs/changelog.txt +++ b/docs/changelog.txt @@ -58,23 +58,24 @@ Template for new versions: ## New Features ## Fixes -- `autolabor`: now unconditionally re-enables vanilla work details when the fort or the plugin is unloaded +- `autolabor`: ensure vanilla work details are reinstated when the fort or the plugin is unloaded - ``dfhack.TranslateName()``: fixed crash on certain invalid names, which affected `warn-starving` - EventManager: Unit death event no longer misfires on units leaving the map ## Misc Improvements -- `dig`: `digtype` command now has options to choose between designating only visible tiles or hidden tiles, as well as "auto" dig mode. Z-level options adjusted to allow choosing z-levels above, below, or the same as the cursor. +- `digtype`: designate only visible tiles by default, and use "auto" dig mode for following veins +- `digtype`: added options for designating only current z-level, this z-level and above, and this z-level and below - `hotkeys`: make the DFHack logo brighten on hover in ascii mode to indicate that it is clickable -- `hotkeys`: use vertical bars instead of "!" symbols for the DFHack logo to make it easier to read -- EventManager: guarded against potential iterator invalidation if one of the event listeners modified the global data structure being iterated over -- EventManager: changed firing order of building created and building destroyed events to improve performance in the building location cache. +- `hotkeys`: use vertical bars instead of "!" symbols for the DFHack logo in ascii mode to make it easier to read +- EventManager: guard against potential iterator invalidation if one of the event listeners were to modify the global data structure being iterated over +- EventManager: for ``onBuildingCreatedDestroyed`` events, changed firing order of events so destroyed events come before created events ## Documentation ## API ## Lua -- mouse key events are now aligned with internal DF semantics: ``_MOUSE_L`` indicates that the left mouse button has just been pressed and ``_MOUSE_L_DOWN`` indicates that the left mouse button is being held down. similar for ``_MOUSE_R`` and ``_MOUSE_M``. 3rd party scripts may have to adjust. +- mouse key events are now aligned with internal DF semantics: ``_MOUSE_L`` indicates that the left mouse button has just been pressed and ``_MOUSE_L_DOWN`` indicates that the left mouse button is being held down. similarly for ``_MOUSE_R`` and ``_MOUSE_M``. 3rd party scripts may have to adjust. ## Removed From 6e2adaa3a92cf6981bed18ca8282a1e715c1e774 Mon Sep 17 00:00:00 2001 From: Myk Taylor Date: Sat, 30 Sep 2023 23:31:56 -0700 Subject: [PATCH 2/5] don't conflict with macro recording key --- plugins/lua/orders.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/lua/orders.lua b/plugins/lua/orders.lua index df8710739..102580fab 100644 --- a/plugins/lua/orders.lua +++ b/plugins/lua/orders.lua @@ -100,7 +100,7 @@ function OrdersOverlay:init() widgets.HotkeyLabel{ frame={t=0, l=15}, label='recheck', - key='CUSTOM_CTRL_R', + key='CUSTOM_CTRL_K', auto_width=true, on_activate=do_recheck, }, From cd12e41fd7aa7d7a52c9e9cab97d89273bef0764 Mon Sep 17 00:00:00 2001 From: Myk Taylor Date: Sat, 30 Sep 2023 23:54:25 -0700 Subject: [PATCH 3/5] update enabler mouse state when mouse clicks are handled in dialogs --- library/lua/gui/dialogs.lua | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/library/lua/gui/dialogs.lua b/library/lua/gui/dialogs.lua index 95a56d0c4..5778cc767 100644 --- a/library/lua/gui/dialogs.lua +++ b/library/lua/gui/dialogs.lua @@ -67,7 +67,10 @@ function MessageBox:onInput(keys) gui.markMouseClicksHandled(keys) return true end - return self:inputToSubviews(keys) + if self:inputToSubviews(keys) then + gui.markMouseClicksHandled(keys) + return true + end end function showMessage(title, text, tcolor, on_close) @@ -137,7 +140,10 @@ function InputBox:onInput(keys) gui.markMouseClicksHandled(keys) return true end - return self:inputToSubviews(keys) + if self:inputToSubviews(keys) then + gui.markMouseClicksHandled(keys) + return true + end end function showInputPrompt(title, text, tcolor, input, on_input, on_cancel, min_width) @@ -239,7 +245,10 @@ function ListBox:onInput(keys) gui.markMouseClicksHandled(keys) return true end - return self:inputToSubviews(keys) + if self:inputToSubviews(keys) then + gui.markMouseClicksHandled(keys) + return true + end end function showListPrompt(title, text, tcolor, choices, on_select, on_cancel, min_width, filter) From a5fbd791cd943f64f7fca6ec13e45460c89f4149 Mon Sep 17 00:00:00 2001 From: DFHack-Urist via GitHub Actions <63161697+DFHack-Urist@users.noreply.github.com> Date: Sun, 1 Oct 2023 07:13:02 +0000 Subject: [PATCH 4/5] Auto-update submodules scripts: master --- scripts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts b/scripts index 57c859394..55d0463cd 160000 --- a/scripts +++ b/scripts @@ -1 +1 @@ -Subproject commit 57c859394936f9183d95426f75a5d3e9b305dd2a +Subproject commit 55d0463cdb67165f746a3f2c0f4dd87c6ef86eec From 211b34c618cdafdafd1bc756bce3ea3c7622cbf6 Mon Sep 17 00:00:00 2001 From: DFHack-Urist via GitHub Actions <63161697+DFHack-Urist@users.noreply.github.com> Date: Sun, 1 Oct 2023 08:35:42 +0000 Subject: [PATCH 5/5] Auto-update submodules library/xml: master scripts: master --- library/xml | 2 +- scripts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/library/xml b/library/xml index dc1d5c80f..b313b69ad 160000 --- a/library/xml +++ b/library/xml @@ -1 +1 @@ -Subproject commit dc1d5c80f03a68f6d58ff4f8dbbdf6855a7e9781 +Subproject commit b313b69adafef0bc3597df285504b729c44bea86 diff --git a/scripts b/scripts index 55d0463cd..8259d95e9 160000 --- a/scripts +++ b/scripts @@ -1 +1 @@ -Subproject commit 55d0463cdb67165f746a3f2c0f4dd87c6ef86eec +Subproject commit 8259d95e9ee9d88c88f32b22608d0d8c977aac18