Added Bottles

This commit is contained in:
MasterGordon 2018-06-09 20:42:01 +02:00
parent 63ad5a3d20
commit 6ecc53a2b5
8 changed files with 72 additions and 1 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 318 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 319 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 319 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 336 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 348 B

BIN
images/tiles/jucer10.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 577 B

View File

@ -171,6 +171,30 @@
"id": 42, "id": 42,
"name": "glass", "name": "glass",
"value": 100 "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": { "minerals": {
"nameFromId": ["bauxite", "nameFromId": ["bauxite",

View File

@ -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 { class FertilizerMixer extends Tile {
constructor(x, y, factory) { constructor(x, y, factory) {
super(x, y, factory) super(x, y, factory)