Skip to content

Commit 33635a6

Browse files
committed
remove craft-age-wear tweak from the control panel
for Windows users. until DFHack/dfhack#4292 is fixed
1 parent 5cbfb58 commit 33635a6

File tree

2 files changed

+13
-2
lines changed

2 files changed

+13
-2
lines changed

changelog.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ Template for new versions:
4242
- `hide-tutorials`: new ``reset`` command that will re-enable popups in the current game
4343

4444
## Removed
45+
- `gui/control-panel`: removed ``craft-age-wear`` tweak for Windows users; the tweak doesn't currently load on Windows
4546

4647
# 51.02-r1
4748

internal/control-panel/registry.lua

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,8 +68,9 @@ COMMANDS_BY_IDX = {
6868
-- bugfix tools
6969
{command='adamantine-cloth-wear', help_command='tweak', group='bugfix', mode='tweak', default=true,
7070
desc='Prevents adamantine clothing from wearing out while being worn.'},
71-
{command='craft-age-wear', help_command='tweak', group='bugfix', mode='tweak', default=true,
72-
desc='Allows items crafted from organic materials to wear out over time.'},
71+
-- re-inserted below for non-Windows users (where the tweak doesn't work)
72+
-- {command='craft-age-wear', help_command='tweak', group='bugfix', mode='tweak', default=true,
73+
-- desc='Allows items crafted from organic materials to wear out over time.'},
7374
{command='fix/blood-del', group='bugfix', mode='run', default=true},
7475
{command='fix/dead-units', group='bugfix', mode='repeat', default=true,
7576
desc='Fix units still being assigned to burrows after death.',
@@ -139,6 +140,15 @@ COMMANDS_BY_IDX = {
139140
{command='work-now', group='gameplay', mode='enable'},
140141
}
141142

143+
-- temporary workaround for Windows users until the tweak works
144+
if dfhack.getOSType() ~= 'windows' then
145+
local idx = utils.linear_index(COMMANDS_BY_IDX, 'adamantine-cloth-wear', 'command') or 1
146+
table.insert(COMMANDS_BY_IDX, idx + 1, {
147+
command='craft-age-wear', help_command='tweak', group='bugfix', mode='tweak', default=true,
148+
desc='Allows items crafted from organic materials to wear out over time.',
149+
})
150+
end
151+
142152
COMMANDS_BY_NAME = {}
143153
for _,data in ipairs(COMMANDS_BY_IDX) do
144154
COMMANDS_BY_NAME[data.command] = data

0 commit comments

Comments
 (0)