summaryrefslogtreecommitdiff
path: root/src/components
diff options
context:
space:
mode:
authortroido <troido@protonmail.com>2020-05-21 12:45:44 +0200
committertroido <troido@protonmail.com>2020-06-05 22:27:53 +0200
commitf47034bdf86e7ddc831ecb8f50689b9b07a0f6ca (patch)
tree4a2f4f5bee8541c66b6ce6b53b08ef354d59472e /src/components
parentbd1da23cf18960b36f8683c09899044d64b4bd83 (diff)
actually added talk system and removed reply interaction
Diffstat (limited to 'src/components')
-rw-r--r--src/components/interactable.rs6
1 files changed, 0 insertions, 6 deletions
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<String, Exchange>),
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<String, (Vec<ItemId>, Vec<ItemId>)>)
@@ -54,8 +50,6 @@ impl Interactable {
pub fn accepts_arg(&self, arg: &Option<String>) -> 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)