Stardew_Valley_Mods/GeneralMods/HappyBirthday/Framework/Messages.cs

29 lines
922 B
C#
Raw Normal View History

using StardewValley;
namespace Omegasis.HappyBirthday.Framework
{
/// <summary>Provides utility methods for displaying messages to the user.</summary>
internal class Messages
{
/*********
** Public methods
*********/
/// <summary>Show a message to the user with a star icon.</summary>
/// <param name="message">The message to display.</param>
public static void ShowStarMessage(string message)
{
Game1.addHUDMessage(new HUDMessage(message, 1));
if (!message.Contains("Inventory"))
{
Game1.playSound("cancel");
return;
}
if (!Game1.player.mailReceived.Contains("BackpackTip"))
{
Game1.player.mailReceived.Add("BackpackTip");
Game1.addMailForTomorrow("pierreBackpack", false, false);
}
}
}
}