暂存补丁反过来
This commit is contained in:
Binary file not shown.
@@ -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;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user