lots of new tiles
66
game.html
|
|
@ -22,45 +22,53 @@
|
|||
<script src="js/hotkeys.js"></script>
|
||||
</head>
|
||||
|
||||
|
||||
<body>
|
||||
<canvas id="screen">
|
||||
|
||||
<div id="all" hidden>
|
||||
<canvas id="screen">
|
||||
</canvas>
|
||||
<canvas id="itemcount">
|
||||
<canvas id="itemcount">
|
||||
</canvas>
|
||||
<canvas id="info">
|
||||
<canvas id="info">
|
||||
</canvas>
|
||||
<div id="infoDesc">
|
||||
<h1></h1>
|
||||
<p></p>
|
||||
</div>
|
||||
<div id="buildselect">
|
||||
</div>
|
||||
<div id="inventoryBig">
|
||||
<span id="clickToSell"></span>
|
||||
<div id="itemsScroll">
|
||||
<div id="infoDesc">
|
||||
<h1></h1>
|
||||
<p></p>
|
||||
</div>
|
||||
</div>
|
||||
<div id="selectItem">
|
||||
</div>
|
||||
<div id="options">
|
||||
</div>
|
||||
<div id="tooltip">
|
||||
<span>
|
||||
<div id="buildselect">
|
||||
</div>
|
||||
<div id="inventoryBig">
|
||||
<span id="clickToSell"></span>
|
||||
<div id="itemsScroll">
|
||||
</div>
|
||||
</div>
|
||||
<div id="selectItem">
|
||||
</div>
|
||||
<div id="options">
|
||||
</div>
|
||||
<div id="tooltip">
|
||||
<span>
|
||||
</span>
|
||||
</div>
|
||||
<div id="showmore">
|
||||
</div>
|
||||
<span id="money">
|
||||
</div>
|
||||
<div id="showmore">
|
||||
</div>
|
||||
<span id="money">
|
||||
??? Dollar
|
||||
</span>
|
||||
<div id="selectFactory">
|
||||
<div id="factoryScroll">
|
||||
<div class="factory"><h1>Factory 0</h1><div class="minerals"><br><h2>Minerals:</h2><br> - iron<br> - coal<br> - copper<br> - soda</div></div>
|
||||
<div id="selectFactory">
|
||||
<div id="factoryScroll">
|
||||
<div class="factory">
|
||||
<h1>Factory 0</h1>
|
||||
<div class="minerals"><br>
|
||||
<h2>Minerals:</h2><br> - iron<br> - coal<br> - copper<br> - soda</div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="buyfactory"></div>
|
||||
</div>
|
||||
<div id="buyfactory"></div>
|
||||
<span style="position: fixed;color: white" id="speed"></span>
|
||||
<div id="playerinfo"><span id="lastsave">Last Save 10Min ago</span><br><button id="forcesave">Force Save</button><button id="logout">Logout</button></div>
|
||||
</div>
|
||||
<span style="position: fixed;color: white" id="speed"></span>
|
||||
<div id="playerinfo"><span id="lastsave">Last Save 10Min ago</span><br><button id="forcesave">Force Save</button><button id="logout">Logout</button></div>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
|
|
|
|||
|
After Width: | Height: | Size: 470 B |
|
After Width: | Height: | Size: 1.5 KiB |
|
After Width: | Height: | Size: 1.5 KiB |
|
After Width: | Height: | Size: 1.5 KiB |
|
After Width: | Height: | Size: 1.5 KiB |
|
After Width: | Height: | Size: 3.5 KiB |
|
After Width: | Height: | Size: 441 B |
|
After Width: | Height: | Size: 443 B |
|
After Width: | Height: | Size: 440 B |
|
After Width: | Height: | Size: 432 B |
|
After Width: | Height: | Size: 436 B |
|
After Width: | Height: | Size: 438 B |
|
After Width: | Height: | Size: 439 B |
|
After Width: | Height: | Size: 446 B |
|
After Width: | Height: | Size: 453 B |
|
After Width: | Height: | Size: 457 B |
|
After Width: | Height: | Size: 417 B |
|
After Width: | Height: | Size: 420 B |
|
After Width: | Height: | Size: 394 B |
|
After Width: | Height: | Size: 423 B |
|
After Width: | Height: | Size: 404 B |
|
After Width: | Height: | Size: 397 B |
|
After Width: | Height: | Size: 401 B |
|
After Width: | Height: | Size: 382 B |
|
After Width: | Height: | Size: 395 B |
|
After Width: | Height: | Size: 395 B |
|
After Width: | Height: | Size: 393 B |
|
After Width: | Height: | Size: 334 B |
|
After Width: | Height: | Size: 2.3 KiB |
|
Before Width: | Height: | Size: 649 B After Width: | Height: | Size: 636 B |
|
After Width: | Height: | Size: 2.3 KiB |
|
After Width: | Height: | Size: 1.9 KiB |
|
After Width: | Height: | Size: 349 B |
|
After Width: | Height: | Size: 344 B |
|
After Width: | Height: | Size: 340 B |
|
After Width: | Height: | Size: 652 B |
|
After Width: | Height: | Size: 665 B |
|
After Width: | Height: | Size: 512 B |
|
After Width: | Height: | Size: 499 B |
|
After Width: | Height: | Size: 394 B |
|
After Width: | Height: | Size: 235 B |
|
|
@ -51,6 +51,10 @@ $(document).ready(function() {
|
|||
loadLang()
|
||||
prepairRender()
|
||||
requestAnimationFrame(loop)
|
||||
if (window.location.hostname == "localhost")
|
||||
noPay = true
|
||||
$('#loading').hide()
|
||||
$('#all').show()
|
||||
})
|
||||
|
||||
var game = 0
|
||||
|
|
|
|||
|
|
@ -142,7 +142,31 @@
|
|||
}, {
|
||||
"id": 35,
|
||||
"name": "pickaxe",
|
||||
"value": 310
|
||||
}, {
|
||||
"id": 36,
|
||||
"name": "archimedesscrew",
|
||||
"value": 5
|
||||
}, {
|
||||
"id": 37,
|
||||
"name": "cement",
|
||||
"value": 100
|
||||
}, {
|
||||
"id": 38,
|
||||
"name": "soil",
|
||||
"value": 100
|
||||
}, {
|
||||
"id": 39,
|
||||
"name": "quartzsand",
|
||||
"value": 100
|
||||
}, {
|
||||
"id": 40,
|
||||
"name": "concret",
|
||||
"value": 100
|
||||
}, {
|
||||
"id": 41,
|
||||
"name": "dirt",
|
||||
"value": 100
|
||||
}],
|
||||
"minerals": {
|
||||
"nameFromId": ["bauxite",
|
||||
|
|
|
|||
95
js/tiles.js
|
|
@ -690,7 +690,7 @@ class Quarry extends Tile {
|
|||
class MineralWasher extends Tile {
|
||||
constructor(x, y, factory) {
|
||||
super(x, y, factory)
|
||||
this.maxwork = 48 * 45
|
||||
this.maxwork = 48 * 60
|
||||
this.i = 15
|
||||
this.currentwork = 0
|
||||
this.name = "mineralwasher"
|
||||
|
|
@ -983,8 +983,8 @@ class TeleporterInput extends Tile {
|
|||
"count": 50
|
||||
}]
|
||||
this.texture = {
|
||||
"0": [],
|
||||
"1": ["collector13"]
|
||||
"0": ["teleporter00", "teleporter01", "teleporter02", "teleporter03", "teleporter04", "teleporter06", "teleporter07", "teleporter08", "teleporter09"],
|
||||
"1": []
|
||||
}
|
||||
this.options = [{
|
||||
"type": "amount",
|
||||
|
|
@ -993,6 +993,13 @@ class TeleporterInput extends Tile {
|
|||
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() {
|
||||
if (teleporter[this.frequency] == undefined) {
|
||||
teleporter[this.frequency] = new FactoryInventory
|
||||
|
|
@ -1058,6 +1065,86 @@ class TeleporterOutput extends Tile {
|
|||
}
|
||||
}
|
||||
|
||||
class SimpleMiner extends Tile {
|
||||
constructor(x, y, factory) {
|
||||
super(x, y, factory)
|
||||
this.maxwork = 24 * 30
|
||||
this.i = 22
|
||||
this.currentwork = 0
|
||||
this.name = "simpleminer"
|
||||
this.hasNoInventory = true
|
||||
this.lastore = 0
|
||||
this.cost = [{
|
||||
"id": 0,
|
||||
"count": 50000
|
||||
}, {
|
||||
"id": 9,
|
||||
"count": 500
|
||||
}]
|
||||
this.texture = {
|
||||
"0": [],
|
||||
"1": ["simpleminer10"]
|
||||
}
|
||||
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 (minerals[minerals.nameFromId[this.factory.ores[i]]].itemid != undefined) {
|
||||
goodores.push(minerals[minerals.nameFromId[this.factory.ores[i]]].itemid)
|
||||
}
|
||||
}
|
||||
}
|
||||
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)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
class SoilMiner extends Tile {
|
||||
constructor(x, y, factory) {
|
||||
super(x, y, factory)
|
||||
this.maxwork = 24 * 30
|
||||
this.i = 22
|
||||
this.currentwork = 0
|
||||
this.name = "soilminer"
|
||||
this.hasNoInventory = true
|
||||
this.cost = [{
|
||||
"id": 0,
|
||||
"count": 50000
|
||||
}, {
|
||||
"id": 9,
|
||||
"count": 500
|
||||
}]
|
||||
this.texture = {
|
||||
"0": [],
|
||||
"1": ["soilminer10"]
|
||||
}
|
||||
this.loadImages()
|
||||
}
|
||||
|
||||
work() {
|
||||
this.currentwork = ((this.currentwork + 1) % this.maxwork)
|
||||
if (this.currentwork == 0) {
|
||||
var item = new Item(38, this.x * 48, this.y * 48)
|
||||
this.factory.items.push(item)
|
||||
item.setDFromDirection(this.direction)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
tileClasses.push(Conveyorbelt) //0
|
||||
tileClasses.push(Treefarm) //1
|
||||
tileClasses.push(Saw) //2
|
||||
|
|
@ -1080,3 +1167,5 @@ tileClasses.push(CrucibleFurnace) //18
|
|||
tileClasses.push(Smith) //19
|
||||
tileClasses.push(TeleporterInput) //20
|
||||
tileClasses.push(TeleporterOutput) //21
|
||||
tileClasses.push(SimpleMiner) //22
|
||||
tileClasses.push(SoilMiner) //23
|
||||
|
|
|
|||
60
lang/en.json
|
|
@ -58,7 +58,7 @@
|
|||
},
|
||||
"weaver": {
|
||||
"name": "Weaver",
|
||||
"description": "Makes a Siev out of 5 Planks. Puts together Sievs and Paper/Rawpaper to make filter"
|
||||
"description": "Makes a Siev out of 5 Planks. Puts together Sievs and Paper/Rawpaper to make filter."
|
||||
},
|
||||
"mineralwasher": {
|
||||
"name": "Mineral Washer",
|
||||
|
|
@ -70,15 +70,23 @@
|
|||
},
|
||||
"smith": {
|
||||
"name": "Smith",
|
||||
"description": "Build a Pickaxe out of 1 Steel and 1 Plank"
|
||||
"description": "Build a Pickaxe out of 1 Steel and 1 Plank."
|
||||
},
|
||||
"blastfurnaceupper": {
|
||||
"name": "Blast Furnace (Upper Part)",
|
||||
"description": "Is requiered to put on the lower Blast Furnace Part"
|
||||
"description": "Is requiered to put on the lower Blast Furnace Part."
|
||||
},
|
||||
"cruciblefurnace": {
|
||||
"name": "Crucible Furnace",
|
||||
"description": "Enriches 35 Rawiron with 5 Iron Ore into 40 Steel"
|
||||
"description": "Enriches 35 Rawiron with 5 Iron Ore into 40 Steel."
|
||||
},
|
||||
"simpleminer": {
|
||||
"name": "Simple Miner",
|
||||
"description": "Mines ores and minerals on depth 1."
|
||||
},
|
||||
"soilminer": {
|
||||
"name": "Soil Miner",
|
||||
"description": "Mines Soil."
|
||||
},
|
||||
"filterleft": {
|
||||
"name": "Item Filter (left)",
|
||||
|
|
@ -142,7 +150,49 @@
|
|||
"tin",
|
||||
"salt"
|
||||
],
|
||||
"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","Pickaxe"],
|
||||
"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",
|
||||
"Pickaxe",
|
||||
"Archimedes Screw",
|
||||
"Cement",
|
||||
"Soil",
|
||||
"Quartz Sand",
|
||||
"Concret",
|
||||
"Dirt"
|
||||
],
|
||||
"more": "Show Inventory / Sell Items",
|
||||
"inventory": "Inventory",
|
||||
"player": "Player",
|
||||
|
|
|
|||