From e2281d8c6293b311ccc187e3503093a1120e6215 Mon Sep 17 00:00:00 2001 From: troido Date: Mon, 21 Sep 2020 02:32:22 +0200 Subject: exchange is now an interaction again --- src/componentwrapper.rs | 16 +++------------- 1 file changed, 3 insertions(+), 13 deletions(-) (limited to 'src/componentwrapper.rs') diff --git a/src/componentwrapper.rs b/src/componentwrapper.rs index 96cedd3..08d95ee 100644 --- a/src/componentwrapper.rs +++ b/src/componentwrapper.rs @@ -20,7 +20,6 @@ use crate::{ fromtoparameter::FromToParameter, Timestamp, Template, - exchange::Exchange, Pos, Result, aerr @@ -184,7 +183,9 @@ components!(all: Clan (name: String); Home (home: Pos); Faction (faction: String) {Faction::from_str(faction.as_str()).ok_or(aerr!("invalid faction name"))?}; - Interactable (typ: String, arg: Parameter) {Interactable::parse_from_parameter(&typ, &arg).ok_or(aerr!("invalid interaction"))?}; + Interactable (typ: String, arg: Parameter) { + Interactable::parse_from_parameter(&typ, &arg).ok_or(aerr!("invalid interaction {:?} {:?}", typ, arg))? + }; Loot (loot: Vec<(Template, f64)>); Timer ( trigger: String, (panic!("can't turn trigger to string")), @@ -234,17 +235,6 @@ components!(all: } }; Substitute (into: Template); - Exchanger (prefix: String, exchanges: Vec<(String, Vec, Vec)>) { - Exchanger { - prefix, - exchanges: exchanges - .into_iter() - .map(|(key, cost, offer)| - (key, Exchange{cost, offer}) - ) - .collect() - } - }; ); -- cgit