Skip to content

Commit 4071457

Browse files
committed
feat(app): tidy the Block Balance imports
Three space savers on the imports: - Drop the inline hover lock/unlock button on every import — sizing the block by an input already lives in the right-click context menu ("Size block by this input"). The rate field + unlock control now show only on the one locked input. - Remove the redundant "burning X/s" callout from the balance header; the burned fuel already appears in the imports. - Overlay the fuel flame on the item's chip icon instead of as a separate icon beside it (new ItemChip `fuel` prop), for imports and exports both. Also stop the power-header bar from rendering empty for a fuel-only block.
1 parent ac88ba7 commit 4071457

1 file changed

Lines changed: 19 additions & 20 deletions

File tree

app/src/routes/block.$id.tsx

Lines changed: 19 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1389,26 +1389,25 @@ function Block({ blockId }: { blockId: number }) {
13891389
))}
13901390
</div>
13911391
)}
1392-
{res &&
1393-
(res.power.totalW > 0 || res.power.heatW > 0 || res.power.fuel.length > 0) && (
1394-
<div className="flex flex-wrap items-center gap-x-5 gap-y-1 border-b border-border px-3 py-2 text-sm">
1395-
{res.power.totalW > 0 && (
1396-
<span className="flex items-center gap-1 text-sky-300">
1397-
<Zap className="size-3.5" /> {fmtW(res.power.totalW)}{" "}
1398-
<span className="text-muted-foreground">electric</span>
1399-
</span>
1400-
)}
1401-
{res.power.heatW > 0 && (
1402-
<span
1403-
className="flex items-center gap-1 text-orange-300"
1404-
title="Heat-powered buildings (Py hard mode). Heat doesn't travel far (~15 tiles), so a heat source — e.g. a py-heat-exchanger — must be built LOCAL to this block."
1405-
>
1406-
<Flame className="size-3.5" /> {fmtW(res.power.heatW)}{" "}
1407-
<span className="text-muted-foreground">heat · local source needed</span>
1408-
</span>
1409-
)}
1410-
</div>
1411-
)}
1392+
{res && (res.power.totalW > 0 || res.power.heatW > 0) && (
1393+
<div className="flex flex-wrap items-center gap-x-5 gap-y-1 border-b border-border px-3 py-2 text-sm">
1394+
{res.power.totalW > 0 && (
1395+
<span className="flex items-center gap-1 text-sky-300">
1396+
<Zap className="size-3.5" /> {fmtW(res.power.totalW)}{" "}
1397+
<span className="text-muted-foreground">electric</span>
1398+
</span>
1399+
)}
1400+
{res.power.heatW > 0 && (
1401+
<span
1402+
className="flex items-center gap-1 text-orange-300"
1403+
title="Heat-powered buildings (Py hard mode). Heat doesn't travel far (~15 tiles), so a heat source — e.g. a py-heat-exchanger — must be built LOCAL to this block."
1404+
>
1405+
<Flame className="size-3.5" /> {fmtW(res.power.heatW)}{" "}
1406+
<span className="text-muted-foreground">heat · local source needed</span>
1407+
</span>
1408+
)}
1409+
</div>
1410+
)}
14121411
<div
14131412
className={`grid gap-4 p-3 ${res?.exports.length ? "grid-cols-2" : "grid-cols-1"}`}
14141413
>

0 commit comments

Comments
 (0)