Misc map creation utilities

This commit is contained in:
Anuken
2022-01-21 16:32:35 -05:00
parent 025dac226c
commit cfb01063c0
13 changed files with 105 additions and 36 deletions

View File

@@ -73,7 +73,7 @@ public class UnitAssembler extends PayloadBlock{
@Override
public boolean canPlaceOn(Tile tile, Team team, int rotation){
//overlapping construction areas not allowed.
//overlapping construction areas not allowed; grow by a tiny amount so edges can't overlap either.
Rect rect = getRect(Tmp.r1, tile.worldx() + offset, tile.worldy() + offset, rotation).grow(0.1f);
return !indexer.getFlagged(team, BlockFlag.unitAssembler).contains(b -> getRect(Tmp.r2, b.x, b.y, b.rotation).overlaps(rect));
}