diff options
| author | troido <troido@protonmail.com> | 2020-02-14 14:36:32 +0100 |
|---|---|---|
| committer | troido <troido@protonmail.com> | 2020-02-14 14:36:32 +0100 |
| commit | 4a4cdf7d148be0a2a756f323d27c0ee5b7976438 (patch) | |
| tree | 7add0a0d735f93cb1fce6ae4f0c476a0d550a3ee /src/componentwrapper.rs | |
| parent | 7821febc8ee4c89ca1825054e0baf39eea3a0380 (diff) | |
extract the state to save
Diffstat (limited to 'src/componentwrapper.rs')
| -rw-r--r-- | src/componentwrapper.rs | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/componentwrapper.rs b/src/componentwrapper.rs index cf16213..6e11a0b 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, Health}; +use crate::components::{Visible, Blocking, Player, Floor, Item, Inventory, Health, Serialise}; use crate::parameter::{Parameter, ParameterType}; @@ -94,7 +94,8 @@ components!( 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}}; - Health (health: Int, maxhealth: Int) {Health{health, maxhealth}} + Health (health: Int, maxhealth: Int) {Health{health, maxhealth}}; + Serialise (template: Template) {Serialise{template}} ); |
