diff --git a/src/endWeek/saWorkTheFarm.js b/src/endWeek/saWorkTheFarm.js index 274cfd76de013a243bc21773a4a585672bae33dd..17eba531d85618b4fd2df04aab0051fbe4e72d73 100644 --- a/src/endWeek/saWorkTheFarm.js +++ b/src/endWeek/saWorkTheFarm.js @@ -223,7 +223,11 @@ App.SlaveAssignment.workTheFarm = function(slave) { if (slave.pregWeek > 16) { t += `${His} viewers <span class="green">approve</span> of the fact that ${he} is sporting a baby bump. `; } else { - t += `${His} viewers <span class="red">are disappointed</span> that ${he} isn't pregnant. `; + if (setup.fakeBellies.includes(slave.bellyAccessory)) { + t += `${His} viewers can't tell ${his} pregnant belly isn't real, luckily enough for ${him}. `; + } else { + t += `${His} viewers <span class="red">are disappointed</span> that ${he} isn't pregnant. `; + } } if (slave.dick > 0) { // TODO: something here? @@ -397,7 +401,7 @@ App.SlaveAssignment.workTheFarm = function(slave) { // TODO: write this - maybe something about the slave's ability to handle the animal? } if (!canSeePerfectly(slave)) { - t += `${His} ${!canSee(slave) ? `blindness makes it impossible` : `nearsightedness makes it harder`}} for ${him} to see what ${he}'s doing, affecting ${his} ability to put on a good show. `; + t += `${His} ${!canSee(slave) ? `blindness makes it impossible` : `nearsightedness makes it harder`} for ${him} to see what ${he}'s doing, affecting ${his} ability to put on a good show. `; } if (slave.hears < 0) { t += `${His} ${slave.hears < -1 ? `lack of` : `poor`} hearing makes it difficult for ${him} to do a good job of putting on a show. `; diff --git a/src/facilities/farmyard/food/food.js b/src/facilities/farmyard/food/food.js new file mode 100644 index 0000000000000000000000000000000000000000..c80c30a145d9671b9f9c47ca666d8401857661df --- /dev/null +++ b/src/facilities/farmyard/food/food.js @@ -0,0 +1,61 @@ +/** + * @param {App.Entity.SlaveState} slave + * @returns {number} + */ +App.Facilities.Farmyard.foodAmount = function(slave) { + if (!slave) { + return `Current slave is not valid. Please report this`; + } + let food = 150; // kg of food produced per week by slave, before upgrades + if (V.farmyardUpgrade.pump === 1) { + food += 15; // pump upgrade for farmyard + } + if (V.farmyardUpgrade.fertilizer === 1) { + food += 35; // fertilizer upgrade for farmyard + } + if (V.farmyardUpgrade.seeds === 1) { + food += 65; // seeds upgrade for farmyard + } + if (V.farmyardUpgrade.machinery === 1) { + food += 65; // machinery upgrade for farmyard + } + if (V.Farmer !== 0) { // if a farmer is assigned + food *= 1.1; // TODO: expand this to account for farmer XP and skill + if (V.Farmer.skill.farmer >= V.masteredXP) { // if farmer is master + food *= 1.1; + } + } + if (slave.devotion > 50) { + food *= 1.1; + } else if (slave.devotion < -50) { + food *= 0.8; + } + if (slave.muscles > 30) { // slave is muscular or more + food *= 1.1; + } else if (slave.muscles <= -6) { // slave is weak or less + food *= 0.8; + } + if (slave.weight > 95) { // slave is overweight or more + food *= 0.9; + } else if (slave.weight > 130) { // slave is fat or more + food *= 0.8; + } else if (slave.weight > 160) { // slave is obese or more + food *= 0.7; + } else if (slave.weight > 190) { // slave is very obese or more + food *= 0.6; + } + if (!canSee(slave)) { // slave is blind + food *= 0.6; + } else if (!canSeePerfectly(slave)) { // slave is nearsighted + food *= 0.8; + } + if (slave.hears === -1) { // slave is hard of hearing + food *= 0.8; + } else if (slave.hears < -1) { // slave is deaf + food *= 0.6; + } + food *= restEffects(slave, 20); + food = Math.trunc(food); + food = Math.clamp(food, 1, 1000000000000000000); + return food; +}; diff --git a/src/facilities/farmyard/reports/farmyardReport.js b/src/facilities/farmyard/reports/farmyardReport.js index f41d42babc3418ae4647b83bb80296e12f5daf2d..a0a1ebd8ebdde396e489e380d8542802b248cc14 100644 --- a/src/facilities/farmyard/reports/farmyardReport.js +++ b/src/facilities/farmyard/reports/farmyardReport.js @@ -363,7 +363,7 @@ App.Facilities.Farmyard.farmyardReport = function farmyardReport() { let r = []; - r.push(farmhandCount); + r.push(farmhandCount(slaves.length)); for (const slave of slaves) { V.i = V.slaveIndices[slave.ID]; diff --git a/src/js/food.js b/src/facilities/farmyard/showsIncome.js similarity index 83% rename from src/js/food.js rename to src/facilities/farmyard/showsIncome.js index 6ff8ce76947e838f606b7ad3394e1b040a6d8ec8..8189fc3876b93d72912aaf3de9333758193256f8 100644 --- a/src/js/food.js +++ b/src/facilities/farmyard/showsIncome.js @@ -1,65 +1,3 @@ -/** - * @param {App.Entity.SlaveState} slave - * @returns {number} - */ -App.Facilities.Farmyard.foodAmount = function(slave) { - if (!slave) { - return `Current slave is not valid. Please report this`; - } - let food = 150; // kg of food produced per week by slave, before upgrades - if (V.farmyardUpgrade.pump === 1) { - food += 15; // pump upgrade for farmyard - } - if (V.farmyardUpgrade.fertilizer === 1) { - food += 35; // fertilizer upgrade for farmyard - } - if (V.farmyardUpgrade.seeds === 1) { - food += 65; // seeds upgrade for farmyard - } - if (V.farmyardUpgrade.machinery === 1) { - food += 65; // machinery upgrade for farmyard - } - if (V.Farmer !== 0) { // if a farmer is assigned - food *= 1.1; // TODO: expand this to account for farmer XP and skill - if (V.Farmer.skill.farmer >= V.masteredXP) { // if farmer is master - food *= 1.1; - } - } - if (slave.devotion > 50) { - food *= 1.1; - } else if (slave.devotion < -50) { - food *= 0.8; - } - if (slave.muscles > 30) { // slave is muscular or more - food *= 1.1; - } else if (slave.muscles <= -6) { // slave is weak or less - food *= 0.8; - } - if (slave.weight > 95) { // slave is overweight or more - food *= 0.9; - } else if (slave.weight > 130) { // slave is fat or more - food *= 0.8; - } else if (slave.weight > 160) { // slave is obese or more - food *= 0.7; - } else if (slave.weight > 190) { // slave is very obese or more - food *= 0.6; - } - if (!canSee(slave)) { // slave is blind - food *= 0.6; - } else if (!canSeePerfectly(slave)) { // slave is nearsighted - food *= 0.8; - } - if (slave.hears === -1) { // slave is hard of hearing - food *= 0.8; - } else if (slave.hears < -1) { // slave is deaf - food *= 0.6; - } - food *= restEffects(slave, 20); - food = Math.trunc(food); - food = Math.clamp(food, 1, 1000000000000000000); - return food; -}; - /** * @param {App.Entity.SlaveState} slave * @returns {number} @@ -120,6 +58,14 @@ App.Facilities.Farmyard.farmShowsIncome = function(slave) { } } if (arcology.FSGenderFundamentalist !== "unset") { + if (slave.pregWeek > 16) { + cash *= 1.1; + } else { + if (!setup.fakeBellies.includes(slave.bellyAccessory)) { + cash *= 0.9; + } + } + if (slave.dick > 0) { cash *= 1.1; // TODO: does this make sense? } else {