herp-a-derp/Corruption-of-Champions — pull request #565 by IndirectOne (2014-09-01 19:54:07+00:00)
Title: New NPC pregnancy system

This commit changes almost all NPCs that can currently become pregnant so that they use a common PregnancyStore class to manage vaginal and butt pregnancies. This way you don't have to figure out which set of flags has to be checked, you can just use NPCx.pregnancy.isPregnant, .knockUpForce, etc. It will also simplify things if ever someone wants to add pregnancy to an existing NPC or modify an NPC who can already become pregnant so that they support additional types of pregnancies.

Many NPC scene classes now implement the new TimeAwareInterface. The game calls each class with this interface each time the game time advances, allowing the class to take care of any time related changes such as cooldowns or advancing pregnancies. Around 1000 lines of code got moved out of eventParser.goNext() and into the classes they are related to.

Since some flags had to be changed I added code to Saves.unFuckSave() to convert any changed flags to the new format. For the most part this just means adding pregnancy types to NPCs who didn't have one before. Sheila's pregnancy now counts down rather than counting up since she was the only NPC who counted up. I also corrected Phylla's drider egg pregnancy - it's supposed to last 8 days, not 8 hours. The worm and goo stuffing scenes now create a false pregnancy so that the player can't somehow become pregnant while their womb or colon is stuffed with goo or worms.