コード例 #1
0
 public static void Postfix()
 {
     if (!WorldRendererUtility.WorldRenderedNow)
     {
         FertilityDrawer.FertilityDrawerOnGUI();
     }
 }
コード例 #2
0
 public static void FertilityDrawerOnGUI()
 {
     if (Event.current.type != EventType.Repaint || !FertilityDrawer.ShouldShow())
     {
         return;
     }
     FertilityDrawer.DrawFertilityAroundMouse();
 }
コード例 #3
0
 private static void DrawFertilityAroundMouse()
 {
     if (!PlaySettingsPatch.showFertilityOverlay)
     {
         return;
     }
     FertilityUtility.FillFertilityRelevantCells(UI.MouseCell(), Find.CurrentMap);
     for (int i = 0; i < FertilityUtility.fertilityRelevantCells.Count; i++)
     {
         IntVec3 intVec = FertilityUtility.fertilityRelevantCells[i];
         float   num    = FertilityUtility.CellFertility(intVec, Find.CurrentMap, FertilityDrawer.fertilityCountedThings);
         if (num != 0f)
         {
             Vector3 v = GenMapUI.LabelDrawPosFor(intVec);
             GenMapUI.DrawThingLabel(v, num.ToString("n1"), FertilityDrawer.FertilityColor(num, 1.4f));
         }
     }
     FertilityDrawer.fertilityCountedThings.Clear();
 }
コード例 #4
0
 private static void DrawFertilityAroundMouse()
 {
     if (!Find.PlaySettings.showFertilityOverlay)
     {
         return;
     }
     // Prevent overlap with beauty display
     if (Find.PlaySettings.showBeauty)
     {
         return;
     }
     FertilityUtility.FillFertilityRelevantCells(UI.MouseCell(), Find.CurrentMap);
     foreach (var cell in FertilityUtility.fertilityRelevantCells)
     {
         float num = FertilityUtility.CellFertility(cell, Find.CurrentMap, FertilityDrawer.fertilityCountedThings);
         if (num != 0f)
         {
             Vector3 v = GenMapUI.LabelDrawPosFor(cell);
             GenMapUI.DrawThingLabel(v, num.ToString("n1"), FertilityDrawer.FertilityColor(num, 1.4f));
         }
     }
     FertilityDrawer.fertilityCountedThings.Clear();
 }