OnOtherBuffApply/Remove监听

This commit is contained in:
SoulliesOfficial
2025-11-10 12:57:04 -05:00
parent 41a0990600
commit 0e66d4d0dd
29 changed files with 321 additions and 27 deletions

View File

@@ -8,7 +8,6 @@ using SLSFramework.General;
using UMod;
using UMod.Scripting;
using UnityEngine;
using UnityEngine.ResourceManagement.Exceptions;
using Object = UnityEngine.Object;
namespace SLSFramework.UModAssistance
@@ -34,7 +33,7 @@ namespace SLSFramework.UModAssistance
}
if (!host.IsSuccessful)
{
throw new OperationException($"Failed to load mod '{modName}'");
throw new Exception($"Failed to load mod '{modName}' asynchronously");
}
LoadedMods.Add(modName, host.Result);
Debug.Log($"Mod '{modName}' async loaded successfully.");
@@ -156,9 +155,14 @@ namespace SLSFramework.UModAssistance
return type.Namespace!.Replace("Continentis.Mods.", "") + "." + type.Name;
}
public static string GetTypeID(string modName, string classification, string className)
public static string GetTypeID(string modName, string classification, string category, string className)
{
return $"{modName}.{classification}.{className}";
if (string.IsNullOrEmpty(category))
{
return $"{modName}.{classification}.{className}";
}
return $"{modName}.{classification}.{category}.{className}";
}
/// <summary>