refactor(mc-player-api): ♻️ Remove deprecated envelope dispatch function and clean up projection logic in comms_dispatch.rs and projection.rs

Co-Authored-By: Lilith Autocommit <noreply@atlilith.com>
This commit is contained in:
autocommit 2026-05-22 02:50:08 -07:00
parent 383f58c2da
commit 3e09fd33a8
2 changed files with 2 additions and 16 deletions

View file

@ -204,20 +204,6 @@ pub fn dispatch_treaty_decline(
flush_to_pending_chronicle(&mut state.comms, sink);
}
/// Allocate + populate + stash a generic envelope. Shared by every
/// dispatch helper above so the route-resolution + storage path lives
/// in one place. Backward-compat shim that discards the dispatched-event;
/// new callers should use [`dispatch_envelope_with_events`].
fn dispatch_envelope(
state: &mut GameState,
sender: PlayerId,
recipient: PlayerId,
payload: Payload,
) -> EnvelopeId {
let mut sink: Vec<TurnEvent> = Vec::new();
dispatch_envelope_with_events(state, sender, recipient, payload, &mut sink)
}
/// Crate-internal accessor for the event-emitting envelope dispatcher.
/// Used by `dispatch.rs::run_end_of_turn_comms_passes` for heartbeat
/// dispatch.

View file

@ -46,11 +46,11 @@ use mc_turn::game_state::GameState;
use mc_vision::{compute_vision, PlayerVision, VisionCatalog};
use crate::view::{
BuildableEntry, CityView, CivicsView, CultureView, DiplomacyView, LegalActionEntry,
CityView, CivicsView, CultureView, DiplomacyView, LegalActionEntry,
PendingEventsView, PlayerView, ProductionQueueEntry, ResearchView, ResourceView, ScoreView,
TileView, UnitView,
};
use crate::{PlayerAction, PlayerId, WireHex};
use crate::{PlayerAction, PlayerId};
/// Odd-q (offset) neighbour deltas — duplicated from
/// `mc-pathfinding::ODD_Q_NEIGHBOR_DELTAS` so the projection crate does