Crash fix

This commit is contained in:
Anuken
2019-04-04 20:39:04 -04:00
parent 0b175cb25d
commit 2dee221861
4 changed files with 5 additions and 4 deletions

View File

@@ -46,7 +46,7 @@ task deploy(type: Copy){
from "build/outputs/apk/release/android-release.apk" from "build/outputs/apk/release/android-release.apk"
into "../deploy/" into "../deploy/"
rename ("android-google-release.apk", appName + "-android-" + getVersionString() + ".apk") rename ("android-release.apk", appName + "-android-" + getVersionString() + ".apk")
} }
android { android {

View File

@@ -213,8 +213,8 @@ public interface BuilderTrait extends Entity, TeamTrait{
TileEntity core = unit.getClosestCore(); TileEntity core = unit.getClosestCore();
//if there is no core to build with, stop building! //if there is no core to build with or no build entity, stop building!
if(core == null){ if(core == null || !(tile.entity instanceof BuildEntity)){
return; return;
} }

View File

@@ -280,7 +280,9 @@ public class TileEntity extends BaseEntity implements TargetTrait, HealthTrait{
if(health <= 0){ if(health <= 0){
onDeath(); onDeath();
return; //no need to update anymore
} }
Block previous = block; Block previous = block;
block.update(tile); block.update(tile);
if(block == previous && cons != null){ if(block == previous && cons != null){

View File

@@ -199,7 +199,6 @@ public class Conveyor extends Block{
@Override @Override
public void update(Tile tile){ public void update(Tile tile){
ConveyorEntity entity = tile.entity(); ConveyorEntity entity = tile.entity();
entity.minitem = 1f; entity.minitem = 1f;
Tile next = tile.getNearby(tile.getRotation()); Tile next = tile.getNearby(tile.getRotation());