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
lutepickle
ef115b03fd
GetMenstruationComps is used in enough places it's worth a little caching
2022-07-16 14:16:39 -07:00
lutepickle
6383823e34
Null check in GetMenstruationComps, probably unnecessary. Also simplify HasMenstruationComp
2022-07-16 07:30:34 -07:00
lutepickle
5a64a081c2
Use explicit types instead of var everywhere
2022-07-16 07:11:58 -07:00
lutepickle
92fab44764
Simplify a bunch of for loops into functions
2022-07-14 19:12:28 -07:00
lutepickle
aa81fae8bd
Let climacteric re-apply when anestrus goes back into season
2022-07-14 18:32:14 -07:00
lutepickle
1a875dba1c
Refactor the transition to ovulation, eliminate some code duplication in follicular and bleeding actions between standard and induced ovulation
2022-07-14 16:24:59 -07:00
lutepickle
5d98d23541
Add code for girlcum, but leave it disabled for now
2022-07-14 15:46:13 -07:00
lutepickle
08c6c28c81
In the context of menstruation, CanImpregnate is called to see if the cum being added is fertile. In RJW, already being pregnant is enough to block a new one, but in menstruation it's fine if fertile cum enters a pregnant womb, or if cum goes into a different womb than the pregnant one. So never have a pawn with a womb be considered pregnant for those checks.
...
The other times that CanImpregnate is called is for the fetish, but that's already checked against DangerDay.
Also add some more null checks for the transpilers.
2022-07-13 16:50:06 -07:00
lutepickle
05029858d5
Get the right menstruation comp when impregnating. Also remove CanFertilize, it's too much of a pain
2022-07-13 15:44:26 -07:00
lutepickle
28cc9755fd
Revert "Bit of a refactor to AddWombGizmos, should be nicer to the Sexperience module"
...
This reverts commit 3d34ed1e53
.
2022-07-13 07:44:47 -07:00
lutepickle
6e841a3836
Slight simplification of SetEstrus
2022-07-12 19:31:24 -07:00
lutepickle
2b8d822542
For multiple vaginas, concealed estrus won't occur if in visible estrus, and visible estrus will cancel concealed estrus
2022-07-12 19:09:19 -07:00
lutepickle
1907820265
Whole bunch of code cleanup, mostly using and whitespace
2022-07-12 15:49:55 -07:00
lutepickle
f5170ca700
Merge the two pregnancy-preventing conditions into one if
2022-07-12 15:32:49 -07:00
lutepickle
8babac6378
Change argument name of GetMenstruationComp(vagina) for clarity
2022-07-12 14:47:42 -07:00
lutepickle
35b875980a
Little refactor of GetMenstruationComp(pregnancy) again
2022-07-12 14:46:39 -07:00
lutepickle
6143fb41fb
Implant at the right time for vaginas with odd luteal intervals
2022-07-12 14:43:19 -07:00
lutepickle
ea7b8e03ee
Slight refactor of GetFertileMenstruationComp
2022-07-11 19:39:41 -07:00
lutepickle
931b974bf9
Have GetMenstruationComp(pregnancy) null test
2022-07-11 19:05:21 -07:00
lutepickle
70346a0901
Remove availableWomb from CanFertilize. It's only used for fetishes, and it won't be DangerDay if they're all pregnant
2022-07-11 18:30:59 -07:00
lutepickle
c0043d2936
Support for multiple concurrent pregnancies
2022-07-11 18:23:08 -07:00
lutepickle
3d34ed1e53
Bit of a refactor to AddWombGizmos, should be nicer to the Sexperience module
2022-07-11 12:55:39 -07:00
lutepickle
699c91106f
Support for multiple vaginas
2022-07-11 11:52:27 -07:00
lutepickle
20692aaf13
Undo the CompPostPostRemoved checks, if nothing else to see what bug made them be added in the first place
2022-07-11 09:03:20 -07:00
lutepickle
902cd65375
Tiny refactor to adding stacked eggs to ovulation
2022-07-11 08:40:40 -07:00
lutepickle
6ec27b6aba
Cut down on some indentation, remove whitespace here and there
2022-07-11 08:21:42 -07:00
lutepickle
f585499871
Move RandomVariabilityPercent to MenstruationUtility
2022-07-11 07:33:42 -07:00
lutepickle
afc04d2fa5
Replace a bunch of "is null" with "== null"
2022-07-11 07:27:23 -07:00
lutepickle
1133255b0a
Rearrange LutealAction to let the stage end with fertilized eggs
2022-07-10 08:05:08 -07:00
lutepickle
9f66a3ea52
Missing elses in Follicular actions
2022-07-08 18:43:13 -07:00
lutepickle
96c81c70bf
Use Max for the avglittersize
2022-07-08 18:35:47 -07:00
lutepickle
096f941762
Account for bleeding when calculating induced ovulator ovary power, for all zero of them that bleed
2022-07-08 14:51:24 -07:00
lutepickle
58b2e4983c
Apply cycle speed properly to ovary power by age
2022-07-08 12:10:52 -07:00
lutepickle
f612e0df24
Properly apply cycleSpeed to PeriodRandomizer
2022-07-08 10:28:21 -07:00
lutepickle
98f0580577
Remove old PeriodRandomizer
2022-07-08 10:17:02 -07:00
lutepickle
4dbfe6c1d5
Correct comment on CumIn, remove stray semicolon
2022-07-08 09:34:43 -07:00
lutepickle
02194fe941
Remove Stage_Fertilized translations
2022-07-08 09:28:37 -07:00
lutepickle
862696eef1
Make the recursion limiter on RandomVariabilityPercent return the proper value
2022-07-07 19:09:06 -07:00
lutepickle
5abfa07638
Make the 'sperm lifespan' tip account for drainage, too. Also add a "10 ml" tip for fertilization chance
2022-07-07 18:28:34 -07:00
lutepickle
b2e26f2f1b
New ovary power calculation for all vaginas. While at it, remove old deviation factor since it's obsolete, too.
2022-07-07 16:17:12 -07:00
lutepickle
eade57bd9e
Update default values
2022-07-07 12:37:12 -07:00
lutepickle
a90d6bf343
Implement exponential fertilization chance
2022-07-07 12:23:45 -07:00
lutepickle
8a048ea7e5
Cum fertility overhaul. Now track volume and fertility percentage instead of fertvolume.
2022-07-07 12:14:47 -07:00
lutepickle
24e7f93bcc
Cumming inside someone with an IUD adds the full volume.
2022-07-07 12:00:46 -07:00
lutepickle
c7a2f0c55d
Make not-cum not fertilize
2022-07-07 11:28:09 -07:00
lutepickle
16bb69372c
Revert "Remove unused Egg() constructor"
...
Rimworld might be using it after all
This reverts commit 9c9e120b92
.
2022-07-07 11:15:37 -07:00
lutepickle
258f68a88d
Some checks for initializing the currentIntervalHours. Also fix the capitalization
2022-07-07 11:14:04 -07:00
lutepickle
07221e01a8
Fix stage hours in GetEggIcon
2022-07-07 11:09:42 -07:00
lutepickle
5c1fb93613
Proper check for the new speed/variability on init
2022-07-07 10:57:44 -07:00
lutepickle
4737641673
Refactor the climacteric stage functions into the normal stage functions
2022-07-07 10:50:49 -07:00
lutepickle
9cc8897103
Initial implementation of new variance code
2022-07-07 10:28:53 -07:00
lutepickle
9c9e120b92
Remove unused Egg() constructor
2022-07-07 07:58:32 -07:00
lutepickle
805b7afa81
FertilizationCheck doesn't need to return anything
2022-07-07 07:55:33 -07:00
lutepickle
60a842fd2b
Eggs implant at half luteal or 30 days, whichever comes first.
2022-07-07 07:52:43 -07:00
lutepickle
a1250f4141
Fix 'folicularIntervalDays' typo
2022-07-07 07:30:16 -07:00
lutepickle
93218a8aa1
Use a weighted random when determining the stage of a new pawn
2022-07-07 07:26:53 -07:00
lutepickle
983e112edd
Fertilized eggs never decay
2022-07-07 07:01:20 -07:00
lutepickle
5e164b74df
Remove obsolete RJW_Sire/RJW_Pup relations
2022-07-07 06:55:44 -07:00
lutepickle
b6bef2206e
Remove obsolete Stage.Fertilized
2022-07-07 06:51:39 -07:00
lutepickle
75fe253911
Give animal children the standard mother/father relations instead of the old RJW_Sire/RJW_Pup ones
2022-07-02 07:55:31 -07:00
lutepickle
b7a911000e
Rename PawnGCPass_Patch to AccumulatePawnGCData_Patch
2022-07-02 07:30:27 -07:00
lutepickle
f503deb09e
Have a pawn that becomes fertile go into anestrus if they're out of season.
2022-06-25 20:07:23 -07:00
lutepickle
14174396b0
Increase ovipostor semen to make up for the lowered fert chance
2022-06-25 11:15:54 -07:00
lutepickle
3ac49afade
Make the initial fertilization graphic based on the configured acceleration
2022-06-21 23:11:59 -07:00
lutepickle
f021316869
Don't show the implanted egg icon when it's a mechanoid pregnancy
2022-06-21 21:00:37 -07:00
lutepickle
6283baa778
Make the IsNull checks in the hybrid extensions return true if thingDefName really is null. Also add another null check when searching for a hybrid.
2022-06-19 17:09:04 -07:00
lutepickle
204fe0ecc7
Fix null fertilizer when an egg tries to implant
2022-06-16 17:57:52 -07:00
lutepickle
1ef735f328
Migrate Harmony dependency to NuGet
2022-06-16 16:59:34 -07:00
lutepickle
31d6fce892
Remove unused parameter in DrawHediffRow_Patch
2022-06-08 06:37:04 -07:00
lutepickle
56691171b4
Implement random tick timing
2022-06-05 11:06:57 -07:00
lutepickle
617ed4bfe0
Make menstruation tickinterval a const
2022-06-05 06:22:54 -07:00
lutepickle
f1fcbf13c1
Handle a null pawn's cum in fertilization
2022-06-04 21:42:59 -07:00
lutepickle
156dfc5f3e
One less magic number
2022-06-04 18:09:34 -07:00
lutepickle
4ebf45aeb8
Make fertilization add to the pawn's record again
2022-06-03 23:32:33 -07:00
lutepickle
b5b9002930
Make the pregnant breast growth start/end a const instead of a magic number
2022-06-03 20:22:32 -07:00
lutepickle
961e7f7b73
Better anti-prune algo. Also won't prune pawns with sperm/egg in a player faction/prisoner womb
2022-06-03 14:45:31 -07:00
lutepickle
b814412eb0
Don't prune pawns with sperm or a fertilized egg in a colonist's womb
2022-06-03 11:04:39 -07:00
lutepickle
5e818ab879
Make IsInEstrus into a Pawn extension
2022-06-03 09:06:18 -07:00
lutepickle
9d83860d55
Have the first fertilized graphic go off of just the CycleFactor
2022-06-03 07:57:48 -07:00
lutepickle
7f84480bee
Refactor IsBreedingSeason to be a bit cleaner
2022-06-02 14:21:43 -07:00
lutepickle
e09c4aeb97
Move gather cum gizmo text to this project to account for sexperience removing it
2022-06-02 12:36:54 -07:00
lutepickle
c082c70e68
Add a proper weighted random algo for selecting paternity
2022-06-02 12:31:31 -07:00
lutepickle
8b48fe51e5
Cum.fertFactor is unused for now, so remove it from the Fertilize() calculation
2022-06-01 20:34:18 -07:00
lutepickle
5b784c3c59
Display ovaries on the womb dialog when near ovulation
2022-05-31 18:14:11 -07:00
lutepickle
4ce0574e0b
Improve climacteric follicular
2022-05-31 14:36:26 -07:00
lutepickle
bba7fd8dbb
Use more of the fertilization graphics
2022-05-31 12:09:04 -07:00
lutepickle
3aa0450b87
Remove some milder "he came inside" memories when a harsher one is applied. Should reduce unwanted stacking.
2022-05-31 09:54:58 -07:00
lutepickle
e29c7a732a
Might as well refactor RecoveryAction out to match the rest
2022-05-31 08:36:27 -07:00
lutepickle
32ae526b0f
Better handle climacteric for induced ovulators
2022-05-31 08:22:35 -07:00
lutepickle
0a7e80b353
Add a short description when mousing over the phase in the womb dialog
2022-05-31 08:10:53 -07:00
lutepickle
871730ac3a
Send climacteric follicular to luteal stage
2022-05-31 05:37:50 -07:00
lutepickle
f909b8cfce
Fix pawn generation for off-map pawns.
2022-05-30 20:22:47 -07:00
lutepickle
c4f5e6b63c
A whole mess of spelling, grammar, and description updates
2022-05-30 20:04:48 -07:00