From 522aad7889cd62e96af7c420789507ccbf5b7aaa Mon Sep 17 00:00:00 2001 From: troido Date: Sat, 22 Feb 2020 23:41:51 +0100 Subject: it is now possible to use items --- src/componentwrapper.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/componentwrapper.rs') diff --git a/src/componentwrapper.rs b/src/componentwrapper.rs index 888903d..fb2a80a 100644 --- a/src/componentwrapper.rs +++ b/src/componentwrapper.rs @@ -3,7 +3,7 @@ use std::collections::HashMap; use specs::Builder; use crate::{PlayerId, RoomId, Sprite}; -use crate::components::{Visible, Blocking, Player, Floor, Item, Inventory, Health, Serialise, RoomExit, item::ItemAction}; +use crate::components::{Visible, Blocking, Player, Floor, Item, Inventory, Health, Serialise, RoomExit}; use crate::parameter::{Parameter, ParameterType}; @@ -94,7 +94,7 @@ components!( Blocking () {Blocking}; Floor () {Floor}; Player (name: String) {Player::new(PlayerId{name})}; - Item (ent: Template, name: String) {Item{ent, name, action: ItemAction::None}}; + Item (ent: Template, name: String, action: Action) {Item{ent, name, action}}; Inventory (capacity: Int) {Inventory{items: Vec::new(), capacity: capacity as usize}}; Health (health: Int, maxhealth: Int) {Health{health, maxhealth}}; Serialise (template: Template) {Serialise{template}}; -- cgit