feat(cellular): show what holds growth back and each nutrient's flows
Foundation / checks (checks) (push) Successful in 5s
Foundation / checks (client) (push) Successful in 4s
Foundation / checks (ecs) (push) Successful in 4s
Foundation / checks (network) (push) Successful in 4s
Foundation / checks (postgres) (push) Successful in 5s
Foundation / checks (tsan) (push) Successful in 5s
Foundation / checks (deploy) (push) Successful in 4m23s
Foundation / postgres-tools (push) Successful in 21s
Foundation / server-image (push) Successful in 4m18s
Foundation / image (push) Successful in 4m56s

Playtest: phosphorus jumped between ~100 fg and a few pg because growth spends
it as it arrives and only pauses when another nutrient runs short. The owner
now records, per owned life and tick, which channel narrowed the growth step
(or no room) and what the tick collected, built into the body and burned;
session v14 carries them (flag bits 2-4 and a 120-byte flows block).

The client shows "Growing 62% - waiting for phosphorus" or "Fully grown",
outlines the limiting nutrient's bar in amber, and gives each bar (and the
energy figure) a tooltip with the last second's flows.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
dingo
2026-10-26 09:48:37 -04:00
co-authored by Claude Opus 5.5
parent 6988cf39b2
commit 15b4342934
12 changed files with 224 additions and 23 deletions
+19
View File
@@ -507,6 +507,25 @@ void cellular_revamp_actions() {
CellularLifeDiagnostics body;
body.members = 1;
play.observe({300, 800, {}, body});
// Flows add up over the last second of views (20 ticks) and scale up over missed ones.
{
CellularPlay flows;
flows.initialize(5);
flows.connected();
CellularLifeDiagnostics flowing = body;
flowing.has_tick_effects = true;
flowing.movement = CellularMovementResult::no_movement;
flowing.intake = CellularIntakeResult::acquired;
flowing.collected = {0, 0, 0, 100, 0};
flowing.into_growth = {0, 0, 0, 90, 0};
for (std::uint64_t tick = 1; tick <= 30; ++tick)
flows.observe({tick, 800, {}, flowing});
const auto second = flows.flows_per_second();
CHECK(second.collected[3] == 2'000 && second.into_growth[3] == 1'800);
for (std::uint64_t tick = 31; tick <= 40; tick += 2) // Every other view missed.
flows.observe({tick, 800, {}, flowing});
CHECK(flows.flows_per_second().collected[3] == 2'000);
}
CHECK(play.queue(CellAction::bud, 301, {}, true) && required(play.pending()).become);
play.sent();
play.outcome({required(play.pending()).id, ActionResult::committed, 301, 1});