Removed boolean usage
This commit is contained in:
@@ -19,6 +19,8 @@ import io.anuke.mindustry.world.meta.*;
|
|||||||
import static io.anuke.mindustry.Vars.*;
|
import static io.anuke.mindustry.Vars.*;
|
||||||
|
|
||||||
public class PowerNode extends PowerBlock{
|
public class PowerNode extends PowerBlock{
|
||||||
|
protected static boolean returnValue = false;
|
||||||
|
|
||||||
protected ObjectSet<PowerGraph> graphs = new ObjectSet<>();
|
protected ObjectSet<PowerGraph> graphs = new ObjectSet<>();
|
||||||
protected Vector2 t1 = new Vector2(), t2 = new Vector2();
|
protected Vector2 t1 = new Vector2(), t2 = new Vector2();
|
||||||
protected TextureRegion laser, laserEnd;
|
protected TextureRegion laser, laserEnd;
|
||||||
@@ -339,11 +341,9 @@ public class PowerNode extends PowerBlock{
|
|||||||
}
|
}
|
||||||
|
|
||||||
public static boolean insulated(int x, int y, int x2, int y2){
|
public static boolean insulated(int x, int y, int x2, int y2){
|
||||||
final Boolean[] bool = {false};
|
returnValue = false;
|
||||||
insulators(x, y, x2, y2, cause -> {
|
insulators(x, y, x2, y2, cause -> returnValue = true);
|
||||||
bool[0] = true;
|
return returnValue;
|
||||||
});
|
|
||||||
return bool[0];
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void insulators(int x, int y, int x2, int y2, Cons<Tile> iterator){
|
public static void insulators(int x, int y, int x2, int y2, Cons<Tile> iterator){
|
||||||
|
|||||||
Reference in New Issue
Block a user