diff options
| author | troido <troido@protonmail.com> | 2020-03-04 12:15:58 +0100 |
|---|---|---|
| committer | troido <troido@protonmail.com> | 2020-03-04 12:15:58 +0100 |
| commit | 21919636f95a1214b7ed1a3e4aa6527f45b9d073 (patch) | |
| tree | dfe7a465cdf81048c3ac04b5719571bb0192791f /src/components | |
| parent | daae8b511291b8cc854a8747e64e76c6ff2d462e (diff) | |
interacting now works
Diffstat (limited to 'src/components')
| -rw-r--r-- | src/components/mod.rs | 15 |
1 files changed, 15 insertions, 0 deletions
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<Interactable> { + match txt { + "harvest" => Some(Interactable::Harvest), + _ => None + } + } +} + |
