mirror of
https://gitgud.io/c0ffeeeeeeee/rimworld-animations.git
synced 2024-08-15 00:43:45 +00:00
43 lines
1.1 KiB
C#
43 lines
1.1 KiB
C#
|
using System;
|
|||
|
using System.Collections.Generic;
|
|||
|
using System.Linq;
|
|||
|
using System.Text;
|
|||
|
using System.Threading.Tasks;
|
|||
|
using HarmonyLib;
|
|||
|
using RimWorld;
|
|||
|
using Verse;
|
|||
|
using rjw;
|
|||
|
using Verse.Sound;
|
|||
|
|
|||
|
namespace Rimworld_Animations {
|
|||
|
|
|||
|
[HarmonyPatch(typeof(xxx), "sexTick")]
|
|||
|
public static class HarmonyPatch_SexTick {
|
|||
|
|
|||
|
public static bool Prefix(ref Pawn pawn, ref Pawn partner, ref bool enablerotation, ref bool pawnnude, ref bool partnernude) {
|
|||
|
|
|||
|
|
|||
|
if (enablerotation) {
|
|||
|
pawn.rotationTracker.Face(((Thing)partner).DrawPos);
|
|||
|
partner.rotationTracker.Face(((Thing)pawn).DrawPos);
|
|||
|
}
|
|||
|
if (RJWSettings.sounds_enabled && !pawn.TryGetComp<CompBodyAnimator>().isAnimating) {
|
|||
|
SoundDef.Named("Sex").PlayOneShot(new TargetInfo(pawn.Position, pawn.Map));
|
|||
|
}
|
|||
|
pawn.Drawer.Notify_MeleeAttackOn((Thing)(object)partner);
|
|||
|
if (enablerotation) {
|
|||
|
pawn.rotationTracker.FaceCell(partner.Position);
|
|||
|
}
|
|||
|
if (pawnnude && !xxx.has_quirk(pawn, "Endytophile")) {
|
|||
|
xxx.DrawNude(pawn);
|
|||
|
}
|
|||
|
if (partnernude && !xxx.has_quirk(pawn, "Endytophile")) {
|
|||
|
xxx.DrawNude(partner);
|
|||
|
}
|
|||
|
|
|||
|
return false;
|
|||
|
}
|
|||
|
|
|||
|
}
|
|||
|
}
|