prevent script errors when exiting world screen

when the artifact list is showing at the time of screen exit
develop
Myk Taylor 2023-12-10 03:22:13 -08:00
parent 7534d326e0
commit 23ae45ac01
No known key found for this signature in database
1 changed files with 1 additions and 0 deletions

@ -44,6 +44,7 @@ end
local function cleanup_artifact_vectors(data) local function cleanup_artifact_vectors(data)
local vs_world = dfhack.gui.getDFViewscreen(true) local vs_world = dfhack.gui.getDFViewscreen(true)
if not df.viewscreen_worldst:is_instance(vs_world) then return end
vs_world.artifact:assign(data.saved_original) vs_world.artifact:assign(data.saved_original)
vs_world.artifact:resize(data.saved_original_size) vs_world.artifact:resize(data.saved_original_size)
vs_world.artifact_arl:assign(data.saved_flags) vs_world.artifact_arl:assign(data.saved_flags)