Moved outcome vec to common.

This commit is contained in:
Sam 2021-01-23 11:30:09 -05:00
parent 9fff1ac654
commit a735ed0ddd
5 changed files with 4 additions and 7 deletions

View File

@ -232,8 +232,6 @@ impl Client {
state
.ecs_mut()
.register::<comp::Last<comp::CharacterState>>();
// TODO: Probably not a good thing to do!
state.ecs_mut().insert(Vec::<Outcome>::new());
let entity = state.ecs_mut().apply_entity_package(entity_package);
*state.ecs_mut().write_resource() = time_of_day;

View File

@ -182,6 +182,7 @@ impl State {
ecs.insert(TerrainChanges::default());
ecs.insert(EventBus::<LocalEvent>::default());
ecs.insert(game_mode);
ecs.insert(Vec::<common::outcome::Outcome>::new());
// TODO: only register on the server
ecs.insert(EventBus::<ServerEvent>::default());
ecs.insert(comp::group::GroupManager::default());

View File

@ -54,7 +54,6 @@ use common::{
comp,
comp::CharacterAbility,
event::{EventBus, ServerEvent},
outcome::Outcome,
recipe::default_recipe_book,
resources::TimeOfDay,
rtsim::RtSimEntity,
@ -179,7 +178,6 @@ impl Server {
state
.ecs_mut()
.insert(CharacterLoader::new(&persistence_db_dir)?);
state.ecs_mut().insert(Vec::<Outcome>::new());
// System timers for performance monitoring
state.ecs_mut().insert(sys::EntitySyncTimer::default());

View File

@ -235,7 +235,8 @@ async fn main() {
use env_logger::Env;
kankyo::init().ok();
env_logger::Builder::from_env(Env::default().default_filter_or("warn,veloren_torvus=debug")).init();
env_logger::Builder::from_env(Env::default().default_filter_or("warn,veloren_torvus=debug"))
.init();
let token: String = env_key("DISCORD_TOKEN");
let veloren_server: SocketAddr = env::var("VELOREN_SERVER")

View File

@ -2,7 +2,7 @@ pub mod comp;
pub mod sys;
use crate::audio::sfx::SfxEventItem;
use common::{event::EventBus, outcome::Outcome};
use common::event::EventBus;
use specs::{Entity, World, WorldExt};
#[derive(Copy, Clone, Debug)]
@ -11,7 +11,6 @@ pub struct MyEntity(pub Entity);
pub fn init(world: &mut World) {
world.register::<comp::HpFloaterList>();
world.register::<comp::Interpolated>();
world.insert(Vec::<Outcome>::new());
// Voxygen event buses
world.insert(EventBus::<SfxEventItem>::default());