From 48c24ec8b011d081550dc78329cbe61de67b30e9 Mon Sep 17 00:00:00 2001 From: troido Date: Sun, 5 Apr 2020 20:04:33 +0200 Subject: items are now mostly replaced by itemids, with a mapping to the item in the encyclopedia --- src/componentwrapper.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/componentwrapper.rs') diff --git a/src/componentwrapper.rs b/src/componentwrapper.rs index 360a546..d00b592 100644 --- a/src/componentwrapper.rs +++ b/src/componentwrapper.rs @@ -6,6 +6,7 @@ use rand::Rng; use crate::{ PlayerId, RoomId, + ItemId, Sprite, playerstate::RoomPos, components::{ @@ -143,7 +144,7 @@ components!( }; Movable (cooldown: Int); Player (name: String) {Player::new(PlayerId{name})}; - Item (ent: Template, name: String, action: Action); + Item (item: String) {Item(ItemId(item))}; Inventory () {panic!("inventory from parameters not implemented")}; Health (health: Int, maxhealth: Int); Serialise () {panic!("serialise from parameters not implemented")}; -- cgit