summaryrefslogtreecommitdiff
path: root/src/components.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/components.rs')
-rw-r--r--src/components.rs16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/components.rs b/src/components.rs
index 277dd01..8be8364 100644
--- a/src/components.rs
+++ b/src/components.rs
@@ -9,6 +9,7 @@ use specs::{
use super::controls::Control;
use super::pos::Pos;
+use crate::template::Template;
#[derive(Debug, Clone)]
@@ -65,3 +66,18 @@ impl Player {
}
}
+#[derive(Debug, Clone, Default)]
+pub struct Inventory {
+ pub items: Vec<Item>,
+ pub capacity: u64
+}
+impl Component for Inventory {
+ type Storage = FlaggedStorage<Self, HashMapStorage<Self>>;
+}
+
+
+#[derive(Component, Debug, Clone)]
+pub struct Item {
+ pub ent: Template
+}
+