Exemplo n.º 1
0
 @Override
 public void fix() {
   super.fix();
   if (null != unit) {
     unit.repairSystem(CriticalSlot.TYPE_SYSTEM, Mech.SYSTEM_COCKPIT);
   }
 }
Exemplo n.º 2
0
 @Override
 public void fix() {
   super.fix();
   if (isBlownOff()) {
     blownOff = false;
     unit.getEntity().setLocationBlownOff(loc, false);
     for (int i = 0; i < unit.getEntity().getNumberOfCriticals(loc); i++) {
       CriticalSlot slot = unit.getEntity().getCritical(loc, i);
       // ignore empty & non-hittable slots
       if (slot == null) {
         continue;
       }
       slot.setMissing(false);
       Mounted m = slot.getMount();
       if (null != m) {
         m.setMissing(false);
       }
     }
   } else if (isBreached()) {
     breached = false;
     unit.getEntity().setLocationStatus(loc, ILocationExposureStatus.NORMAL, true);
     for (int i = 0; i < unit.getEntity().getNumberOfCriticals(loc); i++) {
       CriticalSlot slot = unit.getEntity().getCritical(loc, i);
       // ignore empty & non-hittable slots
       if (slot == null) {
         continue;
       }
       slot.setBreached(false);
       Mounted m = slot.getMount();
       if (null != m) {
         m.setBreached(false);
       }
     }
   } else {
     percent = 1.0;
     if (null != unit) {
       unit.getEntity().setInternal(unit.getEntity().getOInternal(loc), loc);
     }
   }
 }