Skip to content
Snippets Groups Projects
Commit 91d50dd2 authored by Pregmodder's avatar Pregmodder
Browse files

Merge branch 'pregmod-dev' into 'pregmod-master'

Fix pent up milk expansion bug

Closes #4686

See merge request !11424
parents e892b073 5804ff2c
No related branches found
No related tags found
1 merge request!11424Fix pent up milk expansion bug
Pipeline #65158 passed
......@@ -61,8 +61,15 @@ App.EndWeek.nextWeek = function() {
}
if (V.PC.lactation === 1) {
if (V.PC.lactationDuration === 1) {
V.PC.boobsMilk = milkAmount(V.PC) * 20;
let boobsMilkIntegrityPC = 0;
if (V.PC.boobsMilk > 0) {
boobsMilkIntegrityPC = V.PC.boobsMilk;
V.PC.boobs -= V.PC.boobsMilk;
V.PC.boobsMilk = 0;
}
// V.PC.boobsMilk = Math.round(10 * V.PC.lactationAdaptation);
V.PC.boobsMilk = milkAmount(V.PC) * 20;
V.PC.boobsMilk += boobsMilkIntegrityPC;
V.PC.boobsMilk = Math.round(V.PC.boobsMilk / 10) * 10;
V.PC.boobs += V.PC.boobsMilk;
}
......@@ -175,8 +182,15 @@ App.EndWeek.nextWeek = function() {
}
if (slave.lactation === 1) {
if (slave.lactationDuration === 1) {
slave.boobsMilk = milkAmount(slave) * 20;
let boobsMilkIntegrity = 0;
if (slave.boobsMilk > 0) {
boobsMilkIntegrity = slave.boobsMilk;
slave.boobs -= slave.boobsMilk;
slave.boobsMilk = 0;
}
// slave.boobsMilk = Math.round(10 * slave.lactationAdaptation);
slave.boobsMilk = milkAmount(slave) * 20;
slave.boobsMilk += boobsMilkIntegrity;
slave.boobsMilk = Math.round(slave.boobsMilk / 10) * 10;
slave.boobs += slave.boobsMilk;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment