Skip to content

Commit 7a831ff

Browse files
authored
Merge pull request #1346 from NicksWorld/fix/legendsracefilter
Fix usage of stale state in legends racefilter
2 parents 0fa2f11 + b6372bf commit 7a831ff

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

changelog.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@ Template for new versions:
4545
- `geld`, `ungeld`: save-and-reload no longer loses changes done by `geld` and `ungeld` for units who are historical figures
4646
- `rejuvenate`: fix error when specifying ``--age`` parameter
4747
- `gui/notify`: don't classify (peacefully) visiting night creatures as hostile
48+
- `exportlegends`: fix race filter not refreshing on world load, leading to incorrect results
4849

4950
## Misc Improvements
5051
- `idle-crafting`: also support making shell crafts for workshops with linked input stockpiles

exportlegends.lua

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1038,6 +1038,11 @@ dfhack.onStateChange[GLOBAL_KEY] = function(sc)
10381038
if sc == SC_VIEWSCREEN_CHANGED and df.viewscreen_choose_game_typest:is_instance(dfhack.gui.getDFViewscreen(true)) then
10391039
asyncexport.reset_state()
10401040
end
1041+
1042+
-- Reset state when a world or map is loaded to ensure data remains current
1043+
if sc == SC_WORLD_LOADED then
1044+
racefilter.reset_state()
1045+
end
10411046
end
10421047

10431048
if dfhack_flags.module then

0 commit comments

Comments
 (0)