Example #1
0
 public void CheckCompletion(RISMilestone stone)
 {
     ContractConfigurator.ContractType type = ContractConfigurator.ContractType.GetContractType(stone.ccName);
     if (type == null)
     {
         Logging.LogWarningFormat("Failed to get CC Type {0} for Milestone {1}", stone.ccName, stone.name);
         return;
     }
     if (type.ActualCompletions() > 0)
     {
         stone.completed = new YDate(Planetarium.GetUniversalTime());
     }
 }
Example #2
0
 protected YDate CheckCC(string ccName)
 {
     ContractConfigurator.ContractType type = ContractConfigurator.ContractType.GetContractType(ccName);
     if (type == null)
     {
         Logging.LogWarningFormat("Failed to get CC Type {0} for Milestone {1}", ccName, name);
         return(null);
     }
     if (type.ActualCompletions() > 0)
     {
         double UT = ContractConfigurator.ConfiguredContract.CompletedContracts.
                     Where(contract => contract.contractType == type && contract.ContractState == Contracts.Contract.State.Completed).
                     Min(contract => contract.DateFinished);
         return(new YDate(UT));
     }
     return(null);
 }