mirror of
https://gitgud.io/c0ffeeeeeeee/rimworld-animations.git
synced 2024-08-15 00:43:45 +00:00
commit
This commit is contained in:
parent
74a34b6f8d
commit
55ae1c5d10
29 changed files with 1387 additions and 28 deletions
42
Source/Patches/rjwPatches/HarmonyPatch_SexTick.cs
Normal file
42
Source/Patches/rjwPatches/HarmonyPatch_SexTick.cs
Normal file
|
@ -0,0 +1,42 @@
|
|||
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;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue