From 9b00c08c6b117fa44a01d82153ed221e4de6d0c7 Mon Sep 17 00:00:00 2001 From: Myk Taylor Date: Mon, 31 Mar 2025 18:31:30 -0700 Subject: [PATCH] adapt to structure changes --- docs/changelog.txt | 1 + plugins/lua/sort/diplomacy.lua | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/docs/changelog.txt b/docs/changelog.txt index ee2551a94e..b6ba2ba2f5 100644 --- a/docs/changelog.txt +++ b/docs/changelog.txt @@ -56,6 +56,7 @@ Template for new versions: ## New Features ## Fixes +- Fix processing error in the overlay that displays unit preferences in the baron selection list ## Misc Improvements diff --git a/plugins/lua/sort/diplomacy.lua b/plugins/lua/sort/diplomacy.lua index 3e78593862..505e02b743 100644 --- a/plugins/lua/sort/diplomacy.lua +++ b/plugins/lua/sort/diplomacy.lua @@ -64,7 +64,7 @@ local function get_preferences(unit) if not unit then return {} end local preferences = {} for _, pref in ipairs(unit.status.current_soul.preferences) do - if pref.type == df.unitpref_type.LikeItem and pref.active then + if pref.type == df.unitpref_type.LikeItem and pref.flags.visible then table.insert(preferences, make_item_description(pref.item_type, pref.item_subtype)) end end