Skip to content
Snippets Groups Projects

Preg Events outside saPregnancy

Description and notes

I found that facilities pregnancy was very lacking compared to other ones. I was trying to potentially add some content but found the framework very limiting around this, as everything needed to be done within saPregnancy in order for things to be consistent.

This might need some discussion, but I figured the best way was to create an object within App.EndWeek.saVars that can take multiple events populated during the SA reports. The alternative would be storing a bunch of variables from the SAEvents, but I thought that would be much messier.

The idea here being...within a week there could be multiple things that can cause pregnancy, with one winning out at random during the saPregnancy check. This keeps the events and ordering pretty consistent, while giving some flexibility to what is actually causing the pregnancy.

For a PoC on using this I migrated whore and public pregnancy events to their respective SAs, and added a preg chance scaling off of usage instead of a flat chance.

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
Changes made
  • Added App.EndWeek.SASharedVariables.pregnancy.
  • Made saPregnancy run pregnancy events.
  • Updated saWhore and saServeThePublic to use new pregnancy object.

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

Loading
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
Please register or sign in to reply
Loading