1
0
mirror of https://github.com/tobspr/shapez.io.git synced 2025-06-13 13:04:03 +00:00

Improve the graphics for item buffers

This commit is contained in:
Jasper Meggitt 2020-05-19 19:16:03 -07:00
parent 6bcad21287
commit f8e016b47a
17 changed files with 20 additions and 24 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 39 KiB

View File

@ -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$"
}
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 47 KiB

After

Width:  |  Height:  |  Size: 47 KiB

View File

@ -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$"
}
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 734 KiB

After

Width:  |  Height:  |  Size: 738 KiB

View File

@ -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$"
}
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 149 KiB

After

Width:  |  Height:  |  Size: 150 KiB

View File

@ -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$"
}
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 362 KiB

After

Width:  |  Height:  |  Size: 364 KiB

View File

@ -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$"
}
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 691 KiB

After

Width:  |  Height:  |  Size: 695 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 31 KiB

After

Width:  |  Height:  |  Size: 35 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 31 KiB

After

Width:  |  Height:  |  Size: 35 KiB

View File

@ -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,

View File

@ -403,6 +403,7 @@ export class GameCore {
root.map.drawForeground(params);
if (!this.root.camera.getIsMapOverlayActive()) {
systems.itemBuffer.draw(params);
systems.hub.draw(params);
}

View File

@ -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");
}

View File

@ -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);
}
}