Allow neoplasm on water/arkycite/etc

This commit is contained in:
Anuken
2022-08-14 15:39:56 -04:00
parent 1f318306a7
commit f15a620c45
5 changed files with 10 additions and 5 deletions

View File

@@ -33,6 +33,7 @@ public class Liquids{
effect = StatusEffects.tarred; effect = StatusEffects.tarred;
boilPoint = 0.65f; boilPoint = 0.65f;
gasColor = Color.grays(0.4f); gasColor = Color.grays(0.4f);
canStayOn.add(water);
}}; }};
cryofluid = new Liquid("cryofluid", Color.valueOf("6ecdec")){{ cryofluid = new Liquid("cryofluid", Color.valueOf("6ecdec")){{
@@ -53,6 +54,7 @@ public class Liquids{
spreadTarget = Liquids.water; spreadTarget = Liquids.water;
moveThroughBlocks = true; moveThroughBlocks = true;
incinerable = true; incinerable = true;
canStayOn.addAll(water, oil, cryofluid);
colorFrom = Color.valueOf("e8803f"); colorFrom = Color.valueOf("e8803f");
colorTo = Color.valueOf("8c1225"); colorTo = Color.valueOf("8c1225");
@@ -61,6 +63,7 @@ public class Liquids{
arkycite = new Liquid("arkycite", Color.valueOf("84a94b")){{ arkycite = new Liquid("arkycite", Color.valueOf("84a94b")){{
flammability = 0.4f; flammability = 0.4f;
viscosity = 0.7f; viscosity = 0.7f;
neoplasm.canStayOn.add(this);
}}; }};
gallium = new Liquid("gallium", Color.valueOf("9a9dbf")){{ gallium = new Liquid("gallium", Color.valueOf("9a9dbf")){{

View File

@@ -129,9 +129,8 @@ public class Puddles{
/** /**
* Returns whether the first liquid can 'stay' on the second one. * Returns whether the first liquid can 'stay' on the second one.
* Currently, the only place where this can happen is oil on water.
*/ */
private static boolean canStayOn(Liquid liquid, Liquid other){ private static boolean canStayOn(Liquid liquid, Liquid other){
return liquid == Liquids.oil && other == Liquids.water; return liquid.canStayOn.contains(other);
} }
} }

View File

@@ -962,7 +962,7 @@ public class Mods implements Loadable{
Core.settings.put("mod-" + baseName + "-enabled", false); Core.settings.put("mod-" + baseName + "-enabled", false);
} }
if(!headless){ if(!headless && Core.settings.getBool("mod-" + baseName + "-enabled", true)){
Log.info("Loaded mod '@' in @ms", meta.name, Time.elapsed()); Log.info("Loaded mod '@' in @ms", meta.name, Time.elapsed());
} }

View File

@@ -3,6 +3,7 @@ package mindustry.type;
import arc.graphics.*; import arc.graphics.*;
import arc.graphics.g2d.*; import arc.graphics.g2d.*;
import arc.math.*; import arc.math.*;
import arc.struct.*;
import arc.util.*; import arc.util.*;
import mindustry.content.*; import mindustry.content.*;
import mindustry.ctype.*; import mindustry.ctype.*;
@@ -63,6 +64,8 @@ public class Liquid extends UnlockableContent implements Senseable{
public Effect vaporEffect = Fx.vapor; public Effect vaporEffect = Fx.vapor;
/** If true, this liquid is hidden in most UI. */ /** If true, this liquid is hidden in most UI. */
public boolean hidden; public boolean hidden;
/** Liquids this puddle can stay on, e.g. oil on water. */
public ObjectSet<Liquid> canStayOn = new ObjectSet<>();
public Liquid(String name, Color color){ public Liquid(String name, Color color){
super(name); super(name);

View File

@@ -38,9 +38,9 @@ public class LightBlock extends Block{
@Override @Override
public void init(){ public void init(){
//double needed for some reason lightRadius = radius*3f;
lightRadius = radius*2f;
emitLight = true; emitLight = true;
super.init(); super.init();
} }