From cd1e231df0dd8636795a1de490b36ec94db05eb3 Mon Sep 17 00:00:00 2001 From: lowercasedonkey <lowercasedonkey@gmail.com> Date: Mon, 19 Oct 2020 00:04:11 -0400 Subject: [PATCH] fix slave display --- src/facilities/incubator/incubatorInteract.js | 22 +++++++++++-------- 1 file changed, 13 insertions(+), 9 deletions(-) diff --git a/src/facilities/incubator/incubatorInteract.js b/src/facilities/incubator/incubatorInteract.js index a4b9e61e474..2c522f37a17 100644 --- a/src/facilities/incubator/incubatorInteract.js +++ b/src/facilities/incubator/incubatorInteract.js @@ -184,10 +184,11 @@ App.UI.incubator = function() { const qlIncubator = document.createElement("div"); qlIncubator.id = "qlIncubator"; for (const slave of V.slaves) { - const { - His, his - } = getPronouns(slave); if (slave.preg > 0 && slave.broodmother === 0 && slave.pregKnown === 1 && slave.eggType === "human") { + const { + His, his + } = getPronouns(slave); + const r = []; if ((slave.assignment === "work in the dairy" && V.dairyPregSetting > 0) || slave.assignment === "be your agent" || slave.assignment === "live with your agent") { } else { const _slaveId = "slave-" + slave.ID; @@ -199,17 +200,21 @@ App.UI.incubator = function() { const momDiv = document.createElement("div"); momDiv.id = _slaveId; momDiv.classList.add("possible"); + momDiv["data-preg-count"] = _WL; + momDiv["data-reserved-spots"] = _reservedIncubator; + momDiv["data-preg-week"] = _pregWeek; + momDiv["data-name"] = _slaveName; linkArray = []; const choices = document.createElement("div"); choices.classList.add("choices"); // <div class="possible" @id="_slaveId" @data-preg - count="_WL" @data-reserved - spots="_reservedIncubator" @data-preg - week="_pregWeek" @data-name="_slaveName" > - r.push(`${App.UI.slaveDescriptionDialog(slave)}`); + r.push(App.UI.DOM.slaveDescriptionDialog(slave)); r.push(` is ${slave.pregWeek} week`); if (slave.pregWeek > 1) { r.push(`s`); } - r.push(` pregnant with`); + r.push(`pregnant with`); if (slave.pregSource === 0 || slave.preg <= 5) { r.push(`someone's`); if (slave.preg <= 5) { @@ -238,11 +243,10 @@ App.UI.incubator = function() { } } if (_WL > 1) { - r.push(`${_WL} babies`); + r.push(`${_WL} babies.`); } else { - r.push(`baby`); + r.push(`baby.`); } - r.push(`.`); if (_reservedIncubator > 0) { _childrenReserved = 1; if (_WL === 1) { @@ -1558,7 +1562,7 @@ App.UI.incubator = function() { if (V.tanks[_inc].growTime <= 0) { V.incubatorOldID = V.tanks[_inc].ID; /* single slave case */ - const _tempObject = {object: V.tanks[_inc], ID: V.tanks[_inc].ID}; + const _tempObject = { object: V.tanks[_inc], ID: V.tanks[_inc].ID }; V.newSlavePool.push(clone(_tempObject)); V.tanks.splice(_inc, 1); _inc--; -- GitLab