From eed8b3db5d896daf093906215a16f2afdaf2c4e4 Mon Sep 17 00:00:00 2001 From: bgutierrez39 <bgutierrez39@gitgud.io> Date: Thu, 15 Sep 2022 09:06:48 -0400 Subject: [PATCH] * Code changed to make it styled more like the rest of the codeblock. * Unnecesary alt in condition removed. * Cheat edit condition added like the rest of the codeblock --- src/facilities/surgery/analyzePregnancy.js | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/src/facilities/surgery/analyzePregnancy.js b/src/facilities/surgery/analyzePregnancy.js index 5149c631ed2..302484e34f8 100644 --- a/src/facilities/surgery/analyzePregnancy.js +++ b/src/facilities/surgery/analyzePregnancy.js @@ -108,13 +108,12 @@ globalThis.analyzePregnancies = function(mother, cheat) { } else { el.append(fetusAbnormalities()); } - if(fetus.genetics.inbreedingCoeff!=undefined) - { - option=options.addCustom(App.UI.DOM.makeElement("div", `Inbreed Coeff: ${fetus.genetics.inbreedingCoeff}`, undefined)); - } - else - { - option=options.addCustom(App.UI.DOM.makeElement("div", `Inbreed Coeff: N/A`, undefined)); + if(genes.inbreedingCoeff!==undefined) + { + option = options.addOption(`Inbreeding coefficient: ${genes.inbreedingCoeff}`, "inbreedingCoeff", genes); + if (cheat) { + option.showTextBox(); + } } } else { if (fetus.age > 13) { -- GitLab