整合SLSUtilities

This commit is contained in:
SoulliesOfficial
2026-01-17 11:35:49 -05:00
parent d94241f36c
commit 7ee2894a63
1338 changed files with 3051541 additions and 507034 deletions

View File

@@ -0,0 +1,26 @@
using System;
namespace LunaWolfStudiosEditor.ScriptableSheets.Comparables
{
public abstract class AbstractComparable<TComparable, TValue> : IComparable where TComparable : AbstractComparable<TComparable, TValue>
{
private readonly TValue m_Value;
protected AbstractComparable(TValue value)
{
m_Value = value;
}
public int CompareTo(object obj)
{
if (obj == null || !(obj is TComparable))
{
throw new ArgumentException($"Object of type {obj.GetType()} is not a {nameof(TComparable)}.");
}
var other = (TComparable) obj;
return CompareTo(m_Value, other.m_Value);
}
public abstract int CompareTo(TValue value, TValue other);
}
}