diff --git a/TODO.md b/TODO.md index db1a551695..1c87bdf52c 100644 --- a/TODO.md +++ b/TODO.md @@ -12,7 +12,7 @@ _Keep in mind that this is just a basic outline of planned features, and will be - More indicators for when the core is damaged and/or under attack - Fix bugs with junction not accepting blocks (low FPS) - Fix bugs with tunnel merging and/or removing items (low FPS) -- Edit descriptions for conveyors to be more clear about how to use them +- Edit descriptions for conveyor tunnels to be more clear about how to use them - [DONE] Add link to Mindustry discord everywhere - Balancing to slow down progression - Map editor diff --git a/android/src/io/anuke/mindustry/AndroidLauncher.java b/android/src/io/anuke/mindustry/AndroidLauncher.java index 698b5697f9..15ca88286c 100644 --- a/android/src/io/anuke/mindustry/AndroidLauncher.java +++ b/android/src/io/anuke/mindustry/AndroidLauncher.java @@ -52,7 +52,7 @@ public class AndroidLauncher extends AndroidApplication{ Mindustry.donationsCallable = new Callable(){ @Override public void run(){ showDonations(); } }; if(doubleScaleTablets && isTablet(this.getContext())){ - Unit.dp.addition = 0.5f; + Unit.dp.addition = 1f; } config.hideStatusBar = true; diff --git a/core/src/io/anuke/mindustry/core/Control.java b/core/src/io/anuke/mindustry/core/Control.java index 5bf4101825..99996f4bf0 100644 --- a/core/src/io/anuke/mindustry/core/Control.java +++ b/core/src/io/anuke/mindustry/core/Control.java @@ -59,6 +59,7 @@ public class Control extends Module{ Tile core; Array spawnpoints = new Array<>(); boolean shouldUpdateItems = false; + boolean wasPaused = false; float respawntime; InputHandler input; @@ -409,6 +410,19 @@ public class Control extends Module{ return items; } + @Override + public void pause(){ + wasPaused = GameState.is(State.paused); + if(GameState.is(State.playing)) GameState.set(State.paused); + } + + @Override + public void resume(){ + if(GameState.is(State.paused) && !wasPaused){ + GameState.set(State.playing); + } + } + @Override public void init(){ Musics.shuffleAll(); diff --git a/core/src/io/anuke/mindustry/entities/enemies/BlastEnemy.java b/core/src/io/anuke/mindustry/entities/enemies/BlastEnemy.java index 50c8d98901..e5756febff 100644 --- a/core/src/io/anuke/mindustry/entities/enemies/BlastEnemy.java +++ b/core/src/io/anuke/mindustry/entities/enemies/BlastEnemy.java @@ -46,6 +46,7 @@ public class BlastEnemy extends Enemy{ Bullet b = new Bullet(BulletType.blast, this, x, y, 0).add(); b.damage = BulletType.blast.damage + (tier-1) * 40; damage(999); + remove(); } } diff --git a/core/src/io/anuke/mindustry/entities/enemies/HealerEnemy.java b/core/src/io/anuke/mindustry/entities/enemies/HealerEnemy.java index 4dead7d896..b29b0b523f 100644 --- a/core/src/io/anuke/mindustry/entities/enemies/HealerEnemy.java +++ b/core/src/io/anuke/mindustry/entities/enemies/HealerEnemy.java @@ -85,6 +85,7 @@ public class HealerEnemy extends Enemy{ Bullet b = new Bullet(BulletType.blast, this, x, y, 0).add(); b.damage = BulletType.blast.damage + (tier-1) * 30; damage(999); + remove(); } } diff --git a/core/src/io/anuke/mindustry/world/blocks/types/defense/Turret.java b/core/src/io/anuke/mindustry/world/blocks/types/defense/Turret.java index 639323a9bc..db40a02a0d 100644 --- a/core/src/io/anuke/mindustry/world/blocks/types/defense/Turret.java +++ b/core/src/io/anuke/mindustry/world/blocks/types/defense/Turret.java @@ -157,7 +157,10 @@ public class Turret extends Block{ float targetRot = Angles.predictAngle(tile.worldx(), tile.worldy(), entity.target.x, entity.target.y, entity.target.xvelocity, entity.target.yvelocity, bullet.speed); - + + if(Float.isNaN(entity.rotation)){ + entity.rotation = 0; + } entity.rotation = Mathf.slerp(entity.rotation, targetRot, rotatespeed*Timers.delta()); diff --git a/core/src/io/anuke/mindustry/world/blocks/types/distribution/Teleporter.java b/core/src/io/anuke/mindustry/world/blocks/types/distribution/Teleporter.java index 2f3b2b3e35..5255629a85 100644 --- a/core/src/io/anuke/mindustry/world/blocks/types/distribution/Teleporter.java +++ b/core/src/io/anuke/mindustry/world/blocks/types/distribution/Teleporter.java @@ -22,7 +22,7 @@ import io.anuke.ucore.util.Mathf; //TODO public class Teleporter extends Block implements Configurable{ public static final int colors = 4; - public static final Color[] colorArray = {Color.ROYAL, Color.ORANGE, Color.SCARLET, Color.FOREST}; + public static final Color[] colorArray = {Color.ROYAL, Color.ORANGE, Color.SCARLET, Color.FOREST, Color.PURPLE, Color.GOLD, Color.PINK}; private static Array removal = new Array<>(); private static Array returns = new Array<>(); diff --git a/core/src/io/anuke/mindustry/world/blocks/types/production/ItemPowerGenerator.java b/core/src/io/anuke/mindustry/world/blocks/types/production/ItemPowerGenerator.java index c9d0b22d71..489a968392 100644 --- a/core/src/io/anuke/mindustry/world/blocks/types/production/ItemPowerGenerator.java +++ b/core/src/io/anuke/mindustry/world/blocks/types/production/ItemPowerGenerator.java @@ -73,7 +73,7 @@ public class ItemPowerGenerator extends Generator{ PowerEntity entity = tile.entity(); float maxPower = Math.min(powerCapacity - entity.power, powerOutput * Timers.delta()); - float mfract = maxPower/(powerOutput * Timers.delta()); + float mfract = maxPower/(powerOutput); if(entity.time > 0f){ entity.time -= 1f/itemDuration*mfract; diff --git a/desktop/src/io/anuke/mindustry/desktop/DesktopLauncher.java b/desktop/src/io/anuke/mindustry/desktop/DesktopLauncher.java index bdb4ad1f24..eb6289de1b 100644 --- a/desktop/src/io/anuke/mindustry/desktop/DesktopLauncher.java +++ b/desktop/src/io/anuke/mindustry/desktop/DesktopLauncher.java @@ -23,7 +23,7 @@ public class DesktopLauncher { config.setMaximized(true); config.setWindowedMode(960, 540); config.setWindowIcon("sprites/icon.png"); - //config.useVsync(false); + config.useVsync(false); Mindustry.platforms = new PlatformFunction(){ SimpleDateFormat format = new SimpleDateFormat("EEE, dd MMM yyyy HH:mm");