diff --git a/1.5/Assemblies/Rimworld-Animations.dll b/1.5/Assemblies/Rimworld-Animations.dll index fc2cf06..d859982 100644 Binary files a/1.5/Assemblies/Rimworld-Animations.dll and b/1.5/Assemblies/Rimworld-Animations.dll differ diff --git a/1.5/Defs/VoiceDefs/VoiceDef_Human.xml b/1.5/Defs/VoiceDefs/VoiceDef_Human.xml deleted file mode 100644 index 89c2f3e..0000000 --- a/1.5/Defs/VoiceDefs/VoiceDef_Human.xml +++ /dev/null @@ -1,21 +0,0 @@ - - - - Voice_HumanFemale - Human - Female - - - - - - - Voice_HumanMale - Human - Male - - - - - - diff --git a/1.5/Defs/VoiceDefs/VoiceDef_Orassan.xml b/1.5/Defs/VoiceDefs/VoiceDef_Orassan.xml deleted file mode 100644 index 0026987..0000000 --- a/1.5/Defs/VoiceDefs/VoiceDef_Orassan.xml +++ /dev/null @@ -1,16 +0,0 @@ - - - - \ No newline at end of file diff --git a/1.5/Defs/VoiceDefs/VoiceTagDef.xml b/1.5/Defs/VoiceDefs/VoiceTagDef.xml deleted file mode 100644 index 04651dd..0000000 --- a/1.5/Defs/VoiceDefs/VoiceTagDef.xml +++ /dev/null @@ -1,6 +0,0 @@ - - - - Moan - - \ No newline at end of file diff --git a/1.5/Source/Animations/AnimationWorkers/AnimationWorker_KeyframesExtended.cs b/1.5/Source/Animations/AnimationWorkers/AnimationWorker_KeyframesExtended.cs index 3894b1a..0b74719 100644 --- a/1.5/Source/Animations/AnimationWorkers/AnimationWorker_KeyframesExtended.cs +++ b/1.5/Source/Animations/AnimationWorkers/AnimationWorker_KeyframesExtended.cs @@ -22,23 +22,6 @@ namespace Rimworld_Animations return base.OffsetAtTick(tick, parms); } - public VoiceTagDef voiceAtTick(int tick) - { - - Verse.Keyframe keyframe2 = this.part.keyframes[this.part.keyframes.Count - 1]; - foreach (Verse.Keyframe keyframe in this.part.keyframes) - { - if (tick == keyframe.tick) - { - return (keyframe as ExtendedKeyframe).voice; - } - - } - - return null; - - } - public SoundDef soundAtTick(int tick) { diff --git a/1.5/Source/Animations/GroupAnimations/GroupAnimationDef.cs b/1.5/Source/Animations/GroupAnimations/GroupAnimationDef.cs index fb9eb43..b49f14d 100644 --- a/1.5/Source/Animations/GroupAnimations/GroupAnimationDef.cs +++ b/1.5/Source/Animations/GroupAnimations/GroupAnimationDef.cs @@ -52,7 +52,7 @@ namespace Rimworld_Animations { if (context.AnimationPriority() > priority) { - //get highest priority context for fitting animation, and its reorder + //get highest priority context for fitting animation priority = context.AnimationPriority(); reorder = context.AnimationReorder(); diff --git a/1.5/Source/Animations/Keyframes/ExtendedKeyframe.cs b/1.5/Source/Animations/Keyframes/ExtendedKeyframe.cs index 4d1031e..642fc63 100644 --- a/1.5/Source/Animations/Keyframes/ExtendedKeyframe.cs +++ b/1.5/Source/Animations/Keyframes/ExtendedKeyframe.cs @@ -13,7 +13,6 @@ namespace Rimworld_Animations public int? variant; public Rot4 rotation = Rot4.North; public SoundDef sound = null; - public VoiceTagDef voice = null; public bool visible = true; } } diff --git a/1.5/Source/Comps/CompExtendedAnimator.cs b/1.5/Source/Comps/CompExtendedAnimator.cs index d86bdbf..b6172c2 100644 --- a/1.5/Source/Comps/CompExtendedAnimator.cs +++ b/1.5/Source/Comps/CompExtendedAnimator.cs @@ -19,11 +19,11 @@ namespace Rimworld_Animations { private List animationQueue; private BaseExtendedAnimatorAnchor anchor; - private VoiceDef voice; - - + private int? rotation; + private Vector3? offset; private bool isAnimating = false; + public bool IsAnimating { get @@ -40,8 +40,6 @@ namespace Rimworld_Animations { } } - private Vector3? offset; - public Vector3? Offset { get @@ -54,8 +52,6 @@ namespace Rimworld_Animations { } } - private int? rotation; - public int? Rotation { get @@ -94,15 +90,6 @@ namespace Rimworld_Animations { } - public override void PostSpawnSetup(bool respawningAfterLoad) - { - if (voice == null) - { - AssignNewVoice(); - } - - } - public Vector3 getAnchor() { return anchor.getDrawPos(); @@ -197,7 +184,6 @@ namespace Rimworld_Animations { Scribe_Values.Look(ref this.animationTicks, "animations_ticks", 0); Scribe_Collections.Look(ref animationQueue, "animations_queue"); Scribe_Deep.Look(ref this.anchor, "animations_anchor"); - Scribe_Defs.Look(ref this.voice, "animations_voice"); } @@ -247,29 +233,6 @@ namespace Rimworld_Animations { } - public void AssignNewVoice() - { - //all voice options - List voiceOptions = - DefDatabase.AllDefsListForReading - .FindAll(voiceDef => voiceDef.VoiceFitsPawn(pawn)); - - //all voice options, with priority (for traitdef specific voices) - List voiceOptionsWithPriority = - voiceOptions.FindAll(voiceDef => voiceDef.takesPriority); - - if (!voiceOptionsWithPriority.NullOrEmpty()) - { - voice = voiceOptionsWithPriority.RandomElementByWeight(x => x.randomChanceFactor); - - } - else if (!voiceOptions.NullOrEmpty()) - { - voice = voiceOptions.RandomElementByWeight(x => x.randomChanceFactor); - } - - } - public void CheckAndPlaySounds() { @@ -284,32 +247,9 @@ namespace Rimworld_Animations { sound.PlayOneShot(new TargetInfo(pawn.Position, pawn.Map)); } - //play voice sounds - VoiceTagDef voiceTag = animWorker.voiceAtTick(rootNode.tree.AnimationTick); - if (voiceTag != null) - { - if (voice != null && voice.sounds.ContainsKey(voiceTag)) - { - voice.sounds[voiceTag].PlayOneShot(new TargetInfo(pawn.Position, pawn.Map)); - } - - else if (pawn.RaceProps.Humanlike && RJWAnimationSettings.playHumanlikeVoicesAsDefault) - { - //play default voice - VoiceDef pawnDefaultVoice = (pawn.gender == Gender.Male ? VoiceDefOf.Voice_HumanMale : VoiceDefOf.Voice_HumanFemale); - if (pawnDefaultVoice.sounds.ContainsKey(voiceTag)) - { - pawnDefaultVoice.sounds[voiceTag].PlayOneShot(new TargetInfo(pawn.Position, pawn.Map)); - } - - - } - - } - } - //check rootnodes and children + if (rootNode?.children != null) { foreach (PawnRenderNode node in rootNode?.children) @@ -322,25 +262,6 @@ namespace Rimworld_Animations { sound.PlayOneShot(new TargetInfo(pawn.Position, pawn.Map)); } - //play voice sounds - VoiceTagDef voiceTag = childrenAnimWorker.voiceAtTick(rootNode.tree.AnimationTick); - if (voiceTag != null) - { - if (voice != null && voice.sounds.ContainsKey(voiceTag)) - { - voice.sounds[voiceTag].PlayOneShot(new TargetInfo(pawn.Position, pawn.Map)); - } - else if (pawn.RaceProps.Humanlike && RJWAnimationSettings.playHumanlikeVoicesAsDefault) - { - - VoiceDef pawnDefaultVoice = (pawn.gender == Gender.Male ? VoiceDefOf.Voice_HumanMale : VoiceDefOf.Voice_HumanFemale); - if (pawnDefaultVoice.sounds.ContainsKey(voiceTag)) - { - pawnDefaultVoice.sounds[voiceTag].PlayOneShot(new TargetInfo(pawn.Position, pawn.Map)); - } - } - } - } } } @@ -348,9 +269,6 @@ namespace Rimworld_Animations { } - - - public bool AnimationMakesUseOfProp(AnimationPropDef animationProp) { // never true if not animating; anim props shouldn't be attached diff --git a/1.5/Source/Patches/RJWPatches/RJWAnimationSettings.cs b/1.5/Source/Patches/RJWPatches/RJWAnimationSettings.cs index fac9115..6cb30d2 100644 --- a/1.5/Source/Patches/RJWPatches/RJWAnimationSettings.cs +++ b/1.5/Source/Patches/RJWPatches/RJWAnimationSettings.cs @@ -14,9 +14,6 @@ namespace Rimworld_Animations { public static bool orgasmQuiver, rapeShiver, soundOverride = true, hearts = true, controlGenitalRotation = false, PlayAnimForNonsexualActs = true; - //probably move this setting to a different mod menu if moving rjw parts of code - public static bool playHumanlikeVoicesAsDefault = true; - public static bool offsetTab = false, debugMode = false; public static float shiverIntensity = 2f; @@ -24,7 +21,6 @@ namespace Rimworld_Animations { base.ExposeData(); - Scribe_Values.Look(ref playHumanlikeVoicesAsDefault, "RJWAnimations-playHumanlikeVoicesAsDefault", true); Scribe_Values.Look(ref debugMode, "RJWAnimations-AnimsDebugMode", false); Scribe_Values.Look(ref offsetTab, "RJWAnimations-EnableOffsetTab", false); Scribe_Values.Look(ref controlGenitalRotation, "RJWAnimations-controlGenitalRotation", false); @@ -59,7 +55,6 @@ namespace Rimworld_Animations { listingStandard.CheckboxLabeled("RimAnim_HeartsDuringLovin".Translate(), ref RJWAnimationSettings.hearts); listingStandard.CheckboxLabeled("RimAnim_PlayNonsexual".Translate(), ref RJWAnimationSettings.PlayAnimForNonsexualActs); listingStandard.CheckboxLabeled("RimAnim_AnimManagerTab".Translate(), ref RJWAnimationSettings.offsetTab); - listingStandard.CheckboxLabeled("RimAnim_HumanlikeVoicesDefault".Translate(), ref RJWAnimationSettings.playHumanlikeVoicesAsDefault); listingStandard.Label("RimAnim_ShiverIntensity".Translate() + RJWAnimationSettings.shiverIntensity); RJWAnimationSettings.shiverIntensity = listingStandard.Slider(RJWAnimationSettings.shiverIntensity, 0.0f, 12f); diff --git a/1.5/Source/Voices/VoiceDef.cs b/1.5/Source/Voices/VoiceDef.cs deleted file mode 100644 index 9dd6c0d..0000000 --- a/1.5/Source/Voices/VoiceDef.cs +++ /dev/null @@ -1,39 +0,0 @@ -using RimWorld; -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -using Verse; - -namespace Rimworld_Animations -{ - public class VoiceDef : Def - { - - public ThingDef race; - public Gender gender = Gender.None; - public List traits = new List(); - public bool takesPriority = false; - public float randomChanceFactor = 1; - - public Dictionary sounds = new Dictionary(); - - public bool VoiceFitsPawn(Pawn pawn) - { - - //doesn't match race - if (pawn.def != race) return false; - - //doesn't match gender - if (gender != Gender.None && pawn.gender != gender) return false; - - //if traits list is not empty, and pawn doesn't have any of the designated traits, doesn't match - if (!traits.Empty() && !traits.Any(trait => pawn.story.traits.HasTrait(trait))) return false; - - return true; - - } - - } -} diff --git a/1.5/Source/Voices/VoiceDefOf.cs b/1.5/Source/Voices/VoiceDefOf.cs deleted file mode 100644 index e489233..0000000 --- a/1.5/Source/Voices/VoiceDefOf.cs +++ /dev/null @@ -1,22 +0,0 @@ -using RimWorld; -using rjw; -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - -namespace Rimworld_Animations -{ - [DefOf] - public static class VoiceDefOf - { - static VoiceDefOf() - { - DefOfHelper.EnsureInitializedInCtor(typeof(VoiceDefOf)); - } - - public static VoiceDef Voice_HumanMale; - public static VoiceDef Voice_HumanFemale; - } -} diff --git a/1.5/Source/Voices/VoiceTagDef.cs b/1.5/Source/Voices/VoiceTagDef.cs deleted file mode 100644 index 3ebb678..0000000 --- a/1.5/Source/Voices/VoiceTagDef.cs +++ /dev/null @@ -1,13 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -using Verse; - -namespace Rimworld_Animations -{ - public class VoiceTagDef : Def - { - } -} diff --git a/Languages/English/Keyed/RJWAnimations-LanguageData.xml b/Languages/English/Keyed/RJWAnimations-LanguageData.xml index 7227181..95ecca6 100644 --- a/Languages/English/Keyed/RJWAnimations-LanguageData.xml +++ b/Languages/English/Keyed/RJWAnimations-LanguageData.xml @@ -11,7 +11,6 @@ Play animation for nonsexual acts (handholding, makeout) Enable Animation Manager Tab Shiver/Quiver Intensity (default 2): - Play humanlike voices by default Debug Mode @@ -20,5 +19,4 @@ Copy Offset to Clipboard Paste offset values in OffsetDef, or share in Discord - \ No newline at end of file diff --git a/Rimworld-Animations.csproj b/Rimworld-Animations.csproj index 619c1b1..3023dc4 100644 --- a/Rimworld-Animations.csproj +++ b/Rimworld-Animations.csproj @@ -134,9 +134,6 @@ - - - @@ -196,9 +193,6 @@ - - -