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/componentwrapper.rs | |
| parent | 105c5ab0c0e969f3fda2cd43ae5195cbdb4da016 (diff) | |
can now pick up and drop items
Diffstat (limited to 'src/componentwrapper.rs')
| -rw-r--r-- | src/componentwrapper.rs | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/componentwrapper.rs b/src/componentwrapper.rs index 43c8353..c60c23f 100644 --- a/src/componentwrapper.rs +++ b/src/componentwrapper.rs @@ -2,7 +2,7 @@ use std::collections::HashMap; use specs::{Builder, world::LazyBuilder}; -use crate::components::{Visible, Blocking, Player, Floor}; +use crate::components::{Visible, Blocking, Player, Floor, Item, Inventory}; use crate::parameter::{Parameter, ParameterType}; @@ -91,7 +91,10 @@ components!( }; Blocking () {Blocking}; Floor () {Floor}; - Player (name: String) {Player::new(name.to_string())} + Player (name: String) {Player::new(name.to_string())}; + Item (ent: Template) {Item{ent}}; + Inventory () {Inventory::default()} + ); |
