mirror of
https://github.com/Anuken/Mindustry.git
synced 2025-07-22 21:57:58 +07:00
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"?>
|
||||
<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" />
|
||||
|
@ -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;
|
||||
}
|
||||
|
@ -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){
|
||||
|
||||
|
@ -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);
|
||||
}
|
||||
|
||||
|
@ -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);
|
||||
}
|
||||
|
||||
|
@ -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();
|
||||
|
||||
|
@ -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);
|
||||
|
@ -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, ()->{
|
||||
|
Reference in New Issue
Block a user