diff --git a/images/items/woodshovel.png b/images/items/woodshovel.png
new file mode 100644
index 0000000..278e289
Binary files /dev/null and b/images/items/woodshovel.png differ
diff --git a/images/tiles/advancedcharcoalmeiler10.png b/images/tiles/advancedcharcoalmeiler10.png
new file mode 100644
index 0000000..620c8b2
Binary files /dev/null and b/images/tiles/advancedcharcoalmeiler10.png differ
diff --git a/images/tiles/advancedcharcoalmeiler11.png b/images/tiles/advancedcharcoalmeiler11.png
new file mode 100644
index 0000000..b0e2eb0
Binary files /dev/null and b/images/tiles/advancedcharcoalmeiler11.png differ
diff --git a/images/tiles/advancedcharcoalmeiler110.png b/images/tiles/advancedcharcoalmeiler110.png
new file mode 100644
index 0000000..56a0871
Binary files /dev/null and b/images/tiles/advancedcharcoalmeiler110.png differ
diff --git a/images/tiles/advancedcharcoalmeiler111.png b/images/tiles/advancedcharcoalmeiler111.png
new file mode 100644
index 0000000..024eed3
Binary files /dev/null and b/images/tiles/advancedcharcoalmeiler111.png differ
diff --git a/images/tiles/advancedcharcoalmeiler112.png b/images/tiles/advancedcharcoalmeiler112.png
new file mode 100644
index 0000000..1c7bd77
Binary files /dev/null and b/images/tiles/advancedcharcoalmeiler112.png differ
diff --git a/images/tiles/advancedcharcoalmeiler113.png b/images/tiles/advancedcharcoalmeiler113.png
new file mode 100644
index 0000000..e56eb3b
Binary files /dev/null and b/images/tiles/advancedcharcoalmeiler113.png differ
diff --git a/images/tiles/advancedcharcoalmeiler114.png b/images/tiles/advancedcharcoalmeiler114.png
new file mode 100644
index 0000000..ee70b36
Binary files /dev/null and b/images/tiles/advancedcharcoalmeiler114.png differ
diff --git a/images/tiles/advancedcharcoalmeiler12.png b/images/tiles/advancedcharcoalmeiler12.png
new file mode 100644
index 0000000..14030e6
Binary files /dev/null and b/images/tiles/advancedcharcoalmeiler12.png differ
diff --git a/images/tiles/advancedcharcoalmeiler13.png b/images/tiles/advancedcharcoalmeiler13.png
new file mode 100644
index 0000000..3348ac8
Binary files /dev/null and b/images/tiles/advancedcharcoalmeiler13.png differ
diff --git a/images/tiles/advancedcharcoalmeiler14.png b/images/tiles/advancedcharcoalmeiler14.png
new file mode 100644
index 0000000..70b3ce2
Binary files /dev/null and b/images/tiles/advancedcharcoalmeiler14.png differ
diff --git a/images/tiles/advancedcharcoalmeiler15.png b/images/tiles/advancedcharcoalmeiler15.png
new file mode 100644
index 0000000..148a9ff
Binary files /dev/null and b/images/tiles/advancedcharcoalmeiler15.png differ
diff --git a/images/tiles/advancedcharcoalmeiler16.png b/images/tiles/advancedcharcoalmeiler16.png
new file mode 100644
index 0000000..2b5528d
Binary files /dev/null and b/images/tiles/advancedcharcoalmeiler16.png differ
diff --git a/images/tiles/advancedcharcoalmeiler17.png b/images/tiles/advancedcharcoalmeiler17.png
new file mode 100644
index 0000000..1caf75f
Binary files /dev/null and b/images/tiles/advancedcharcoalmeiler17.png differ
diff --git a/images/tiles/advancedcharcoalmeiler18.png b/images/tiles/advancedcharcoalmeiler18.png
new file mode 100644
index 0000000..b6810b2
Binary files /dev/null and b/images/tiles/advancedcharcoalmeiler18.png differ
diff --git a/images/tiles/advancedcharcoalmeiler19.png b/images/tiles/advancedcharcoalmeiler19.png
new file mode 100644
index 0000000..72f8066
Binary files /dev/null and b/images/tiles/advancedcharcoalmeiler19.png differ
diff --git a/images/tiles/briquettepress10.png b/images/tiles/briquettepress10.png
new file mode 100644
index 0000000..b8065a5
Binary files /dev/null and b/images/tiles/briquettepress10.png differ
diff --git a/images/tiles/briquettepress11.png b/images/tiles/briquettepress11.png
new file mode 100644
index 0000000..7cbea2d
Binary files /dev/null and b/images/tiles/briquettepress11.png differ
diff --git a/images/tiles/briquettepress12.png b/images/tiles/briquettepress12.png
new file mode 100644
index 0000000..332b779
Binary files /dev/null and b/images/tiles/briquettepress12.png differ
diff --git a/images/tiles/briquettepress13.png b/images/tiles/briquettepress13.png
new file mode 100644
index 0000000..4b9397a
Binary files /dev/null and b/images/tiles/briquettepress13.png differ
diff --git a/images/tiles/briquettepress14.png b/images/tiles/briquettepress14.png
new file mode 100644
index 0000000..296668b
Binary files /dev/null and b/images/tiles/briquettepress14.png differ
diff --git a/images/tiles/briquettepress15.png b/images/tiles/briquettepress15.png
new file mode 100644
index 0000000..c3b222b
Binary files /dev/null and b/images/tiles/briquettepress15.png differ
diff --git a/images/tiles/briquettepress16.png b/images/tiles/briquettepress16.png
new file mode 100644
index 0000000..0ccab26
Binary files /dev/null and b/images/tiles/briquettepress16.png differ
diff --git a/images/tiles/briquettepress17.png b/images/tiles/briquettepress17.png
new file mode 100644
index 0000000..2a01ae9
Binary files /dev/null and b/images/tiles/briquettepress17.png differ
diff --git a/images/tiles/briquettepress18.png b/images/tiles/briquettepress18.png
new file mode 100644
index 0000000..eab9dfa
Binary files /dev/null and b/images/tiles/briquettepress18.png differ
diff --git a/images/tiles/cokery10.png b/images/tiles/cokery10.png
new file mode 100644
index 0000000..45b19ee
Binary files /dev/null and b/images/tiles/cokery10.png differ
diff --git a/images/tiles/cokery11.png b/images/tiles/cokery11.png
new file mode 100644
index 0000000..3832d36
Binary files /dev/null and b/images/tiles/cokery11.png differ
diff --git a/images/tiles/cokery12.png b/images/tiles/cokery12.png
new file mode 100644
index 0000000..c24d2af
Binary files /dev/null and b/images/tiles/cokery12.png differ
diff --git a/images/tiles/cokery13.png b/images/tiles/cokery13.png
new file mode 100644
index 0000000..1d4fa70
Binary files /dev/null and b/images/tiles/cokery13.png differ
diff --git a/images/tiles/collector10.png b/images/tiles/collector10.png
index fd85f69..0cfc8f6 100644
Binary files a/images/tiles/collector10.png and b/images/tiles/collector10.png differ
diff --git a/images/tiles/collector11.png b/images/tiles/collector11.png
new file mode 100644
index 0000000..b530c21
Binary files /dev/null and b/images/tiles/collector11.png differ
diff --git a/images/tiles/collector12.png b/images/tiles/collector12.png
new file mode 100644
index 0000000..67cca34
Binary files /dev/null and b/images/tiles/collector12.png differ
diff --git a/images/tiles/collector13.png b/images/tiles/collector13.png
new file mode 100644
index 0000000..f9ff3c6
Binary files /dev/null and b/images/tiles/collector13.png differ
diff --git a/index.html b/index.html
index 34af667..0f9f7ed 100644
--- a/index.html
+++ b/index.html
@@ -38,6 +38,7 @@
$(document).ready(function() {
style();
$("#register").hide()
+ style()
})
function style() {
diff --git a/js/game.js b/js/game.js
index 1c99961..6b18b24 100644
--- a/js/game.js
+++ b/js/game.js
@@ -494,10 +494,13 @@ function drawInfoBar() {
}
if (selectedTile != 0) {
$('#infoDesc h1').text(lang.tiles[selectedTile.name].name)
- $('#infoDesc p').text(lang.tiles[selectedTile.name].description)
+ if (selectedTile.maxwork != 0)
+ $('#infoDesc p').text((selectedTile.maxwork / 48) + " Sec | " + lang.tiles[selectedTile.name].description)
+ else
+ $('#infoDesc p').text(lang.tiles[selectedTile.name].description)
} else {
$('#infoDesc h1').text("Factory " + currentFactory)
- $('#infoDesc p').html("
"+lang.mineralslable + "
- " + lang.minerals[factorys[currentFactory].ores[0]] + "
- " + lang.minerals[factorys[currentFactory].ores[1]] + "
- " + lang.minerals[factorys[currentFactory].ores[2]] + "
- " + lang.minerals[factorys[currentFactory].ores[3]])
+ $('#infoDesc p').html("
" + lang.mineralslable + "
- " + lang.minerals[factorys[currentFactory].ores[0]] + "
- " + lang.minerals[factorys[currentFactory].ores[1]] + "
- " + lang.minerals[factorys[currentFactory].ores[2]] + "
- " + lang.minerals[factorys[currentFactory].ores[3]])
}
if (selectedTile.maxwork != 0 && mode != "selectbuilding" && mode != "building") {
$('#infoDesc p').css("height", 154)
diff --git a/js/items.json b/js/items.json
index 6cd7d2a..c5ad09b 100644
--- a/js/items.json
+++ b/js/items.json
@@ -18,7 +18,7 @@
},{
"id": 4,
"name": "charcoal",
- "value": 14
+ "value": 15
},{
"id": 5,
"name": "sawdust",
@@ -46,10 +46,10 @@
},{
"id": 11,
"name": "koks",
- "value": 14
+ "value": 20
},{
"id": 12,
"name": "briquettes",
- "value": 14
+ "value": 16
}]
}
diff --git a/js/tiles.js b/js/tiles.js
index 519fd08..cc3b79a 100644
--- a/js/tiles.js
+++ b/js/tiles.js
@@ -133,12 +133,24 @@ class Weaver extends Tile {
if (this.input.countOf(2) >= requieredCount) {
if (this.currentwork == this.maxwork) {
this.currentwork = 0
+ this.input.take(2, requieredCount, this.factory)
var item = new Item(9, this.x * 48, this.y * 48)
this.factory.items.push(item)
item.setDFromDirection(this.direction)
} else {
this.currentwork++
}
+ } else if (this.input.countOf(9) >= 1 && this.input.countOf(7) >= 1) {
+ if (this.currentwork == this.maxwork) {
+ this.currentwork = 0
+ this.input.take(9, 1, this.factory)
+ this.input.take(7, 1, this.factory)
+ var item = new Item(10, this.x * 48, this.y * 48)
+ this.factory.items.push(item)
+ item.setDFromDirection(this.direction)
+ } else {
+ this.currentwork++
+ }
} else {
this.currentwork = 0
}
@@ -177,6 +189,8 @@ class Papermanufactory extends Tile {
var requieredCount = 5
if (this.input.countOf(9) >= 10 && this.input.countOf(5) >= 100) {
if (this.currentwork == this.maxwork) {
+ this.input.take(9, 10, this.factory)
+ this.input.take(5, 100, this.factory)
this.currentwork = 0
for (var i = 0; i < 10; i++) {
var item = new Item(7, this.x * 48, this.y * 48)
@@ -243,6 +257,184 @@ class Charcoalmeiler extends Tile {
}
}
+class AdvancedCharcoalmeiler extends Tile {
+ constructor(x, y, factory) {
+ super(x, y, factory)
+ this.maxwork = 96 * 10
+ this.currentwork = 0
+ this.name = "advancedcharcoalmeiler"
+ this.i = 12
+ this.dust = 0
+ this.cost = [{
+ "id": 0,
+ "count": 50000
+ },
+ {
+ "id": 3,
+ "count": 1000
+ },
+ {
+ "id": 10,
+ "count": 200
+ }
+ ]
+ this.texture = {
+ "0": [],
+ "1": ["advancedcharcoalmeiler10", "advancedcharcoalmeiler10", "advancedcharcoalmeiler10", "advancedcharcoalmeiler11", "advancedcharcoalmeiler11", "advancedcharcoalmeiler11", "advancedcharcoalmeiler12", "advancedcharcoalmeiler12", "advancedcharcoalmeiler12", "advancedcharcoalmeiler13", "advancedcharcoalmeiler13", "advancedcharcoalmeiler13", "advancedcharcoalmeiler14", "advancedcharcoalmeiler14", "advancedcharcoalmeiler14", "advancedcharcoalmeiler15", "advancedcharcoalmeiler15", "advancedcharcoalmeiler15", "advancedcharcoalmeiler16", "advancedcharcoalmeiler16", "advancedcharcoalmeiler16", "advancedcharcoalmeiler17", "advancedcharcoalmeiler17", "advancedcharcoalmeiler17", "advancedcharcoalmeiler18", "advancedcharcoalmeiler18", "advancedcharcoalmeiler18", "advancedcharcoalmeiler19", "advancedcharcoalmeiler19", "advancedcharcoalmeiler19", "advancedcharcoalmeiler110", "advancedcharcoalmeiler111", "advancedcharcoalmeiler110", "advancedcharcoalmeiler111", "advancedcharcoalmeiler110", "advancedcharcoalmeiler111", "advancedcharcoalmeiler110", "advancedcharcoalmeiler111", "advancedcharcoalmeiler110", "advancedcharcoalmeiler111", "advancedcharcoalmeiler110", "advancedcharcoalmeiler111", "advancedcharcoalmeiler110", "advancedcharcoalmeiler111", "advancedcharcoalmeiler112", "advancedcharcoalmeiler112", "advancedcharcoalmeiler112", "advancedcharcoalmeiler112", "advancedcharcoalmeiler112", "advancedcharcoalmeiler113", "advancedcharcoalmeiler113", "advancedcharcoalmeiler113", "advancedcharcoalmeiler113", "advancedcharcoalmeiler113", "advancedcharcoalmeiler114", "advancedcharcoalmeiler114", "advancedcharcoalmeiler114", "advancedcharcoalmeiler114", "advancedcharcoalmeiler114"]
+ }
+ this.loadImages()
+ }
+
+ getImage(fulltime, layer) {
+ fulltime = Math.round(fulltime / 4)
+ if (this.images[layer].length == 0)
+ return "0"
+ return this.images[layer][(fulltime % this.images[layer].length)]
+ }
+
+ work() {
+ //Items für ein Pank
+ var requieredCount = 10
+ if (this.input.countOf(2) >= requieredCount) {
+ if (this.currentwork == this.maxwork) {
+ this.input.take(2, requieredCount, this.factory)
+ for (var i = 0; i < 5; i++) {
+ var item = new Item(4, this.x * 48, this.y * 48)
+ this.factory.items.push(item)
+ item.setDFromDirection(this.direction)
+ }
+ this.dust++
+ if (this.dust == 4) {
+ var item = new Item(6, this.x * 48, this.y * 48)
+ this.factory.items.push(item)
+ item.setDFromDirection(this.direction)
+ this.dust = 0
+ }
+ this.currentwork = 0
+ } else {
+ this.currentwork++
+ }
+ } else {
+ this.currentwork = 0
+ }
+ }
+}
+
+class Briquettepress extends Tile {
+ constructor(x, y, factory) {
+ super(x, y, factory)
+ this.maxwork = 96
+ this.currentwork = 0
+ this.name = "briquettepress"
+ this.i = 13
+ this.dust = 0
+ this.cost = [{
+ "id": 0,
+ "count": 100000
+ }]
+ this.texture = {
+ "0": [],
+ "1": ["briquettepress10", "briquettepress11", "briquettepress12", "briquettepress13", "briquettepress14", "briquettepress15", "briquettepress16", "briquettepress17", "briquettepress18", "briquettepress17", "briquettepress16", "briquettepress15", "briquettepress14", "briquettepress13", "briquettepress12", "briquettepress11", "briquettepress10", "briquettepress10", "briquettepress10"]
+ }
+ this.loadImages()
+ }
+
+ getImage(fulltime, layer) {
+ fulltime = Math.round(fulltime / 4)
+ if (this.images[layer].length == 0)
+ return "0"
+ return this.images[layer][(fulltime % this.images[layer].length)]
+ }
+
+ work() {
+ //Items für ein Pank
+ var requieredCount = 5
+ if (this.input.countOf(6) >= requieredCount) {
+ if (this.currentwork == this.maxwork) {
+ this.input.take(6, requieredCount, this.factory)
+ var item = new Item(12, 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
+ }
+ }
+}
+
+
+class Cokery extends Tile {
+ constructor(x, y, factory) {
+ super(x, y, factory)
+ this.maxwork = 96 * 10
+ this.currentwork = 0
+ this.name = "cokery"
+ this.i = 14
+ this.dust = 0
+ this.cost = [{
+ "id": 0,
+ "count": 60000
+ },
+ {
+ "id": 3,
+ "count": 1400
+ },
+ {
+ "id": 6,
+ "count": 20
+ }
+ ]
+ this.texture = {
+ "0": [],
+ "1": ["cokery10", "cokery11", "cokery12", "cokery13"]
+ }
+ this.loadImages()
+ }
+
+ 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)]
+ }
+
+ work() {
+ //Items für ein Pank
+ if (this.input.countOf(4) >= 15 && this.input.countOf(12) >= 2) {
+ if (this.currentwork == this.maxwork) {
+ this.input.take(12, 2, this.factory)
+ this.input.take(4, 15, this.factory)
+ for (var i = 0; i < 15; i++) {
+ var item = new Item(11, this.x * 48, this.y * 48)
+ this.factory.items.push(item)
+ item.setDFromDirection(this.direction)
+ }
+ this.currentwork = 0
+ } else {
+ this.currentwork++
+ }
+ } else if (this.input.countOf(4) >= 15 && this.input.countOf(11) >= 2) {
+ if (this.currentwork == this.maxwork) {
+ this.input.take(11, 2, this.factory)
+ this.input.take(4, 15, this.factory)
+ for (var i = 0; i < 15; i++) {
+ var item = new Item(11, 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
+ }
+ }
+}
+
class Quarry extends Tile {
constructor(x, y, factory) {
super(x, y, factory)
@@ -287,7 +479,7 @@ class Collector extends Tile {
}]
this.texture = {
"0": [],
- "1": ["collector10"]
+ "1": ["collector13", "collector10", "collector11", "collector12", "collector13", "collector13", "collector13"]
}
this.loadImages()
}
@@ -299,6 +491,13 @@ class Collector extends Tile {
this.factory.deleteItem(item)
}
}
+
+ 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 Spliter extends Tile {
@@ -512,3 +711,6 @@ tileClasses.push(FilterLeft)
tileClasses.push(FilterRight)
tileClasses.push(Weaver)
tileClasses.push(Papermanufactory)
+tileClasses.push(AdvancedCharcoalmeiler)
+tileClasses.push(Briquettepress)
+tileClasses.push(Cokery)
diff --git a/lang/en.json b/lang/en.json
index c2b6b4e..144571a 100644
--- a/lang/en.json
+++ b/lang/en.json
@@ -40,13 +40,25 @@
"name": "Charcoal Meiler",
"description": "Requieres 10 Planks to burn them down to 5 Charcoal."
},
+ "advancedcharcoalmeiler": {
+ "name": "Advanced Charcoal Meiler",
+ "description": "Requieres 10 Planks to burn them down to 5 Charcoal. Creates Charcoaldust every 4th time."
+ },
+ "briquettepress": {
+ "name": "Briquettepress",
+ "description": "Requieres 5 Charcoaldust to press them into Briquettes."
+ },
+ "cokery": {
+ "name": "Cokery",
+ "description": "Burns 15 Charcoal into 15 Coke. Requieres 2 Briquettes or 2 Coke."
+ },
"papermanufactory": {
"name": "Paper Manufactory",
"description": "Uses 10 Sive and 100 Sawdust to create 10 Rawpaper"
},
"weaver": {
"name": "Weaver",
- "description": "Makes a Siev out of 5 Planks."
+ "description": "Makes a Siev out of 5 Planks. Puts together Sievs and Paper/Rawpaper to make filter"
},
"filterleft": {
"name": "Item Filter (left)",
@@ -96,7 +108,7 @@
"tin",
"salt"
],
- "items": ["None", "Log", "Planks", "Stone", "Charcoal", "Sawdust", "Charcoal Dust", "Raw Paper", "Paper", "Siev", "Filter", "Koks", "Briquettes"],
+ "items": ["None", "Log", "Planks", "Stone", "Charcoal", "Sawdust", "Charcoal Dust", "Raw Paper", "Paper", "Siev", "Filter", "Coke", "Briquettes"],
"more": "Show Inventory / Sell Items",
"inventory": "Inventory",
"player": "Player",
diff --git a/php/playerdata.php b/php/playerdata.php
index 1e00bcf..1254238 100644
--- a/php/playerdata.php
+++ b/php/playerdata.php
@@ -15,6 +15,8 @@ if(isset($_SESSION["login"])){
while($row = $result->fetch_assoc()) {
echo $row["gamedata"];
}
+ }else{
+ echo '{}';
}
}
}else{