-
-
Notifications
You must be signed in to change notification settings - Fork 388
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
333d8a8
commit c49584d
Showing
651 changed files
with
57,640 additions
and
58,296 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 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 |
---|---|---|
@@ -1,48 +1,47 @@ | ||
using StardewValley.Mods; | ||
|
||
namespace Pathoschild.Stardew.Automate.Framework | ||
namespace Pathoschild.Stardew.Automate.Framework; | ||
|
||
/// <summary>How Automate should use a container.</summary> | ||
internal enum AutomateContainerPreference | ||
{ | ||
/// <summary>How Automate should use a container.</summary> | ||
internal enum AutomateContainerPreference | ||
{ | ||
/// <summary>Allow input/output for this container.</summary> | ||
Allow, | ||
/// <summary>Allow input/output for this container.</summary> | ||
Allow, | ||
|
||
/// <summary>Prefer input/output for this container over non-preferred containers.</summary> | ||
Prefer, | ||
|
||
/// <summary>Prefer input/output for this container over non-preferred containers.</summary> | ||
Prefer, | ||
/// <summary>Disable input/output for this container.</summary> | ||
Disable | ||
} | ||
|
||
/// <summary>Disable input/output for this container.</summary> | ||
Disable | ||
/// <summary>Provides extension methods for <see cref="AutomateContainerPreference"/>.</summary> | ||
internal static class AutomateContainerHelper | ||
{ | ||
/********* | ||
** Accessors | ||
*********/ | ||
/// <summary>The <see cref="ModDataDictionary"/> key for chest storage options.</summary> | ||
public const string StoreItemsKey = "Pathoschild.Automate/StoreItems"; | ||
|
||
/// <summary>The <see cref="ModDataDictionary"/> key for chest output options.</summary> | ||
public const string TakeItemsKey = "Pathoschild.Automate/TakeItems"; | ||
|
||
|
||
/********* | ||
** Methods | ||
*********/ | ||
/// <summary>Get whether IO is enabled.</summary> | ||
/// <param name="preference">The IO preference.</param> | ||
public static bool IsAllowed(this AutomateContainerPreference preference) | ||
{ | ||
return preference != AutomateContainerPreference.Disable; | ||
} | ||
|
||
/// <summary>Provides extension methods for <see cref="AutomateContainerPreference"/>.</summary> | ||
internal static class AutomateContainerHelper | ||
/// <summary>Get whether IO is preferred.</summary> | ||
/// <param name="preference">The IO preference.</param> | ||
public static bool IsPreferred(this AutomateContainerPreference preference) | ||
{ | ||
/********* | ||
** Accessors | ||
*********/ | ||
/// <summary>The <see cref="ModDataDictionary"/> key for chest storage options.</summary> | ||
public const string StoreItemsKey = "Pathoschild.Automate/StoreItems"; | ||
|
||
/// <summary>The <see cref="ModDataDictionary"/> key for chest output options.</summary> | ||
public const string TakeItemsKey = "Pathoschild.Automate/TakeItems"; | ||
|
||
|
||
/********* | ||
** Methods | ||
*********/ | ||
/// <summary>Get whether IO is enabled.</summary> | ||
/// <param name="preference">The IO preference.</param> | ||
public static bool IsAllowed(this AutomateContainerPreference preference) | ||
{ | ||
return preference != AutomateContainerPreference.Disable; | ||
} | ||
|
||
/// <summary>Get whether IO is preferred.</summary> | ||
/// <param name="preference">The IO preference.</param> | ||
public static bool IsPreferred(this AutomateContainerPreference preference) | ||
{ | ||
return preference == AutomateContainerPreference.Prefer; | ||
} | ||
return preference == AutomateContainerPreference.Prefer; | ||
} | ||
} |
Oops, something went wrong.