Move outcome vec from being defined in frontend and server to common.

This commit is contained in:
Sam 2021-01-23 15:17:36 -05:00
parent 47bd74469b
commit 77312ccdd4
3 changed files with 2 additions and 4 deletions

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

@ -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());