public void Resolve(Result.First r) { if (r == Result.First.UNKNOWN) { return; } result = r; if (r != Result.First.FIRST) { return; } if (Funding.Instance == null) { Logging.Log("No Funding.Instance! Are we not in a career?"); return; } Funding.Instance.AddFunds(rewardFunds, TransactionReasons.ContractReward); string msg = String.Format("Awarded {0} funds for being first to complete {1}", rewardFunds, name); Logging.Log(msg); MessageSystem.Instance.AddMessage(new MessageSystem.Message( "Race Into Space", msg, MessageSystemButton.MessageButtonColor.GREEN, MessageSystemButton.ButtonIcons.ACHIEVE)); }
public void Load(ConfigNode node) { if (node == null) { Reset(); return; } if (node.HasValue("year") && node.HasValue("day")) { completed = new YDate(node); } if (node.HasValue("reported")) { reported = bool.Parse(node.GetValue("reported")); } if (node.HasValue("result")) { result = (Result.First) int.Parse(node.GetValue("result")); } }
private void Reset() { completed = null; reported = false; result = Result.First.UNKNOWN; }