This commit is contained in:
Anuken
2019-11-19 23:09:35 -05:00
parent 496677725e
commit c4c19a204f
3 changed files with 4 additions and 5 deletions

View File

@@ -62,12 +62,12 @@ public class SchematicsDialog extends FloatingDialog{
t.clear(); t.clear();
int i = 0; int i = 0;
if(!schematics.all().contains(s -> search.isEmpty() || s.name().contains(search))){ if(!schematics.all().contains(s -> search.isEmpty() || s.name().toLowerCase().contains(search.toLowerCase()))){
t.add("$none"); t.add("$none");
} }
for(Schematic s : schematics.all()){ for(Schematic s : schematics.all()){
if(!search.isEmpty() && !s.name().contains(search)) continue; if(!search.isEmpty() && !s.name().toLowerCase().contains(search.toLowerCase())) continue;
Button[] sel = {null}; Button[] sel = {null};
sel[0] = t.addButton(b -> { sel[0] = t.addButton(b -> {

View File

@@ -296,7 +296,7 @@ public class Block extends BlockStorage{
} }
public void drawLight(Tile tile){ public void drawLight(Tile tile){
if(hasLiquids && drawLiquidLight && tile.entity.liquids.current().lightColor.a > 0.001f){ if(tile.entity != null && hasLiquids && drawLiquidLight && tile.entity.liquids.current().lightColor.a > 0.001f){
drawLiquidLight(tile, tile.entity.liquids.current(), tile.entity.liquids.smoothAmount()); drawLiquidLight(tile, tile.entity.liquids.current(), tile.entity.liquids.smoothAmount());
} }
} }

View File

@@ -91,10 +91,9 @@ public class NuclearReactor extends PowerGenerator{
} }
Liquid liquid = cliquid.liquid; Liquid liquid = cliquid.liquid;
float liquidAmount = cliquid.amount;
if(entity.heat > 0){ if(entity.heat > 0){
float maxUsed = Math.min(Math.min(entity.liquids.get(liquid), entity.heat / coolantPower), liquidAmount * entity.delta()); float maxUsed = Math.min(entity.liquids.get(liquid), entity.heat / coolantPower);
entity.heat -= maxUsed * coolantPower; entity.heat -= maxUsed * coolantPower;
entity.liquids.remove(liquid, maxUsed); entity.liquids.remove(liquid, maxUsed);
} }