From aac58b94a686d6827dc18f641d882de22342b16b Mon Sep 17 00:00:00 2001 From: lowercasedonkey <lowercasedonkey@gmail.com> Date: Sun, 21 Mar 2021 22:47:59 -0400 Subject: [PATCH] genesquirks and more --- src/facilities/surgery/analyzePregnancy.js | 47 +++++++++++++++------- 1 file changed, 33 insertions(+), 14 deletions(-) diff --git a/src/facilities/surgery/analyzePregnancy.js b/src/facilities/surgery/analyzePregnancy.js index caded0b9273..3ab1a710213 100644 --- a/src/facilities/surgery/analyzePregnancy.js +++ b/src/facilities/surgery/analyzePregnancy.js @@ -21,11 +21,13 @@ globalThis.analyzePregnancies = function(mother, cheat) { options.addOption(`Ova: ${genes.name}`, "name", genes).showTextBox(); options.addOption(`Age: ${Math.trunc(fetus.age * 1000) / 1000}`, "age", fetus).showTextBox(); if (V.geneticMappingUpgrade >= 1) { - options.addOption(`Gender: ${genes.gender}`, "age", fetus).showTextBox(); - options.addOption(`Father ID: ${genes.father}`, "father", genes).showTextBox(); - options.addOption(`Father Name: ${(genes.fatherName) ? genes.fatherName : `name not registered`}`, "father", genes); - options.addOption(`Mother ID: ${genes.mother}`, "mother", genes).showTextBox(); - options.addOption(`Mother Name: ${(genes.motherName) ? genes.motherName : `name not registered`}`, "motherName", genes); + option = options.addOption(`Gender: ${genes.gender}`, "age", fetus); + if (cheat) { + option.addValue("Female", "XX"); + option.addValue("Male", "XY"); + } + options.addOption(`Father name: ${(genes.fatherName) ? genes.fatherName : `name not registered`}; ID: ${genes.father}`, "father", genes).showTextBox(); + options.addOption(`Mother name: ${(genes.motherName) ? genes.motherName : `name not registered`}; ID: ${genes.mother}`, "mother", genes).showTextBox(); options.addOption(`Nationality: ${genes.nationality}`, "nationality", genes).showTextBox(); if (V.seeRace === 1) { options.addOption(`Race: ${capFirstChar(genes.race)}`, "race", genes).showTextBox().pulldown() @@ -43,19 +45,36 @@ globalThis.analyzePregnancies = function(mother, cheat) { for (const color of App.Medicine.Modification.Color.Primary.map(color => color.value)) { option.addValue(capFirstChar(color), color); } + options.addOption(`Pubic hair: ${capFirstChar(genes.pubicHStyle)}`, "pubicHStyle", genes).showTextBox().pulldown() + .addValue("hairless") + .addValueList(App.Medicine.Modification.pubicStyles); - if (genes.underArmHStyle === "hairless" && genes.pubicHStyle === "hairless") { - options.addOption(`Body hair: None`); - } else if (genes.underArmHStyle === "hairless") { - options.addOption(`Body hair: Lacks underarm hair`); - } else if (genes.pubicHStyle === "hairless") { - options.addOption(`Body hair: Lacks pubic hair`); - } + options.addOption(`Armpit hair: ${capFirstChar(genes.underArmHStyle)}`, "underArmHStyle", genes).showTextBox().pulldown() + .addValue("hairless") + .addValueList(App.Medicine.Modification.armpitStyles); if (genes.markings === "freckles" || genes.markings === "heavily freckled") { - options.addOption(`Markings: ${capFirstChar(genes.markings)}`, "markings", genes).showTextBox(); + options.addOption(`Markings: ${capFirstChar(genes.markings)}`, "markings", genes) + .addValueList([ + ["None", "none"], + ["Freckles", "freckles"], + ["Heavily freckled", "heavily freckled"], + ["Beauty mark", "beauty mark"], + ["Birthmark", "birthmark"], + ]); + } + if (cheat) { + for (const [key, obj] of App.Data.genes) { + options.addOption(capFirstChar(obj.title), key, genes.geneticQuirks) + .addComment(capFirstChar(obj.description)) + .addValue("off", 0).off() + .addValue("carrier", 1) + .addValue("on", 2).on(); + } } el.append(options.render()); - el.append(fetusAbnormalities()); + if (!cheat) { + el.append(fetusAbnormalities()); + } } else { if (fetus.age > 13) { App.UI.DOM.appendNewElement("div", el, `Gender: ${genes.gender}`); -- GitLab