From 3707f481a567df5149aea00ffb14cddb7b14fccb Mon Sep 17 00:00:00 2001 From: Jesse Plamondon-Willard Date: Fri, 25 Mar 2022 23:53:30 -0400 Subject: extend load conflict resolution into load priority (#766) --- src/SMAPI/Events/AssetLoadPriority.cs | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 src/SMAPI/Events/AssetLoadPriority.cs (limited to 'src/SMAPI/Events/AssetLoadPriority.cs') diff --git a/src/SMAPI/Events/AssetLoadPriority.cs b/src/SMAPI/Events/AssetLoadPriority.cs new file mode 100644 index 00000000..e07b5a40 --- /dev/null +++ b/src/SMAPI/Events/AssetLoadPriority.cs @@ -0,0 +1,19 @@ +namespace StardewModdingAPI.Events +{ + /// The priority for an asset load when multiple apply for the same asset. + /// If multiple non- loads have the same priority, the one registered first will be selected. You can also specify arbitrary intermediate values, like AssetLoadPriority.Low + 5. + public enum AssetLoadPriority + { + /// This load is optional and can safely be skipped if there are higher-priority loads. + Low = -1000, + + /// The load is optional and can safely be skipped if there are higher-priority loads, but it should still be preferred over any -priority loads. + Medium = 0, + + /// The load is optional and can safely be skipped if there are higher-priority loads, but it should still be preferred over any - or -priority loads. + High = 1000, + + /// The load is not optional. If more than one loader has priority, SMAPI will log an error and ignore all of them. + Exclusive = int.MaxValue + } +} -- cgit