mirror of
https://github.com/Azgaar/Fantasy-Map-Generator.git
synced 2025-12-17 09:41:24 +01:00
markers - add locked to already occupied
This commit is contained in:
parent
7f33c26729
commit
648c0ac0c9
1 changed files with 5 additions and 3 deletions
|
|
@ -46,9 +46,11 @@ window.Markers = (function () {
|
|||
};
|
||||
|
||||
const regenerate = () => {
|
||||
pack.markers = pack.markers.filter(({i, lock}) => {
|
||||
if (lock) return true;
|
||||
|
||||
pack.markers = pack.markers.filter(({i, lock, cell}) => {
|
||||
if (lock) {
|
||||
occupied[cell] = true;
|
||||
return true;
|
||||
}
|
||||
const id = `marker${i}`;
|
||||
document.getElementById(id)?.remove();
|
||||
const index = notes.findIndex(note => note.id === id);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue