Crash fixes
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
package io.anuke.mindustry.entities.traits;
|
||||
|
||||
import com.badlogic.gdx.Gdx;
|
||||
import com.badlogic.gdx.graphics.Color;
|
||||
import com.badlogic.gdx.utils.Queue;
|
||||
import io.anuke.mindustry.Vars;
|
||||
@@ -229,7 +230,7 @@ public interface BuilderTrait extends Entity{
|
||||
}
|
||||
|
||||
if(!current.initialized){
|
||||
Events.fire(new BuildSelectEvent(tile, unit.getTeam(), this, current.breaking));
|
||||
Gdx.app.postRunnable(() -> Events.fire(new BuildSelectEvent(tile, unit.getTeam(), this, current.breaking)));
|
||||
current.initialized = true;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -97,7 +97,7 @@ public abstract class BaseUnit extends Unit implements ShooterTrait{
|
||||
}
|
||||
|
||||
public boolean isCommanded(){
|
||||
return !isWave && world.indexer.getAllied(team, BlockFlag.comandCenter).size != 0;
|
||||
return !isWave && world.indexer.getAllied(team, BlockFlag.comandCenter).size != 0 && world.indexer.getAllied(team, BlockFlag.comandCenter).first().entity instanceof CommandCenterEntity;
|
||||
}
|
||||
|
||||
public UnitCommand getCommand(){
|
||||
|
||||
@@ -41,7 +41,7 @@ public class UnitType extends UnlockableContent{
|
||||
public float carryWeight = 1f;
|
||||
public int itemCapacity = 30;
|
||||
public ObjectSet<Item> toMine = ObjectSet.with(Items.lead, Items.copper);
|
||||
public float buildPower = 0.3f, minePower = 0.7f, healSpeed = 2f;
|
||||
public float buildPower = 0.3f, minePower = 0.7f;
|
||||
public Weapon weapon = Weapons.blaster;
|
||||
public float weaponOffsetX, weaponOffsetY;
|
||||
public Color trailColor = Color.valueOf("ffa665");
|
||||
|
||||
Reference in New Issue
Block a user