Show world processors in darkness in editor mode

This commit is contained in:
Anuken
2022-10-31 17:51:34 -04:00
parent 2e42071c92
commit e3d7acc556
7 changed files with 12 additions and 10 deletions

View File

@@ -501,6 +501,10 @@ public class Block extends UnlockableContent implements Senseable{
return update || destructible;
}
public boolean checkForceDark(Tile tile){
return forceDark;
}
@Override
public void setStats(){
super.setStats();

View File

@@ -164,7 +164,7 @@ public class Tile implements Position, QuadTreeObject, Displayable{
}
public boolean isDarkened(){
return block.solid && ((!block.synthetic() && block.fillsTile) || block.forceDark);
return block.solid && ((!block.synthetic() && block.fillsTile) || block.checkForceDark(this));
}
public Floor floor(){

View File

@@ -82,6 +82,11 @@ public class LogicBlock extends Block{
});
}
@Override
public boolean checkForceDark(Tile tile){
return !accessible();
}
public boolean accessible(){
return !privileged || state.rules.editor || state.playtestingMap != null;
}

View File

@@ -180,11 +180,6 @@ public class MessageBlock extends Block{
return !privileged;
}
@Override
public boolean displayable(){
return accessible();
}
@Override
public void handleString(Object value){
message.setLength(0);