rimworld-animations/1.5/Source/Patches/RJWPatches/JobDrivers/SexBaseReceivers/HarmonyPatch_JobDriver_SexB...

30 lines
865 B
C#

using HarmonyLib;
using rjw;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Verse.AI;
namespace Rimworld_Animations
{
[HarmonyPatch(typeof(JobDriver_SexBaseRecieverRaped), "MakeNewToils")]
public class HarmonyPatch_JobDriver_SexBaseReceiverRaped
{
/*
* Doesn't work; ienumerables are read-only, can't modify toil
* would need to harmonypatch; stopped partner animating in sexbaseinitiator instead
*
public static void Postfix(JobDriver_SexBaseRecieverRaped __instance, ref IEnumerable<Toil> __result)
{
//added for sudden end of jobdriver
__result.Last().AddFinishAction(delegate {
AnimationUtility.StopGroupAnimation(__instance.pawn);
});
}
*/
}
}