mirror of
https://gitgud.io/c0ffeeeeeeee/rimworld-animations.git
synced 2024-08-15 00:43:45 +00:00
Minor tweaks for rjw 4.1.0 +
Relevant animation context when applicable
This commit is contained in:
parent
e2c80c9423
commit
7f1e2314dd
8 changed files with 44 additions and 13 deletions
|
@ -14,7 +14,7 @@ namespace Rimworld_Animations {
|
|||
Note: always make the list in this order:
|
||||
Female pawns, animal female pawns, male pawns, animal male pawns
|
||||
*/
|
||||
public static AnimationDef tryFindAnimation(ref List<Pawn> participants) {
|
||||
public static AnimationDef tryFindAnimation(ref List<Pawn> participants, rjw.xxx.rjwSextype sexType = 0) {
|
||||
|
||||
//aggressors first
|
||||
participants = participants.OrderByDescending(p => p.jobs.curDriver is rjw.JobDriver_SexBaseInitiator).ToList();
|
||||
|
@ -84,6 +84,13 @@ namespace Rimworld_Animations {
|
|||
return true;
|
||||
});
|
||||
|
||||
List<AnimationDef> optionsWithSexType = options.ToList().FindAll(x => x.sexTypes.Contains(sexType));
|
||||
|
||||
if (optionsWithSexType.Any()) {
|
||||
Log.Message("Selecting animation for rjwSexType " + sexType.ToStringSafe() + "...");
|
||||
return optionsWithSexType.RandomElement();
|
||||
}
|
||||
|
||||
if (options != null && options.Any()) {
|
||||
Log.Message("Randomly selecting animation...");
|
||||
return options.RandomElement();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue