Nullcheck for Animal Trainability, related to #92

This commit is contained in:
Vegapnk 2024-06-06 17:14:15 +02:00
parent d6ff8bda45
commit 1a3b6f3432
2 changed files with 2 additions and 0 deletions

Binary file not shown.

View file

@ -45,7 +45,9 @@ namespace RJW_Genes
{
if (RJW_Genes_Settings.rjw_genes_detailed_debug)
ModLog.Message($"{human} is a sextamer with bestiality on colony animal {animal} - trying to train");
if (animal.training == null) return;
var trainable = animal.training.NextTrainableToTrain();
if (trainable == null) return;
animal.training.Train(trainable, human);
}
}