2022-09-10 01:22:08 +00:00
|
|
|
|
using System;
|
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
using System.Linq;
|
2023-02-04 07:13:57 +00:00
|
|
|
|
using System.Globalization;
|
|
|
|
|
using System.IO;
|
|
|
|
|
using System.Xml;
|
|
|
|
|
using System.Xml.Serialization;
|
2022-09-10 01:22:08 +00:00
|
|
|
|
using Verse;
|
|
|
|
|
using Rimworld_Animations;
|
|
|
|
|
|
|
|
|
|
namespace Rimworld_Animations_Patch
|
|
|
|
|
{
|
|
|
|
|
public class HandAnimationDef : Def
|
|
|
|
|
{
|
2023-02-04 07:13:57 +00:00
|
|
|
|
public AnimationDef animationDef;
|
2022-09-10 01:22:08 +00:00
|
|
|
|
public List<HandAnimationData> handAnimationData = new List<HandAnimationData>();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public class HandAnimationData
|
|
|
|
|
{
|
|
|
|
|
public int stageID = 0;
|
|
|
|
|
public int actorID = 0;
|
|
|
|
|
public int touchingActorID = -1;
|
|
|
|
|
public string targetBodyPart;
|
|
|
|
|
public string bodySide = "";
|
|
|
|
|
public List<string> targetBodyParts = new List<string>();
|
|
|
|
|
public string motion;
|
|
|
|
|
public int cycleTime = 0;
|
|
|
|
|
public bool mirror = false;
|
2023-02-04 07:13:57 +00:00
|
|
|
|
|
|
|
|
|
private HandMotion _motion;
|
|
|
|
|
|
|
|
|
|
public HandMotion Motion
|
|
|
|
|
{
|
|
|
|
|
get
|
|
|
|
|
{
|
|
|
|
|
if (_motion == null)
|
|
|
|
|
{
|
|
|
|
|
if (Type.GetType(motion) == null)
|
|
|
|
|
{ DebugMode.Message("ERROR: Hand motion " + motion + " does not exist!"); return null; }
|
|
|
|
|
|
|
|
|
|
_motion = (HandMotion)Activator.CreateInstance(Type.GetType(motion));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return _motion;
|
|
|
|
|
}
|
|
|
|
|
}
|
2022-09-10 01:22:08 +00:00
|
|
|
|
}
|
|
|
|
|
}
|