From b9cfb78c20fd309929aae98f24acc8ba4a9a7481 Mon Sep 17 00:00:00 2001 From: troido Date: Sun, 9 Feb 2020 23:38:22 +0100 Subject: can now pick up and drop items --- src/componentwrapper.rs | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'src/componentwrapper.rs') 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()} + ); -- cgit