diff --git a/1.6/1.6/Assemblies/WulaFallenEmpire.dll b/1.6/1.6/Assemblies/WulaFallenEmpire.dll index ca845132..70bee656 100644 Binary files a/1.6/1.6/Assemblies/WulaFallenEmpire.dll and b/1.6/1.6/Assemblies/WulaFallenEmpire.dll differ diff --git a/1.6/1.6/Defs/FleshTypeDefs/FleshType_WULA.xml b/1.6/1.6/Defs/FleshTypeDefs/FleshType_WULA.xml index 80a0d4a3..0fbc5a7e 100644 --- a/1.6/1.6/Defs/FleshTypeDefs/FleshType_WULA.xml +++ b/1.6/1.6/Defs/FleshTypeDefs/FleshType_WULA.xml @@ -1,11 +1,11 @@ - + WULA_Fleshtype CorpsesMechanoid Damage_HitMechanoid - true + false
  • Things/Pawn/Wounds/WoundMechA diff --git a/1.6/Defs/JobDefs/WULA_Jobs.xml b/1.6/Defs/JobDefs/WULA_Jobs.xml deleted file mode 100644 index b65494e2..00000000 --- a/1.6/Defs/JobDefs/WULA_Jobs.xml +++ /dev/null @@ -1,9 +0,0 @@ - - - - WULA_LayDownToCharge - WulaFallenEmpire.JobDriver_WulaLayDownToCharge - 正在充电。 - false - - \ No newline at end of file diff --git a/Source/WulaFallenEmpire/EventSystem/EventVariableManager.cs b/Source/WulaFallenEmpire/EventSystem/EventVariableManager.cs index acfc0be4..868535cb 100644 --- a/Source/WulaFallenEmpire/EventSystem/EventVariableManager.cs +++ b/Source/WulaFallenEmpire/EventSystem/EventVariableManager.cs @@ -13,6 +13,12 @@ namespace WulaFallenEmpire private Dictionary pawnVars = new Dictionary(); private Dictionary> pawnListVars = new Dictionary>(); + // 用于Scribe的辅助列表 + private List pawnVarKeys; + private List pawnVarValues; + private List pawnListVarKeys; + private List> pawnListVarValues; + // Required for WorldComponent public EventVariableManager(World world) : base(world) { @@ -24,8 +30,8 @@ namespace WulaFallenEmpire Scribe_Collections.Look(ref intVars, "intVars", LookMode.Value, LookMode.Value); Scribe_Collections.Look(ref floatVars, "floatVars", LookMode.Value, LookMode.Value); Scribe_Collections.Look(ref stringVars, "stringVars", LookMode.Value, LookMode.Value); - Scribe_Collections.Look(ref pawnVars, "pawnVars", LookMode.Value, LookMode.Reference); - Scribe_Collections.Look(ref pawnListVars, "pawnListVars", LookMode.Value, LookMode.Reference); + Scribe_Collections.Look(ref pawnVars, "pawnVars", LookMode.Value, LookMode.Reference, ref pawnVarKeys, ref pawnVarValues); + Scribe_Collections.Look(ref pawnListVars, "pawnListVars", LookMode.Value, LookMode.Reference, ref pawnListVarKeys, ref pawnListVarValues); // Ensure dictionaries are not null after loading if (Scribe.mode == LoadSaveMode.PostLoadInit) diff --git a/Source/WulaFallenEmpire/HarmonyPatches/NoBloodForWulaPatch.cs b/Source/WulaFallenEmpire/HarmonyPatches/NoBloodForWulaPatch.cs new file mode 100644 index 00000000..91d8aeeb --- /dev/null +++ b/Source/WulaFallenEmpire/HarmonyPatches/NoBloodForWulaPatch.cs @@ -0,0 +1,33 @@ +using HarmonyLib; +using Verse; +using System.Reflection; + +namespace WulaFallenEmpire +{ + [HarmonyPatch(typeof(Pawn_HealthTracker), "get_CanBleed")] + public static class NoBloodForWula_CanBleed_Patch + { + public static void Postfix(Pawn_HealthTracker __instance, ref bool __result) + { + // 使用反射获取Pawn_HealthTracker的私有pawn字段 + Pawn pawn = (Pawn)typeof(Pawn_HealthTracker).GetField("pawn", BindingFlags.NonPublic | BindingFlags.Instance).GetValue(__instance); + + if (pawn.def.defName == "WulaSpecies") + { + __result = false; + } + } + } + + [HarmonyPatch(typeof(Hediff_Injury), "get_BleedRate")] + public static class NoBloodForWula_BleedRate_Patch + { + public static void Postfix(Hediff_Injury __instance, ref float __result) + { + if (__instance.pawn.def.defName == "WulaSpecies") + { + __result = 0f; + } + } + } +} \ No newline at end of file diff --git a/Source/WulaFallenEmpire/WulaFallenEmpire.csproj b/Source/WulaFallenEmpire/WulaFallenEmpire.csproj index 2bb7e82a..ba1d8ec9 100644 --- a/Source/WulaFallenEmpire/WulaFallenEmpire.csproj +++ b/Source/WulaFallenEmpire/WulaFallenEmpire.csproj @@ -97,6 +97,7 @@ +