Fixed #2722
This commit is contained in:
@@ -208,6 +208,7 @@ public class Blocks implements ContentList{
|
|||||||
liquidDrop = Liquids.slag;
|
liquidDrop = Liquids.slag;
|
||||||
isLiquid = true;
|
isLiquid = true;
|
||||||
cacheLayer = CacheLayer.slag;
|
cacheLayer = CacheLayer.slag;
|
||||||
|
attributes.set(Attribute.heat, 0.85f);
|
||||||
}};
|
}};
|
||||||
|
|
||||||
stone = new Floor("stone");
|
stone = new Floor("stone");
|
||||||
@@ -1142,6 +1143,7 @@ public class Blocks implements ContentList{
|
|||||||
powerProduction = 1.8f;
|
powerProduction = 1.8f;
|
||||||
generateEffect = Fx.redgeneratespark;
|
generateEffect = Fx.redgeneratespark;
|
||||||
size = 2;
|
size = 2;
|
||||||
|
floating = true;
|
||||||
}};
|
}};
|
||||||
|
|
||||||
steamGenerator = new BurnerGenerator("steam-generator"){{
|
steamGenerator = new BurnerGenerator("steam-generator"){{
|
||||||
|
|||||||
@@ -935,7 +935,7 @@ public class UnitTypes implements ContentList{
|
|||||||
drag = 0.016f;
|
drag = 0.016f;
|
||||||
flying = true;
|
flying = true;
|
||||||
range = 140f;
|
range = 140f;
|
||||||
hitSize = 18f;
|
hitSize = 20f;
|
||||||
lowAltitude = true;
|
lowAltitude = true;
|
||||||
armor = 5f;
|
armor = 5f;
|
||||||
|
|
||||||
|
|||||||
@@ -22,7 +22,7 @@ public class ThermalGenerator extends PowerGenerator{
|
|||||||
public void setStats(){
|
public void setStats(){
|
||||||
super.setStats();
|
super.setStats();
|
||||||
|
|
||||||
stats.add(BlockStat.tiles, attribute);
|
stats.add(BlockStat.tiles, attribute, floating);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
@@ -130,7 +130,7 @@ public class UnitFactory extends UnitBlock{
|
|||||||
Seq<UnitType> units = Seq.with(plans).map(u -> u.unit).filter(u -> u.unlockedNow());
|
Seq<UnitType> units = Seq.with(plans).map(u -> u.unit).filter(u -> u.unlockedNow());
|
||||||
|
|
||||||
if(units.any()){
|
if(units.any()){
|
||||||
ItemSelection.buildTable(table, units, () -> currentPlan == -1 ? null : plans[currentPlan].unit, unit -> configure(units.indexOf(unit)));
|
ItemSelection.buildTable(table, units, () -> currentPlan == -1 ? null : plans[currentPlan].unit, unit -> configure(Structs.indexOf(plans, u -> u.unit == unit)));
|
||||||
}else{
|
}else{
|
||||||
table.table(Styles.black3, t -> t.add("@none").color(Color.lightGray));
|
table.table(Styles.black3, t -> t.add("@none").color(Color.lightGray));
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -38,12 +38,20 @@ public class BlockStats{
|
|||||||
}
|
}
|
||||||
|
|
||||||
public void add(BlockStat stat, Attribute attr){
|
public void add(BlockStat stat, Attribute attr){
|
||||||
add(stat, attr, 1f);
|
add(stat, attr, false, 1f);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void add(BlockStat stat, Attribute attr, float scale){
|
public void add(BlockStat stat, Attribute attr, float scale){
|
||||||
|
add(stat, attr, false, scale);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void add(BlockStat stat, Attribute attr, boolean floating){
|
||||||
|
add(stat, attr, floating, 1f);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void add(BlockStat stat, Attribute attr, boolean floating, float scale){
|
||||||
for(Block block : Vars.content.blocks()){
|
for(Block block : Vars.content.blocks()){
|
||||||
if(!block.isFloor() || block.asFloor().attributes.get(attr) == 0) continue;
|
if(!block.isFloor() || block.asFloor().attributes.get(attr) == 0 || (block.asFloor().isLiquid && !floating)) continue;
|
||||||
add(stat, new FloorEfficiencyValue(block.asFloor(), block.asFloor().attributes.get(attr) * scale));
|
add(stat, new FloorEfficiencyValue(block.asFloor(), block.asFloor().attributes.get(attr) * scale));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user