Fix slew of bugfixes based on google play reports

This commit is contained in:
Anuken
2017-12-13 00:09:44 -05:00
parent 36cec3ccb7
commit 940d4b3980
8 changed files with 27 additions and 4 deletions

View File

@ -1,8 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="io.anuke.mindustry"
android:versionCode="28"
android:versionName="3.01" >
android:versionCode="30"
android:versionName="3.03" >
<uses-sdk android:minSdkVersion="9" android:targetSdkVersion="25" />
<uses-permission android:name="com.android.vending.BILLING" />

View File

@ -26,6 +26,7 @@ import io.anuke.mindustry.resource.Item;
import io.anuke.mindustry.resource.ItemStack;
import io.anuke.mindustry.resource.Weapon;
import io.anuke.mindustry.world.*;
import io.anuke.mindustry.world.blocks.ProductionBlocks;
import io.anuke.ucore.UCore;
import io.anuke.ucore.core.*;
import io.anuke.ucore.entities.Entities;
@ -178,6 +179,17 @@ public class Control extends Module{
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(){
return core;
}

View File

@ -98,6 +98,10 @@ public class Renderer extends RendererModule{
clearScreen();
}else{
boolean smoothcam = Settings.getBool("smoothcam");
if(control.core == null){ //how is this possible? apparently it is
control.findCore();
}
if(control.core.block() == ProductionBlocks.core){

View File

@ -38,7 +38,7 @@ public class Player extends DestructibleEntity{
@Override
public void damage(int amount){
if(!Vars.debug)
if(!Vars.debug && !Vars.android)
super.damage(amount);
}

View File

@ -65,6 +65,7 @@ public class TileEntity extends Entity{
block.onDestroyed(tile);
Vars.world.removeBlock(tile);
remove();
}
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));
}
if(health <= 0){
onDeath();
}
tile.block().update(tile);
}

View File

@ -109,7 +109,7 @@ public class Turret extends Block{
public void drawSelect(Tile tile){
Vector2 offset = getPlaceOffset();
Draw.color("green");
Draw.color(Color.GREEN);
Draw.dashCircle(tile.worldx() + offset.x, tile.worldy() + offset.y, range);
Draw.reset();

View File

@ -38,6 +38,7 @@ public class Sorter extends Junction implements Configurable{
@Override
public boolean acceptItem(Item item, Tile dest, Tile source){
if(source.block() instanceof Sorter) return false;
Tile to = getTileTarget(item, dest, source, false);
return to != null && to.block().acceptItem(item, to, dest);

View File

@ -23,6 +23,7 @@ public class TunnelConveyor extends Block{
@Override
public void handleItem(Item item, Tile tile, Tile source){
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()];
Timers.run(25, ()->{