mirror of
https://github.com/Anuken/Mindustry.git
synced 2025-12-06 02:40:23 -08:00
Added allowRectanglePlacement for 1x1 blocks
This commit is contained in:
parent
066fa04ded
commit
bd4ae0639d
7 changed files with 40 additions and 6 deletions
|
|
@ -1973,11 +1973,13 @@ public abstract class InputHandler implements InputProcessor, GestureListener{
|
|||
var end = world.build(endX, endY);
|
||||
if(diagonal && (block == null || block.allowDiagonal)){
|
||||
if(block != null && start instanceof ChainedBuilding && end instanceof ChainedBuilding
|
||||
&& block.canReplace(end.block) && block.canReplace(start.block)){
|
||||
&& block.canReplace(end.block) && block.canReplace(start.block)){
|
||||
points = Placement.upgradeLine(startX, startY, endX, endY);
|
||||
}else{
|
||||
points = Placement.pathfindLine(block != null && block.conveyorPlacement, startX, startY, endX, endY);
|
||||
}
|
||||
}else if(block != null && block.size == 1 && block.allowRectanglePlacement){
|
||||
points = Placement.normalizeRectangle(startX, startY, endX, endY, block.size);
|
||||
}else{
|
||||
points = Placement.normalizeLine(startX, startY, endX, endY);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue