Wire cellular playtest into engineering client
Foundation / checks (deploy) (push) Successful in 5s
Foundation / checks (checks) (push) Failing after 39s
Foundation / checks (postgres) (push) Canceled after 0s
Foundation / checks (tsan) (push) Canceled after 0s
Foundation / postgres-tools (push) Canceled after 0s
Foundation / server-image (push) Canceled after 0s
Foundation / image (push) Canceled after 0s
Foundation / checks (ecs) (push) Canceled after 42s
Foundation / checks (network) (push) Canceled after 12s
Foundation / checks (client) (push) Canceled after 52s
Foundation / checks (deploy) (push) Successful in 5s
Foundation / checks (checks) (push) Failing after 39s
Foundation / checks (postgres) (push) Canceled after 0s
Foundation / checks (tsan) (push) Canceled after 0s
Foundation / postgres-tools (push) Canceled after 0s
Foundation / server-image (push) Canceled after 0s
Foundation / image (push) Canceled after 0s
Foundation / checks (ecs) (push) Canceled after 42s
Foundation / checks (network) (push) Canceled after 12s
Foundation / checks (client) (push) Canceled after 52s
This commit is contained in:
@@ -124,6 +124,9 @@ void launcher(const PanelView& v, FormBuffers& form, PanelActions& a) {
|
||||
ImGui::InputText("Server name", form.server_name.data(), form.server_name.size());
|
||||
ImGui::InputText("Dev CA file", form.authority.data(), form.authority.size());
|
||||
ImGui::InputText("Grant bundle file", form.grants.data(), form.grants.size());
|
||||
bool cellular_trial = v.cellular_trial;
|
||||
if (ImGui::Checkbox("Cellular trial (v8)", &cellular_trial))
|
||||
a.cellular_trial = cellular_trial;
|
||||
const bool start = phase == LaunchPhase::choosing && ImGui::Button("Connect", {px(160), 0});
|
||||
ImGui::EndDisabled();
|
||||
if (start)
|
||||
@@ -351,7 +354,7 @@ void controls(const PanelView& v, PanelActions& a) {
|
||||
ImGui::End();
|
||||
}
|
||||
|
||||
void session(const PanelView& v) {
|
||||
void session(const PanelView& v, PanelActions& a) {
|
||||
if (!v.remote)
|
||||
return;
|
||||
const auto& io = ImGui::GetIO();
|
||||
@@ -361,6 +364,8 @@ void session(const PanelView& v) {
|
||||
ImGui::SetNextWindowSize({px(360), 0}, when);
|
||||
ImGui::Begin("Session");
|
||||
const auto& s = *v.remote;
|
||||
if (s.cellular_trial)
|
||||
ImGui::TextColored(amber, "CELLULAR TRIAL - exploratory server-authoritative play");
|
||||
if (ImGui::BeginTable("status", 3, ImGuiTableFlags_SizingFixedFit)) {
|
||||
row("Connection", s.phase);
|
||||
row("Session / epoch", std::to_string(s.session) + " / " + std::to_string(s.epoch));
|
||||
@@ -393,6 +398,50 @@ void session(const PanelView& v) {
|
||||
}
|
||||
ImGui::EndTable();
|
||||
}
|
||||
if (s.cellular_trial) {
|
||||
ImGui::Separator();
|
||||
ImGui::TextUnformatted("Nearby food patches (server sensor view)");
|
||||
if (!s.cellular_action.empty())
|
||||
ImGui::TextWrapped("%s", s.cellular_action.c_str());
|
||||
if (!v.cellular_perception) {
|
||||
ImGui::TextDisabled("Waiting for the first cell view...");
|
||||
} else if (v.cellular_perception->life_identity == 0) {
|
||||
ImGui::TextColored(amber, "No living cell is currently bound to this account.");
|
||||
} else {
|
||||
ImGui::Text("Life %llu, tick %llu",
|
||||
static_cast<unsigned long long>(v.cellular_perception->life_identity),
|
||||
static_cast<unsigned long long>(v.cellular_perception->tick));
|
||||
ImGui::TextDisabled("Steer with movement keys. Feeding continues until stopped.");
|
||||
if (v.cellular_feed_target && ImGui::SmallButton("Stop feeding"))
|
||||
a.stop_feeding = true;
|
||||
if (ImGui::BeginChild("cellular-patches", {0, px(142)}, true)) {
|
||||
const auto& patches = v.cellular_perception->patches;
|
||||
if (patches.empty())
|
||||
ImGui::TextDisabled("No provisioned food within sensor range.");
|
||||
for (std::size_t i = 0; i < patches.size(); ++i) {
|
||||
const auto& patch = patches[i];
|
||||
ImGui::PushID(static_cast<int>(i));
|
||||
ImGui::Text("Patch (%u, %u) um", patch.x_um, patch.y_um);
|
||||
ImGui::TextWrapped("Energy %llu pJ | C %llu N %llu P %llu O %llu fg",
|
||||
static_cast<unsigned long long>(patch.energy_pj),
|
||||
static_cast<unsigned long long>(patch.matter_fg[0]),
|
||||
static_cast<unsigned long long>(patch.matter_fg[1]),
|
||||
static_cast<unsigned long long>(patch.matter_fg[2]),
|
||||
static_cast<unsigned long long>(patch.matter_fg[3]));
|
||||
const bool active = v.cellular_feed_target &&
|
||||
v.cellular_feed_target->first == patch.x_um &&
|
||||
v.cellular_feed_target->second == patch.y_um;
|
||||
if (active)
|
||||
ImGui::TextColored(green, "Feeding target");
|
||||
else if (ImGui::SmallButton("Feed this patch"))
|
||||
a.feed_patch = {patch.x_um, patch.y_um};
|
||||
ImGui::Separator();
|
||||
ImGui::PopID();
|
||||
}
|
||||
}
|
||||
ImGui::EndChild();
|
||||
}
|
||||
}
|
||||
disabled_wrapped("Intentions (newest first; this is the record, toasts expire):");
|
||||
if (v.outcomes &&
|
||||
ImGui::BeginTable("outcomes", 3, ImGuiTableFlags_RowBg | ImGuiTableFlags_SizingFixedFit)) {
|
||||
@@ -512,7 +561,7 @@ PanelActions draw_panels(const PanelView& view, FormBuffers& form,
|
||||
banner(view, actions);
|
||||
legend(view, display);
|
||||
inspector(view);
|
||||
session(view);
|
||||
session(view, actions);
|
||||
}
|
||||
controls(view, actions);
|
||||
notices(view, actions);
|
||||
|
||||
Reference in New Issue
Block a user