This commit is contained in:
Anuken
2022-08-04 20:20:46 -04:00
parent 62d0d62d22
commit 11d3b1d973
3 changed files with 25 additions and 8 deletions

View File

@@ -152,6 +152,13 @@ abstract class BuildingComp implements Posc, Teamc, Healthc, Buildingc, Timerc,
return self();
}
@Override
public void add(){
if(power != null){
power.graph.checkAdd();
}
}
@Override
@Replace
public int tileX(){

View File

@@ -38,7 +38,7 @@ abstract class PayloadComp implements Posc, Rotc, Hitboxc, Unitc{
//update power graph first, resolve everything
for(Payload pay : payloads){
if(pay instanceof BuildPayload pb && pb.build.power != null){
if(payloadPower == null) payloadPower = new PowerGraph();
if(payloadPower == null) payloadPower = new PowerGraph(false);
//pb.build.team = team;
pb.build.power.graph = null;