From 761b357e4612580fcc5def1cb94765890767f2b4 Mon Sep 17 00:00:00 2001 From: hortiSquash <45213805+hortiSquash@users.noreply.github.com> Date: Wed, 9 Feb 2022 00:02:59 +0100 Subject: [PATCH] Allows for different Pixels/Area (#6562) * Allows for different Pixels/Area Spent the entire day asking people if they knew of any mod that change would break, the answer is negative modders, if you want the screen to take the entire space, remove both the -4 * ScaleFactor so it doesnt break existing mods scale = (size * 32 - bordersize / 2) / displaySize * facepalm * Update LogicDisplay.java why am i dumb every time i do changes on the fly * Update LogicDisplay.java --- core/src/mindustry/world/blocks/logic/LogicDisplay.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/core/src/mindustry/world/blocks/logic/LogicDisplay.java b/core/src/mindustry/world/blocks/logic/LogicDisplay.java index 7e6bb10e29..09683f5800 100644 --- a/core/src/mindustry/world/blocks/logic/LogicDisplay.java +++ b/core/src/mindustry/world/blocks/logic/LogicDisplay.java @@ -29,6 +29,7 @@ public class LogicDisplay extends Block{ public int maxSides = 25; public int displaySize = 64; + public float scaleFactor = 1f; public LogicDisplay(String name){ super(name); @@ -102,7 +103,7 @@ public class LogicDisplay extends Block{ Draw.blend(Blending.disabled); Draw.draw(Draw.z(), () -> { if(buffer != null){ - Draw.rect(Draw.wrap(buffer.getTexture()), x, y, buffer.getWidth() * Draw.scl, -buffer.getHeight() * Draw.scl); + Draw.rect(Draw.wrap(buffer.getTexture()), x, y, buffer.getWidth() * scaleFactor * Draw.scl, -buffer.getHeight() * scaleFactor * Draw.scl); } }); Draw.blend();