summaryrefslogtreecommitdiff
path: root/src/components
diff options
context:
space:
mode:
authortroido <troido@protonmail.com>2020-04-09 15:04:54 +0200
committertroido <troido@protonmail.com>2020-04-09 15:04:54 +0200
commite7b4ed0f044c3ada82155f81d3b61c0c5ce36583 (patch)
treeebdf7c9b712c07fcb89a1b50fb2a653fa749932d /src/components
parent8dbe1f51ff1705f97a191197b3ee7cb66b682584 (diff)
change interaction is now a combination of harvest and loot
Diffstat (limited to 'src/components')
-rw-r--r--src/components/interactable.rs4
1 files changed, 0 insertions, 4 deletions
diff --git a/src/components/interactable.rs b/src/components/interactable.rs
index 33e3a12..eafe977 100644
--- a/src/components/interactable.rs
+++ b/src/components/interactable.rs
@@ -6,7 +6,6 @@ use specs::{
HashMapStorage
};
use crate::{
- Template,
exchange::Exchange,
ItemId
};
@@ -15,7 +14,6 @@ use crate::{
#[storage(HashMapStorage)]
pub enum Interactable {
Harvest,
- Change(Template),
Say(String),
Reply(String),
Exchange(String, HashMap<String, Exchange>)
@@ -29,7 +27,6 @@ impl Interactable {
let arg = if val.is_string() {&Value::Null} else {val.get(1)?};
Some(match typ.as_str()? {
"harvest" => Harvest,
- "change" => Change(Template::from_json(arg).ok()?),
"say" => Say(arg.as_str()?.to_string()),
"reply" => Reply(arg.as_str()?.to_string()),
"exchange" => Exchange(
@@ -53,7 +50,6 @@ impl Interactable {
pub fn accepts_arg(&self, arg: &Option<String>) -> bool {
match self {
Harvest => arg.is_none(),
- Change(_) => arg.is_none(),
Say(_) => arg.is_none(),
Reply(_) => arg.is_some(),
Exchange(prefix, _exchanges) => {