Implemented Anuken/Mindustry-Suggestions/issues/2809
This commit is contained in:
Binary file not shown.
|
Before Width: | Height: | Size: 2.2 KiB After Width: | Height: | Size: 2.2 KiB |
@@ -108,7 +108,13 @@ public class Placement{
|
||||
points.addAll(result);
|
||||
}
|
||||
|
||||
public static boolean isSidePlace(Seq<BuildPlan> plans){
|
||||
return plans.size > 1 && Mathf.mod(Tile.relativeTo(plans.first().x, plans.first().y, plans.get(1).x, plans.get(1).y) - plans.first().rotation, 2) == 1;
|
||||
}
|
||||
|
||||
public static void calculateBridges(Seq<BuildPlan> plans, ItemBridge bridge){
|
||||
if(isSidePlace(plans)) return;
|
||||
|
||||
//check for orthogonal placement + unlocked state
|
||||
if(!(plans.first().x == plans.peek().x || plans.first().y == plans.peek().y) || !bridge.unlockedNow()){
|
||||
return;
|
||||
@@ -170,6 +176,8 @@ public class Placement{
|
||||
}
|
||||
|
||||
public static void calculateDuctBridges(Seq<BuildPlan> plans, DuctBridge bridge){
|
||||
if(isSidePlace(plans)) return;
|
||||
|
||||
//check for orthogonal placement + unlocked state
|
||||
if(!(plans.first().x == plans.peek().x || plans.first().y == plans.peek().y) || !bridge.unlockedNow()){
|
||||
return;
|
||||
@@ -180,7 +188,6 @@ public class Placement{
|
||||
|
||||
var result = plans1.clear();
|
||||
var team = player.team();
|
||||
var rot = plans.first().rotation;
|
||||
|
||||
outer:
|
||||
for(int i = 0; i < plans.size;){
|
||||
|
||||
+1
-1
@@ -8,4 +8,4 @@ kapt.include.compile.classpath=false
|
||||
kotlin.stdlib.default.dependency=false
|
||||
#needed for android compilation
|
||||
android.useAndroidX=true
|
||||
archash=e226c78ba913d348c97430e453f038e824c06bcb
|
||||
archash=28f7dea17ba559a28e79111adc93cf0496ced031
|
||||
|
||||
Reference in New Issue
Block a user