transfer_npc_knowledge system runs after conversations with trust-gated fact exchange, confidence capping at KnowsOf, ToldBy source construction. POI data model with PointOfInterest component and proximity-based discovery via KnowledgeGranted events. Implements D-080. Closes Q-024. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -14,8 +14,11 @@ pub mod inventory;
|
||||
pub mod listening;
|
||||
pub mod monologue;
|
||||
pub mod movement;
|
||||
pub mod npc_knowledge_transfer;
|
||||
pub mod path_follow;
|
||||
pub mod pathfinding;
|
||||
pub mod poi;
|
||||
pub mod poi_discovery;
|
||||
pub mod rng;
|
||||
pub mod sound;
|
||||
pub mod spatial;
|
||||
@@ -42,6 +45,15 @@ impl Plugin for SimulationPlugin {
|
||||
.init_resource::<spatial::NaiveSpatialIndex>()
|
||||
.init_resource::<follow::FollowEndEventQueue>()
|
||||
.init_resource::<monologue::PostConversationQueue>()
|
||||
.init_resource::<poi_discovery::PoiDiscoveryEventQueue>()
|
||||
// discover_pois reads VisibilityGeometry (also populated by PerceptionPlugin).
|
||||
// Init here so SimulationPlugin works standalone in tests without PerceptionPlugin.
|
||||
.init_resource::<crate::perception::query::VisibilityGeometry>()
|
||||
// transfer_npc_knowledge reads RelationshipGraph (also init by NpcPlugin) and
|
||||
// KnowledgeEventQueue (also init by KnowledgePlugin).
|
||||
// Init here so SimulationPlugin works standalone in tests without those plugins.
|
||||
.init_resource::<crate::npc::relationships::RelationshipGraph>()
|
||||
.init_resource::<crate::knowledge::KnowledgeEventQueue>()
|
||||
.add_systems(
|
||||
Update,
|
||||
(
|
||||
@@ -58,9 +70,14 @@ impl Plugin for SimulationPlugin {
|
||||
conversation::run_npc_conversations
|
||||
.after(movement::validate_movement)
|
||||
.before(sound::collect_sound_events),
|
||||
npc_knowledge_transfer::transfer_npc_knowledge
|
||||
.after(conversation::run_npc_conversations),
|
||||
sound::collect_sound_events
|
||||
.after(movement::validate_movement)
|
||||
.before(crate::perception::observer::compute_observer_snapshot),
|
||||
poi_discovery::discover_pois
|
||||
.after(crate::perception::observer::compute_visibility_geometry)
|
||||
.before(crate::perception::observer::compute_observer_snapshot),
|
||||
time::advance_tick.after(path_follow::cleanup_path_blocked),
|
||||
),
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user