From 0f7d46c649f1b3f4f2553968812bad07ca405eb1 Mon Sep 17 00:00:00 2001 From: Myk Taylor Date: Mon, 30 Dec 2024 17:45:58 -0800 Subject: [PATCH] also set prof of hf when changing profession --- internal/gm-unit/editor_profession.lua | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/internal/gm-unit/editor_profession.lua b/internal/gm-unit/editor_profession.lua index fdf70a6a6..79f6ac928 100644 --- a/internal/gm-unit/editor_profession.lua +++ b/internal/gm-unit/editor_profession.lua @@ -44,6 +44,10 @@ end function Editor_Prof:save_profession(_, choice) self.target_unit.profession = choice.profession self.target_unit.profession2 = choice.profession + local hf = df.historical_figure.find(self.target_unit.hist_figure_id) + if hf then + hf.profession = choice.profession + end self.target_unit.flags4.any_texture_must_be_refreshed = true end