mirror of
https://github.com/Azgaar/Fantasy-Map-Generator.git
synced 2026-04-05 06:57:24 +02:00
fix: build + lint
This commit is contained in:
parent
3f282c74d0
commit
781d99ae10
2 changed files with 30 additions and 33 deletions
|
|
@ -15,7 +15,7 @@ declare global {
|
|||
var Military: MilitaryModule;
|
||||
}
|
||||
|
||||
interface MilitaryRegiment {
|
||||
export interface MilitaryRegiment {
|
||||
i: number;
|
||||
t: number; // total troops
|
||||
name: string;
|
||||
|
|
@ -32,6 +32,7 @@ interface MilitaryRegiment {
|
|||
icon?: string;
|
||||
children?: MilitaryRegiment[]; // merged regiments
|
||||
state: number;
|
||||
angle?: number;
|
||||
}
|
||||
|
||||
interface Platoon {
|
||||
|
|
@ -487,7 +488,7 @@ class MilitaryModule {
|
|||
for (let i = notes.length - 1; i >= 0; i--) {
|
||||
if (notes[i].id.startsWith("regiment")) notes.splice(i, 1);
|
||||
}
|
||||
|
||||
|
||||
// get regiments for each state
|
||||
valid.forEach((s) => {
|
||||
s.military = createRegiments(s.temp.platoons, s);
|
||||
|
|
@ -601,12 +602,12 @@ class MilitaryModule {
|
|||
const conflict = campaign ? ` during the ${campaign.name}` : "";
|
||||
const legend = `Regiment was formed in ${year} ${options.era}${conflict}. ${station}${troops}`;
|
||||
const id = `regiment${s.i}-${r.i}`;
|
||||
const existing = notes.find(n => n.id === id);
|
||||
const existing = notes.find((n) => n.id === id);
|
||||
if (existing) {
|
||||
existing.name = r.name;
|
||||
existing.legend = legend;
|
||||
} else {
|
||||
notes.push({id, name: r.name, legend});
|
||||
notes.push({ id, name: r.name, legend });
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue