diff --git a/images/fliesen - Kopie.png b/images/fliesen - Kopie.png
new file mode 100644
index 0000000..2201d4b
Binary files /dev/null and b/images/fliesen - Kopie.png differ
diff --git a/images/fliesen.png b/images/fliesen.png
index 2201d4b..da8663f 100644
Binary files a/images/fliesen.png and b/images/fliesen.png differ
diff --git a/images/items/bauxite.png b/images/items/bauxite.png
new file mode 100644
index 0000000..522089e
Binary files /dev/null and b/images/items/bauxite.png differ
diff --git a/images/items/chromeore.png b/images/items/chromeore.png
new file mode 100644
index 0000000..cfecb42
Binary files /dev/null and b/images/items/chromeore.png differ
diff --git a/images/items/cobaltore.png b/images/items/cobaltore.png
new file mode 100644
index 0000000..4edac4c
Binary files /dev/null and b/images/items/cobaltore.png differ
diff --git a/images/items/copperore.png b/images/items/copperore.png
new file mode 100644
index 0000000..6b15ad1
Binary files /dev/null and b/images/items/copperore.png differ
diff --git a/images/items/index.php b/images/items/index.php
new file mode 100644
index 0000000..235613c
--- /dev/null
+++ b/images/items/index.php
@@ -0,0 +1,10 @@
+isDot()) {
+ $file = $fileinfo->getFilename();
+ echo '
';
+ //echo '
');
+ }
+}
+?>
\ No newline at end of file
diff --git a/images/items/ironore.png b/images/items/ironore.png
new file mode 100644
index 0000000..bdc0e9e
Binary files /dev/null and b/images/items/ironore.png differ
diff --git a/images/items/leadore.png b/images/items/leadore.png
new file mode 100644
index 0000000..cfc8600
Binary files /dev/null and b/images/items/leadore.png differ
diff --git a/images/items/lithiumore.png b/images/items/lithiumore.png
new file mode 100644
index 0000000..fbfe7a3
Binary files /dev/null and b/images/items/lithiumore.png differ
diff --git a/images/items/magnesiumore.png b/images/items/magnesiumore.png
new file mode 100644
index 0000000..92aa13a
Binary files /dev/null and b/images/items/magnesiumore.png differ
diff --git a/images/items/manganeseore.png b/images/items/manganeseore.png
new file mode 100644
index 0000000..5005e16
Binary files /dev/null and b/images/items/manganeseore.png differ
diff --git a/images/items/molybdenumore.png b/images/items/molybdenumore.png
new file mode 100644
index 0000000..28475c6
Binary files /dev/null and b/images/items/molybdenumore.png differ
diff --git a/images/items/nickelore.png b/images/items/nickelore.png
new file mode 100644
index 0000000..5cfb259
Binary files /dev/null and b/images/items/nickelore.png differ
diff --git a/images/items/rawiron.png b/images/items/rawiron.png
new file mode 100644
index 0000000..d80df1a
Binary files /dev/null and b/images/items/rawiron.png differ
diff --git a/images/items/silverore.png b/images/items/silverore.png
new file mode 100644
index 0000000..3e60ea6
Binary files /dev/null and b/images/items/silverore.png differ
diff --git a/images/items/slag.png b/images/items/slag.png
new file mode 100644
index 0000000..74348eb
Binary files /dev/null and b/images/items/slag.png differ
diff --git a/images/items/steel.png b/images/items/steel.png
new file mode 100644
index 0000000..6565ce0
Binary files /dev/null and b/images/items/steel.png differ
diff --git a/images/items/tantalumore.png b/images/items/tantalumore.png
new file mode 100644
index 0000000..97af2ec
Binary files /dev/null and b/images/items/tantalumore.png differ
diff --git a/images/items/tinore.png b/images/items/tinore.png
new file mode 100644
index 0000000..e8d0595
Binary files /dev/null and b/images/items/tinore.png differ
diff --git a/images/items/titaniumore.png b/images/items/titaniumore.png
new file mode 100644
index 0000000..c6f15ae
Binary files /dev/null and b/images/items/titaniumore.png differ
diff --git a/images/items/tungstenore.png b/images/items/tungstenore.png
new file mode 100644
index 0000000..d982b16
Binary files /dev/null and b/images/items/tungstenore.png differ
diff --git a/images/items/uraniumore.png b/images/items/uraniumore.png
new file mode 100644
index 0000000..e0c7a68
Binary files /dev/null and b/images/items/uraniumore.png differ
diff --git a/images/items/vanadiumore.png b/images/items/vanadiumore.png
new file mode 100644
index 0000000..6bc77b9
Binary files /dev/null and b/images/items/vanadiumore.png differ
diff --git a/images/items/zincore.png b/images/items/zincore.png
new file mode 100644
index 0000000..75cdf54
Binary files /dev/null and b/images/items/zincore.png differ
diff --git a/images/tiles/blastfurnacelower10.png b/images/tiles/blastfurnacelower10.png
new file mode 100644
index 0000000..b6a32a8
Binary files /dev/null and b/images/tiles/blastfurnacelower10.png differ
diff --git a/images/tiles/blastfurnaceupper10.png b/images/tiles/blastfurnaceupper10.png
new file mode 100644
index 0000000..5b397bd
Binary files /dev/null and b/images/tiles/blastfurnaceupper10.png differ
diff --git a/images/tiles/blastfurnaceupper11.png b/images/tiles/blastfurnaceupper11.png
new file mode 100644
index 0000000..a7ef94c
Binary files /dev/null and b/images/tiles/blastfurnaceupper11.png differ
diff --git a/images/tiles/blastfurnaceupper12.png b/images/tiles/blastfurnaceupper12.png
new file mode 100644
index 0000000..94a2697
Binary files /dev/null and b/images/tiles/blastfurnaceupper12.png differ
diff --git a/images/tiles/blastfurnaceupper13.png b/images/tiles/blastfurnaceupper13.png
new file mode 100644
index 0000000..6992ab8
Binary files /dev/null and b/images/tiles/blastfurnaceupper13.png differ
diff --git a/images/tiles/blastfurnaceupper14.png b/images/tiles/blastfurnaceupper14.png
new file mode 100644
index 0000000..5af9019
Binary files /dev/null and b/images/tiles/blastfurnaceupper14.png differ
diff --git a/images/tiles/blastfurnaceupper15.png b/images/tiles/blastfurnaceupper15.png
new file mode 100644
index 0000000..fd76380
Binary files /dev/null and b/images/tiles/blastfurnaceupper15.png differ
diff --git a/images/tiles/blastfurnaceupper16.png b/images/tiles/blastfurnaceupper16.png
new file mode 100644
index 0000000..9cd9db5
Binary files /dev/null and b/images/tiles/blastfurnaceupper16.png differ
diff --git a/images/tiles/cruciblefurnace10.png b/images/tiles/cruciblefurnace10.png
new file mode 100644
index 0000000..bbf648e
Binary files /dev/null and b/images/tiles/cruciblefurnace10.png differ
diff --git a/images/tiles/cruciblefurnace11.png b/images/tiles/cruciblefurnace11.png
new file mode 100644
index 0000000..19b0074
Binary files /dev/null and b/images/tiles/cruciblefurnace11.png differ
diff --git a/images/tiles/cruciblefurnace12.png b/images/tiles/cruciblefurnace12.png
new file mode 100644
index 0000000..5117271
Binary files /dev/null and b/images/tiles/cruciblefurnace12.png differ
diff --git a/images/tiles/index.php b/images/tiles/index.php
new file mode 100644
index 0000000..235613c
--- /dev/null
+++ b/images/tiles/index.php
@@ -0,0 +1,10 @@
+isDot()) {
+ $file = $fileinfo->getFilename();
+ echo '
';
+ //echo '
');
+ }
+}
+?>
\ No newline at end of file
diff --git a/images/tiles/mineralwasher10.png b/images/tiles/mineralwasher10.png
new file mode 100644
index 0000000..9b818fe
Binary files /dev/null and b/images/tiles/mineralwasher10.png differ
diff --git a/images/tiles/mineralwasher11.png b/images/tiles/mineralwasher11.png
new file mode 100644
index 0000000..514e8c3
Binary files /dev/null and b/images/tiles/mineralwasher11.png differ
diff --git a/images/tiles/mineralwasher12.png b/images/tiles/mineralwasher12.png
new file mode 100644
index 0000000..36c04b7
Binary files /dev/null and b/images/tiles/mineralwasher12.png differ
diff --git a/js/baseclasses.js b/js/baseclasses.js
index 246f087..08c9a8e 100644
--- a/js/baseclasses.js
+++ b/js/baseclasses.js
@@ -141,6 +141,44 @@ class Inventory {
}
}
+class FactoryInventory {
+ constructor() {
+ this.itemcount = []
+ this.items = []
+ }
+
+ countOf(id) {
+ var n = 0
+ for (var i = 0; i < this.items.length; i++) {
+ if (this.items[i].id == id)
+ n++
+ }
+ return n
+ }
+
+ addItem(item) {
+ if (item instanceof Item)
+ this.items.push(item)
+ }
+
+ take(id, count, factory) {
+ if (this.countOf(id) >= count) {
+ for (var j = 0; j < count; j++) {
+ for (var i = 0; i < this.items.length; i++) {
+ if (this.items[i].id == id) {
+ if (factory != null)
+ factory.deleteItem(this.items[i])
+ this.items.splice(i, 1)
+ break;
+ }
+ }
+ }
+ return true
+ }
+ return false
+ }
+}
+
class Item {
constructor(id, x, y) {
this.id = id
diff --git a/js/game.js b/js/game.js
index 6b18b24..e0f694e 100644
--- a/js/game.js
+++ b/js/game.js
@@ -141,7 +141,7 @@ function loadGameData() {
inventory.addItem(new Item(game.inventory[i]))
}
for (var i = 0; i < game.factorys.length; i++) {
- factorys.push(new Factory)
+ factorys.push(new Factory(game.factorys[i].tier))
for (var x = 0; x < 25; x++) {
for (var y = 0; y < 12; y++) {
if (game.factorys[i].tiles[x][y] != 0) {
@@ -168,6 +168,7 @@ function loadItems() {
itemRequest.send(null)
var json = JSON.parse(itemRequest.responseText)
items = json.items
+ minerals = json.minerals
for (var i = 0; i < items.length; i++) {
var image = new Image
image.src = "images/items/" + items[i].name + ".png"
@@ -240,6 +241,9 @@ function gametick(timestep) {
}
}
+var rotationOverlay = new Image
+rotationOverlay.src = "images/ui/rotationOverlay.png"
+
function render() {
fulltime++
ctx.clearRect(0, 0, innerWidth, innerHeight)
@@ -269,10 +273,8 @@ function render() {
drawRotatedImage(img, tile.x * 48 + 24, tile.y * 48 + 24, directions[tile.direction].degree)
}
if (mode == "rotate") {
- var img2 = new Image
- img2.src = "images/ui/rotationOverlay.png"
ctx.globalAlpha = 0.4
- drawRotatedImage(img2, tile.x * 48 + 24, tile.y * 48 + 24, directions[tile.direction].degree)
+ drawRotatedImage(rotationOverlay, tile.x * 48 + 24, tile.y * 48 + 24, directions[tile.direction].degree)
ctx.globalAlpha = 1
}
}
@@ -290,10 +292,8 @@ function render() {
if (img != "0") {
drawRotatedImage(img, cursorScreenX * 48 + 24, cursorScreenY * 48 + 24, directions[tile.direction].degree)
}
- var img2 = new Image
- img2.src = "images/ui/rotationOverlay.png"
ctx.globalAlpha = 0.2
- drawRotatedImage(img2, cursorScreenX * 48 + 24, cursorScreenY * 48 + 24, directions[tile.direction].degree)
+ drawRotatedImage(rotationOverlay, cursorScreenX * 48 + 24, cursorScreenY * 48 + 24, directions[tile.direction].degree)
ctx.globalAlpha = 1
} else {
ctx.globalAlpha = 0.4
@@ -444,9 +444,19 @@ function prepairRender() {
})
//End Sell/Select Items Menu
$('#clickToSell').text(lang.clickToSell)
+ for (var i = 0; i < infoBarIcons.length; i++) {
+ if (infoBarIcons[i] != null) {
+ var img = new Image
+ img.src = "images/ui/" + infoBarIcons[i]
+ infoBarIconsImg.push(img)
+ } else {
+ infoBarIconsImg.push(null)
+ }
+ }
}
var infoBarIcons = ["build.png", "move.png", "rotate.png", "delete.png", null, "upgrade.png", "info.png", null, "factorys.png"]
+var infoBarIconsImg = []
var infoGlowOpacity = 0
var infoGlowOpacityD = 0.03
@@ -482,11 +492,9 @@ function drawInfoBar() {
infoGlowOpacity += infoGlowOpacityD
infoCtx.globalAlpha = 1
}
- for (var i = 0; i < infoBarIcons.length; i++) {
- if (infoBarIcons[i] != null) {
- var img = new Image;
- img.src = "images/ui/" + infoBarIcons[i];
- infoCtx.drawImage(img, i * 48, 0, 48, 48);
+ for (var i = 0; i < infoBarIconsImg.length; i++) {
+ if (infoBarIconsImg[i] != null) {
+ infoCtx.drawImage(infoBarIconsImg[i], i * 48, 0, 48, 48);
}
}
if (toBuild != 0) {
diff --git a/js/items.json b/js/items.json
index c5ad09b..fb775f3 100644
--- a/js/items.json
+++ b/js/items.json
@@ -3,53 +3,293 @@
"id": 0,
"name": "none",
"value": 0
- },{
+ }, {
"id": 1,
"name": "log",
"value": 4
- },{
+ }, {
"id": 2,
"name": "planks",
"value": 6
- },{
+ }, {
"id": 3,
"name": "stone",
"value": 2
- },{
+ }, {
"id": 4,
"name": "charcoal",
"value": 15
- },{
+ }, {
"id": 5,
"name": "sawdust",
"value": 1
- },{
+ }, {
"id": 6,
"name": "charcoaldust",
"value": 3
- },{
+ }, {
"id": 7,
"name": "rawpaper",
"value": 100
- },{
+ }, {
"id": 8,
"name": "paper",
"value": 200
- },{
+ }, {
"id": 9,
"name": "siev",
"value": 33
- },{
+ }, {
"id": 10,
"name": "paperfilter",
"value": 100
- },{
+ }, {
"id": 11,
"name": "koks",
"value": 20
- },{
+ }, {
"id": 12,
"name": "briquettes",
"value": 16
- }]
+ }, {
+ "id": 13,
+ "name": "bauxite",
+ "value": 10
+ }, {
+ "id": 14,
+ "name": "leadore",
+ "value": 10
+ }, {
+ "id": 15,
+ "name": "chromeore",
+ "value": 10
+ }, {
+ "id": 16,
+ "name": "ironore",
+ "value": 10
+ }, {
+ "id": 17,
+ "name": "cobaltore",
+ "value": 10
+ }, {
+ "id": 18,
+ "name": "copperore",
+ "value": 10
+ }, {
+ "id": 19,
+ "name": "lithiumore",
+ "value": 10
+ }, {
+ "id": 20,
+ "name": "magnesiumore",
+ "value": 10
+ }, {
+ "id": 21,
+ "name": "manganeseore",
+ "value": 10
+ }, {
+ "id": 22,
+ "name": "molybdenumore",
+ "value": 10
+ }, {
+ "id": 23,
+ "name": "nickelore",
+ "value": 10
+ }, {
+ "id": 24,
+ "name": "silverore",
+ "value": 10
+ }, {
+ "id": 25,
+ "name": "tantalumore",
+ "value": 10
+ }, {
+ "id": 26,
+ "name": "titaniumore",
+ "value": 10
+ }, {
+ "id": 27,
+ "name": "uraniumore",
+ "value": 10
+ }, {
+ "id": 28,
+ "name": "vanadiumore",
+ "value": 10
+ }, {
+ "id": 29,
+ "name": "tungstenore",
+ "value": 10
+ }, {
+ "id": 30,
+ "name": "zincore",
+ "value": 10
+ }, {
+ "id": 31,
+ "name": "tinore",
+ "value": 10
+ }, {
+ "id": 32,
+ "name": "steel",
+ "value": 300
+ }, {
+ "id": 33,
+ "name": "rawiron",
+ "value": 30
+ }, {
+ "id": 34,
+ "name": "slag",
+ "value": 5
+ }],
+ "minerals": {
+ "nameFromId": ["bauxite",
+ "beryllium",
+ "lead",
+ "chrome",
+ "diamonds",
+ "iron",
+ "naturalgas",
+ "oil",
+ "gold",
+ "kaolin",
+ "cobalt",
+ "coal",
+ "copper",
+ "lithium",
+ "magnesium",
+ "manganese",
+ "molybdenum",
+ "nickel",
+ "phosphate",
+ "platinum",
+ "potash",
+ "rubies",
+ "silver",
+ "soda",
+ "tantalum",
+ "titanium",
+ "uranium",
+ "vanadium",
+ "tungsten",
+ "zinc",
+ "tin",
+ "salt"],
+ "bauxite": {
+ "depth": 1,
+ "oreid": 13
+ },
+ "beryllium": {
+ "depth": 3
+ },
+ "lead": {
+ "depth": 4,
+ "oreid": 14
+ },
+ "chrome": {
+ "depth": 2,
+ "oreid": 15
+ },
+ "diamonds": {
+ "depth": 8
+ },
+ "iron": {
+ "depth": 1,
+ "oreid": 16
+ },
+ "naturalgas": {
+ "depth": 6,
+ "liquid": true
+ },
+ "oil": {
+ "depth": 6,
+ "liquid": true
+ },
+ "gold": {
+ "depth": 3
+ },
+ "kaolin": {
+ "depth": 1
+ },
+ "cobalt": {
+ "depth": 4,
+ "oreid": 17
+ },
+ "coal": {
+ "depth": 2
+ },
+ "copper": {
+ "depth": 2,
+ "oreid": 18
+ },
+ "lithium": {
+ "depth": 1,
+ "oreid": 19
+ },
+ "magnesium": {
+ "depth": 3,
+ "oreid": 20
+ },
+ "manganese": {
+ "depth": 2,
+ "oreid": 21
+ },
+ "molybdenum": {
+ "depth": 2,
+ "oreid": 22
+ },
+ "nickel": {
+ "depth": 1,
+ "oreid": 23
+ },
+ "phosphate": {
+ "depth": 1,
+ "oreid": 13
+ },
+ "platinum": {
+ "depth": 6
+ },
+ "potash": {
+ "depth": 1
+ },
+ "rubies": {
+ "depth": 9
+ },
+ "silver": {
+ "depth": 4,
+ "oreid": 24
+ },
+ "soda": {
+ "depth": 1
+ },
+ "tantalum": {
+ "depth": 4,
+ "oreid": 25
+ },
+ "titanium": {
+ "depth": 7,
+ "oreid": 26
+ },
+ "uranium": {
+ "depth": 4,
+ "oreid": 27
+ },
+ "vanadium": {
+ "depth": 3,
+ "oreid": 28
+ },
+ "tungsten": {
+ "depth": 3,
+ "oreid": 29
+ },
+ "zinc": {
+ "depth": 1,
+ "oreid": 30
+ },
+ "tin": {
+ "depth": 1,
+ "oreid": 30
+ },
+ "salt": {
+ "depth": 1
+ }
+ }
}
diff --git a/js/minerals.json b/js/minerals.json
new file mode 100644
index 0000000..1475765
--- /dev/null
+++ b/js/minerals.json
@@ -0,0 +1,32 @@
+"bauxite"
+"beryllium"
+"lead"
+"chrome"
+"diamonds"
+"iron"
+"naturalgas"
+"oil"
+"gold"
+"kaolin"
+"cobalt"
+"coal"
+"copper"
+"lithium"
+"magnesium"
+"manganese"
+"molybdenum"
+"nickel"
+"phosphate"
+"platinum"
+"potash"
+"rubies"
+"silver"
+"soda"
+"tantalum"
+"titanium"
+"uranium"
+"vanadium"
+"tungsten"
+"zinc"
+"tin"
+"salt"
diff --git a/js/tiles.js b/js/tiles.js
index cc3b79a..68f1b58 100644
--- a/js/tiles.js
+++ b/js/tiles.js
@@ -435,6 +435,126 @@ class Cokery extends Tile {
}
}
+class BlastfurnaceLower extends Tile {
+ constructor(x, y, factory) {
+ super(x, y, factory)
+ this.maxwork = 96 * 10
+ this.currentwork = 0
+ this.name = "blastfurnacelower"
+ this.i = 16
+ this.dust = 0
+ this.cost = [{
+ "id": 0,
+ "count": 60000
+ },
+ {
+ "id": 3,
+ "count": 1400
+ },
+ {
+ "id": 6,
+ "count": 20
+ }
+ ]
+ this.texture = {
+ "0": [],
+ "1": ["blastfurnacelower10"]
+ }
+ 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)]
+ }
+
+ isUpperPartAttached() {
+ switch (this.direction) {
+ case "up":
+ if (this.factory.tiles[this.x - 1][this.y] != undefined && this.factory.tiles[this.x - 1][this.y] != 0)
+ if (this.factory.tiles[this.x - 1][this.y].i == 17)
+ return true;
+ break;
+ case "right":
+ if (this.factory.tiles[this.x][this.y - 1] != undefined && this.factory.tiles[this.x][this.y - 1] != 0)
+ if (this.factory.tiles[this.x][this.y - 1].i == 17)
+ return true;
+ break;
+ case "down":
+ if (this.factory.tiles[this.x + 1][this.y] != undefined && this.factory.tiles[this.x + 1][this.y] != 0)
+ if (this.factory.tiles[this.x + 1][this.y].i = 17)
+ return true;
+ break;
+ case "left":
+ if (this.factory.tiles[this.x][this.y + 1] != undefined && this.factory.tiles[this.x][this.y + 1] != 0)
+ if (this.factory.tiles[this.x][this.y + 1].i == 17)
+ return true;
+ break;
+ default:
+
+ }
+ }
+
+ work() {
+
+ if (this.isUpperPartAttached()) {
+ if (this.input.countOf(16) >= 40 && this.input.countOf(11) >= 10) {
+ if (this.currentwork == this.maxwork) {
+ this.currentwork = 0
+ this.input.take(16, 40, this.factory)
+ this.input.take(11, 10, 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)
+ }
+ } else
+ this.currentwork++
+ }
+ }
+ }
+}
+
+class BlastfurnaceUpper extends Tile {
+ constructor(x, y, factory) {
+ super(x, y, factory)
+ this.maxwork = 96 * 10
+ this.currentwork = 0
+ this.name = "blastfurnaceupper"
+ this.i = 17
+ this.dust = 0
+ this.cost = [{
+ "id": 0,
+ "count": 60000
+ },
+ {
+ "id": 3,
+ "count": 1400
+ },
+ {
+ "id": 6,
+ "count": 20
+ }
+ ]
+ this.texture = {
+ "0": [],
+ "1": ["blastfurnaceupper10", "blastfurnaceupper11", "blastfurnaceupper12", "blastfurnaceupper13", "blastfurnaceupper14", "blastfurnaceupper15", "blastfurnaceupper16"]
+ }
+ 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() {}
+}
+
class Quarry extends Tile {
constructor(x, y, factory) {
super(x, y, factory)
@@ -467,6 +587,57 @@ class Quarry extends Tile {
}
}
+class MineralWasher extends Tile {
+ constructor(x, y, factory) {
+ super(x, y, factory)
+ this.maxwork = 48 * 45
+ this.i = 15
+ this.currentwork = 0
+ this.name = "mineralwasher"
+ this.hasNoInventory = true
+ this.lastore = 0
+ this.cost = [{
+ "id": 0,
+ "count": 50000
+ }, {
+ "id": 9,
+ "count": 500
+ }]
+ this.texture = {
+ "0": [],
+ "1": ["mineralwasher10", "mineralwasher11", "mineralwasher12", "mineralwasher11"]
+ }
+ this.loadImages()
+ }
+
+ work() {
+ this.currentwork = ((this.currentwork + 1) % this.maxwork)
+ if (this.currentwork == 0) {
+ var goodores = [];
+ for (var i = 0; i < 4; i++) {
+ if (minerals[minerals.nameFromId[this.factory.ores[i]]].depth <= 1) {
+ if (minerals[minerals.nameFromId[this.factory.ores[i]]].oreid != undefined) {
+ goodores.push(minerals[minerals.nameFromId[this.factory.ores[i]]].oreid)
+ }
+ }
+ }
+ if (goodores.length >= 1) {
+ this.lastore = ((this.lastore + 1) % goodores.length)
+ var item = new Item(goodores[this.lastore], this.x * 48, this.y * 48)
+ this.factory.items.push(item)
+ item.setDFromDirection(this.direction)
+ }
+ }
+ }
+
+ 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 Collector extends Tile {
constructor(x, y, factory) {
super(x, y, factory)
@@ -699,18 +870,21 @@ class Warehouse extends Tile {
}
}
}
-tileClasses.push(Conveyorbelt)
-tileClasses.push(Treefarm)
-tileClasses.push(Saw)
-tileClasses.push(Charcoalmeiler)
-tileClasses.push(Quarry)
-tileClasses.push(Collector)
-tileClasses.push(Spliter)
-tileClasses.push(Warehouse)
-tileClasses.push(FilterLeft)
-tileClasses.push(FilterRight)
-tileClasses.push(Weaver)
-tileClasses.push(Papermanufactory)
-tileClasses.push(AdvancedCharcoalmeiler)
-tileClasses.push(Briquettepress)
-tileClasses.push(Cokery)
+tileClasses.push(Conveyorbelt) //0
+tileClasses.push(Treefarm) //1
+tileClasses.push(Saw) //2
+tileClasses.push(Charcoalmeiler) //3
+tileClasses.push(Quarry) //4
+tileClasses.push(Collector) //5
+tileClasses.push(Spliter) //6
+tileClasses.push(Warehouse) //7
+tileClasses.push(FilterLeft) //8
+tileClasses.push(FilterRight) //9
+tileClasses.push(Weaver) //10
+tileClasses.push(Papermanufactory) //11
+tileClasses.push(AdvancedCharcoalmeiler) //12
+tileClasses.push(Briquettepress) //13
+tileClasses.push(Cokery) //14
+tileClasses.push(MineralWasher) //15
+tileClasses.push(BlastfurnaceLower) //16
+tileClasses.push(BlastfurnaceUpper) //17
diff --git a/lang/en.json b/lang/en.json
index 144571a..7631997 100644
--- a/lang/en.json
+++ b/lang/en.json
@@ -60,6 +60,18 @@
"name": "Weaver",
"description": "Makes a Siev out of 5 Planks. Puts together Sievs and Paper/Rawpaper to make filter"
},
+ "mineralwasher": {
+ "name": "Mineral Washer",
+ "description": "Gets some Minerals"
+ },
+ "blastfurnacelower": {
+ "name": "Mineral Washer",
+ "description": "Gets some Minerals"
+ },
+ "blastfurnaceupper": {
+ "name": "Mineral Washer",
+ "description": "Gets some Minerals"
+ },
"filterleft": {
"name": "Item Filter (left)",
"description": "Puts a selected Item to the left and all other straight.",
@@ -108,7 +120,7 @@
"tin",
"salt"
],
- "items": ["None", "Log", "Planks", "Stone", "Charcoal", "Sawdust", "Charcoal Dust", "Raw Paper", "Paper", "Siev", "Filter", "Coke", "Briquettes"],
+ "items": ["None", "Log", "Planks", "Stone", "Charcoal", "Sawdust", "Charcoal Dust", "Raw Paper", "Paper", "Siev", "Filter", "Coke", "Briquettes","Bauxite","Lead Ore","Chrome Ore","Iron Ore","Cobalt Ore","Copper Ore","Lithium Ore","Magnesium Ore","Manganese Ore","Molybdenum Ore","Nickel Ore","Silver Ore","Tantalum Ore","Titanium Ore","Uranium Ore","Vanadium Ore","Tungesten Ore","Zinc Ore","Tin Ore","Steel","Raw Iron","Slag"],
"more": "Show Inventory / Sell Items",
"inventory": "Inventory",
"player": "Player",