Ejemplo n.º 1
0
 public override bool DoAction(double timeOfAction, HallOfFameEntry entry, String data = "")
 {
    ProtoCrewMember kerbal = entry.GetKerbal();
    try
    {
       if (entry.TimeOfLastEva >= 0)
       {
          if (Log.IsLogable(Log.LEVEL.DETAIL)) Log.Detail("end of EVA for kerbal " + kerbal.name + ": " + entry.TotalEvaTime + " eva time");
          if (entry.TotalEvaTime >= 0)
          {
             entry.LastEvaDuration = timeOfAction - entry.TimeOfLastEva;
             entry.TotalEvaTime += entry.LastEvaDuration;
             // specific EVA actions
             if(entry.evaAction!=null)
             {
                entry.evaAction.OnBoardingVessel(timeOfAction, entry);
             }
             else
             {
                if (Log.IsLogable(Log.LEVEL.DETAIL)) Log.Detail("boarding vessel ingored: no EVA action defined for " + kerbal.name + " at " + timeOfAction);
             }
          }
          return true;
       }
       else
       {
          Log.Warning("return from EVA ignored for "+kerbal.name+" at "+timeOfAction);
          return false;
       }
    }
    finally
    {
       if (Log.IsLogable(Log.LEVEL.DETAIL)) Log.Detail("EVA for kerbal " + kerbal.name + " has ended");
       entry.IsOnEva = false;
       entry.evaAction = null;
    }
 }
Ejemplo n.º 2
0
 public override bool DoAction(double timeOfService, HallOfFameEntry entry, String data = "")
 {
    try
    {
      entry.Research += Double.Parse(data);
      return true;
    }
    catch
    {
       Log.Error("invalid data for science in entry for kerbal "+entry.GetName()+": "+data);
       return false;
    }
 }
Ejemplo n.º 3
0
 public override void OnBoardingVessel(double timeOfAction, HallOfFameEntry entry)
 {
    if (entry.TimeOfLastEva <= 0) return;
    entry.TotalTimeInEvaWithoutOxygen += timeOfAction - entry.TimeOfLastEva;
 }
Ejemplo n.º 4
0
 public override bool DoAction(double timeOfAction, HallOfFameEntry entry, String data = "")
 {
    entry.ContractsCompleted++;
    return true;
 }
Ejemplo n.º 5
0
 public abstract void OnBoardingVessel(double timeOfAction, HallOfFameEntry entry);
Ejemplo n.º 6
0
 public override bool DoAction(double timeOfAction, HallOfFameEntry entry, String data = "")
 {
    entry.TimeOfLastEva = timeOfAction;
    return true;
 }
Ejemplo n.º 7
0
         public override bool DoAction(double timeOfAction, HallOfFameEntry entry, String data = "")
         {
            ProtoCrewMember kerbal = entry.GetKerbal();
            try
            {
               // no ongoing mission mission, no mission at all
               if (entry.TimeOfLastLaunch >= 0)
               {
                  entry.MissionsFlown++;
                  if (Log.IsLogable(Log.LEVEL.DETAIL)) Log.Detail("mission recover recorded for kerbal " + kerbal.name + ": " + entry.MissionsFlown + " missions flown");

                  entry.TotalMissionTime += (timeOfAction - entry.TimeOfLastLaunch);
                  return true;
               }
               else
               {
                  Log.Warning("recover of kerbal " + kerbal.name + " without ongoing mission");
                  return false;
               }
            }
            finally
            {
               if (Log.IsLogable(Log.LEVEL.DETAIL)) Log.Detail("kerbal " + kerbal.name + " no longer on mission");
               entry.TimeOfLastLaunch = -1;
               entry.IsOnEva = false;
            }
         }
Ejemplo n.º 8
0
 public abstract bool DoAction(double timeOfAction, HallOfFameEntry entry, String data = "");
Ejemplo n.º 9
0
 public void SetEntry(HallOfFameEntry entry)
 {
    this.entry = entry;
    if (entry != null)
    {
       this.vessel = entry.GetKerbal().GetVessel();
    }
    else
    {
       this.vessel = null;
    }
 }
Ejemplo n.º 10
0
 public override bool DoAction(double timeOfAction, HallOfFameEntry entry, String data = "")
 {
    entry.Dockings++;
    return true;
 }
Ejemplo n.º 11
0
 public override bool DoAction(double timeOfAction, HallOfFameEntry entry, String data = "")
 {
     entry.ContractsCompleted++;
     return(true);
 }
Ejemplo n.º 12
0
 public override bool DoAction(double timeOfAction, HallOfFameEntry entry, String data = "")
 {
     entry.TimeOfLastEva = timeOfAction;
     return(true);
 }
Ejemplo n.º 13
0
 public abstract void OnBoardingVessel(double timeOfAction, HallOfFameEntry entry);
Ejemplo n.º 14
0
 public abstract bool DoAction(double timeOfAction, HallOfFameEntry entry, String data = "");
Ejemplo n.º 15
0
 public override bool DoAction(double timeOfAction, HallOfFameEntry entry, String data = "")
 {
     entry.Dockings++;
     return(true);
 }