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