html terminal
Diffstat (limited to 'src/bot/schematic.rs')
-rw-r--r--src/bot/schematic.rs25
1 files changed, 0 insertions, 25 deletions
diff --git a/src/bot/schematic.rs b/src/bot/schematic.rs
index e37149d..1c833ac 100644
--- a/src/bot/schematic.rs
+++ b/src/bot/schematic.rs
@@ -1,5 +1,4 @@
use anyhow::{anyhow, Result};
-use mindus::block::ratios::Resource;
use mindus::data::DataRead;
use mindus::*;
use oxipng::*;
@@ -43,7 +42,6 @@ pub async fn with(m: SMsg, c: &serenity::client::Context) -> Result<ControlFlow<
let d = v.tags.get("description").map(|t| crate::conv::replace(t));
let name = crate::conv::replace(&strip_colors(v.tags.get("name").unwrap()));
let cost = v.compute_total_cost().0;
- let rats = v.ratios();
let p = tokio::task::spawn_blocking(move || to_png(&v)).await?;
anyhow::Ok(
m.channel
@@ -63,29 +61,6 @@ pub async fn with(m: SMsg, c: &serenity::client::Context) -> Result<ControlFlow<
write!(s, "{} {n} ", crate::conv::item(i)).unwrap();
}
e.field("req", s, true);
- macro_rules! fmt {
- ($i:ident) => {{
- let mut s = String::new();
- for &(i, n) in &*rats.$i {
- let e = crate::conv::res(i);
- if matches!(i, Resource::Item(_)) && n % 10.5 < 0.1 {
- match (n / 10.5).round() as u64 {
- 1 => write!(s, "{e} <:titanium_conveyor:1165056617809715210> ").unwrap(),
- n => write!(s, "{e} {n} <:titanium_conveyor:1165056617809715210>'s ").unwrap()
- }
- } else {
- write!(s, "{e} {n}/s ").unwrap();
- }
- }
- s
- }}
- }
- if !rats.input.is_empty() {
- e.field("in", fmt!(input), true);
- }
- if !rats.output.is_empty() {
- e.field("out", fmt!(output), true);
- }
e.title(name)
.footer(|f| f.text(format!("requested by {author}")))
.color(SUCCESS)