diff --git a/images/items/bottleapplejuce.png b/images/items/bottleapplejuce.png new file mode 100644 index 0000000..1e9e9ba Binary files /dev/null and b/images/items/bottleapplejuce.png differ diff --git a/images/items/bottleapplevenegar.png b/images/items/bottleapplevenegar.png new file mode 100644 index 0000000..7c57b8f Binary files /dev/null and b/images/items/bottleapplevenegar.png differ diff --git a/images/items/bottleapplewine.png b/images/items/bottleapplewine.png new file mode 100644 index 0000000..3503d6d Binary files /dev/null and b/images/items/bottleapplewine.png differ diff --git a/images/items/bottleempty.png b/images/items/bottleempty.png new file mode 100644 index 0000000..ca8fe91 Binary files /dev/null and b/images/items/bottleempty.png differ diff --git a/images/tiles/glassblower10.png b/images/tiles/glassblower10.png new file mode 100644 index 0000000..a25b438 Binary files /dev/null and b/images/tiles/glassblower10.png differ diff --git a/images/tiles/jucer10.png b/images/tiles/jucer10.png new file mode 100644 index 0000000..c89c674 Binary files /dev/null and b/images/tiles/jucer10.png differ diff --git a/js/items.json b/js/items.json index ca8114d..06b97d1 100644 --- a/js/items.json +++ b/js/items.json @@ -171,6 +171,30 @@ "id": 42, "name": "glass", "value": 100 + }, { + "id": 43, + "name": "fertilizer", + "value": 100 + }, { + "id": 44, + "name": "apple", + "value": 100 + }, { + "id": 45, + "name": "bottleempty", + "value": 100 + }, { + "id": 46, + "name": "bottleapplejuce", + "value": 100 + }, { + "id": 47, + "name": "bottleapplewine", + "value": 100 + }, { + "id": 48, + "name": "bottleapplevenegar", + "value": 100 }], "minerals": { "nameFromId": ["bauxite", diff --git a/js/tiles.js b/js/tiles.js index eb24bde..124fbff 100644 --- a/js/tiles.js +++ b/js/tiles.js @@ -1031,7 +1031,7 @@ class TeleporterOutput extends Tile { "count": 50 }] this.texture = { - "0": ["teleporterout01","teleporterout02","teleporterout03","teleporterout04","teleporterout05","teleporterout06","teleporterout07","teleporterout08","teleporterout09"], + "0": ["teleporterout01", "teleporterout02", "teleporterout03", "teleporterout04", "teleporterout05", "teleporterout06", "teleporterout07", "teleporterout08", "teleporterout09"], "1": [] } this.options = [{ @@ -1243,6 +1243,53 @@ class GlasMelt extends Tile { } } +class Glassblower extends Tile { + constructor(x, y, factory) { + super(x, y, factory) + this.maxwork = 48 * 30 + this.currentwork = 0 + this.name = "glassblower" + this.i = 25 + this.cost = [{ + "id": 0, + "count": 750 + }, + { + "id": 1, + "count": 50 + } + ] + this.texture = { + "0": [], + "1": ["glassblower10"] + } + this.loadImages() + } + + work() { + //Items für ein Pank + if (this.input.countOf(42) >= 2) { + if (this.currentwork == this.maxwork) { + this.input.take(42, 2, this.factory) + var item = new Item(45, this.x * 48, this.y * 48) + this.factory.items.push(item) + item.setDFromDirection(this.direction) + this.currentwork = 0 + } else { + this.currentwork++ + } + } else { + this.currentwork = 0 + } + } + getImage(fulltime, layer) { + fulltime = Math.round(fulltime / 6) + if (this.images[layer].length == 0) + return "0" + return this.images[layer][(fulltime % this.images[layer].length)] + } +} + class FertilizerMixer extends Tile { constructor(x, y, factory) { super(x, y, factory)