暂存补丁反过来

This commit is contained in:
2025-08-17 12:51:38 +08:00
parent f286610be9
commit f1568fdfeb
2 changed files with 5 additions and 9 deletions

View File

@@ -4,19 +4,15 @@ using System.Reflection;
namespace WulaFallenEmpire namespace WulaFallenEmpire
{ {
[HarmonyPatch(typeof(Pawn_HealthTracker), "get_CanBleed")] [HarmonyPatch(typeof(Hediff_Injury), "get_BleedRate")]
public static class NoBloodForWula_CanBleed_Patch public static class NoBloodForWula_BleedRate_Patch
{ {
public static void Postfix(Pawn_HealthTracker __instance, ref bool __result) public static void Postfix(Hediff_Injury __instance, ref float __result)
{ {
// 使用反射获取Pawn_HealthTracker的私有pawn字段 if (__instance.pawn.def.defName == "WulaSpecies")
Pawn pawn = (Pawn)typeof(Pawn_HealthTracker).GetField("pawn", BindingFlags.NonPublic | BindingFlags.Instance).GetValue(__instance);
if (pawn.def.defName == "WulaSpecies")
{ {
__result = false; __result = 0f;
} }
} }
} }
} }