mindustry logic execution, map- and schematic- parsing and rendering
Diffstat (limited to 'src/exe/draw.rs')
-rw-r--r--src/exe/draw.rs19
1 files changed, 6 insertions, 13 deletions
diff --git a/src/exe/draw.rs b/src/exe/draw.rs
index ff8ece7..6a061d6 100644
--- a/src/exe/draw.rs
+++ b/src/exe/draw.rs
@@ -1,26 +1,19 @@
-use plandustry::block::build_registry;
-use plandustry::data::renderer::Renderer;
-use plandustry::data::schematic::SchematicSerializer;
+use mindus::build_registry;
+use mindus::Renderer;
+use mindus::SchematicSerializer;
use std::env::Args;
-use crate::args::{self, OptionHandler};
use crate::print_err;
-pub fn main(mut args: Args, arg_off: usize) {
- let mut handler = OptionHandler::default();
- if let Err(e) = args::parse(&mut args, &mut handler, arg_off) {
- print_err!(e, "Command error");
- return;
- }
-
+pub fn main(args: Args) {
let reg = build_registry();
let mut ss = SchematicSerializer(&reg);
let mut first = true;
let mut need_space = false;
// process schematics from command line
- for curr in handler.get_literals() {
- match ss.deserialize_base64(curr) {
+ for curr in args {
+ match ss.deserialize_base64(&curr) {
Ok(s) => {
if !first || need_space {
println!();