diff --git a/1.3/Assemblies/STD.dll b/1.3/Assemblies/STD.dll index ea07a56..269d622 100644 Binary files a/1.3/Assemblies/STD.dll and b/1.3/Assemblies/STD.dll differ diff --git a/1.3/Defs/STDDefs/STDs.xml b/1.3/Defs/STDDefs/STDs.xml index c5f0923..4c83d2e 100644 --- a/1.3/Defs/STDDefs/STDs.xml +++ b/1.3/Defs/STDDefs/STDs.xml @@ -1,7 +1,7 @@ - + HIV HIV consists of two parts: an acute and a chronic infection. Both parts follow the same course, reducing the infected pawn's blood filtration as their severity increases. The acute phase progresses rapidly but can be fought by the pawn's immune system, whereas the chronic phase progresses very slowly but can never be cured. Treatment can modestly slow the progress of the disease. @@ -10,9 +10,9 @@ 0.05 0.005 0.80 - + - + Herpes Herpes is an incurable but nonfatal disease. Affected pawns experience pain and itchiness in the affected body parts. Treatment is effective at reducing the intensity of the symptoms. @@ -23,9 +23,9 @@
  • Genitals
  • -
    + - + Warts Genital warts are unsightly and cause an itching/burning sensation. They are easily treated and never fatal. @@ -35,9 +35,9 @@
  • Genitals
  • -
    + - + Syphilis Syphilis is a serious disease that affects the mind. If left untreated, it leads to corrupted thoughts, mood problems, potential permanent damage to the brain, liver, and kidneys, and, ultimately, death. The good news is that it is easily defeated by proper treatment. @@ -45,9 +45,9 @@ 0.08 0.03 0.01 - + - + Boobitis Boobitis is a highly contagious mechanite plague that causes permanent breast growth if left untreated. It was initialy created as a harmless glittertech "party drug" but has since mutated and spread to virtually every human colony. @@ -59,5 +59,5 @@
  • Chest
  • -
    +
    \ No newline at end of file diff --git a/1.3/Defs/ThoughtDefs/Thoughts_STD.xml b/1.3/Defs/ThoughtDefs/Thoughts_STD.xml index fb7fd6a..709b7d9 100644 --- a/1.3/Defs/ThoughtDefs/Thoughts_STD.xml +++ b/1.3/Defs/ThoughtDefs/Thoughts_STD.xml @@ -3,7 +3,7 @@ ItchyCrotch - rjw_std.ThoughtWorker_ItchyCrotch + STD.ThoughtWorker_ItchyCrotch
  • @@ -20,7 +20,7 @@ SyphiliticThoughts - rjw_std.ThoughtWorker_SyphiliticThoughts + STD.ThoughtWorker_SyphiliticThoughts
  • @@ -37,7 +37,7 @@ WastingAway - rjw_std.ThoughtWorker_WastingAway + STD.ThoughtWorker_WastingAway
  • diff --git a/1.3/Source/STD/STD.csproj b/1.3/Source/STD/STD.csproj index cb65ae1..092443f 100644 --- a/1.3/Source/STD/STD.csproj +++ b/1.3/Source/STD/STD.csproj @@ -60,19 +60,23 @@ - - + + + + + - + + - + - + - - - + + + diff --git a/1.3/Source/STD/STDs/Boobitis/harmony_Boobitis.cs b/1.3/Source/STD/STDs/Boobitis/harmony_Boobitis.cs new file mode 100644 index 0000000..e829822 --- /dev/null +++ b/1.3/Source/STD/STDs/Boobitis/harmony_Boobitis.cs @@ -0,0 +1,53 @@ +using Verse; +using HarmonyLib; +using System; +using rjw; + +namespace STD +{ + /// + ///boobitis increase sex need/make pawn horny + /// + [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.boobitis.hediff_def)) + { + __result *= 3f; + } + } + catch (Exception e) + { + Log.Error(e.ToString()); + } + } + } + + /// + /// boobitis increase breast size + /// this is probably outdated, but keep it for now atleast + /// + [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()); + } + } + } +} diff --git a/1.3/Source/STD/STDs/std_Boobitis.cs b/1.3/Source/STD/STDs/Boobitis/std_Boobitis.cs similarity index 63% rename from 1.3/Source/STD/STDs/std_Boobitis.cs rename to 1.3/Source/STD/STDs/Boobitis/std_Boobitis.cs index 381e827..ac76046 100644 --- a/1.3/Source/STD/STDs/std_Boobitis.cs +++ b/1.3/Source/STD/STDs/Boobitis/std_Boobitis.cs @@ -5,56 +5,12 @@ using rjw; namespace STD { - /// - ///boobitis increase sex need - /// - [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()); - } - } - } - - /// - /// this is probably outdated, but keep it for now atleast - /// - [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 std_def boobitis = DefDatabase.GetNamed("Boobitis"); public static void update(Pawn pawn) { - if (pawn.health.hediffSet.HasHediff(std.boobitis.hediff_def)) + if (pawn.health.hediffSet.HasHediff(boobitis.hediff_def)) UpdateBoobitis(pawn); } diff --git a/1.3/Source/STD/Hediffs/Hediff_ID.cs b/1.3/Source/STD/STDs/HIV/Hediff_ID.cs similarity index 67% rename from 1.3/Source/STD/Hediffs/Hediff_ID.cs rename to 1.3/Source/STD/STDs/HIV/Hediff_ID.cs index 4184bcf..2cfaeb6 100644 --- a/1.3/Source/STD/Hediffs/Hediff_ID.cs +++ b/1.3/Source/STD/STDs/HIV/Hediff_ID.cs @@ -11,7 +11,7 @@ namespace STD { get { - if (!(pawn.health.hediffSet.HasHediff(std.ahiv.hediff_def) || pawn.health.hediffSet.HasHediff(std.chiv.hediff_def))) + if (!(pawn.health.hediffSet.HasHediff(std_Immunodeficiency.hiv.hediff_def))) return base.LabelBase; else return "AIDS"; diff --git a/1.3/Source/STD/Thoughts/ThoughtWorker_WastingAway.cs b/1.3/Source/STD/STDs/HIV/ThoughtWorker_WastingAway.cs similarity index 100% rename from 1.3/Source/STD/Thoughts/ThoughtWorker_WastingAway.cs rename to 1.3/Source/STD/STDs/HIV/ThoughtWorker_WastingAway.cs diff --git a/1.3/Source/STD/STDs/HIV/harmony_Immunodeficiency.cs b/1.3/Source/STD/STDs/HIV/harmony_Immunodeficiency.cs new file mode 100644 index 0000000..65af548 --- /dev/null +++ b/1.3/Source/STD/STDs/HIV/harmony_Immunodeficiency.cs @@ -0,0 +1,26 @@ +using Verse; +using HarmonyLib; +using System; +using rjw; +using RimWorld; + +namespace STD +{ + [HarmonyPatch(typeof(std_updater), "update")] + [StaticConstructorOnStartup] + static class std_updater_Immunodeficiency + { + [HarmonyPostfix] + private static void updateSTD(Pawn p) + { + try + { + std_Immunodeficiency.update(p); + } + catch (Exception e) + { + Log.Error(e.ToString()); + } + } + } +} diff --git a/1.3/Source/STD/STDs/std_Immunodeficiency.cs b/1.3/Source/STD/STDs/HIV/std_Immunodeficiency.cs similarity index 93% rename from 1.3/Source/STD/STDs/std_Immunodeficiency.cs rename to 1.3/Source/STD/STDs/HIV/std_Immunodeficiency.cs index 9521b13..dfca7ff 100644 --- a/1.3/Source/STD/STDs/std_Immunodeficiency.cs +++ b/1.3/Source/STD/STDs/HIV/std_Immunodeficiency.cs @@ -9,26 +9,9 @@ namespace STD /// /// add some infections /// - [HarmonyPatch(typeof(std_updater), "update")] - [StaticConstructorOnStartup] - static class std_updater_Immunodeficiency - { - [HarmonyPostfix] - private static void updateSTD(Pawn p) - { - try - { - std_Immunodeficiency.update(p); - } - catch (Exception e) - { - Log.Error(e.ToString()); - } - } - } - public static class std_Immunodeficiency { + public static std_def hiv = DefDatabase.GetNamed("HIV"); //vanilla rimworld public static readonly HediffDef immunodeficiency = DefDatabase.GetNamed("Immunodeficiency"); public static bool is_wasting_away(Pawn p) diff --git a/1.3/Source/STD/Thoughts/ThoughtWorker_ItchyCrotch.cs b/1.3/Source/STD/STDs/Rash/ThoughtWorker_ItchyCrotch.cs similarity index 100% rename from 1.3/Source/STD/Thoughts/ThoughtWorker_ItchyCrotch.cs rename to 1.3/Source/STD/STDs/Rash/ThoughtWorker_ItchyCrotch.cs diff --git a/1.3/Source/STD/STDs/Rash/harmony_Rash.cs b/1.3/Source/STD/STDs/Rash/harmony_Rash.cs new file mode 100644 index 0000000..43575ef --- /dev/null +++ b/1.3/Source/STD/STDs/Rash/harmony_Rash.cs @@ -0,0 +1,26 @@ +using Verse; +using HarmonyLib; +using rjw; +using System; +using RimWorld; + +namespace STD +{ + [HarmonyPatch(typeof(AfterSexUtility), "think_about_sex", new Type[] {typeof(Pawn), typeof(Pawn), typeof(bool), typeof(SexProps), typeof(bool)})] + [StaticConstructorOnStartup] + static class Aftersex_STDThoughtApply + { + [HarmonyPrefix] + private static void ThinkAboutDiseasesStdPatch(Pawn pawn, Pawn partner, bool isReceiving, SexProps props, bool whoring = false) + { + try + { + std_Rash.ThinkAboutDiseases(pawn, partner); + } + catch (Exception e) + { + Log.Error(e.ToString()); + } + } + } +} diff --git a/1.3/Source/STD/STDs/std_Rash.cs b/1.3/Source/STD/STDs/Rash/std_Rash.cs similarity index 69% rename from 1.3/Source/STD/STDs/std_Rash.cs rename to 1.3/Source/STD/STDs/Rash/std_Rash.cs index 3054d5d..d818dc0 100644 --- a/1.3/Source/STD/STDs/std_Rash.cs +++ b/1.3/Source/STD/STDs/Rash/std_Rash.cs @@ -6,49 +6,38 @@ using RimWorld; namespace STD { - /// - ///add aftersex thoughts about herpes, warts - /// - [HarmonyPatch(typeof(AfterSexUtility), "ThinkAboutDiseases")] - [StaticConstructorOnStartup] - static class Aftersex_STDThoughtApply - { - [HarmonyPrefix] - private static void ThinkAboutDiseasesStdPatch(Pawn pawn, Pawn partner) - { - try - { - std_Rash.ThinkAboutDiseases(pawn, partner); - } - catch (Exception e) - { - Log.Error(e.ToString()); - } - } - } - public static class std_Rash { + public static std_def herpes = DefDatabase.GetNamed("Herpes"); + public static std_def warts = DefDatabase.GetNamed("Warts"); + public static readonly ThoughtDef saw_rash_1 = DefDatabase.GetNamed("SawDiseasedPrivates1"); public static readonly ThoughtDef saw_rash_2 = DefDatabase.GetNamed("SawDiseasedPrivates2"); public static readonly ThoughtDef saw_rash_3 = DefDatabase.GetNamed("SawDiseasedPrivates3"); - // Returns how severely affected this pawn's crotch is by rashes and warts, on a scale from 0 to 3. + /// + /// Returns how severely affected this pawn's crotch is by rashes and warts, on a scale from 0 to 3. + /// + /// + /// public static int genital_rash_severity(Pawn p) { int tr = 0; - Hediff her = p.health.hediffSet.GetFirstHediffOfDef(std.herpes.hediff_def); + Hediff her = p.health.hediffSet.GetFirstHediffOfDef(std_Rash.herpes.hediff_def); if (her != null && her.Severity >= 0.25f) ++tr; - Hediff war = p.health.hediffSet.GetFirstHediffOfDef(std.warts.hediff_def); + Hediff war = p.health.hediffSet.GetFirstHediffOfDef(std_Rash.warts.hediff_def); if (war != null) tr += war.Severity < 0.40f ? 1 : 2; return tr; } + /// + ///add aftersex thoughts about herpes, warts + /// public static void ThinkAboutDiseases(Pawn pawn, Pawn partner) { if (pawn == null) diff --git a/1.3/Source/STD/Thoughts/ThoughtWorker_SyphiliticThoughts.cs b/1.3/Source/STD/STDs/Syphilis/ThoughtWorker_SyphiliticThoughts.cs similarity index 82% rename from 1.3/Source/STD/Thoughts/ThoughtWorker_SyphiliticThoughts.cs rename to 1.3/Source/STD/STDs/Syphilis/ThoughtWorker_SyphiliticThoughts.cs index 72eeba0..34e7fe0 100644 --- a/1.3/Source/STD/Thoughts/ThoughtWorker_SyphiliticThoughts.cs +++ b/1.3/Source/STD/STDs/Syphilis/ThoughtWorker_SyphiliticThoughts.cs @@ -7,7 +7,7 @@ namespace STD { protected override ThoughtState CurrentStateInternal(Pawn p) { - var syp = p.health.hediffSet.GetFirstHediffOfDef(std.syphilis.hediff_def); + var syp = p.health.hediffSet.GetFirstHediffOfDef(std_Syphilis.syphilis.hediff_def); if (syp != null) { if (syp.Severity >= 0.80f) diff --git a/1.3/Source/STD/STDs/Syphilis/harmony_Syphilis.cs b/1.3/Source/STD/STDs/Syphilis/harmony_Syphilis.cs new file mode 100644 index 0000000..43eddb1 --- /dev/null +++ b/1.3/Source/STD/STDs/Syphilis/harmony_Syphilis.cs @@ -0,0 +1,26 @@ +using Verse; +using HarmonyLib; +using System; +using rjw; +using RimWorld; + +namespace STD +{ + [HarmonyPatch(typeof(std_updater), "update")] + [StaticConstructorOnStartup] + static class std_updater_Syphilis + { + [HarmonyPostfix] + private static void updateSTD(Pawn p) + { + try + { + std_Syphilis.update(p); + } + catch (Exception e) + { + Log.Error(e.ToString()); + } + } + } +} diff --git a/1.3/Source/STD/STDs/std_Syphilis.cs b/1.3/Source/STD/STDs/Syphilis/std_Syphilis.cs similarity index 82% rename from 1.3/Source/STD/STDs/std_Syphilis.cs rename to 1.3/Source/STD/STDs/Syphilis/std_Syphilis.cs index c67b6af..9998d60 100644 --- a/1.3/Source/STD/STDs/std_Syphilis.cs +++ b/1.3/Source/STD/STDs/Syphilis/std_Syphilis.cs @@ -9,36 +9,19 @@ namespace STD /// /// do damage to pawn health /// - [HarmonyPatch(typeof(std_updater), "update")] - [StaticConstructorOnStartup] - static class std_updater_Syphilis - { - [HarmonyPostfix] - private static void updateSTD(Pawn p) - { - try - { - std_Syphilis.update(p); - } - catch (Exception e) - { - Log.Error(e.ToString()); - } - } - } - public static class std_Syphilis { + public static std_def syphilis = DefDatabase.GetNamed("Syphilis"); public static void update(Pawn pawn) { - if (pawn.health.hediffSet.HasHediff(std.syphilis.hediff_def)) + if (pawn.health.hediffSet.HasHediff(syphilis.hediff_def)) roll_for_syphilis_damage(pawn); } //[SyncMethod] public static void roll_for_syphilis_damage(Pawn p) { - Hediff syp = p.health.hediffSet.GetFirstHediffOfDef(std.syphilis.hediff_def); + Hediff syp = p.health.hediffSet.GetFirstHediffOfDef(syphilis.hediff_def); if (syp == null || !(syp.Severity >= 0.60f) || syp.FullyImmune()) return; // A 30% chance per day of getting any permanent damage works out to ~891 in 1 million for each roll @@ -89,9 +72,9 @@ namespace STD inj.Severity = sev; inj.TryGetComp().IsPermanent = true; p.health.AddHediff(inj, part, null); - string message_title = std.syphilis.label + " Damage"; + string message_title = syphilis.label + " Damage"; string baby_pronoun = p.gender == Gender.Male ? "his" : "her"; - string message_text = "RJW_Syphilis_Damage_Message".Translate(xxx.get_pawnname(p), baby_pronoun, part.def.label, std.syphilis.label).CapitalizeFirst(); + string message_text = "RJW_Syphilis_Damage_Message".Translate(xxx.get_pawnname(p), baby_pronoun, part.def.label, syphilis.label).CapitalizeFirst(); Find.LetterStack.ReceiveLetter(message_title, message_text, LetterDefOf.ThreatSmall, p); } } diff --git a/1.3/Source/STD/std.cs b/1.3/Source/STD/std.cs index 33aec02..16ebf7d 100644 --- a/1.3/Source/STD/std.cs +++ b/1.3/Source/STD/std.cs @@ -10,14 +10,7 @@ namespace STD /// public static class std { - //STDs - public static std_def ahiv = DefDatabase.GetNamed("AcuteHIV"); - public static std_def chiv = DefDatabase.GetNamed("ChronicHIV"); - public static std_def herpes = DefDatabase.GetNamed("Herpes"); - public static std_def warts = DefDatabase.GetNamed("Warts"); - public static std_def syphilis = DefDatabase.GetNamed("Syphilis"); - public static std_def boobitis = DefDatabase.GetNamed("Boobitis"); - + //all STDs public static List all => DefDatabase.AllDefsListForReading; public static Hediff get_infection(Pawn p, std_def sd)