mirror of
https://github.com/Azgaar/Fantasy-Map-Generator.git
synced 2026-03-25 00:27:24 +01:00
Update src/modules/military-generator.ts
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
This commit is contained in:
parent
1608a21264
commit
1fbf78f09d
1 changed files with 2 additions and 2 deletions
|
|
@ -622,9 +622,9 @@ class MilitaryModule {
|
|||
)
|
||||
return "👑"; // "Royal" regiment based in capital
|
||||
const mainUnit = Object.entries(r.u).sort((a, b) => b[1] - a[1])[0][0]; // unit with more troops in regiment
|
||||
const unit = options.military.find(
|
||||
(u: { name: string }) => u.name === mainUnit,
|
||||
(u: { name: string; icon: string }) => u.name === mainUnit,
|
||||
);
|
||||
return unit ? unit.icon : "⚔️";
|
||||
return unit.icon;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue