veloren/server/src/rtsim/load_chunks.rs

24 lines
660 B
Rust
Raw Normal View History

2020-11-11 11:42:22 +00:00
use super::*;
use common::{
event::{EventBus, ServerEvent},
2021-03-08 11:13:59 +00:00
system::{Job, Origin, Phase, System},
};
use specs::{Read, WriteExpect};
2020-11-11 11:42:22 +00:00
#[derive(Default)]
2020-11-11 11:42:22 +00:00
pub struct Sys;
2021-03-08 11:13:59 +00:00
impl<'a> System<'a> for Sys {
2020-11-23 15:39:03 +00:00
#[allow(clippy::type_complexity)]
type SystemData = (Read<'a, EventBus<ServerEvent>>, WriteExpect<'a, RtSim>);
2020-11-11 11:42:22 +00:00
const NAME: &'static str = "rtsim::load_chunks";
const ORIGIN: Origin = Origin::Server;
const PHASE: Phase = Phase::Create;
2021-03-08 11:13:59 +00:00
fn run(_job: &mut Job<Self>, (_server_event_bus, mut rtsim): Self::SystemData) {
2020-11-23 15:39:03 +00:00
for _chunk in std::mem::take(&mut rtsim.chunks.chunks_to_load) {
2020-11-11 11:42:22 +00:00
// TODO
}
}
}