diff --git a/1.5/Assemblies/Rimworld-Animations.dll b/1.5/Assemblies/Rimworld-Animations.dll index fa7d7d7..9ea1dc7 100644 Binary files a/1.5/Assemblies/Rimworld-Animations.dll and b/1.5/Assemblies/Rimworld-Animations.dll differ diff --git a/1.5/Source/Animations/AnimationWorkers/AnimationWorker_KeyframesExtended.cs b/1.5/Source/Animations/AnimationWorkers/AnimationWorker_KeyframesExtended.cs index 395a16f..0c8440f 100644 --- a/1.5/Source/Animations/AnimationWorkers/AnimationWorker_KeyframesExtended.cs +++ b/1.5/Source/Animations/AnimationWorkers/AnimationWorker_KeyframesExtended.cs @@ -35,7 +35,17 @@ namespace Rimworld_Animations { if (tick == keyframe.tick) { - return (keyframe as ExtendedKeyframe).voice; + VoiceTagDef voiceTag = (keyframe as ExtendedKeyframe).voice; + + //probability checking + if (Rand.Chance(voiceTag.probability)) + { + return voiceTag; + } + else + { + return null; + } } } diff --git a/1.5/Source/Voices/VoiceTagDef.cs b/1.5/Source/Voices/VoiceTagDef.cs index 3ebb678..2127b22 100644 --- a/1.5/Source/Voices/VoiceTagDef.cs +++ b/1.5/Source/Voices/VoiceTagDef.cs @@ -9,5 +9,8 @@ namespace Rimworld_Animations { public class VoiceTagDef : Def { + + public float probability = 1; + } }