Cleanup & minor layout bugfixes
This commit is contained in:
@@ -17,7 +17,7 @@ public class LogicAI extends AIController{
|
|||||||
/** Minimum delay between item transfers. */
|
/** Minimum delay between item transfers. */
|
||||||
public static final float transferDelay = 60f * 1.5f;
|
public static final float transferDelay = 60f * 1.5f;
|
||||||
/** Time after which the unit resets its controlled and reverts to a normal unit. */
|
/** 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 LUnitControl control = LUnitControl.idle;
|
||||||
public float moveX, moveY, moveRad;
|
public float moveX, moveY, moveRad;
|
||||||
|
|||||||
@@ -17,7 +17,7 @@ import static mindustry.Vars.*;
|
|||||||
|
|
||||||
/** Controls playback of multiple audio tracks.*/
|
/** Controls playback of multiple audio tracks.*/
|
||||||
public class SoundControl{
|
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 */
|
/** normal, ambient music, plays at any time */
|
||||||
public Seq<Music> ambientMusic = Seq.with();
|
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. */
|
/** Waves this sector can survive if under attack. Based on wave in info. <0 means uncalculated. */
|
||||||
public int wavesSurvived = -1;
|
public int wavesSurvived = -1;
|
||||||
/** Time between waves. */
|
/** Time between waves. */
|
||||||
public float waveSpacing = 60 * 60 * 2;
|
public float waveSpacing = 2 * Time.toMinutes;
|
||||||
/** Damage dealt to sector. */
|
/** Damage dealt to sector. */
|
||||||
public float damage;
|
public float damage;
|
||||||
/** How many waves have passed while the player was away. */
|
/** How many waves have passed while the player was away. */
|
||||||
|
|||||||
@@ -263,7 +263,7 @@ public class CustomRulesDialog extends BaseDialog{
|
|||||||
|
|
||||||
rebuild[0] = () -> {
|
rebuild[0] = () -> {
|
||||||
base.clearChildren();
|
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;
|
int idx = 0;
|
||||||
|
|
||||||
for(WeatherEntry entry : rules.weather){
|
for(WeatherEntry entry : rules.weather){
|
||||||
|
|||||||
@@ -739,7 +739,7 @@ public class PlanetDialog extends BaseDialog implements PlanetInterfaceRenderer{
|
|||||||
updateSelected();
|
updateSelected();
|
||||||
}).checked(sector.info.icon == null);
|
}).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;
|
int i = 1;
|
||||||
for(var key : defaultIcons){
|
for(var key : defaultIcons){
|
||||||
|
|||||||
@@ -415,32 +415,14 @@ public class SchematicsDialog extends BaseDialog{
|
|||||||
t.marginRight(19f);
|
t.marginRight(19f);
|
||||||
t.defaults().size(48f);
|
t.defaults().size(48f);
|
||||||
|
|
||||||
int cols = (int)Math.min(20, Core.graphics.getWidth() / 52f);
|
int cols = (int)Math.min(20, Core.graphics.getWidth() / Scl.scl(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;
|
|
||||||
|
|
||||||
for(ContentType ctype : defaultContentIcons){
|
for(ContentType ctype : defaultContentIcons){
|
||||||
t.row();
|
t.row();
|
||||||
t.image().colspan(cols).growX().width(Float.NEGATIVE_INFINITY).height(3f).color(Pal.accent);
|
t.image().colspan(cols).growX().width(Float.NEGATIVE_INFINITY).height(3f).color(Pal.accent);
|
||||||
t.row();
|
t.row();
|
||||||
|
|
||||||
i = 0;
|
int i = 0;
|
||||||
for(UnlockableContent u : content.getBy(ctype).<UnlockableContent>as()){
|
for(UnlockableContent u : content.getBy(ctype).<UnlockableContent>as()){
|
||||||
if(!u.isHidden() && u.unlockedNow() && u.hasEmoji() && !tags.contains(u.emoji())){
|
if(!u.isHidden() && u.unlockedNow() && u.hasEmoji() && !tags.contains(u.emoji())){
|
||||||
t.button(new TextureRegionDrawable(u.uiIcon), Styles.cleari, iconMed, () -> {
|
t.button(new TextureRegionDrawable(u.uiIcon), Styles.cleari, iconMed, () -> {
|
||||||
|
|||||||
Reference in New Issue
Block a user