Small fixes and improvements to cycles
Description and notes
Did some testing and everything seems to be good. There is some strangeness when u turn it on, as the slaves need to sort of sync up, but nothing too weird.
Couple of small fixes and refactors to the fertKnown stuff.
- Fixes type on patch, this shouldn't cause any backwards comp issues, the change on the patch itself is just to resolve a typing issue.
- Add a
fertKnown
helper since this is going to be used everywhere it seems and the logic can be kind of hard to read in the those huge boolean statements. - Replaced fertPeak === 2 with
isMenstrating
. - Fixed some issues with the preg bio metric that would still count late period even when they are menstruating.
- Expanded comment for the experimental options.
This one could use some insight @Pregmodder :
Risky Week will now show up when their cycle is known (it was changed to show fertile instead).Unknown will always showFertile?
, before this was Fertile for always unknown, which was kind of confusing?
Also I saw you left a comment on the manual impregnation stuff, I could take a stab at that if u want
Merge Checklist
-
I have read CONTRIBUTING.md - and
- my code editor has
-
ESLint support enabled -
TypeScript support enabled -
some form of spell checker - We suggest using a spell checker compatible with cSpell if possible
-
-
my changes compile successfully and seem to work properly -
I am using the simple compiler ( simple-compiler.[bat or sh]
) -
I am using the normal compiler ( compile.[bat or sh]
) -
this is my first merge request -
the changes in this merge request comply with the coding style defined in CONTRIBUTING.md
- my code editor has
- and
Things left to do
-
code review (this is done by one or more people other than you) -
final tests -
let Pregmodder know that this is ready for merging
Merge request reports
Activity
Risky week should only show if cycle knowledge is set to always known. Otherwise the player is left to guess at it based off what they know.
Fertile? verses fertile. Outside of hard confirmation situations, the logic might be flawed. Fertile is more for suspected but unconfirmed fertility, ie past puberty age but .fertKnown has not gotten set yet. So you suspect she is fertile, but aren't certain, if that makes sense. Like I said, probably did the logic there wrong.
You can try the manual impregnation. The main problem is devising a way to only allow it to be tried once per week.
- Resolved by humungusluver
Risky week should only show if cycle knowledge is set to always known. Otherwise the player is left to guess at it based off what they know.
Got it, I'm working on some reactions right now for risky/menstrating week and thinking about how they interact with fertKnown.
Fertile? verses fertile. Outside of hard confirmation situations, the logic might be flawed. Fertile is more for suspected but unconfirmed fertility, ie past puberty age but .fertKnown has not gotten set yet. So you suspect she is fertile, but aren't certain, if that makes sense. Like I said, probably did the logic there wrong.
Got it, Fertile? = Unknown, Fertile = maybe fertile, Risky = confirmed fertile, something like that?
You can try the manual impregnation. The main problem is devising a way to only allow it to be tried once per week.
Ahhh yeah, good call out...probably needs a new variable.
Alright @Pregmodder I reverted the logic around
Fertile?
, I looked at the code a bit more and I think I understand what its going for now.All i did was use
fertKnown
when appropriate there.
- Resolved by humungusluver
Don't think you can just change patches like that. Probably drop that.
That is to say, once applied, it won't be reapplied. You'd need a new patch to change it.
Edited by Pregmodder
527 527 }, 528 528 529 529 // Scenarios 530 scenario: { 530 scenarios: { That's correct, your patch had a mistake:
App.Patch.register({ releaseID: 1280, descriptionOfChanges: "Adds controllers for fertKnown and pregKnown as well as the showcase policy", pre: (div) => { V.menstruationKnown = 0; V.pregnancyKnown = 0; V.boughtItem.toys.chastity = 1; V.policies.contraceptivesBan = 0; V.scenarios = {}; <=== HERE V.scenarios.contraceptivesBan = 0; }, });
This fixes that error.
So either the variable needs to be updated or the patch does.
Issues is
scenario
vsscenarios
Edited by humungusluver
mentioned in commit ccf60b94
mentioned in merge request !12366 (merged)