diff --git a/1.6/1.6/Assemblies/ArachnaeSwarm.dll b/1.6/1.6/Assemblies/ArachnaeSwarm.dll index 6f2637f..85f12af 100644 Binary files a/1.6/1.6/Assemblies/ArachnaeSwarm.dll and b/1.6/1.6/Assemblies/ArachnaeSwarm.dll differ diff --git a/Source/ArachnaeSwarm/ArachnaeLog.cs b/Source/ArachnaeSwarm/ArachnaeLog.cs index 1e67b59..a6ef93e 100644 --- a/Source/ArachnaeSwarm/ArachnaeLog.cs +++ b/Source/ArachnaeSwarm/ArachnaeLog.cs @@ -15,7 +15,7 @@ namespace ArachnaeSwarm { if (DebugEnabled) { - ArachnaeLog.Debug(message); + Log.Message(message); } } } diff --git a/Source/ArachnaeSwarm/Pawn_Comps/ARA_CompHediffGiver/CompProperties_HediffGiver.cs b/Source/ArachnaeSwarm/Pawn_Comps/ARA_CompHediffGiver/CompProperties_HediffGiver.cs index db67c96..201de1f 100644 --- a/Source/ArachnaeSwarm/Pawn_Comps/ARA_CompHediffGiver/CompProperties_HediffGiver.cs +++ b/Source/ArachnaeSwarm/Pawn_Comps/ARA_CompHediffGiver/CompProperties_HediffGiver.cs @@ -3,6 +3,15 @@ using Verse; namespace ArachnaeSwarm { + /// + /// Hediff与身体部位的映射关系,用于XML序列化 + /// + public class HediffBodyPartMapping + { + public HediffDef hediff; + public BodyPartDef bodyPart; + } + public class CompProperties_HediffGiver : CompProperties { // 要添加的hediff列表 @@ -15,37 +24,37 @@ namespace ArachnaeSwarm public bool allowDuplicates = false; // === 新增:优先应用部位设置 === - public bool useDefaultInstallPart = true; // 是否使用HediffDef的defaultInstallPart + public bool useDefaultInstallPart = true; - // === 新增:自定义部位映射 === - public Dictionary customBodyPartMapping = null; + // === 新增:自定义部位映射(使用List替代Dictionary) === + public List customBodyPartMapping = null; public CompProperties_HediffGiver() { this.compClass = typeof(CompHediffGiver); } - /// - /// 获取Hediff应该应用的部位 - /// public BodyPartDef GetBodyPartForHediff(HediffDef hediffDef) { if (hediffDef == null) return null; - // 首先检查自定义映射 - if (customBodyPartMapping != null && customBodyPartMapping.ContainsKey(hediffDef)) + if (customBodyPartMapping != null) { - return customBodyPartMapping[hediffDef]; + foreach (var mapping in customBodyPartMapping) + { + if (mapping.hediff == hediffDef) + return mapping.bodyPart; + } } - // 然后检查是否使用默认安装部位 if (useDefaultInstallPart && hediffDef.defaultInstallPart != null) { return hediffDef.defaultInstallPart; } - return null; // 没有指定部位 + return null; } } } + diff --git a/非公开资源/Content/Textures/Terrain/Surfaces/ARA_InsectJelly_Terrain.png b/非公开资源/Content/Textures/Terrain/Surfaces/ARA_InsectJelly_Terrain.png index 068499b..51ee441 100644 Binary files a/非公开资源/Content/Textures/Terrain/Surfaces/ARA_InsectJelly_Terrain.png and b/非公开资源/Content/Textures/Terrain/Surfaces/ARA_InsectJelly_Terrain.png differ