mindustry logic execution, map- and schematic- parsing and rendering
Diffstat (limited to 'src/block/drills.rs')
-rw-r--r--src/block/drills.rs12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/block/drills.rs b/src/block/drills.rs
index eb50b87..67d72f4 100644
--- a/src/block/drills.rs
+++ b/src/block/drills.rs
@@ -1,13 +1,14 @@
//! extraction of raw resources (mine part)
use crate::block::make_register;
use crate::block::simple::{cost, make_simple};
-use crate::data::renderer::read_with;
-make_simple!(DrillBlock, |_, _, name, _| {
- if name == "cliff-crusher" {
+use crate::data::renderer::*;
+
+make_simple!(DrillBlock, |me: &DrillBlock, _, name, _| {
+ if matches!(name, "cliff-crusher" | "large-plasma-bore" | "plasma-bore") {
const SFX: &[&str; 3] = &["", "-top", "-rotator"];
- return Some(read_with("drills", "cliff-crusher", SFX, 2u16));
+ return Some(ImageHolder::Own(read_with("drills", name, SFX, me.size)));
}
- None
+ Some(ImageHolder::Borrow(load("drills", name).unwrap()))
});
make_register! {
@@ -16,7 +17,6 @@ make_register! {
"laser-drill" => DrillBlock::new(3, true, cost!(Copper: 35, Graphite: 30, Titanium: 20, Silicon: 30));
"blast-drill" => DrillBlock::new(4, true, cost!(Copper: 65, Titanium: 50, Thorium: 75, Silicon: 60));
"water-extractor" => DrillBlock::new(2, true, cost!(Copper: 30, Lead: 30, Metaglass: 30, Graphite: 30));
- "cultivator" => DrillBlock::new(2, true, cost!(Copper: 25, Lead: 25, Silicon: 10));
"oil-extractor" => DrillBlock::new(3, true, cost!(Copper: 150, Lead: 115, Graphite: 175, Thorium: 115, Silicon: 75));
"vent-condenser" => DrillBlock::new(3, true, cost!(Graphite: 20, Beryllium: 60));
"cliff-crusher" => DrillBlock::new(2, false, cost!(Beryllium: 100, Graphite: 40));