mirror of
https://github.com/Anuken/Mindustry.git
synced 2026-01-26 06:22:17 -08:00
Cleanup & minor layout bugfixes
This commit is contained in:
parent
f8ddf952ca
commit
02c03e9c67
6 changed files with 7 additions and 25 deletions
|
|
@ -17,7 +17,7 @@ public class LogicAI extends AIController{
|
|||
/** Minimum delay between item transfers. */
|
||||
public static final float transferDelay = 60f * 1.5f;
|
||||
/** Time after which the unit resets its controlled and reverts to a normal unit. */
|
||||
public static final float logicControlTimeout = 10f * 60f;
|
||||
public static final float logicControlTimeout = 60f * 10f;
|
||||
|
||||
public LUnitControl control = LUnitControl.idle;
|
||||
public float moveX, moveY, moveRad;
|
||||
|
|
|
|||
|
|
@ -17,7 +17,7 @@ import static mindustry.Vars.*;
|
|||
|
||||
/** Controls playback of multiple audio tracks.*/
|
||||
public class SoundControl{
|
||||
protected static final float finTime = 120f, foutTime = 120f, musicInterval = 60 * 60 * 3f, musicChance = 0.6f, musicWaveChance = 0.46f;
|
||||
protected static final float finTime = 120f, foutTime = 120f, musicInterval = 3f * Time.toMinutes, musicChance = 0.6f, musicWaveChance = 0.46f;
|
||||
|
||||
/** normal, ambient music, plays at any time */
|
||||
public Seq<Music> ambientMusic = Seq.with();
|
||||
|
|
|
|||
|
|
@ -55,7 +55,7 @@ public class SectorInfo{
|
|||
/** Waves this sector can survive if under attack. Based on wave in info. <0 means uncalculated. */
|
||||
public int wavesSurvived = -1;
|
||||
/** Time between waves. */
|
||||
public float waveSpacing = 60 * 60 * 2;
|
||||
public float waveSpacing = 2 * Time.toMinutes;
|
||||
/** Damage dealt to sector. */
|
||||
public float damage;
|
||||
/** How many waves have passed while the player was away. */
|
||||
|
|
|
|||
|
|
@ -263,7 +263,7 @@ public class CustomRulesDialog extends BaseDialog{
|
|||
|
||||
rebuild[0] = () -> {
|
||||
base.clearChildren();
|
||||
int cols = Math.max(1, Core.graphics.getWidth() / 460);
|
||||
int cols = Math.max(1, (int)(Core.graphics.getWidth() / Scl.scl(450)));
|
||||
int idx = 0;
|
||||
|
||||
for(WeatherEntry entry : rules.weather){
|
||||
|
|
|
|||
|
|
@ -739,7 +739,7 @@ public class PlanetDialog extends BaseDialog implements PlanetInterfaceRenderer{
|
|||
updateSelected();
|
||||
}).checked(sector.info.icon == null);
|
||||
|
||||
int cols = (int)Math.min(20, Core.graphics.getWidth() / 52f);
|
||||
int cols = (int)Math.min(20, Core.graphics.getWidth() / Scl.scl(52f));
|
||||
|
||||
int i = 1;
|
||||
for(var key : defaultIcons){
|
||||
|
|
|
|||
|
|
@ -415,32 +415,14 @@ public class SchematicsDialog extends BaseDialog{
|
|||
t.marginRight(19f);
|
||||
t.defaults().size(48f);
|
||||
|
||||
int cols = (int)Math.min(20, Core.graphics.getWidth() / 52f);
|
||||
|
||||
/*
|
||||
int i = 0;
|
||||
for(var key : defaultIcons){
|
||||
var value = Icon.icons.get(key);
|
||||
|
||||
t.button(value, Styles.cleari, () -> {
|
||||
sector.info.icon = key;
|
||||
sector.info.contentIcon = null;
|
||||
sector.saveInfo();
|
||||
hide();
|
||||
updateSelected();
|
||||
}).checked(key.equals(sector.info.icon));
|
||||
|
||||
if(++i % cols == 0) t.row();
|
||||
}*/
|
||||
|
||||
int i = 0;
|
||||
int cols = (int)Math.min(20, Core.graphics.getWidth() / Scl.scl(52f));
|
||||
|
||||
for(ContentType ctype : defaultContentIcons){
|
||||
t.row();
|
||||
t.image().colspan(cols).growX().width(Float.NEGATIVE_INFINITY).height(3f).color(Pal.accent);
|
||||
t.row();
|
||||
|
||||
i = 0;
|
||||
int i = 0;
|
||||
for(UnlockableContent u : content.getBy(ctype).<UnlockableContent>as()){
|
||||
if(!u.isHidden() && u.unlockedNow() && u.hasEmoji() && !tags.contains(u.emoji())){
|
||||
t.button(new TextureRegionDrawable(u.uiIcon), Styles.cleari, iconMed, () -> {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue