randomness reintroduced to anim selection
This commit is contained in:
parent
990d27d4b1
commit
e914cab80a
|
@ -84,9 +84,10 @@ namespace Rimworld_Animations {
|
||||||
|
|
||||||
int reorder2 = 0;
|
int reorder2 = 0;
|
||||||
|
|
||||||
//find all, then find max priority context
|
//find all, reorder randomly, then find max priority context
|
||||||
GroupAnimationDef result = DefDatabase<GroupAnimationDef>.AllDefsListForReading
|
GroupAnimationDef result = DefDatabase<GroupAnimationDef>.AllDefsListForReading
|
||||||
.FindAll((GroupAnimationDef x) => x.canAnimationBeUsed(participants))
|
.FindAll((GroupAnimationDef x) => x.canAnimationBeUsed(participants))
|
||||||
|
.OrderBy(_ => Rand.Int)
|
||||||
.MaxBy((GroupAnimationDef x) => x.Priority(participants, out reorder2));
|
.MaxBy((GroupAnimationDef x) => x.Priority(participants, out reorder2));
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue