Added Charcoalmeiler + Balance + awsome logo

This commit is contained in:
MasterGordon 2018-04-05 15:29:46 +02:00
parent e32eca0f7a
commit d51a16a89a
22 changed files with 83 additions and 16 deletions

BIN
images/items/charcoal.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 KiB

BIN
images/logo.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 183 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 281 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 360 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 637 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 676 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 548 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 625 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 626 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 423 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 475 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 523 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 556 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 568 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 562 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 553 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 549 B

View File

@ -1,3 +1,4 @@
var noPay = false
class Tile {
constructor(x, y, factory) {
this.x = x
@ -36,6 +37,8 @@ class Tile {
}
pay() {
if (noPay)
return true
var items = 0
for (var i = 0; i < this.cost.length; i++) {
if (this.cost[i].id == 0) {

View File

@ -1,6 +1,5 @@
$(document).ready(function() {
$(document).keypress(function(e) {
console.log(e.originalEvent)
switch (e.originalEvent.key) {
case "1":
//BUILD

View File

@ -6,7 +6,7 @@
},{
"id": 1,
"name": "log",
"value": 1
"value": 4
},{
"id": 2,
"name": "planks",
@ -15,5 +15,9 @@
"id": 3,
"name": "stone",
"value": 2
},{
"id": 4,
"name": "charcoal",
"value": 14
}]
}

View File

@ -23,7 +23,7 @@ tileClasses.push(Conveyorbelt)
class Treefarm extends Tile {
constructor(x, y, factory) {
super(x, y, factory)
this.maxwork = 96
this.maxwork = 96 * 5
this.currentwork = 0
this.name = "treefarm"
this.hasNoInventory = true
@ -52,12 +52,12 @@ tileClasses.push(Treefarm)
class Saw extends Tile {
constructor(x, y, factory) {
super(x, y, factory)
this.maxwork = 96
this.maxwork = 48
this.currentwork = 0
this.name = "saw"
this.cost = [{
"id": 0,
"count": 50
"count": 750
},
{
"id": 1,
@ -75,11 +75,13 @@ class Saw extends Tile {
//Items für ein Pank
var requieredCount = 5
if (this.input.countOf(1) >= requieredCount) {
if (this.currentwork == 96) {
if (this.currentwork == this.maxwork) {
this.input.take(1, requieredCount, this.factory)
for (var i = 0; i < 4; i++) {
var item = new Item(2, this.x * 48, this.y * 48)
this.factory.items.push(item)
item.setDFromDirection(this.direction)
}
this.currentwork = 0
} else {
this.currentwork++
@ -91,6 +93,57 @@ class Saw extends Tile {
}
tileClasses.push(Saw)
class Charcoalmeiler extends Tile {
constructor(x, y, factory) {
super(x, y, factory)
this.maxwork = 96 * 10
this.currentwork = 0
this.name = "charcoalmeiler"
this.cost = [{
"id": 0,
"count": 1000
},
{
"id": 3,
"count": 30
}
]
this.texture = {
"0": [],
"1": ["charcoalmeiler10", "charcoalmeiler10", "charcoalmeiler10", "charcoalmeiler11", "charcoalmeiler11", "charcoalmeiler11", "charcoalmeiler12", "charcoalmeiler12", "charcoalmeiler12", "charcoalmeiler13", "charcoalmeiler13", "charcoalmeiler13", "charcoalmeiler14", "charcoalmeiler14", "charcoalmeiler14", "charcoalmeiler15", "charcoalmeiler15", "charcoalmeiler15", "charcoalmeiler16", "charcoalmeiler16", "charcoalmeiler16", "charcoalmeiler17", "charcoalmeiler17", "charcoalmeiler17", "charcoalmeiler18", "charcoalmeiler18", "charcoalmeiler18", "charcoalmeiler19", "charcoalmeiler19", "charcoalmeiler19", "charcoalmeiler110", "charcoalmeiler111", "charcoalmeiler110", "charcoalmeiler111", "charcoalmeiler110", "charcoalmeiler111", "charcoalmeiler110", "charcoalmeiler111", "charcoalmeiler110", "charcoalmeiler111", "charcoalmeiler110", "charcoalmeiler111", "charcoalmeiler110", "charcoalmeiler111", "charcoalmeiler112", "charcoalmeiler112", "charcoalmeiler112", "charcoalmeiler112", "charcoalmeiler112", "charcoalmeiler113", "charcoalmeiler113", "charcoalmeiler113", "charcoalmeiler113", "charcoalmeiler113", "charcoalmeiler114", "charcoalmeiler114", "charcoalmeiler114", "charcoalmeiler114", "charcoalmeiler114"]
}
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.currentwork = 0
} else {
this.currentwork++
}
} else {
this.currentwork = 0
}
}
}
tileClasses.push(Charcoalmeiler)
class Quarry extends Tile {
constructor(x, y, factory) {
super(x, y, factory)
@ -100,7 +153,7 @@ class Quarry extends Tile {
this.hasNoInventory = true
this.cost = [{
"id": 0,
"count": 100
"count": 10000
}, {
"id": 2,
"count": 50

View File

@ -2,19 +2,19 @@
"tiles": {
"conveyorbelt": {
"name": "Conveyorbelt",
"description": "Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet."
"description": "The easyest and most common way to transport Items."
},
"treefarm": {
"name": "Treefarm",
"description": "Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet."
"description": "Slowly Produces Log."
},
"collector": {
"name": "Collector",
"description": "Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet."
"description": "Puts any Items it gets into your Inventory so you can sell them."
},
"saw": {
"name": "Saw",
"description": "Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet."
"description": "Cuts 5 Logs in to 4 Planks. Works only if it contains 5 Log. It works fast!"
},
"spliter": {
"name": "Spliter",
@ -31,9 +31,17 @@
"quarry": {
"name": "Quarry",
"description": "Mines stone slowly but safely."
},
"quarry": {
"name": "Quarry",
"description": "Mines stone slowly but safely."
},
"charcoalmeiler": {
"name": "Charcoal Meiler",
"description": "Requieres 10 Planks to burn them down to 5 Charcoal."
}
},
"items": ["None", "Log", "Planks", "Stone"],
"items": ["None", "Log", "Planks", "Stone","Charcoal"],
"more": "Show Inventory / Sell Items",
"inventory": "Inventory",
"player": "Player",