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