mirror of
https://github.com/Anuken/Mindustry.git
synced 2025-07-31 23:19:43 +07:00
conductsTo() returning whether to conduct itself to adjacent builds (#4354)
* conductsTo * insulated block no longer conducts * moved both checks to be symmetrical
This commit is contained in:
@ -778,6 +778,10 @@ abstract class BuildingComp implements Posc, Teamc, Healthc, Buildingc, Timerc,
|
||||
}
|
||||
power.links.clear();
|
||||
}
|
||||
|
||||
public boolean conductsTo(Building other){
|
||||
return !block.insulated;
|
||||
}
|
||||
|
||||
public Seq<Building> getPowerConnections(Seq<Building> out){
|
||||
out.clear();
|
||||
@ -786,7 +790,7 @@ abstract class BuildingComp implements Posc, Teamc, Healthc, Buildingc, Timerc,
|
||||
for(Building other : proximity){
|
||||
if(other != null && other.power != null
|
||||
&& !(block.consumesPower && other.block.consumesPower && !block.outputsPower && !other.block.outputsPower)
|
||||
&& !power.links.contains(other.pos())){
|
||||
&& conductsTo(other) && other.conductsTo(self()) && !power.links.contains(other.pos())){
|
||||
out.add(other);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user