diff options
author | Jesse Plamondon-Willard <Pathoschild@users.noreply.github.com> | 2022-03-25 23:53:30 -0400 |
---|---|---|
committer | Jesse Plamondon-Willard <Pathoschild@users.noreply.github.com> | 2022-03-25 23:53:30 -0400 |
commit | 3707f481a567df5149aea00ffb14cddb7b14fccb (patch) | |
tree | a078b00dd396853ed23f4f542d1877d6a40c3482 /src/SMAPI/Events/AssetLoadPriority.cs | |
parent | 021891ff0ceb6b327bc196c336aa56ddfaf99b0e (diff) | |
download | SMAPI-3707f481a567df5149aea00ffb14cddb7b14fccb.tar.gz SMAPI-3707f481a567df5149aea00ffb14cddb7b14fccb.tar.bz2 SMAPI-3707f481a567df5149aea00ffb14cddb7b14fccb.zip |
extend load conflict resolution into load priority (#766)
Diffstat (limited to 'src/SMAPI/Events/AssetLoadPriority.cs')
-rw-r--r-- | src/SMAPI/Events/AssetLoadPriority.cs | 19 |
1 files changed, 19 insertions, 0 deletions
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 +{ + /// <summary>The priority for an asset load when multiple apply for the same asset.</summary> + /// <remarks>If multiple non-<see cref="Exclusive"/> loads have the same priority, the one registered first will be selected. You can also specify arbitrary intermediate values, like <c>AssetLoadPriority.Low + 5</c>.</remarks> + public enum AssetLoadPriority + { + /// <summary>This load is optional and can safely be skipped if there are higher-priority loads.</summary> + Low = -1000, + + /// <summary>The load is optional and can safely be skipped if there are higher-priority loads, but it should still be preferred over any <see cref="Low"/>-priority loads.</summary> + Medium = 0, + + /// <summary>The load is optional and can safely be skipped if there are higher-priority loads, but it should still be preferred over any <see cref="Low"/>- or <see cref="Medium"/>-priority loads.</summary> + High = 1000, + + /// <summary>The load is not optional. If more than one loader has <see cref="Exclusive"/> priority, SMAPI will log an error and ignore all of them.</summary> + Exclusive = int.MaxValue + } +} |