diff --git a/About/Manifest.xml b/About/Manifest.xml index 3efa644..fd88c01 100644 --- a/About/Manifest.xml +++ b/About/Manifest.xml @@ -1,7 +1,7 @@ RJW Menstruation - 1.0.1.6 + 1.0.1.8 diff --git a/Assemblies/RJW_Menstruation.dll b/Assemblies/RJW_Menstruation.dll index 1dc4cd5..90f8c98 100644 Binary files a/Assemblies/RJW_Menstruation.dll and b/Assemblies/RJW_Menstruation.dll differ diff --git a/Defs/JobDefs/Jobs_CleanSelf.xml b/Defs/JobDefs/Jobs_CleanSelf.xml index cbd6794..fbfaad1 100644 --- a/Defs/JobDefs/Jobs_CleanSelf.xml +++ b/Defs/JobDefs/Jobs_CleanSelf.xml @@ -4,7 +4,7 @@ VaginaWashing RJW_Menstruation.JobDriver_VaginaWashing - wasing vagina + washing vagina true \ No newline at end of file diff --git a/Languages/ChineseSimplified/DefInjected/ApparelLayerDef/RJWMenstruation.xml b/Languages/ChineseSimplified/DefInjected/ApparelLayerDef/RJWMenstruation.xml new file mode 100644 index 0000000..bd0c960 --- /dev/null +++ b/Languages/ChineseSimplified/DefInjected/ApparelLayerDef/RJWMenstruation.xml @@ -0,0 +1,4 @@ + + + 生殖器 + \ No newline at end of file diff --git a/Languages/ChineseSimplified/DefInjected/HediffDef/RJWMenstruation.xml b/Languages/ChineseSimplified/DefInjected/HediffDef/RJWMenstruation.xml new file mode 100644 index 0000000..a880d69 --- /dev/null +++ b/Languages/ChineseSimplified/DefInjected/HediffDef/RJWMenstruation.xml @@ -0,0 +1,22 @@ + + + + 中枢性疼痛 + 经期中 + 不快 + 恼人 + 疼痛 + 痛苦 + 更年期 + 到了更年期 + 初期 + 中期 + 后期 + 更年期 + 更年期 + 不孕 + + + + + \ No newline at end of file diff --git a/Languages/ChineseSimplified/DefInjected/JobDef/RJWMenstruation.xml b/Languages/ChineseSimplified/DefInjected/JobDef/RJWMenstruation.xml new file mode 100644 index 0000000..6d73d1d --- /dev/null +++ b/Languages/ChineseSimplified/DefInjected/JobDef/RJWMenstruation.xml @@ -0,0 +1,7 @@ + + + 清洗阴道 + + + + \ No newline at end of file diff --git a/Languages/ChineseSimplified/DefInjected/StatDef/RJWMenstruation.xml b/Languages/ChineseSimplified/DefInjected/StatDef/RJWMenstruation.xml new file mode 100644 index 0000000..6c2c93a --- /dev/null +++ b/Languages/ChineseSimplified/DefInjected/StatDef/RJWMenstruation.xml @@ -0,0 +1,7 @@ + + + 可吸收量 + 最大可吸收的液体量 + + + \ No newline at end of file diff --git a/Languages/ChineseSimplified/DefInjected/ThingDef/RJWMenstruation.xml b/Languages/ChineseSimplified/DefInjected/ThingDef/RJWMenstruation.xml new file mode 100644 index 0000000..75ebeeb --- /dev/null +++ b/Languages/ChineseSimplified/DefInjected/ThingDef/RJWMenstruation.xml @@ -0,0 +1,31 @@ + + + + +卫生棉条 + +从阴道吸收液体的卫生棉条 + +湿的卫生棉条 + +使用过的湿卫生棉条 + +卫生棉 + +从阴道吸收液体的卫生棉 + +湿的卫生棉 + +使用过的湿卫生棉 + +卵巢再生药物 + +使卵巢再生以增加可排卵的卵子 卵子消耗量越大,效果越差 不能缓解更年期症状 + +排卵药 + +诱导排卵的药物 可导致更年期提前 + +混合物 + + \ No newline at end of file diff --git a/Languages/ChineseSimplified/DefInjected/ThoughtDef/RJWMenstruation.xml b/Languages/ChineseSimplified/DefInjected/ThoughtDef/RJWMenstruation.xml new file mode 100644 index 0000000..48c020b --- /dev/null +++ b/Languages/ChineseSimplified/DefInjected/ThoughtDef/RJWMenstruation.xml @@ -0,0 +1,23 @@ + + + 裤湿啦 + 真让人困恼... + 被{0}中出了 + 我担心我可能会怀孕... + 被{0}中出了 + 虽然几率很低,但我还是担心怀孕... + 被{0}中出了 + 我想我怀孕了 + 被{0}中出了 + 我爱做爱 + 中出了{0} + 超爽的 + 被{0}中出了 + 那龟孙子上了我,我不想怀上他的孩子... + 被{0}中出了 + 那龟孙子上了我.... + 中出了{0} + 我上了一个婊子 + 不想要的怀孕 + 我该怎麽办?... + \ No newline at end of file diff --git a/Languages/ChineseSimplified/Keyed/RJW_Menstruation.xml b/Languages/ChineseSimplified/Keyed/RJW_Menstruation.xml new file mode 100644 index 0000000..466ae28 --- /dev/null +++ b/Languages/ChineseSimplified/Keyed/RJW_Menstruation.xml @@ -0,0 +1,66 @@ + + + RJW Menstruation Cycle + + 月经血 + 清空 + 卵泡期 + 排卵 + 黄体期 + 月经来潮 + 已受精 + 怀孕 + 从出生中恢复 + + 更年期 + 状态 + 胎儿 + 父亲 + 阴道精液列表 + 已受精 + 受精中 + 排卵 + + + + 激活子宫图标 + 激活子宫图标框 + 激活动物经期 + 仿真动物的经期. 此选项将在保存读取后生效 不推荐开启此选项 + 植入机会 + 设置受精卵的植入机会 + 受精的机会 + 设置每小时受精的机会 + 每小时阴道中的精液量衰减率 + 阴道中的精液量将以这个比率减少 + 每小时生育率衰减率 + 精液列表的生育率将以这个比率减少 + 循环加速 + 加快月经周期 + 调试 + 显示调试信息 + 子宫状态 + 在状态窗口中绘制子宫图标 + 阴道状态 + 在状态窗口中绘制阴道和肛门图标 + 胎儿信息级别 + 显示有关胎儿的所有信息 + 显示妊娠後胎儿的所有信息 + 不显示有关胎儿的信息,但显示怀孕後胎儿的图象 + 不显示胎儿图象和信息 + 激活更年期 + 激活更年期效果,使小人随着时间的推移而变得不育 如果您较长寿的外星人种族有碰到任何问题,请关闭此选项. 此选项将在保存读取后生效 + 多重怀孕 + 使用多重怀孕代替RJW的默认怀孕 + 激活异卵双胞胎 + 激活复数个卵子可以个别受精 + 激活双胞胎 + 允许单个卵子生成多个后代 + 双胞胎出现率 + 设置双胞胎的出现率 + 最大双胞胎数量 + 设置最大双胞胎数量 + + 清洗阴道 + + \ No newline at end of file diff --git a/Languages/ChineseTraditional/DefInjected/ApparelLayerDef/RJWMenstruation.xml b/Languages/ChineseTraditional/DefInjected/ApparelLayerDef/RJWMenstruation.xml new file mode 100644 index 0000000..a90d863 --- /dev/null +++ b/Languages/ChineseTraditional/DefInjected/ApparelLayerDef/RJWMenstruation.xml @@ -0,0 +1,4 @@ + + + 生殖器 + \ No newline at end of file diff --git a/Languages/ChineseTraditional/DefInjected/HediffDef/RJWMenstruation.xml b/Languages/ChineseTraditional/DefInjected/HediffDef/RJWMenstruation.xml new file mode 100644 index 0000000..07e22bd --- /dev/null +++ b/Languages/ChineseTraditional/DefInjected/HediffDef/RJWMenstruation.xml @@ -0,0 +1,22 @@ + + + + 中樞性疼痛 + 經期中 + 不快 + 惱人 + 疼痛 + 痛苦 + 更年期 + 到了更年期 + 初期 + 中期 + 後期 + 更年期 + 更年期 + 不孕 + + + + + \ No newline at end of file diff --git a/Languages/ChineseTraditional/DefInjected/JobDef/RJWMenstruation.xml b/Languages/ChineseTraditional/DefInjected/JobDef/RJWMenstruation.xml new file mode 100644 index 0000000..fc04f3d --- /dev/null +++ b/Languages/ChineseTraditional/DefInjected/JobDef/RJWMenstruation.xml @@ -0,0 +1,7 @@ + + + 清洗陰道 + + + + \ No newline at end of file diff --git a/Languages/ChineseTraditional/DefInjected/StatDef/RJWMenstruation.xml b/Languages/ChineseTraditional/DefInjected/StatDef/RJWMenstruation.xml new file mode 100644 index 0000000..d485637 --- /dev/null +++ b/Languages/ChineseTraditional/DefInjected/StatDef/RJWMenstruation.xml @@ -0,0 +1,7 @@ + + + 可吸收量 + 最大可吸收的液體量 + + + \ No newline at end of file diff --git a/Languages/ChineseTraditional/DefInjected/ThingDef/RJWMenstruation.xml b/Languages/ChineseTraditional/DefInjected/ThingDef/RJWMenstruation.xml new file mode 100644 index 0000000..9404fb7 --- /dev/null +++ b/Languages/ChineseTraditional/DefInjected/ThingDef/RJWMenstruation.xml @@ -0,0 +1,31 @@ + + + + +衛生棉條 + +從陰道吸收液體的衛生棉條 + +濕的衛生棉條 + +使用過的濕衛生棉條 + +衛生棉 + +從陰道吸收液體的衛生棉 + +濕的衛生棉 + +使用過的濕衛生棉 + +卵巢再生藥物 + +使卵巢再生以增加可排卵的卵子 卵子消耗量越大,效果越差 不能緩解更年期症狀 + +排卵藥 + +誘導排卵的藥物 可導致更年期提前 + +混合物 + + \ No newline at end of file diff --git a/Languages/ChineseTraditional/DefInjected/ThoughtDef/RJWMenstruation.xml b/Languages/ChineseTraditional/DefInjected/ThoughtDef/RJWMenstruation.xml new file mode 100644 index 0000000..f83a56a --- /dev/null +++ b/Languages/ChineseTraditional/DefInjected/ThoughtDef/RJWMenstruation.xml @@ -0,0 +1,23 @@ + + + 褲濕啦 + 真讓人困惱... + 被{0}中出了 + 我擔心我可能會懷孕... + 被{0}中出了 + 雖然機率很低,但我還是擔心懷孕... + 被{0}中出了 + 我想我懷孕了 + 被{0}中出了 + 我愛做愛 + 中出了{0} + 超爽的 + 被{0}中出了 + 那龜孫子上了我,我不想懷上他的孩子... + 被{0}中出了 + 那龜孫子上了我.... + 中出了{0} + 我上了一個婊子 + 不想要的懷孕 + 我該怎麼辦?... + \ No newline at end of file diff --git a/Languages/ChineseTraditional/Keyed/RJW_Menstruation.xml b/Languages/ChineseTraditional/Keyed/RJW_Menstruation.xml new file mode 100644 index 0000000..eb4314f --- /dev/null +++ b/Languages/ChineseTraditional/Keyed/RJW_Menstruation.xml @@ -0,0 +1,66 @@ + + + RJW Menstruation Cycle + + 月經血 + 清空 + 卵泡期 + 排卵 + 黃體期 + 月經來潮 + 已受精 + 懷孕 + 從出生中恢復 + + 更年期 + 狀態 + 胎兒 + 父親 + 陰道精液列表 + 已受精 + 受精中 + 排卵 + + + + 啟用子宮圖標 + 啟用子宮圖標框 + 啟用動物經期 + 模擬動物的經期. 此選項將在保存讀取後生效 不推薦開啟此選項 + 植入機會 + 設置受精卵的植入機會 + 受精的機會 + 設置每小時受精的機會 + 每小時陰道中的精液量衰減率 + 陰道中的精液量將以這個比率減少 + 每小時生育率衰減率 + 精液列表的生育率將以這個比率減少 + 循環加速 + 加快月經週期 + 除錯 + 顯示除錯資訊 + 子宮狀態 + 在狀態窗口中繪製子宮圖標 + 陰道狀態 + 在狀態窗口中繪製陰道和肛門圖標 + 胎兒信息級別 + 顯示有關胎兒的所有信息 + 顯示妊娠後胎兒的所有信息 + 不顯示有關胎兒的信息,但顯示懷孕後胎兒的圖像 + 不顯示胎兒圖像和信息 + 啟用更年期 + 啟用更年期效果,使小人隨著時間的推移而變得不育 如果您較長壽的外星人種族有碰到任何問題,請關閉此選項. 此選項將在保存讀取後生效 + 多重懷孕 + 使用多重懷孕代替RJW的默認懷孕 + 啟用異卵雙胞胎 + 啟用複數個卵子可以個別受精 + 啟用雙胞胎 + 允許單個卵子產生多個後代 + 雙胞胎出現率 + 設置雙胞胎的出現率 + 最大雙胞胎數量 + 設置最大雙胞胎數量 + + 清洗陰道 + + \ No newline at end of file diff --git a/Languages/English/Keyed/RJW_Menstruation.xml b/Languages/English/Keyed/RJW_Menstruation.xml index 6eaec1e..7d32748 100644 --- a/Languages/English/Keyed/RJW_Menstruation.xml +++ b/Languages/English/Keyed/RJW_Menstruation.xml @@ -60,6 +60,8 @@ set chance of twins max enzygotic twins set max number of twins + enable egg overlay + enable egg overlay on womb icon Vaginal washing diff --git a/Languages/Korean/Keyed/RJW_Menstruation.xml b/Languages/Korean/Keyed/RJW_Menstruation.xml index 0ffe4c9..a6aeb64 100644 --- a/Languages/Korean/Keyed/RJW_Menstruation.xml +++ b/Languages/Korean/Keyed/RJW_Menstruation.xml @@ -60,6 +60,8 @@ 일란성 쌍둥이가 발생할 확률을 설정합니다. 최대 일란성 쌍둥이 수 일란성 쌍둥이의 수를 제한합니다. + 난자 오버레이 + 자궁그림 위에 난자그림를 표시합니다. 질세척 diff --git a/Textures/Eggs/Egg.png b/Textures/Eggs/Egg.png new file mode 100644 index 0000000..8c10e1e Binary files /dev/null and b/Textures/Eggs/Egg.png differ diff --git a/Textures/Eggs/Egg.psd b/Textures/Eggs/Egg.psd new file mode 100644 index 0000000..b39fffb Binary files /dev/null and b/Textures/Eggs/Egg.psd differ diff --git a/Textures/Eggs/Egg_Fertilized00.png b/Textures/Eggs/Egg_Fertilized00.png new file mode 100644 index 0000000..f613a47 Binary files /dev/null and b/Textures/Eggs/Egg_Fertilized00.png differ diff --git a/Textures/Eggs/Egg_Fertilized01.png b/Textures/Eggs/Egg_Fertilized01.png new file mode 100644 index 0000000..4d8a6fd Binary files /dev/null and b/Textures/Eggs/Egg_Fertilized01.png differ diff --git a/Textures/Eggs/Egg_Fertilized02.png b/Textures/Eggs/Egg_Fertilized02.png new file mode 100644 index 0000000..cee7dc5 Binary files /dev/null and b/Textures/Eggs/Egg_Fertilized02.png differ diff --git a/Textures/Eggs/Egg_Fertilizing00.png b/Textures/Eggs/Egg_Fertilizing00.png new file mode 100644 index 0000000..7aa6375 Binary files /dev/null and b/Textures/Eggs/Egg_Fertilizing00.png differ diff --git a/Textures/Eggs/Egg_Fertilizing01.png b/Textures/Eggs/Egg_Fertilizing01.png new file mode 100644 index 0000000..9920103 Binary files /dev/null and b/Textures/Eggs/Egg_Fertilizing01.png differ diff --git a/Textures/Eggs/Egg_Fertilizing02.png b/Textures/Eggs/Egg_Fertilizing02.png new file mode 100644 index 0000000..2b7eecc Binary files /dev/null and b/Textures/Eggs/Egg_Fertilizing02.png differ diff --git a/Textures/Eggs/Egg_Implanted00.png b/Textures/Eggs/Egg_Implanted00.png new file mode 100644 index 0000000..0fe1934 Binary files /dev/null and b/Textures/Eggs/Egg_Implanted00.png differ diff --git a/Textures/Eggs/Eggs.zip b/Textures/Eggs/Eggs.zip new file mode 100644 index 0000000..cf5ac78 Binary files /dev/null and b/Textures/Eggs/Eggs.zip differ diff --git a/changelogs.txt b/changelogs.txt index 06217ec..21aa9aa 100644 --- a/changelogs.txt +++ b/changelogs.txt @@ -1,3 +1,13 @@ +Version 1.0.1.8 + - fixed problems with animal status window + - fixed RMB menu crash + - added egg overlay + - default implantation chance changed to 65% + - now fertilized eggs are implanted after 7 days later +Version 1.0.1.7 + - added chinese translations + - major bug fixes + - minor bug fixes Version 1.0.1.6 - fixed bugs when display fetus image - fixed futa female was not set as parent diff --git a/source/RJW_Menstruation/RJW_Menstruation/Configurations.cs b/source/RJW_Menstruation/RJW_Menstruation/Configurations.cs index b3a41c4..a86d2e1 100644 --- a/source/RJW_Menstruation/RJW_Menstruation/Configurations.cs +++ b/source/RJW_Menstruation/RJW_Menstruation/Configurations.cs @@ -10,12 +10,12 @@ namespace RJW_Menstruation { public class Configurations : ModSettings { - public const float ImplantationChanceDefault = 0.25f; - public const int ImplantationChanceAdjustDefault = 25; + public const float ImplantationChanceDefault = 0.65f; + public const int ImplantationChanceAdjustDefault = 65; public const float FertilizeChanceDefault = 0.05f; public const int FertilizeChanceAdjustDefault = 50; - public const float CumDecayRatioDefault = 0.05f; - public const int CumDecayRatioAdjustDefault = 50; + public const float CumDecayRatioDefault = 0.15f; + public const int CumDecayRatioAdjustDefault = 150; public const float CumFertilityDecayRatioDefault = 0.2f; public const int CumFertilityDecayRatioAdjustDefault = 200; public const int CycleAccelerationDefault = 6; @@ -36,6 +36,7 @@ namespace RJW_Menstruation public static bool EnableAnimalCycle = false; public static bool DrawWombStatus = true; public static bool DrawVaginaStatus = true; + public static bool DrawEggOverlay = true; public static bool Debug = false; public static bool EnableMenopause = true; public static DetailLevel InfoDetail = DetailLevel.All; @@ -94,6 +95,7 @@ namespace RJW_Menstruation Scribe_Values.Look(ref EnableAnimalCycle, "EnableAnimalCycle", EnableAnimalCycle, true); Scribe_Values.Look(ref DrawWombStatus, "DrawWombStatus", DrawWombStatus, true); Scribe_Values.Look(ref DrawVaginaStatus, "DrawVaginaStatus", DrawVaginaStatus, true); + Scribe_Values.Look(ref DrawEggOverlay, "DrawEggOvray", DrawEggOverlay, true); Scribe_Values.Look(ref Debug, "Debug", Debug, true); Scribe_Values.Look(ref InfoDetail, "InfoDetail", InfoDetail, true); Scribe_Values.Look(ref EnableMenopause, "EnableMenopause", EnableMenopause, true); @@ -143,8 +145,12 @@ namespace RJW_Menstruation listmain.CheckboxLabeled(Translations.Option1_Label, ref Configurations.EnableWombIcon, Translations.Option1_Desc); if (Configurations.EnableWombIcon) { - Listing_Standard wombsection = listmain.BeginSection_NewTemp(111); + Listing_Standard wombsection = listmain.BeginSection_NewTemp(131); wombsection.CheckboxLabeled(Translations.Option9_Label, ref Configurations.DrawWombStatus, Translations.Option9_Desc); + if (Configurations.DrawWombStatus) + { + wombsection.CheckboxLabeled(Translations.Option18_Label, ref Configurations.DrawEggOverlay, Translations.Option18_Desc); + } wombsection.CheckboxLabeled(Translations.Option10_Label, ref Configurations.DrawVaginaStatus, Translations.Option10_Desc); if (wombsection.ButtonText(Translations.Option11_Label + ": " + Configurations.LevelString(Configurations.InfoDetail))) { diff --git a/source/RJW_Menstruation/RJW_Menstruation/Cum.cs b/source/RJW_Menstruation/RJW_Menstruation/Cum.cs index 1e4c196..43f6a9b 100644 --- a/source/RJW_Menstruation/RJW_Menstruation/Cum.cs +++ b/source/RJW_Menstruation/RJW_Menstruation/Cum.cs @@ -42,7 +42,14 @@ namespace RJW_Menstruation { if (DNAcache == null) { - DNAcache = pawn.def.GetModExtension(); + try + { + DNAcache = pawn.def.GetModExtension(); + } + catch (NullReferenceException) + { + DNAcache = ThingDefOf.Human.GetModExtension(); + } if (DNAcache == null) { DNAcache = ThingDefOf.Human.GetModExtension(); @@ -89,9 +96,6 @@ namespace RJW_Menstruation this.pawn = pawn; volume = 1.0f; fertvolume = 1.0f; - decayresist = 0; - - } public Cum(Pawn pawn, float volume, string notcumlabel, float decayresist = 0, ThingDef filthDef = null) diff --git a/source/RJW_Menstruation/RJW_Menstruation/Dialog_WombStatus.cs b/source/RJW_Menstruation/RJW_Menstruation/Dialog_WombStatus.cs index 5509517..a5e59da 100644 --- a/source/RJW_Menstruation/RJW_Menstruation/Dialog_WombStatus.cs +++ b/source/RJW_Menstruation/RJW_Menstruation/Dialog_WombStatus.cs @@ -23,7 +23,6 @@ namespace RJW_Menstruation private const float genitalRectWidth = 102; private const float genitalRectHeight = 140; - private Texture2D womb; private Texture2D cum; private Texture2D vagina; @@ -36,7 +35,7 @@ namespace RJW_Menstruation private GUIStyle boxstyle = new GUIStyle(GUI.skin.textArea); private GUIStyle buttonstyle = new GUIStyle(GUI.skin.button); - + public override Vector2 InitialSize @@ -97,8 +96,9 @@ namespace RJW_Menstruation boxstyle.border.left = 4; boxstyle.border.right = 4; boxstyle.border.bottom = 4; boxstyle.border.top = 4; float preginfoheight = 0f; + bool pregnant = pawn.IsPregnant(); Hediff hediff = PregnancyHelper.GetPregnancy(pawn); - if (pawn.IsPregnant() && Utility.ShowFetusImage((Hediff_BasePregnancy)hediff)) + if (pregnant && Utility.ShowFetusImage((Hediff_BasePregnancy)hediff)) { womb = Utility.GetPregnancyIcon(comp, hediff); if (hediff is Hediff_MultiplePregnancy) @@ -165,7 +165,7 @@ namespace RJW_Menstruation Rect pawnLabel2Rect = new Rect(0, pawnRectHeight + fontheight - 10, pawnRectWidth, fontheight - 10); fontstylecenter.normal.textColor = pawn.DrawColor; GUI.Label(pawnLabelRect, pawn.Name.ToStringFull, fontstylecenter); - GUI.Label(pawnLabel2Rect, pawn.story.Title, fontstylecenter); + if (pawn.story != null)GUI.Label(pawnLabel2Rect, pawn.story.Title, fontstylecenter); GUI.color = Color.white; float wombrecth = 0; @@ -175,6 +175,14 @@ namespace RJW_Menstruation cumcolor = comp.GetCumMixtureColor; Rect wombRect = new Rect(0f, mainRect.yMax - wombRectHeight + preginfoheight, wombRectWidth, wombRectWidth*0.9f); DrawWomb(wombRect); + + + if (Configurations.DrawEggOverlay) + { + comp.DrawEggOverlay(wombRect); + } + + } Rect wombInfoRect = new Rect(0f, mainRect.yMax - wombrecth - fontheight - 2, wombRectWidth, fontheight); @@ -197,7 +205,7 @@ namespace RJW_Menstruation //Widgets.Label(wombInfoRect,Translations.Dialog_WombInfo01 + ": " + comp.GetCurStageLabel); - if (Configurations.DrawVaginaStatus) + if (Configurations.DrawVaginaStatus && !pawn.IsAnimal()) { Rect genitalRect = new Rect(24, pawnRectHeight + 2 * fontheight, genitalRectWidth, genitalRectHeight + fontheight * 2); DrawVagina(genitalRect); @@ -249,8 +257,12 @@ namespace RJW_Menstruation GUI.DrawTexture(rect, womb, ScaleMode.ScaleToFit, true, 0, Color.white, 0, 0); GUI.DrawTexture(rect, cum, ScaleMode.ScaleToFit, true, 0, cumcolor, 0, 0); GUI.color = Color.white; + + } + + private void DrawVagina(Rect rect) { Rect genitalIconRect = new Rect(rect.x, rect.y + fontheight, genitalRectWidth, genitalRectHeight); diff --git a/source/RJW_Menstruation/RJW_Menstruation/Gizmo_Womb.cs b/source/RJW_Menstruation/RJW_Menstruation/Gizmo_Womb.cs index e91f20f..da77b4b 100644 --- a/source/RJW_Menstruation/RJW_Menstruation/Gizmo_Womb.cs +++ b/source/RJW_Menstruation/RJW_Menstruation/Gizmo_Womb.cs @@ -14,6 +14,7 @@ namespace RJW_Menstruation { public Texture2D icon_overay; public Color cumcolor; + public HediffComp_Menstruation comp; protected override void DrawIcon(Rect rect, Material buttonMat = null) { @@ -36,6 +37,8 @@ namespace RJW_Menstruation GUI.color = color; Widgets.DrawTextureFitted(rect, overay, iconDrawScale * 0.85f, iconProportions, iconTexCoords, iconAngle, buttonMat); GUI.color = Color.white; + if (Configurations.DrawEggOverlay) comp.DrawEggOverlay(rect); + } diff --git a/source/RJW_Menstruation/RJW_Menstruation/HediffComp_Menstruation.cs b/source/RJW_Menstruation/RJW_Menstruation/HediffComp_Menstruation.cs index dbcd3f9..cf569d7 100644 --- a/source/RJW_Menstruation/RJW_Menstruation/HediffComp_Menstruation.cs +++ b/source/RJW_Menstruation/RJW_Menstruation/HediffComp_Menstruation.cs @@ -289,7 +289,7 @@ namespace RJW_Menstruation } } - public bool GetEggFertilizing + public bool IsEggFertilizing { get { @@ -305,18 +305,22 @@ namespace RJW_Menstruation else return false; } } - public bool GetFertilization + + /// + /// returns fertstage. if not fertilized returns -1 + /// + public int IsFertilized { get { if (!eggs.NullOrEmpty()) foreach(Egg egg in eggs) { - if (egg.fertilized) return true; + if (egg.fertilized) return egg.fertstage; } - return false; + return -1; } } - public bool GetEgg + public bool IsEggExist { get { @@ -655,7 +659,7 @@ namespace RJW_Menstruation public void BeforeCumOut(out Absorber absorber) { - absorber = (Absorber)parent.pawn.apparel?.WornApparel?.Find(x => x.def.apparel.tags.Contains("Absorber")); + absorber = (Absorber)parent.pawn.apparel?.WornApparel?.Find(x => x is Absorber); if (absorber != null) { absorber.WearEffect(); @@ -706,7 +710,7 @@ namespace RJW_Menstruation cum.fertvolume *= Math.Max(0, (1 - (Configurations.CumDecayRatio * (1 - cum.decayresist)) * leakfactor) * (1 - (Configurations.CumFertilityDecayRatio * (1 - cum.decayresist)))); vd -= cum.volume; totalleak += AbsorbCum(cum, vd, absorber); - string tmp = "FilthLabelWithSource".Translate(cum.FilthDef.label, cum.pawn.LabelShort, 1.ToString()); + string tmp = "FilthLabelWithSource".Translate(cum.FilthDef.label, cum.pawn?.LabelShort ?? "Unknown", 1.ToString()); filthlabels.Add(tmp.Replace(" x1","")); if (cum.fertvolume < 0.01f) cum.fertvolume = 0; if (cum.volume < 0.01f) removecums.Add(cum); @@ -746,7 +750,7 @@ namespace RJW_Menstruation cum.volume *= Math.Max(0, 1 - (portion * (1 - cum.decayresist)) * leakfactor); cum.fertvolume *= Math.Max(0, (1 - (portion * (1 - cum.decayresist)) * leakfactor) * (1 - (Configurations.CumFertilityDecayRatio * (1 - cum.decayresist)))); //MakeCumFilth(cum, vd - cum.volume); - string tmp = "FilthLabelWithSource".Translate(cum.FilthDef.label, cum.pawn.LabelShort, 1.ToString()); + string tmp = "FilthLabelWithSource".Translate(cum.FilthDef.label, cum.pawn?.LabelShort ?? "Unknown", 1.ToString()); filthlabels.Add(tmp.Replace(" x1", "")); totalleak += vd - cum.volume; if (cum.fertvolume < 0.01f) cum.fertvolume = 0; @@ -785,7 +789,7 @@ namespace RJW_Menstruation cum.volume *= 1 - (portion); cum.fertvolume *= (1 - (portion)) * (1 - (Configurations.CumFertilityDecayRatio)); //MakeCumFilth(cum, vd - cum.volume); - string tmp = "FilthLabelWithSource".Translate(cum.FilthDef.label, cum.pawn.LabelShort, 1.ToString()); + string tmp = "FilthLabelWithSource".Translate(cum.FilthDef.label, cum.pawn?.LabelShort ?? "Unknown", 1.ToString()); filthlabels.Add(tmp.Replace(" x1", "")); totalleak += vd - cum.volume; if (cum.fertvolume < 0.01f) cum.fertvolume = 0; @@ -821,6 +825,7 @@ namespace RJW_Menstruation if (!egg.fertilized) egg.fertilizer = Fertilize(); if (egg.fertilizer != null) { egg.fertilized = true; + egg.lifespanhrs += 240; onefertilized = true; } } @@ -918,7 +923,7 @@ namespace RJW_Menstruation foreach (Cum cum in cums) { float rand = Rand.Range(0.0f, 1.0f); - if (!cum.notcum && rand < cum.fertvolume * cum.fertFactor * Configurations.FertilizeChance * Props.basefertilizationChanceFactor) + if (cum.pawn != null && !cum.notcum && rand < cum.fertvolume * cum.fertFactor * Configurations.FertilizeChance * Props.basefertilizationChanceFactor) { if (!RJWPregnancySettings.bestial_pregnancy_enabled && (xxx.is_animal(parent.pawn) ^ xxx.is_animal(cum.pawn))) continue; return cum.pawn; @@ -936,7 +941,7 @@ namespace RJW_Menstruation bool pregnant = false; foreach(Egg egg in eggs) { - if (egg.position < 24 || !egg.fertilized) continue; + if (!egg.fertilized || egg.fertstage < 168) continue; else if (Rand.Range(0.0f, 1.0f) <= Configurations.ImplantationChance * Props.baseImplantationChanceFactor * ImplantFactor * InterspeciesImplantFactor(egg.fertilizer)) { if (!parent.pawn.IsPregnant()) @@ -1013,7 +1018,7 @@ namespace RJW_Menstruation /// private void MakeCumFilth(Cum cum, float amount) { - if (amount >= minmakefilthvalue) FilthMaker.TryMakeFilth(parent.pawn.Position, parent.pawn.Map, cum.FilthDef, cum.pawn.LabelShort); + if (amount >= minmakefilthvalue) FilthMaker.TryMakeFilth(parent.pawn.Position, parent.pawn.Map, cum.FilthDef, cum.pawn?.LabelShort ?? "Unknown"); } /// @@ -1076,6 +1081,7 @@ namespace RJW_Menstruation egg.lifespanhrs -= Configurations.CycleAcceleration; egg.position += Configurations.CycleAcceleration; if (egg.lifespanhrs < 0) deadeggs.Add(egg); + if (egg.fertilized) egg.fertstage += Configurations.CycleAcceleration; } if (!deadeggs.NullOrEmpty()) @@ -1463,6 +1469,7 @@ namespace RJW_Menstruation public int lifespanhrs; public Pawn fertilizer; public int position; + public int fertstage = 0; public Egg() { @@ -1486,6 +1493,7 @@ namespace RJW_Menstruation Scribe_Values.Look(ref fertilized, "fertilized", fertilized, true); Scribe_Values.Look(ref lifespanhrs, "lifespanhrs", lifespanhrs, true); Scribe_Values.Look(ref position, "position", position, true); + Scribe_Values.Look(ref fertstage, "fertstage", fertstage, true); } } diff --git a/source/RJW_Menstruation/RJW_Menstruation/Patch/GetGizmos.cs b/source/RJW_Menstruation/RJW_Menstruation/Patch/GetGizmos.cs index f4fb544..e257123 100644 --- a/source/RJW_Menstruation/RJW_Menstruation/Patch/GetGizmos.cs +++ b/source/RJW_Menstruation/RJW_Menstruation/Patch/GetGizmos.cs @@ -99,6 +99,7 @@ namespace RJW_Menstruation icon = icon, icon_overay = icon_overay, cumcolor = c, + comp = comp, order = 100, action = delegate { diff --git a/source/RJW_Menstruation/RJW_Menstruation/Patch/Pawn_Patch.cs b/source/RJW_Menstruation/RJW_Menstruation/Patch/Pawn_Patch.cs index f4ca1af..419da37 100644 --- a/source/RJW_Menstruation/RJW_Menstruation/Patch/Pawn_Patch.cs +++ b/source/RJW_Menstruation/RJW_Menstruation/Patch/Pawn_Patch.cs @@ -37,7 +37,7 @@ namespace RJW_Menstruation foreach (LocalTargetInfo t in selftargets) { - opts.AddDistinct(MakeSelfMenu(pawn, t)); + if (Utility.HasMenstruationComp(pawn)) opts.AddDistinct(MakeSelfMenu(pawn, t)); break; } @@ -48,15 +48,10 @@ namespace RJW_Menstruation public static FloatMenuOption MakeSelfMenu(Pawn pawn, LocalTargetInfo target) { - FloatMenuOption option = null; - if (Utility.HasMenstruationComp(pawn)) - { - option = FloatMenuUtility.DecoratePrioritizedTask(new FloatMenuOption(Translations.FloatMenu_CleanSelf, delegate () + FloatMenuOption option = FloatMenuUtility.DecoratePrioritizedTask(new FloatMenuOption(Translations.FloatMenu_CleanSelf, delegate () { pawn.jobs.TryTakeOrderedJob_NewTemp(new Verse.AI.Job(VariousDefOf.VaginaWashing, null, null, target.Cell)); }, MenuOptionPriority.Low), pawn, target); - } - return option; } @@ -65,7 +60,20 @@ namespace RJW_Menstruation } - + //[HarmonyPatch(typeof(JobGiver_OptimizeApparel), "ApparelScoreGain_NewTmp")] + //public class OptimizeApparel_Patch + //{ + // public static bool Prefix(ref float __result, Pawn pawn, Apparel ap, List wornScoresCache) + // { + // if (ap is Absorber) + // { + // __result = -1000f; + // return false; + // } + // return true; + // } + // + //} diff --git a/source/RJW_Menstruation/RJW_Menstruation/Things.cs b/source/RJW_Menstruation/RJW_Menstruation/Things.cs index d77671a..cfe8c1d 100644 --- a/source/RJW_Menstruation/RJW_Menstruation/Things.cs +++ b/source/RJW_Menstruation/RJW_Menstruation/Things.cs @@ -16,6 +16,7 @@ namespace RJW_Menstruation public ColorInt cumColor; public Color CumColor => cumColor.ToColor; public float cumThickness = 0f; + } diff --git a/source/RJW_Menstruation/RJW_Menstruation/Translations.cs b/source/RJW_Menstruation/RJW_Menstruation/Translations.cs index 616c63a..5380e03 100644 --- a/source/RJW_Menstruation/RJW_Menstruation/Translations.cs +++ b/source/RJW_Menstruation/RJW_Menstruation/Translations.cs @@ -66,6 +66,8 @@ namespace RJW_Menstruation public static readonly string Option16_Desc = "Option16_Desc".Translate(); public static readonly string Option17_Label = "Option17_Label".Translate(); public static readonly string Option17_Desc = "Option17_Desc".Translate(); + public static readonly string Option18_Label = "Option18_Label".Translate(); + public static readonly string Option18_Desc = "Option18_Desc".Translate(); public static readonly string FloatMenu_CleanSelf = "FloatMenu_CleanSelf".Translate(); diff --git a/source/RJW_Menstruation/RJW_Menstruation/Utility.cs b/source/RJW_Menstruation/RJW_Menstruation/Utility.cs index ba87d5c..352aa89 100644 --- a/source/RJW_Menstruation/RJW_Menstruation/Utility.cs +++ b/source/RJW_Menstruation/RJW_Menstruation/Utility.cs @@ -46,15 +46,25 @@ namespace RJW_Menstruation public static class Utility { + + public static float GetCumVolume(this Pawn pawn) { - CompHediffBodyPart part = Genital_Helper.get_PartsHediffList(pawn, Genital_Helper.get_genitalsBPR(pawn))?.FindAll((Hediff hed) => hed.def.defName.ToLower().Contains("penis")).InRandomOrder().FirstOrDefault().TryGetComp(); - if (part == null) part = Genital_Helper.get_PartsHediffList(pawn, Genital_Helper.get_genitalsBPR(pawn))?.FindAll((Hediff hed) => hed.def.defName.ToLower().Contains("ovipositorf")).InRandomOrder().FirstOrDefault().TryGetComp(); - if (part == null) part = Genital_Helper.get_PartsHediffList(pawn, Genital_Helper.get_genitalsBPR(pawn))?.FindAll((Hediff hed) => hed.def.defName.ToLower().Contains("ovipositorm")).InRandomOrder().FirstOrDefault().TryGetComp(); - if (part == null) part = Genital_Helper.get_PartsHediffList(pawn, Genital_Helper.get_genitalsBPR(pawn))?.FindAll((Hediff hed) => hed.def.defName.ToLower().Contains("tentacle")).InRandomOrder().FirstOrDefault().TryGetComp(); - - float res = part?.FluidAmmount * part.FluidModifier * pawn.BodySize * Rand.Range(0.8f, 1.2f) * RJWSettings.cum_on_body_amount_adjust * 0.3f ?? 0.0f; + CompHediffBodyPart part = Genital_Helper.get_PartsHediffList(pawn, Genital_Helper.get_genitalsBPR(pawn))?.FindAll((Hediff hed) => hed.def.defName.ToLower().Contains("penis")).InRandomOrder().FirstOrDefault()?.TryGetComp(); + if (part == null) part = Genital_Helper.get_PartsHediffList(pawn, Genital_Helper.get_genitalsBPR(pawn))?.FindAll((Hediff hed) => hed.def.defName.ToLower().Contains("ovipositorf")).InRandomOrder().FirstOrDefault()?.TryGetComp(); + if (part == null) part = Genital_Helper.get_PartsHediffList(pawn, Genital_Helper.get_genitalsBPR(pawn))?.FindAll((Hediff hed) => hed.def.defName.ToLower().Contains("ovipositorm")).InRandomOrder().FirstOrDefault()?.TryGetComp(); + if (part == null) part = Genital_Helper.get_PartsHediffList(pawn, Genital_Helper.get_genitalsBPR(pawn))?.FindAll((Hediff hed) => hed.def.defName.ToLower().Contains("tentacle")).InRandomOrder().FirstOrDefault()?.TryGetComp(); + + float res = 0; + try + { + res = part.FluidAmmount * part.FluidModifier * pawn.BodySize * Rand.Range(0.8f, 1.2f) * RJWSettings.cum_on_body_amount_adjust * 0.3f; + } + catch (NullReferenceException) + { + res = 0.0f; + } if (pawn.Has(Quirk.Messy)) res *= Rand.Range(4.0f,8.0f); return res; @@ -149,7 +159,7 @@ namespace RJW_Menstruation else if (hediff is Hediff_BasePregnancy) { Hediff_BasePregnancy h = (Hediff_BasePregnancy)hediff; - string fetustex = h.babies?.First()?.def.GetModExtension()?.fetusTexPath ?? "Fetus/Fetus_Default"; + string fetustex = h.babies?.FirstOrDefault()?.def.GetModExtension()?.fetusTexPath ?? "Fetus/Fetus_Default"; if (h.GestationProgress < 0.2f) icon = comp.wombTex + "_Implanted"; else if (h.GestationProgress < 0.3f) icon += "Fetus/Fetus_Early00"; else if (h.GestationProgress < 0.4f) icon += fetustex + "00"; @@ -167,7 +177,7 @@ namespace RJW_Menstruation { string icon = comp.wombTex; float cumpercent = comp.TotalCumPercent; - if (cumpercent < 0.001f) icon = "Womb/Empty"; + if (cumpercent < 0.001f) return ContentFinder.Get("Womb/Empty", true); else if (cumpercent < 0.01f) icon += "_Cum_00"; else if (cumpercent < 0.05f) icon += "_Cum_01"; else if (cumpercent < 0.11f) icon += "_Cum_02"; @@ -230,7 +240,7 @@ namespace RJW_Menstruation var hediff = Genital_Helper.get_PartsHediffList(pawn, Genital_Helper.get_anusBPR(pawn)).Find((Hediff h) => h.def.defName.ToLower().Contains("anus")); CompProperties_Anus Props = (CompProperties_Anus)hediff.TryGetComp().props; string icon; - if (Props != null) icon = Props.analTex; + if (Props != null) icon = Props.analTex ?? "Genitals/Anal"; else icon = "Genitals/Anal"; if (hediff.Severity < 0.20f) icon += "00"; //micro else if (hediff.Severity < 0.40f) icon += "01"; //tight @@ -278,7 +288,34 @@ namespace RJW_Menstruation } } + public static void DrawEggOverlay(this HediffComp_Menstruation comp, Rect wombRect) + { + Rect rect = new Rect(wombRect.xMax - wombRect.width/3, wombRect.y, wombRect.width / 3, wombRect.width / 3); + GUI.color = Color.white; + GUI.DrawTexture(rect, comp.GetEggIcon(), ScaleMode.ScaleToFit); + } + public static Texture2D GetEggIcon(this HediffComp_Menstruation comp) + { + if (comp.parent.pawn.IsPregnant()) + { + if (comp.parent.pawn.GetPregnancyProgress() < 0.2f) return ContentFinder.Get("Eggs/Egg_Implanted00", true); + else return ContentFinder.Get("Womb/Empty", true); + } + else if (!comp.IsEggExist) return ContentFinder.Get("Womb/Empty", true); + else + { + int fertstage = comp.IsFertilized; + if (fertstage >= 0) + { + if (fertstage < 1) return ContentFinder.Get("Eggs/Egg_Fertilized00", true); + else if (fertstage < 24) return ContentFinder.Get("Eggs/Egg_Fertilized01", true); + else return ContentFinder.Get("Eggs/Egg_Fertilized02", true); + } + else if (comp.IsEggFertilizing) return ContentFinder.Get("Eggs/Egg_Fertilizing01", true); + else return ContentFinder.Get("Eggs/Egg", true); + } + }