summaryrefslogtreecommitdiff
path: root/src/componentwrapper.rs
diff options
context:
space:
mode:
authortroido <troido@protonmail.com>2020-04-05 20:04:33 +0200
committertroido <troido@protonmail.com>2020-04-05 20:04:33 +0200
commit48c24ec8b011d081550dc78329cbe61de67b30e9 (patch)
treed2d700897dc5ba3d0f52e8a1cd57c0f4880272fd /src/componentwrapper.rs
parent84c70cee089b72720a85d285ee0437b65be298b9 (diff)
items are now mostly replaced by itemids, with a mapping to the item in the encyclopedia
Diffstat (limited to 'src/componentwrapper.rs')
-rw-r--r--src/componentwrapper.rs3
1 files changed, 2 insertions, 1 deletions
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")};