Better oil bar color
This commit is contained in:
@@ -26,6 +26,7 @@ public class Liquids implements ContentList{
|
||||
flammability = 1.2f;
|
||||
explosiveness = 1.2f;
|
||||
heatCapacity = 0.7f;
|
||||
barColor = Color.valueOf("6b675f");
|
||||
effect = StatusEffects.tarred;
|
||||
}};
|
||||
|
||||
|
||||
@@ -3,13 +3,16 @@ package io.anuke.mindustry.type;
|
||||
import io.anuke.arc.*;
|
||||
import io.anuke.arc.graphics.*;
|
||||
import io.anuke.arc.scene.ui.layout.*;
|
||||
import io.anuke.arc.util.ArcAnnotate.*;
|
||||
import io.anuke.mindustry.content.*;
|
||||
import io.anuke.mindustry.ctype.UnlockableContent;
|
||||
import io.anuke.mindustry.ui.*;
|
||||
|
||||
public class Liquid extends UnlockableContent{
|
||||
public final Color color;
|
||||
public final @NonNull Color color;
|
||||
|
||||
/** Color used in bars. */
|
||||
public @Nullable Color barColor;
|
||||
/** 0-1, 0 is completely inflammable, anything above that may catch fire when exposed to heat, 0.5+ is very flammable. */
|
||||
public float flammability;
|
||||
/** temperature: 0.5 is 'room' temperature, 0 is very cold, 1 is molten hot */
|
||||
@@ -20,8 +23,6 @@ public class Liquid extends UnlockableContent{
|
||||
public float viscosity = 0.5f;
|
||||
/** how prone to exploding this liquid is, when heated. 0 = nothing, 1 = nuke */
|
||||
public float explosiveness;
|
||||
/** the burning color of this liquid */
|
||||
public Color flameColor = Color.valueOf("ffb763");
|
||||
/** The associated status effect. */
|
||||
public StatusEffect effect = StatusEffects.none;
|
||||
|
||||
@@ -40,6 +41,10 @@ public class Liquid extends UnlockableContent{
|
||||
return flammability < 0.1f && temperature <= 0.5f;
|
||||
}
|
||||
|
||||
public Color barColor(){
|
||||
return barColor == null ? color : barColor;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void displayInfo(Table table){
|
||||
ContentDisplay.displayLiquid(table, this);
|
||||
|
||||
@@ -524,7 +524,7 @@ public class Block extends BlockStorage{
|
||||
current = entity -> entity.liquids.current();
|
||||
}
|
||||
bars.add("liquid", entity -> new Bar(() -> entity.liquids.get(current.get(entity)) <= 0.001f ? Core.bundle.get("bar.liquid") : current.get(entity).localizedName(),
|
||||
() -> current.get(entity).color, () -> entity.liquids.get(current.get(entity)) / liquidCapacity));
|
||||
() -> current.get(entity).barColor(), () -> entity.liquids.get(current.get(entity)) / liquidCapacity));
|
||||
}
|
||||
|
||||
if(hasPower && consumes.hasPower()){
|
||||
|
||||
Reference in New Issue
Block a user