diff --git a/src/js/sexActsJS.js b/src/js/sexActsJS.js index 0e236b95861d2f72d81402f469450a567678a81f..4192a80597b1b89a9c63c0ddeb229aa90919da58 100644 --- a/src/js/sexActsJS.js +++ b/src/js/sexActsJS.js @@ -27,10 +27,10 @@ window.VCheck = (function() { /** call as VCheck.Anal() * @param {number} [times=1] is how many times to increment the anal counts. + * @param {App.Entity.SlaveState} [slave=V.activeSlave] * @returns {string} */ - function AnalVCheck(times = 1) { - const slave = V.activeSlave; + function AnalVCheck(times = 1, slave = V.activeSlave) { let r = ''; setScopedPronouns(slave); @@ -72,10 +72,10 @@ window.VCheck = (function() { /** call as VCheck.Vaginal() * @param {number} [times=1] is how many times to increment the vaginal counts. + * @param {App.Entity.SlaveState} [slave=V.activeSlave] * @returns {string} */ - function VaginalVCheck(times = 1) { - const slave = V.activeSlave; + function VaginalVCheck(times = 1, slave = V.activeSlave) { let r = ''; setScopedPronouns(slave); @@ -119,10 +119,10 @@ window.VCheck = (function() { /** call as VCheck.Both() * @param {number} [analTimes=1] how many times to increment the anal counts, if there is no vagina available. * @param {number} [bothTimes=1] how many times to increment both holes counts (usually it is half of analTimes). + * @param {App.Entity.SlaveState} [slave=V.activeSlave] * @returns {string} */ - function BothVCheck(analTimes = 1, bothTimes = 1) { - const slave = V.activeSlave; + function BothVCheck(analTimes = 1, bothTimes = 1, slave = V.activeSlave) { let r = ''; setScopedPronouns(slave); @@ -232,13 +232,14 @@ window.VCheck = (function() { /** call as VCheck.Simple() * @param {number} [times=1] how many times to increment either the Vaginal or the Anal counts, if there is no Vagina available. + * @param {App.Entity.SlaveState} [slave=V.activeSlave] * @returns {string} */ - function SimpleVCheck(times = 1) { - if (canDoVaginal(State.variables.activeSlave)) { - return VaginalVCheck(times); - } else if (canDoAnal(State.variables.activeSlave)) { - return AnalVCheck(times); + function SimpleVCheck(times = 1, slave = V.activeSlave) { + if (canDoVaginal(slave)) { + return VaginalVCheck(times, slave); + } else if (canDoAnal(slave)) { + return AnalVCheck(times, slave); } }