Skip to content

Commit

Permalink
Merge pull request #1246 from myk002/myk_hfname
Browse files Browse the repository at this point in the history
[makeown] set histfig name as well as unit name
  • Loading branch information
myk002 authored Jul 31, 2024
2 parents c9523f7 + 383cef6 commit 9b2a9f4
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
1 change: 1 addition & 0 deletions changelog.txt
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ Template for new versions:
- `prioritize`: fix incorrect loading of persisted data on some OS types
- `list-waves`: no longer gets confused by units that leave the map and then return (e.g. squads who go out on raids)
- `fix/dead-units`: fix error when removing dead units from burrows and the unit with the greatest ID was dead
- `makeown`: ensure names given to adopted units (or units created with `gui/sandbox`) are respected later in legends mode
- `gui/autodump`: prevent dumping into walls or invalid map area, as well as selecting in unallocated blocks
- `gui/autodump`: set proper projectile flags to prevent items from being destroyed

Expand Down
4 changes: 4 additions & 0 deletions makeown.lua
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,10 @@ function name_unit(unit)
unit.name.parts_of_speech.RearCompound = df.part_of_speech.Verb3rdPerson
unit.name.type = df.language_name_type.Figure
unit.name.has_name = true

local hf = df.historical_figure.find(unit.hist_figure_id)
if not hf then return end
hf.name:assign(unit.name)
end

local function fix_clothing_ownership(unit)
Expand Down

0 comments on commit 9b2a9f4

Please sign in to comment.