feat(cordis): 接入上下文组合与模组事务热替换

This commit is contained in:
2026-08-16 23:20:40 +08:00
commit ad256f109b
676 changed files with 52168 additions and 0 deletions
@@ -0,0 +1,29 @@
using System;
namespace ShrinkModFramework
{
[AttributeUsage(AttributeTargets.Class, AllowMultiple = false, Inherited = false)]
public sealed class ShrinkModAttribute : Attribute
{
public string ModId { get; }
public string DisplayName { get; }
public string Version { get; }
public int LoadOrder { get; }
public bool AutoApplyHarmonyPatches { get; set; } = true;
public ShrinkModAttribute(string modId, string displayName, string version, int loadOrder = 0)
{
if (string.IsNullOrWhiteSpace(modId))
throw new ArgumentException("模组 ID 不能为空。", nameof(modId));
if (string.IsNullOrWhiteSpace(displayName))
throw new ArgumentException("模组显示名不能为空。", nameof(displayName));
if (string.IsNullOrWhiteSpace(version))
throw new ArgumentException("模组版本不能为空。", nameof(version));
ModId = modId.Trim();
DisplayName = displayName.Trim();
Version = version.Trim();
LoadOrder = loadOrder;
}
}
}