Allow neoplasm on water/arkycite/etc
This commit is contained in:
@@ -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")){{
|
||||||
|
|||||||
@@ -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);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -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());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -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);
|
||||||
|
|||||||
@@ -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();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user