110 lines
2.5 KiB
C#
110 lines
2.5 KiB
C#
using Verse;
|
|
using HarmonyLib;
|
|
using System;
|
|
using rjw;
|
|
|
|
namespace STD
|
|
{
|
|
///<summary>
|
|
///boobitis increase sex need
|
|
///</summary>
|
|
[HarmonyPatch(typeof(Need_Sex), "diseasefactor")]
|
|
[StaticConstructorOnStartup]
|
|
static class SexNeed_diseasefactorSTD_Boobitis
|
|
{
|
|
[HarmonyPostfix]
|
|
private static void diseasefactor_StdPatch(Pawn pawn, ref float __result)
|
|
{
|
|
try
|
|
{
|
|
if (pawn.health.hediffSet.HasHediff(std.boobitis.hediff_def))
|
|
{
|
|
__result *= 3f;
|
|
}
|
|
}
|
|
catch (Exception e)
|
|
{
|
|
Log.Error(e.ToString());
|
|
}
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// this is probably outdated, but keep it for now atleast
|
|
/// </summary>
|
|
[HarmonyPatch(typeof(std_updater), "update")]
|
|
[StaticConstructorOnStartup]
|
|
static class std_updater_Boobitis
|
|
{
|
|
[HarmonyPostfix]
|
|
private static void updateSTD(Pawn p)
|
|
{
|
|
try
|
|
{
|
|
//std_Boobitis.update(p);
|
|
}
|
|
catch (Exception e)
|
|
{
|
|
Log.Error(e.ToString());
|
|
}
|
|
}
|
|
}
|
|
|
|
public static class std_Boobitis
|
|
{
|
|
public static void update(Pawn pawn)
|
|
{
|
|
if (pawn.health.hediffSet.HasHediff(std.boobitis.hediff_def))
|
|
UpdateBoobitis(pawn);
|
|
}
|
|
|
|
public static void UpdateBoobitis(Pawn pawn)
|
|
{
|
|
//var partBPR = Genital_Helper.get_breastsBPR(pawn);
|
|
//var Parts = Genital_Helper.get_PartsHediffList(pawn, partBPR);
|
|
|
|
//if (!Parts.NullOrEmpty())
|
|
//{
|
|
// foreach (Hediff hed in Parts)
|
|
// {
|
|
// if (!(hed is Hediff_PartBaseNatural))
|
|
// continue;
|
|
|
|
// GenderHelper.ChangeSex(pawn, () =>
|
|
// {
|
|
// hed.Severity += 0.1f;
|
|
// });
|
|
// var message = "RJW_BreastsHaveGrownFromBoobitis".Translate(pawn);
|
|
// Messages.Message(message, pawn, MessageTypeDefOf.SilentInput);
|
|
// }
|
|
//}
|
|
|
|
//var hediff = std.get_infection(pawn, std.boobitis);
|
|
//if (hediff == null
|
|
// || !(hediff.Severity >= 0.20f)
|
|
// || hediff.FullyImmune()
|
|
// || !BreastSize_Helper.TryGetBreastSize(pawn, out var oldSize, out var oldBoobs)
|
|
// || oldSize >= BreastSize_Helper.MaxSize
|
|
// || !RollFor(hediff.Severity > 0.90f ? 5f : 15f))
|
|
//{
|
|
// return;
|
|
//}
|
|
//var chest = Genital_Helper.get_breastsBPR(pawn);
|
|
//var newSize = oldSize + 1;
|
|
//var newBoobs = BreastSize_Helper.GetHediffDef(newSize);
|
|
|
|
//GenderHelper.ChangeSex(pawn, () =>
|
|
//{
|
|
// if (oldBoobs != null)
|
|
// {
|
|
// pawn.health.RemoveHediff(oldBoobs);
|
|
// }
|
|
// pawn.health.AddHediff(newBoobs, chest);
|
|
//});
|
|
|
|
//var message = "RJW_BreastsHaveGrownFromBoobitis".Translate(pawn);
|
|
//Messages.Message(message, pawn, MessageTypeDefOf.SilentInput);
|
|
}
|
|
}
|
|
}
|