public static void Postfix()
 {
     if (!WorldRendererUtility.WorldRenderedNow)
     {
         FertilityDrawer.FertilityDrawerOnGUI();
     }
 }
Ejemplo n.º 2
0
 public static void FertilityDrawerOnGUI()
 {
     if (Event.current.type != EventType.Repaint || !FertilityDrawer.ShouldShow())
     {
         return;
     }
     FertilityDrawer.DrawFertilityAroundMouse();
 }
 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();
 }
Ejemplo n.º 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();
 }