暂存
This commit is contained in:
23
Source/ArachnaeSwarm/HarmonyPatches/Patch_ForceTargetable.cs
Normal file
23
Source/ArachnaeSwarm/HarmonyPatches/Patch_ForceTargetable.cs
Normal file
@@ -0,0 +1,23 @@
|
||||
using HarmonyLib;
|
||||
using Verse;
|
||||
using RimWorld;
|
||||
|
||||
namespace ArachnaeSwarm
|
||||
{
|
||||
[HarmonyPatch(typeof(Building_TurretGun), "get_CanSetForcedTarget")]
|
||||
public static class Patch_Building_TurretGun_CanSetForcedTarget
|
||||
{
|
||||
public static void Postfix(Building_TurretGun __instance, ref bool __result)
|
||||
{
|
||||
if (__result)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
if (__instance.GetComp<CompForceTargetable>() != null && __instance.Faction == Faction.OfPlayer)
|
||||
{
|
||||
__result = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user