Skip to content

Commit

Permalink
Merge pull request #1346 from NicksWorld/fix/legendsracefilter
Browse files Browse the repository at this point in the history
Fix usage of stale state in legends racefilter
  • Loading branch information
myk002 authored Dec 7, 2024
2 parents 0fa2f11 + b6372bf commit 7a831ff
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
1 change: 1 addition & 0 deletions changelog.txt
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ Template for new versions:
- `geld`, `ungeld`: save-and-reload no longer loses changes done by `geld` and `ungeld` for units who are historical figures
- `rejuvenate`: fix error when specifying ``--age`` parameter
- `gui/notify`: don't classify (peacefully) visiting night creatures as hostile
- `exportlegends`: fix race filter not refreshing on world load, leading to incorrect results

## Misc Improvements
- `idle-crafting`: also support making shell crafts for workshops with linked input stockpiles
Expand Down
5 changes: 5 additions & 0 deletions exportlegends.lua
Original file line number Diff line number Diff line change
Expand Up @@ -1038,6 +1038,11 @@ dfhack.onStateChange[GLOBAL_KEY] = function(sc)
if sc == SC_VIEWSCREEN_CHANGED and df.viewscreen_choose_game_typest:is_instance(dfhack.gui.getDFViewscreen(true)) then
asyncexport.reset_state()
end

-- Reset state when a world or map is loaded to ensure data remains current
if sc == SC_WORLD_LOADED then
racefilter.reset_state()
end
end

if dfhack_flags.module then
Expand Down

0 comments on commit 7a831ff

Please sign in to comment.