diff options
| author | troido <troido@protonmail.com> | 2020-03-05 12:50:25 +0100 |
|---|---|---|
| committer | troido <troido@protonmail.com> | 2020-03-05 12:50:25 +0100 |
| commit | 170741fe959d30ee43ce689fd5fbae725cc1dae4 (patch) | |
| tree | de337876fb9afc3ca20e5a99ef61689813f51ebe /src/componentwrapper.rs | |
| parent | ea99b86b89659624133a63f03600f0b57592a5f4 (diff) | |
equipent now kinda works
Diffstat (limited to 'src/componentwrapper.rs')
| -rw-r--r-- | src/componentwrapper.rs | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/componentwrapper.rs b/src/componentwrapper.rs index 7a3d946..e8dbba4 100644 --- a/src/componentwrapper.rs +++ b/src/componentwrapper.rs @@ -35,6 +35,7 @@ macro_rules! components { } } pub fn load_component(comptype: ComponentType, mut parameters: HashMap<&str, Parameter>) -> Option<Self> { + #[allow(unused_imports, unreachable_code)] match comptype { $( ComponentType::$comp => Some(Self::$comp({ @@ -97,7 +98,7 @@ components!( Floor () {Floor}; Player (name: String) {Player::new(PlayerId{name})}; Item (ent: Template, name: String, action: Action) {Item{ent, name, action}}; - Inventory (capacity: Int) {Inventory{items: Vec::new(), capacity: capacity as usize}}; + Inventory () {panic!("inventory from parameters not implemented")}; Health (health: Int, maxhealth: Int) {Health{health, maxhealth}}; Serialise (template: Template) {Serialise{template}}; RoomExit (destination: String, dest_pos: String) { @@ -138,6 +139,7 @@ components!( Interactable (action: String) {Interactable::from_str(action.as_str())?}; Loot (loot: LootList) {Loot{loot}}; Grow (delay: Int, into: Template) {Grow{delay, into, target_time: None}}; + Equipment () {panic!("equipment from parameters not implemented")}; ); |
