/// <summary>When a menu is open (<see cref="Game1.activeClickableMenu"/> isn't null), raised after that menu is drawn to the sprite batch but before it's rendered to the screen.</summary> /// <param name="sender">The event sender.</param> /// <param name="e">The event arguments.</param> private void OnRenderedActiveMenu(object sender, RenderedActiveMenuEventArgs e) { bool outro = false; //revised this so it properly draws over the canon moon. :v if (Game1.activeClickableMenu is ShippingMenu ourMenu) { outro = Helper.Reflection.GetField <bool>(ourMenu, "outro").GetValue(); } if (!Game1.wasRainingYesterday && !outro && Game1.activeClickableMenu is ShippingMenu currMenu && currMenu.currentPage == -1) { float scale = Game1.pixelZoom * 1.25f; if (Game1.viewport.Width < 1024) { scale = Game1.pixelZoom * .8f; } if (Game1.viewport.Width < 810) { scale = Game1.pixelZoom * .6f; } if (Game1.viewport.Width < 700) { scale = Game1.pixelZoom * .35f; } Color moonColor = Color.LightCyan; if (OurMoon.GetLunarPhaseForDay(SDate.Now().AddDays(-1)) == MoonPhase.BlueMoon) { moonColor = Color.Blue; } Game1.spriteBatch.Draw(OurIcons.MoonSource, new Vector2(Game1.viewport.Width - 65 * Game1.pixelZoom, Game1.pixelZoom), Sprites.Icons.GetNightMoonSprite(OurMoon.GetLunarPhaseForDay(SDate.Now().AddDays(-1))), moonColor, 0.0f, Vector2.Zero, scale, SpriteEffects.None, 1f); } }
private void ShowMoonInfo(string arg1, string[] arg2) { Monitor.Log($"Moon phase according to end of night: {OurMoon.GetLunarPhaseForDay(SDate.Now())}, with coords: { Sprites.Icons.GetNightMoonSprite(OurMoon.GetLunarPhaseForDay(SDate.Now()))}. According to normal phrasing: Phase is {OurMoon.DescribeMoonPhase()}, with rise {OurMoon.GetMoonRiseTime()} and set {OurMoon.GetMoonSetTime()}", LogLevel.Info); }