Merge remote-tracking branch 'origin/master'

This commit is contained in:
Anuken
2023-05-28 09:57:31 -04:00
3 changed files with 8 additions and 6 deletions

View File

@@ -98,7 +98,7 @@ public class MapObjectivesDialog extends BaseDialog{
setInterpreter(UnlockableContent.class, (cont, name, type, field, remover, indexer, get, set) -> { setInterpreter(UnlockableContent.class, (cont, name, type, field, remover, indexer, get, set) -> {
name(cont, name, remover, indexer); name(cont, name, remover, indexer);
cont.table(t -> t.left().button( 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) () -> showContentSelect(null, set, b -> (field != null && !field.isAnnotationPresent(Researchable.class)) || b.techNode != null)
).fill().pad(4)).growX().fillY(); ).fill().pad(4)).growX().fillY();
}); });
@@ -505,7 +505,7 @@ public class MapObjectivesDialog extends BaseDialog{
content.getBy(type).<UnlockableContent>as() content.getBy(type).<UnlockableContent>as()
)){ )){
if(content.isHidden() || !check.get((T)content)) continue; 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())) .with(b -> b.addListener(new HandCursorListener()))
.tooltip(content.localizedName).get().clicked(() -> { .tooltip(content.localizedName).get().clicked(() -> {
cons.get((T)content); cons.get((T)content);

View File

@@ -9,7 +9,7 @@ import mindustry.graphics.*;
public class FlarePart extends DrawPart{ public class FlarePart extends DrawPart{
public int sides = 4; public int sides = 4;
public float radius = 100f, radiusTo = -1f, stroke = 6f, innerScl = 0.5f, innerRadScl = 0.33f; 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 boolean followRotation;
public Color color1 = Pal.techBlue, color2 = Color.white; public Color color1 = Pal.techBlue, color2 = Color.white;
public PartProgress progress = PartProgress.warmup; public PartProgress progress = PartProgress.warmup;
@@ -29,7 +29,7 @@ public class FlarePart extends DrawPart{
float float
rx = params.x + Tmp.v1.x, rx = params.x + Tmp.v1.x,
ry = params.y + Tmp.v1.y, 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); rad = radiusTo < 0 ? radius : Mathf.lerp(radius, radiusTo, prog);
Draw.color(color1); Draw.color(color1);

View File

@@ -38,8 +38,10 @@ public class Universe{
/** Update regardless of whether the player is in the campaign. */ /** Update regardless of whether the player is in the campaign. */
public void updateGlobal(){ public void updateGlobal(){
//currently only updates one solar system for(Planet planet : content.planets()){
updatePlanet(Planets.sun); //update all parentless planets (solar system root), regardless of which one the player is in
if(planet.parent == null) updatePlanet(planet);
}
} }
public int turn(){ public int turn(){