From f0820572cedfb54e9b06006278e266bafd7e0c54 Mon Sep 17 00:00:00 2001 From: Anuken Date: Mon, 21 Jul 2025 02:17:07 -0400 Subject: [PATCH] Cleanup --- core/assets/bundles/bundle.properties | 4 +++- core/src/mindustry/editor/DrawOperation.java | 2 +- core/src/mindustry/editor/EditorSpriteCache.java | 2 +- core/src/mindustry/editor/MapEditor.java | 6 +++--- core/src/mindustry/editor/MapRenderer.java | 4 ++++ core/src/mindustry/world/blocks/environment/Cliff.java | 1 - 6 files changed, 12 insertions(+), 7 deletions(-) diff --git a/core/assets/bundles/bundle.properties b/core/assets/bundles/bundle.properties index 29e9f835f7..a7164a71db 100644 --- a/core/assets/bundles/bundle.properties +++ b/core/assets/bundles/bundle.properties @@ -1680,8 +1680,10 @@ block.metal-floor-3.name = Metal Floor 3 block.metal-floor-4.name = Metal Floor 4 block.metal-floor-5.name = Metal Floor 5 block.metal-floor-damaged.name = Damaged Metal Floor -block.colored-floor.name = Colored Floor +block.colored-floor.name = Colored Floor block.colored-wall.name = Colored Wall +block.character-overlay.name = Character Overlay +block.character-overlay-white.name = Character Overlay (White) block.dark-panel-1.name = Dark Panel 1 block.dark-panel-2.name = Dark Panel 2 block.dark-panel-3.name = Dark Panel 3 diff --git a/core/src/mindustry/editor/DrawOperation.java b/core/src/mindustry/editor/DrawOperation.java index a67253ce80..6fbf9b996d 100755 --- a/core/src/mindustry/editor/DrawOperation.java +++ b/core/src/mindustry/editor/DrawOperation.java @@ -10,7 +10,7 @@ import mindustry.world.blocks.environment.*; import static mindustry.Vars.*; public class DrawOperation{ - static final int + static final byte opFloor = 0, opBlock = 1, opRotation = 2, diff --git a/core/src/mindustry/editor/EditorSpriteCache.java b/core/src/mindustry/editor/EditorSpriteCache.java index 6fe1faeea1..26cfc652ec 100644 --- a/core/src/mindustry/editor/EditorSpriteCache.java +++ b/core/src/mindustry/editor/EditorSpriteCache.java @@ -146,7 +146,7 @@ public class EditorSpriteCache implements Disposable{ index += vertexSize * 4; } - /** Renders the cached mesh. The shader must already have the correct view matrix (usually u_projectionViewMatrix) set as a uniform. */ + /** Renders the cached mesh. The shader must already have the correct view matrix set as a uniform. */ public void render(Shader shader){ if(mesh == null) throw new IllegalStateException("Cache is empty, call build() first."); diff --git a/core/src/mindustry/editor/MapEditor.java b/core/src/mindustry/editor/MapEditor.java index 2562a6a8df..bb5ff4b102 100644 --- a/core/src/mindustry/editor/MapEditor.java +++ b/core/src/mindustry/editor/MapEditor.java @@ -148,7 +148,7 @@ public class MapEditor{ y = Mathf.clamp(y, (drawBlock.size - 1) / 2, height() - drawBlock.size / 2 - 1); if(!hasOverlap(x, y)){ tile(x, y).setBlock(drawBlock, drawTeam, rotation); - addTileOp(TileOp.get((short)x, (short)y, (byte)DrawOperation.opTeam, (byte)drawTeam.id)); + addTileOp(TileOp.get((short)x, (short)y, DrawOperation.opTeam, (byte)drawTeam.id)); } }else{ boolean isFloor = drawBlock.isFloor() && drawBlock != Blocks.air; @@ -166,13 +166,13 @@ public class MapEditor{ } }else if(!(tile.block().isMultiblock() && !drawBlock.isMultiblock())){ if(drawBlock.rotate && tile.build != null && tile.build.rotation != rotation){ - addTileOp(TileOp.get(tile.x, tile.y, (byte)DrawOperation.opRotation, (byte)rotation)); + addTileOp(TileOp.get(tile.x, tile.y, DrawOperation.opRotation, (byte)rotation)); } tile.setBlock(drawBlock, drawTeam, rotation); if(drawBlock.synthetic()){ - addTileOp(TileOp.get(tile.x, tile.y, (byte)DrawOperation.opTeam, (byte)drawTeam.id)); + addTileOp(TileOp.get(tile.x, tile.y, DrawOperation.opTeam, (byte)drawTeam.id)); } } }; diff --git a/core/src/mindustry/editor/MapRenderer.java b/core/src/mindustry/editor/MapRenderer.java index 311e4c8876..f943117b36 100644 --- a/core/src/mindustry/editor/MapRenderer.java +++ b/core/src/mindustry/editor/MapRenderer.java @@ -128,6 +128,10 @@ public class MapRenderer implements Disposable{ void updateStatic(int x, int y){ renderer.blocks.floor.recacheTile(x, y); + if(x > 0) renderer.blocks.floor.recacheTile(x - 1, y); + if(y > 0) renderer.blocks.floor.recacheTile(x, y - 1); + if(x < world.width() - 1) renderer.blocks.floor.recacheTile(x + 1, y); + if(y < world.height() - 1) renderer.blocks.floor.recacheTile(x, y + 1); } void updateBlock(Tile tile){ diff --git a/core/src/mindustry/world/blocks/environment/Cliff.java b/core/src/mindustry/world/blocks/environment/Cliff.java index d3a0c99771..49dba95d7c 100644 --- a/core/src/mindustry/world/blocks/environment/Cliff.java +++ b/core/src/mindustry/world/blocks/environment/Cliff.java @@ -9,7 +9,6 @@ import mindustry.world.*; public class Cliff extends Block{ public float size = 11f; public @Load(value = "cliffmask#", length = 256) TextureRegion[] cliffs; - public @Load(value = "editor-cliffmask#", length = 256) TextureRegion[] editorCliffs; public Cliff(String name){ super(name);