randomness reintroduced to anim selection

This commit is contained in:
c0ffee 2024-04-28 17:15:23 -07:00
parent 990d27d4b1
commit e914cab80a
1 changed files with 2 additions and 1 deletions

View File

@ -84,9 +84,10 @@ namespace Rimworld_Animations {
int reorder2 = 0;
//find all, then find max priority context
//find all, reorder randomly, then find max priority context
GroupAnimationDef result = DefDatabase<GroupAnimationDef>.AllDefsListForReading
.FindAll((GroupAnimationDef x) => x.canAnimationBeUsed(participants))
.OrderBy(_ => Rand.Int)
.MaxBy((GroupAnimationDef x) => x.Priority(participants, out reorder2));