fix storage bug
This commit is contained in:
parent
5c5300d6ba
commit
7b37afd7d6
2 changed files with 4 additions and 2 deletions
1
bugs.md
1
bugs.md
|
@ -12,3 +12,4 @@
|
|||
## fixed bugs
|
||||
|
||||
* the floor tile uses the wrong texture
|
||||
* the building's cores have the correct amount of storage
|
||||
|
|
|
@ -8,6 +8,7 @@ function wallGen(target, team) {
|
|||
if (storage < target) {
|
||||
tile.setBlock(wall["factory-wall-storage"], team);
|
||||
storage += 25;
|
||||
print("added more storage, for a total of " + storage + " out of " + target);
|
||||
} else {
|
||||
tile.setBlock(wall["factory-wall"], team);
|
||||
}
|
||||
|
@ -23,8 +24,8 @@ function create(size, storage, team) {
|
|||
|
||||
const tile = world.tile(x, y);
|
||||
// two block thick margin
|
||||
if (x < 2 || x >= size - 2) wall(tile);
|
||||
if (y < 2 || y >= size - 2) wall(tile);
|
||||
if (x < 2 || x >= size - 2 ||
|
||||
y < 2 || y >= size - 2) wall(tile);
|
||||
});
|
||||
|
||||
world.tiles.each((x, y) => {
|
||||
|
|
Loading…
Reference in a new issue