From f47034bdf86e7ddc831ecb8f50689b9b07a0f6ca Mon Sep 17 00:00:00 2001 From: troido Date: Thu, 21 May 2020 12:45:44 +0200 Subject: actually added talk system and removed reply interaction --- src/components/interactable.rs | 6 ------ 1 file changed, 6 deletions(-) (limited to 'src/components') diff --git a/src/components/interactable.rs b/src/components/interactable.rs index 636953f..ab1ac29 100644 --- a/src/components/interactable.rs +++ b/src/components/interactable.rs @@ -17,8 +17,6 @@ use crate::{ #[storage(HashMapStorage)] pub enum Interactable { Trigger(Trigger), - Say(String), - Reply(String), Exchange(String, HashMap), Visit(RoomId), Mine(Stat) @@ -32,8 +30,6 @@ impl Interactable { let arg = val.get(1)?; Some(match typ.as_str()? { "trigger" => Trigger(Trigger::from_str(arg.as_str()?)?), - "say" => Say(arg.as_str()?.to_string()), - "reply" => Reply(arg.as_str()?.to_string()), "exchange" => { let (prefix, change) = serde_json::value::from_value::< (String, HashMap, Vec)>) @@ -54,8 +50,6 @@ impl Interactable { pub fn accepts_arg(&self, arg: &Option) -> bool { match self { Trigger(_) => arg.is_none(), - Say(_) => arg.is_none(), - Reply(_) => arg.is_some(), Exchange(prefix, _exchanges) => { if let Some(txt) = arg { txt.starts_with(prefix) -- cgit