refactor(server): NearbyInteractionBuffer from Resource to Component
Per-entity Component attached to PlayerCharacter instead of global Resource. Makes the interaction buffer multiplayer-ready (D-009) — each observer gets their own buffer without pipeline refactoring. Updated all 8 files touching the buffer: system signatures, player spawn bundles, and ~30 test spawn sites. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -199,7 +199,6 @@ mod tests {
|
||||
world.init_resource::<crate::knowledge::KnowledgeEventQueue>();
|
||||
world.init_resource::<EntityRegistry>();
|
||||
world.init_resource::<ObservationEventQueue>();
|
||||
world.init_resource::<crate::simulation::interaction::NearbyInteractionBuffer>();
|
||||
world
|
||||
}
|
||||
|
||||
@@ -235,6 +234,7 @@ mod tests {
|
||||
TilePosition::new(16, 16, 0),
|
||||
Facing(FacingDirection::North),
|
||||
KnowledgeGraph::new(),
|
||||
crate::simulation::interaction::NearbyInteractionBuffer::default(),
|
||||
))
|
||||
.id();
|
||||
registry.register(player);
|
||||
@@ -285,6 +285,7 @@ mod tests {
|
||||
TilePosition::new(16, 16, 0),
|
||||
Facing(FacingDirection::North),
|
||||
KnowledgeGraph::new(),
|
||||
crate::simulation::interaction::NearbyInteractionBuffer::default(),
|
||||
))
|
||||
.id();
|
||||
registry.register(player);
|
||||
@@ -355,6 +356,7 @@ mod tests {
|
||||
TilePosition::new(16, 16, 0),
|
||||
Facing(FacingDirection::North),
|
||||
kg,
|
||||
crate::simulation::interaction::NearbyInteractionBuffer::default(),
|
||||
))
|
||||
.id();
|
||||
registry.register(player);
|
||||
@@ -387,6 +389,7 @@ mod tests {
|
||||
TilePosition::new(16, 16, 0),
|
||||
Facing(FacingDirection::North),
|
||||
KnowledgeGraph::new(), // Empty — never seen anyone
|
||||
crate::simulation::interaction::NearbyInteractionBuffer::default(),
|
||||
))
|
||||
.id();
|
||||
registry.register(player);
|
||||
@@ -433,6 +436,7 @@ mod tests {
|
||||
TilePosition::new(16, 16, 0),
|
||||
Facing(FacingDirection::North),
|
||||
kg,
|
||||
crate::simulation::interaction::NearbyInteractionBuffer::default(),
|
||||
))
|
||||
.id();
|
||||
registry.register(player);
|
||||
|
||||
Reference in New Issue
Block a user