#[cfg(test)] mod tests { use common::{ comp::{ item::MaterialStatManifest, tool::AbilityMap, CharacterActivity, CharacterState, Controller, Energy, Ori, PhysicsState, Poise, Pos, Stats, Vel, }, resources::{DeltaTime, GameMode, Time}, shared_server_config::ServerConstants, terrain::{MapSizeLg, TerrainChunk}, uid::Uid, util::Dir, SkillSetBuilder, }; use common_ecs::dispatch; use common_state::State; use rand::thread_rng; use specs::{Builder, Entity, WorldExt}; use std::{sync::Arc, time::Duration}; use vek::{approx::AbsDiffEq, Vec2, Vec3}; use veloren_common_systems::character_behavior; const DEFAULT_WORLD_CHUNKS_LG: MapSizeLg = if let Ok(map_size_lg) = MapSizeLg::new(Vec2 { x: 1, y: 1 }) { map_size_lg } else { panic!("Default world chunk size does not satisfy required invariants."); }; fn setup() -> State { let pools = State::pools(GameMode::Server); let mut state = State::new( GameMode::Server, pools, DEFAULT_WORLD_CHUNKS_LG, Arc::new(TerrainChunk::water(0)), |dispatch_builder| { dispatch::(dispatch_builder, &[]); }, common_state::plugin::PluginMgr::default(), ); let msm = MaterialStatManifest::load().cloned(); state.ecs_mut().insert(msm); state.ecs_mut().insert(AbilityMap::load().cloned()); state.ecs_mut().read_resource::