添加“特殊”状态分类,更新相关状态块逻辑,优化状态获取和更新功能。各职业类中新增特殊状态支持,确保状态管理更加灵活和准确。

This commit is contained in:
waynebian01
2026-09-02 21:29:29 +08:00
parent c3660fb388
commit 579bc3cbd7
16 changed files with 137 additions and 57 deletions

View File

@@ -6,6 +6,7 @@ internal sealed class ModuleDependencyService
private static readonly string[] StateCategories =
[
ClassStateCatalog.CategoryState,
ClassStateCatalog.CategorySpecial,
ClassStateCatalog.CategoryResource,
ClassStateCatalog.CategoryConfig,
ClassStateCatalog.CategoryTarget,
@@ -243,6 +244,7 @@ internal sealed class ModuleDependencyService
foreach (var category in new[]
{
ClassStateCatalog.CategoryState,
ClassStateCatalog.CategorySpecial,
ClassStateCatalog.CategoryResource,
ClassStateCatalog.CategoryConfig
})
@@ -464,6 +466,7 @@ internal sealed class ModuleDependencyService
}
}
ClassBlocksStore.RelocateSpecialStateFields(local);
var reservedNames = new HashSet<string>(StringComparer.Ordinal);
if (local.NestedStates)
@@ -471,6 +474,7 @@ internal sealed class ModuleDependencyService
foreach (var category in new[]
{
ClassStateCatalog.CategoryState,
ClassStateCatalog.CategorySpecial,
ClassStateCatalog.CategoryResource,
ClassStateCatalog.CategoryConfig
})
@@ -744,7 +748,7 @@ internal sealed class ModuleDependencyService
if (reservedNames.Contains(item.Name))
{
counters.Conflicts.Add($"物品名称“{item.Name}”与本地状态、能量或配置开关字段重名,已跳过。");
counters.Conflicts.Add($"物品名称“{item.Name}”与本地状态、特殊、能量或配置开关字段重名,已跳过。");
continue;
}