Fix slew of bugfixes based on google play reports
This commit is contained in:
@@ -1,8 +1,8 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
package="io.anuke.mindustry"
|
package="io.anuke.mindustry"
|
||||||
android:versionCode="28"
|
android:versionCode="30"
|
||||||
android:versionName="3.01" >
|
android:versionName="3.03" >
|
||||||
|
|
||||||
<uses-sdk android:minSdkVersion="9" android:targetSdkVersion="25" />
|
<uses-sdk android:minSdkVersion="9" android:targetSdkVersion="25" />
|
||||||
<uses-permission android:name="com.android.vending.BILLING" />
|
<uses-permission android:name="com.android.vending.BILLING" />
|
||||||
|
|||||||
@@ -26,6 +26,7 @@ import io.anuke.mindustry.resource.Item;
|
|||||||
import io.anuke.mindustry.resource.ItemStack;
|
import io.anuke.mindustry.resource.ItemStack;
|
||||||
import io.anuke.mindustry.resource.Weapon;
|
import io.anuke.mindustry.resource.Weapon;
|
||||||
import io.anuke.mindustry.world.*;
|
import io.anuke.mindustry.world.*;
|
||||||
|
import io.anuke.mindustry.world.blocks.ProductionBlocks;
|
||||||
import io.anuke.ucore.UCore;
|
import io.anuke.ucore.UCore;
|
||||||
import io.anuke.ucore.core.*;
|
import io.anuke.ucore.core.*;
|
||||||
import io.anuke.ucore.entities.Entities;
|
import io.anuke.ucore.entities.Entities;
|
||||||
@@ -178,6 +179,17 @@ public class Control extends Module{
|
|||||||
GameState.set(State.playing);
|
GameState.set(State.playing);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void findCore(){
|
||||||
|
for(int x = 0; x < Vars.world.width(); x ++){
|
||||||
|
for(int y = 0; y < Vars.world.height(); y ++){
|
||||||
|
if(world.tile(x, y).block() == ProductionBlocks.core){
|
||||||
|
core = world.tile(x, y);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public Tile getCore(){
|
public Tile getCore(){
|
||||||
return core;
|
return core;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -99,6 +99,10 @@ public class Renderer extends RendererModule{
|
|||||||
}else{
|
}else{
|
||||||
boolean smoothcam = Settings.getBool("smoothcam");
|
boolean smoothcam = Settings.getBool("smoothcam");
|
||||||
|
|
||||||
|
if(control.core == null){ //how is this possible? apparently it is
|
||||||
|
control.findCore();
|
||||||
|
}
|
||||||
|
|
||||||
if(control.core.block() == ProductionBlocks.core){
|
if(control.core.block() == ProductionBlocks.core){
|
||||||
|
|
||||||
if(!smoothcam){
|
if(!smoothcam){
|
||||||
|
|||||||
@@ -38,7 +38,7 @@ public class Player extends DestructibleEntity{
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void damage(int amount){
|
public void damage(int amount){
|
||||||
if(!Vars.debug)
|
if(!Vars.debug && !Vars.android)
|
||||||
super.damage(amount);
|
super.damage(amount);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -65,6 +65,7 @@ public class TileEntity extends Entity{
|
|||||||
block.onDestroyed(tile);
|
block.onDestroyed(tile);
|
||||||
|
|
||||||
Vars.world.removeBlock(tile);
|
Vars.world.removeBlock(tile);
|
||||||
|
remove();
|
||||||
}
|
}
|
||||||
|
|
||||||
public void collision(Bullet other){
|
public void collision(Bullet other){
|
||||||
@@ -91,6 +92,10 @@ public class TileEntity extends Entity{
|
|||||||
Effects.effect(Fx.smoke, x+Mathf.range(4), y+Mathf.range(4));
|
Effects.effect(Fx.smoke, x+Mathf.range(4), y+Mathf.range(4));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(health <= 0){
|
||||||
|
onDeath();
|
||||||
|
}
|
||||||
|
|
||||||
tile.block().update(tile);
|
tile.block().update(tile);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -109,7 +109,7 @@ public class Turret extends Block{
|
|||||||
public void drawSelect(Tile tile){
|
public void drawSelect(Tile tile){
|
||||||
Vector2 offset = getPlaceOffset();
|
Vector2 offset = getPlaceOffset();
|
||||||
|
|
||||||
Draw.color("green");
|
Draw.color(Color.GREEN);
|
||||||
Draw.dashCircle(tile.worldx() + offset.x, tile.worldy() + offset.y, range);
|
Draw.dashCircle(tile.worldx() + offset.x, tile.worldy() + offset.y, range);
|
||||||
Draw.reset();
|
Draw.reset();
|
||||||
|
|
||||||
|
|||||||
@@ -38,6 +38,7 @@ public class Sorter extends Junction implements Configurable{
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean acceptItem(Item item, Tile dest, Tile source){
|
public boolean acceptItem(Item item, Tile dest, Tile source){
|
||||||
|
if(source.block() instanceof Sorter) return false;
|
||||||
Tile to = getTileTarget(item, dest, source, false);
|
Tile to = getTileTarget(item, dest, source, false);
|
||||||
|
|
||||||
return to != null && to.block().acceptItem(item, to, dest);
|
return to != null && to.block().acceptItem(item, to, dest);
|
||||||
|
|||||||
@@ -23,6 +23,7 @@ public class TunnelConveyor extends Block{
|
|||||||
@Override
|
@Override
|
||||||
public void handleItem(Item item, Tile tile, Tile source){
|
public void handleItem(Item item, Tile tile, Tile source){
|
||||||
Tile tunnel = getDestTunnel(tile);
|
Tile tunnel = getDestTunnel(tile);
|
||||||
|
if(tunnel == null) return; //TODO how is this possible? HOW DID THEY ACHIEVE SUCH A FEAT?!
|
||||||
Tile to = tunnel.getNearby()[tunnel.getRotation()];
|
Tile to = tunnel.getNearby()[tunnel.getRotation()];
|
||||||
|
|
||||||
Timers.run(25, ()->{
|
Timers.run(25, ()->{
|
||||||
|
|||||||
Reference in New Issue
Block a user