From 4802076bf81709d690889e24c9a86eccb95fd209 Mon Sep 17 00:00:00 2001 From: ApsZoldat Date: Sun, 10 Dec 2023 22:44:30 +0300 Subject: [PATCH] WIP marker changes, fix server name not appearing for saved hosts in join dialog --- core/assets/bundles/bundle.properties | 3 ++- core/src/mindustry/core/Renderer.java | 8 ++++-- core/src/mindustry/game/MapObjectives.java | 26 ++++++++++++++----- .../mindustry/graphics/MinimapRenderer.java | 6 +++-- core/src/mindustry/logic/LExecutor.java | 26 +++++++++---------- core/src/mindustry/logic/LMarkerControl.java | 5 ++-- core/src/mindustry/ui/dialogs/JoinDialog.java | 10 +++---- 7 files changed, 51 insertions(+), 33 deletions(-) diff --git a/core/assets/bundles/bundle.properties b/core/assets/bundles/bundle.properties index 80775411ac..f36943bd96 100644 --- a/core/assets/bundles/bundle.properties +++ b/core/assets/bundles/bundle.properties @@ -2480,6 +2480,7 @@ lenum.getblock = Fetch a building, floor and type at coordinates.\nUnit must be lenum.within = Check if unit is near a position. 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.text = Set marker text, if applicable to marker's type.\nIf printFlush is set to true, consumes text buffer content as text argument.\nIf fetch is set to true, tries to fetch properties from map locale bundle or game's bundle. +lenum.texture = Texture name straight from game's texture atlas (using kebab-case naming style).\nIf printFlush is set to true, consumes text buffer content as text argument. lenum.texturesize = Size of texture in tiles. Zero value scales marker width to original texture's size. 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 62008fc3a7..a97b13c8e1 100644 --- a/core/src/mindustry/core/Renderer.java +++ b/core/src/mindustry/core/Renderer.java @@ -373,11 +373,15 @@ public class Renderer implements ApplicationListener{ //draw objective markers state.rules.objectives.eachRunning(obj -> { - for(var marker : obj.markers) marker.draw(); + for(var marker : obj.markers){ + if(!marker.minimap) marker.drawWorld(); + } }); for(var marker : state.markers.values()){ - if(marker != null) marker.draw(); + if(marker != null){ + if(!marker.isHidden() && !marker.minimap) marker.drawWorld(); + } } Draw.reset(); diff --git a/core/src/mindustry/game/MapObjectives.java b/core/src/mindustry/game/MapObjectives.java index 192d1ee86b..6aee74ff9d 100644 --- a/core/src/mindustry/game/MapObjectives.java +++ b/core/src/mindustry/game/MapObjectives.java @@ -638,14 +638,18 @@ public class MapObjectives implements Iterable, Eachable