mindustry logic execution, map- and schematic- parsing and rendering
Diffstat (limited to 'src/data/map.rs')
| -rw-r--r-- | src/data/map.rs | 17 |
1 files changed, 2 insertions, 15 deletions
diff --git a/src/data/map.rs b/src/data/map.rs index b1405ea..6284ac7 100644 --- a/src/data/map.rs +++ b/src/data/map.rs @@ -268,6 +268,7 @@ impl<'l> BlockState<'l> for Option<Tile<'_>> { } /// a build on a tile in a map +#[derive(Clone)] pub struct Build<'l> { pub block: &'l Block, pub items: Storage<Item>, @@ -285,20 +286,6 @@ impl std::fmt::Debug for Build<'_> { } } -impl Clone for Build<'_> { - fn clone(&self) -> Self { - Self { - block: self.block, - items: self.items.clone(), - liquids: self.liquids.clone(), - state: self.state.as_ref().map(|s| self.block.clone_state(s)), - rotation: self.rotation, - team: self.team, - data: self.data, - } - } -} - impl<'l> Build<'l> { #[must_use] pub fn new(block: &'l Block) -> Build<'l> { @@ -505,7 +492,7 @@ impl<'l> Map<'l> { #[must_use] pub fn new(width: usize, height: usize, tags: HashMap<String, String>) -> Self { Self { - tiles: vec![Tile::new(BlockEnum::Stone, BlockEnum::Air); width * height], + tiles: vec![Tile::new(BlockEnum::Air, BlockEnum::Air); width * height], height, width, tags, |