From 025fc929cde2e2d5c4f72d23e013e8ff0cae1b30 Mon Sep 17 00:00:00 2001 From: lowercasedonkey <lowercasedonkey@gmail.com> Date: Fri, 4 Dec 2020 21:31:07 -0500 Subject: [PATCH] clean up undocumented assignments to slave state --- .../slaveOnSlaveFeedingWorkAround.js | 23 +++++++++---------- 1 file changed, 11 insertions(+), 12 deletions(-) diff --git a/src/interaction/slaveOnSlaveFeedingWorkAround.js b/src/interaction/slaveOnSlaveFeedingWorkAround.js index cde363732de..84e03d43c92 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; - } - } }; -- GitLab