From 2bdf2f39f838407be1bd237e3a7fe458b9f6c26e Mon Sep 17 00:00:00 2001 From: Anuken Date: Mon, 25 Aug 2025 10:59:39 -0400 Subject: [PATCH] Fixed black minimap color for metal walls --- core/src/mindustry/editor/EditorTool.java | 7 ++++++- tools/src/mindustry/tools/Generators.java | 8 +++++--- 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/core/src/mindustry/editor/EditorTool.java b/core/src/mindustry/editor/EditorTool.java index d0f64dcdad..eac257b3c5 100644 --- a/core/src/mindustry/editor/EditorTool.java +++ b/core/src/mindustry/editor/EditorTool.java @@ -133,7 +133,12 @@ public enum EditorTool{ Block dest = tile.floor(); if(dest == editor.drawBlock) return; tester = t -> t.floor() == dest; - setter = t -> t.setFloor(editor.drawBlock.asFloor()); + setter = t -> { + t.setFloor(editor.drawBlock.asFloor()); + if(!(t.overlay() instanceof OverlayFloor) && !t.floor().supportsOverlay){ + t.setOverlay(Blocks.air); + } + }; }else{ Block dest = tile.block(); if(dest == editor.drawBlock) return; diff --git a/tools/src/mindustry/tools/Generators.java b/tools/src/mindustry/tools/Generators.java index bb22f32e1f..fbd79b58a3 100644 --- a/tools/src/mindustry/tools/Generators.java +++ b/tools/src/mindustry/tools/Generators.java @@ -89,16 +89,18 @@ public class Generators{ } }); - if(!iconPath.exists() && v == 0){ + if(v == 0){ //save the bottom right region as the "main" sprite for previews Pixmap out = new Pixmap(basePath); Pixmap cropped = out.crop(32, 32, 32, 32); - iconPath.writePng(cropped); + if(!iconPath.exists()){ + iconPath.writePng(cropped); + } out.dispose(); gens.put(block, cropped); } }else{ - Log.warn("Autotile floor '@' not found: @", block.name, basePath.absolutePath()); + Log.warn("Autotile block '@' not found: @", block.name, basePath.absolutePath()); } } }