using System.Collections.Generic; using System.Linq; using System.Xml.Serialization; using UnityEngine; namespace RimWorldAnimationStudio { public static class Constants { public static string currentVersion = "0.0.0"; public static string projectHome = "https://gitgud.io/AbstractConcept/rimworld-animation-studio"; public static string projectWiki = "https://gitgud.io/AbstractConcept/rimworld-animation-studio/-/wikis/home"; public static float actionRepeatSpeed = 0.250f; public static int defaultAnimationClipLength = 600; public static int minTick = 1; public static int minAnimationClipLength = 5; public static int maxAnimationClipLength = 9999; public static Color ColorWhite = new Color(1f, 1f, 1f); public static Color ColorGreen = new Color(0f, 1f, 0f); public static Color ColorGoldYellow = new Color(1f, 0.85f, 0f); public static Color ColorDarkGold = new Color(0.75f, 0.64f, 0f); public static Color ColorLightGrey = new Color(0.9f, 0.9f, 0.9f); public static Color ColorMidGrey = new Color(0.75f, 0.75f, 0.75f); public static Color ColorGrey = new Color(0.5f, 0.5f, 0.5f); public static Color ColorDarkGrey = new Color(0.2f, 0.2f, 0.2f); public static Color ColorPink = new Color(1.0f, 0.5f, 0.5f); public static Color ColorOrange = new Color(1.0f, 0.7f, 0.0f); public static Color ColorRichOrange = new Color(1.0f, 0.4f, 0.1f); public static Color ColorCyan = new Color(0.0f, 1.0f, 1.0f); public static Color ColorPurple = new Color(0.85f, 0.0f, 1.0f); public static Color ColorGhost = new Color(0.5f, 0f, 0f, 0.5f); public static Color ColorRed = new Color(0.9f, 0f, 0f); } public static class Tags { public static List defNames = new List() { "Human", "Wolf_Timber", "Horse"}; public static List bodyParts = new List() { "Penis", "Vagina", "Anus", "Breasts", "Mouth" }; public static List bodyDefTypes = new List() { "Human", "Bird", "BeetleLike", "BeetleLikeWithClaw", "MechanicalCentipede", "MechanicalTermite", "Lancer", "Pikeman", "Monkey", "QuadrupedAnimalWithClawsTailAndJowl", "QuadrupedAnimalWithHooves", "QuadrupedAnimalWithHoovesAndHorn", "QuadrupedAnimalWithHoovesAndHump", "QuadrupedAnimalWithHoovesAndTusks", "QuadrupedAnimalWithHoovesTusksAndTrunk", "QuadrupedAnimalWithPaws", "QuadrupedAnimalWithPawsAndTail", "Scyther", "Snake", "TurtleLike" }; public static List sexTypes = new List() { "None", "Vaginal", "Anal", "Oral", "Masturbation", "DoublePenetration", "Boobjob", "Handjob", "Footjob", "Fingering", "Scissoring", "MutualMasturbation", "Fisting", "MechImplant", "Rimming", "Fellatio", "Cunnilingus", "Sixtynine" }; public static List interactionDefTypes = new List() { "Bestiality_Anal", "Bestiality_Double_Penetration_M", "Bestiality_Oral", "Bestiality_Vaginal", "Breeding_Lick", "Breeding_Fingering", "Breeding_OralS", "Bestiality_Reverse_Anal", "Bestiality_Reverse_Double_Penetration_M", "Bestiality_Reverse_Handjob", "Bestiality_Reverse_Oral", "Bestiality_Reverse_Oral_Service", "Bestiality_Reverse_Vaginal", "AnimalSexChat", "Masturbation_AutoBreastjob", "Masturbation_AutoFellatio", "Masturbation_Breastjob", "Masturbation_HandjobA", "Masturbation_HandjobP", "Masturbation_HandjobV", "rjw_interaction_template", "Necro_Anal", "Necro_DoublePenetration", "Necro_DoublePenetrationM", "Necro_Vaginal", "Necro_Reverse_Anal", "Necro_Reverse_DoublePenetration", "Necro_Reverse_DoublePenetrationM", "Necro_Reverse_Vaginal", "Rape_MechImplant", "Rape_Anal", "Rape_Beakjob", "Rape_Breastjob", "Rape_Cunnilingus", "Rape_DoublePenetration", "Rape_DoublePenetrationM", "Rape_Fellatio", "Rape_Fingering", "Rape_Fisting", "Rape_Footjob", "Rape_Handjob", "Rape_Oral", "Rape_Rimming", "Rape_Scissoring", "Rape_Vaginal", "Rape_Reverse_Anal", "Rape_Reverse_Beakjob", "Rape_Reverse_Breastjob", "Rape_Reverse_Cunnilingus", "Rape_Reverse_DoublePenetration", "Rape_Reverse_DoublePenetrationM", "Rape_Reverse_Fellatio", "Rape_Reverse_Fingering", "Rape_Reverse_Fisting", "Rape_Reverse_Footjob", "Rape_Reverse_Handjob", "Rape_Reverse_Rimming", "Rape_Reverse_Scissoring", "Rape_Reverse_Vaginal", "Sex_Reverse_Anal", "Sex_Reverse_Beakjob", "Sex_Reverse_Breastjob", "Sex_Reverse_Cunnilingus", "Sex_Reverse_DoublePenetration", "Sex_Reverse_DoublePenetrationM", "Sex_Reverse_Fellatio", "Sex_Reverse_Fingering", "Sex_Reverse_Fisting", "Sex_Reverse_Footjob", "Sex_Reverse_Handjob", "Sex_Reverse_Rimming", "Sex_Reverse_Vaginal", "Sex_Anal", "Sex_Beakjob", "Sex_Breastjob", "Sex_Cunnilingus", "Sex_DoublePenetration", "Sex_DoublePenetrationM", "Sex_Fellatio", "Sex_Fingering", "Sex_Fisting", "Sex_Footjob", "Sex_Handjob", "Sex_MutualMasturbation", "Sex_Rimming", "Sex_Scissoring", "Sex_Sixtynine", "Sex_Vaginal" }; public static List soundDefs = new List() { "None", "Sex", "Fuck", "Slimy", "Suck", "Cum" }; public static List actorLayers = new List() { "Building", "BuildingOnTop", "MoteBelowThings", "Item", "ItemImportant", "LayingPawn", "PawnRope", "Projectile", "Pawn", "PawnUnused", "PawnState" }; public static List bodyTypes = new List() { "Male", "Female", "Fat", "Hulk", "Thin" }; } public static class CustomTags { public static List defNames = new List(); public static List bodyParts = new List(); public static List bodyDefTypes = new List(); public static List sexTypes = new List(); public static List interactionDefTypes = new List(); public static List soundDefs = new List(); public static List bodyTypes = new List(); } [XmlRoot("CustomTagsHelper", IsNullable = false)] public class CustomTagsHelper { [XmlArray("defNames"), XmlArrayItem("li")] public List defNames = new List(); [XmlArray("bodyParts"), XmlArrayItem("li")] public List bodyParts = new List(); [XmlArray("bodyDefTypes"), XmlArrayItem("li")] public List bodyDefTypes = new List(); [XmlArray("sexTypes"), XmlArrayItem("li")] public List sexTypes = new List(); [XmlArray("interactionDefTypes"), XmlArrayItem("li")] public List interactionDefTypes = new List(); [XmlArray("soundDefs"), XmlArrayItem("li")] public List soundDefs = new List(); [XmlArray("bodyTypes"), XmlArrayItem("li")] public static List bodyTypes = new List(); } public static class AlienRaceDefs { public static List allDefs = new List(); 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 allTags = Tags.bodyTypes.Concat(CustomTags.bodyTypes).ToList(); allTags.Add("None"); List facings = new List() { 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); } } } } } }