Quality of Life changes (#11370)

* overlay light support, bulk Call.setItem implementations, Call.setLiquid implementations

* Update core/src/mindustry/graphics/BlockRenderer.java

---------

Co-authored-by: Anuken <arnukren@gmail.com>
This commit is contained in:
WMF
2025-11-17 05:43:54 +01:00
committed by GitHub
parent bb4534afde
commit f48900d6de
8 changed files with 148 additions and 4 deletions

View File

@@ -321,6 +321,8 @@ public class Block extends UnlockableContent implements Senseable{
public Color lightColor = Color.white.cpy();
/** If true, drawLight() will be called for this block. */
public boolean emitLight = false;
/** If true, this block obstructs light emitted by other blocks. */
public boolean obstructsLight = true;
/** Radius of the light emitted by this block. */
public float lightRadius = 60f;

View File

@@ -68,6 +68,8 @@ public class Floor extends Block{
public Block decoration = Blocks.air;
/** Whether units can draw shadows over this. */
public boolean canShadow = true;
/** If true, this floor ignores the obstructsLight flag of overlays. */
public boolean forceDrawLight = false;
/** Whether this overlay needs a surface to be on. False for floating blocks, like spawns. */
public boolean needsSurface = true;
/** If true, cores can be placed on this floor. */
@@ -110,6 +112,7 @@ public class Floor extends Block{
allowRectanglePlacement = true;
instantBuild = true;
ignoreBuildDarkness = true;
obstructsLight = false;
placeEffect = Fx.rotateBlock;
}

View File

@@ -19,6 +19,7 @@ public class SeaBush extends Prop{
public SeaBush(String name){
super(name);
variants = 0;
obstructsLight = false;
}
@Override

View File

@@ -9,6 +9,8 @@ public class Seaweed extends Prop{
public Seaweed(String name){
super(name);
obstructsLight = false;
}
@Override