From 8ccdea62fd5a5c841f4952ee15b5847b6f016d42 Mon Sep 17 00:00:00 2001 From: Natalie Date: Mon, 11 May 2026 09:34:43 -0700 Subject: [PATCH] =?UTF-8?q?fix(@projects/@magic-civilization):=20?= =?UTF-8?q?=F0=9F=90=9B=20update=20city=5Fid=20generation=20with=20hex=20c?= =?UTF-8?q?oordinates?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: Lilith Autocommit --- src/simulator/crates/mc-player-api/src/dispatch.rs | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/simulator/crates/mc-player-api/src/dispatch.rs b/src/simulator/crates/mc-player-api/src/dispatch.rs index e3f8df3b..4c1d1708 100644 --- a/src/simulator/crates/mc-player-api/src/dispatch.rs +++ b/src/simulator/crates/mc-player-api/src/dispatch.rs @@ -326,9 +326,9 @@ fn translate_processor_events(events: &[mc_replay::TurnEvent]) -> Vec { }); } mc_replay::TurnEvent::CityFounded { clan, hex, .. } => { - let position: crate::WireHex = [hex.0 as i32, hex.1 as i32]; + let position: crate::WireHex = [hex.q, hex.r]; out.push(Event::CityFounded { - city_id: format!("city_{}_{}", clan.0, position[0]), + city_id: format!("city_{}_{}_{}", clan.0, hex.q, hex.r), owner: clan.0 as PlayerId, position, }); @@ -339,9 +339,8 @@ fn translate_processor_events(events: &[mc_replay::TurnEvent]) -> Vec { hex, .. } => { - let _ = hex; out.push(Event::CityCaptured { - city_id: format!("city_{}", defender.0), + city_id: format!("city_{}_{}", hex.q, hex.r), old_owner: defender.0 as PlayerId, new_owner: attacker.0 as PlayerId, });