mirror of
https://github.com/Anuken/Mindustry.git
synced 2025-01-11 07:39:39 +07:00
⚡️ Toggle (all) powernode connections by doubleclicking (#907)
* Toggle (all) powernode connections by doubleclicking * Mimic return false of the above if
This commit is contained in:
parent
8a1ea7fd19
commit
d969741f90
@ -167,6 +167,18 @@ public class PowerNode extends PowerBlock{
|
||||
tile.configure(other.pos());
|
||||
return false;
|
||||
}
|
||||
|
||||
if(tile == other){
|
||||
if (other.entity.power.links.size == 0){
|
||||
getPotentialLinks(tile, link -> tile.configure(link.pos()));
|
||||
} else {
|
||||
while (entity.power.links.size > 0){
|
||||
tile.configure(entity.power.links.get(0));
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user