fix(server): address PR #14 review — ordering, docs, version pin
- Fix NpcPlugin system ordering: .before(compute_paths) instead of .after(advance_tick) so PathRequests are picked up same frame - Fix stale doc comment in interpretation.rs: system runs BEFORE knowledge events, not after - Add TODO(v0.2) on RelationshipGraph about information boundary limitation for multiplayer - Document cardinal-only movement as deliberate v0.1 choice - Add comment on manhattan_distance u32::MAX fallback for cross-z - Pin pathfinding crate to 4.11 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -25,7 +25,7 @@ impl Plugin for NpcPlugin {
|
||||
.add_systems(
|
||||
Update,
|
||||
routine::check_phase_transition
|
||||
.after(crate::simulation::time::advance_tick),
|
||||
.before(crate::simulation::pathfinding::compute_paths),
|
||||
);
|
||||
|
||||
tracing::debug!("NpcPlugin initialized");
|
||||
|
||||
@@ -25,6 +25,12 @@ pub struct RelationshipEdge {
|
||||
/// Global relationship graph resource.
|
||||
/// BTreeMap<(subject, target), edge> for deterministic iteration (D-010).
|
||||
/// Directed graph: edge (A, B) represents how A feels about B.
|
||||
///
|
||||
/// TODO(v0.2): This is a global omniscient resource — all entities share one
|
||||
/// graph. This violates information boundaries (D-009/D-010) because any
|
||||
/// system can read any relationship. For multiplayer, this needs per-observer
|
||||
/// projection so each entity only sees relationships they should know about.
|
||||
/// Acceptable for v0.1 single-player where the server is authoritative.
|
||||
#[derive(Resource, Debug, Clone, Default, Serialize, Deserialize)]
|
||||
pub struct RelationshipGraph {
|
||||
edges: BTreeMap<(StableId, StableId), RelationshipEdge>,
|
||||
|
||||
Reference in New Issue
Block a user