Allow all floors to replace each other

This commit is contained in:
Anuken
2024-01-22 16:14:14 -05:00
parent e9d95c2c2e
commit 59ea35c443
2 changed files with 4 additions and 4 deletions

View File

@@ -195,7 +195,7 @@ public class Build{
return false;
}
if(!type.requiresWater && !contactsShallows(tile.x, tile.y, type) && !type.placeableLiquid){
if(!type.requiresWater && !type.isFloor() && !contactsShallows(tile.x, tile.y, type) && !type.placeableLiquid){
return false;
}
@@ -223,7 +223,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 || //solid wall
(!check.floor().placeableOn && !type.isFloor()) || //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