diff --git a/public/images/Thumbs.db b/public/images/Thumbs.db index f2be7e9..a026b9f 100644 Binary files a/public/images/Thumbs.db and b/public/images/Thumbs.db differ diff --git a/public/images/end.png b/public/images/end.png index 5a50721..5893f66 100644 Binary files a/public/images/end.png and b/public/images/end.png differ diff --git a/public/images/entities.png b/public/images/entities.png index 6d018f7..956d8f5 100644 Binary files a/public/images/entities.png and b/public/images/entities.png differ diff --git a/public/images/hud.png b/public/images/hud.png index f551c4d..1149e4e 100644 Binary files a/public/images/hud.png and b/public/images/hud.png differ diff --git a/public/images/intro_01.png b/public/images/intro_01.png index f047a2a..57ca308 100644 Binary files a/public/images/intro_01.png and b/public/images/intro_01.png differ diff --git a/public/images/intro_02.png b/public/images/intro_02.png index 565a5fb..b32d1db 100644 Binary files a/public/images/intro_02.png and b/public/images/intro_02.png differ diff --git a/public/images/intro_03.png b/public/images/intro_03.png index 278768c..981d50f 100644 Binary files a/public/images/intro_03.png and b/public/images/intro_03.png differ diff --git a/public/images/intro_04.png b/public/images/intro_04.png index 5f43eb9..0a51d2f 100644 Binary files a/public/images/intro_04.png and b/public/images/intro_04.png differ diff --git a/public/images/layerdetails.png b/public/images/layerdetails.png index 113a8bd..2270e09 100644 Binary files a/public/images/layerdetails.png and b/public/images/layerdetails.png differ diff --git a/src/entities/base.coffee b/src/entities/base.coffee index 142b1d2..4d2e824 100644 --- a/src/entities/base.coffee +++ b/src/entities/base.coffee @@ -22,4 +22,5 @@ class Base @frame += 1 spaceProvided: 300 + energyProvided: 7 isDockable: true diff --git a/src/entities/miner.coffee b/src/entities/miner.coffee index 7757474..b5f010c 100644 --- a/src/entities/miner.coffee +++ b/src/entities/miner.coffee @@ -22,4 +22,5 @@ class Miner @frame += 1 spaceProvided: 5 + energyProvided: 0 isDockable: false diff --git a/src/entities/silo.coffee b/src/entities/silo.coffee index 437d602..36c5274 100644 --- a/src/entities/silo.coffee +++ b/src/entities/silo.coffee @@ -21,6 +21,7 @@ class Silo @frame += 1 spaceProvided: 150 + energyProvided: 0 isDockable: true diff --git a/src/entities/solarpanel.coffee b/src/entities/solarpanel.coffee index f267cf8..8214f1c 100644 --- a/src/entities/solarpanel.coffee +++ b/src/entities/solarpanel.coffee @@ -11,4 +11,5 @@ class Solarpanel false spaceProvided: 0 + energyProvided: 15 isDockable: true diff --git a/src/game.coffee b/src/game.coffee index fcf42c2..747907c 100644 --- a/src/game.coffee +++ b/src/game.coffee @@ -4,6 +4,8 @@ app.game = @map[i] = new Tile(i) @map[20*5+10].entity = new Base + # TODO: BUG BUG: ... the base is some time replaced by a tile ... + @mouseX = 0 @mouseY = 0 @currentHoveredTile = new Tile(-1) @@ -199,6 +201,16 @@ app.game = space += amount for resource, amount of @resources space + solarpanelCount: -> + energy = 0 + for tile in app.game.map + energy += 1 if tile.entity and tile.entity.energyProvided > 10 + energy + + gameEndCheck: -> + return true if @solarpanelCount() >= 4 + false + resources: stardust: 0 dirt: 0 diff --git a/src/hud.coffee b/src/hud.coffee index 35d7fcd..7b10a23 100644 --- a/src/hud.coffee +++ b/src/hud.coffee @@ -48,9 +48,16 @@ app.game.hud = x = 44+f y = 112 - app.layer.setPixel(resourcePanelColor, x, y) + # Energy production (47) + + length = Math.round(((25*app.game.solarpanelCount())*45)/100) + for i in [0..length] + app.layer.setPixel("#228ca5", 49+i, 91) + app.layer.setPixel("#8ddaed", 50+i, 92) + app.layer.setPixel("#228ca5", 49+i, 93) + switch panelusage when 'tile' @showResources()