WIP dynamic fog + bugfixes + cleanup
This commit is contained in:
@@ -249,6 +249,9 @@ public class Block extends UnlockableContent implements Senseable{
|
||||
/** Radius of the light emitted by this block. */
|
||||
public float lightRadius = 60f;
|
||||
|
||||
/** How much fog this block uncovers, in tiles. Cannot be dynamic. <= 0 to disable. */
|
||||
public int fogRadius = -1;
|
||||
|
||||
/** The sound that this block makes while active. One sound loop. Do not overuse. */
|
||||
public Sound loopSound = Sounds.none;
|
||||
/** Active sound base volume. */
|
||||
@@ -1038,6 +1041,10 @@ public class Block extends UnlockableContent implements Senseable{
|
||||
hasShadow = false;
|
||||
}
|
||||
|
||||
if(fogRadius > 0){
|
||||
flags = flags.with(BlockFlag.hasFogRadius);
|
||||
}
|
||||
|
||||
//initialize default health based on size
|
||||
if(health == -1){
|
||||
boolean round = false;
|
||||
|
||||
@@ -23,10 +23,11 @@ public enum BlockFlag{
|
||||
/** Blocks that extinguishes fires. */
|
||||
extinguisher,
|
||||
|
||||
//single-block identifiers
|
||||
//special, internal identifiers
|
||||
launchPad,
|
||||
unitCargoUnloadPoint,
|
||||
unitAssembler;
|
||||
unitAssembler,
|
||||
hasFogRadius;
|
||||
|
||||
public final static BlockFlag[] all = values();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user