diff --git a/src/interaction/slaveOnSlaveFeedingWorkAround.js b/src/interaction/slaveOnSlaveFeedingWorkAround.js index 189e7720372f4085034879227336ad08b6954920..87f1245be2c0e3418a994c7e47b088e87c63b647 100644 --- a/src/interaction/slaveOnSlaveFeedingWorkAround.js +++ b/src/interaction/slaveOnSlaveFeedingWorkAround.js @@ -5,6 +5,8 @@ App.UI.SlaveInteract.slaveOnSlaveFeedingSelection = function(slave) { const el = new DocumentFragment(); V.milkTap = 0; + setup(); + el.append(intro()); tabs(); @@ -20,7 +22,7 @@ App.UI.SlaveInteract.slaveOnSlaveFeedingSelection = function(slave) { return el; } - function slaveChoice(inflationType) { // Tabs maybe? + function slaveChoice(inflationType) { const el = new DocumentFragment(); const twoLiterSlaves = []; const fourLiterSlaves = []; @@ -40,10 +42,6 @@ App.UI.SlaveInteract.slaveOnSlaveFeedingSelection = function(slave) { } for (const tapSlave of V.slaves) { - // Setup - slave.milkOutput = (slave.lactation > 0) ? Math.trunc(milkAmount(slave) / 14) : 0; - slave.cumOutput = (slave.balls > 0 && slave.dick > 0 && slave.chastityPenis !== 1) ? Math.trunc(cumAmount(slave) / 70) : 0; - if (tapSlave.ID !== slave.ID && tapSlave.nipples !== "fuckable") { if (tapSlave[`${inflationType}Output`] >= 2) { twoLiterSlaves.push(createTapLink(tapSlave, 1, inflationType)); @@ -73,9 +71,9 @@ App.UI.SlaveInteract.slaveOnSlaveFeedingSelection = function(slave) { } const dataRow = document.createElement("tr"); - dataRow.append(makeColumn(twoLiterSlaves, 0)); - dataRow.append(makeColumn(fourLiterSlaves, 1)); - dataRow.append(makeColumn(eightLiterSlaves, 2)); + dataRow.append(makeColumn(twoLiterSlaves)); + dataRow.append(makeColumn(fourLiterSlaves)); + dataRow.append(makeColumn(eightLiterSlaves)); table.append(dataRow); return el; @@ -141,7 +139,7 @@ App.UI.SlaveInteract.slaveOnSlaveFeedingSelection = function(slave) { return el; } - function makeColumn(array, index) { + function makeColumn(array) { const td = document.createElement("td"); for (const cell of array) { td.append(cell); @@ -177,9 +175,13 @@ 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")))); + } - - el.append(slaveChoice("milk")); - el.append(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; + } } };