using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using Verse; using RimWorld; using RJWSexperience; using RJW_Menstruation; using UnityEngine; namespace RJW_Menstruation.Sexperience { public class GatheredCumMixture : ThingWithComps { public Color cumColor = Color.white; public List ingredients = new List(); public override Color DrawColor => cumColor; public override void ExposeData() { base.ExposeData(); Scribe_Values.Look(ref cumColor, "cumColor", Color.white, true); Scribe_Collections.Look(ref ingredients, "ingredients"); } public override bool TryAbsorbStack(Thing other, bool respectStackLimit) { float amount = stackCount; float count = ThingUtility.TryAbsorbStackNumToTake(this, other, respectStackLimit); bool res = base.TryAbsorbStack(other, respectStackLimit); if (res && other is GatheredCumMixture) { GatheredCumMixture othercum = (GatheredCumMixture)other; cumColor = Colors.CMYKLerp(cumColor,othercum.cumColor,count/(amount+count)); if (!othercum.ingredients.NullOrEmpty()) for (int i=0; i