diff --git a/src/interaction/slaveOnSlaveFeedingWorkAround.js b/src/interaction/slaveOnSlaveFeedingWorkAround.js index cde363732ded1fcc848f23c99826a51251ff9e40..84e03d43c92b271e9c656d84a2b217efefd37bfc 100644 --- a/src/interaction/slaveOnSlaveFeedingWorkAround.js +++ b/src/interaction/slaveOnSlaveFeedingWorkAround.js @@ -5,7 +5,6 @@ App.UI.SlaveInteract.slaveOnSlaveFeedingSelection = function(slave) { const el = new DocumentFragment(); V.milkTap = 0; - setup(); el.append(intro()); @@ -42,12 +41,20 @@ App.UI.SlaveInteract.slaveOnSlaveFeedingSelection = function(slave) { } for (const tapSlave of V.slaves) { + let output; + if (inflationType === "milk") { + output = (tapSlave.lactation > 0) ? Math.trunc(milkAmount(tapSlave) / 14) : 0; + } else if (inflationType === "cum") { + output = (tapSlave.balls > 0 && tapSlave.dick > 0 && tapSlave.chastityPenis !== 1) ? Math.trunc(cumAmount(tapSlave) / 70) : 0; + } else { + throw `inflationType "${inflationType}" not found`; + } if (tapSlave.ID !== slave.ID && (inflationType !== "milk" || tapSlave.nipples !== "fuckable")) { - if (tapSlave[`${inflationType}Output`] >= 2) { + if (output >= 2) { twoLiterSlaves.push(createTapLink(tapSlave, 1, inflationType)); - if (tapSlave[`${inflationType}Output`] >= 4 && slave.pregKnown === 0) { + if (output >= 4 && slave.pregKnown === 0) { fourLiterSlaves.push(createTapLink(tapSlave, 2, inflationType)); - if (tapSlave[`${inflationType}Output`] >= 8) { + if (output >= 8) { eightLiterSlaves.push(createTapLink(tapSlave, 3, inflationType)); } } @@ -176,12 +183,4 @@ App.UI.SlaveInteract.slaveOnSlaveFeedingSelection = function(slave) { el.append(App.UI.tabBar.makeTab('milk', makeSpanIded("content-milk", slaveChoice("milk")))); el.append(App.UI.tabBar.makeTab('cum', makeSpanIded("content-cum", slaveChoice("cum")))); } - - function setup() { - for (const tapSlave of V.slaves) { - // Setup - tapSlave.milkOutput = (tapSlave.lactation > 0) ? Math.trunc(milkAmount(tapSlave) / 14) : 0; - tapSlave.cumOutput = (tapSlave.balls > 0 && tapSlave.dick > 0 && tapSlave.chastityPenis !== 1) ? Math.trunc(cumAmount(tapSlave) / 70) : 0; - } - } };