Power pickup bugfixes
This commit is contained in:
@@ -1293,16 +1293,19 @@ abstract class BuildingComp implements Posc, Teamc, Healthc, Buildingc, Timerc,
|
||||
return true;
|
||||
}
|
||||
|
||||
/** Called right before this building is picked up. */
|
||||
public void pickedUp(){
|
||||
|
||||
|
||||
}
|
||||
|
||||
/** Called right after this building is picked up. */
|
||||
public void afterPickedUp(){
|
||||
if(power != null){
|
||||
if(power.graph != null){
|
||||
power.graph.removeList(self());
|
||||
power.graph = new PowerGraph();
|
||||
}
|
||||
power.graph = new PowerGraph();
|
||||
power.links.clear();
|
||||
power.status = 0f;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public void removeFromProximity(){
|
||||
|
||||
@@ -93,6 +93,7 @@ abstract class PayloadComp implements Posc, Rotc, Hitboxc, Unitc{
|
||||
void pickup(Building tile){
|
||||
tile.pickedUp();
|
||||
tile.tile.remove();
|
||||
tile.afterPickedUp();
|
||||
addPayload(new BuildPayload(tile));
|
||||
Fx.unitPickup.at(tile);
|
||||
Events.fire(new PickupEvent(self(), tile));
|
||||
|
||||
Reference in New Issue
Block a user