Skip to content
Snippets Groups Projects
Commit 058648f7 authored by Pregmodder's avatar Pregmodder
Browse files

Merge branch 'dedupe-termination-option' into 'pregmod-master'

dedupe termination option

See merge request pregmodfan/fc-pregmod!9185
parents 935cf603 231e7a4c
No related branches found
No related tags found
No related merge requests found
......@@ -125,17 +125,7 @@ globalThis.analyzePregnancies = function(mother, cheat) {
}
if (fetus.age < 4 && (V.arcologies[0].FSRestart === "unset" || V.eugenicsFullControl === 1 || mother.breedingMark === 0 || V.propOutcome === 0 || (fetus.fatherID !== -1 && fetus.fatherID !== -6))) {
option = options.addOption(`Surgical options`)
.customButton(
"Terminate ovum",
() => {
WombRemoveFetus(mother, i);
if (mother.preg === 0) {
mother.pregWeek = -1;
}
},
passage()
);
option = terminateOvum();
if (V.surgeryUpgrade === 1) {
option.customButton(
"Transplant ovum",
......@@ -197,17 +187,7 @@ globalThis.analyzePregnancies = function(mother, cheat) {
} else {
App.UI.DOM.appendNewElement("div", el, `Unidentified ova found, no detailed data available.`);
App.UI.DOM.appendNewElement("div", el, `Age: too early for scan.`);
option = options.addOption(`Surgical options`)
.customButton(
`Terminate ovum`,
() => {
WombRemoveFetus(mother, i);
if (mother.preg === 0) {
mother.pregWeek = -1;
}
},
passage()
);
option = terminateOvum();
if (V.surgeryUpgrade === 1) {
option.customButton(
......@@ -244,6 +224,20 @@ globalThis.analyzePregnancies = function(mother, cheat) {
}
return div;
}
function terminateOvum() {
return options.addOption(`Surgical options`)
.customButton(
`Terminate ovum`,
() => {
WombRemoveFetus(mother, i);
if (mother.preg === 0) {
mother.pregWeek = -1;
}
},
passage()
);
}
}
};
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