mirror of
https://gitgud.io/c0ffeeeeeeee/rimworld-animations.git
synced 2026-06-18 19:35:58 +00:00
47 lines
1.2 KiB
C#
47 lines
1.2 KiB
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using System.Threading.Tasks;
|
|
using Verse;
|
|
|
|
namespace Rimworld_Animations
|
|
{
|
|
public class AnimationPropDef : Def
|
|
{
|
|
|
|
//if this feature is good, maybe expand
|
|
//to having a list of Alternative props maybe?
|
|
public List<AlternateAnimationProp> alternateProps;
|
|
public PawnRenderNodeProperties animPropProperties;
|
|
|
|
public virtual PawnRenderNodeProperties GetPawnRenderNodeProperties(Pawn pawn)
|
|
{
|
|
if (!alternateProps.NullOrEmpty())
|
|
{
|
|
foreach (AlternateAnimationProp animProp in alternateProps)
|
|
{
|
|
//if there are special props you want to use for a specific race,
|
|
if (animProp.test.PawnTest(pawn))
|
|
{
|
|
//use it
|
|
return animProp.props;
|
|
}
|
|
|
|
}
|
|
}
|
|
|
|
//otherwise just stick with defaults
|
|
return animPropProperties;
|
|
}
|
|
|
|
|
|
}
|
|
|
|
public class AlternateAnimationProp
|
|
{
|
|
public BasePawnTest test;
|
|
public PawnRenderNodeProperties props;
|
|
|
|
}
|
|
}
|