summaryrefslogtreecommitdiff
path: root/src/componentwrapper.rs
diff options
context:
space:
mode:
authortroido <troido@protonmail.com>2020-02-11 01:53:05 +0100
committertroido <troido@protonmail.com>2020-02-11 01:53:05 +0100
commit62138ca19acdef140359745ebee41be5e4c5ce09 (patch)
treea59c0d70d8b024693b2c57fc42ba3d1665623eb6 /src/componentwrapper.rs
parent97850d8c1ee3522ccce30ef31ed91601da8c0730 (diff)
health is now also shown (but never changed)
Diffstat (limited to 'src/componentwrapper.rs')
-rw-r--r--src/componentwrapper.rs5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/componentwrapper.rs b/src/componentwrapper.rs
index feb570e..cf16213 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, Item, Inventory};
+use crate::components::{Visible, Blocking, Player, Floor, Item, Inventory, Health};
use crate::parameter::{Parameter, ParameterType};
@@ -93,7 +93,8 @@ components!(
Floor () {Floor};
Player (name: String) {Player::new(name)};
Item (ent: Template, name: String) {Item{ent, name}};
- Inventory (capacity: Int) {Inventory{items: Vec::new(), capacity: capacity as usize}}
+ Inventory (capacity: Int) {Inventory{items: Vec::new(), capacity: capacity as usize}};
+ Health (health: Int, maxhealth: Int) {Health{health, maxhealth}}
);