From 06058e4fcc87a7e1cef92cf5911062be83ecd4ff Mon Sep 17 00:00:00 2001 From: Svornost <11434-svornost@users.noreply.gitgud.io> Date: Sun, 18 Oct 2020 13:02:32 -0700 Subject: [PATCH] Farmyard report fixes 1. Don't output Farmer age bonus description twice. 2. Allow Farmer to get relationship bonuses with more than just her first farmhand. 3. Clean up intro construction a bit. --- .../farmyard/reports/farmyardReport.js | 23 ++++--------------- 1 file changed, 5 insertions(+), 18 deletions(-) diff --git a/src/facilities/farmyard/reports/farmyardReport.js b/src/facilities/farmyard/reports/farmyardReport.js index ed82b5ab480..7720f7bf7ea 100644 --- a/src/facilities/farmyard/reports/farmyardReport.js +++ b/src/facilities/farmyard/reports/farmyardReport.js @@ -94,7 +94,6 @@ App.Facilities.Farmyard.farmyardReport = function farmyardReport() { r.push(farmerRelationshipPC(Farmer)); r.push(farmerFetishEffects(Farmer, farmerFetish(Farmer))); r.push(farmerSkill(Farmer)); - r.push(farmerAgeSkill(Farmer)); r.push(farmerExperience(Farmer)); r.push(farmerTiredness(Farmer)); r.push(farmerIntelligence(Farmer)); @@ -178,9 +177,9 @@ App.Facilities.Farmyard.farmyardReport = function farmyardReport() { function farmerRelationshipSlaves(Farmer) { const {he, his, He} = getPronouns(Farmer); - for (const slave of slaves) { - let r = []; + let r = []; + for (const slave of slaves) { if (Farmer.rivalryTarget === slave.ID) { r.push(`${He} leverages the fact that ${he} is ${slave.slaveName}'s superior to make ${his} ${rivalryTerm(Farmer)}'s life a living hell.`); slave.devotion -= 2; slave.trust -= 2; @@ -204,9 +203,9 @@ App.Facilities.Farmyard.farmyardReport = function farmyardReport() { r.push(`${He} pays special attention to ${his} ${relativeTerm(Farmer, slave)}, ${slave.slaveName}, making sure ${he} is treated well and showing off ${his} skills.`); slave.trust++; } - - return r; } + + return r; } function farmerContracts(slave) { @@ -232,14 +231,6 @@ App.Facilities.Farmyard.farmyardReport = function farmyardReport() { } } - function farmerAgeSkill(slave) { - const {His} = getPronouns(slave); - - if (slave.actualAge > 35) { - return `${His} age and experience also contribute.`; - } - } - function farmerIntelligence(slave) { const {He} = getPronouns(slave); @@ -358,9 +349,7 @@ App.Facilities.Farmyard.farmyardReport = function farmyardReport() { if (slaves) { const intro = App.UI.DOM.appendNewElement("p", frag, '', "indent"); - let r = []; - - r.push(farmhandCount(slaves.length)); + $(intro).append(farmhandCount(slaves.length)); for (const slave of slaves) { V.i = V.slaveIndices[slave.ID]; // FIXME: V.i is deprecated @@ -403,8 +392,6 @@ App.Facilities.Farmyard.farmyardReport = function farmyardReport() { App.SlaveAssignment.standardSlaveReport(slave, true); } } - - $(intro).append(r); } -- GitLab