AI tweaks / Control tweaks / Plastanium conveyor tweaks / Unit factories

This commit is contained in:
Anuken
2020-04-30 14:46:22 -04:00
parent 5887169f90
commit 2dbb099d79
22 changed files with 4261 additions and 4003 deletions
+14 -9
View File
@@ -106,9 +106,13 @@ public class Build{
for(int dx = 0; dx < type.size; dx++){
for(int dy = 0; dy < type.size; dy++){
Tile other = world.tile(x + dx + offsetx, y + dy + offsety);
if(other == null || (other.block() != Blocks.air && !other.block().alwaysReplace) ||
!other.floor().placeableOn ||
(other.floor().isDeep() && !type.floating)){
if(
other == null ||
(other.block() != Blocks.air && !other.block().alwaysReplace) ||
!other.floor().placeableOn ||
(other.floor().isDeep() && !type.floating && !type.requiresWater) ||
(type.requiresWater && tile.floor().liquidDrop != Liquids.water)
){
return false;
}
}
@@ -116,12 +120,13 @@ public class Build{
return true;
}else{
return tile.interactable(team)
&& contactsGround(tile.x, tile.y, type)
&& (!tile.floor().isDeep() || type.floating)
&& tile.floor().placeableOn
&& (((type.canReplace(tile.block()) || (tile.block instanceof BuildBlock && tile.<BuildEntity>ent().cblock == type))
&& !(type == tile.block() && rotation == tile.rotation() && type.rotate)) || tile.block().alwaysReplace || tile.block() == Blocks.air)
&& tile.block().isMultiblock() == type.isMultiblock() && type.canPlaceOn(tile);
&& contactsGround(tile.x, tile.y, type)
&& (!tile.floor().isDeep() || type.floating || type.requiresWater)
&& tile.floor().placeableOn
&& (!type.requiresWater || tile.floor().liquidDrop == Liquids.water)
&& (((type.canReplace(tile.block()) || (tile.block instanceof BuildBlock && tile.<BuildEntity>ent().cblock == type))
&& !(type == tile.block() && rotation == tile.rotation() && type.rotate)) || tile.block().alwaysReplace || tile.block() == Blocks.air)
&& tile.block().isMultiblock() == type.isMultiblock() && type.canPlaceOn(tile);
}
}