Fix some minor logic derps in the energy pulser. Much better behaviour now.

This commit is contained in:
Christian 2013-03-28 07:45:13 -04:00
parent a4e7e74d5e
commit eb8d6cace2

View file

@ -18,21 +18,14 @@ public class EnergyPulser {
} }
public void update() { public void update() {
if (powerReceptor == null) if (powerReceptor == null || !isActive || tick++ % 10 != 0)
return; return;
if (isActive) if (!singlePulse || !hasPulsed)
{ {
tick++; System.out.printf("Pulsing%d\n",Math.min(1 << (pulseCount-1),64));
if (!singlePulse || !hasPulsed) { powerReceptor.getPowerProvider().receiveEnergy(Math.min(1 << (pulseCount-1),64), ForgeDirection.WEST);
if (tick % 10 == 0 || !hasPulsed) hasPulsed = true;
{
powerReceptor.getPowerProvider().receiveEnergy(Math.min(1 << (pulseCount-1),64), ForgeDirection.WEST);
if (singlePulse) {
hasPulsed = true;
}
}
}
} }
} }