new tiles

This commit is contained in:
MasterGordon 2018-05-12 23:05:22 +02:00
parent e2b304fd71
commit 63ad5a3d20
27 changed files with 290 additions and 10 deletions

BIN
images/items/fertilizer.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

BIN
images/items/glass.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 311 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 401 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 427 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 400 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 433 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 393 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 432 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 401 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 432 B

Binary file not shown.

Binary file not shown.

After

Width:  |  Height:  |  Size: 308 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 314 B

BIN
images/tiles/siev10.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 541 B

Binary file not shown.

Binary file not shown.

After

Width:  |  Height:  |  Size: 235 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 308 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 341 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 348 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 419 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 455 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 325 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 328 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 333 B

View File

@ -167,6 +167,10 @@
"id": 41,
"name": "dirt",
"value": 100
}, {
"id": 42,
"name": "glass",
"value": 100
}],
"minerals": {
"nameFromId": ["bauxite",

View File

@ -1031,8 +1031,8 @@ class TeleporterOutput extends Tile {
"count": 50
}]
this.texture = {
"0": [],
"1": ["collector13"]
"0": ["teleporterout01","teleporterout02","teleporterout03","teleporterout04","teleporterout05","teleporterout06","teleporterout07","teleporterout08","teleporterout09"],
"1": []
}
this.options = [{
"type": "amount",
@ -1117,7 +1117,7 @@ class SoilMiner extends Tile {
constructor(x, y, factory) {
super(x, y, factory)
this.maxwork = 24 * 30
this.i = 22
this.i = 23
this.currentwork = 0
this.name = "soilminer"
this.hasNoInventory = true
@ -1145,6 +1145,254 @@ class SoilMiner extends Tile {
}
}
class Siev extends Tile {
constructor(x, y, factory) {
super(x, y, factory)
this.maxwork = 48
this.currentwork = 0
this.name = "siev"
this.i = 24
this.cost = [{
"id": 0,
"count": 750
},
{
"id": 1,
"count": 50
}
]
this.texture = {
"0": [],
"1": ["siev10"]
}
this.loadImages()
}
work() {
//Items für ein Pank
if (this.input.countOf(38) >= 9) {
if (this.currentwork == this.maxwork) {
this.input.take(38, 9, this.factory)
for (var i = 0; i < 3; i++) {
var item = new Item(39, this.x * 48, this.y * 48)
this.factory.items.push(item)
item.setDFromDirection(this.direction)
item = new Item(40, this.x * 48, this.y * 48)
this.factory.items.push(item)
item.setDFromDirection(this.direction)
item = new Item(41, 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 GlasMelt extends Tile {
constructor(x, y, factory) {
super(x, y, factory)
this.maxwork = 48 * 30
this.currentwork = 0
this.name = "glasmelt"
this.i = 25
this.cost = [{
"id": 0,
"count": 750
},
{
"id": 1,
"count": 50
}
]
this.texture = {
"0": [],
"1": ["glassmelt10", "glassmelt11", "glassmelt12", "glassmelt13", "glassmelt14", "glassmelt15", "glassmelt16", "glassmelt17", "glassmelt18", "glassmelt19", "glassmelt110"]
}
this.loadImages()
}
work() {
//Items für ein Pank
if (this.input.countOf(39) >= 30) {
if (this.currentwork == this.maxwork) {
this.input.take(39, 30, this.factory)
for (var i = 0; i < 10; i++) {
var item = new Item(42, 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)
this.maxwork = 48 * 30
this.currentwork = 0
this.name = "fertilizermixer"
this.i = 28
this.cost = [{
"id": 0,
"count": 750
},
{
"id": 1,
"count": 50
}
]
this.texture = {
"0": [],
"1": ["fertilizermixer10", "fertilizermixer11", "fertilizermixer12", "fertilizermixer13", "fertilizermixer14", "fertilizermixer15", "fertilizermixer16", "fertilizermixer17"]
}
this.loadImages()
}
work() {
//Items für ein Pank
if (this.input.countOf(39) >= 30) {
if (this.currentwork == this.maxwork) {
this.input.take(39, 30, this.factory)
for (var i = 0; i < 10; i++) {
var item = new Item(42, 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 PrecisionSpliterLeft extends Tile {
constructor(x, y, factory) {
super(x, y, factory)
this.name = "precisionspliterleft"
this.hasNoInventory = true
this.i = 26
this.n = 0
this.nn = 0
this.cost = [{
"id": 0,
"count": 50
}]
this.texture = {
"0": ["conveyorbelt00", "conveyorbelt01", "conveyorbelt02", "conveyorbelt03", "conveyorbelt04", "conveyorbelt05", "conveyorbelt06"],
"1": ["precisionspliterleft10"]
}
this.options = [{
"type": "amount",
"var": "n"
}]
this.loadImages()
}
work() {
while (this.input.items.length > 0) {
var item = this.input.items.pop()
this.nn++;
var d = this.direction
if (this.n == this.nn) {
switch (this.direction) {
case "right":
d = "up"
break;
case "down":
d = "right"
break;
case "left":
d = "down"
break;
case "up":
d = "left"
break;
}
this.nn = 0
}
item.setDFromDirection(d)
}
}
}
class PrecisionSpliterRight extends Tile {
constructor(x, y, factory) {
super(x, y, factory)
this.name = "precisionspliterright"
this.hasNoInventory = true
this.i = 27
this.n = 0
this.nn = 0
this.cost = [{
"id": 0,
"count": 50
}]
this.texture = {
"0": ["conveyorbelt00", "conveyorbelt01", "conveyorbelt02", "conveyorbelt03", "conveyorbelt04", "conveyorbelt05", "conveyorbelt06"],
"1": ["precisionspliterright10"]
}
this.options = [{
"type": "amount",
"var": "n"
}]
this.loadImages()
}
work() {
while (this.input.items.length > 0) {
var item = this.input.items.pop()
this.nn++;
var d = this.direction
if (this.n == this.nn) {
switch (this.direction) {
case "right":
d = "down"
break;
case "down":
d = "left"
break;
case "left":
d = "up"
break;
case "up":
d = "right"
break;
}
this.nn = 0
}
item.setDFromDirection(d)
}
}
}
tileClasses.push(Conveyorbelt) //0
tileClasses.push(Treefarm) //1
tileClasses.push(Saw) //2
@ -1169,3 +1417,8 @@ tileClasses.push(TeleporterInput) //20
tileClasses.push(TeleporterOutput) //21
tileClasses.push(SimpleMiner) //22
tileClasses.push(SoilMiner) //23
tileClasses.push(Siev) //24
tileClasses.push(GlasMelt) //25
tileClasses.push(PrecisionSpliterLeft) //26
tileClasses.push(PrecisionSpliterRight) //27
tileClasses.push(FertilizerMixer) //28

View File

@ -32,9 +32,13 @@
"name": "Quarry",
"description": "Mines stone slowly but safely."
},
"quarry": {
"name": "Quarry",
"description": "Mines stone slowly but safely."
"glasmelt": {
"name": "Glas Melt",
"description": "Melts 30 Quartz Sand into 10 Glass."
},
"siev": {
"name": "Siev",
"description": "Sieves 9 Soil into 3 Quartz Sand, 3 Concret and 3 Dirt."
},
"charcoalmeiler": {
"name": "Charcoal Meiler",
@ -88,6 +92,10 @@
"name": "Soil Miner",
"description": "Mines Soil."
},
"fertilizermixer": {
"name": "Fertilizer Mixer",
"description": "Mines Soil."
},
"filterleft": {
"name": "Item Filter (left)",
"description": "Puts a selected Item to the left and all other straight.",
@ -115,6 +123,20 @@
"options": {
"filter": "Filtered Item"
}
},
"precisionspliterleft": {
"name": "Precision Spliter (Left)",
"description": "Pushes every N'th Item to the left.",
"options": {
"n": "N"
}
},
"precisionspliterright": {
"name": "Precision Spliter (Right)",
"description": "Pushes every N'th Item to the right.",
"options": {
"n": "N"
}
}
},
"minerals": ["bauxite",
@ -191,7 +213,8 @@
"Soil",
"Quartz Sand",
"Concret",
"Dirt"
"Dirt",
"Glass"
],
"more": "Show Inventory / Sell Items",
"inventory": "Inventory",