From c8f72699663ca0c09127e469a328f711db78dfe4 Mon Sep 17 00:00:00 2001 From: Jesse Plamondon-Willard Date: Sun, 21 Jun 2020 11:36:35 -0400 Subject: fix event priority sorting --- src/SMAPI/Framework/Events/ManagedEventHandler.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/SMAPI/Framework') 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 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); -- cgit