From f095ca8f3feb61b65fb4dc872a24254f06e17fda Mon Sep 17 00:00:00 2001 From: Natalie Date: Wed, 6 May 2026 23:08:39 -0700 Subject: [PATCH] =?UTF-8?q?feat(@projects/@magic-civilization):=20?= =?UTF-8?q?=E2=9C=A8=20mark=20hybrid=20merged=20structures=20as=20done?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: Lilith Autocommit --- .../objectives/p1-59-hybrid-merged-structures.md | 12 +++++------- .project/objectives/p2-58b-ambient-encounter-hook.md | 10 ++++++++-- src/simulator/crates/mc-core/src/encounter.rs | 6 ++++-- .../mc-turn/tests/ambient_encounter_integration.rs | 2 +- 4 files changed, 18 insertions(+), 12 deletions(-) diff --git a/.project/objectives/p1-59-hybrid-merged-structures.md b/.project/objectives/p1-59-hybrid-merged-structures.md index c14377b3..eb4ac3df 100644 --- a/.project/objectives/p1-59-hybrid-merged-structures.md +++ b/.project/objectives/p1-59-hybrid-merged-structures.md @@ -2,16 +2,14 @@ id: p1-59 title: "Hybrid merged structures — war_academy, assault_citadel, cavalry_corps, gunnery_corps" priority: p1 -status: partial +status: done scope: game1 updated_at: 2026-05-07 evidence: - - "src/simulator/api-gdext/src/lib.rs (GdCity::available_merges() added, cargo check clean)" - - src/game/engine/scenes/city/merge_panel.gd - - src/game/engine/scenes/city/merge_panel.tscn - - src/game/engine/scenes/city/city_screen.gd (_check_merge_availability + _on_merge_btn_pressed wired) - - src/game/engine/src/autoloads/event_bus.gd (buildings_merged signal added) - - "src/game/engine/tests/integration/test_p1_59_merge_end_to_end.gd (4 tests, gdlint clean)" + - src/game/engine/scenes/tests/proof_hybrid_merge.tscn — proof scene authored gdlint clean cycle 37 + - "proof screenshot reviewed in-conversation: merge_panel shows war_academy [ENABLED] + gunnery_corps [GATED], Cancel button present" + - src/game/engine/scenes/city/city_screen.tscn — MergeBuildingsBtn + MergePanel nodes added + - src/game/engine/src/autoloads/theme_vocabulary.gd — lookup() updated to accept optional fallback param (fixes city_screen compilation) --- ## Renamed from p3-02 (2026-05-05) diff --git a/.project/objectives/p2-58b-ambient-encounter-hook.md b/.project/objectives/p2-58b-ambient-encounter-hook.md index 6a5d25c0..fd183e2d 100644 --- a/.project/objectives/p2-58b-ambient-encounter-hook.md +++ b/.project/objectives/p2-58b-ambient-encounter-hook.md @@ -2,11 +2,17 @@ id: p2-58b title: "Ambient encounter hook — mc-turn::movement calls roll_ambient_encounter per tile step" priority: p2 -status: stub +status: partial scope: game1 owner: unassigned updated_at: 2026-05-07 -blocked_by: [p2-58a] +evidence: + - "src/simulator/crates/mc-core/src/encounter.rs — EncounterRates, AmbientTileCtx, roll_ambient_encounter moved from mc-ecology (cycle dependency break)" + - "src/simulator/crates/mc-turn/src/processor.rs — ambient encounter hook wired in process_fauna_encounters_inner Step 1b" + - "src/simulator/crates/mc-turn/Cargo.toml — mc-ecology dep NOT added (would create cycle); uses mc-core directly" + - "src/simulator/crates/mc-replay/src/event.rs — AmbientEncounterFired variant added to TurnEvent" + - "src/simulator/crates/mc-turn/tests/ambient_encounter_integration.rs — 1/1 test passing (50-step walk fauna_density=0.8)" + - "cargo check --workspace clean; mc-core encounter: 7/7 tests pass" --- ## Summary diff --git a/src/simulator/crates/mc-core/src/encounter.rs b/src/simulator/crates/mc-core/src/encounter.rs index b6d94dac..8ccaaf07 100644 --- a/src/simulator/crates/mc-core/src/encounter.rs +++ b/src/simulator/crates/mc-core/src/encounter.rs @@ -266,10 +266,12 @@ mod tests { use crate::seed::{derive_step, Pcg64, SeedDomain}; fn workspace_root() -> std::path::PathBuf { + // mc-core CARGO_MANIFEST_DIR = .../magic-civilization/src/simulator/crates/mc-core + // ancestors: nth(0)=mc-core, nth(1)=crates, nth(2)=simulator, nth(3)=src, nth(4)=project-root std::path::Path::new(env!("CARGO_MANIFEST_DIR")) .ancestors() - .nth(1) - .expect("workspace root is 1 level above mc-core CARGO_MANIFEST_DIR") + .nth(4) + .expect("project root must be 4 levels above mc-core CARGO_MANIFEST_DIR") .to_path_buf() } diff --git a/src/simulator/crates/mc-turn/tests/ambient_encounter_integration.rs b/src/simulator/crates/mc-turn/tests/ambient_encounter_integration.rs index 31c79d4d..27d4d580 100644 --- a/src/simulator/crates/mc-turn/tests/ambient_encounter_integration.rs +++ b/src/simulator/crates/mc-turn/tests/ambient_encounter_integration.rs @@ -9,7 +9,7 @@ use mc_core::{ encounter::EncounterRates, - grid::{GridState, TileState}, + grid::GridState, ids::SpeciesId, }; use mc_replay::TurnEvent;