예제 #1
0
        public static void PrintYearStatsSummary()
        {
            string text = "";

            Data.YearData lastYear = Data.DataContainer.GetLastYearData();

            text += "Insight" + Environment.NewLine;
            text += "<color=yellow>------------</color>" + Environment.NewLine;

            text += Data.Extrapolater.GetInsightForYear(Data.DataContainer.GetLastYearData());

            text += "<color=yellow>------------</color>" + Environment.NewLine;

            text += "Stats Summary" + Environment.NewLine;
            text += "<color=yellow>------------</color>" + Environment.NewLine;



            text += Data.Extrapolater.exp_FoodInsufficiency(lastYear);

            text += Data.Extrapolater.exp_FoodProductionCurrent();

            text += Data.Extrapolater.exp_FoodProductionMax();

            text += "<color=yellow>------------</color>";

            DebugExt.Log(text);
        }
예제 #2
0
파일: Mod.cs 프로젝트: DaDevFox/KCMods
        public static void PrintYearStatsSummary()
        {
            string text = "";

            text += "Insight" + Environment.NewLine;
            text += "<color=yellow>-------</color>" + Environment.NewLine;

            text += Data.Extrapolater.GetInsightForYear(Data.DataContainer.GetLastYearData());

            text += "<color=yellow>-------</color>" + Environment.NewLine;

            text += "Stats Summary" + Environment.NewLine;
            text += "<color=yellow>------------</color>" + Environment.NewLine;

            text += "Food insufficiency last year: " +
                    Data.Analyzer.GetRequiredFoodForYear(Data.DataContainer.GetLastYearData()).ToString() +
                    Environment.NewLine;

            text += "Estimated Food insufficiency for " +
                    Data.Analytics.GetPlayerKingdomPopulation().ToString() +
                    " people: " +
                    Data.Analyzer.GetEstimatedFoodInsufficiencyForPeople(Data.Analytics.GetPlayerKingdomPopulation(), Data.DataContainer.GetAllYearData()).ToString() +
                    Environment.NewLine;

            text += "Estimated Food insufficiency for " +
                    Data.Analytics.GetHousingForKingdom().ToString() +
                    " people: " +
                    Data.Analyzer.GetEstimatedFoodInsufficiencyForPeople(Data.Analytics.GetHousingForKingdom(), Data.DataContainer.GetAllYearData()).ToString() +
                    Environment.NewLine;

            text += "<color=yellow>------------</color>";

            DebugExt.Log(text);
        }
예제 #3
0
파일: DebugExt.cs 프로젝트: DaDevFox/KCMods
 public static void HandleException(Exception ex)
 {
     if (Debug)
     {
         DebugExt.Log(ex.Message + "\n" + ex.StackTrace);
     }
     else
     {
         helper.Log(ex.Message + "\n" + ex.StackTrace);
     }
 }
예제 #4
0
 static void Postfix()
 {
     try
     {
         Data.DataContainer.OnYearEnd();
         Mod.OnYearEnd();
     }
     catch (Exception ex)
     {
         DebugExt.HandleException(ex);
     }
 }
예제 #5
0
 void Update()
 {
     if (Settings.debug)
     {
         if (Input.GetKeyDown(Settings.keycode_yearSummary))
         {
             try
             {
                 PrintYearStatsSummary();
             }
             catch (Exception ex)
             {
                 DebugExt.HandleException(ex);
             }
         }
     }
 }