Skip to content

Commit 706e914

Browse files
authored
Merge pull request #1616 from Alistair-Afton/create-item-quality-hotkeys
gui/create-item: add 0-5 hotkeys to the quality selection prompt
2 parents 23598c4 + 5af2008 commit 706e914

3 files changed

Lines changed: 12 additions & 8 deletions

File tree

‎changelog.txt‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,9 @@ Template for new versions:
3434
- `devel/datamine`: watch live values for changes and diff structure snapshots to aid script development and reverse engineering
3535

3636
## New Features
37-
- `gui/unit-info-viewer`: the unit character sheet now shows the viewed unit's current and long-term mood, color-coded by stress level
37+
- `gui/create-item`: quality selection prompt now has 0-5 hotkeys matching the quality levels
3838
- `gui/mod-manager`: warn when loading a preset that doesn't include vanilla mods that were added to the game after the preset was saved
39+
- `gui/unit-info-viewer`: the unit character sheet now shows the viewed unit's current and long-term mood, color-coded by stress level
3940
- `idle-crafting`: support cloth, silk, and yarn crafts
4041

4142
## Fixes

‎docs/gui/create-item.rst‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,9 @@ gui/create-item
77

88
This tool provides a graphical interface for creating items of your choice. It
99
walks you through the creation process with a series of prompts, asking you
10-
for the type of item, the material, the quality, and the quantity.
10+
for the type of item, the material, the quality, and the quantity. At the
11+
quality prompt, you can also press ``0``-``5`` to select a quality level
12+
directly.
1113

1214
If a unit is selected, that unit will be designated the creator of the summoned
1315
items. Any item with a "sized for" property, like armor, will be created for

‎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)