mirror of
https://gitgud.io/c0ffeeeeeeee/rimworld-animations.git
synced 2024-08-15 00:43:45 +00:00
added functionality to RJW sfx sliders
This commit is contained in:
parent
c2ef4c6049
commit
060b396ebb
2 changed files with 36 additions and 7 deletions
Binary file not shown.
|
@ -244,18 +244,34 @@ namespace Rimworld_Animations {
|
|||
|
||||
//play sound effect
|
||||
if(rjw.RJWSettings.sounds_enabled && clip.SoundEffects.ContainsKey(clipTicks) && AnimationSettings.soundOverride) {
|
||||
SoundDef.Named(clip.SoundEffects[clipTicks]).PlayOneShot(new TargetInfo(pawn.Position, pawn.Map));
|
||||
|
||||
if (AnimationSettings.applySemenOnAnimationOrgasm && (pawn?.jobs?.curDriver is JobDriver_Sex) && clip.SoundEffects[clipTicks] == "Cum") {
|
||||
|
||||
Pawn partner = (pawn.jobs.curDriver as JobDriver_Sex)?.Partner;
|
||||
SoundInfo sound = new TargetInfo(pawn.Position, pawn.Map);
|
||||
string soundEffectName = clip.SoundEffects[clipTicks];
|
||||
|
||||
if(anim.sexTypes.Contains((pawn.jobs.curDriver as JobDriver_Sex).sexType)) {
|
||||
SemenHelper.calculateAndApplySemen(pawn, partner, (pawn.jobs.curDriver as JobDriver_Sex).sexType);
|
||||
|
||||
if ((pawn.jobs.curDriver as JobDriver_Sex).isAnimalOnAnimal)
|
||||
{
|
||||
sound.volumeFactor *= RJWSettings.sounds_animal_on_animal_volume;
|
||||
}
|
||||
|
||||
if(soundEffectName.StartsWith("Voiceline_"))
|
||||
{
|
||||
sound.volumeFactor *= RJWSettings.sounds_voice_volume;
|
||||
}
|
||||
|
||||
if (clip.SoundEffects[clipTicks] == "Cum") {
|
||||
|
||||
sound.volumeFactor *= RJWSettings.sounds_cum_volume;
|
||||
considerApplyingSemen();
|
||||
|
||||
} else
|
||||
{
|
||||
sound.volumeFactor *= RJWSettings.sounds_sex_volume;
|
||||
}
|
||||
|
||||
SoundDef.Named(soundEffectName).PlayOneShot(sound);
|
||||
|
||||
}
|
||||
if(AnimationSettings.orgasmQuiver && clip.quiver.ContainsKey(clipTicks)) {
|
||||
quiver = clip.quiver[clipTicks];
|
||||
|
@ -270,6 +286,19 @@ namespace Rimworld_Animations {
|
|||
calculateDrawValues();
|
||||
}
|
||||
|
||||
public void considerApplyingSemen()
|
||||
{
|
||||
if(AnimationSettings.applySemenOnAnimationOrgasm && (pawn?.jobs?.curDriver is JobDriver_Sex))
|
||||
{
|
||||
Pawn partner = (pawn.jobs.curDriver as JobDriver_Sex)?.Partner;
|
||||
|
||||
if (anim.sexTypes.Contains((pawn.jobs.curDriver as JobDriver_Sex).sexType))
|
||||
{
|
||||
SemenHelper.calculateAndApplySemen(pawn, partner, (pawn.jobs.curDriver as JobDriver_Sex).sexType);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public void calculateDrawValues() {
|
||||
|
||||
/*if(Find.TickManager.TickRateMultiplier > 1 && (lastDrawFrame + 1 >= RealTime.frameCount || RealTime.deltaTime < 0.05f)) {
|
||||
|
|
Loading…
Reference in a new issue