mirror of
https://gitgud.io/AbstractConcept/rimworld-animations-patch.git
synced 2024-08-15 00:43:27 +00:00
196 lines
8 KiB
C#
196 lines
8 KiB
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using Verse;
|
|
using RimWorld;
|
|
|
|
namespace Rimworld_Animations_Patch
|
|
{
|
|
public static class ApparelSettingsUtility
|
|
{
|
|
public static List<ThingDef> GetApparelOfInterest()
|
|
{
|
|
List<ThingDef> thingDefs = new List<ThingDef>();
|
|
|
|
foreach (ThingDef thingDef in DefDatabase<ThingDef>.AllDefs)
|
|
{
|
|
if (thingDef.IsApparel &&
|
|
(thingDef.apparel.bodyPartGroups.Contains(BodyPartGroupDefOf.Torso) ||
|
|
thingDef.apparel.bodyPartGroups.Contains(BodyPartGroupDefOf.Legs) ||
|
|
thingDef.apparel.bodyPartGroups.Contains(PatchBodyPartGroupDefOf.GenitalsBPG) ||
|
|
thingDef.apparel.bodyPartGroups.Contains(PatchBodyPartGroupDefOf.ChestBPG)))
|
|
{ thingDefs.Add(thingDef); }
|
|
}
|
|
|
|
return thingDefs;
|
|
}
|
|
|
|
// Resets all data
|
|
public static void ResetRimNudeData(List<RimNudeData> rimNudeData)
|
|
{
|
|
rimNudeData.Clear();
|
|
List<ThingDef> thingDefs = GetApparelOfInterest();
|
|
|
|
foreach (ThingDef thingDef in thingDefs)
|
|
{
|
|
for (int i = 0; i < 5; i++)
|
|
{ rimNudeData.Add(new RimNudeData(thingDef)); }
|
|
}
|
|
|
|
GetApparelDefaults(rimNudeData);
|
|
}
|
|
|
|
// Update apparel data
|
|
public static void UpdateRimNudeData(List<RimNudeData> rimNudeData, string thingDef, bool coversGroin, bool coversBelly, bool coversChest, bool sexWear)
|
|
{
|
|
for (int i = 0; i < rimNudeData.Count; i++)
|
|
{
|
|
RimNudeData apparelData = rimNudeData[i];
|
|
|
|
if (apparelData.thingDef == thingDef)
|
|
{
|
|
rimNudeData[i] = new RimNudeData(thingDef, coversGroin, coversBelly, coversChest, sexWear);
|
|
return;
|
|
}
|
|
}
|
|
}
|
|
|
|
public static void SetAllCoversGroin(List<RimNudeData> rimNudeData, bool value)
|
|
{
|
|
foreach (RimNudeData rimNudeApparel in rimNudeData)
|
|
{ rimNudeApparel.coversGroin = value; }
|
|
}
|
|
|
|
public static void SetAllCoversBelly(List<RimNudeData> rimNudeData, bool value)
|
|
{
|
|
foreach (RimNudeData rimNudeApparel in rimNudeData)
|
|
{ rimNudeApparel.coversBelly = value; }
|
|
}
|
|
|
|
public static void SetAllCoversChest(List<RimNudeData> rimNudeData, bool value)
|
|
{
|
|
foreach (RimNudeData rimNudeApparel in rimNudeData)
|
|
{ rimNudeApparel.coversChest = value; }
|
|
}
|
|
|
|
public static void SetAllSexWear(List<RimNudeData> rimNudeData, bool value)
|
|
{
|
|
foreach (RimNudeData rimNudeApparel in rimNudeData)
|
|
{ rimNudeApparel.sexWear = value; }
|
|
}
|
|
|
|
public static void GetApparelDefaults(List<RimNudeData> rimNudeData)
|
|
{
|
|
//Apparel_BasicShirt
|
|
UpdateRimNudeData(rimNudeData, "Apparel_BasicShirt", coversGroin: false, coversBelly: true, coversChest: true, sexWear: false);
|
|
|
|
//Apparel_CollarShirt
|
|
UpdateRimNudeData(rimNudeData, "Apparel_CollarShirt", coversGroin: false, coversBelly: true, coversChest: true, sexWear: false);
|
|
|
|
//Apparel_FlakVest
|
|
UpdateRimNudeData(rimNudeData, "Apparel_FlakVest", coversGroin: false, coversBelly: false, coversChest: false, sexWear: false);
|
|
|
|
//Apparel_Duster
|
|
UpdateRimNudeData(rimNudeData, "Apparel_Duster", coversGroin: false, coversBelly: false, coversChest: true, sexWear: false);
|
|
|
|
//Apparel_Jacket
|
|
UpdateRimNudeData(rimNudeData, "Apparel_Jacket", coversGroin: false, coversBelly: false, coversChest: true, sexWear: false);
|
|
|
|
//Apparel_TribalA
|
|
UpdateRimNudeData(rimNudeData, "Apparel_TribalA", coversGroin: true, coversBelly: true, coversChest: true, sexWear: false);
|
|
|
|
//Apparel_BodyStrap
|
|
UpdateRimNudeData(rimNudeData, "Apparel_BodyStrap", coversGroin: false, coversBelly: false, coversChest: false, sexWear: true);
|
|
|
|
//Apparel_PsyfocusRobe
|
|
UpdateRimNudeData(rimNudeData, "Apparel_PsyfocusRobe", coversGroin: false, coversBelly: false, coversChest: true, sexWear: false);
|
|
|
|
//Apparel_Cape
|
|
UpdateRimNudeData(rimNudeData, "Apparel_Cape", coversGroin: false, coversBelly: false, coversChest: false, sexWear: false);
|
|
|
|
//Apparel_RobeRoyal
|
|
UpdateRimNudeData(rimNudeData, "Apparel_RobeRoyal", coversGroin: false, coversBelly: false, coversChest: true, sexWear: false);
|
|
|
|
//Apparel_Corset
|
|
UpdateRimNudeData(rimNudeData, "Apparel_Corset", coversGroin: false, coversBelly: true, coversChest: true, sexWear: false);
|
|
|
|
//VAE_Apparel_Overalls
|
|
UpdateRimNudeData(rimNudeData, "VAE_Apparel_Overalls", coversGroin: true, coversBelly: true, coversChest: false, sexWear: false);
|
|
|
|
//VAE_Apparel_LabCoat
|
|
UpdateRimNudeData(rimNudeData, "VAE_Apparel_LabCoat", coversGroin: false, coversBelly: false, coversChest: true, sexWear: false);
|
|
|
|
//VAE_Apparel_BuildersJacket
|
|
UpdateRimNudeData(rimNudeData, "VAE_Apparel_BuildersJacket", coversGroin: false, coversBelly: false, coversChest: true, sexWear: false);
|
|
|
|
//VAE_Apparel_Apron
|
|
UpdateRimNudeData(rimNudeData, "VAE_Apparel_Apron", coversGroin: true, coversBelly: true, coversChest: false, sexWear: false);
|
|
|
|
//VAE_Apparel_Tunic
|
|
UpdateRimNudeData(rimNudeData, "VAE_Apparel_Tunic", coversGroin: false, coversBelly: true, coversChest: true, sexWear: false);
|
|
|
|
//VAE_Apparel_PeltCoat
|
|
UpdateRimNudeData(rimNudeData, "VAE_Apparel_PeltCoat", coversGroin: false, coversBelly: false, coversChest: true, sexWear: false);
|
|
|
|
//VAE_Apparel_WoodenArmor
|
|
UpdateRimNudeData(rimNudeData, "VAE_Apparel_WoodenArmor", coversGroin: false, coversBelly: true, coversChest: false, sexWear: false);
|
|
|
|
//VAE_Apparel_AdvancedVest
|
|
UpdateRimNudeData(rimNudeData, "VAE_Apparel_AdvancedVest", coversGroin: false, coversBelly: false, coversChest: false, sexWear: false);
|
|
|
|
//VAE_Apparel_BulletproofVest
|
|
UpdateRimNudeData(rimNudeData, "VAE_Apparel_BulletproofVest", coversGroin: false, coversBelly: true, coversChest: false, sexWear: false);
|
|
|
|
//VWE_Apparel_Exoframe
|
|
UpdateRimNudeData(rimNudeData, "VWE_Apparel_Exoframe", coversGroin: false, coversBelly: false, coversChest: false, sexWear: false);
|
|
|
|
//VFEM_Apparel_Tabard
|
|
UpdateRimNudeData(rimNudeData, "VFEM_Apparel_Tabard", coversGroin: true, coversBelly: true, coversChest: true, sexWear: false);
|
|
|
|
//VFEV_Apparel_JarlCape
|
|
UpdateRimNudeData(rimNudeData, "VFEV_Apparel_JarlCape", coversGroin: false, coversBelly: false, coversChest: true, sexWear: false);
|
|
|
|
//VFEV_Apparel_RoyalFurCoat
|
|
UpdateRimNudeData(rimNudeData, "VFEV_Apparel_RoyalFurCoat", coversGroin: false, coversBelly: false, coversChest: true, sexWear: false);
|
|
|
|
//PrisonerChains
|
|
UpdateRimNudeData(rimNudeData, "PrisonerChains", coversGroin: false, coversBelly: false, coversChest: false, sexWear: true);
|
|
|
|
//S16_ChainHarnessA
|
|
UpdateRimNudeData(rimNudeData, "S16_ChainHarnessA", coversGroin: false, coversBelly: false, coversChest: false, sexWear: true);
|
|
|
|
//S16_NippleWristCuffs
|
|
UpdateRimNudeData(rimNudeData, "S16_NippleWristCuffs", coversGroin: false, coversBelly: false, coversChest: false, sexWear: true);
|
|
|
|
//S16_ServantGirlDress
|
|
UpdateRimNudeData(rimNudeData, "S16_ServantGirlDress", coversGroin: true, coversBelly: true, coversChest: false, sexWear: true);
|
|
|
|
//S16_ZDress
|
|
UpdateRimNudeData(rimNudeData, "S16_ZDress", coversGroin: false, coversBelly: true, coversChest: true, sexWear: true);
|
|
|
|
//S16_MaidA
|
|
UpdateRimNudeData(rimNudeData, "S16_MaidA", coversGroin: false, coversBelly: true, coversChest: false, sexWear: true);
|
|
|
|
//S16_DiscoTop
|
|
UpdateRimNudeData(rimNudeData, "S16_DiscoTop", coversGroin: false, coversBelly: false, coversChest: true, sexWear: true);
|
|
|
|
//S16_TransparentSkirt
|
|
UpdateRimNudeData(rimNudeData, "S16_TransparentSkirt", coversGroin: false, coversBelly: false, coversChest: false, sexWear: true);
|
|
|
|
//S16_Vibrator
|
|
UpdateRimNudeData(rimNudeData, "S16_Vibrator", coversGroin: false, coversBelly: false, coversChest: false, sexWear: true);
|
|
|
|
//S16_VibratorDouble
|
|
UpdateRimNudeData(rimNudeData, "S16_VibratorDouble", coversGroin: false, coversBelly: false, coversChest: false, sexWear: true);
|
|
|
|
//S16_WiredVibrator
|
|
UpdateRimNudeData(rimNudeData, "S16_WiredVibrator", coversGroin: false, coversBelly: false, coversChest: false, sexWear: true);
|
|
|
|
//S16_DoubleWiredVibrator
|
|
UpdateRimNudeData(rimNudeData, "S16_DoubleWiredVibrator", coversGroin: false, coversBelly: false, coversChest: false, sexWear: true);
|
|
|
|
//S16_WiredAnalVibrator
|
|
UpdateRimNudeData(rimNudeData, "S16_WiredAnalVibrator", coversGroin: false, coversBelly: false, coversChest: false, sexWear: true);
|
|
}
|
|
}
|
|
}
|