mindustry logic execution, map- and schematic- parsing and rendering
update nightly
| -rw-r--r-- | mindus/Cargo.toml | 3 | ||||
| -rw-r--r-- | mindus/src/exe/map.rs | 2 | ||||
| -rw-r--r-- | mindus/src/lib.rs | 7 | ||||
| -rw-r--r-- | mindus/src/team.rs | 3 |
4 files changed, 7 insertions, 8 deletions
diff --git a/mindus/Cargo.toml b/mindus/Cargo.toml index cf78cfc..fce9ce5 100644 --- a/mindus/Cargo.toml +++ b/mindus/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "mindus" -version = "5.0.27" +version = "5.0.28" edition = "2021" description = "A library for working with mindustry data formats (eg schematics and maps) (fork of plandustry)" authors = [ @@ -12,6 +12,7 @@ license = "GPL-3.0" exclude = [".github/", "items.py"] readme = "README.md" keywords = ["mindustry", "format", "drawing"] +rust-version = "1.85" [dependencies] flate2 = "1.0" diff --git a/mindus/src/exe/map.rs b/mindus/src/exe/map.rs index 7aba2d9..3cded9c 100644 --- a/mindus/src/exe/map.rs +++ b/mindus/src/exe/map.rs @@ -14,7 +14,7 @@ pub fn main(args: Args) { m.header()?; m.version()?; let t = m.tags()?; - println!("rendering {}", t["name"]); + println!("rendering {}", t.get("name").unwrap_or(&"<unknown>")); m.skip()?; let (mut img, sz) = mindus::data::renderer::draw_map_single(&mut m)?; mindus::data::renderer::draw_units(&mut m, img.as_mut(), sz)?; diff --git a/mindus/src/lib.rs b/mindus/src/lib.rs index 610704b..c172db1 100644 --- a/mindus/src/lib.rs +++ b/mindus/src/lib.rs @@ -1,18 +1,17 @@ //! crate for dealing with mindustry #![feature( stmt_expr_attributes, + generic_const_exprs, iter_from_coroutine, generic_arg_infer, const_trait_impl, coroutine_trait, - const_option, derive_const, coroutines, slice_take, - let_chains, - effects + let_chains )] -#![allow(clippy::redundant_closure_call)] +#![allow(clippy::redundant_closure_call, incomplete_features)] #![warn( clippy::multiple_unsafe_ops_per_block, clippy::missing_const_for_fn, diff --git a/mindus/src/team.rs b/mindus/src/team.rs index 34c6602..416a356 100644 --- a/mindus/src/team.rs +++ b/mindus/src/team.rs @@ -2,8 +2,7 @@ use std::fmt; use crate::content::{Content, Type}; -#[derive(Clone, Copy, Debug, Eq, Ord, PartialOrd, Default)] -#[derive_const(PartialEq)] +#[derive(Clone, Copy, Debug, Eq, Ord, PartialOrd, Default, PartialEq)] pub struct Team(u8); impl Team { |