Ejemplo n.º 1
0
        private void OnContractParameterChange(Contracts.Contract contract, Contracts.ContractParameter contractParam)
        {
            switch (contractParam.State)
            {
            case Contracts.ParameterState.Complete:
                contractFundsEarned      += (float)contractParam.FundsCompletion;
                contractReputationEarned += contractParam.ReputationCompletion;
                contractScienceEarned    += contractParam.ScienceCompletion;
                break;

            case Contracts.ParameterState.Failed:
                contractFundsEarned      += (float)contractParam.FundsFailure;
                contractReputationEarned += contractParam.ReputationFailure;
                break;
            }
        }
Ejemplo n.º 2
0
 public KOSContractParameter(Contracts.ContractParameter parameter)
 {
     m_parameter = parameter;
     RegisterInitializer(InitializeSuffixes);
 }
Ejemplo n.º 3
0
 /// <summary>
 /// Create a contract parameter object from a KSP contract parameter.
 /// </summary>
 public ContractParameter(Contracts.ContractParameter parameter)
 {
     InternalParameter = parameter;
 }