Skip to content

Commit 6716c29

Browse files
committed
Enable all confirms by default
1 parent b904b6d commit 6716c29

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

gui/confirm.lua

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,14 @@ local widgets = require('gui.widgets')
1010
dfhack.onStateChange[GLOBAL_KEY] = function(sc)
1111
if sc ~= SC_CORE_INITIALIZED then return end
1212
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+
1319
if not ok then return end
20+
-- update confirm state based on config
1421
for _, c in ipairs(config) do
1522
confirm.set_conf_state(c.id, c.enabled)
1623
end

0 commit comments

Comments
 (0)