diff options
| author | troido <troido@protonmail.com> | 2020-02-22 22:00:32 +0100 |
|---|---|---|
| committer | troido <troido@protonmail.com> | 2020-02-22 22:00:32 +0100 |
| commit | f4331041e5d906f95063f317852f32f19e6cdf9c (patch) | |
| tree | e855402de7b2dcec81c91d97ab6a7e359689ecc5 /src/componentwrapper.rs | |
| parent | 2b0cc677f4092d94b31e95f3e9961ec6ed91327b (diff) | |
items now have an action enum
Diffstat (limited to 'src/componentwrapper.rs')
| -rw-r--r-- | src/componentwrapper.rs | 4 |
1 files changed, 2 insertions, 2 deletions
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}}; |
