Commit graph

343 commits

Author SHA1 Message Date
lutepickle
1b10200953 Properly calculate the birth recovery time 2022-08-31 20:07:42 -07:00
lutepickle
9841aa145d Null check pregnancy in PregnantAction 2022-08-31 15:17:48 -07:00
lutepickle
cddbb8313b A bit more nipple change after milking 2022-08-31 09:13:04 -07:00
lutepickle
395c6784b8 Slow down nipple progress during milking, and use the increment factor setting 2022-08-31 08:03:47 -07:00
lutepickle
e0855fdf24 Simulate pawns in caravans and pods 2022-08-30 22:21:41 -07:00
lutepickle
257a20797c Display unfertilized eggs properly 2022-08-30 20:50:42 -07:00
lutepickle
c1d3f356f2 Try to account for number of children for induced eggs used 2022-08-30 20:43:05 -07:00
lutepickle
bdfbcf1edf Make induced ovulator egg count based on potential pregnancies. 2022-08-30 20:07:21 -07:00
lutepickle
8d4d7e93c3 Only do the pregnancy rechecks after a mech implant or insect egging 2022-08-30 15:22:36 -07:00
lutepickle
3ca018b0b6 Some mods have a null compClass, so catch that in allVaginas. 2022-08-29 21:38:33 -07:00
lutepickle
5908935260 Use GoNextStage in TakeLoosePregnancy 2022-08-29 16:47:32 -07:00
lutepickle
57df60d62c After impregnation, re-check womb pregnancies in case RJW did something to them 2022-08-29 08:34:38 -07:00
lutepickle
acfee52dd8 Split ShouldSimulate into its own function 2022-08-29 07:23:17 -07:00
lutepickle
e88e40c2cc Forbid titles for babies to match RJW 2022-08-29 06:47:50 -07:00
lutepickle
b3b34362d6 Just have Hediff_MultiplePregnancy.TryMergeWith unconditionally return false. The comp comparison doesn't work since at that point it's not registered to a comp yet. 2022-08-27 23:05:50 -07:00
lutepickle
84d5ffa8b7 Little cleanups and removal of unnecessary checks 2022-08-27 22:01:39 -07:00
lutepickle
66e2b3494b Have the implanation debug messages give the hediff IDs 2022-08-27 20:52:36 -07:00
lutepickle
f015b2e849 Don't merge a pregnancy with other pregnancies. 2022-08-27 19:49:23 -07:00
lutepickle
c6f08d7601 Catch a womb with pregnancy set and not in the phase, which can happen when futzing with the debug actions. 2022-08-27 12:43:10 -07:00
lutepickle
6344338ee2 Check for null pregnancy before trying to miscarry it on postpostremoved 2022-08-27 12:13:44 -07:00
lutepickle
89248897f0 Have the debug due date work off of the tile 2022-08-27 11:53:55 -07:00
lutepickle
c62b87ff8b Have the induced pre-ovulation check for no condom 2022-08-27 11:02:32 -07:00
lutepickle
0518a3f40c Add wider variety of insect egg graphics 2022-08-27 11:01:26 -07:00
lutepickle
d88a71bd61 Show the pre-ovulation graphic on induced ovulators during sex. 2022-08-27 08:04:39 -07:00
lutepickle
71e6a2dd5c Little simplification in cumout 2022-08-27 06:50:51 -07:00
lutepickle
1126d8f3e5 Have IsFertilized pick up the egg farthest along 2022-08-27 06:35:29 -07:00
lutepickle
3fb3d21420 Compare comps for womb gizmo duplication instead 2022-08-24 18:39:47 -07:00
lutepickle
ed682738dc Display multiple gizmos for multiple wombs 2022-08-24 16:23:52 -07:00
lutepickle
c1dc6827fd Replace parent.pawn with Pawn everywhere 2022-08-24 11:05:08 -07:00
lutepickle
b9ffcc0dc5 Handle cycles for unspawned pawns 2022-08-23 08:17:41 -07:00
lutepickle
d9dc79f107 Dead pawns don't get hediff ticks 2022-08-23 08:08:25 -07:00
lutepickle
4fc1d6b4ab Refactor the impregnation patch postfix to use MaxByWithFallback, too 2022-08-21 20:57:52 -07:00
lutepickle
e023938a41 Add new function to test for RJW pregnancy (as opposed to a vanilla animal pregnancy), and refactor GetFarthestPregnancy into the rimworld fallback version 2022-08-21 20:54:27 -07:00
lutepickle
5eb73bfb2e Have the two pregnancy progress functions return 0 on no pregnancy instead of -1 2022-08-21 20:21:42 -07:00
lutepickle
0b272c1e5b Don't end mech pregnancies on removal 2022-08-21 12:26:17 -07:00
lutepickle
5e788df794 Just eliminate GetHARComp instead of messing with casting 2022-08-18 08:41:05 -07:00
lutepickle
973e83c8f1 Change GetHARComp to return a ThingComp, since using a type that might not be loaded will cause an error upon trying to open the dev actions 2022-08-18 06:46:34 -07:00
lutepickle
08e3a2fd51 Remove a bit of namespace from CumOut 2022-08-17 15:55:28 -07:00
lutepickle
d98a102d44 Catch pawns that are pregnant but not with BasePregnancy (e.g. vanilla animal pregnancy) 2022-08-17 06:37:30 -07:00
lutepickle
51da20e6b3 Protect enzygoticSiblings for good practice 2022-08-14 20:27:54 -07:00
lutepickle
f19a788432 Properly update nippleProgress when it should grow 2022-08-12 16:06:34 -07:00
lutepickle
99844086db Put the due date in the debug womb overlay when pregnant 2022-08-12 10:03:04 -07:00
lutepickle
610bffeaa7 Fix pregnancy progress in the womb gizmo again. Also have an undiscovered pregnancy look like a steady luteal progress. 2022-08-12 10:02:07 -07:00
lutepickle
f63a66efd0 Properly set the current interval hours on pregnancies. Again. 2022-08-12 08:48:21 -07:00
lutepickle
d1ceebb4e7 Fix HAR compatibility, copy all HAR properties for enzygotic siblings. 2022-08-11 18:43:12 -07:00
lutepickle
624ae1ce75 Make the enzygotic data structure exist before trying to add babies to it 2022-08-11 16:05:49 -07:00
lutepickle
26ff5f3d6c RJW can move breasts on some animals, and that seems to make the breast comp properties null, so test for that. 2022-08-11 14:31:37 -07:00
lutepickle
9ce08ceab8 Slight refactor of RandomStage, be a bit cleaner 2022-08-11 09:20:29 -07:00
lutepickle
8e5487b3ba Re-add AfterSimulator to CompPostTick 2022-08-10 14:47:10 -07:00
lutepickle
592fcad088 Change OvaryPowerThreshold to better handle very long cycles. Also have climacteric severity use an InverseLerp. 2022-08-09 21:07:43 -07:00
lutepickle
f19494fd5a Shift the fertility check above the switch in compPostTick 2022-08-09 07:02:55 -07:00
lutepickle
85c479a45b Replace hugslib scheduler with CompPostTick. Hopefully this will cut down on phantom menstruation bugs. 2022-08-08 08:07:44 -07:00
lutepickle
31cea0daaf Let the debug messages be clickable 2022-08-05 08:58:16 -07:00
lutepickle
7c98a49ee3 Let CompExposeData load the base values properly when they're already extant 2022-07-31 07:05:01 -07:00
lutepickle
814d500b45 Flip the if in PostBirth 2022-07-30 18:31:35 -07:00
lutepickle
3362a1f0ca Sexperience had a bug where an optimizer/patcher could cause the static contructor of the dialog to be called before the GUI was ready. Just to be safe, delay the GUI calls until the first time the dialog is opened here, too. 2022-07-30 09:29:56 -07:00
lutepickle
3f739a12d9 Null reference check for pregnancy gizmos. It would come up in multiwomb scenarios 2022-07-30 07:53:01 -07:00
lutepickle
e18e1892ad Don't let BabyHalfAge be 0 2022-07-29 21:02:39 -07:00
lutepickle
6701785462 Little refactor in CalculateLastBirth 2022-07-29 20:35:49 -07:00
lutepickle
4b6b4c87ee Remove maxaerolaincrement, the realistic amount is just too small for the display 2022-07-29 09:15:23 -07:00
lutepickle
c30aef672a Lower max PermanentNippleChange 2022-07-29 07:30:15 -07:00
lutepickle
814f1c085e Fix configuration 2022-07-28 21:58:23 -07:00
lutepickle
105c4df01f Rewrite nipple system to a simpler version 2022-07-28 21:06:51 -07:00
lutepickle
df1455ece2 Refactor AddNewBaby a bit so enzygotic twins get registered for babies without a story. And a smidge more tolerant of null pawn generation 2022-07-27 21:09:46 -07:00
lutepickle
dab0913032 Rename again to enzygoticSiblings for consistency with the configuration option 2022-07-27 18:37:01 -07:00
lutepickle
b6169227e7 Null check the right thing in CopyBodyPartProperties 2022-07-27 14:42:53 -07:00
lutepickle
9b0363aec2 Slightly more efficient comp copier for menstruation and breast 2022-07-27 14:41:17 -07:00
lutepickle
3cca6db53e Copy comp.EffSize after all. Some submod might use it 2022-07-27 14:39:19 -07:00
lutepickle
dbebba0d45 Rename zygotes to monozygoticSiblings 2022-07-27 14:35:36 -07:00
lutepickle
5b6093fd86 Rename ProcessIdenticalZygote to ProcessIdenticalSibling 2022-07-27 14:32:50 -07:00
lutepickle
aab02f07fb Copy RJW parts across enzygotic siblings at birth 2022-07-27 11:49:57 -07:00
lutepickle
ff7a06af99 Ovulate based off of the pawn's def instead of their raceprops 2022-07-26 21:16:36 -07:00
lutepickle
fdc4dd4612 Add dependency on cum to sexperience module 2022-07-26 17:23:12 -07:00
lutepickle
073043bb05 Remove sex ability from womb gizmo, at least for now. 2022-07-26 16:04:52 -07:00
lutepickle
ff039e3065 Have get_Pregnancy test to see if the pawn has the hediff. Won't happen for MultiplePregnancy, but the base pregnancy and the nonstandard ones will.
Mostly useful for the window between a pregnancy ending and the last PregnantAction firing.
2022-07-25 11:45:18 -07:00
lutepickle
1f74ab9286 Have Miscarry remove the comp's pregnancy first, otherwise there's a possible infinite loop 2022-07-25 10:08:08 -07:00
lutepickle
0e04c7660b Put the "comp missing" message in doimpregnate behind the debug setting. 2022-07-25 06:28:19 -07:00
lutepickle
fdd1bb682a Adjust the spacing in the womb dialog to put the fert/implant chance back where it was 2022-07-23 20:50:57 -07:00
lutepickle
62f37dcac8 Revert "Originvagsize is unused and took up save file space, so get rid of it"
This reverts commit d8fcb15f39.
2022-07-23 19:59:23 -07:00
lutepickle
0de63e3bed Remove earned money by whore from pawn stat since RJW 5.0.0 removes whoring 2022-07-23 19:44:20 -07:00
lutepickle
b0578469d1 Switch to using RJW's vagina def instead of searching ourselves 2022-07-23 19:43:33 -07:00
lutepickle
20c18c2904 Rimworld already has TaleDefOf.GaveBirth, so just use that one 2022-07-23 15:49:33 -07:00
lutepickle
68793ff811 Have the postbirth patch use VariousDefOf.AllVaginas 2022-07-22 09:32:32 -07:00
lutepickle
2407b52e3b Only show the "tick scheduler removed" messages when debug is enabled 2022-07-22 08:50:45 -07:00
lutepickle
d8fcb15f39 Originvagsize is unused and took up save file space, so get rid of it 2022-07-21 23:12:32 -07:00
lutepickle
52b0c3ab95 Let the pregnancy detector in the initialization pick up multiple pregnancies, just in case 2022-07-21 19:18:48 -07:00
lutepickle
3f3977b3c7 Probably can't happen, but add a check in GiveBirth for null menstruation comp 2022-07-20 12:43:35 -07:00
lutepickle
d0210c23bf Add an explanation to the CompPostPostRemoved check, as well as refactor the checks a bit 2022-07-20 10:27:11 -07:00
lutepickle
947c61c8a2 Rimworld doesn't permit direct-adding a sibling relation, so remove all that code 2022-07-20 10:00:17 -07:00
lutepickle
54e41b7aa4 (Re-)work around a bug in RJW (and potentially any number of other mods) that causes CompPostPostRemoved to be called on the wrong pawn. 2022-07-20 09:56:04 -07:00
lutepickle
1125930869 Make AllVaginas less hardcoded 2022-07-20 08:37:36 -07:00
lutepickle
57998a3895 Add tale for coming inside 2022-07-20 06:01:48 -07:00
lutepickle
2f5bf19ea6 Record the GaveBirth tale when a human is born 2022-07-18 08:41:32 -07:00
lutepickle
8b93398466 Replace usages of System.Random with RW's Rand 2022-07-18 07:05:39 -07:00
lutepickle
697b837a4d Move GetRacesPawnKind to Utility 2022-07-18 07:00:15 -07:00
lutepickle
76c2a67390 Properly generate babies with mismatched pawn def and pawnkind 2022-07-18 06:28:01 -07:00
lutepickle
f89bdaad46 Remove warning in PregnantAction. That scenario can occur after an egg or mechanoid pregnancy 2022-07-17 15:56:47 -07:00
lutepickle
660b26f35a Rename VariousDefOf.Vagina/VaginaCompProperties (used in the config screen) to HumanVagina for clarity 2022-07-16 14:52:51 -07:00
lutepickle
b0b7ffba50 Associate the post-birth vagina morph with the one that was pregnant 2022-07-16 14:50:01 -07:00
lutepickle
4f72320696 Add the new AllVaginas to a few more places 2022-07-16 14:45:09 -07:00