From 21919636f95a1214b7ed1a3e4aa6527f45b9d073 Mon Sep 17 00:00:00 2001 From: troido Date: Wed, 4 Mar 2020 12:15:58 +0100 Subject: interacting now works --- src/components/mod.rs | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'src/components/mod.rs') diff --git a/src/components/mod.rs b/src/components/mod.rs index d2087b0..66ac724 100644 --- a/src/components/mod.rs +++ b/src/components/mod.rs @@ -216,4 +216,19 @@ pub struct Clan { pub name: String, } +#[derive(Component, Debug, Clone, PartialEq, Eq)] +#[storage(HashMapStorage)] +pub enum Interactable { + Harvest +} + +impl Interactable { + pub fn from_str(txt: &str) -> Option { + match txt { + "harvest" => Some(Interactable::Harvest), + _ => None + } + } +} + -- cgit