diff --git a/res/ui/building_tutorials/buffer.png b/res/ui/building_tutorials/buffer.png new file mode 100644 index 00000000..3406779d Binary files /dev/null and b/res/ui/building_tutorials/buffer.png differ diff --git a/res_built/atlas/atlas0_10.json b/res_built/atlas/atlas0_10.json index b94d7d2b..74104a73 100644 --- a/res_built/atlas/atlas0_10.json +++ b/res_built/atlas/atlas0_10.json @@ -591,6 +591,6 @@ "format": "RGBA8888", "size": {"w":123,"h":414}, "scale": "0.1", - "smartupdate": "$TexturePacker:SmartUpdate:2e4bb1d6b5b67c09590a86ce806c96d5:6b2a26c8bf1b5650e2239f9e27ffb423:f159918d23e5952766c6d23ab52278c6$" + "smartupdate": "$TexturePacker:SmartUpdate:63b4db988e8721f6f517f8913c819e26:e14e8b033450931af82f20f34432350d:f159918d23e5952766c6d23ab52278c6$" } } diff --git a/res_built/atlas/atlas0_10.png b/res_built/atlas/atlas0_10.png index df05ba37..0a1b0c75 100644 Binary files a/res_built/atlas/atlas0_10.png and b/res_built/atlas/atlas0_10.png differ diff --git a/res_built/atlas/atlas0_100.json b/res_built/atlas/atlas0_100.json index 3ba7d8f5..4da21790 100644 --- a/res_built/atlas/atlas0_100.json +++ b/res_built/atlas/atlas0_100.json @@ -591,6 +591,6 @@ "format": "RGBA8888", "size": {"w":2028,"h":1819}, "scale": "1", - "smartupdate": "$TexturePacker:SmartUpdate:2e4bb1d6b5b67c09590a86ce806c96d5:6b2a26c8bf1b5650e2239f9e27ffb423:f159918d23e5952766c6d23ab52278c6$" + "smartupdate": "$TexturePacker:SmartUpdate:63b4db988e8721f6f517f8913c819e26:e14e8b033450931af82f20f34432350d:f159918d23e5952766c6d23ab52278c6$" } } diff --git a/res_built/atlas/atlas0_100.png b/res_built/atlas/atlas0_100.png index 348bbb14..716990dd 100644 Binary files a/res_built/atlas/atlas0_100.png and b/res_built/atlas/atlas0_100.png differ diff --git a/res_built/atlas/atlas0_25.json b/res_built/atlas/atlas0_25.json index cae5fb05..34ab776b 100644 --- a/res_built/atlas/atlas0_25.json +++ b/res_built/atlas/atlas0_25.json @@ -591,6 +591,6 @@ "format": "RGBA8888", "size": {"w":1033,"h":251}, "scale": "0.25", - "smartupdate": "$TexturePacker:SmartUpdate:2e4bb1d6b5b67c09590a86ce806c96d5:6b2a26c8bf1b5650e2239f9e27ffb423:f159918d23e5952766c6d23ab52278c6$" + "smartupdate": "$TexturePacker:SmartUpdate:63b4db988e8721f6f517f8913c819e26:e14e8b033450931af82f20f34432350d:f159918d23e5952766c6d23ab52278c6$" } } diff --git a/res_built/atlas/atlas0_25.png b/res_built/atlas/atlas0_25.png index d22c0a80..4e9cc91d 100644 Binary files a/res_built/atlas/atlas0_25.png and b/res_built/atlas/atlas0_25.png differ diff --git a/res_built/atlas/atlas0_50.json b/res_built/atlas/atlas0_50.json index f12c8640..6de9ebca 100644 --- a/res_built/atlas/atlas0_50.json +++ b/res_built/atlas/atlas0_50.json @@ -591,6 +591,6 @@ "format": "RGBA8888", "size": {"w":476,"h":1986}, "scale": "0.5", - "smartupdate": "$TexturePacker:SmartUpdate:2e4bb1d6b5b67c09590a86ce806c96d5:6b2a26c8bf1b5650e2239f9e27ffb423:f159918d23e5952766c6d23ab52278c6$" + "smartupdate": "$TexturePacker:SmartUpdate:63b4db988e8721f6f517f8913c819e26:e14e8b033450931af82f20f34432350d:f159918d23e5952766c6d23ab52278c6$" } } diff --git a/res_built/atlas/atlas0_50.png b/res_built/atlas/atlas0_50.png index 85ded190..3d244cbd 100644 Binary files a/res_built/atlas/atlas0_50.png and b/res_built/atlas/atlas0_50.png differ diff --git a/res_built/atlas/atlas0_75.json b/res_built/atlas/atlas0_75.json index ae6371da..4bac7eaa 100644 --- a/res_built/atlas/atlas0_75.json +++ b/res_built/atlas/atlas0_75.json @@ -591,6 +591,6 @@ "format": "RGBA8888", "size": {"w":1663,"h":1258}, "scale": "0.75", - "smartupdate": "$TexturePacker:SmartUpdate:2e4bb1d6b5b67c09590a86ce806c96d5:6b2a26c8bf1b5650e2239f9e27ffb423:f159918d23e5952766c6d23ab52278c6$" + "smartupdate": "$TexturePacker:SmartUpdate:63b4db988e8721f6f517f8913c819e26:e14e8b033450931af82f20f34432350d:f159918d23e5952766c6d23ab52278c6$" } } diff --git a/res_built/atlas/atlas0_75.png b/res_built/atlas/atlas0_75.png index 1af77a16..7b5d9a10 100644 Binary files a/res_built/atlas/atlas0_75.png and b/res_built/atlas/atlas0_75.png differ diff --git a/res_raw/sprites/blueprints/buffer.png b/res_raw/sprites/blueprints/buffer.png index 715d5315..f4a81c32 100644 Binary files a/res_raw/sprites/blueprints/buffer.png and b/res_raw/sprites/blueprints/buffer.png differ diff --git a/res_raw/sprites/buildings/buffer.png b/res_raw/sprites/buildings/buffer.png index 715d5315..f4a81c32 100644 Binary files a/res_raw/sprites/buildings/buffer.png and b/res_raw/sprites/buildings/buffer.png differ diff --git a/src/js/core/config.js b/src/js/core/config.js index 31ced8c2..06807cc9 100644 --- a/src/js/core/config.js +++ b/src/js/core/config.js @@ -91,8 +91,8 @@ export const globalConfig = { // disableZoomLimits: true, // showChunkBorders: true, // rewardsInstant: true, - // allBuildingsUnlocked: true, - // upgradesNoCost: true, + allBuildingsUnlocked: true, + upgradesNoCost: true, // disableUnlockDialog: true, // disableLogicTicks: true, // testClipping: true, diff --git a/src/js/game/core.js b/src/js/game/core.js index d800b602..275b5f24 100644 --- a/src/js/game/core.js +++ b/src/js/game/core.js @@ -403,6 +403,7 @@ export class GameCore { root.map.drawForeground(params); if (!this.root.camera.getIsMapOverlayActive()) { + systems.itemBuffer.draw(params); systems.hub.draw(params); } diff --git a/src/js/game/game_system_manager.js b/src/js/game/game_system_manager.js index 0f33dc26..392c8971 100644 --- a/src/js/game/game_system_manager.js +++ b/src/js/game/game_system_manager.js @@ -88,12 +88,12 @@ export class GameSystemManager { add("hub", HubSystem); + add("itemBuffer", BufferSystem); + add("staticMapEntities", StaticMapEntitySystem); add("itemAcceptor", ItemAcceptorSystem); - add("itemBuffer", BufferSystem); - logger.log("📦 There are", this.systemUpdateOrder.length, "game systems"); } diff --git a/src/js/game/systems/item_buffer.js b/src/js/game/systems/item_buffer.js index 30ef1770..95d4ccff 100644 --- a/src/js/game/systems/item_buffer.js +++ b/src/js/game/systems/item_buffer.js @@ -34,24 +34,19 @@ export class BufferSystem extends GameSystemWithFilter { // Background staticComp.drawSpriteOnFullEntityBounds(parameters, this.bufferSprite, 2.2); - bufferContents.definition.draw(pos.x, pos.y - 5, parameters, 20); + if (bufferContents.definition != null) { + bufferContents.definition.draw(pos.x, pos.y - 11.5, parameters, 26); + } - const textOffsetX = 2; - const textOffsetY = -6; - - context.font = "bold 10px GameFont"; + context.font = "bold 12px GameFont"; context.fillStyle = "#64666e"; - context.textAlign = "left"; - context.fillText("" + formatBigNumber(bufferContents.itemCount), pos.x + textOffsetX, pos.y + textOffsetY); + context.textAlign = "center"; + let text = "" + formatBigNumber(bufferContents.itemCount); - context.font = "10px GameFont"; - context.fillStyle = "#a4a6b0"; - context.fillText( - "/ " + formatBigNumber(bufferContents.storageLimit), - pos.x + textOffsetX, - pos.y + textOffsetY + 13 - ); + if (bufferContents.itemCount === 0) { + text = "EMPTY"; + } - context.textAlign = "left"; + context.fillText(text, pos.x , pos.y + 22); } }