diff options
author | Jesse Plamondon-Willard <Pathoschild@users.noreply.github.com> | 2020-06-21 11:36:35 -0400 |
---|---|---|
committer | Jesse Plamondon-Willard <Pathoschild@users.noreply.github.com> | 2020-06-21 11:36:35 -0400 |
commit | c8f72699663ca0c09127e469a328f711db78dfe4 (patch) | |
tree | fd4c3bf2952c72ff80cca9f7ce60065486c2d839 /src/SMAPI/Framework/Events/ManagedEventHandler.cs | |
parent | e64ecc89f94641d4054162eff4943f660f43030f (diff) | |
download | SMAPI-c8f72699663ca0c09127e469a328f711db78dfe4.tar.gz SMAPI-c8f72699663ca0c09127e469a328f711db78dfe4.tar.bz2 SMAPI-c8f72699663ca0c09127e469a328f711db78dfe4.zip |
fix event priority sorting
Diffstat (limited to 'src/SMAPI/Framework/Events/ManagedEventHandler.cs')
-rw-r--r-- | src/SMAPI/Framework/Events/ManagedEventHandler.cs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/SMAPI/Framework/Events/ManagedEventHandler.cs b/src/SMAPI/Framework/Events/ManagedEventHandler.cs index cf470c1e..b32a2a22 100644 --- a/src/SMAPI/Framework/Events/ManagedEventHandler.cs +++ b/src/SMAPI/Framework/Events/ManagedEventHandler.cs @@ -47,7 +47,7 @@ namespace StardewModdingAPI.Framework.Events if (!(obj is ManagedEventHandler<TEventArgs> other)) throw new ArgumentException("Can't compare to an unrelated object type."); - int priorityCompare = this.Priority.CompareTo(other.Priority); + int priorityCompare = -this.Priority.CompareTo(other.Priority); // higher value = sort first return priorityCompare != 0 ? priorityCompare : this.RegistrationOrder.CompareTo(other.RegistrationOrder); |