Skip to content

Commit 34010ed

Browse files
committed
Fix PR feedback: use simulated input to open options menu instead of options.open=true
1 parent 849b26a commit 34010ed

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

manual-save.lua

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -180,9 +180,11 @@ local function triggerManualSave()
180180
print("Initiating manual save...")
181181
print("Saving natively to: " .. final_folder_name)
182182

183-
-- Inject the text and trigger the save UI natively
183+
-- Open the options menu natively via input to ensure it initializes properly
184184
local options = df.global.game.main_interface.options
185-
options.open = true
185+
if not options.open then
186+
gui.simulateInput(dfhack.gui.getCurViewscreen(true), 'OPTIONS')
187+
end
186188
options.entering_manual_folder = true
187189
options.entering_manual_str = final_folder_name
188190

0 commit comments

Comments
 (0)