Finish birth refusal integration and stabilize client panel checks
Foundation / checks (checks) (push) Successful in 42m5s
Foundation / checks (deploy) (push) Successful in 5s
Foundation / checks (ecs) (push) Successful in 2m24s
Foundation / checks (network) (push) Successful in 18m43s
Foundation / checks (postgres) (push) Successful in 44m0s
Foundation / checks (tsan) (push) Successful in 10m8s
Foundation / checks (client) (push) Successful in 15m13s
Foundation / postgres-tools (push) Successful in 31s
Foundation / server-image (push) Successful in 3m18s
Foundation / image (push) Successful in 3m23s
Foundation / checks (checks) (push) Successful in 42m5s
Foundation / checks (deploy) (push) Successful in 5s
Foundation / checks (ecs) (push) Successful in 2m24s
Foundation / checks (network) (push) Successful in 18m43s
Foundation / checks (postgres) (push) Successful in 44m0s
Foundation / checks (tsan) (push) Successful in 10m8s
Foundation / checks (client) (push) Successful in 15m13s
Foundation / postgres-tools (push) Successful in 31s
Foundation / server-image (push) Successful in 3m18s
Foundation / image (push) Successful in 3m23s
This commit is contained in:
@@ -218,10 +218,12 @@ void durable_mutation_reservations_bind_to_the_exact_offer() {
|
||||
auto revision_owner = owner.migrate_to_v3();
|
||||
CHECK(revision_owner);
|
||||
const auto offer = (*revision_owner)->mutation_offer(life_id);
|
||||
CHECK(offer && *offer && !(*offer)->candidates.empty());
|
||||
CHECK(offer && offer->has_value());
|
||||
const auto offered_candidates = offer->value_or(biology::MutationOffer{});
|
||||
CHECK(!offered_candidates.candidates.empty());
|
||||
const auto& live = (*revision_owner)->lives()[0];
|
||||
const auto action_tick = (*revision_owner)->tick() + 1;
|
||||
const auto& candidate = (*offer)->candidates.front();
|
||||
const auto& candidate = offered_candidates.candidates.front();
|
||||
persistence::CellularMutationReservation reservation;
|
||||
reservation.account = live.account;
|
||||
reservation.action_id = 42;
|
||||
|
||||
@@ -378,8 +378,8 @@ void cellular_panels(const std::filesystem::path& review) {
|
||||
camera->world_to_screen({static_cast<double>(x), static_cast<double>(y)});
|
||||
const auto high = camera->world_to_screen({x + 1.0, y + 1.0});
|
||||
CHECK(low && high);
|
||||
patch_box(boxes, *low, *high, (x + y) % 4 != 0, (x + y) % 3 != 0, x == 2 && y == 3,
|
||||
width, height);
|
||||
patch_box(boxes, *low, *high, (x + y) % 4 != 0 && !(x == 2 && y == 3),
|
||||
(x + y) % 3 != 0, x == 2 && y == 3, width, height);
|
||||
}
|
||||
OrganismCell organism;
|
||||
organism.id = 901;
|
||||
@@ -494,10 +494,12 @@ void cellular_panels(const std::filesystem::path& review) {
|
||||
(review / ("cellular-food-" + std::to_string(width) + ".bmp")).string()));
|
||||
draw();
|
||||
choose_tab("Cell");
|
||||
const auto saved_offer = play.offer();
|
||||
play.disconnected();
|
||||
play.connected();
|
||||
++perception.tick;
|
||||
play.observe(perception);
|
||||
play.observe_offer(saved_offer);
|
||||
view.cellular_feed_target.reset();
|
||||
for (int i = 0; i < 3; ++i)
|
||||
draw();
|
||||
@@ -511,7 +513,11 @@ void cellular_panels(const std::filesystem::path& review) {
|
||||
// Click the first production choice. Pointer ownership prevents world selection.
|
||||
const auto probe = [&](const ImGuiWindow* panel, float x_fraction, const auto& done) {
|
||||
const float x = panel->Pos.x + panel->Size.x * x_fraction;
|
||||
for (int offset = 90; static_cast<float>(offset) < panel->Size.y - 10; offset += 5) {
|
||||
// Every button is at least a frame high. Half-frame spacing still hits
|
||||
// each button, including disabled ones, without rendering every five pixels.
|
||||
const int stride = std::max(1, static_cast<int>(ImGui::GetFrameHeight() / 2));
|
||||
for (int offset = 90; static_cast<float>(offset) < panel->Size.y - 10;
|
||||
offset += stride) {
|
||||
const float y = panel->Pos.y + static_cast<float>(offset);
|
||||
mouse(id, SDL_EVENT_MOUSE_MOTION, x, y);
|
||||
mouse(id, SDL_EVENT_MOUSE_BUTTON_DOWN, x, y);
|
||||
|
||||
@@ -503,6 +503,12 @@ void crossing_regions(const Files& f) {
|
||||
CHECK(db1.claims == region1_claims && db2.claims == region2_claims + 1);
|
||||
}
|
||||
void cellular_birth_without_view(const Files& files) {
|
||||
struct EmptyLedger final : ActionLedger {
|
||||
std::expected<std::optional<ActionOutcome>, ActionLedgerError>
|
||||
find(const AccountId&, std::uint64_t) override {
|
||||
return std::nullopt;
|
||||
}
|
||||
} ledger;
|
||||
test::WorldDb world;
|
||||
test::RegionDb control{world, region};
|
||||
const auto owner = account(0xD1);
|
||||
@@ -510,6 +516,7 @@ void cellular_birth_without_view(const Files& files) {
|
||||
auto answer = PrimitiveLifeResult::pending;
|
||||
Region r{files, [&](server::RegionSessionsConfig& config) {
|
||||
config.ledger = &control;
|
||||
config.actions = &ledger;
|
||||
config.accept_cellular_actions = true;
|
||||
config.create_primitive_life = [&](const AccountId& a, std::uint64_t generation,
|
||||
std::uint64_t id) {
|
||||
|
||||
Reference in New Issue
Block a user