From d62447adef1a18ca637379fa3ce1d2d691150e09 Mon Sep 17 00:00:00 2001 From: Robob27 Date: Sun, 10 Nov 2024 20:15:53 -0500 Subject: [PATCH 1/2] Fix confirm hover instructions --- changelog.txt | 1 + internal/confirm/specs.lua | 16 ++++++++-------- 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/changelog.txt b/changelog.txt index 3809982b0..d3da1c86d 100644 --- a/changelog.txt +++ b/changelog.txt @@ -38,6 +38,7 @@ Template for new versions: - `makeown`: halt any hostile jobs the unit may be engaged in, like kidnapping - `fix/loyaltycascade`: allow the fix to work on non-dwarven citizens - `control-panel`: fix setting numeric preferences from the commandline +- `gui/confirm`: fix some confirm prompts not working ## Misc Improvements - `control-panel`: Add realistic-melting tweak to control-panel registry diff --git a/internal/confirm/specs.lua b/internal/confirm/specs.lua index a6e0301eb..b5e356bf7 100644 --- a/internal/confirm/specs.lua +++ b/internal/confirm/specs.lua @@ -213,7 +213,7 @@ ConfirmSpec{ message='Are you sure you want to delete this route?', intercept_keys='_MOUSE_L', context='dwarfmode/Hauling', - predicate=function() return mi.current_hover == df.main_hover_instruction.RouteRemove end, + predicate=function() return mi.current_hover == df.main_hover_instruction.HAULING_REMOVE_ROUTE end, pausable=true, } @@ -223,7 +223,7 @@ ConfirmSpec{ message='Are you sure you want to delete this stop?', intercept_keys='_MOUSE_L', context='dwarfmode/Hauling', - predicate=function() return mi.current_hover == df.main_hover_instruction.StopRemove end, + predicate=function() return mi.current_hover == df.main_hover_instruction.HAULING_REMOVE_STOP end, pausable=true, } @@ -234,7 +234,7 @@ ConfirmSpec{ intercept_keys='_MOUSE_L', context='dwarfmode/ViewSheets/BUILDING/TradeDepot', predicate=function() - return mi.current_hover == df.main_hover_instruction.BuildingRemove and has_caravans() + return mi.current_hover == df.main_hover_instruction.BUILDING_SHEET_REMOVE and has_caravans() end, } @@ -244,7 +244,7 @@ ConfirmSpec{ message='Are you sure you want to disband this squad?', intercept_keys='_MOUSE_L', context='dwarfmode/Squads', - predicate=function() return mi.current_hover == df.main_hover_instruction.SquadDisband end, + predicate=function() return mi.current_hover == df.main_hover_instruction.SQUAD_DISBAND end, pausable=true, } @@ -438,7 +438,7 @@ ConfirmSpec{ message='Are you sure you want to remove this manager order?', intercept_keys='_MOUSE_L', context='dwarfmode/Info/WORK_ORDERS/Default', - predicate=function() return mi.current_hover == df.main_hover_instruction.ManagerOrderRemove end, + predicate=function() return mi.current_hover == df.main_hover_instruction.WORK_ORDERS_REMOVE end, pausable=true, } @@ -460,8 +460,8 @@ ConfirmSpec{ intercept_keys='_MOUSE_L', context='dwarfmode/Burrow', predicate=function() - return mi.current_hover == df.main_hover_instruction.BurrowRemove or - mi.current_hover == df.main_hover_instruction.BurrowRemovePaint + return mi.current_hover == df.main_hover_instruction.BURROW_REMOVE_EXISTING or + mi.current_hover == df.main_hover_instruction.BURROW_PAINT_REMOVE end, pausable=true, } @@ -472,7 +472,7 @@ ConfirmSpec{ message='Are you sure you want to remove this stockpile?', intercept_keys='_MOUSE_L', context='dwarfmode/Stockpile', - predicate=function() return mi.current_hover == df.main_hover_instruction.StockpileRemove end, + predicate=function() return mi.current_hover == df.main_hover_instruction.STOCKPILE_REMOVE_EXISTING end, pausable=true, } From 7078644b3fdb397e15e5be3ccbc90b6ed14f33bf Mon Sep 17 00:00:00 2001 From: Myk Date: Sun, 10 Nov 2024 20:28:27 -0800 Subject: [PATCH 2/2] Update changelog.txt --- changelog.txt | 1 - 1 file changed, 1 deletion(-) diff --git a/changelog.txt b/changelog.txt index d3da1c86d..3809982b0 100644 --- a/changelog.txt +++ b/changelog.txt @@ -38,7 +38,6 @@ Template for new versions: - `makeown`: halt any hostile jobs the unit may be engaged in, like kidnapping - `fix/loyaltycascade`: allow the fix to work on non-dwarven citizens - `control-panel`: fix setting numeric preferences from the commandline -- `gui/confirm`: fix some confirm prompts not working ## Misc Improvements - `control-panel`: Add realistic-melting tweak to control-panel registry