mirror of
https://github.com/Azgaar/Fantasy-Map-Generator.git
synced 2025-12-23 20:41:23 +01:00
Add Markers.deleteMarker API.
This commit is contained in:
parent
7de5874800
commit
77bac478af
2 changed files with 8 additions and 3 deletions
|
|
@ -129,6 +129,12 @@ window.Markers = (function () {
|
|||
return marker;
|
||||
}
|
||||
|
||||
function deleteMarker(markerId) {
|
||||
const noteId = 'marker' + markerId;
|
||||
notes = notes.filter(note => note.id !== noteId);
|
||||
pack.markers = pack.markers.filter(m => m.i !== markerId);
|
||||
}
|
||||
|
||||
function listVolcanoes({cells}) {
|
||||
return cells.i.filter(i => !occupied[i] && cells.h[i] >= 70);
|
||||
}
|
||||
|
|
@ -796,5 +802,5 @@ window.Markers = (function () {
|
|||
notes.push({id, name, legend});
|
||||
}
|
||||
|
||||
return {add, generate, regenerate, getConfig, setConfig};
|
||||
return {add, generate, regenerate, getConfig, setConfig, deleteMarker};
|
||||
})();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue