veloren/server/src/rtsim/unload_chunks.rs

38 lines
846 B
Rust
Raw Normal View History

2020-11-11 11:42:22 +00:00
use super::*;
use common::{
event::{EventBus, ServerEvent},
terrain::TerrainGrid,
comp::Pos,
};
use specs::{Join, Read, ReadStorage, System, Write, ReadExpect, WriteExpect, Entities};
pub struct Sys;
impl<'a> System<'a> for Sys {
type SystemData = (
Read<'a, EventBus<ServerEvent>>,
WriteExpect<'a, RtSim>,
ReadExpect<'a, TerrainGrid>,
Entities<'a>,
ReadStorage<'a, RtSimEntity>,
ReadStorage<'a, Pos>,
);
fn run(
&mut self,
(
server_event_bus,
mut rtsim,
terrain_grid,
entities,
rtsim_entities,
positions,
): Self::SystemData,
) {
let chunks = std::mem::take(&mut rtsim.world.chunks_to_unload);
2020-11-11 11:42:22 +00:00
for chunk in chunks {
// TODO
2020-11-11 11:42:22 +00:00
}
}
}