summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/SMAPI/Utilities/PerScreen.cs7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/SMAPI/Utilities/PerScreen.cs b/src/SMAPI/Utilities/PerScreen.cs
index 60406d6b..20b8fbce 100644
--- a/src/SMAPI/Utilities/PerScreen.cs
+++ b/src/SMAPI/Utilities/PerScreen.cs
@@ -47,6 +47,13 @@ namespace StardewModdingAPI.Utilities
this.CreateNewState = createNewState ?? (() => default);
}
+ /// <summary>Get all active values by screen ID. This doesn't initialize the value for a screen ID if it's not created yet.</summary>
+ public IEnumerable<KeyValuePair<int, T>> GetActiveValues()
+ {
+ this.RemoveDeadScreens();
+ return this.States.ToArray();
+ }
+
/// <summary>Get the value for a given screen ID, creating it if needed.</summary>
/// <param name="screenId">The screen ID to check.</param>
public T GetValueForScreen(int screenId)