We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b904b6d commit 6716c29Copy full SHA for 6716c29
gui/confirm.lua
@@ -10,7 +10,14 @@ local widgets = require('gui.widgets')
10
dfhack.onStateChange[GLOBAL_KEY] = function(sc)
11
if sc ~= SC_CORE_INITIALIZED then return end
12
local ok, config = pcall(json.decode_file, CONFIRM_CONFIG_FILE)
13
+ local all_confirms = confirm.get_conf_data()
14
+ -- enable all confirms by default so new confirms are automatically enabled
15
+ for _, c in ipairs(all_confirms) do
16
+ confirm.set_conf_state(c.id, true)
17
+ end
18
+
19
if not ok then return end
20
+ -- update confirm state based on config
21
for _, c in ipairs(config) do
22
confirm.set_conf_state(c.id, c.enabled)
23
end
0 commit comments