diff options
Diffstat (limited to 'src/components/interactable.rs')
| -rw-r--r-- | src/components/interactable.rs | 13 |
1 files changed, 0 insertions, 13 deletions
diff --git a/src/components/interactable.rs b/src/components/interactable.rs index d5a6926..ec8c1db 100644 --- a/src/components/interactable.rs +++ b/src/components/interactable.rs @@ -1,7 +1,5 @@ use std::collections::HashMap; -use serde_json; -use serde_json::{Value}; use specs::{ Component, HashMapStorage, @@ -33,17 +31,6 @@ impl Interactable { _ => None? }) } - - pub fn from_json(val: &Value) -> Option<Self> { - let typ = val.get(0)?; - let arg = val.get(1)?; - Some(match typ.as_str()? { - "trigger" => Trigger(Trigger::from_str(arg.as_str()?)?), - "visit" => Visit(RoomId::from_str(arg.as_str()?)), - "mine" => Mine(Stat::from_str(arg.as_str()?)?), - _ => None? - }) - } pub fn accepts_arg(&self, arg: &Option<String>) -> bool { match self { |
