Skip to content

Commit b5ecbe1

Browse files
authored
Merge pull request #1361 from myk002/myk_gmunit
[gui/gm-unit] also set prof of hf when changing profession
2 parents 3262591 + 0f7d46c commit b5ecbe1

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

internal/gm-unit/editor_profession.lua

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,10 @@ end
4444
function Editor_Prof:save_profession(_, choice)
4545
self.target_unit.profession = choice.profession
4646
self.target_unit.profession2 = choice.profession
47+
local hf = df.historical_figure.find(self.target_unit.hist_figure_id)
48+
if hf then
49+
hf.profession = choice.profession
50+
end
4751
self.target_unit.flags4.any_texture_must_be_refreshed = true
4852
end
4953

0 commit comments

Comments
 (0)