Fixed beam-to-node connections
This commit is contained in:
@@ -61,7 +61,7 @@ public class BeamNode extends PowerBlock{
|
||||
int offset = size/2;
|
||||
for(int j = 1 + offset; j <= range + offset; j++){
|
||||
var other = world.build(x + j * dir.x, y + j * dir.y);
|
||||
if(other != null && other.block.hasPower && other.team == Vars.player.team()){
|
||||
if(other != null && other.block.hasPower && other.team == Vars.player.team() && !(other.block instanceof PowerNode)){
|
||||
maxLen = j;
|
||||
dest = other;
|
||||
break;
|
||||
@@ -145,7 +145,8 @@ public class BeamNode extends PowerBlock{
|
||||
//find first block with power in range
|
||||
for(int j = 1 + offset; j <= range + offset; j++){
|
||||
var other = world.build(tile.x + j * dir.x, tile.y + j * dir.y);
|
||||
if(other != null && other.block.hasPower && other.team == team){
|
||||
//power nodes do NOT play nice with beam nodes, do not touch them as that forcefully modifies their links
|
||||
if(other != null && other.block.hasPower && other.team == team && !(other.block instanceof PowerNode)){
|
||||
links[i] = other;
|
||||
dests[i] = world.tile(tile.x + j * dir.x, tile.y + j * dir.y);
|
||||
break;
|
||||
|
||||
@@ -10,7 +10,7 @@ import mindustry.graphics.*;
|
||||
|
||||
public class LongPowerNode extends PowerNode{
|
||||
public @Load("@-glow") TextureRegion glow;
|
||||
public Color glowColor = Color.valueOf("cbfd81").a(0.6f);
|
||||
public Color glowColor = Color.valueOf("cbfd81").a(0.45f);
|
||||
public float glowScl = 16f, glowMag = 0.6f;
|
||||
|
||||
public LongPowerNode(String name){
|
||||
|
||||
Reference in New Issue
Block a user