From 02a53daa587629ca77790fac841d2257906672e1 Mon Sep 17 00:00:00 2001 From: ApsZoldat Date: Tue, 28 Nov 2023 22:00:08 +0300 Subject: [PATCH] Marker autoscale now works outside of minimap mode, another yet lmarkercontrol instructions cleanup, fix renderer's draw color breaking after drawing markers --- core/assets/bundles/bundle.properties | 2 +- core/src/mindustry/core/Renderer.java | 2 + core/src/mindustry/game/MapObjectives.java | 172 +++++++++---------- core/src/mindustry/logic/LMarkerControl.java | 4 +- 4 files changed, 81 insertions(+), 99 deletions(-) diff --git a/core/assets/bundles/bundle.properties b/core/assets/bundles/bundle.properties index 48b132a762..7d230ea73f 100644 --- a/core/assets/bundles/bundle.properties +++ b/core/assets/bundles/bundle.properties @@ -2462,4 +2462,4 @@ lenum.boost = Start/stop boosting. lenum.texture = Texture name straight from game's texture atlas (using kebab-case naming style).\nSecond and third arguments are additional suffixes added using "-" separator.\nIf additional arguments are not strings, nothing is added to first string. lenum.texturewidth = Width of texture in tiles. Zero value scales marker width to original texture's size. lenum.textureheight = Height of texture in tiles. Zero value scales marker height to original texture's size. -lenum.minimapautoscale = Whether to scale marker in minimap mode corresponding to player's zoom level. +lenum.autoscale = Whether to scale marker corresponding to player's zoom level. diff --git a/core/src/mindustry/core/Renderer.java b/core/src/mindustry/core/Renderer.java index ba935f438d..62008fc3a7 100644 --- a/core/src/mindustry/core/Renderer.java +++ b/core/src/mindustry/core/Renderer.java @@ -380,6 +380,8 @@ public class Renderer implements ApplicationListener{ if(marker != null) marker.draw(); } + Draw.reset(); + Draw.draw(Layer.overlayUI, overlays::drawTop); if(state.rules.fog) Draw.draw(Layer.fogOfWar, fog::drawFog); Draw.draw(Layer.space, this::drawLanding); diff --git a/core/src/mindustry/game/MapObjectives.java b/core/src/mindustry/game/MapObjectives.java index a1c78e2516..e03bdea492 100644 --- a/core/src/mindustry/game/MapObjectives.java +++ b/core/src/mindustry/game/MapObjectives.java @@ -615,8 +615,8 @@ public class MapObjectives implements Iterable, Eachable