From b2145131ccde0a33b9840ac04c8b7d79e733ae12 Mon Sep 17 00:00:00 2001 From: metamuffin Date: Wed, 8 Jan 2025 11:14:01 +0100 Subject: reset --- client/src/world/mod.rs | 34 ---------------------------------- 1 file changed, 34 deletions(-) delete mode 100644 client/src/world/mod.rs (limited to 'client/src/world/mod.rs') diff --git a/client/src/world/mod.rs b/client/src/world/mod.rs deleted file mode 100644 index 7b25a53..0000000 --- a/client/src/world/mod.rs +++ /dev/null @@ -1,34 +0,0 @@ -use self::{map::Map, tee::Tees}; -use crate::client::{helper::get_map_path, ClientMesgOut}; -use std::fs::File; - -pub mod helper; -pub mod map; -pub mod tee; - -pub use gamenet::enums; - -pub struct World { - pub map: Map, - pub tees: Tees, -} - -impl World { - pub fn new() -> Self { - Self { - map: Map::empty(), - tees: Tees::new(), - } - } - - pub fn update(&mut self, m: &ClientMesgOut) { - self.tees.update(m); - match m { - ClientMesgOut::MapChange { name, crc } => { - let file = File::open(get_map_path(name.as_str(), *crc)).unwrap(); - self.map = Map::load(file, name.as_str(), *crc).unwrap(); - } - _ => (), - } - } -} -- cgit v1.2.3-70-g09d2