Added shipCoreCooldownDone event
This fix the issue with controller showing all datas after a jump
This commit is contained in:
parent
2d7a04c491
commit
a17b40d9aa
2 changed files with 8 additions and 1 deletions
|
@ -774,6 +774,10 @@ public class TileEntityShipController extends TileEntityAbstractInterfaced {
|
|||
return new Object[] { targetJumpgateName };
|
||||
}
|
||||
|
||||
protected void cooldownDone() {
|
||||
sendEvent("shipCoreCooldownDone", null);
|
||||
}
|
||||
|
||||
// ComputerCraft IPeripheral methods implementation
|
||||
@Override
|
||||
@Optional.Method(modid = "ComputerCraft")
|
||||
|
|
|
@ -113,6 +113,9 @@ public class TileEntityShipCore extends TileEntityAbstractEnergy {
|
|||
if (cooldownTime > 0) {
|
||||
cooldownTime--;
|
||||
warmupTime = 0;
|
||||
if (cooldownTime == 0) {
|
||||
controller.cooldownDone();
|
||||
}
|
||||
}
|
||||
|
||||
// Update state
|
||||
|
@ -322,7 +325,7 @@ public class TileEntityShipCore extends TileEntityAbstractEnergy {
|
|||
}
|
||||
|
||||
doJump();
|
||||
cooldownTime = WarpDriveConfig.SHIP_COOLDOWN_INTERVAL_SECONDS * 20;
|
||||
cooldownTime = Math.max(1, WarpDriveConfig.SHIP_COOLDOWN_INTERVAL_SECONDS * 20);
|
||||
controller.setJumpFlag(false);
|
||||
} else {
|
||||
warmupTime = 0;
|
||||
|
|
Loading…
Reference in a new issue