Removed "naval" sector requirement
This commit is contained in:
@@ -80,6 +80,8 @@ public class Block extends UnlockableContent{
|
||||
public boolean rebuildable = true;
|
||||
/** whether this water can only be placed on water */
|
||||
public boolean requiresWater = false;
|
||||
/** whether this water can be placed on any liquids, anywhere */
|
||||
public boolean placeableLiquid = false;
|
||||
/** whether this floor can be placed on. */
|
||||
public boolean placeableOn = true;
|
||||
/** whether this block has insulating properties. */
|
||||
|
||||
@@ -114,7 +114,7 @@ public class Build{
|
||||
return type.bounds(x, y, Tmp.r1).grow(0.01f).contains(tile.block.bounds(tile.centerX(), tile.centerY(), Tmp.r2));
|
||||
}
|
||||
|
||||
if(!type.requiresWater && !contactsShallows(tile.x, tile.y, type)){
|
||||
if(!type.requiresWater && !contactsShallows(tile.x, tile.y, type) && !type.placeableLiquid){
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -131,7 +131,7 @@ public class Build{
|
||||
other == null ||
|
||||
!other.block().alwaysReplace ||
|
||||
!other.floor().placeableOn ||
|
||||
(other.floor().isDeep() && !type.floating && !type.requiresWater) ||
|
||||
(other.floor().isDeep() && !type.floating && !type.requiresWater && !type.placeableLiquid) ||
|
||||
(type.requiresWater && tile.floor().liquidDrop != Liquids.water)
|
||||
){
|
||||
return false;
|
||||
@@ -141,8 +141,8 @@ public class Build{
|
||||
return true;
|
||||
}else{
|
||||
return tile.interactable(team)
|
||||
&& (contactsShallows(tile.x, tile.y, type) || type.requiresWater)
|
||||
&& (!tile.floor().isDeep() || type.floating || type.requiresWater)
|
||||
&& (contactsShallows(tile.x, tile.y, type) || type.requiresWater || type.placeableLiquid)
|
||||
&& (!tile.floor().isDeep() || type.floating || type.requiresWater || type.placeableLiquid)
|
||||
&& tile.floor().placeableOn
|
||||
&& (!type.requiresWater || tile.floor().liquidDrop == Liquids.water)
|
||||
&& (((type.canReplace(tile.block()) || (tile.block instanceof BuildBlock && tile.<BuildEntity>bc().cblock == type))
|
||||
|
||||
Reference in New Issue
Block a user