mirror of
https://github.com/Azgaar/Fantasy-Map-Generator.git
synced 2025-12-17 17:51:24 +01:00
markers data rework - master data object
This commit is contained in:
parent
c8b7e9ccee
commit
3b47efd9a4
3 changed files with 40 additions and 52 deletions
|
|
@ -707,7 +707,7 @@ class Battle {
|
|||
const result = `The ${this.getTypeName(this.type)} ended in ${status}`;
|
||||
const legend = `${this.name} took place in ${options.year} ${options.eraShort}. It was fought between ${getSide(this.attackers.regiments, 1)} and ${getSide(this.defenders.regiments, 0)}. ${result}.
|
||||
\r\nAttackers losses: ${getLosses(this.attackers.casualties)}%, defenders losses: ${getLosses(this.defenders.casualties)}%`;
|
||||
const id = getNextId("markerElement");
|
||||
const id = getNextId("marker");
|
||||
notes.push({id, name: this.name, legend});
|
||||
|
||||
tip(`${this.name} is over. ${result}`, true, "success", 4000);
|
||||
|
|
|
|||
|
|
@ -690,9 +690,9 @@ function toggleAddMarker() {
|
|||
|
||||
function addMarkerOnClick() {
|
||||
const point = d3.mouse(this);
|
||||
const x = rn(point[0], 2),
|
||||
y = rn(point[1], 2);
|
||||
const id = getNextId("markerElement");
|
||||
const x = rn(point[0], 2);
|
||||
const y = rn(point[1], 2);
|
||||
const id = getNextId("marker");
|
||||
|
||||
const selected = markerSelectGroup.value;
|
||||
const valid =
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue