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
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:
@@ -619,13 +619,17 @@ void v14_carries_the_revamp() {
|
||||
d.can_emerge = false;
|
||||
d.split_ready = true;
|
||||
d.growth_per_thousand = 620;
|
||||
d.growth_limit = 4; // Phosphorus.
|
||||
d.collected = {5, 4'000, 1'200, 90, 2'400};
|
||||
d.into_growth = {7, 3'900, 1'100, 100, 2'300};
|
||||
d.burned = {0, 0, 0, 0, 12};
|
||||
d.payable_energy_pj = 12'000;
|
||||
d.total_mass_fg = 24'000'000;
|
||||
for (std::size_t i = 0; i < d.traits.size(); ++i)
|
||||
d.traits.at(i) = static_cast<std::uint16_t>(100 + i);
|
||||
CellularPerception view{77, 7, {}, d};
|
||||
const auto bytes = encode_session(SessionMessage{view}, session_protocol_v14);
|
||||
CHECK(bytes.size() == session_header_bytes + 18 + 64 + 40 + 16 + 56 + 64);
|
||||
CHECK(bytes.size() == session_header_bytes + 18 + 64 + 40 + 16 + 56 + 64 + 120);
|
||||
std::uint16_t version{};
|
||||
const auto decoded = decode_session(bytes, &version);
|
||||
CHECK(decoded && version == session_protocol_v14 &&
|
||||
@@ -640,7 +644,10 @@ void v14_carries_the_revamp() {
|
||||
bad[block + 4] = 0x10;
|
||||
CHECK(!decode_session(bad));
|
||||
bad = bytes;
|
||||
bad[block + 5] = 4; // Flags: bit 0 Emerge open, bit 1 split ready.
|
||||
bad[block + 5] = 7U << 2U; // Flags: bits 2-4 the growth limit, at most 6.
|
||||
CHECK(!decode_session(bad));
|
||||
bad = bytes;
|
||||
bad[block + 64 + 80] = 1; // Energy is never burned.
|
||||
CHECK(!decode_session(bad));
|
||||
bad = bytes;
|
||||
bad[block + 6] = 0xE9; // Growth 1,001 per thousand.
|
||||
|
||||
Reference in New Issue
Block a user