Skip to content

Commit

Permalink
Merge pull request #4388 from myk002/myk_buildingplan_available
Browse files Browse the repository at this point in the history
[buildingplan] sort by quantity by default
  • Loading branch information
myk002 authored Mar 20, 2024
2 parents 3eda01c + ff03ecb commit 9e4849a
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
3 changes: 2 additions & 1 deletion docs/changelog.txt
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,8 @@ Template for new versions:
- `dwarfvet`: automatically unassign animals from pastures when they need treatment so they can make their way to the hospital. reassign them to their original pasture when treatment is complete.
- `dwarfvet`: ignore animals assigned to cages or restraints
- Many tools that previously only worked for citizens or only for dwarves now work for all citizens and residents, e.g. `fastdwarf`, `rejuvenate`, etc.
- `buildingplan`: persist hiding of unavailable materials between filterselection invocations
- `buildingplan`: remember player preference for whether unavailable materials should be hidden in the filter selection dialog
- `buildingplan`: sort by available quantity by default int he filter selection dialog
- Dreamfort: update embark profile recommendations and example embark profile

## Documentation
Expand Down
8 changes: 4 additions & 4 deletions plugins/lua/buildingplan/filterselection.lua
Original file line number Diff line number Diff line change
Expand Up @@ -81,8 +81,8 @@ function QualityAndMaterialsPage:init()
label='Sort by:',
key='CUSTOM_SHIFT_R',
options={
{label='available', value=mat_sort_by_quantity},
{label='name', value=mat_sort_by_name},
{label='available', value=mat_sort_by_quantity}
},
on_change=function() self.dirty = true end,
},
Expand All @@ -91,9 +91,9 @@ function QualityAndMaterialsPage:init()
frame={l=0, t=4, w=24},
label='Hide unavailable:',
key='CUSTOM_SHIFT_H',
initial_option=hide_unavailabe,
on_change=function(new,old)
hide_unavailabe = new
initial_option=hide_unavailable,
on_change=function(val)
hide_unavailable = val
self.dirty = true
end,
},
Expand Down

0 comments on commit 9e4849a

Please sign in to comment.