Skip to content

Commit

Permalink
Second minor reversion to previous code
Browse files Browse the repository at this point in the history
  • Loading branch information
voidsong-dragonfly committed Jun 27, 2024
1 parent 4ab9744 commit c081107
Showing 1 changed file with 6 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -273,9 +273,12 @@ record OutputData(double amount, Path path, EnergyConnector output)
currentPoint = c.getOtherEnd(currentPoint);
// We use exponential loss here so there is still some power at arbitrarily far distances
availableRecent*=(1-getBasicLoss(c));
IImmersiveConnectable iic = localNet.getConnector(currentPoint);
if(!currentPoint.equals(path.end) && iic instanceof EnergyConnector connector)
connector.onEnergyPassedThrough(availableRecent);
if(!currentPoint.equals(path.end))
{
IImmersiveConnectable iic = localNet.getConnector(currentPoint);
if(iic instanceof EnergyConnector)
((EnergyConnector)iic).onEnergyPassedThrough(availableRecent);
}
transferredNextTick.addTo(c, availableRecent);
}
entry.output.insertEnergy(ceilIfClose(atSource*availableFactor));
Expand Down

0 comments on commit c081107

Please sign in to comment.