aboutsummaryrefslogtreecommitdiff
path: root/src/mapstore.rs
diff options
context:
space:
mode:
authorKatharina Fey <kookie@spacekookie.de>2020-03-22 19:44:26 +0100
committerKatharina Fey <kookie@spacekookie.de>2020-03-22 19:44:26 +0100
commit22c18205bcb3702ddf60f41f77f6f06554202f35 (patch)
tree5f402722bbd767354e040179f0b4cd5ccb6b3899 /src/mapstore.rs
parenta55c5bded047e1e2c54f6e3f25c9b8e36e605110 (diff)
Updating gameplay starting mechanics, adding quadtree to map
Diffstat (limited to 'src/mapstore.rs')
-rw-r--r--src/mapstore.rs17
1 files changed, 17 insertions, 0 deletions
diff --git a/src/mapstore.rs b/src/mapstore.rs
new file mode 100644
index 000000000000..85c5e36ef93b
--- /dev/null
+++ b/src/mapstore.rs
@@ -0,0 +1,17 @@
+//! Map store
+
+use crate::config::MapCfg;
+use std::{collections::BTreeMap, fs, path::Path};
+
+pub struct MapStore {
+ configs: BTreeMap<String, MapCfg>,
+}
+
+impl MapStore {
+ /// Load a set of map configs
+ pub fn load_path(&mut self, path: &Path) {
+ fs::read_dir(&path).unwrap().for_each(|d| {
+ let name = d.unwrap().file_name().into_string().unwrap();
+ });
+ }
+}