back compatibility with older animations

This commit is contained in:
c0ffeeeeeeee 2021-02-19 12:52:15 -08:00
parent 440092ff57
commit 670e0ffc32
3 changed files with 2 additions and 2 deletions

View file

@ -108,7 +108,7 @@ namespace Rimworld_Animations {
Log.Message("Selecting animation for interaction type " + sexProps.DictionaryKey.defName + "...");
return optionsWithInteractionType.RandomElement();
}
List<AnimationDef> optionsWithSexType = options.ToList().FindAll(x => x.sexTypes.Contains(sexType));
List<AnimationDef> optionsWithSexType = options.ToList().FindAll(x => x.sexTypes != null && x.sexTypes.Contains(sexType));
if (optionsWithSexType.Any()) {
if (AnimationSettings.debugMode)
Log.Message("Selecting animation for rjwSexType " + sexType.ToStringSafe() + "...");