Some functions to enable creation of a online in-game level editor
Closes #59
Closes #60
Adds:
level.links
[x] for(let l of level.links) (iterable)
[x] level.links.add("dest.nw", x, y, width, heigh, "newX", "newY")
[x] level.links.remove(index)
let level = findlevel('onlinestartlocal.nw');
let links = level.links;
links.add('dest' + i + '.nw', 0, 0, 2, 1, "playerx", "playery");
let i = 0;
for (let l of links) {
sendtorc(i + ' link ' + l.newlevel);
i++;
}
links.remove(0);
level.signs
[x] for(let s of level.signs) (iterable)
[x] level.signs.add(x, y, "text")
[x] level.signs.remove(index)
let level = findlevel('onlinestartlocal.nw');
let signs = level.signs;
signs.add(1, 2, "asd" + i);
let i = 0;
for (let s of signs) {
sendtorc(i + ' sign ' + s.text);
i++;
}
signs.remove(0);
level.chests
[x] for(let c of level.chests) (iterable)
[x] level.chests.add(x, y, itemType, signId)
[x] level.chests.remove(index)
let level = findlevel('onlinestartlocal.nw');
let chests = level.chests;
chests.add(1, 2, 11, 0);
let i = 0;
for (let c of chests) {
sendtorc(i + ' chest ' + c.x + ' ' + c.y + ' type: ' + c.itemtype + ' ' + c.signid);
i++;
}
chests.remove(0);
level.npcs- [ ] level.addnpc -> level.npcs.add
Fixes:
[x] Level saving was missing save of signs, links, chests, baddies etc
Some functions to enable creation of a online in-game level editor
Closes #59 Closes #60
Adds:
level.links
level.signs
level.chests
level.npcs
- [ ] level.addnpc -> level.npcs.addFixes:
Todo: