From e0cde2a93bc1013027d73ee77a865fbb809d8e9c Mon Sep 17 00:00:00 2001 From: Myk Taylor Date: Thu, 4 Jan 2024 08:51:12 -0800 Subject: [PATCH] add confirm prompt for rerunning embark site finder --- changelog.txt | 1 + internal/confirm/specs.lua | 13 +++++++++++++ 2 files changed, 14 insertions(+) diff --git a/changelog.txt b/changelog.txt index a3f4315439..80edb91c0b 100644 --- a/changelog.txt +++ b/changelog.txt @@ -47,6 +47,7 @@ Template for new versions: - `confirm`: added confirmation prompts for irreversible actions on the trade screen - `confirm`: added confirmation prompt for deleting a uniform - `confirm`: added confirmation prompt for convicting a criminal +- `confirm`: added confirmation prompt for re-running the embark site finder - `gui/autobutcher`: interface redesigned to better support mouse control - `gui/launcher`: now persists the most recent 32KB of command output even if you close it and bring it back up - `gui/quickcmd`: clickable buttons for command add/remove/edit operations diff --git a/internal/confirm/specs.lua b/internal/confirm/specs.lua index c2408e626a..23749ee191 100644 --- a/internal/confirm/specs.lua +++ b/internal/confirm/specs.lua @@ -332,6 +332,19 @@ ConfirmSpec{ pausable=true, } +ConfirmSpec{ + id='embark-site-finder', + title='Re-run finder', + message='Are you sure you want to re-run the site finder? Your current map highlights will be lost.', + intercept_keys='_MOUSE_L', + intercept_frame={r=2, t=36, w=7, h=3}, + context='choose_start_site/SiteFinder', + predicate=function() + return dfhack.gui.getDFViewscreen(true).find_results ~= df.viewscreen_choose_start_sitest.T_find_results.None + end, + pausable=true, +} + -------------------------- -- Config file management --