rimworld-animations/1.6/Source/Animations/AnimationProps/AnimationPropDef.cs
2025-09-06 12:52:24 -07:00

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;
}
}