diff --git a/core/src/io/anuke/mindustry/content/Liquids.java b/core/src/io/anuke/mindustry/content/Liquids.java index bf103bceaa..3dccc3d7e6 100644 --- a/core/src/io/anuke/mindustry/content/Liquids.java +++ b/core/src/io/anuke/mindustry/content/Liquids.java @@ -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; }}; diff --git a/core/src/io/anuke/mindustry/type/Liquid.java b/core/src/io/anuke/mindustry/type/Liquid.java index 9b778dfd95..e6c8b3e089 100644 --- a/core/src/io/anuke/mindustry/type/Liquid.java +++ b/core/src/io/anuke/mindustry/type/Liquid.java @@ -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); diff --git a/core/src/io/anuke/mindustry/world/Block.java b/core/src/io/anuke/mindustry/world/Block.java index 828c3e17d6..9eca2e4611 100644 --- a/core/src/io/anuke/mindustry/world/Block.java +++ b/core/src/io/anuke/mindustry/world/Block.java @@ -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()){ diff --git a/gradle.properties b/gradle.properties index bab1152811..9b5dd0832a 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,3 +1,3 @@ org.gradle.daemon=true org.gradle.jvmargs=-Xms256m -Xmx1024m -archash=06112a23a816083f82f0023ddf01ba87d77e3a8b +archash=60e1edbc61f05c329019d0c5479672a298a9706c