Crash fix, minor duct bridge cost reduction
This commit is contained in:
@@ -2050,7 +2050,7 @@ public class Blocks{
|
||||
}};
|
||||
|
||||
ductBridge = new DuctBridge("duct-bridge"){{
|
||||
requirements(Category.distribution, with(Items.beryllium, 20));
|
||||
requirements(Category.distribution, with(Items.beryllium, 15));
|
||||
health = 90;
|
||||
speed = 4f;
|
||||
buildCostMultiplier = 2f;
|
||||
@@ -4367,6 +4367,7 @@ public class Blocks{
|
||||
}};
|
||||
outlineColor = Pal.darkOutline;
|
||||
|
||||
liquidCapacity = 50f;
|
||||
liquidConsumed = 10f / 60f;
|
||||
targetInterval = 5f;
|
||||
newTargetInterval = 30f;
|
||||
|
||||
@@ -76,7 +76,16 @@ abstract class PlayerComp implements UnitController, Entityc, Syncc, Timerc, Dra
|
||||
|
||||
public TextureRegion icon(){
|
||||
//display default icon for dead players
|
||||
if(dead()) return core() == null ? UnitTypes.alpha.uiIcon : ((CoreBlock)bestCore().block).unitType.uiIcon;
|
||||
if(dead()){
|
||||
if(core() == null){
|
||||
return UnitTypes.alpha.uiIcon;
|
||||
}
|
||||
var bestCore = (CoreBuild)bestCore();
|
||||
if(bestCore == null){
|
||||
return UnitTypes.alpha.uiIcon;
|
||||
}
|
||||
return ((CoreBlock)bestCore.block).unitType.uiIcon;
|
||||
}
|
||||
|
||||
return unit.icon();
|
||||
}
|
||||
|
||||
@@ -22,7 +22,7 @@ public class TileableLogicDisplay extends LogicDisplay{
|
||||
protected static final IntSet processed = new IntSet();
|
||||
|
||||
//in tiles
|
||||
public int maxDisplayDimensions = 12;
|
||||
public int maxDisplayDimensions = 16;
|
||||
public @Load(value = "@-#", length = 47) TextureRegion[] tileRegion;
|
||||
public @Load("@-back") TextureRegion backRegion;
|
||||
|
||||
@@ -221,6 +221,7 @@ public class TileableLogicDisplay extends LogicDisplay{
|
||||
|
||||
Draw.z(Layer.block + offset);
|
||||
|
||||
//TODO: for square regions, this can be optimized to draw only one thing
|
||||
Draw.blend(Blending.disabled);
|
||||
Draw.draw(Draw.z(), () -> {
|
||||
if(rootDisplay.buffer != null){
|
||||
|
||||
Reference in New Issue
Block a user