Skip to content

Commit fb25d4d

Browse files
committed
confirm: only pause specific confirmations
Pausing a confirmation currently pauses all confirmations, not just other instances of the current confirmation. For example, when trading, pausing a Mark All confirmation will also skip confirmation of the Seize action. The prompt in showYesNoPrompt is "Pause this confirmation". To better match that description, only pause new occurrences of the current confirmation.
1 parent 4bce233 commit fb25d4d

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

changelog.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ Template for new versions:
4242
- `confirm`: when removing a manager order, show correct order description when using non-100% interface setting
4343
- `confirm`: when removing a manager order, show correct order description after prior order removal or window resize (when scrolled to bottom of order list)
4444
- `confirm`: when removing a manager order, show specific item/job type for ammo, shield, helm, gloves, shoes, trap component, and meal orders
45+
- `confirm`: the pause option now only pauses future instances of the current confirmation instead of all confirmations in the current context
4546

4647
## Misc Improvements
4748

confirm.lua

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,12 +108,15 @@ function ConfirmOverlay:matches_conf(conf, keys, scr)
108108
end
109109

110110
function ConfirmOverlay:onInput(keys)
111-
if self.paused_conf or self.simulating then
111+
if self.simulating then
112112
return false
113113
end
114114
local scr = dfhack.gui.getDFViewscreen(true)
115115
for id, conf in pairs(specs.REGISTRY) do
116116
if specs.config.data[id].enabled and self:matches_conf(conf, keys, scr) then
117+
if conf == self.paused_conf then
118+
return false
119+
end
117120
local mouse_pos = xy2pos(dfhack.screen.getMousePos())
118121
local propagate_fn = function(pause)
119122
if conf.on_propagate then

0 commit comments

Comments
 (0)