[1.3] Children and Pregnancy - v4.1.0

Started by GhostData, March 22, 2020, 04:32:51 PM

Previous topic - Next topic

GhostData

Quote from: Third_Of_Five on April 05, 2020, 02:17:31 PM
Ok, so I've been messing around with the code and I've managed to fix a bug with the TakeBabyToBedAndFeed job driver.
The bug happens when a pawn assigned to childcare prioritizes the TakeBabyToBedAndFeed job over the FeedPatient job when feeding an infant, causing the baby to be shoved out of their crib while being fed. I changed this so that the TakeBabyToBedAndFeed job doesn't get called unless the baby is in the Toddler stage. So when a pawn needs to feed a hungry infant, it defaults to either the FeedBaby job or the FeedPatient job, and the baby doesn't get shoved out of their crib or carried to a new bed for no reason.

Would you be willing to add me as a member on gitlab so I can push my changes to a new branch for you to review? I'm a web developer IRL so I have extensive experience with using git.
Shoot, I wish I had checked in earlier. I spent the afternoon correcting the  same issue.

*  Fix move baby to crib and feeding jobs
*  Babies will now be moved by a childcare pawn to the most appropriate bed - ideally a crib. If they are not in a crib and a crib is available, they will be moved automatically.
*  Babies will no longer be shuffled between beds during feeding
*  If a childcare pawn is not available, any other pawn will rescue the baby instead, but will no longer deliver the baby to a hospital bed unless the baby is ill. Once the baby has recovered they will be delivered back to their crib or another preferred bed.
*  Doctors should only feed babies when actually hospitalized

**https://gitlab.com/Tragix/children-and-pregnancy-collab/-/tags/v2.0.2**

Third_Of_Five

#61
Quote from: Tragix on April 05, 2020, 04:46:00 PM
Quote from: Third_Of_Five on April 05, 2020, 02:17:31 PM
Ok, so I've been messing around with the code and I've managed to fix a bug with the TakeBabyToBedAndFeed job driver.
The bug happens when a pawn assigned to childcare prioritizes the TakeBabyToBedAndFeed job over the FeedPatient job when feeding an infant, causing the baby to be shoved out of their crib while being fed. I changed this so that the TakeBabyToBedAndFeed job doesn't get called unless the baby is in the Toddler stage. So when a pawn needs to feed a hungry infant, it defaults to either the FeedBaby job or the FeedPatient job, and the baby doesn't get shoved out of their crib or carried to a new bed for no reason.

Would you be willing to add me as a member on gitlab so I can push my changes to a new branch for you to review? I'm a web developer IRL so I have extensive experience with using git.
Shoot, I wish I had checked in earlier. I spent the afternoon correcting the  same issue.

*  Fix move baby to crib and feeding jobs
*  Babies will now be moved by a childcare pawn to the most appropriate bed - ideally a crib. If they are not in a crib and a crib is available, they will be moved automatically.
*  Babies will no longer be shuffled between beds during feeding
*  If a childcare pawn is not available, any other pawn will rescue the baby instead, but will no longer deliver the baby to a hospital bed unless the baby is ill. Once the baby has recovered they will be delivered back to their crib or another preferred bed.
*  Doctors should only feed babies when actually hospitalized

**https://gitlab.com/Tragix/children-and-pregnancy-collab/-/tags/v2.0.2**

Downloaded the newest version, it seems this has broken some stuff. Namely it makes it so that the MoveBabyToBedAndFeed job is now the only way to feed babies. The BreastFeed job doesn't work at all and it seems the new HealthAIUtility patches you added prevent the FoodFeedPatient job from being called to feed babies that are not sick.

What I think needs to be done is that a new FeedBaby job needs to be implemented to do what FoodFeedPatient used to be relied upon for. Cuz now with the new health ai patch, any jobs related to doctoring are not called unless the baby is sick and in a medical bed.

GhostData

Quote from: Third_Of_Five on April 05, 2020, 05:18:40 PM
Quote from: Tragix on April 05, 2020, 04:46:00 PM
Quote from: Third_Of_Five on April 05, 2020, 02:17:31 PM
Ok, so I've been messing around with the code and I've managed to fix a bug with the TakeBabyToBedAndFeed job driver.
The bug happens when a pawn assigned to childcare prioritizes the TakeBabyToBedAndFeed job over the FeedPatient job when feeding an infant, causing the baby to be shoved out of their crib while being fed. I changed this so that the TakeBabyToBedAndFeed job doesn't get called unless the baby is in the Toddler stage. So when a pawn needs to feed a hungry infant, it defaults to either the FeedBaby job or the FeedPatient job, and the baby doesn't get shoved out of their crib or carried to a new bed for no reason.

Would you be willing to add me as a member on gitlab so I can push my changes to a new branch for you to review? I'm a web developer IRL so I have extensive experience with using git.
Shoot, I wish I had checked in earlier. I spent the afternoon correcting the  same issue.

*  Fix move baby to crib and feeding jobs
*  Babies will now be moved by a childcare pawn to the most appropriate bed - ideally a crib. If they are not in a crib and a crib is available, they will be moved automatically.
*  Babies will no longer be shuffled between beds during feeding
*  If a childcare pawn is not available, any other pawn will rescue the baby instead, but will no longer deliver the baby to a hospital bed unless the baby is ill. Once the baby has recovered they will be delivered back to their crib or another preferred bed.
*  Doctors should only feed babies when actually hospitalized

**https://gitlab.com/Tragix/children-and-pregnancy-collab/-/tags/v2.0.2**

Downloaded the newest version and the bug still happens.
Ah, sorry, reread your post a few times and finally understood the bug you were referring to. I think you should be able to open a pull request from your own fork without any special permissions, assuming you forked my repo or the original source.

Third_Of_Five

Quote from: Tragix on April 05, 2020, 05:48:04 PM
Ah, sorry, reread your post a few times and finally understood the bug you were referring to. I think you should be able to open a pull request from your own fork without any special permissions, assuming you forked my repo or the original source.

Well yeah I can fork it and add whatever changes I want, but if I'm suggesting changes for you to add in that kinda defeats the point. What I'm saying is that if you trust me, I'd like to be added as a member so I can push new branches with my changes for you to merge into the master branch.

GhostData

Quote from: Third_Of_Five on April 05, 2020, 05:56:07 PM

Well yeah I can fork it and add whatever changes I want, but if I'm suggesting changes for you to add in that kinda defeats the point. What I'm saying is that if you trust me, I'd like to be added as a member so I can push new branches with my changes for you to merge into the master branch.
You can open a PR from fork to fork without being added to the repo in question.

Third_Of_Five

Quote from: Tragix on April 05, 2020, 06:03:31 PM
Quote from: Third_Of_Five on April 05, 2020, 05:56:07 PM

Well yeah I can fork it and add whatever changes I want, but if I'm suggesting changes for you to add in that kinda defeats the point. What I'm saying is that if you trust me, I'd like to be added as a member so I can push new branches with my changes for you to merge into the master branch.
You can open a PR from fork to fork without being added to the repo in question.

Oh, really? I didn't know that.
Cool.

Third_Of_Five

*  Doctors should only feed babies when actually hospitalized

Ok so this seems to break baby feeding entirely. The mod relies on the FoodFeedPatient job to carry out the tast of feeding babies, so now that this has been explicitly disabled there is no way to feed babies while they are in bed.

GhostData

Quote from: Third_Of_Five on April 05, 2020, 06:12:47 PM
*  Doctors should only feed babies when actually hospitalized

Ok so this seems to break baby feeding entirely. The mod relies on the FoodFeedPatient job to carry out the tast of feeding babies, so now that this has been explicitly disabled there is no way to feed babies while they are in bed.
With the 2.0.2, baby feeding is handled through the moveBabyToCribAndFeed job. I'll revise once your PR is merged

Geese man

#68
Newest version causes "determine pregnancy" to simply do nothing, when the operation is done no message at all so it will be like the pawn was not operated at all (even when pregnant i checked with dev mode "dev: AllDiffs")
Also got some issues with any faction visiting or raiding, some pawns will just leave the map as soon as they arrive for no reason.
and when traders spawn they will always drop some pawn gear as in some food and some weapons this seems to be the case when a child enters my faction base land but probably due to a malfunction in the disable pregnancies for other then player factions thus despawning the child before it is even rendered.

Third_Of_Five

Quote from: Tragix on April 05, 2020, 07:11:47 PM
Quote from: Third_Of_Five on April 05, 2020, 06:12:47 PM
*  Doctors should only feed babies when actually hospitalized

Ok so this seems to break baby feeding entirely. The mod relies on the FoodFeedPatient job to carry out the tast of feeding babies, so now that this has been explicitly disabled there is no way to feed babies while they are in bed.
With the 2.0.2, baby feeding is handled through the moveBabyToCribAndFeed job. I'll revise once your PR is merged

Currently working on a fix for that right now, will make a PR when it's ready

GhostData

Quote from: Geese man on April 05, 2020, 08:05:36 PM
Newest version causes "determine pregnancy" to simply do nothing, when the operation is done no message at all so it will be like the pawn was not operated at all (even when pregnant i checked with dev mode "dev: AllDiffs")
Also got some issues with any faction visiting or raiding, some pawns will just leave the map as soon as they arrive for no reason.
and when traders spawn they will always drop some pawn gear as in some food and some weapons this seems to be the case when a child enters my faction base land but probably due to a malfunction in the disable pregnancies for other then player factions thus despawning the child before it is even rendered.
I think the dropping gear problem is probably due to placing the new growing component on all newly generated pawns. A pawn who isnt an adult will briefly receive the baby hediff and collapse before recovering. I'll get a fix out tomorrow.

Geese man

#71
Quote from: Tragix on April 05, 2020, 09:10:41 PM
Quote from: Geese man on April 05, 2020, 08:05:36 PM
Newest version causes "determine pregnancy" to simply do nothing, when the operation is done no message at all so it will be like the pawn was not operated at all (even when pregnant i checked with dev mode "dev: AllDiffs")
Also got some issues with any faction visiting or raiding, some pawns will just leave the map as soon as they arrive for no reason.
and when traders spawn they will always drop some pawn gear as in some food and some weapons this seems to be the case when a child enters my faction base land but probably due to a malfunction in the disable pregnancies for other then player factions thus despawning the child before it is even rendered.
I think the dropping gear problem is probably due to placing the new growing component on all newly generated pawns. A pawn who isnt an adult will briefly receive the baby hediff and collapse before recovering. I'll get a fix out tomorrow.
no there is no collapsing if there is it would be really really really fast cause i cannot see it and there are never any naked pawns neither walking or collapsed or they leave before they rendered maybe?

Third_Of_Five

I implemented a fix for the MoveBabyToBedAndFeed bug and I implemented a new FoodFeedBaby job to replace the vanilla FoodFeedPatient job that was being used before as a crutch for feeding children in bed. Now, you no longer have to assign pawns to doctoring in order to get them to feed children.

Submitted an MR in gitlab for Tragix to review

Third_Of_Five

Quote from: Geese man on April 05, 2020, 08:05:36 PM
Newest version causes "determine pregnancy" to simply do nothing, when the operation is done no message at all so it will be like the pawn was not operated at all (even when pregnant i checked with dev mode "dev: AllDiffs")

Implemented a fix for this, added it to my MR

hades7600

Is this not compatible with andriod mods? my andriods are now acting like babies and can't do anything