From f4331041e5d906f95063f317852f32f19e6cdf9c Mon Sep 17 00:00:00 2001 From: troido Date: Sat, 22 Feb 2020 22:00:32 +0100 Subject: items now have an action enum --- 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 5b9673f..888903d 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}; +use crate::components::{Visible, Blocking, Player, Floor, Item, Inventory, Health, Serialise, RoomExit, item::ItemAction}; 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}}; + Item (ent: Template, name: String) {Item{ent, name, action: ItemAction::None}}; 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