-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #16 from Mushymato/main
Remove MailFrameworkMod dependency, update drawHairAndAccesories for 1.6.14, plus some other refactoring
- Loading branch information
Showing
16 changed files
with
289 additions
and
271 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
using OrnithologistsGuild.Content; | ||
using StardewModdingAPI; | ||
using StardewValley; | ||
using StardewValley.Delegates; | ||
|
||
namespace OrnithologistsGuild | ||
{ | ||
/// <summary> | ||
/// Add game state queries for use in conditions. | ||
/// </summary> | ||
public static class GameStateQueries | ||
{ | ||
private static IMonitor Monitor; | ||
|
||
public static void Initialize(string modId, IMonitor monitor) | ||
{ | ||
Monitor = monitor; | ||
|
||
GameStateQuery.Register($"{modId}_IDENTIFIED_AT_LEAST", IDENTIFIED_AT_LEAST); | ||
GameStateQuery.Register($"{modId}_IDENTIFIED_ALL", IDENTIFIED_ALL); | ||
} | ||
|
||
/// <summary> | ||
/// Check if the player has identified at least (>=) N birdies | ||
/// Usage: Ivy.OrnithologistsGuild_IDENTIFIED_AT_LEAST \<N\> | ||
/// /// </summary> | ||
/// <param name="query">GSQ query, expected to have 2 items</param> | ||
/// <param name="context">GSQ context, unused</param> | ||
/// <returns></returns> | ||
public static bool IDENTIFIED_AT_LEAST(string[] query, GameStateQueryContext context) | ||
{ | ||
if (!ArgUtility.TryGetInt(query, 1, out int identify, out string error, "int identify")) | ||
{ | ||
Monitor.Log(error, LogLevel.Error); | ||
return false; | ||
} | ||
return (SaveDataManager.SaveData?.ForPlayer(Game1.player.UniqueMultiplayerID).LifeList.IdentifiedCount ?? 0) >= identify; | ||
} | ||
|
||
/// <summary> | ||
/// Check if the player has identified at least (>=) N birdies | ||
/// Usage: Ivy.OrnithologistsGuild_IDENTIFIED_ALL | ||
/// /// </summary> | ||
/// <param name="query">GSQ query, expected to have 2 items</param> | ||
/// <param name="context">GSQ context, unused</param> | ||
/// <returns></returns> | ||
public static bool IDENTIFIED_ALL(string[] query, GameStateQueryContext context) | ||
{ | ||
return (SaveDataManager.SaveData?.ForPlayer(Game1.player.UniqueMultiplayerID).LifeList.IdentifiedCount ?? 0) >= ContentPackManager.BirdieDefs.Count; | ||
} | ||
} | ||
} |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.