mirror of
https://github.com/Azgaar/Fantasy-Map-Generator.git
synced 2025-12-17 01:41:22 +01:00
markers - generate campaigns if missing
This commit is contained in:
parent
f7fc3830a0
commit
7f33c26729
2 changed files with 68 additions and 16 deletions
|
|
@ -478,7 +478,9 @@ window.Markers = (function () {
|
|||
while (quantity && battlefields.length) {
|
||||
const [cell] = extractAnyElement(battlefields);
|
||||
const id = addMarker({cell, icon, type, dy: 52});
|
||||
const campaign = ra(states[cells.state[cell]].campaigns);
|
||||
const state = states[cells.state[cell]];
|
||||
if (!state.campaigns) state.campaigns = BurgsAndStates.generateCampaign(state);
|
||||
const campaign = ra(state.campaigns);
|
||||
const date = generateDate(campaign.start, campaign.end);
|
||||
const name = Names.getCulture(cells.culture[cell]) + " Battlefield";
|
||||
const legend = `A historical battle of the ${campaign.name}. \r\nDate: ${date} ${options.era}`;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue