ADR 0127
Foundation / checks (deploy) (push) Successful in 6s
Foundation / checks (ecs) (push) Successful in 2m23s
Foundation / checks (tsan) (push) Successful in 10m11s
Foundation / checks (client) (push) Failing after 14m26s
Foundation / checks (network) (push) Successful in 18m54s
Foundation / checks (checks) (push) Successful in 42m9s
Foundation / checks (postgres) (push) Successful in 43m51s
Foundation / postgres-tools (push) Skipped
Foundation / server-image (push) Skipped
Foundation / image (push) Skipped

This commit is contained in:
dingo
2026-10-15 09:32:51 -04:00
parent 0a0f6c3bb1
commit 817a830a8a
20 changed files with 474 additions and 28 deletions
+42 -5
View File
@@ -568,6 +568,23 @@ void cell_vitals(const PanelView& v) {
ImGui::PushFont(nullptr, 24);
ImGui::TextWrapped("%llu pJ", static_cast<unsigned long long>(d.reserve_energy_pj));
ImGui::PopFont();
if (const auto& change = play->energy_change(); change) {
ImGui::TextColored(change->falling ? amber : green, "%s%llu pJ net",
change->falling ? "-" : "+",
static_cast<unsigned long long>(change->amount));
ImGui::TextDisabled("Across %llu observed ticks",
static_cast<unsigned long long>(change->to_tick - change->from_tick));
if (change->falling)
disabled_wrapped(
"Energy is falling. Feeding may not cover upkeep, movement or actions.");
}
if (v.cellular_feed_target) {
const auto patch = std::ranges::find_if(p->patches, [&](const auto& candidate) {
return v.cellular_feed_target == std::pair{candidate.x_um, candidate.y_um};
});
if (patch != p->patches.end() && patch->energy_pj == 0)
ImGui::TextWrapped("FEED TARGET HAS NO ENERGY. Check Food for another patch.");
}
ImGui::Separator();
if (ImGui::BeginTable("matter", 2, ImGuiTableFlags_SizingStretchSame)) {
constexpr std::array names{"Carbon", "Nitrogen", "Phosphorus", "Other matter"};
@@ -588,8 +605,8 @@ void cell_vitals(const PanelView& v) {
static_cast<unsigned long long>(d.movement_cost_pj));
constexpr std::array movement{"Unavailable", "Resting", "Moving", "Movement blocked",
"Not enough energy to move"};
constexpr std::array intake{"Unavailable", "Not feeding", "Food absorbed", "Food patch missing",
"Move into contact to feed"};
constexpr std::array intake{"Unavailable", "Not feeding", "Feeding attempt processed",
"Food patch missing", "Move into contact to feed"};
constexpr std::array engulf{"Unavailable",
"Not requested",
"Prey engulfed",
@@ -606,6 +623,8 @@ void cell_vitals(const PanelView& v) {
"No space for a bud"};
ImGui::TextWrapped("%s", movement.at(static_cast<std::size_t>(d.movement)));
ImGui::TextWrapped("%s", intake.at(static_cast<std::size_t>(d.intake)));
if (d.intake == network::CellularIntakeResult::acquired)
disabled_wrapped("A feeding attempt can yield zero energy. Watch the reserve change.");
if (const auto& feedback = play->engulf_feedback(); feedback)
ImGui::TextWrapped("%s (tick %llu)", engulf.at(static_cast<std::size_t>(feedback->second)),
static_cast<unsigned long long>(feedback->first));
@@ -620,8 +639,12 @@ void cell_food(const PanelView& v, PanelActions& a, FormBuffers& form) {
ImGui::Checkbox("Precision steering (20%)", &form.cellular_controls.precision);
ImGui::SetNextItemWidth(-1);
ImGui::SliderInt("##speed", &form.cellular_controls.speed_percent, 1, 100, "Speed: %d%%");
disabled_wrapped("Steer onto food. Automatic feeding targets a stocked patch touching your "
"cell. Choose a patch below to switch to manual feeding.");
disabled_wrapped(
"Map key: gold E = energy, teal M = matter; no letters = empty (zoom in to "
"see letters). Auto feed prefers energy in contact. Choose a patch for manual feeding.");
disabled_wrapped("Patch stock is finite and shared. Matter does not replenish energy. Uptake "
"is limited by your cell; stock is not a promise of gain each tick. Upkeep is "
"paid before feeding.");
const bool active = v.cellular_play && v.cellular_play->fresh() && v.cellular_play->life() != 0;
ImGui::BeginDisabled(!active);
if (v.cellular_feed_target && ImGui::Button("Stop feeding", {-1, 0}))
@@ -634,7 +657,13 @@ void cell_food(const PanelView& v, PanelActions& a, FormBuffers& form) {
ImGui::PushID(static_cast<int>(patch.y_um));
ImGui::Separator();
ImGui::Text("Patch %u / %u um", patch.x_um, patch.y_um);
ImGui::Text("%llu pJ", static_cast<unsigned long long>(patch.energy_pj));
const bool has_matter =
std::ranges::any_of(patch.matter_fg, [](auto amount) { return amount != 0; });
ImGui::TextColored(patch.energy_pj != 0 ? amber : green, "%s",
patch.energy_pj != 0 ? "E ENERGY AVAILABLE"
: has_matter ? "M MATTER ONLY / NO ENERGY"
: "EMPTY / DEPLETED");
ImGui::Text("Energy stock: %llu pJ", static_cast<unsigned long long>(patch.energy_pj));
ImGui::TextWrapped("C %llu / N %llu / P %llu / other %llu fg",
static_cast<unsigned long long>(patch.matter_fg[0]),
static_cast<unsigned long long>(patch.matter_fg[1]),
@@ -693,6 +722,10 @@ void cell_evolution(const PanelView& v, PanelActions& a) {
: cause == network::CellularDeathReason::engulfed
? "Your cell was engulfed."
: "The cause was not recorded.");
if (cause == network::CellularDeathReason::starved)
disabled_wrapped("Your reserve could not pay upkeep before feeding. A patch can "
"still hold matter after its energy runs out; intake can also be "
"slower than your energy spending.");
ImGui::TextWrapped("Its history and descendants remain. Your next life begins as a new "
"primitive cell.");
} else {
@@ -705,6 +738,10 @@ void cell_evolution(const PanelView& v, PanelActions& a) {
if (ImGui::Button("Start new life", {-1, px(38)}))
a.restart_life = true;
ImGui::EndDisabled();
if (play->birth_pending())
disabled_wrapped(
"Waiting for the server. Rechecking this same birth request every "
"2 seconds. Reconnecting or creating an account cannot refill a nursery.");
if (v.remote && !v.remote->cellular_action.empty())
ImGui::TextWrapped("%s", v.remote->cellular_action.c_str());
return;