diff options
Diffstat (limited to 'src/components')
| -rw-r--r-- | src/components/ear.rs | 10 | ||||
| -rw-r--r-- | src/components/interactable.rs | 2 |
2 files changed, 10 insertions, 2 deletions
diff --git a/src/components/ear.rs b/src/components/ear.rs index 1432164..4aafa72 100644 --- a/src/components/ear.rs +++ b/src/components/ear.rs @@ -35,6 +35,10 @@ pub enum Notification { Die { actor: String, target: String + }, + Options { + description: String, + options: Vec<(String, String)> } } @@ -53,7 +57,8 @@ impl Notification { Heal => "heal" }, Kill{actor: _, target: _} => "kill", - Die{actor: _, target: _} => "die" + Die{actor: _, target: _} => "die", + Options{description: _, options: _} => "options" }).to_string() } @@ -77,6 +82,9 @@ impl Notification { }, Die{actor, target} => { format!("{} was killed by {}", target, actor) + }, + Options{description, options} => { + format!("{}. Options: {}", description, options.iter().map(|(command, desc)| format!("'{}': {};", command, desc)).collect::<Vec<String>>().join(" ")) } }; (self.type_name(), body) diff --git a/src/components/interactable.rs b/src/components/interactable.rs index f48fb9d..757e27e 100644 --- a/src/components/interactable.rs +++ b/src/components/interactable.rs @@ -69,7 +69,7 @@ impl Interactable { if let Some(txt) = arg { txt.starts_with("visit ") || txt.starts_with("disallow ") || txt.starts_with("allow ") || txt.starts_with("whitelist") } else { - false + true } } Mine(_) => arg.is_none() |
