From 9dcb8b7bd5870a7b17638cf608088e78d2a316fe Mon Sep 17 00:00:00 2001 From: null <89076920+stacktrace-error@users.noreply.github.com> Date: Sat, 7 Jan 2023 17:38:12 +0100 Subject: [PATCH] yay more hardcoded regions (#8021) * change fuckall * more of this * typo --- .../mindustry/world/blocks/production/BeamDrill.java | 12 ++++++------ core/src/mindustry/world/draw/DrawPistons.java | 7 ++++--- 2 files changed, 10 insertions(+), 9 deletions(-) diff --git a/core/src/mindustry/world/blocks/production/BeamDrill.java b/core/src/mindustry/world/blocks/production/BeamDrill.java index 63a412412e..2f76ab2ecd 100644 --- a/core/src/mindustry/world/blocks/production/BeamDrill.java +++ b/core/src/mindustry/world/blocks/production/BeamDrill.java @@ -24,13 +24,13 @@ import static mindustry.Vars.*; public class BeamDrill extends Block{ protected Rand rand = new Rand(); - public @Load("drill-laser") TextureRegion laser; - public @Load("drill-laser-end") TextureRegion laserEnd; - public @Load("drill-laser-center") TextureRegion laserCenter; + public @Load(value = "@-beam", fallback = "drill-laser") TextureRegion laser; + public @Load(value = "@-beam-end", fallback = "drill-laser-end") TextureRegion laserEnd; + public @Load(value = "@-beam-center", fallback = "drill-laser-center") TextureRegion laserCenter; - public @Load("drill-laser-boost") TextureRegion laserBoost; - public @Load("drill-laser-boost-end") TextureRegion laserEndBoost; - public @Load("drill-laser-boost-center") TextureRegion laserCenterBoost; + public @Load(value = "@-beam-boost", fallback = "drill-laser-boost") TextureRegion laserBoost; + public @Load(value = "@-beam-boost-end", fallback = "drill-laser-boost-end") TextureRegion laserEndBoost; + public @Load(value = "@-beam-boost-center", fallback = "drill-laser-boost-center") TextureRegion laserCenterBoost; public @Load("@-top") TextureRegion topRegion; public @Load("@-glow") TextureRegion glowRegion; diff --git a/core/src/mindustry/world/draw/DrawPistons.java b/core/src/mindustry/world/draw/DrawPistons.java index c14d6fe72a..2015cc801f 100644 --- a/core/src/mindustry/world/draw/DrawPistons.java +++ b/core/src/mindustry/world/draw/DrawPistons.java @@ -11,6 +11,7 @@ import mindustry.world.*; public class DrawPistons extends DrawBlock{ public float sinMag = 4f, sinScl = 6f, sinOffset = 50f, sideOffset = 0f, lenOffset = -1f; public int sides = 4; + public String suffix = "-piston"; public TextureRegion region1, region2, regiont; @Override @@ -41,8 +42,8 @@ public class DrawPistons extends DrawBlock{ public void load(Block block){ super.load(block); - region1 = Core.atlas.find(block.name + "-piston0", block.name + "-piston"); - region2 = Core.atlas.find(block.name + "-piston1", block.name + "-piston"); - regiont = Core.atlas.find(block.name + "-piston-t"); + region1 = Core.atlas.find(block.name + suffix + "0", block.name + suffix); + region2 = Core.atlas.find(block.name + suffix + "1", block.name + suffix); + regiont = Core.atlas.find(block.name + suffix + "-t"); } }