Cleanup
This commit is contained in:
@@ -198,16 +198,17 @@ public class Build{
|
||||
|
||||
if(tile == null) return false;
|
||||
|
||||
//floors have different checks
|
||||
if(type.isFloor()){
|
||||
return type.isOverlay() ? tile.overlay() != type : tile.floor() != type;
|
||||
}
|
||||
|
||||
//campaign darkness check
|
||||
if(world.getDarkness(x, y) >= 3){
|
||||
return false;
|
||||
}
|
||||
|
||||
if(!type.requiresWater && !type.isFloor() && !contactsShallows(tile.x, tile.y, type) && !type.placeableLiquid){
|
||||
return false;
|
||||
}
|
||||
|
||||
if((type.isFloor() && tile.floor() == type) || (type.isOverlay() && tile.overlay() == type)){
|
||||
if(!type.requiresWater && !contactsShallows(tile.x, tile.y, type) && !type.placeableLiquid){
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -231,7 +232,7 @@ public class Build{
|
||||
(check.floor().isDeep() && !type.floating && !type.requiresWater && !type.placeableLiquid) || //deep water
|
||||
(type == check.block() && check.build != null && rotation == check.build.rotation && type.rotate && !((type == check.block && check.team() == Team.derelict))) || //same block, same rotation
|
||||
!check.interactable(team) || //cannot interact
|
||||
(!check.floor().placeableOn && !type.isFloor()) || //solid floor
|
||||
!check.floor().placeableOn || //solid floor
|
||||
(!checkVisible && !check.block().alwaysReplace) || //replacing a block that should be replaced (e.g. payload placement)
|
||||
!(((type.canReplace(check.block()) || (type == check.block && state.rules.derelictRepair && check.team() == Team.derelict)) || //can replace type OR can replace derelict block of same type
|
||||
(check.build instanceof ConstructBuild build && build.current == type && check.centerX() == tile.x && check.centerY() == tile.y)) && //same type in construction
|
||||
|
||||
Reference in New Issue
Block a user