mirror of
https://gitgud.io/AbstractConcept/rimworld-animation-studio.git
synced 2024-08-15 00:43:27 +00:00
Race customization and data saving
This commit is contained in:
parent
2f3f807911
commit
d3b676df06
456 changed files with 6388 additions and 419 deletions
|
@ -1,4 +1,5 @@
|
|||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Xml.Serialization;
|
||||
using UnityEngine;
|
||||
|
||||
|
@ -26,33 +27,78 @@ namespace RimWorldAnimationStudio
|
|||
|
||||
public static class Tags
|
||||
{
|
||||
public static List<string> defNames = new List<string>() { "Human" };
|
||||
public static List<string> bodyParts = new List<string>() { "Penis", "Vagina", "Anus", "Breasts", "Mouth" };
|
||||
public static List<string> bodyDefTypes = new List<string>() { "Human", "Bird", "BeetleLike", "BeetleLikeWithClaw", "MechanicalCentipede", "MechanicalTermite", "Lancer", "Pikeman", "Monkey", "QuadrupedAnimalWithClawsTailAndJowl", "QuadrupedAnimalWithHooves", "QuadrupedAnimalWithHoovesAndHorn", "QuadrupedAnimalWithHoovesAndHump", "QuadrupedAnimalWithHoovesAndTusks", "QuadrupedAnimalWithHoovesTusksAndTrunk", "QuadrupedAnimalWithPaws", "QuadrupedAnimalWithPawsAndTail", "Scyther", "Snake", "TurtleLike" };
|
||||
public static List<string> sexTypes = new List<string>() { "None", "Vaginal", "Anal", "Oral", "Masturbation", "DoublePenetration", "Boobjob", "Handjob", "Footjob", "Fingering", "Scissoring", "MutualMasturbation", "Fisting", "MechImplant", "Rimming", "Fellatio", "Cunnilingus", "Sixtynine" };
|
||||
public static List<string> interactionDefTypes = new List<string>();
|
||||
public static List<string> soundDefs = new List<string>() { "None", "Sex", "Fuck", "Slimy", "Suck", "Cum" };
|
||||
public static List<string> actorLayers = new List<string>() { "Building", "BuildingOnTop", "MoteBelowThings", "Item", "ItemImportant", "LayingPawn", "PawnRope", "Projectile", "Pawn", "PawnUnused", "PawnState" };
|
||||
public static List<string> bodyTypes = new List<string>() { "Male", "Female", "Fat", "Hulk", "Thin" };
|
||||
}
|
||||
|
||||
public static class CustomTags
|
||||
{
|
||||
public static List<string> defNames = new List<string>();
|
||||
public static List<string> bodyParts = new List<string>();
|
||||
public static List<string> bodyDefTypes = new List<string>();
|
||||
public static List<string> sexTypes = new List<string>();
|
||||
public static List<string> interactionDefTypes = new List<string>();
|
||||
public static List<string> soundDefs = new List<string>();
|
||||
public static List<string> bodyTypes = new List<string>();
|
||||
}
|
||||
|
||||
[XmlRoot("CustomTagsHelper", IsNullable = false)]
|
||||
public class CustomTagsHelper
|
||||
{
|
||||
[XmlArray("defNames"), XmlArrayItem("li")] public List<string> defNames = new List<string>();
|
||||
[XmlArray("bodyParts"), XmlArrayItem("li")] public List<string> bodyParts = new List<string>();
|
||||
[XmlArray("bodyDefTypes"), XmlArrayItem("li")] public List<string> bodyDefTypes = new List<string>();
|
||||
[XmlArray("sexTypes"), XmlArrayItem("li")] public List<string> sexTypes = new List<string>();
|
||||
[XmlArray("interactionDefTypes"), XmlArrayItem("li")] public List<string> interactionDefTypes = new List<string>();
|
||||
[XmlArray("soundDefs"), XmlArrayItem("li")] public List<string> soundDefs = new List<string>();
|
||||
[XmlArray("bodyTypes"), XmlArrayItem("li")] public static List<string> bodyTypes = new List<string>();
|
||||
}
|
||||
|
||||
public static class AlienRaceDefs
|
||||
{
|
||||
public static List<AlienRaceDef> allDefs = new List<AlienRaceDef>();
|
||||
|
||||
public static AlienRaceDef GetNamed(string alienRaceDef)
|
||||
{
|
||||
return allDefs.FirstOrDefault(x => x.defName == alienRaceDef);
|
||||
}
|
||||
|
||||
public static void AddDef(AlienRaceDef alienRaceDef)
|
||||
{
|
||||
if (allDefs.Any(x => x.defName == alienRaceDef.defName)) return;
|
||||
|
||||
allDefs.Add(alienRaceDef);
|
||||
}
|
||||
|
||||
public static void OnLoad()
|
||||
{
|
||||
List<string> allTags = Tags.bodyTypes.Concat(CustomTags.bodyTypes).ToList();
|
||||
allTags.Add("None");
|
||||
|
||||
List<CardinalDirection> facings = new List<CardinalDirection>() { CardinalDirection.North, CardinalDirection.East, CardinalDirection.South };
|
||||
string path;
|
||||
|
||||
foreach (AlienRaceDef alienRaceDef in allDefs)
|
||||
{
|
||||
foreach (CardinalDirection facing in facings)
|
||||
{
|
||||
foreach (string bodyType in allTags)
|
||||
{
|
||||
path = alienRaceDef.GetBodyTypeGraphicPath(facing, bodyType);
|
||||
|
||||
if (path != null && path != "")
|
||||
{ alienRaceDef.SetBodyTypeGraphicPath(path, facing, bodyType); }
|
||||
}
|
||||
|
||||
path = alienRaceDef.GetHeadGraphicPath(facing);
|
||||
|
||||
if (path != null && path != "")
|
||||
{ alienRaceDef.SetHeadGraphicPath(path, facing); }
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -12,3 +12,10 @@ public enum ActorGender
|
|||
Male,
|
||||
}
|
||||
|
||||
public enum CardinalDirection
|
||||
{
|
||||
North,
|
||||
East,
|
||||
South,
|
||||
West,
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue