Fix invisible turret and broken RTG generators
This commit is contained in:
2
TODO.md
2
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
|
- More indicators for when the core is damaged and/or under attack
|
||||||
- Fix bugs with junction not accepting blocks (low FPS)
|
- Fix bugs with junction not accepting blocks (low FPS)
|
||||||
- Fix bugs with tunnel merging and/or removing items (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
|
- [DONE] Add link to Mindustry discord everywhere
|
||||||
- Balancing to slow down progression
|
- Balancing to slow down progression
|
||||||
- Map editor
|
- Map editor
|
||||||
|
|||||||
@@ -52,7 +52,7 @@ public class AndroidLauncher extends AndroidApplication{
|
|||||||
Mindustry.donationsCallable = new Callable(){ @Override public void run(){ showDonations(); } };
|
Mindustry.donationsCallable = new Callable(){ @Override public void run(){ showDonations(); } };
|
||||||
|
|
||||||
if(doubleScaleTablets && isTablet(this.getContext())){
|
if(doubleScaleTablets && isTablet(this.getContext())){
|
||||||
Unit.dp.addition = 0.5f;
|
Unit.dp.addition = 1f;
|
||||||
}
|
}
|
||||||
|
|
||||||
config.hideStatusBar = true;
|
config.hideStatusBar = true;
|
||||||
|
|||||||
@@ -59,6 +59,7 @@ public class Control extends Module{
|
|||||||
Tile core;
|
Tile core;
|
||||||
Array<SpawnPoint> spawnpoints = new Array<>();
|
Array<SpawnPoint> spawnpoints = new Array<>();
|
||||||
boolean shouldUpdateItems = false;
|
boolean shouldUpdateItems = false;
|
||||||
|
boolean wasPaused = false;
|
||||||
|
|
||||||
float respawntime;
|
float respawntime;
|
||||||
InputHandler input;
|
InputHandler input;
|
||||||
@@ -409,6 +410,19 @@ public class Control extends Module{
|
|||||||
return items;
|
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
|
@Override
|
||||||
public void init(){
|
public void init(){
|
||||||
Musics.shuffleAll();
|
Musics.shuffleAll();
|
||||||
|
|||||||
@@ -46,6 +46,7 @@ public class BlastEnemy extends Enemy{
|
|||||||
Bullet b = new Bullet(BulletType.blast, this, x, y, 0).add();
|
Bullet b = new Bullet(BulletType.blast, this, x, y, 0).add();
|
||||||
b.damage = BulletType.blast.damage + (tier-1) * 40;
|
b.damage = BulletType.blast.damage + (tier-1) * 40;
|
||||||
damage(999);
|
damage(999);
|
||||||
|
remove();
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -85,6 +85,7 @@ public class HealerEnemy extends Enemy{
|
|||||||
Bullet b = new Bullet(BulletType.blast, this, x, y, 0).add();
|
Bullet b = new Bullet(BulletType.blast, this, x, y, 0).add();
|
||||||
b.damage = BulletType.blast.damage + (tier-1) * 30;
|
b.damage = BulletType.blast.damage + (tier-1) * 30;
|
||||||
damage(999);
|
damage(999);
|
||||||
|
remove();
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -158,6 +158,9 @@ public class Turret extends Block{
|
|||||||
float targetRot = Angles.predictAngle(tile.worldx(), tile.worldy(),
|
float targetRot = Angles.predictAngle(tile.worldx(), tile.worldy(),
|
||||||
entity.target.x, entity.target.y, entity.target.xvelocity, entity.target.yvelocity, bullet.speed);
|
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,
|
entity.rotation = Mathf.slerp(entity.rotation, targetRot,
|
||||||
rotatespeed*Timers.delta());
|
rotatespeed*Timers.delta());
|
||||||
|
|
||||||
|
|||||||
@@ -22,7 +22,7 @@ import io.anuke.ucore.util.Mathf;
|
|||||||
//TODO
|
//TODO
|
||||||
public class Teleporter extends Block implements Configurable{
|
public class Teleporter extends Block implements Configurable{
|
||||||
public static final int colors = 4;
|
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<Tile> removal = new Array<>();
|
private static Array<Tile> removal = new Array<>();
|
||||||
private static Array<Tile> returns = new Array<>();
|
private static Array<Tile> returns = new Array<>();
|
||||||
|
|||||||
@@ -73,7 +73,7 @@ public class ItemPowerGenerator extends Generator{
|
|||||||
PowerEntity entity = tile.entity();
|
PowerEntity entity = tile.entity();
|
||||||
|
|
||||||
float maxPower = Math.min(powerCapacity - entity.power, powerOutput * Timers.delta());
|
float maxPower = Math.min(powerCapacity - entity.power, powerOutput * Timers.delta());
|
||||||
float mfract = maxPower/(powerOutput * Timers.delta());
|
float mfract = maxPower/(powerOutput);
|
||||||
|
|
||||||
if(entity.time > 0f){
|
if(entity.time > 0f){
|
||||||
entity.time -= 1f/itemDuration*mfract;
|
entity.time -= 1f/itemDuration*mfract;
|
||||||
|
|||||||
@@ -23,7 +23,7 @@ public class DesktopLauncher {
|
|||||||
config.setMaximized(true);
|
config.setMaximized(true);
|
||||||
config.setWindowedMode(960, 540);
|
config.setWindowedMode(960, 540);
|
||||||
config.setWindowIcon("sprites/icon.png");
|
config.setWindowIcon("sprites/icon.png");
|
||||||
//config.useVsync(false);
|
config.useVsync(false);
|
||||||
|
|
||||||
Mindustry.platforms = new PlatformFunction(){
|
Mindustry.platforms = new PlatformFunction(){
|
||||||
SimpleDateFormat format = new SimpleDateFormat("EEE, dd MMM yyyy HH:mm");
|
SimpleDateFormat format = new SimpleDateFormat("EEE, dd MMM yyyy HH:mm");
|
||||||
|
|||||||
Reference in New Issue
Block a user