Fixed #4830
This commit is contained in:
@@ -256,6 +256,10 @@ public class Block extends UnlockableContent{
|
|||||||
|
|
||||||
/** Drawn when you are placing a block. */
|
/** Drawn when you are placing a block. */
|
||||||
public void drawPlace(int x, int y, int rotation, boolean valid){
|
public void drawPlace(int x, int y, int rotation, boolean valid){
|
||||||
|
drawPotentialLinks(x, y);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void drawPotentialLinks(int x, int y){
|
||||||
if((consumesPower || outputsPower) && hasPower){
|
if((consumesPower || outputsPower) && hasPower){
|
||||||
Tile tile = world.tile(x, y);
|
Tile tile = world.tile(x, y);
|
||||||
if(tile != null){
|
if(tile != null){
|
||||||
|
|||||||
@@ -41,6 +41,8 @@ public class BaseTurret extends Block{
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void drawPlace(int x, int y, int rotation, boolean valid){
|
public void drawPlace(int x, int y, int rotation, boolean valid){
|
||||||
|
super.drawPlace(x, y, rotation, valid);
|
||||||
|
|
||||||
Drawf.dashCircle(x * tilesize + offset, y * tilesize + offset, range, Pal.placing);
|
Drawf.dashCircle(x * tilesize + offset, y * tilesize + offset, range, Pal.placing);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -90,6 +90,8 @@ public class ItemBridge extends Block{
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void drawPlace(int x, int y, int rotation, boolean valid){
|
public void drawPlace(int x, int y, int rotation, boolean valid){
|
||||||
|
super.drawPlace(x, y, rotation, valid);
|
||||||
|
|
||||||
Tile link = findLink(x, y);
|
Tile link = findLink(x, y);
|
||||||
|
|
||||||
Lines.stroke(2f, Pal.placing);
|
Lines.stroke(2f, Pal.placing);
|
||||||
|
|||||||
@@ -57,6 +57,8 @@ public class MassDriver extends Block{
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void drawPlace(int x, int y, int rotation, boolean valid){
|
public void drawPlace(int x, int y, int rotation, boolean valid){
|
||||||
|
super.drawPlace(x, y, rotation, valid);
|
||||||
|
|
||||||
Drawf.dashCircle(x * tilesize, y * tilesize, range, Pal.accent);
|
Drawf.dashCircle(x * tilesize, y * tilesize, range, Pal.accent);
|
||||||
|
|
||||||
//check if a mass driver is selected while placing this driver
|
//check if a mass driver is selected while placing this driver
|
||||||
|
|||||||
@@ -263,7 +263,8 @@ public class PowerNode extends PowerBlock{
|
|||||||
//add conducting graphs to prevent double link
|
//add conducting graphs to prevent double link
|
||||||
for(var p : Edges.getEdges(block.size)){
|
for(var p : Edges.getEdges(block.size)){
|
||||||
Tile other = tile.nearby(p);
|
Tile other = tile.nearby(p);
|
||||||
if(other != null && other.team() == team && other.build != null && other.build.power != null){
|
if(other != null && other.team() == team && other.build != null && other.build.power != null
|
||||||
|
&& !(block.consumesPower && other.block().consumesPower && !block.outputsPower && !other.block().outputsPower)){
|
||||||
graphs.add(other.build.power.graph);
|
graphs.add(other.build.power.graph);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -27,6 +27,8 @@ public class ThermalGenerator extends PowerGenerator{
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void drawPlace(int x, int y, int rotation, boolean valid){
|
public void drawPlace(int x, int y, int rotation, boolean valid){
|
||||||
|
super.drawPlace(x, y, rotation, valid);
|
||||||
|
|
||||||
drawPlaceText(Core.bundle.formatFloat("bar.efficiency", sumAttribute(attribute, x, y) * 100, 1), x, y, valid);
|
drawPlaceText(Core.bundle.formatFloat("bar.efficiency", sumAttribute(attribute, x, y) * 100, 1), x, y, valid);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -47,6 +47,8 @@ public class Cultivator extends GenericCrafter{
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void drawPlace(int x, int y, int rotation, boolean valid){
|
public void drawPlace(int x, int y, int rotation, boolean valid){
|
||||||
|
super.drawPlace(x, y, rotation, valid);
|
||||||
|
|
||||||
drawPlaceText(Core.bundle.formatFloat("bar.efficiency", (1 + sumAttribute(attribute, x, y)) * 100, 1), x, y, valid);
|
drawPlaceText(Core.bundle.formatFloat("bar.efficiency", (1 + sumAttribute(attribute, x, y)) * 100, 1), x, y, valid);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -113,6 +113,8 @@ public class Drill extends Block{
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void drawPlace(int x, int y, int rotation, boolean valid){
|
public void drawPlace(int x, int y, int rotation, boolean valid){
|
||||||
|
super.drawPlace(x, y, rotation, valid);
|
||||||
|
|
||||||
Tile tile = world.tile(x, y);
|
Tile tile = world.tile(x, y);
|
||||||
if(tile == null) return;
|
if(tile == null) return;
|
||||||
|
|
||||||
|
|||||||
@@ -31,6 +31,8 @@ public class Pump extends LiquidBlock{
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void drawPlace(int x, int y, int rotation, boolean valid){
|
public void drawPlace(int x, int y, int rotation, boolean valid){
|
||||||
|
super.drawPlace(x, y, rotation, valid);
|
||||||
|
|
||||||
Tile tile = world.tile(x, y);
|
Tile tile = world.tile(x, y);
|
||||||
if(tile == null) return;
|
if(tile == null) return;
|
||||||
|
|
||||||
|
|||||||
@@ -35,6 +35,8 @@ public class SolidPump extends Pump{
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void drawPlace(int x, int y, int rotation, boolean valid){
|
public void drawPlace(int x, int y, int rotation, boolean valid){
|
||||||
|
drawPotentialLinks(x, y);
|
||||||
|
|
||||||
if(attribute != null){
|
if(attribute != null){
|
||||||
drawPlaceText(Core.bundle.formatFloat("bar.efficiency", Math.max(sumAttribute(attribute, x, y) / size / size + baseEfficiency, 0f) * 100 * percentSolid(x, y), 1), x, y, valid);
|
drawPlaceText(Core.bundle.formatFloat("bar.efficiency", Math.max(sumAttribute(attribute, x, y) / size / size + baseEfficiency, 0f) * 100 * percentSolid(x, y), 1), x, y, valid);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -56,6 +56,8 @@ public class RepairPoint extends Block{
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void drawPlace(int x, int y, int rotation, boolean valid){
|
public void drawPlace(int x, int y, int rotation, boolean valid){
|
||||||
|
super.drawPlace(x, y, rotation, valid);
|
||||||
|
|
||||||
Drawf.dashCircle(x * tilesize + offset, y * tilesize + offset, repairRadius, Pal.accent);
|
Drawf.dashCircle(x * tilesize + offset, y * tilesize + offset, repairRadius, Pal.accent);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,3 +1,3 @@
|
|||||||
org.gradle.daemon=true
|
org.gradle.daemon=true
|
||||||
org.gradle.jvmargs=-Xms256m -Xmx1024m
|
org.gradle.jvmargs=-Xms256m -Xmx1024m
|
||||||
archash=9f916a1b401216c68e39635f6c99769391c8555a
|
archash=768529cbe1cd450df16f08431e71d6280ddc5f0e
|
||||||
|
|||||||
Reference in New Issue
Block a user