From 6ecc53a2b5ce88c2dbcde163f05e96cd0a1fb522 Mon Sep 17 00:00:00 2001 From: MasterGordon Date: Sat, 9 Jun 2018 20:42:01 +0200 Subject: [PATCH] Added Bottles --- images/items/bottleapplejuce.png | Bin 0 -> 318 bytes images/items/bottleapplevenegar.png | Bin 0 -> 319 bytes images/items/bottleapplewine.png | Bin 0 -> 319 bytes images/items/bottleempty.png | Bin 0 -> 336 bytes images/tiles/glassblower10.png | Bin 0 -> 348 bytes images/tiles/jucer10.png | Bin 0 -> 577 bytes js/items.json | 24 ++++++++++++++ js/tiles.js | 49 +++++++++++++++++++++++++++- 8 files changed, 72 insertions(+), 1 deletion(-) create mode 100644 images/items/bottleapplejuce.png create mode 100644 images/items/bottleapplevenegar.png create mode 100644 images/items/bottleapplewine.png create mode 100644 images/items/bottleempty.png create mode 100644 images/tiles/glassblower10.png create mode 100644 images/tiles/jucer10.png diff --git a/images/items/bottleapplejuce.png b/images/items/bottleapplejuce.png new file mode 100644 index 0000000000000000000000000000000000000000..1e9e9ba2da8a4f2b814533b27e8c57396fec1f47 GIT binary patch literal 318 zcmeAS@N?(olHy`uVBq!ia0vp^1|ZDA1|-9oezpTC#^NA%Cx&(BWL^R}Ea{HEjtmSN z`?>!lvI6;>1s;*b3=DjSL74G){)!Z!pk#?_L`iUdT1k0gQ7S`0VrE{6US4X6f{C7i zo{`~4h0LiyMe96W978gk-=06n*&HCyl4$M4EGD3%sp@%vDdmn zBe&_lh~V0b8-=aPoQ^Mk`;}*DjlbLR#=ilI_e)*eEAn3-s$13&eWSNP^23fzHSb?C ze{28zIQY`~hD*o!H4iavFK(E{d_`u#GX_)k6_yTX8MF8TFof!58I~$v`dIKw!pm*K t!}+!iFOm%M4|t3C3CHPL-SRkrTWb3m6fc)I$ztaD0e0s!)ubzA@d literal 0 HcmV?d00001 diff --git a/images/items/bottleapplevenegar.png b/images/items/bottleapplevenegar.png new file mode 100644 index 0000000000000000000000000000000000000000..7c57b8f90ed9f03d70aed7fa661558c4fd133aa6 GIT binary patch literal 319 zcmeAS@N?(olHy`uVBq!ia0vp^1|ZDA1|-9oezpTC#^NA%Cx&(BWL^R}Ea{HEjtmSN z`?>!lvI6;>1s;*b3=DjSL74G){)!Z!pk#?_L`iUdT1k0gQ7S`0VrE{6US4X6f{C7i zo{`~4h0LiyMe99X978gk-=06n*__n$=CgSoP#Uxu=yV28S3j3^P6!lvI6;>1s;*b3=DjSL74G){)!Z!pk#?_L`iUdT1k0gQ7S`0VrE{6US4X6f{C7i zo{`~4h0LiyMe99X978gk-=06n*_m59q#e+rd+@b5qUx zmy91SJvV$W`j=-#&7TR%G9U8!0*V`EF<+5c@QlHfeTAjNS;j1Mp||%K11y!~`IomZ uOk%N?(>vV2ua#)d1hg?(z2uGZGW~6$mpU&i9nAzfox#)9&t;ucLK6TXgmypx literal 0 HcmV?d00001 diff --git a/images/items/bottleempty.png b/images/items/bottleempty.png new file mode 100644 index 0000000000000000000000000000000000000000..ca8fe91e60d5169762008b9ccc76d6cb8561bd6c GIT binary patch literal 336 zcmeAS@N?(olHy`uVBq!ia0vp^1|ZDA1|-9oezpTC#^NA%Cx&(BWL^R}Ea{HEjtmSN z`?>!lvI6;>1s;*b3=DjSL74G){)!Z!pk#?_L`iUdT1k0gQ7S`0VrE{6US4X6f{C7i zo{`~4h0LiyMF%`x978gk-=25mY6;+JPV84NUSc_kr{aj0IRB@tZ<*~n`&wO}o);8c zeDSf$7Yk0?MZc@tg5IutQJ82SvLd!a?(+M6c5l+TZXS}l{Ca|Zd06%K_9J$$mVC?O zf79Hz;U=>PMfm4_HkEIV>RZdJBW|?IZn$7lnNma(lPNr^oNz R+W_!lvI6;>1s;*b3=DjSL74G){)!Z!pk#?_L`iUdT1k0gQ7S`0VrE{6US4X6f{C7i zo{`~4h0LiyMQ1!+978gk-=4q7$z&+tdQtcEzBdQVTDCkY6Fb{(aB%hn#+xS({I-y9 ztF`#PV(YTD{+T8AUYe%N)y2CW?-vp9WxR+%y#3Vh*=Bi$ad9SttWSpZA_jh|X&1^| z80AWI7QXFZvUw5VbX$~yh!LaGydH0JGb|)#ol@RHSu5P zHynE>^Nlm(P1(gb#@@U7H}oGYmVJ8h@AAtw3XH5S!46yIH?-N^nYec+_X!U9&nu2g Y-`o6L;h2fLJJ4SYp00i_>zopr03VZrKmY&$ literal 0 HcmV?d00001 diff --git a/images/tiles/jucer10.png b/images/tiles/jucer10.png new file mode 100644 index 0000000000000000000000000000000000000000..c89c674173daed14b870ced8482edf3efa29cf89 GIT binary patch literal 577 zcmeAS@N?(olHy`uVBq!ia0vp^1|ZDA1|-9oezpTC#^NA%Cx&(BWL^R}Ea{HEjtmSN z`?>!lvI6;>1s;*b3=DjSL74G){)!Z!pk#?_L`iUdT1k0gQ7S`0VrE{6US4X6f{C7i zo{`~4h0LiyQ#X3LIEG|6U%hZJm&sA2IdPSzV9B&BCvnRHhnG!xX0w{t9)Fh3X3MEv z{X=E*nF`+JxwrXv<>gM!XaD}Y*8ArE-H#tK?|pLj)o*K=6*jKYPl|TtZ2F&fzOgHK z%fhPEKMx#^YTh!qQXl{7do^FkoJG7QaV2RW*<-)w_tt)kky&ApYFhMdFSF?KGsjNv z|HpXiL(j3x{RImiiR8WjlPmJBzh58zgGqFGhO=vOr+z?TmsyC(G@=C7|EZZLe_>`g zROiPtZ~rvDcmvaa{=$#ObL(JoJiYRmQtiy5Fjc5bpksgnbRdr(X4k6U{_7uKO@+#j d4;I@l>pu-E<~mxX35;q622WQ%mvv4FO#qwe>f!(Z literal 0 HcmV?d00001 diff --git a/js/items.json b/js/items.json index ca8114d..06b97d1 100644 --- a/js/items.json +++ b/js/items.json @@ -171,6 +171,30 @@ "id": 42, "name": "glass", "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": { "nameFromId": ["bauxite", diff --git a/js/tiles.js b/js/tiles.js index eb24bde..124fbff 100644 --- a/js/tiles.js +++ b/js/tiles.js @@ -1031,7 +1031,7 @@ class TeleporterOutput extends Tile { "count": 50 }] this.texture = { - "0": ["teleporterout01","teleporterout02","teleporterout03","teleporterout04","teleporterout05","teleporterout06","teleporterout07","teleporterout08","teleporterout09"], + "0": ["teleporterout01", "teleporterout02", "teleporterout03", "teleporterout04", "teleporterout05", "teleporterout06", "teleporterout07", "teleporterout08", "teleporterout09"], "1": [] } this.options = [{ @@ -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 { constructor(x, y, factory) { super(x, y, factory)