Skip to content
Snippets Groups Projects
Commit 3b587c25 authored by Arkerthan's avatar Arkerthan
Browse files

Make cloning and ova transplanting easier to navigate

parent b9d824c4
No related branches found
No related tags found
1 merge request!11271Fixes
......@@ -35,11 +35,12 @@ App.UI.cloningWorkaround = function() {
}
));
for (const slave of V.slaves) {
const div = App.UI.DOM.appendNewElement("div", node, App.UI.DOM.referenceSlaveWithPreview(slave, SlaveFullName(slave)));
if (donatrix !== "undecided" && donatrix.ID === slave.ID) {
App.UI.DOM.appendNewElement("div", node, SlaveFullName(slave), "note");
div.classList.add("note");
} else {
App.UI.DOM.appendNewElement("div", node, App.UI.DOM.link(
SlaveFullName(slave),
div.append(" ", App.UI.DOM.link(
"Select",
() => {
V.donatrix = slave;
App.UI.reload();
......@@ -52,18 +53,20 @@ App.UI.cloningWorkaround = function() {
for (const slave of V.slaves) {
if (canBeReceptrix(slave)) {
const name = SlaveFullName(slave);
const div = App.UI.DOM.appendNewElement("div", node, App.UI.DOM.referenceSlaveWithPreview(slave, SlaveFullName(slave)));
if (receptrix !== "undecided" && receptrix.ID === slave.ID) {
App.UI.DOM.appendNewElement("div", node, name, "note");
div.classList.add("note");
} else {
App.UI.DOM.appendNewElement("div", node, App.UI.DOM.link(
name,
div.append(" ", App.UI.DOM.link(
"Select",
() => {
V.receptrix = slave;
App.UI.reload();
}, [], "",
(slave.pregType >= 4) ? `Using a slave carrying multiples is inadvisable` : ``
}
));
if (slave.pregType >= 4) {
App.UI.DOM.appendNewElement("span", div, `Using a slave carrying multiples is inadvisable`, ["note"]);
}
}
eligibility = 1;
}
......
......@@ -8,16 +8,23 @@ App.UI.ovaTransplantWorkaround = function() {
App.UI.DOM.appendNewElement("h2", node, "Select a slave to serve as the host");
for (const slave of V.slaves) {
if ((V.donatrix.ID !== slave.ID && slave.ovaries > 0 || slave.mpreg > 0) && isSlaveAvailable(slave) && slave.preg >= 0 && slave.preg < slave.pregData.normalBirth / 10 && slave.pregWeek >= 0 && slave.pubertyXX === 1 && slave.pregType < 12 && slave.bellyImplant === -1 && slave.broodmother === 0 && slave.inflation <= 2 && slave.physicalAge < 70) {
App.UI.DOM.appendNewElement("div", node, App.UI.DOM.link(
SlaveFullName(slave),
if ((V.donatrix.ID !== slave.ID && slave.ovaries > 0 || slave.mpreg > 0) &&
isSlaveAvailable(slave) && slave.preg >= 0 && slave.preg < slave.pregData.normalBirth / 10 &&
slave.pregWeek >= 0 && slave.pubertyXX === 1 && slave.pregType < 12 && slave.bellyImplant === -1 &&
slave.broodmother === 0 && slave.inflation <= 2 && slave.physicalAge < 70
) {
const div = App.UI.DOM.appendNewElement("div", node, App.UI.DOM.referenceSlaveWithPreview(slave, SlaveFullName(slave)));
div.append(" ", App.UI.DOM.passageLink(
"Select", "Surrogacy",
() => {
V.receptrix = slave;
cashX(forceNeg(V.surgeryCost * 2), "slaveSurgery");
V.surgeryType = "transplant";
}, [], "Surrogacy",
(slave.pregType >= 4) ? `Using a slave carrying multiples is inadvisable` : ``
}
));
if (slave.pregType >= 4) {
App.UI.DOM.appendNewElement("span", div, `Using a slave carrying multiples is inadvisable`, ["note"]);
}
eligibility = 1;
}
}
......
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