public void CompleteReview () { Instance Inst = StateFundingGlobal.fetch.GameInstance; Review Rev = Inst.ActiveReview; Rev.touch (); // Closed for business Rev.pastReview = true; // Move review to past review Inst.addReview (Rev); // Start a new review Inst.ActiveReview = new Review (); // Apply PO/SC decay on instance ApplyDecay (); // Apply funds from Review Debug.Log("Adding Funds: " + Rev.funds); Funding.Instance.AddFunds (Rev.funds, TransactionReasons.None); // Notify player that a review is available ReviewToastView Toast = new ReviewToastView (Rev); // Save the instance and game StateFundingGlobal.fetch.InstanceConf.saveInstance (Inst); GamePersistence.SaveGame ("persistent", HighLogic.SaveFolder, SaveMode.OVERWRITE); Debug.Log ("Generated Review"); }
public void CompleteReview() { Instance Inst = StateFundingGlobal.fetch.GameInstance; Review Rev = Inst.ActiveReview; Rev.touch(); // Closed for business Rev.pastReview = true; // Move review to past review Inst.addReview(Rev); // Start a new review Inst.ActiveReview = new Review(); // Apply PO/SC decay on instance ApplyDecay(); // Apply funds from Review Debug.Log("Adding Funds: " + Rev.funds); Funding.Instance.AddFunds(Rev.funds, TransactionReasons.None); // Notify player that a review is available ReviewToastView Toast = new ReviewToastView(Rev); // Save the instance and game StateFundingGlobal.fetch.InstanceConf.saveInstance(Inst); GamePersistence.SaveGame("persistent", HighLogic.SaveFolder, SaveMode.OVERWRITE); Debug.Log("Generated Review"); }
public void CompleteReview() { InstanceData Inst = StateFundingGlobal.fetch.GameInstance; Review Rev = Inst.ActiveReview; Rev.touch (); // Closed for business Rev.pastReview = true; // Move review to past review Inst.addReview (Rev); // Start a new review Inst.ActiveReview = new Review (); // Apply PO/SC decay on instance ApplyDecay (); // Apply funds from Review Debug.Log("Adding Funds: " + Rev.funds); Funding.Instance.AddFunds (Rev.funds, TransactionReasons.None); // Notify player that a review is available ReviewToastView Toast = new ReviewToastView (Rev); Debug.Log ("Generated Review"); }
public void CompleteReview() { InstanceData Inst = StateFundingGlobal.fetch.GameInstance; if (Inst == null) { Log.Error("ReviewManager.CompleteReview, Inst is null"); return; } Review Rev = Inst.ActiveReview; Rev.touch(); // Closed for business Rev.closeReview(); // Move review to past review Inst.addReview(Rev); // Start a new review Inst.ActiveReview = new Review(); // Apply funds from Review Log.Info("Adding Funds: " + Rev.funds); Funding.Instance.AddFunds(Rev.funds, TransactionReasons.None); // Notify player that a review is available ReviewToastView Toast = new ReviewToastView(Rev); Log.Info("Generated Review"); }