2022-10-05 20:50:02 +00:00
|
|
|
|
using System;
|
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
using System.Linq;
|
|
|
|
|
using System.Text;
|
|
|
|
|
using System.Threading.Tasks;
|
|
|
|
|
using RimWorld;
|
|
|
|
|
using Verse;
|
|
|
|
|
|
|
|
|
|
namespace Rimworld_Animations {
|
|
|
|
|
public abstract class BaseAnimationClip
|
|
|
|
|
{
|
|
|
|
|
public Dictionary<int, string> SoundEffects = new Dictionary<int, string>();
|
|
|
|
|
public List<ThingDef> types; //types of participants
|
|
|
|
|
public int duration;
|
2023-04-16 02:54:41 +00:00
|
|
|
|
/** <returns>failure - if 'true', this clip should not be used</returns> */
|
|
|
|
|
public abstract bool BuildSimpleCurves(bool isGenitalAngleMandatory = false);
|
2022-10-05 20:50:02 +00:00
|
|
|
|
public string soundDef = null; //for playing sounds
|
|
|
|
|
public int actor;
|
|
|
|
|
public List<string> tags = new List<string>();
|
2023-04-16 02:54:41 +00:00
|
|
|
|
|
|
|
|
|
protected bool EmitMandatoryCurveEmptyError(SimpleCurve curve, string name) {
|
|
|
|
|
if (curve.PointsCount <= 0) {
|
|
|
|
|
Log.Error($"Mandatory curve '{name}' is empty in an animation clip!");
|
|
|
|
|
return true;
|
|
|
|
|
}
|
|
|
|
|
return false;
|
|
|
|
|
}
|
2022-10-05 20:50:02 +00:00
|
|
|
|
}
|
|
|
|
|
}
|