From fc0f48e13d3e5183e986754e5e91db9984bbbdad Mon Sep 17 00:00:00 2001 From: "[Error_27]" Date: Sat, 27 May 2023 16:26:24 -0400 Subject: [PATCH 1/3] Fix Scaling on Objective Dialogs (#8646) --- core/src/mindustry/editor/MapObjectivesDialog.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/core/src/mindustry/editor/MapObjectivesDialog.java b/core/src/mindustry/editor/MapObjectivesDialog.java index 9642ea5126..5e354a84ae 100644 --- a/core/src/mindustry/editor/MapObjectivesDialog.java +++ b/core/src/mindustry/editor/MapObjectivesDialog.java @@ -98,7 +98,7 @@ public class MapObjectivesDialog extends BaseDialog{ setInterpreter(UnlockableContent.class, (cont, name, type, field, remover, indexer, get, set) -> { name(cont, name, remover, indexer); cont.table(t -> t.left().button( - b -> b.image().size(iconSmall).update(i -> i.setDrawable(get.get().uiIcon)), + b -> b.image().size(iconSmall).scaling(Scaling.fit).update(i -> i.setDrawable(get.get().uiIcon)), () -> showContentSelect(null, set, b -> (field != null && !field.isAnnotationPresent(Researchable.class)) || b.techNode != null) ).fill().pad(4)).growX().fillY(); }); @@ -505,7 +505,7 @@ public class MapObjectivesDialog extends BaseDialog{ content.getBy(type).as() )){ if(content.isHidden() || !check.get((T)content)) continue; - t.image(content == Blocks.air ? Icon.none.getRegion() : content.uiIcon).size(iconMed).pad(3) + t.image(content == Blocks.air ? Icon.none.getRegion() : content.uiIcon).size(iconMed).pad(3).scaling(Scaling.fit) .with(b -> b.addListener(new HandCursorListener())) .tooltip(content.localizedName).get().clicked(() -> { cons.get((T)content); From 257d34170373b4729515970fbb8c6ebf1463f3c0 Mon Sep 17 00:00:00 2001 From: MEEPofFaith <54301439+MEEPofFaith@users.noreply.github.com> Date: Sat, 27 May 2023 21:06:57 -0700 Subject: [PATCH 2/3] Spinning FlareParts (#8637) --- core/src/mindustry/entities/part/FlarePart.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/core/src/mindustry/entities/part/FlarePart.java b/core/src/mindustry/entities/part/FlarePart.java index b82fbfb92b..d07987d37e 100644 --- a/core/src/mindustry/entities/part/FlarePart.java +++ b/core/src/mindustry/entities/part/FlarePart.java @@ -9,7 +9,7 @@ import mindustry.graphics.*; public class FlarePart extends DrawPart{ public int sides = 4; public float radius = 100f, radiusTo = -1f, stroke = 6f, innerScl = 0.5f, innerRadScl = 0.33f; - public float x, y, rotation, rotMove; + public float x, y, rotation, rotMove, spinSpeed; public boolean followRotation; public Color color1 = Pal.techBlue, color2 = Color.white; public PartProgress progress = PartProgress.warmup; @@ -29,7 +29,7 @@ public class FlarePart extends DrawPart{ float rx = params.x + Tmp.v1.x, ry = params.y + Tmp.v1.y, - rot = (followRotation ? params.rotation : 0f) + rotMove * prog + rotation, + rot = (followRotation ? params.rotation : 0f) + rotMove * prog + rotation + Time.time * spinSpeed, rad = radiusTo < 0 ? radius : Mathf.lerp(radius, radiusTo, prog); Draw.color(color1); From 8db8d79eff42085ae6cacd27fcd3f9521077fcf9 Mon Sep 17 00:00:00 2001 From: GlennFolker <63218676+GlennFolker@users.noreply.github.com> Date: Sun, 28 May 2023 20:14:15 +0700 Subject: [PATCH 3/3] Allow Universe to update all solar systems (#8647) --- core/src/mindustry/game/Universe.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/core/src/mindustry/game/Universe.java b/core/src/mindustry/game/Universe.java index 01b1d714b3..a1c8951db6 100644 --- a/core/src/mindustry/game/Universe.java +++ b/core/src/mindustry/game/Universe.java @@ -38,8 +38,10 @@ public class Universe{ /** Update regardless of whether the player is in the campaign. */ public void updateGlobal(){ - //currently only updates one solar system - updatePlanet(Planets.sun); + for(Planet planet : content.planets()){ + //update all parentless planets (solar system root), regardless of which one the player is in + if(planet.parent == null) updatePlanet(planet); + } } public int turn(){