diff options
| author | troido <troido@protonmail.com> | 2020-02-09 23:38:22 +0100 |
|---|---|---|
| committer | troido <troido@protonmail.com> | 2020-02-09 23:38:22 +0100 |
| commit | b9cfb78c20fd309929aae98f24acc8ba4a9a7481 (patch) | |
| tree | 898684ce84a06651f78a0973fa1a6d4d2d192cb3 /src/components.rs | |
| parent | 105c5ab0c0e969f3fda2cd43ae5195cbdb4da016 (diff) | |
can now pick up and drop items
Diffstat (limited to 'src/components.rs')
| -rw-r--r-- | src/components.rs | 16 |
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 +} + |
