Skip to content

Commit 615af9f

Browse files
gui/create-item: add 0-5 hotkeys to the quality selection prompt
The quality prompt had no keybindings, forcing arrow-key selection. Digits 0-5 now map to the six quality levels. implements DFHack/dfhack#5770
1 parent 28089ac commit 615af9f

2 files changed

Lines changed: 8 additions & 6 deletions

File tree

‎changelog.txt‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ Template for new versions:
2929
## New Tools
3030

3131
## New Features
32+
- `gui/create-item`: quality selection prompt now has 0-5 hotkeys matching the quality levels
3233

3334
## Fixes
3435
- `bodyswap`: fix "invalid argument count" when the target unit has no nemesis record

‎gui/create-item.lua‎

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -165,12 +165,13 @@ local function getMatFilter(itemtype, opts)
165165
end
166166

167167
local function qualityTable()
168-
return { { 'None' },
169-
{ '-Well-crafted-' },
170-
{ '+Finely-crafted+' },
171-
{ '*Superior*' },
172-
{ string.char(240) .. 'Exceptional' .. string.char(240) },
173-
{ string.char(15) .. 'Masterwork' .. string.char(15) },
168+
-- number the options 0-5 to match the item_quality enum
169+
return { { 'None', key='STRING_A048' },
170+
{ '-Well-crafted-', key='STRING_A049' },
171+
{ '+Finely-crafted+', key='STRING_A050' },
172+
{ '*Superior*', key='STRING_A051' },
173+
{ string.char(240) .. 'Exceptional' .. string.char(240), key='STRING_A052' },
174+
{ string.char(15) .. 'Masterwork' .. string.char(15), key='STRING_A053' },
174175
}
175176
end
176177

0 commit comments

Comments
 (0)