fix(simulation): clean up warnings in spawn and template modules (#166)
Remove duplicate #[test] attribute, unused TemplateId import, and dead spawn_escalation_npc helper function (no longer referenced after #250 refactor). Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -1263,7 +1263,6 @@ mod tests {
|
||||
assert_eq!(edge.trust, 7);
|
||||
}
|
||||
|
||||
#[test]
|
||||
#[test]
|
||||
fn spawn_npc_combat_trained_sets_skill_flag() {
|
||||
// #91: combat_trained: true in YAML sets SkillSet.combat_trained = true.
|
||||
@@ -1343,8 +1342,8 @@ mod tests {
|
||||
fn minimal_template_def_4_roles() -> crate::content::template::FullTemplateDef {
|
||||
use crate::content::template::{
|
||||
ConflictType, CrossTemplateLinkSpec, FullTemplateDef, NpcAxis, PrivacyLevel,
|
||||
RelationshipConstraint, RoleId, RoleSchema, SpaceSpec, TemplateId, TrafficPattern,
|
||||
TriangleDef, TriangleId, TrustRange,
|
||||
RelationshipConstraint, RoleId, RoleSchema, SpaceSpec, TrafficPattern, TriangleDef,
|
||||
TriangleId, TrustRange,
|
||||
};
|
||||
use crate::npc::{RelationshipKind, Skill};
|
||||
|
||||
|
||||
@@ -1564,7 +1564,6 @@ mod tests {
|
||||
// #250 — Triangle escalation system tests
|
||||
// -----------------------------------------------------------------------
|
||||
|
||||
use crate::npc::Npc;
|
||||
use crate::simulation::time::SimulationTime;
|
||||
use bevy_ecs::schedule::Schedule;
|
||||
|
||||
@@ -1577,33 +1576,6 @@ mod tests {
|
||||
world
|
||||
}
|
||||
|
||||
/// Helper: spawn an NPC with a known StableId and ToleranceThreshold,
|
||||
/// and register it in the EntityRegistry.
|
||||
fn spawn_escalation_npc(
|
||||
world: &mut bevy_ecs::world::World,
|
||||
stable_id: u64,
|
||||
threshold: i16,
|
||||
) -> bevy_ecs::entity::Entity {
|
||||
let sid = StableId(stable_id);
|
||||
let entity = world
|
||||
.spawn((
|
||||
Npc,
|
||||
ActiveSim,
|
||||
StableEntityId(sid),
|
||||
ToleranceThreshold {
|
||||
current_stress: 0,
|
||||
threshold,
|
||||
},
|
||||
))
|
||||
.id();
|
||||
|
||||
world
|
||||
.resource_mut::<EntityRegistry>()
|
||||
.register_existing(entity, sid);
|
||||
|
||||
entity
|
||||
}
|
||||
|
||||
// escalation_simmering_to_active, resolve, dormant_skip, resolved_skip,
|
||||
// game-minute-only, active-sim-only, saturation, resolve-targeting — all
|
||||
// covered by integration tests in tests/triangle_escalation.rs.
|
||||
|
||||
Reference in New Issue
Block a user