Compare commits

...

6 commits

Author SHA1 Message Date
Ed86
70525e692e Merge branch 'master' into 'master'
Fix cup sizes not changing

See merge request Ed86/rjw-std!4
2024-09-26 06:52:35 +00:00
Nalzurin
68ecd27d66 Versioning 2024-09-21 23:23:53 +03:00
Nalzurin
1a84da3196 Fix cup size not changing 2024-09-21 22:58:00 +03:00
Ed86
aee380618c Merge branch 'master' into 'master'
Fix boobitis red error

See merge request Ed86/rjw-std!3
2024-09-21 08:49:34 +00:00
Nalzurin
9ac7872c46 Cleanup 2024-09-16 20:13:02 +03:00
Nalzurin
a5f280cd95 Fix boobitis red errors 2024-09-16 20:06:17 +03:00
5 changed files with 23 additions and 12 deletions

Binary file not shown.

View file

@ -31,8 +31,8 @@
<WarningLevel>4</WarningLevel> <WarningLevel>4</WarningLevel>
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>
<Reference Include="0Harmony, Version=2.3.3.0, Culture=neutral, processorArchitecture=MSIL"> <Reference Include="0Harmony">
<HintPath>..\packages\Lib.Harmony.2.3.3\lib\net472\0Harmony.dll</HintPath> <HintPath>..\..\..\..\..\..\..\workshop\content\294100\2009463077\Current\Assemblies\0Harmony.dll</HintPath>
<Private>False</Private> <Private>False</Private>
</Reference> </Reference>
<Reference Include="Assembly-CSharp"> <Reference Include="Assembly-CSharp">
@ -44,7 +44,7 @@
<Private>False</Private> <Private>False</Private>
</Reference> </Reference>
<Reference Include="RJW"> <Reference Include="RJW">
<HintPath>..\..\..\..\rjw\1.5\Assemblies\RJW.dll</HintPath> <HintPath>..\..\..\..\rjw-master\1.5\Assemblies\RJW.dll</HintPath>
<Private>False</Private> <Private>False</Private>
</Reference> </Reference>
<Reference Include="System" /> <Reference Include="System" />

View file

@ -3,6 +3,7 @@ using HarmonyLib;
using System; using System;
using rjw; using rjw;
using RimWorld; using RimWorld;
using rjw.Modules.Interactions.Helpers;
namespace rjwstd namespace rjwstd
{ {
@ -24,7 +25,7 @@ namespace rjwstd
{ {
foreach (Hediff hed in Parts) foreach (Hediff hed in Parts)
{ {
if (!(hed is Hediff_PartBaseNatural)) if (!(HediffHelper.IsNaturalSexPart(hed.def)))
continue; continue;
var boob = pawn.health.hediffSet.GetFirstHediffOfDef(boobitis.hediff_def).Severity; var boob = pawn.health.hediffSet.GetFirstHediffOfDef(boobitis.hediff_def).Severity;
@ -37,14 +38,23 @@ namespace rjwstd
var hedstage = hed.CurStageIndex; var hedstage = hed.CurStageIndex;
//GenderHelper.ChangeSex(pawn, () => //GenderHelper.ChangeSex(pawn, () =>
//{ //{
hed.Severity += boob * 0.01f; // ~0.7 beast grow
HediffComp_SexPart part = hed.TryGetComp<HediffComp_SexPart>();
part.UpdateSeverity(hed.Severity + boob * 0.01f); // ~0.7 beast grow
//}); //});
/*
* The cup size doesn't increase with the severity change, not sure if its RJW itself or something here. - Nalzurin
*/
if (hedstage < hed.CurStageIndex) if (hedstage < hed.CurStageIndex)
{ {
PartSizeExtension.TryGetCupSize(hed, out float size);
PartSizeCalculator.TryGetCupSize(hed, out float size);
var cupSize = (int)size; var cupSize = (int)size;
var cup = PartStagesDef.GetCupSizeLabel(cupSize); var cup = BraSizeConfigDef.GetCupSizeLabel(cupSize);
string message_title = boobitis.LabelCap; string message_title = boobitis.LabelCap;
string message_text = "RJW_BreastsHaveGrownFromBoobitis".Translate(xxx.get_pawnname(pawn), pawn.Possessive(), hed.def.label.ToLower(), cup, boobitis.LabelCap).CapitalizeFirst(); string message_text = "RJW_BreastsHaveGrownFromBoobitis".Translate(xxx.get_pawnname(pawn), pawn.Possessive(), hed.def.label.ToLower(), cup, boobitis.LabelCap).CapitalizeFirst();

View file

@ -41,14 +41,14 @@ namespace rjwstd
} }
public static bool PartsImmune(Pawn pawn, List<Hediff> list = null) public static bool PartsImmune(Pawn pawn, List<Hediff> list = null)
{ {
List<string> propslist; List<string> tagslist;
if (!list.NullOrEmpty()) if (!list.NullOrEmpty())
if (list.Any()) if (list.Any())
foreach (var y in list) foreach (var y in list)
{ {
PartProps.TryGetProps(y, out propslist); tagslist = ((HediffDef_SexPart)y.def).partTags;
if (!propslist.NullOrEmpty()) if (!tagslist.NullOrEmpty())
if (propslist.Contains("STDImmune")) if (tagslist.Contains("STDImmune"))
{ {
return true; return true;
} }

View file

@ -1,6 +1,7 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<ModMetaData> <ModMetaData>
<modVersion IgnoreIfNoMatchingField="True">1.0</modVersion>
<name>RimJobWorld - STD</name> <name>RimJobWorld - STD</name>
<author>Ed86</author> <author>Ed86</author>
<url>https://gitgud.io/Ed86/rjw-std</url> <url>https://gitgud.io/Ed86/rjw-std</url>