diff --git a/devTools/FC.d.ts b/devTools/FC.d.ts index 19c0f79fbcc87ee64d8e3b3912141584e2d10edc..46779cb572d3dcc6ea6f0322200434680a81b0e5 100644 --- a/devTools/FC.d.ts +++ b/devTools/FC.d.ts @@ -42,6 +42,10 @@ declare namespace App { namespace Debug {} namespace Desc {} + namespace Encyclopedia { + namespace Entries {} + } + namespace Entity { class Serializable {} diff --git a/js/002-config/fc-js-init.js b/js/002-config/fc-js-init.js index 7f6482afd104d9f214bd39cf9002e64c8796d2f4..c3a378971a317816924c8ba2f1e11da0f662b2c0 100644 --- a/js/002-config/fc-js-init.js +++ b/js/002-config/fc-js-init.js @@ -10,6 +10,8 @@ App.Arcology = { App.Art = {}; App.Data = {}; App.Debug = {}; +App.Encyclopedia = {}; +App.Encyclopedia.Entries = {}; App.Entity = {}; App.Entity.Utils = {}; App.MainView = {}; diff --git a/src/002-config/mousetrapConfig.js b/src/002-config/mousetrapConfig.js index bae8064f053960b41c22fb8489e3122a81ab75b3..1007d1f07271562f06aea98bcc4a3df159143d88 100644 --- a/src/002-config/mousetrapConfig.js +++ b/src/002-config/mousetrapConfig.js @@ -54,10 +54,10 @@ Mousetrap.bind("h", function() { $("#manageHG a").trigger("click"); }); Mousetrap.bind("s", function() { - $("#buySlaves a.macro-link").trigger("click"); + $("#buySlaves a").trigger("click"); }); Mousetrap.bind("a", function() { - $("#managePA a.macro-link").trigger("click"); + $("#managePA a").trigger("click"); }); Mousetrap.bind("b", function() { $("#manageBG a").trigger("click"); diff --git a/src/003-assets/CSS/slaveList.css b/src/003-assets/CSS/slaveList.css index 02752b4df4063806c8b2144b96f5c587ae99facb..a6a15b2b3d30a9cb5982777fa761e3360dfae282 100644 --- a/src/003-assets/CSS/slaveList.css +++ b/src/003-assets/CSS/slaveList.css @@ -2,8 +2,13 @@ div.slaveSummary { clear: both; } -div.slaveSummary.card { +.slaveSummary.card { border-radius: 8px; + border-top: 2px #333333; + border-left: 2px #333333; + border-bottom: 0; + border-right: 0; + border-style: solid; background-color: #1a1a1a; box-shadow: 10px 10px 5px black; padding: 10px; diff --git a/src/003-assets/CSS/tabs.css b/src/003-assets/CSS/tabs.css index 125de5fdfcf5c0839480d0bc0ae8234b8a24de4c..1f972210d691fff9990db931f5c2d915e8d3537e 100644 --- a/src/003-assets/CSS/tabs.css +++ b/src/003-assets/CSS/tabs.css @@ -14,6 +14,16 @@ div.tabbar button { font-size: large; } +div.tabbar button.card { + border-top-left-radius: 15px; + border-top-right-radius: 15px; + border: none; +} + +div.tabbar button.card.active { + background-color: #1a1a1a; +} + div.tabbar button:hover { background-color: #414141; } @@ -23,13 +33,31 @@ div.tabbar button.active { color: #c7cedf; } -.tabcontent { +div.tabbar a.active { + color: white; + pointer-events: none; + cursor: default; +} + +.tabcontent:not(.noFade) { display: none; padding: 6px 12px; -webkit-animation: fadeEffect 0.3s; animation: fadeEffect 0.3s; } +.tabcontent.card { + border-radius: 0 8px 8px 8px; + background-color: #1a1a1a; + box-shadow: 10px 10px 5px black; + margin-bottom: 15px; +} + + +.tabcontent.card .slaveSummary.card { + background-color: #252525; +} + @-webkit-keyframes fadeEffect { from { opacity: 0; diff --git a/src/cheats/mod_EditSlaveCheatDatatypeCleanup.tw b/src/cheats/mod_EditSlaveCheatDatatypeCleanup.tw index 8daeaa606527f4443f6ad2da8e1968faad9fbca0..259d748bfbaa74c177b5e2c72ed4ca88aa5e50b6 100644 --- a/src/cheats/mod_EditSlaveCheatDatatypeCleanup.tw +++ b/src/cheats/mod_EditSlaveCheatDatatypeCleanup.tw @@ -1,6 +1,6 @@ :: MOD_Edit Slave Cheat Datatype Cleanup [nobr] -<<set $nextButton = "Continue", $nextLink = "Slave Interact">> +<<set $nextButton = "Continue", $nextLink = "AS Dump", $returnTo = "Slave Interact">> /* Cancel Option Check */ <<if $tempSlave == "unset">> <<unset $tempSlave>> diff --git a/src/cheats/mod_EditSlaveCheatDatatypeCleanupNew.tw b/src/cheats/mod_EditSlaveCheatDatatypeCleanupNew.tw index fb9854ded3321576c73bddf4236380c4c9fc3e76..bf96dec6d138ce696bfe3cf57a7b03306b3b9b76 100644 --- a/src/cheats/mod_EditSlaveCheatDatatypeCleanupNew.tw +++ b/src/cheats/mod_EditSlaveCheatDatatypeCleanupNew.tw @@ -1,6 +1,6 @@ :: MOD_Edit Slave Cheat Datatype Cleanup New [nobr] -<<set $nextButton = "Continue", $nextLink = "Slave Interact">> +<<set $nextButton = "Continue", $nextLink = "AS Dump", $returnTo = "Slave Interact">> /* Cancel Option Check */ <<if $tempSlave == "unset">> <<unset $tempSlave>> diff --git a/src/gui/Encyclopedia/encyclopedia.css b/src/gui/Encyclopedia/encyclopedia.css new file mode 100644 index 0000000000000000000000000000000000000000..9cd84398b514dfad886a5eef12650c5f4a6fc474 --- /dev/null +++ b/src/gui/Encyclopedia/encyclopedia.css @@ -0,0 +1,3 @@ +.encyclopedia.topic { + font-weight: bold; +} diff --git a/src/gui/Encyclopedia/encyclopedia.tw b/src/gui/Encyclopedia/encyclopedia.tw index adff1a2a021c54671033d639aff5ab8c88ebcab7..37deb257ed0749ab4255f99a304521a631f5d60b 100644 --- a/src/gui/Encyclopedia/encyclopedia.tw +++ b/src/gui/Encyclopedia/encyclopedia.tw @@ -867,56 +867,56 @@ SLAVE ASSIGNMENTS: SLAVE ASSIGNMENTS (COMMON): **********/ <<case "Attending Classes">> - <<encyclopediaEntryAttendingClasses>> + <<print App.UI.DOM.includeDOM(App.Encyclopedia.Entries.attendingClasses(), "encyclasses")>> //Associated facility: [[Schoolroom|Encyclopedia][$encyclopedia = "Schoolroom"]]// <<case "Confinement">> - <<encyclopediaEntryConfinement>> + <<print App.UI.DOM.includeDOM(App.Encyclopedia.Entries.confinement(), "encyconfine")>> //Associated facility: [[Cellblock|Encyclopedia][$encyclopedia = "Cellblock"]]// <<case "Fucktoy">> - <<encyclopediaEntryFucktoy>> + <<print App.UI.DOM.includeDOM(App.Encyclopedia.Entries.fucktoy(), "encyfucktoy")>> //Associated facility: [[Master Suite|Encyclopedia][$encyclopedia = "Master Suite"]]// <<case "Glory Hole">> - <<encyclopediaEntryGloryHole>> + <<print App.UI.DOM.includeDOM(App.Encyclopedia.Entries.gloryHole(), "encyglory")>> //Associated facility: [[Arcade|Encyclopedia][$encyclopedia = "Arcade"]]// <<case "Milking">> - <<encyclopediaEntryMilking>> + <<print App.UI.DOM.includeDOM(App.Encyclopedia.Entries.milking(), "encymilk")>> //Associated facility: [[Dairy|Encyclopedia][$encyclopedia = "Dairy"]]// <<case "Farming">> - <<encyclopediaEntryFarming>> + <<print App.UI.DOM.includeDOM(App.Encyclopedia.Entries.farming(), "encyfarm")>> //Associated facility: [[Farmyard|Encyclopedia][$encyclopedia = "Farmyard"]]// <<case "Public Service">> - <<encyclopediaEntryPublicService>> + <<print App.UI.DOM.includeDOM(App.Encyclopedia.Entries.publicService(), "encypublic")>> //Associated facility: [[Club|Encyclopedia][$encyclopedia = "Club"]]// <<case "Rest">> - <<encyclopediaEntryRest>> + <<print App.UI.DOM.includeDOM(App.Encyclopedia.Entries.rest(), "encyrest")>> //Associated facilities: [[Spa|Encyclopedia][$encyclopedia = "Spa"]], [[Clinic|Encyclopedia][$encyclopedia = "Clinic"]]// <<case "Sexual Servitude">> - <<encyclopediaEntrySexualServitude>> + <<print App.UI.DOM.includeDOM(App.Encyclopedia.Entries.sexualServitude(), "encysexServ")>> <<case "Servitude">> - <<encyclopediaEntryServitude>> + <<print App.UI.DOM.includeDOM(App.Encyclopedia.Entries.servitude(), "encyserve")>> //Associated facility: [[Servants' Quarters|Encyclopedia][$encyclopedia = "Servants' Quarters"]]// <<case "Whoring">> - <<encyclopediaEntryWhoring>> + <<print App.UI.DOM.includeDOM(App.Encyclopedia.Entries.whoring(), "encywhore")>> //Associated facility: [[Brothel|Encyclopedia][$encyclopedia = "Brothel"]]// /********** diff --git a/src/gui/Encyclopedia/encyclopediaEntries.js b/src/gui/Encyclopedia/encyclopediaEntries.js new file mode 100644 index 0000000000000000000000000000000000000000..d001c999475654e7b3b2f0812d0499db8dee2b09 --- /dev/null +++ b/src/gui/Encyclopedia/encyclopediaEntries.js @@ -0,0 +1,96 @@ +/* TODO: add entries for Nursery */ + +App.Encyclopedia.Entries = (function() { + /** + * @param {string} topic + * @returns {HTMLElement} + */ + function topic(topic) { + return App.UI.DOM.makeElement("span", topic, ["encyclopedia", "topic"]); + } + + /** + * @param {string} linkText + * @param {string} topic + * @returns {HTMLElement} + */ + function encyLink(linkText, topic) { + return App.UI.DOM.passageLink(linkText, "Encyclopedia", () => { + V.encyclopedia = topic; + if (passage() !== "Encyclopedia") { + V.nextButton = "Back"; + V.nextLink = "Main"; + } + }); + } + + const entries = {}; + + entries.attendingClasses = () => + App.UI.DOM.combineNodes(topic("Attending classes"), + " is an assignment which educates the slave, raising intelligence if possible. Being educated raises value and is useful for some jobs and leadership positions."); + + entries.confinement = () => + App.UI.DOM.combineNodes(topic("Confinement"), + " is an assignment which accelerates breaking for disobedient slaves. If a slave isn't obedient enough to work and isn't ", + encyLink("unhealthy", "Health"), " enough to need rest, this will make them useful sooner."); + + entries.fucktoy = () => + App.UI.DOM.combineNodes(topic("Fucktoy service"), + " is an assignment which keeps the slave close and under the player's eye. It's mostly just for fun, but fucktoys can improve reputation based on their beauty, and the player character's attention can be targeted to areas of the slave's body with possible fetish effects on happy slaves."); + + entries.gloryHole = () => + App.UI.DOM.combineNodes(topic("Occupying a glory hole"), + " is an assignment which makes money off of slaves regardless of their beauty, skills, or feelings; it's not fun or ", + encyLink("healthy", "Health"), " but very powerful for extracting ¤ out of otherwise useless slaves."); + + entries.milking = () => { + const fragment = document.createDocumentFragment(); + + fragment.append(topic("Getting milked"), + " is an assignment which makes money from lactation based on a slave's breasts, ", encyLink("health", "Health"), + " and hormonal status."); + if (V.seeDicks > 0) { + fragment.append(" Cows with balls will also give semen."); + } + fragment.append(` Creates profit quickly from slaves with big tits${V.seeDicks ? " or balls" : ""}.`); + + return fragment; + }; + + entries.farming = function() { + const fragment = document.createDocumentFragment(); + fragment.append(topic("Farming"), " is an assignment which produces ", encyLink("food", "Food"), + " from your slaves' hard work"); + if (V.seeBestiality === 1) { + fragment.append(" and allows you to breed slaves with animals"); + } + fragment.append(". Can also reduce arcology upkeep with upgrades in the ", + encyLink("Farmyard", "Farmyard")); + return fragment; + }; + + entries.publicService = () => + App.UI.DOM.combineNodes(topic("Public Service"), + " is an assignment which increases reputation based on a slave's beauty, sexual appeal, and skills. Very similar to whoring, but for reputation rather than money."); + + entries.rest = () => + App.UI.DOM.combineNodes(topic("Rest"), " is an assignment mostly used to improve ", encyLink("health", "Health"), + ". It can be useful to order slaves you wish to intensively modify to rest, since most modifications damage health. It will synergize with curative treatments, providing bonus healing when both are simultaneously applied."); + + + entries.sexualServitude = () => + App.UI.DOM.combineNodes(topic("Sexual servitude"), + " is an assignment which pleases other slaves by forcing the slave to service them sexually. Useful for driving the targeted slave's ", + encyLink("devotion", "Devotion"), "up quickly."); + + entries.servitude = () => + App.UI.DOM.combineNodes(topic("Servitude"), " is an assignment which reduces your upkeep based on the slave's ", + encyLink("devotion", "Devotion"), + " Available at lower obedience than other jobs, is insensitive to the quality of a slave's body, and doesn't require skills; a good transitional assignment. Unusually, low sex drive is advantageous as a servant, since it reduces distraction. Lactating slaves are slightly better at this job, since they can contribute to their fellow slaves' nutrition."); + + entries.whoring = () => + App.UI.DOM.combineNodes(topic("Whoring"), " is an assignment which makes money based on a slave's beauty, sexual appeal, and skills. Good whores take a long time to train and beautify but become very profitable."); + + return entries; +})(); diff --git a/src/gui/Encyclopedia/encyclopediaWidgets.tw b/src/gui/Encyclopedia/encyclopediaWidgets.tw deleted file mode 100644 index e8e0bca00256ac1afdb7bf7e4af1038f2784fa89..0000000000000000000000000000000000000000 --- a/src/gui/Encyclopedia/encyclopediaWidgets.tw +++ /dev/null @@ -1,94 +0,0 @@ -:: Encyclopedia Widgets [nobr widget] - -/* TODO: add entries for Nursery */ - -<<widget "encyclopediaEntryAttendingClasses">> -''Attending classes'' is an assignment which educates the slave, raising intelligence if possible. Being educated raises value and is useful for some jobs and leadership positions. -<</widget>> - -<<widget "encyclopediaEntryConfinement">> -''Confinement'' is an assignment which accelerates breaking for disobedient slaves. If a slave isn't obedient enough to work and isn't -<<if passage() == "Encyclopedia">> - [[unhealthy|Encyclopedia][$encyclopedia = "Health"]] -<<else>> - [[unhealthy|Encyclopedia][$encyclopedia = "Health",$nextButton = "Back",$nextLink = "Main"]] -<</if>> -enough to need rest, this will make them useful sooner. -<</widget>> - -<<widget "encyclopediaEntryFucktoy">> -''Fucktoy service'' is an assignment which keeps the slave close and under the player's eye. It's mostly just for fun, but fucktoys can improve reputation based on their beauty, and the player character's attention can be targeted to areas of the slave's body with possible fetish effects on happy slaves. -<</widget>> - -<<widget "encyclopediaEntryGloryHole">> -''Occupying a glory hole'' is an assignment which makes money off of slaves regardless of their beauty, skills, or feelings; it's not fun or -<<if passage() == "Encyclopedia">> - [[healthy|Encyclopedia][$encyclopedia = "Health"]], -<<else>> - [[healthy|Encyclopedia][$encyclopedia = "Health",$nextButton = "Back",$nextLink = "Main"]], -<</if>> -but very powerful for extracting ¤ out of otherwise useless slaves. -<</widget>> - -<<widget "encyclopediaEntryMilking">> -''Getting milked'' is an assignment which makes money from lactation based on a slave's breasts, -<<if passage() == "Encyclopedia">> - [[health|Encyclopedia][$encyclopedia = "Health"]], -<<else>> - [[health|Encyclopedia][$encyclopedia = "Health",$nextButton = "Back",$nextLink = "Main"]], -<</if>> -and hormonal status.<<if $seeDicks > 0>> Cows with balls will also give semen.<</if>> Creates profit quickly from slaves with big tits<<if $seeDicks > 0>> or balls<</if>>. -<</widget>> - -<<widget "encyclopediaEntryFarming">> -''Farming'' is an assignment which produces -<<if passage() == "Encyclopedia">> - [[food|Encyclopedia][$encyclopedia = "Food"]] -<<else>> - [[food|Encyclopedia][$encyclopedia = "Food",$nextButton = "Back",$nextLink = "Main"]] -<</if>> -from your slaves' hard work<<if $seeBestiality == 1>> and allows you to breed slaves with animals<</if>>. Can also reduce arcology upkeep with upgrades in the -<<if passage() == "Encyclopedia">> - [[Farmyard|Encyclopedia][$encyclopedia = "Farmyard"]]. -<<else>> - [[Farmyard|Encyclopedia][$encyclopedia = "Farmyard",$nextButton = "Back",$nextLink = "Main"]]. -<</if>> -<</widget>> - -<<widget "encyclopediaEntryPublicService">> -''Public Service'' is an assignment which increases reputation based on a slave's beauty, sexual appeal, and skills. Very similar to whoring, but for reputation rather than money. -<</widget>> - -<<widget "encyclopediaEntryRest">> -''Rest'' is an assignment mostly used to improve -<<if passage() == "Encyclopedia">> - [[health|Encyclopedia][$encyclopedia = "Health"]]. -<<else>> - [[health|Encyclopedia][$encyclopedia = "Health",$nextButton = "Back",$nextLink = "Main"]]. -<</if>> -It can be useful to order slaves you wish to intensively modify to rest, since most modifications damage health. It will synergize with curative treatments, providing bonus healing when both are simultaneously applied. -<</widget>> - -<<widget "encyclopediaEntrySexualServitude">> -''Sexual servitude'' is an assignment which pleases other slaves by forcing the slave to service them sexually. Useful for driving the targeted slave's -<<if passage() == "Encyclopedia">> - [[devotion|Encyclopedia][$encyclopedia = "Devotion"]] -<<else>> - [[devotion|Encyclopedia][$encyclopedia = "Devotion",$nextButton = "Back",$nextLink = "Main"]] -<</if>> -up quickly. -<</widget>> - -<<widget "encyclopediaEntryServitude">> -''Servitude'' is an assignment which reduces your upkeep based on the slave's -<<if passage() == "Encyclopedia">> - [[devotion|Encyclopedia][$encyclopedia = "Devotion"]]. -<<else>> - [[devotion|Encyclopedia][$encyclopedia = "Devotion",$nextButton = "Back",$nextLink = "Main"]]. -<</if>> -Available at lower obedience than other jobs, is insensitive to the quality of a slave's body, and doesn't require skills; a good transitional assignment. Unusually, low sex drive is advantageous as a servant, since it reduces distraction. Lactating slaves are slightly better at this job, since they can contribute to their fellow slaves' nutrition. -<</widget>> - -<<widget "encyclopediaEntryWhoring">> -''Whoring'' is an assignment which makes money based on a slave's beauty, sexual appeal, and skills. Good whores take a long time to train and beautify but become very profitable. -<</widget>> \ No newline at end of file diff --git a/src/gui/css/mainStyleSheet.css b/src/gui/css/mainStyleSheet.css index 9e98b1be2a78444bc9956dab8910bfb53eb1ad7c..d61e54a15f8738f5d0197921bc35ab11d7752641 100644 --- a/src/gui/css/mainStyleSheet.css +++ b/src/gui/css/mainStyleSheet.css @@ -373,6 +373,10 @@ h3 + p { margin: 0 auto; } +.major-link { + font-weight: bold; +} + .clear-formatting { color: white; font-weight: normal; @@ -387,3 +391,13 @@ h3 + p { font-weight: bold; color: red; } + +div.center { + margin-left: auto; + margin-right: auto; + text-align: center; +} + +div.flex-container { + display: flex; +} diff --git a/src/interaction/main/mainLinks.js b/src/interaction/main/mainLinks.js index 7347394b22558a227880ed65eb54590a0875c4d0..c3556d512d2028c67df0c571d88f543a0b1153aa 100644 --- a/src/interaction/main/mainLinks.js +++ b/src/interaction/main/mainLinks.js @@ -1,121 +1,142 @@ -/* OPEN MAIN */ -App.UI.View.MainLinks = function() { +/** + * @returns {DocumentFragment} + */ +App.UI.View.mainLinks = function() { "use strict"; const PA = Array.isArray(V.personalAttention) ? V.personalAttention.map(x => getSlave(x.ID)) : []; - let r = ''; + let fragment = document.createDocumentFragment(); if (V.PC.health.shortDamage >= 30) { - r += `The injuries received in the recent battle prevent you from undertaking tiring efforts.`; + fragment.append(`The injuries received in the recent battle prevent you from undertaking tiring efforts.`); } else { switch (V.personalAttention) { case "business": - r += `You plan to focus on business this week.`; + fragment.append(`You plan to focus on business this week.`); break; case "whoring": - r += `You plan to focus on earning extra money this week.`; + fragment.append(`You plan to focus on earning extra money this week.`); break; case "upkeep": - r += `You plan to focus on cleaning the penthouse this week.`; + fragment.append(`You plan to focus on cleaning the penthouse this week.`); break; case "defensive survey": - r += `You plan to survey ${V.arcologies[0].name}'s defenses in person this week.`; + fragment.append(`You plan to survey ${V.arcologies[0].name}'s defenses in person this week.`); break; case "development project": - r += `You plan on contributing to a local development project this week.`; + fragment.append(`You plan on contributing to a local development project this week.`); break; case "smuggling": - r += `You plan to make some easy (but dirty) money this week.`; + fragment.append(`You plan to make some easy (but dirty) money this week.`); break; case "HG": - r += `You plan to support your Head Girl this week, `; + fragment.append(`You plan to support your Head Girl this week, `); if (V.HeadGirl) { const {he, his} = getPronouns(V.HeadGirl); - r += `so ${he} can give more slaves ${his} attention.`; + fragment.append(`so ${he} can give more slaves ${his} attention.`); } else { - r += `should you assign one.`; + fragment.append(`should you assign one.`); } break; case "sex": - r += `You plan to have as much sex with your slaves as possible this week.`; + fragment.append(`You plan to have as much sex with your slaves as possible this week.`); break; case "trading": - r += `This week you will learn trading.`; + fragment.append(`This week you will learn trading.`); break; case "warfare": - r += `This week you will learn modern combat tactics.`; + fragment.append(`This week you will learn modern combat tactics.`); break; case "slaving": - r += `This week you will learn slaving.`; + fragment.append(`This week you will learn slaving.`); break; case "engineering": - r += `This week you will learn engineering.`; + fragment.append(`This week you will learn engineering.`); break; case "medicine": - r += `This week you will learn medicine.`; + fragment.append(`This week you will learn medicine.`); break; case "hacking": - r += `This week you will learn hacking.`; + fragment.append(`This week you will learn hacking.`); break; case "proclamation": - r += `This week you plan to issue a proclamation about ${V.SecExp.proclamation.type}.`; + fragment.append(`This week you plan to issue a proclamation about ${V.SecExp.proclamation.type}.`); break; case "technical accidents": - r += `This week you plan to sell your technical skills to the highest bidder.`; + fragment.append(`This week you plan to sell your technical skills to the highest bidder.`); break; default: if (PA.length > 0) { - r += `You plan to train `; - let l = PA.length; - for (let dwi = 0; dwi < l; dwi++) { - if (dwi > 0 && dwi === l - 1) { - r += ` and `; - } - r += `<strong><u><span class="pink">${SlaveFullName(PA[dwi])}</span></u></strong> to ${V.personalAttention[dwi].trainingRegimen}`; - if (dwi > 0 && dwi < l - 2) { - r += `,`; + fragment.append(`You plan to train `); + + const trainees = []; + PA.forEach((trainee, i) => { + trainees.push(App.UI.DOM.combineNodes(App.UI.DOM.makeElement("span", SlaveFullName(trainee), "slave-name"), + ` to ${V.personalAttention[i].trainingRegimen}`)); } - } - r += ` this week.`; + ); + fragment.append(App.UI.DOM.arrayToList(trainees)); + + fragment.append(` this week.`); } break; } } if (V.PC.health.shortDamage < 30) { - r += ` <span id="managePA"><strong>${App.UI.passageLink("Change plans", "Personal Attention Select")}</strong></span> <span class="cyan">[A]</span>`; + const link = App.UI.DOM.makeElement("span", App.UI.DOM.passageLink("Change plans", "Personal Attention Select"), "major-link"); + link.id = "managePA"; + fragment.append(" ", link, " ", App.UI.DOM.makeElement("span", "[A]", "hotkey")); } - if (V.useSlaveSummaryOverviewTab !== 1) { + if (V.useSlaveSummaryOverviewTab === 0) { + let div = document.createElement("div"); if (typeof V.slaveIndices[V.HeadGirl.ID] !== 'undefined') { - r += `<br><strong><u><span class="pink">${SlaveFullName(V.HeadGirl)}</span></u></strong> is serving as your Head Girl`; + div.append(App.UI.DOM.makeElement("span", SlaveFullName(V.HeadGirl), "slave-name"), " is serving as your Head Girl"); if (V.arcologies[0].FSEgyptianRevivalistLaw === 1) { - r += ` and Consort`; + div.append(` and Consort`); } - r += `. <span id="manageHG"><strong>${App.UI.passageLink("Manage Head Girl", "HG Select")}</strong></span> <span class="cyan">[H]</span>`; - } else if (typeof V.slaveIndices[V.HeadGirl.ID] === 'undefined' && (V.slaves.length > 1)) { - r += `<br>You have not selected a Head Girl`; + div.append(". ", + App.UI.DOM.makeElement("span", App.UI.DOM.passageLink("Manage Head Girl", "HG Select"), "major-link"), + " ", App.UI.DOM.makeElement("span", "[H]", "hotkey")); + div.id = "manageHG"; + } else if (V.slaves.length > 1) { + div.append(`You have not selected a Head Girl`); if (V.arcologies[0].FSEgyptianRevivalistLaw === 1) { - r += ` and Consort`; + div.append(` and Consort`); } - r += `. <span id="manageHG"><strong>${App.UI.passageLink("Select one", "HG Select")}</strong></span> <span class="cyan">[H]</span>`; - } else if (typeof V.slaveIndices[V.HeadGirl.ID] === 'undefined') { - r += `<br><span class="note">You do not have enough slaves to keep a Head Girl</span>`; + div.append(". ", + App.UI.DOM.makeElement("span", App.UI.DOM.passageLink("Select One", "HG Select"), "major-link"), + " ", App.UI.DOM.makeElement("span", "[H]", "hotkey")); + div.id = "manageHG"; + } else { + div.append(App.UI.DOM.makeElement("span", "You do not have enough slaves to keep a Head Girl", "note")); } - r += `<br>`; + fragment.append(div); + div = document.createElement("div"); if (typeof V.slaveIndices[V.Recruiter.ID] !== 'undefined') { - r += `<strong><u><span class="pink">${SlaveFullName(V.Recruiter)}</span></u></strong> is working to recruit girls. <span id="manageRecruiter"><strong>${App.UI.passageLink("Manage Recruiter", "Recruiter Select")}</strong></span> <span class="cyan">[U]</span>`; + div.append(App.UI.DOM.makeElement("span", SlaveFullName(V.Recruiter), "slave-name"), " is working to recruit girls. ", + App.UI.DOM.makeElement("span", App.UI.DOM.passageLink("Manage Recruiter", "Recruiter Select"), "major-link")); } else { - r += `You have not selected a Recruiter. <span id="manageRecruiter"><strong>${App.UI.passageLink("Select one", "Recruiter Select")}</strong></span> <span class="cyan">[U]</span>`; + div.append("You have not selected a Recruiter. ", + App.UI.DOM.makeElement("span", App.UI.DOM.passageLink("Select one", "Recruiter Select"), "major-link")); } + div.append(" ", App.UI.DOM.makeElement("span", "[U]", "hotkey")); + div.id = "manageRecruiter"; + fragment.append(div); if (V.dojo) { - r += `<br>`; + div = document.createElement("div"); if (typeof V.slaveIndices[V.Bodyguard.ID] !== 'undefined') { - r += `<strong><u><span class="pink">${SlaveFullName(V.Bodyguard)}</span></u></strong> is serving as your bodyguard. <span id="manageBG"><strong>${App.UI.passageLink("Manage Bodyguard", "BG Select")}</strong></span> <span class="cyan">[B]</span>`; + div.append(App.UI.DOM.makeElement("span", SlaveFullName(V.Bodyguard), "slave-name"), " is serving as your bodyguard. ", + App.UI.DOM.makeElement("span", App.UI.DOM.passageLink("Manage Bodyguard", "BG Select"), "major-link")); } else { - r += `You have not selected a Bodyguard. <span id="manageBG"><strong>${App.UI.passageLink("Select one", "BG Select")}</strong></span> <span class="cyan">[B]</span>`; + div.append("You have not selected a Bodyguard. ", + App.UI.DOM.makeElement("span", App.UI.DOM.passageLink("Select one", "BG Select"), "major-link")); } + div.append(" ", App.UI.DOM.makeElement("span", "[B]", "hotkey")); + div.id = "manageBG"; + fragment.append(div); } } @@ -129,19 +150,24 @@ App.UI.View.MainLinks = function() { const slaveOrgans = V.completedOrgans.reduce((acc, organ) => organ.ID === V.slaves[i].ID ? acc + 1 : acc, 0); /* if the interrogated slave has one or more organs ready: */ if (slaveOrgans > 0) { - r += '<br><span class="yellow">The fabricator has completed '; + const div = document.createElement("div"); + div.classList.add("yellow"); + div.append("The fabricator has completed "); if (slaveOrgans > 1) { - r += `${slaveOrgans} organs`; + div.append(`${slaveOrgans} organs`); } else { - r += 'an organ'; + div.append('an organ'); } - r += ` for </span>${App.UI.link(V.slaves[i].slaveName, () => { V.activeSlave = V.slaves[i]; }, [], "Slave Interact")}, <span class="yellow">which `; + div.append(" for ", + App.UI.DOM.makeElement("span", App.UI.link(V.slaves[i].slaveName, () => { V.activeSlave = V.slaves[i]; }, [], "Slave Interact"), "clear-formatting"), + " which "); if (slaveOrgans > 1) { - r += 'are'; + div.append('are'); } else { - r += 'is'; + div.append('is'); } - r += ' ready to be implanted.</span>'; + div.append(' ready to be implanted.'); + fragment.append(div); } } } @@ -151,7 +177,12 @@ App.UI.View.MainLinks = function() { if (getSlave(V.adjustProsthetics[j].slaveID) !== undefined) { const i = V.slaveIndices[V.adjustProsthetics[j].slaveID]; if (V.adjustProsthetics[j].workLeft <= 0) { - r += `<br><span class="yellow">The lab has completed ${addA(setup.prosthetics[V.adjustProsthetics[j].id].name)} for</span> <span id="name">${App.UI.link(SlaveFullName(V.slaves[i]), () => { V.activeSlave = V.slaves[i]; }, [], "Slave Interact")},</span> <span class="yellow"> which is ready to be attached.</span>`; + const div = document.createElement("div"); + div.classList.add("yellow"); + div.append(`The lab has completed ${addA(setup.prosthetics[V.adjustProsthetics[j].id].name)} for `, + App.UI.DOM.makeElement("span", App.UI.link(SlaveFullName(V.slaves[i]), () => { V.activeSlave = V.slaves[i]; }, [], "Slave Interact"), "clear-formatting"), + " which is ready to be attached."); + fragment.append(div); } } else { V.adjustProsthetics.splice(j, 1); @@ -161,57 +192,90 @@ App.UI.View.MainLinks = function() { } if (V.completedOrgans.length > 0 && V.adjustProstheticsCompleted > 0) { - r += `<br>${App.UI.passageLink("Implant and Attach", "Multiple Organ Implant")} <span class="yellow">all organs and prosthetics that are ready.</span>`; + const div = document.createElement("div"); + div.append(App.UI.DOM.passageLink("Implant and Attach", "Multiple Organ Implant"), + App.UI.DOM.makeElement("span", " all organs and prosthetics that are ready.", "yellow")); + fragment.append(div); } else if (V.completedOrgans.length > 1) { - r += `<br>${App.UI.passageLink("Implant", "Multiple Organ Implant")} <span class="yellow">all organs that are ready for implantation.</span>`; + const div = document.createElement("div"); + div.append(App.UI.DOM.passageLink("Implant", "Multiple Organ Implant"), + App.UI.DOM.makeElement("span", " all organs that are ready for implantation.", "yellow")); + fragment.append(div); } else if (V.adjustProstheticsCompleted > 1) { - r += `<br>${App.UI.passageLink("Attach", "Multiple Organ Implant")} <span class="yellow">all prosthetics that are ready to be attached.</span>`; + const div = document.createElement("div"); + div.append(App.UI.DOM.passageLink("Attach", "Multiple Organ Implant"), + App.UI.DOM.makeElement("span", " all prosthetics that are ready to be attached.", "yellow")); + fragment.append(div); } - if (V.slaveCostFactor > 1.05) { - r += `<br><span class="yellow">There is a bull market for slaves; the price of slaves is very high.</span>`; - } else if (V.slaveCostFactor > 1) { - r += `<br><span class="yellow">The slave market is bullish; the price of slaves is high.</span>`; - } else if (V.slaveCostFactor < 0.95) { - r += `<br><span class="yellow">There is a bear market for slaves; the price of slaves is very low.</span>`; - } else if (V.slaveCostFactor < 1) { - r += `<br><span class="yellow">The slave market is bearish; the price of slaves is low.</span>`; + const div = document.createElement("div"); + if (V.slaveCostFactor === 1) { + div.append("The slave market is stable; the price of slaves is average."); } else { - r += `<br>The slave market is stable; the price of slaves is average.`; + let r; + if (V.slaveCostFactor > 1) { + if (V.slaveCostFactor > 1.05) { + r = "There is a bull market for slaves; the price of slaves is very high."; + } else { + r = "The slave market is bullish; the price of slaves is high."; + } + } else { + if (V.slaveCostFactor < 0.95) { + r = "There is a bear market for slaves; the price of slaves is very low."; + } else { + r = "The slave market is bearish; the price of slaves is low."; + } + } + div.append(App.UI.DOM.makeElement("span", r, "yellow")); + } + + const buySlaves = App.UI.DOM.makeElement("span", App.UI.DOM.passageLink("Buy Slaves", "Buy Slaves"), "major-link"); + buySlaves.id = "buySlaves"; + div.append(" ", buySlaves, " ", App.UI.DOM.makeElement("span", "[S]", "hotkey")); + + fragment.append(div); + + /** + * @param {string} school + */ + function schoolSale(school) { + const div = document.createElement("div"); + div.append(App.UI.DOM.makeElement("span", "For your first purchase, ", "yellow"), + App.UI.DOM.passageLink(school, school, () => { V.slavesSeen += 1; }), + App.UI.DOM.makeElement("span", " will sell at half price this week.", "yellow")); + fragment.append(div); } - r += ` <span id="buySlaves"><strong>${App.UI.passageLink("Buy Slaves", "Buy Slaves")}</strong></span> <span class="cyan">[S]</span>`; if (V.seeDicks !== 100) { if (V.TSS.schoolSale !== 0) { - r += `<br><span class="yellow">For your first purchase, </span><strong>[[The Slavegirl School][$slavesSeen += 1]]</strong><span class="yellow"> will sell at half price this week.</span>`; + schoolSale("The Slavegirl School"); } if (V.GRI.schoolSale !== 0) { - r += `<br><span class="yellow">For your first purchase, </span><strong>[[Growth Research Institute][$slavesSeen += 1]]</strong><span class="yellow"> will sell at half price this week.</span>`; + schoolSale("Growth Research Institute"); } if (V.SCP.schoolSale !== 0) { - r += `<br><span class="yellow">For your first purchase, </span><strong>[[St. Claver Preparatory][$slavesSeen += 1]]</strong><span class="yellow"> will sell at half price this week.</span>`; + schoolSale("St. Claver Preparatory"); } if (V.TCR.schoolSale !== 0) { - r += `<br><span class="yellow">For your first purchase, </span><strong>[[The Cattle Ranch][$slavesSeen += 1]]</strong><span class="yellow"> will sell at half price this week.</span>`; + schoolSale("The Cattle Ranch"); } if (V.HA.schoolSale !== 0) { - r += `<br><span class="yellow">For your first purchase, </span><strong>[[The Hippolyta Academy][$slavesSeen += 1]]</strong><span class="yellow"> will sell at half price this week.</span>`; + schoolSale("The Hippolyta Academy"); } } if (V.seeDicks !== 0) { if (V.LDE.schoolSale !== 0) { - r += `<br><span class="yellow">For your first purchase, </span><strong>[[L'École des Enculées][$slavesSeen += 1]]</strong><span class="yellow"> will sell at half price this week.</span>`; + schoolSale("L'École des Enculées"); } if (V.TGA.schoolSale !== 0) { - r += `<br><span class="yellow">For your first purchase, </span><strong>[[The Gymnasium-Academy][$slavesSeen += 1]]</strong><span class="yellow"> will sell at half price this week.</span>`; + schoolSale("The Gymnasium-Academy"); } if (V.TFS.schoolSale !== 0) { - r += `<br><span class="yellow">For your first purchase, </span><strong>[[The Futanari Sisters][$slavesSeen += 1]]</strong><span class="yellow"> will sell at half price this week.</span>`; + schoolSale("The Futanari Sisters"); } } if (V.NUL.schoolSale !== 0) { - r += `<br><span class="yellow">For your first purchase, </span><strong>[[Nueva Universidad de Libertad][$slavesSeen += 1]]</strong><span class="yellow"> will sell at half price this week.</span>`; + schoolSale("Nueva Universidad de Libertad"); } - return r; + return fragment; }; -/* CLOSE MAIN */ diff --git a/src/interaction/prostheticConfig.tw b/src/interaction/prostheticConfig.tw index 3b3ce3310b2d38a52f46041e59bb4708c1c3e4a1..2333878bf23caa94140c5551bef7218132945df2 100644 --- a/src/interaction/prostheticConfig.tw +++ b/src/interaction/prostheticConfig.tw @@ -3,7 +3,7 @@ <<switch $prostheticsConfig>> <<case "main">> - <<set $nextButton = "Back", $nextLink = "Slave Interact">> + <<set $nextButton = "Confirm changes", $nextLink = "AS Dump", $returnTo = "Slave Interact">> /* get all prosthetics that are ready for this slave */ <<if $adjustProstheticsCompleted > 0>> <<set $adjustProsthetics = $adjustProsthetics.filter(function(p) { diff --git a/src/js/main.js b/src/js/main.js index 01d409520d4206580d6b1df096145e30adb5d6f9..6460d82940e77d8e43ad90c963ca653f1fb58f7c 100644 --- a/src/js/main.js +++ b/src/js/main.js @@ -67,7 +67,7 @@ App.MainView.errors = function() { }; /** - * @return {Text} + * @returns {Text} */ App.MainView.fcnn = function() { let text; @@ -81,15 +81,84 @@ App.MainView.fcnn = function() { return document.createTextNode(`${text} `); }; +App.MainView.useFucktoys = function() { + const fragment = document.createDocumentFragment(); + + function setEnvironment(slave) { + return () => { + V.activeSlave = slave; + V.nextButton = "Back"; + V.nextLink = "AS Dump"; + V.returnTo = passage(); + }; + } + + for (const slave of V.slaves) { + if (slave.assignment !== "please you") { + continue; + } + + const {him, his} = getPronouns(slave); + + const div = document.createElement("div"); + div.classList.add("note"); + + div.append(App.Interact.ToyChest(slave)); + + div.append(" In the coming week you plan to concentrate on "); + + if (slave.toyHole !== "all her holes") { + div.append(`${his} ${slave.toyHole}`); + } else { + div.append(`all of ${his} holes equally`); + } + + if (slave.fuckdoll === 0) { + div.append(", but for now:"); + + const optionDiv = document.createElement("div"); + optionDiv.classList.add("indent"); + + optionDiv.append(App.UI.DOM.passageLink(`Use ${his} mouth`, "FLips", setEnvironment(slave)), + " | ", App.UI.DOM.passageLink("Play with " + his + " tits", "FBoobs", setEnvironment(slave))); + + if (canDoVaginal(slave)) { + optionDiv.append(" | ", App.UI.DOM.passageLink(`Fuck ${him}`, "FVagina", setEnvironment(slave))); + if (canDoAnal(slave)) { + optionDiv.append(" | ", App.UI.DOM.passageLink(`Use ${his} holes`, "FButt", setEnvironment(slave))); + } + } + if (canDoAnal(slave)) { + optionDiv.append(" | ", App.UI.DOM.passageLink(`Fuck ${his} ass`, "FAnus", setEnvironment(slave))); + } + if (canDoVaginal(slave) || canDoAnal(slave)) { + if (slave.belly >= 300000) { + optionDiv.append(" | ", App.UI.DOM.passageLink(`Fuck ${him} over ${his} belly`, "FBellyFuck", setEnvironment(slave))); + } + } + if (canPenetrate(slave)) { + optionDiv.append(" | ", App.UI.DOM.passageLink(`Ride ${him}`, "FDick", setEnvironment(slave))); + } + optionDiv.append(" | ", App.UI.DOM.passageLink(`Abuse ${him}`, "FAbuse", setEnvironment(slave))); + + div.append(optionDiv); + } else { + div.append("."); + } + fragment.append(div); + } + return fragment; +}; + /** - * @return {HTMLDivElement} + * @returns {HTMLDivElement} */ App.MainView.useGuard = function() { const guard = V.slaves[V.slaveIndices[V.Bodyguard.ID]]; const outerDiv = document.createElement("div"); - if (guard === undefined || guard.assignment !== "guard you" || V.useSlaveSummaryOverviewTab === 1) { + if (guard === undefined || guard.assignment !== "guard you") { return outerDiv; } diff --git a/src/js/slaveListing.js b/src/js/slaveListing.js index 558bcc1b4e4ba26003ba30057dc2f4d314ddbd25..9fee57e17683f7aa829292c94f14a931c9b03802 100644 --- a/src/js/slaveListing.js +++ b/src/js/slaveListing.js @@ -383,7 +383,7 @@ App.UI.SlaveList.render = function() { * <<print 'pass/count/indexed/flag::[' + passageName + '/' + _Count + '/' + _indexed + '/' + $SlaveSummaryFiler + ']'>> */ - if (indices.length > 1 && passageName === "Main" && V.useSlaveSummaryTabs === 0) { + if (indices.length > 1 && passageName === "Main") { const _buttons = []; let _offset = -50; if (/Select/i.test(passageName)) { @@ -593,6 +593,31 @@ App.UI.SlaveList.sortingLinks = function(passage) { return r; }; +/** + * @param {string} passage + * @returns {*} + */ +App.UI.SlaveList.sortingLinksDOM = function(passage) { + const outerDiv = document.createElement("div"); + outerDiv.classList.add("flex-container"); + const textify = string => capFirstChar(string.replace(/([A-Z])/g, " $1")); + + let innerDiv = App.UI.DOM.makeElement("div", "Sort by: ", "indent"); + let order = ["devotion", "name", "assignment", "seniority", "actualAge", "visualAge", "physicalAge", "weeklyIncome"] + .map(so => V.sortSlavesBy !== so ? + App.UI.DOM.passageLink(textify(so), passage, () => { V.sortSlavesBy = so; }) : textify(so)); + innerDiv.append(App.UI.DOM.arrayToList(order, " | ", " | ")); + outerDiv.append(innerDiv); + + innerDiv = App.UI.DOM.makeElement("div", "Sort: ", "indent"); + order = ["descending", "ascending"].map(so => V.sortSlavesOrder !== so ? + App.UI.DOM.passageLink(textify(so), passage, () => { V.sortSlavesOrder = so; }) : textify(so)); + innerDiv.append(App.UI.DOM.arrayToList(order, " | ", " | ")); + outerDiv.append(innerDiv); + + return outerDiv; +}; + /** * Standard tabs for a facility with a single job (SJ) * @param {App.Entity.Facilities.Facility} facility @@ -617,8 +642,8 @@ App.UI.SlaveList.listSJFacilitySlaves = function(facility, facilityPassage, show r += '<div class="tabbar">' + App.UI.tabbar.tabButton('assign', tabCaptions.assign) + App.UI.tabbar.tabButton('remove', tabCaptions.remove) + - (showTransfersTab ? App.UI.tabbar.tabButton('transfer', tabCaptions.transfer) : '')+ - '</div>'; + (showTransfersTab ? App.UI.tabbar.tabButton('transfer', tabCaptions.transfer) : '') + + '</div>'; if (facility.hostedSlaves > 0) { let facilitySlaves = job.employeesIndices(); @@ -705,14 +730,19 @@ App.UI.SlaveList.listNGPSlaves = function() { r += '<div class="tabbar">' + App.UI.tabbar.tabButton('assign', 'Import a slave') + App.UI.tabbar.tabButton('remove', 'Remove from import') + - '</div>'; + '</div>'; const NGPassignment = "be imported"; /** @type {App.Entity.SlaveState[]} */ const slaves = V.slaves; if (V.slavesToImport > 0) { - const importedSlavesIndices = slaves.reduce((acc, s, i) => { if (s.assignment === NGPassignment) { acc.push(i); } return acc; }, []); + const importedSlavesIndices = slaves.reduce((acc, s, i) => { + if (s.assignment === NGPassignment) { + acc.push(i); + } + return acc; + }, []); SlaveSort.indices(importedSlavesIndices); r += App.UI.tabbar.makeTab("remove", App.UI.SlaveList.render.listMarkup(importedSlavesIndices, [], App.UI.SlaveList.makeNameDecorator(["emphasizedSlave", "pink"]), @@ -770,169 +800,137 @@ App.UI.SlaveList.stdFacilityPage = function(facility, showTransfersPage) { App.UI.SlaveList.penthousePage = function() { const ph = App.Entity.facilities.penthouse; - const listElementId = 'summarylist'; // for the untabbed mode only - - function span(text, cls, id) { - return `<span${cls ? ` class="${cls}"` : ''}${id ? ` id="${id}"` : ''}>${text}</span>`; - } function overviewTabContent() { - let r = ''; - const thisArcology = V.arcologies[0]; + const fragment = document.createDocumentFragment(); + const A = V.arcologies[0]; + let slaveWrapper = document.createElement("div"); // first is a div so we have no space between slave and buttons if (V.HeadGirl) { /** @type {App.Entity.SlaveState} */ const HG = V.HeadGirl; - r += `${span(SlaveFullName(HG), "emphasizedSlave pink")} is serving as your Head Girl`; - if (thisArcology.FSEgyptianRevivalistLaw === 1) { - r += ' and Consort'; + slaveWrapper.append(App.UI.DOM.makeElement("span", SlaveFullName(HG), "slave-name"), + " is serving as your Head Girl"); + if (A.FSEgyptianRevivalistLaw === 1) { + slaveWrapper.append(" and Consort"); } - r += `. <strong> ${span(App.UI.passageLink("Manage Head Girl", "HG Select"), null, "manageHG")}</strong> ${span("[H]", "cyan")}`; - r += App.UI.SlaveList.render.listMarkup([App.Utils.slaveIndexForId(HG.ID)], [], - App.UI.SlaveList.SlaveInteract.penthouseInteract); + slaveWrapper.append(". "); + const link = App.UI.DOM.makeElement("span", App.UI.DOM.passageLink("Manage Head Girl", "HG Select"), "major-link"); + link.id = "manageHG"; + slaveWrapper.append(link, " ", App.UI.DOM.makeElement("span", "[H]", "hotkey")); + slaveWrapper.append(App.UI.SlaveList.render.listDOM([App.Utils.slaveIndexForId(HG.ID)], [], + App.UI.SlaveList.SlaveInteract.penthouseInteract)); } else { if (V.slaves.length > 1) { - r += `You have ${span("not", "red")} selected a Head Girl`; - if (thisArcology.FSEgyptianRevivalistLaw === 1) { - r += ' and Consort'; + slaveWrapper.append("You have ", App.UI.DOM.makeElement("span", "not", "warning"), " selected a Head Girl"); + if (A.FSEgyptianRevivalistLaw === 1) { + slaveWrapper.append(" and Consort"); + } + slaveWrapper.append(". ", App.UI.DOM.makeElement("span", App.UI.DOM.passageLink("Select One", "HG Select"), "major-link"), + " ", App.UI.DOM.makeElement("span", "[H]", "hotkey")); + slaveWrapper.id = "manageHG"; + if (V.slavePanelStyle === 2) { + slaveWrapper.classList.add("slaveSummary", "card"); } - r += `. <strong>${span(App.UI.passageLink("Select One", "HG Select"), null, "manageHG")}</strong> ${span("[H]", "cyan")}`; } else { - r += '<em>You do not have enough slaves to keep a Head Girl</em>'; + slaveWrapper.append("You do not have enough slaves to keep a Head Girl"); + slaveWrapper.classList.add("note"); } } - r += '<br>'; + fragment.append(slaveWrapper); + slaveWrapper = document.createElement("p"); if (V.Recruiter) { /** @type {App.Entity.SlaveState} */ const RC = V.Recruiter; - const p = getPronouns(RC); - r += `${span(SlaveFullName(RC), "emphasizedSlave pink")} is working `; + const {he} = getPronouns(RC); + slaveWrapper.append(App.UI.DOM.makeElement("span", SlaveFullName(RC), "slave-name"), + " is working"); if (V.recruiterTarget !== "other arcologies") { - r += 'to recruit girls'; + slaveWrapper.append(" to recruit girls"); } else { - r += 'as a Sexual Ambassador'; - if (thisArcology.influenceTarget === -1) { - r += ', but ' + span(p.object + ' has no target to influence', "red"); + slaveWrapper.append(" as a Sexual Ambassador"); + if (A.influenceTarget === -1) { + slaveWrapper.append(", but ", App.UI.DOM.makeElement("span", `${he} has no target to influence.`, "warning")); } else { - const targetName = V.arcologies.find(a => a.direction === thisArcology.influenceTarget).name; - r += ' to ' + targetName; + const targetName = V.arcologies.find(a => a.direction === A.influenceTarget).name; + slaveWrapper.append(` to ${targetName}.`); } } - r += `${span('. <strong>' + App.UI.passageLink("Manage Recruiter", "Recruiter Select") + '</strong>', null, "manageRecruiter")} ${span("[U]", "cyan")}`; - r += App.UI.SlaveList.render.listMarkup([App.Utils.slaveIndexForId(RC.ID)], [], - App.UI.SlaveList.SlaveInteract.penthouseInteract); + slaveWrapper.append(". "); + const link = App.UI.DOM.makeElement("span", App.UI.DOM.passageLink("Manage Recruiter", "Recruiter Select"), "major-link"); + link.id = "manageRecruiter"; + slaveWrapper.append(link, " ", App.UI.DOM.makeElement("span", "[U]", "hotkey")); + slaveWrapper.append(App.UI.SlaveList.render.listDOM([App.Utils.slaveIndexForId(RC.ID)], [], + App.UI.SlaveList.SlaveInteract.penthouseInteract)); } else { - r += `You have ${span("not", "red")} selected a Recruiter. `; - r += `${span('<strong>' + App.UI.passageLink("Select one", "Recruiter Select") + '</strong>', null, "manageRecruiter")} ${span("[U]", "cyan")}`; + slaveWrapper.append("You have ", App.UI.DOM.makeElement("span", "not", "warning"), " selected a Recruiter. ", + App.UI.DOM.makeElement("span", App.UI.DOM.passageLink("Select one", "Recruiter Select"), "major-link"), + " ", App.UI.DOM.makeElement("span", "[U]", "hotkey")); + slaveWrapper.id = "manageRecruiter"; + if (V.slavePanelStyle === 2) { + slaveWrapper.classList.add("slaveSummary", "card"); + } } + fragment.append(slaveWrapper); if (V.dojo) { - r += '<br>'; + slaveWrapper = document.createElement("p"); /** @type {App.Entity.SlaveState} */ const BG = V.Bodyguard; if (BG) { - r += `${span(SlaveFullName(BG), "emphasizedSlave pink")} is serving as your bodyguard. `; - r += span(`<strong>${App.UI.passageLink("Manage Bodyguard", "BG Select")}</strong> `, null, "manageBG") + - span("[B]", "cyan"); - r += App.UI.SlaveList.render.listMarkup([App.Utils.slaveIndexForId(BG.ID)], [], - App.UI.SlaveList.SlaveInteract.penthouseInteract); + slaveWrapper.append(App.UI.DOM.makeElement("span", SlaveFullName(BG), "slave-name"), + " is serving as your bodyguard. "); + const link = App.UI.DOM.makeElement("span", App.UI.DOM.passageLink("Manage Bodyguard", "BG Select"), "major-link"); + link.id = "manageBG"; + slaveWrapper.append(link, " ", App.UI.DOM.makeElement("span", "[B]", "hotkey")); + slaveWrapper.append(App.UI.SlaveList.render.listDOM([App.Utils.slaveIndexForId(BG.ID)], [], + App.UI.SlaveList.SlaveInteract.penthouseInteract)); + slaveWrapper.append(App.MainView.useGuard()); } else { - r += `You have ${span("not", "red")} selected a Bodyguard. `; - r += span(`<strong>${App.UI.passageLink("Select one", "BG Select")}</strong> `, null, "manageBG") + - span("[B]", "cyan"); - } - - /* Start Italic event text */ - if (BG && BG.assignment === "guard you") { - const p = getPronouns(BG); - V.i = App.Utils.slaveIndexForId(BG.ID); - const interactLinkSetters = `$activeSlave = $slaves[${V.i}], $nextButton = "Back", $nextLink = "AS Dump", $returnTo = "Main"`; - r += `<br><span class='scene-intro'>${App.Interact.guardPose(BG)}</span>`; - let useHimLinks = []; - useHimLinks.push(App.UI.passageLink(`Use ${p.his} mouth`, "FLips", interactLinkSetters)); - useHimLinks.push(App.UI.passageLink(`Play with ${p.his} tits`, "FBoobs", interactLinkSetters)); - if (canDoVaginal(BG)) { - useHimLinks.push(App.UI.passageLink(`Fuck ${p.him}`, "FVagina", interactLinkSetters)); - if (canDoAnal(BG)) { - useHimLinks.push(App.UI.passageLink(`Use ${p.his} holes`, "FButt", interactLinkSetters)); - } - if (BG.belly >= 300000) { - useHimLinks.push(App.UI.passageLink(`Fuck ${p.him} over ${p.his} belly`, "FBellyFuck", interactLinkSetters)); - } - } - /* check */ - if (canPenetrate(BG)) { - useHimLinks.push(App.UI.passageLink(`Ride ${p.him}`, "FDick", interactLinkSetters)); + slaveWrapper.append("You have ", App.UI.DOM.makeElement("span", "not", "warning"), " selected a Bodyguard. ", + App.UI.DOM.makeElement("span", App.UI.DOM.passageLink("Select one", "BG Select"), "major-link"), + " ", App.UI.DOM.makeElement("span", "[B]", "hotkey")); + slaveWrapper.id = "manageBG"; + if (V.slavePanelStyle === 2) { + slaveWrapper.classList.add("slaveSummary", "card"); } - if (canDoAnal(BG)) { - useHimLinks.push(App.UI.passageLink(`Fuck ${p.his} ass`, "FAnus", interactLinkSetters)); - } - useHimLinks.push(App.UI.passageLink(`Abuse ${p.him}`, "Gameover", '$gameover ="idiot ball"')); - - r += `<br> ${useHimLinks.join(' | ')}`; - /* End Italic event text */ } - r += "<br/>"; + + fragment.append(slaveWrapper); } - return r; + return fragment; } /** * @param {string} job - * @returns {{n: number, text: string}} + * @returns {{n: number, dom: DocumentFragment}} */ function _slavesForJob(job) { const employeesIndices = job === 'all' ? ph.employeesIndices() : ph.job(job).employeesIndices(); - if (employeesIndices.length === 0) { return {n: 0, text: ''}; } + if (employeesIndices.length === 0) { + return {n: 0, dom: document.createDocumentFragment()}; + } SlaveSort.indices(employeesIndices); return { n: employeesIndices.length, - text: App.UI.SlaveList.render.listMarkup(employeesIndices, [], App.UI.SlaveList.SlaveInteract.penthouseInteract) + dom: App.UI.SlaveList.render.listDOM(employeesIndices, [], App.UI.SlaveList.SlaveInteract.penthouseInteract) }; } - /** - * Displays job filter links, whose action are generated by the callback - * @param {assignmentFilterGenerateCallback} callback - * @returns {string} - */ - function _jobFilter(callback) { - const jd = App.Data.Facilities.penthouse.jobs; - let links = []; - links.push(`<<link "All">>${callback('all')}<</link>>`); - // seems like SC2 does not process data-setter when data-passage is not set - for (const jn in jd) { - links.push(`<<link "${capFirstChar(jd[jn].position)}">>${callback(jn)}<</link>>`); - } - - return links.join(' | '); - } - - function _updateList(job) { - State.temporary.mainPageUpdate.job = job; - const e = document.getElementById(listElementId); - e.innerHTML = ''; - const employeesIndices = job === 'all' ? ph.employeesIndices() : ph.job(job).employeesIndices(); - if (employeesIndices.length === 0) { - return; - } - SlaveSort.indices(employeesIndices); - e.appendChild(App.UI.SlaveList.render.listDOM(employeesIndices, [], App.UI.SlaveList.SlaveInteract.penthouseInteract)); - } /** * @typedef tabDesc * @property {string} tabName * @property {string} caption - * @property {string} content + * @property {Node} content */ /** * @param {string} tabName * @param {string} caption - * @param {string} content + * @param {Node} content * @returns {tabDesc} */ function makeTabDesc(tabName, caption, content) { @@ -945,111 +943,131 @@ App.UI.SlaveList.penthousePage = function() { /** * Displays encyclopedia entries for occupations at the top of the tab, if enabled - * @returns {string} + * @returns {HTMLSpanElement} */ function encycTips(jn) { - let r =`<span class="note">`; + const span = document.createElement("span"); + span.classList.add("note"); if (V.showTipsFromEncy) { switch (jn) { case "rest": - r += `<<encyclopediaEntryRest>>`; + span.append(App.Encyclopedia.Entries.rest()); break; case "chooseOwn": break; /* no entry written for choose own */ case "fucktoy": - r += `<<encyclopediaEntryFucktoy>>`; + span.append(App.Encyclopedia.Entries.fucktoy()); break; case "classes": - r += `<<encyclopediaEntryAttendingClasses>>`; + span.append(App.Encyclopedia.Entries.attendingClasses()); break; case "houseServant": - r += `<<encyclopediaEntryServitude>>`; + span.append(App.Encyclopedia.Entries.servitude()); break; case "whore": - r += `<<encyclopediaEntryWhoring>>`; + span.append(App.Encyclopedia.Entries.whoring()); break; case "publicServant": - r += `<<encyclopediaEntryPublicService>>`; + span.append(App.Encyclopedia.Entries.publicService()); break; case "subordinateSlave": - r += `<<encyclopediaEntrySexualServitude>>`; + span.append(App.Encyclopedia.Entries.sexualServitude()); break; case "cow": - r += `<<encyclopediaEntryMilking>>`; + span.append(App.Encyclopedia.Entries.milking()); break; case "gloryhole": - r += `<<encyclopediaEntryGloryHole>>`; + span.append(App.Encyclopedia.Entries.gloryHole()); break; case "confinement": - r += `<<encyclopediaEntryConfinement>>`; + span.append(App.Encyclopedia.Entries.confinement()); break; default: - r += `missing tip for this tab`; + span.append(App.UI.DOM.makeElement("span", "missing tip for this tab", "error")); break; } } - return r += `</span>`; + return span; } - let r = ''; + function allTab() { + const penthouseSlavesIndices = ph.employeesIndices(); + SlaveSort.indices(penthouseSlavesIndices); + return makeTabDesc('all', `All${V.useSlaveSummaryTabs > 0 ? ` (${penthouseSlavesIndices.length})` : ""}`, + App.UI.SlaveList.render.listDOM(penthouseSlavesIndices, [], App.UI.SlaveList.SlaveInteract.penthouseInteract)); + } + + let fragment = document.createDocumentFragment(); if (V.positionMainLinks >= 0) { - r += '<center>' + App.UI.View.MainLinks() + '</center><br>'; + fragment.append(App.UI.DOM.makeElement("div", App.UI.View.mainLinks(), "center")); } if (V.sortSlavesMain) { - r += '<br>' + this.sortingLinks("Main") + '<br>'; + fragment.append(this.sortingLinksDOM("Main")); } - if (V.useSlaveSummaryTabs) { - /** @type {tabDesc[]} */ - let tabs = []; + /** @type {tabDesc[]} */ + let tabs = []; - // Overview tab - if (V.useSlaveSummaryOverviewTab) { - tabs.push(makeTabDesc('overview', 'Overview', overviewTabContent())); - } + // Overview tab + if (V.useSlaveSummaryOverviewTab) { + tabs.push(makeTabDesc('overview', "Special Roles", overviewTabContent())); + } - // tabs for each assignment - for (const jn of ph.jobsNames) { - const slaves = _slavesForJob(jn); - if (slaves.n > 0) { - tabs.push(makeTabDesc(jn, `${ph.desc.jobs[jn].position} (${slaves.n})`, encycTips(jn) + slaves.text)); - } - } + if (V.useSlaveSummaryTabs === 0) { + tabs.push(allTab()); + } - // now generate the "All" tab - const penthouseSlavesIndices = ph.employeesIndices(); - SlaveSort.indices(penthouseSlavesIndices); - tabs.push(makeTabDesc('all', `All (${penthouseSlavesIndices.length})`, - this.render.listMarkup(penthouseSlavesIndices, [], App.UI.SlaveList.SlaveInteract.penthouseInteract))); + // tabs for each assignment + for (const jn of ph.jobsNames) { + const slaves = _slavesForJob(jn); + if (slaves.n > 0) { + tabs.push(makeTabDesc(jn, `${ph.desc.jobs[jn].position}${V.useSlaveSummaryTabs > 0 ? ` (${slaves.n})` : ""}`, App.UI.DOM.combineNodes(encycTips(jn), slaves.dom))); + } else if (V.useSlaveSummaryTabs === 0) { + tabs.push(makeTabDesc(jn, ph.desc.jobs[jn].position, encycTips(jn))); + } + } + if (V.useSlaveSummaryTabs > 0) { + tabs.push(allTab()); + } - r += '<div class="tabbar">'; + const div = document.createElement("div"); + div.classList.add("tabbar"); + if (V.useSlaveSummaryTabs === 0) { + const links = []; for (const tab of tabs) { - r += App.UI.tabbar.tabButton(tab.tabName, tab.caption); + links.push(App.UI.tabbar.tabButtonDOM(tab.tabName, tab.caption, true)); } - r += '</div>'; - + div.append(App.UI.DOM.arrayToList(links, " | ", " | ")); + } else { for (const tab of tabs) { - r += App.UI.tabbar.makeTab(tab.tabName, tab.content); + const button = App.UI.tabbar.tabButtonDOM(tab.tabName, tab.caption); + if (V.useSlaveSummaryTabs === 2) { + button.classList.add("card"); + } + div.append(button); } - } else { - State.temporary.mainPageUpdate = { - job: State.temporary.mainPageUpdate ? State.temporary.mainPageUpdate.job : 'all', - update: _updateList - }; - - $(document).one(':passagedisplay', () => { _updateList(State.temporary.mainPageUpdate.job); }); - r += `<div>${_jobFilter(s => `<<run _mainPageUpdate.update("${s}")>>`)} <div id=${listElementId}></div></div>`; + } + fragment.append(div); + + for (const tab of tabs) { + const div = App.UI.tabbar.makeTabDOM(tab.tabName, tab.content); + if (V.useSlaveSummaryTabs === 0) { + div.classList.add("noFade"); + } else if (V.useSlaveSummaryTabs === 2) { + div.classList.add("card"); + } + fragment.append(div); } if (V.positionMainLinks <= 0) { - r += '<br><center>' + App.UI.View.MainLinks() + '</center>'; + fragment.append(App.UI.DOM.makeElement("div", App.UI.View.mainLinks(), "center")); } App.UI.tabbar.handlePreSelectedTab(); - return r; + return App.UI.DOM.includeDOM(fragment, "penthouseDOM"); }; /** diff --git a/src/js/utilsDOM.js b/src/js/utilsDOM.js index 67f70fb1ec862bef704507e3312cc0340b297940..e087b7c3730b08681221f1ee14bd496366acd918 100644 --- a/src/js/utilsDOM.js +++ b/src/js/utilsDOM.js @@ -247,6 +247,46 @@ App.UI.DOM.colorInput = function(defaultValue, onEnter) { return input; }; +/** + * @param {Node} node + * @param {string} uniqueID - should be unique in the whole passage + * @param {string} [tag] + * @returns {string} + */ +App.UI.DOM.includeDOM = function(node, uniqueID, tag = "span") { + $(document).one(':passagedisplay', () => { $(`#inclDOM${uniqueID}`).append(node); }); + + return `<${tag} id='inclDOM${uniqueID}'></${tag}>`; +}; + +/** + * Concats an array of DOM nodes or strings into a human readable list. + * + * @param {Array<Node|string>} content + * @param {string} [delimiter] + * @param {string} [lastDelimiter] + * @returns {Node|string} + */ +App.UI.DOM.arrayToList = function(content, delimiter = ", ", lastDelimiter = " and ") { + if (content.length === 0) { + return "none"; + } + if (this.length === 1) { + return content[0]; + } + const fragment = document.createDocumentFragment(); + const last = content.pop(); + for (let i = 0; i < content.length; i++) { + fragment.append(content[i]); + if (i < content.length - 1) { + fragment.append(delimiter); + } + } + content.push(last); // don't leave the array modified + fragment.append(lastDelimiter, last); + return fragment; +}; + /** * @param {string} text * @returns {HTMLElement} diff --git a/src/js/utilsSC.js b/src/js/utilsSC.js index 0750f1ffeae7d7b18fae4b2d91d08dd24c327d8a..5e1e5008faf948cbb7dfed1f6c0bb62c6a2ee708 100644 --- a/src/js/utilsSC.js +++ b/src/js/utilsSC.js @@ -147,7 +147,9 @@ App.UI.tabbar = function() { return { openTab: openTab, tabButton: tabButton, + tabButtonDOM: tabButtonDOM, makeTab: makeTab, + makeTabDOM: makeTabDOM, handlePreSelectedTab: handlePreSelectedTab, tabChoiceVarName: tabChoiceVarName }; @@ -176,6 +178,34 @@ App.UI.tabbar = function() { return `<button class="tablinks" onclick="App.UI.tabbar.openTab(event, '${name}')" id="tab ${name}">${text}</button>`; } + /** + * @param {string} name + * @param {string} text + * @param {boolean} [plainLink] + * @returns {HTMLButtonElement|HTMLAnchorElement} + */ + function tabButtonDOM(name, text, plainLink = false) { + if (plainLink) { + const link = document.createElement("a"); + link.classList.add("tablinks", "pure"); + link.id = `tab ${name}`; + link.textContent = text; + link.addEventListener('click', event => { + openTab(event, name); + }); + return link; + } else { + const button = document.createElement("button"); + button.classList.add("tablinks"); + button.id = `tab ${name}`; + button.textContent = text; + button.addEventListener('click', event => { + openTab(event, name); + }); + return button; + } + } + /** * @param {string} name * @param {string} content @@ -185,20 +215,41 @@ App.UI.tabbar = function() { return `<div id="${name}" class="tabcontent"><div class="content">${content}</div></div>`; } + /** + * @param {string} name + * @param {Node} content + * @returns {HTMLDivElement} + */ + function makeTabDOM(name, content) { + const outerDiv = document.createElement("div"); + outerDiv.id = name; + outerDiv.classList.add("tabcontent"); + const innerDiv = document.createElement("div"); + innerDiv.classList.add("content"); + innerDiv.append(content); + outerDiv.append(innerDiv); + return outerDiv; + } + function handlePreSelectedTab(defaultTab = "assign", immidiate = false) { let selectedTab = State.variables.tabChoice[tabChoiceVarName()]; - if (!selectedTab) { selectedTab = defaultTab; } + if (!selectedTab) { + selectedTab = defaultTab; + } + function selectTab() { let tabBtn = document.getElementById(`tab ${selectedTab}`); if (!tabBtn) { tabBtn = document.getElementsByClassName('tablinks').item(0); } - if (tabBtn) { tabBtn.click(); } + if (tabBtn) { + tabBtn.click(); + } } if (immidiate) { selectTab(); } else { - $(document).one(':passagedisplay', selectTab); + $(document).one(':passageend', selectTab); } } diff --git a/src/pregmod/breedingTest.tw b/src/pregmod/breedingTest.tw index a5d83622774a765200c85fb8d360f0d0e19e8f03..8eb2a76d8af3716b7e104b7c40b8ab9ece538a33 100644 --- a/src/pregmod/breedingTest.tw +++ b/src/pregmod/breedingTest.tw @@ -1,7 +1,6 @@ :: BreedingTest [nobr] -<<set $nextButton = "Back">> -<<set $nextLink = "Slave Interact">> +<<set $nextButton = "Confirm changes", $nextLink = "AS Dump", $returnTo = "Slave Interact">> <<UpdateStandards>> <<BreedingStandards>> diff --git a/src/uncategorized/bodyModification.tw b/src/uncategorized/bodyModification.tw index 0179e15edb236fa6604755f88b7236cfe129a1e9..e95de3007c2c47c3d52529a19cbffac8bd7c9ecc 100644 --- a/src/uncategorized/bodyModification.tw +++ b/src/uncategorized/bodyModification.tw @@ -1,6 +1,6 @@ :: Body Modification [nobr] -<<set $nextButton = "Back", $nextLink = "Slave Interact">> +<<set $nextButton = "Confirm changes", $nextLink = "AS Dump", $returnTo = "Slave Interact">> <<run clearSummaryCache($activeSlave)>> <<setLocalPronouns $activeSlave>> <<run Enunciate($activeSlave)>> diff --git a/src/uncategorized/main.tw b/src/uncategorized/main.tw index 0168d323adc7b328eaf4cc9e2565747021db66ca..b877403e3fb57a8b7a6c943c7bb3bcfe03f2eb5f 100644 --- a/src/uncategorized/main.tw +++ b/src/uncategorized/main.tw @@ -95,62 +95,27 @@ __''MAIN MENU''__ //[[Summary Options]]// <<print App.UI.SlaveList.penthousePage()>> -<<if $useSlaveSummaryTabs === 0>> /*Display traditionally, without tabs*/ - -<<set _j = "Back", _k = "AS Dump", _l = "Main">> -<<for $i = 0; $i < _SL; $i++>> -<<capture $i>> -<<if ($slaves[$i].assignment == "please you")>> - <<setLocalPronouns $slaves[$i]>> - <br> - //<<= App.Interact.ToyChest($slaves[$i])>>// - //In the coming week you plan to concentrate on - <<if $slaves[$i].fuckdoll == 0>> - <<if $slaves[$i].toyHole != "all her holes">> - $his $slaves[$i].toyHole, but for now:// - <<else>> - all of $his holes equally, but for now:// - <</if>> - <br> [["Use "+$his+" mouth"|FLips][$activeSlave = $slaves[$i], $nextButton = _j, $nextLink = _k, $returnTo = _l]] | [["Play with "+$his+" tits"|FBoobs][$activeSlave = $slaves[$i], $nextButton = _j, $nextLink = _k, $returnTo = _l]] - <<if canDoVaginal($slaves[$i])>> - | [["Fuck "+$him|FVagina][$activeSlave = $slaves[$i], $nextButton = _j, $nextLink = _k, $returnTo = _l]] - <<if canDoAnal($slaves[$i])>> - | [["Use "+$his+" holes"|FButt][$activeSlave = $slaves[$i], $nextButton = _j, $nextLink = _k, $returnTo = _l]] - <</if>> - <</if>> - <<if canDoAnal($slaves[$i])>> - | [["Fuck "+$his+" ass"|FAnus][$activeSlave = $slaves[$i], $nextButton = _j, $nextLink = _k, $returnTo = _l]] - <</if>> - <<if canDoVaginal($slaves[$i]) || canDoAnal($slaves[$i])>> - <<if $slaves[$i].belly >= 300000>> - | [["Fuck "+$him+" over "+$his+" belly"|FBellyFuck][$activeSlave = $slaves[$i], $nextButton = _j, $nextLink = _k, $returnTo = _l]] - <</if>> - <</if>> - /*check*/ - <<if canPenetrate($slaves[$i])>> - | [["Ride "+$him|FDick][$activeSlave = $slaves[$i],$nextButton = _j,$nextLink = _k,$returnTo = _l]] - <</if>> - | [["Abuse "+$him|FAbuse][$activeSlave = $slaves[$i],$nextButton = _j,$nextLink = _k,$returnTo = _l]] - <<else>> - <<if $slaves[$i].toyHole != "all her holes">> - $his $slaves[$i].toyHole. - <<else>> - all of $his holes. - <</if>> - <</if>> -<</if>> -<</capture>> -<</for>> +<<if $useSlaveSummaryTabs === 0>> + <span id="fucktoy"></span> + <<script>> + $(document).one(':passageend', () => { + $('#fucktoy').append( + App.MainView.useFucktoys(), + ); + }); + <</script>> <</if>> -<span id="BG"></span> -<<script>> - $(document).one(':passageend', () => { - $('#BG').append( - App.MainView.useGuard(), - ); - }); -<</script>> +<<if $useSlaveSummaryOverviewTab === 0>> + <span id="BG"></span> + <<script>> + $(document).one(':passageend', () => { + $('#BG').append( + App.MainView.useGuard(), + ); + }); + <</script>> +<</if>> <<set $activeSlave = $slaves.random()>> <<if $activeSlave && ($activeSlave.assignment != "please you") && ($activeSlave.assignment != "guard you")>> diff --git a/src/uncategorized/options.tw b/src/uncategorized/options.tw index b45be0ef4dbaa77c07b1615fcca3ea5be7945603..d7160133660929bda66e83906de8137e5b48c4a1 100644 --- a/src/uncategorized/options.tw +++ b/src/uncategorized/options.tw @@ -223,6 +223,7 @@ This save was created using FC version $ver build $releaseID. Main menu slave tabs are <<option 1 "Enabled">> <<option 0 "Disabled">> + <<option 2 "Cardstyle">> <</options>> <<options $useSlaveListInPageJSNavigation>> @@ -231,14 +232,11 @@ This save was created using FC version $ver build $releaseID. <<option 0 "Disabled">> <</options>> - <<if $useSlaveSummaryTabs > 0>> - <br> - <<options $useSlaveSummaryOverviewTab>> - Condense special slaves into an overview tab - <<option 1 "Enabled">> - <<option 0 "Disabled">> - <</options>> - <</if>> + <<options $useSlaveSummaryOverviewTab>> + Condense special slaves into their own tab + <<option 1 "Enabled">> + <<option 0 "Disabled">> + <</options>> <<options $lineSeparations "Summary Options">> Line separations are diff --git a/src/uncategorized/remoteSurgery.tw b/src/uncategorized/remoteSurgery.tw index 3126bfcded6b239cec7802591340d942421e9541..be168122e34a5464d8c6e19976188ff7d00c0247 100644 --- a/src/uncategorized/remoteSurgery.tw +++ b/src/uncategorized/remoteSurgery.tw @@ -6,7 +6,7 @@ } </style> -<<set $nextButton = "Back", $nextLink = "Slave Interact">> +<<set $nextButton = "Confirm changes", $nextLink = "AS Dump", $returnTo = "Slave Interact">> <<set $surgeryType = 0, $showEncyclopedia = 1, $encyclopedia = "The Remote Surgery">> <<set _belly = bellyAdjective($activeSlave)>> diff --git a/src/uncategorized/salon.tw b/src/uncategorized/salon.tw index 534dbbdd384997c53d22f5a38e415616050a04f2..287194ee5d0ceca9d3822b786d41f73767fee914 100644 --- a/src/uncategorized/salon.tw +++ b/src/uncategorized/salon.tw @@ -1,6 +1,6 @@ :: Salon [nobr] -<<set $nextButton = "Back", $nextLink = "Slave Interact">> +<<set $nextButton = "Confirm changes", $nextLink = "AS Dump", $returnTo = "Slave Interact">> <<set $showEncyclopedia = 1>><<set $encyclopedia = "The Auto Salon">> <<if $showInches == 2>> diff --git a/src/uncategorized/slaveInteract.tw b/src/uncategorized/slaveInteract.tw index 520d65f20a6875bbb7473b8f66e71de0463b3bce..df78e282ca9dc202d7044593af82b507473ddb0c 100644 --- a/src/uncategorized/slaveInteract.tw +++ b/src/uncategorized/slaveInteract.tw @@ -2,8 +2,9 @@ <<set $nextButton = "Confirm changes", $nextLink = "AS Dump", $returnTo = "Main">> <<set _SL = $slaves.length, _CL = $canines.length, _HL = $hooved.length, _FL = $felines.length>> -<<setLocalPronouns $activeSlave>> -<<run Enunciate($activeSlave)>> +<script>V.i = V.slaveIndices[V.activeSlave.ID]</script> +<<setLocalPronouns $slaves[$i]>> +<<run Enunciate($slaves[$i])>> <style> .active { background-color: grey; @@ -13,8 +14,8 @@ <<run App.UI.tabbar.handlePreSelectedTab($tabChoice.slaveInteract)>> -<<if !assignmentVisible($activeSlave)>> - <<switch $activeSlave.assignment>> +<<if !assignmentVisible($slaves[$i])>> + <<switch $slaves[$i].assignment>> <<case "work in the brothel" "be the Madam">> <<set $returnTo = "Brothel">> <<case "be confined in the arcade">> @@ -45,11 +46,11 @@ <</if>> <<set $encyclopedia = either("Costs Summary", "Disease in the Free Cities", "Drugs and Their Effects", "From Rebellious to Devoted", "Gender", "Independent Slaves", "Modern Anal", "Nymphomania", "Slave Couture")>> -<<if $activeSlave.dick > 0>> +<<if $slaves[$i].dick > 0>> <<set $showEncyclopedia = 1, $encyclopedia = "Gender">> <</if>> -<<run App.UI.SlaveInteract.placeInLine($activeSlave)>> +<<run App.UI.SlaveInteract.placeInLine($slaves[$i])>> <p align="center"> <<if $cheatMode == 1>> @@ -66,7 +67,7 @@ </span> <span class='slave-name'> - $activeSlave.slaveName + $slaves[$i].slaveName </span> <span id="nextSlave" style="font-weight:bold"> @@ -78,21 +79,21 @@ </p> <button class="tablinks" onclick="App.UI.tabbar.openTab(event, 'Description')" id="tab Description">Description</button> <button class="tablinks" onclick="App.UI.tabbar.openTab(event, 'Location')" id="tab Location">Location</button> -<button class="tablinks" onclick="App.UI.tabbar.openTab(event, 'Appearance'), App.UI.Wardrobe.refreshAll(V.activeSlave)" id="tab Appearance">Appearance</button> +<button class="tablinks" onclick="App.UI.tabbar.openTab(event, 'Appearance'), App.UI.Wardrobe.refreshAll(V.slaves[V.i])" id="tab Appearance">Appearance</button> <button class="tablinks" onclick="App.UI.tabbar.openTab(event, 'PhysicalRegimen')" id="tab PhysicalRegimen">Physical Regimen</button> <button class="tablinks" onclick="App.UI.tabbar.openTab(event, 'Rules')" id="tab Rules">Rules</button> <button class="tablinks" onclick="App.UI.tabbar.openTab(event, 'Financial')" id="tab Financial">Financial</button> -<button class="tablinks" onclick="App.UI.tabbar.openTab(event, 'Customize'), App.UI.SlaveInteract.custom(V.activeSlave)" id="tab Customize">Customize</button> +<button class="tablinks" onclick="App.UI.tabbar.openTab(event, 'Customize'), App.UI.SlaveInteract.custom(V.slaves[V.i])" id="tab Customize">Customize</button> <<if $familyTesting == 1>> - <button class="tablinks" onclick="App.UI.tabbar.openTab(event, 'FamilyTab'), renderFamilyTree(V.slaves, V.activeSlave.ID)" id="tab FamilyTab">Family</button> + <button class="tablinks" onclick="App.UI.tabbar.openTab(event, 'FamilyTab'), renderFamilyTree(V.slaves, V.slaves[V.i].ID)" id="tab FamilyTab">Family</button> <</if>> <div id="artFrame"> <<if $seeImages == 1 && $eventDescription != 1>> <<if $imageChoice == 1>> - <div class="imageRef lrgVector"><div class="mask"> </div><<= SlaveArt($activeSlave, 3, 0)>></div> + <div class="imageRef lrgVector"><div class="mask"> </div><<= SlaveArt($slaves[$i], 3, 0)>></div> <<else>> - <div class="imageRef lrgRender"><div class="mask"> </div><<= SlaveArt($activeSlave, 3, 0)>></div> + <div class="imageRef lrgRender"><div class="mask"> </div><<= SlaveArt($slaves[$i], 3, 0)>></div> <</if>> <</if>> </div> @@ -147,11 +148,12 @@ <div id="miniscene"></div> <span id="useSlave"></span> <script> - App.UI.SlaveInteract.useSlaveDisplay(V.activeSlave) + console.log(V.i, V.slaves[V.i]); + App.UI.SlaveInteract.useSlaveDisplay(V.slaves[V.i]); </script> </p> <p> - <<switch $activeSlave.assignment>> + <<switch $slaves[$i].assignment>> <<case "recover from surgery">> //$He is recovering from surgery this week// <<case "guard you">> @@ -187,7 +189,7 @@ /* CAN BE REASSIGNED */ <span id="assignmentLinks"></span> - <script>App.UI.SlaveInteract.assignmentBlock("assignmentLinks", V.activeSlave)</script> + <script>App.UI.SlaveInteract.assignmentBlock("assignmentLinks", V.slaves[V.i])</script> <<set _numFacilities = $brothel+$club+$dairy+$farmyard+$servantsQuarters+$masterSuite+$spa+$nursery+$clinic+$schoolroom+$cellblock+$arcade+$HGSuite>> @@ -196,17 +198,17 @@ <</if>> /* closes _numFacilities */ <div id="fucktoypref"></div> - <script>App.UI.SlaveInteract.fucktoyPref(V.activeSlave)</script> + <script>App.UI.SlaveInteract.fucktoyPref(V.slaves[V.i])</script> <</switch>> /* END CAN BE REASSIGNED */ - <<if $activeSlave.assignment == "whore" || $activeSlave.assignment == "work in the brothel">> - <br>Whoring Target: <strong><span id="whoreClass"><<if !$activeSlave.whoreClass>>auto<<elseif $activeSlave.whoreClass == 1>>the lower class<<elseif $activeSlave.whoreClass == 2>>the middle class<<elseif $activeSlave.whoreClass == 3>>the upper class<<elseif $activeSlave.whoreClass == 4>>millionaires<<else>>THERE HAS BEEN AN ERROR<</if>></span></strong>. //This is the highest class they are allowed to service, when eligible// - <<link "Auto">><<set $activeSlave.whoreClass = 0>><<replace "#whoreClass">>auto<</replace>><</link>> | - <<link "Lower Class">><<set $activeSlave.whoreClass = 1>><<replace "#whoreClass">>the lower class<</replace>><</link>> | - <<link "Middle Class">><<set $activeSlave.whoreClass = 2>><<replace "#whoreClass">>the middle class<</replace>><</link>> | - <<link "Upper Class">><<set $activeSlave.whoreClass = 3>><<replace "#whoreClass">>the upper class<</replace>><</link>> | - <<link "Millionaires">><<set $activeSlave.whoreClass = 4>><<replace "#whoreClass">>millionaires<</replace>><</link>> + <<if $slaves[$i].assignment == "whore" || $slaves[$i].assignment == "work in the brothel">> + <br>Whoring Target: <strong><span id="whoreClass"><<if !$slaves[$i].whoreClass>>auto<<elseif $slaves[$i].whoreClass == 1>>the lower class<<elseif $slaves[$i].whoreClass == 2>>the middle class<<elseif $slaves[$i].whoreClass == 3>>the upper class<<elseif $slaves[$i].whoreClass == 4>>millionaires<<else>>THERE HAS BEEN AN ERROR<</if>></span></strong>. //This is the highest class they are allowed to service, when eligible// + <<link "Auto">><<set $slaves[$i].whoreClass = 0>><<replace "#whoreClass">>auto<</replace>><</link>> | + <<link "Lower Class">><<set $slaves[$i].whoreClass = 1>><<replace "#whoreClass">>the lower class<</replace>><</link>> | + <<link "Middle Class">><<set $slaves[$i].whoreClass = 2>><<replace "#whoreClass">>the middle class<</replace>><</link>> | + <<link "Upper Class">><<set $slaves[$i].whoreClass = 3>><<replace "#whoreClass">>the upper class<</replace>><</link>> | + <<link "Millionaires">><<set $slaves[$i].whoreClass = 4>><<replace "#whoreClass">>millionaires<</replace>><</link>> <</if>> </p> </div> @@ -218,52 +220,52 @@ <h3>Appearance</h3> <span id="clothes"></span> - /*<script>App.UI.Wardrobe.clothes(V.activeSlave)</script>*/ + /*<script>App.UI.Wardrobe.clothes(V.slaves[V.i])</script>*/ - <<if $activeSlave.fuckdoll == 0>> + <<if $slaves[$i].fuckdoll == 0>> <span id="collar"></span> - /*<script>App.UI.Wardrobe.collar(V.activeSlave)</script>*/ + /*<script>App.UI.Wardrobe.collar(V.slaves[V.i])</script>*/ <span id="armAccessory"></span> - /*<script>App.UI.Wardrobe.armAccessory(V.activeSlave)</script>*/ + /*<script>App.UI.Wardrobe.armAccessory(V.slaves[V.i])</script>*/ - <<if hasAnyLegs($activeSlave)>> + <<if hasAnyLegs($slaves[$i])>> <span id="shoes"></span> - /*<script>App.UI.Wardrobe.shoes(V.activeSlave)</script>*/ + /*<script>App.UI.Wardrobe.shoes(V.slaves[V.i])</script>*/ <span id="legAccessory"></span> - /*<script>App.UI.Wardrobe.legAccessory(V.activeSlave)</script>*/ + /*<script>App.UI.Wardrobe.legAccessory(V.slaves[V.i])</script>*/ <</if>> <span id="bellyAccessory"></span> - /*<script>App.UI.Wardrobe.bellyAccessory(V.activeSlave)</script>*/ + /*<script>App.UI.Wardrobe.bellyAccessory(V.slaves[V.i])</script>*/ <span id="buttplug"></span> - /*<script>App.UI.Wardrobe.buttplug(V.activeSlave)</script>*/ + /*<script>App.UI.Wardrobe.buttplug(V.slaves[V.i])</script>*/ - <<if isItemAccessible("tail") && $activeSlave.buttplug != "none">> + <<if isItemAccessible("tail") && $slaves[$i].buttplug != "none">> <span id="buttplugAttachment"></span> - /*<script>App.UI.Wardrobe.buttplugAttachment(V.activeSlave)</script>*/ + /*<script>App.UI.Wardrobe.buttplugAttachment(V.slaves[V.i])</script>*/ <</if>> - <<if $activeSlave.vagina > -1>> + <<if $slaves[$i].vagina > -1>> <span id="vaginalAccessory"></span> - /*<script>App.UI.Wardrobe.vaginalAccessory(V.activeSlave)</script>*/ + /*<script>App.UI.Wardrobe.vaginalAccessory(V.slaves[V.i])</script>*/ <span id="vaginalAttachment"></span> - /*<script>App.UI.Wardrobe.vaginalAttachment(V.activeSlave)</script>*/ + /*<script>App.UI.Wardrobe.vaginalAttachment(V.slaves[V.i])</script>*/ <</if>> - <<if $activeSlave.dick > 0>> + <<if $slaves[$i].dick > 0>> <span id="dickAccessory"></span> - /*<script>App.UI.Wardrobe.dickAccessory(V.activeSlave)</script>*/ + /*<script>App.UI.Wardrobe.dickAccessory(V.slaves[V.i])</script>*/ <</if>> <span id="chastity"></span> - /*<script>App.UI.Wardrobe.chastity(V.activeSlave)</script>*/ + /*<script>App.UI.Wardrobe.chastity(V.slaves[V.i])</script>*/ <h3>Shopping</h3> <span id="shopping"></span> - <script>App.UI.Wardrobe.shopping(V.activeSlave)</script> + <script>App.UI.Wardrobe.shopping(V.slaves[V.i])</script> <</if>> /* CLOSES FUCKDOLL CHECK */ </p> @@ -274,102 +276,102 @@ <div class="content"> <h3>Physical Regimen</h3> <span id="drugs"></span> - <script>App.UI.SlaveInteract.drugs(V.activeSlave)</script> + <script>App.UI.SlaveInteract.drugs(V.slaves[V.i])</script> <span id="curatives"></span> - <script>App.UI.SlaveInteract.curatives(V.activeSlave)</script> + <script>App.UI.SlaveInteract.curatives(V.slaves[V.i])</script> <span id="aphrodisiacs"></span> - <script>App.UI.SlaveInteract.aphrodisiacs(V.activeSlave)</script> + <script>App.UI.SlaveInteract.aphrodisiacs(V.slaves[V.i])</script> <span id="fertilityblock"></span> - <script>App.UI.SlaveInteract.fertility(V.activeSlave)</script> + <script>App.UI.SlaveInteract.fertility(V.slaves[V.i])</script> <span id="incubator"></span> - <script>App.UI.SlaveInteract.incubator(V.activeSlave)</script> + <script>App.UI.SlaveInteract.incubator(V.slaves[V.i])</script> <span id="nursery"></span> - <script>App.UI.SlaveInteract.nursery(V.activeSlave)</script> + <script>App.UI.SlaveInteract.nursery(V.slaves[V.i])</script> <<if $propOutcome == 1 && $arcologies[0].FSRestart != "unset">> - <<if $activeSlave.breedingMark == 0 && $activeSlave.fuckdoll == 0 && $activeSlave.eggType == "human" && isFertile($activeSlave) && $activeSlave.preg == 0>> + <<if $slaves[$i].breedingMark == 0 && $slaves[$i].fuckdoll == 0 && $slaves[$i].eggType == "human" && isFertile($slaves[$i]) && $slaves[$i].preg == 0>> <br> [[Breeder Eligibility Exam|BreedingTest]] <</if>> <</if>> <span id="bloating"></span> - <script>App.UI.SlaveInteract.bloating(V.activeSlave)</script> + <script>App.UI.SlaveInteract.bloating(V.slaves[V.i])</script> Hormones: <strong><span id="hormones"> - <<if $activeSlave.hormones == -2>>intensive male<<elseif $activeSlave.hormones == -1>>male<<elseif $activeSlave.hormones == 2>>intensive female<<elseif $activeSlave.hormones == 1>>female<<else>>none<</if>></span></strong>. - <<if $activeSlave.indentureRestrictions < 2>> - <<link "Intensive Female">><<set $activeSlave.hormones = 2>><<replace "#hormones">>intensive female<</replace>><</link>> | + <<if $slaves[$i].hormones == -2>>intensive male<<elseif $slaves[$i].hormones == -1>>male<<elseif $slaves[$i].hormones == 2>>intensive female<<elseif $slaves[$i].hormones == 1>>female<<else>>none<</if>></span></strong>. + <<if $slaves[$i].indentureRestrictions < 2>> + <<link "Intensive Female">><<set $slaves[$i].hormones = 2>><<replace "#hormones">>intensive female<</replace>><</link>> | <</if>> - <<link "Female">><<set $activeSlave.hormones = 1>><<replace "#hormones">>female<</replace>><</link>> | - <<link "None">><<set $activeSlave.hormones = 0>><<replace "#hormones">>none<</replace>><</link>> | - <<link "Male">><<set $activeSlave.hormones = -1>><<replace "#hormones">>male<</replace>><</link>> | - <<if $activeSlave.indentureRestrictions < 2>> - <<link "Intensive Male">><<set $activeSlave.hormones = -2>><<replace "#hormones">>intensive male<</replace>><</link>> + <<link "Female">><<set $slaves[$i].hormones = 1>><<replace "#hormones">>female<</replace>><</link>> | + <<link "None">><<set $slaves[$i].hormones = 0>><<replace "#hormones">>none<</replace>><</link>> | + <<link "Male">><<set $slaves[$i].hormones = -1>><<replace "#hormones">>male<</replace>><</link>> | + <<if $slaves[$i].indentureRestrictions < 2>> + <<link "Intensive Male">><<set $slaves[$i].hormones = -2>><<replace "#hormones">>intensive male<</replace>><</link>> <</if>> - <br>Diet: <strong><span id="diet">$activeSlave.diet</span></strong>. - <<link "Healthy">><<set $activeSlave.diet = "healthy">><<replace "#diet">>$activeSlave.diet<</replace>><</link>> - <<if ($activeSlave.health.condition < 90 || $activeSlave.chem >= 10) && ($dietCleanse == 1)>> - | <<link "Cleanse">><<set $activeSlave.diet = "cleansing">><<replace "#diet">>$activeSlave.diet<</replace>><</link>> + <br>Diet: <strong><span id="diet">$slaves[$i].diet</span></strong>. + <<link "Healthy">><<set $slaves[$i].diet = "healthy">><<replace "#diet">>$slaves[$i].diet<</replace>><</link>> + <<if ($slaves[$i].health.condition < 90 || $slaves[$i].chem >= 10) && ($dietCleanse == 1)>> + | <<link "Cleanse">><<set $slaves[$i].diet = "cleansing">><<replace "#diet">>$slaves[$i].diet<</replace>><</link>> <<elseif ($dietCleanse == 1)>> | //$He is already healthy// <</if>> - <<if ($activeSlave.balls > 0) && ($cumProDiet == 1)>> - | <<link "Cum production">><<set $activeSlave.diet = "cum production">><<replace "#diet">>$activeSlave.diet<</replace>><</link>> + <<if ($slaves[$i].balls > 0) && ($cumProDiet == 1)>> + | <<link "Cum production">><<set $slaves[$i].diet = "cum production">><<replace "#diet">>$slaves[$i].diet<</replace>><</link>> <</if>> - <<if isFertile($activeSlave) && $activeSlave.preg == 0 && ($dietFertility == 1)>> - | <<link "Fertility">><<set $activeSlave.diet = "fertility">><<replace "#diet">>$activeSlave.diet<</replace>><</link>> + <<if isFertile($slaves[$i]) && $slaves[$i].preg == 0 && ($dietFertility == 1)>> + | <<link "Fertility">><<set $slaves[$i].diet = "fertility">><<replace "#diet">>$slaves[$i].diet<</replace>><</link>> <</if>> - <<if ($activeSlave.weight >= -95)>> - | <<link "Lose weight">><<set $activeSlave.diet = "restricted">><<replace "#diet">>$activeSlave.diet<</replace>><</link>> + <<if ($slaves[$i].weight >= -95)>> + | <<link "Lose weight">><<set $slaves[$i].diet = "restricted">><<replace "#diet">>$slaves[$i].diet<</replace>><</link>> <<else>> | //$He is already underweight// <</if>> - <<if $activeSlave.weight <= 200>> - | <<link "Fatten">><<set $activeSlave.diet = "fattening">><<replace "#diet">>$activeSlave.diet<</replace>><</link>> + <<if $slaves[$i].weight <= 200>> + | <<link "Fatten">><<set $slaves[$i].diet = "fattening">><<replace "#diet">>$slaves[$i].diet<</replace>><</link>> <<else>> | //$He is already extremely overweight// <</if>> <<if $feeder == 1>> - | <<link "Estrogen enriched">><<set $activeSlave.diet = "XX">><<replace "#diet">>$activeSlave.diet<</replace>><</link>> - | <<link "Testosterone enriched">><<set $activeSlave.diet = "XY">><<replace "#diet">>$activeSlave.diet<</replace>><</link>> - <<if $dietXXY == 1 && $activeSlave.balls > 0 && ($activeSlave.ovaries == 1 || $activeSlave.mpreg == 1)>> - | <<link "Herm hormone blend">><<set $activeSlave.diet = "XXY">><<replace "#diet">>$activeSlave.diet<</replace>><</link>> + | <<link "Estrogen enriched">><<set $slaves[$i].diet = "XX">><<replace "#diet">>$slaves[$i].diet<</replace>><</link>> + | <<link "Testosterone enriched">><<set $slaves[$i].diet = "XY">><<replace "#diet">>$slaves[$i].diet<</replace>><</link>> + <<if $dietXXY == 1 && $slaves[$i].balls > 0 && ($slaves[$i].ovaries == 1 || $slaves[$i].mpreg == 1)>> + | <<link "Herm hormone blend">><<set $slaves[$i].diet = "XXY">><<replace "#diet">>$slaves[$i].diet<</replace>><</link>> <</if>> <</if>> - <<if ($activeSlave.muscles <= 95) && !isAmputee($activeSlave)>> - | <<link "Build muscle">><<set $activeSlave.diet = "muscle building">><<replace "#diet">>$activeSlave.diet<</replace>><</link>> - <<elseif !isAmputee($activeSlave)>> + <<if ($slaves[$i].muscles <= 95) && !isAmputee($slaves[$i])>> + | <<link "Build muscle">><<set $slaves[$i].diet = "muscle building">><<replace "#diet">>$slaves[$i].diet<</replace>><</link>> + <<elseif !isAmputee($slaves[$i])>> | //$He is maintaining $his enormous musculature// <<else>> | //$He has no limbs and thus can't effectively build muscle// <</if>> - <<if ($activeSlave.muscles > 5 || $activeSlave.fuckdoll == 0) && canWalk($activeSlave)>> - | <<link "Slim down">><<set $activeSlave.diet = "slimming">><<replace "#diet">>$activeSlave.diet<</replace>><</link>> - <<elseif !canWalk($activeSlave)>> + <<if ($slaves[$i].muscles > 5 || $slaves[$i].fuckdoll == 0) && canWalk($slaves[$i])>> + | <<link "Slim down">><<set $slaves[$i].diet = "slimming">><<replace "#diet">>$slaves[$i].diet<</replace>><</link>> + <<elseif !canWalk($slaves[$i])>> | //$He can't move and thus can't trim down// - <<elseif $activeSlave.fuckdoll > 0>> + <<elseif $slaves[$i].fuckdoll > 0>> | //$He has no muscles left to lose// <</if>> - <br>Diet Base: <strong><span id="dietBase"><<if $activeSlave.dietCum == 2>>cum based<<elseif ($activeSlave.dietCum == 1) && ($activeSlave.dietMilk == 0)>>cum added<<elseif ($activeSlave.dietCum == 1) && ($activeSlave.dietMilk == 1)>>cum and milk added<<elseif ($activeSlave.dietMilk == 1) && ($activeSlave.dietCum == 0)>>milk added<<elseif ($activeSlave.dietMilk == 2)>>milk based<<elseif ($activeSlave.dietCum == 0) && ($activeSlave.dietMilk == 0)>>normal<<else>>THERE HAS BEEN AN ERROR<</if>></span></strong>. - <<link "Normal">><<set $activeSlave.dietCum = 0>><<set $activeSlave.dietMilk = 0>><<replace "#dietBase">>normal<</replace>><</link>> | - <<link "Cum added">><<set $activeSlave.dietCum = 1>><<set $activeSlave.dietMilk = 0>><<replace "#dietBase">>cum added<</replace>><</link>> | - <<link "Milk added">><<set $activeSlave.dietCum = 0>><<set $activeSlave.dietMilk = 1>><<replace "#dietBase">>milk added<</replace>><</link>> | - <<link "Cum & milk added">><<set $activeSlave.dietCum = 1>><<set $activeSlave.dietMilk = 1>><<replace "#dietBase">>cum & milk added<</replace>><</link>> | - <<link "Cum based">><<set $activeSlave.dietCum = 2>><<set $activeSlave.dietMilk = 0>><<replace "#dietBase">>cum based<</replace>><</link>> | - <<link "Milk based">><<set $activeSlave.dietCum = 0>><<set $activeSlave.dietMilk = 2>><<replace "#dietBase">>milk based<</replace>><</link>> + <br>Diet Base: <strong><span id="dietBase"><<if $slaves[$i].dietCum == 2>>cum based<<elseif ($slaves[$i].dietCum == 1) && ($slaves[$i].dietMilk == 0)>>cum added<<elseif ($slaves[$i].dietCum == 1) && ($slaves[$i].dietMilk == 1)>>cum and milk added<<elseif ($slaves[$i].dietMilk == 1) && ($slaves[$i].dietCum == 0)>>milk added<<elseif ($slaves[$i].dietMilk == 2)>>milk based<<elseif ($slaves[$i].dietCum == 0) && ($slaves[$i].dietMilk == 0)>>normal<<else>>THERE HAS BEEN AN ERROR<</if>></span></strong>. + <<link "Normal">><<set $slaves[$i].dietCum = 0>><<set $slaves[$i].dietMilk = 0>><<replace "#dietBase">>normal<</replace>><</link>> | + <<link "Cum added">><<set $slaves[$i].dietCum = 1>><<set $slaves[$i].dietMilk = 0>><<replace "#dietBase">>cum added<</replace>><</link>> | + <<link "Milk added">><<set $slaves[$i].dietCum = 0>><<set $slaves[$i].dietMilk = 1>><<replace "#dietBase">>milk added<</replace>><</link>> | + <<link "Cum & milk added">><<set $slaves[$i].dietCum = 1>><<set $slaves[$i].dietMilk = 1>><<replace "#dietBase">>cum & milk added<</replace>><</link>> | + <<link "Cum based">><<set $slaves[$i].dietCum = 2>><<set $slaves[$i].dietMilk = 0>><<replace "#dietBase">>cum based<</replace>><</link>> | + <<link "Milk based">><<set $slaves[$i].dietCum = 0>><<set $slaves[$i].dietMilk = 2>><<replace "#dietBase">>milk based<</replace>><</link>> <<if $arcologies[0].FSHedonisticDecadenceResearch == 1>> - <br>Solid Slave Food Access: <strong><span id="snacks"><<if $activeSlave.onDiet == 0>>Free to stuff $himself.<<else>>On a strict diet.<</if>></span></strong> - <<link "No access">><<set $activeSlave.onDiet = 1>><<replace "#snacks">>On a strict diet.<</replace>><</link>> | - <<link "Full access">><<set $activeSlave.onDiet = 0>><<replace "#snacks">>Free to stuff $himself.<</replace>><</link>> + <br>Solid Slave Food Access: <strong><span id="snacks"><<if $slaves[$i].onDiet == 0>>Free to stuff $himself.<<else>>On a strict diet.<</if>></span></strong> + <<link "No access">><<set $slaves[$i].onDiet = 1>><<replace "#snacks">>On a strict diet.<</replace>><</link>> | + <<link "Full access">><<set $slaves[$i].onDiet = 0>><<replace "#snacks">>Free to stuff $himself.<</replace>><</link>> <</if>> </div> </div> @@ -378,164 +380,165 @@ <div class="content"> <p> <<if $universalRulesImpregnation == "HG" && $seePreg != 0>> - <<if $activeSlave.HGExclude == 0>> - Will be bred by the Head Girl when fertile. <<link "Exempt $him" "Slave Interact">><<set $activeSlave.HGExclude = 1>><</link>> + <<if $slaves[$i].HGExclude == 0>> + Will be bred by the Head Girl when fertile. <<link "Exempt $him" "Slave Interact">><<set $slaves[$i].HGExclude = 1>><</link>> <<else>> - Will not be bred by the Head Girl when fertile. <<link "Include $him" "Slave Interact">><<set $activeSlave.HGExclude = 0>><</link>> + Will not be bred by the Head Girl when fertile. <<link "Include $him" "Slave Interact">><<set $slaves[$i].HGExclude = 0>><</link>> <</if>> <</if>> </p> <p> - <<if $activeSlave.useRulesAssistant == 0>> + <<if $slaves[$i].useRulesAssistant == 0>> <span class="gray"> ''Not subject'' to the Rules Assistant. </span> <<link "Include $him" "Slave Interact">> - <<set $activeSlave.useRulesAssistant = 1>> + <<set $slaves[$i].useRulesAssistant = 1>> <</link>> <<else>> __Rules Assistant:__ [[Rules Assistant Options|Rules Assistant]] - <<if (def $activeSlave.currentRules) && ($activeSlave.currentRules.length > 0)>> + <<if (def $slaves[$i].currentRules) && ($slaves[$i].currentRules.length > 0)>> <ul style="margin:0"> - <<= $defaultRules.filter(x => ruleApplied($activeSlave, x)).map(x => `<li>Rule "${x.name}" applied</li>`).join(" ") >> + <<= $defaultRules.filter(x => ruleApplied($slaves[$i], x)).map(x => `<li>Rule "${x.name}" applied</li>`).join(" ") >> </ul> <<else>> | <</if>> <span style="font-style:italic"> <<link "Apply rules">> - <<run DefaultRules($activeSlave)>> - <<goto "Slave Interact">> + <<run DefaultRules($slaves[$i])>> + <<set $returnTo = "Slave Interact">> + <<goto "AS Dump">> <</link>> </span> | <<link "Exempt $him" "Slave Interact">> - <<set $activeSlave.useRulesAssistant = 0>> + <<set $slaves[$i].useRulesAssistant = 0>> <</link>> <</if>> </p> - <<if $activeSlave.fuckdoll > 0>> + <<if $slaves[$i].fuckdoll > 0>> //Rules have little meaning for living sex toys// <<else>> <<set _visibleSlaves = $slaves.filter(s => assignmentVisible(s) && (s.assignment != "be your Head Girl" || $HGSuite != 1) && (s.assignment != "guard you" || $dojo <= 1)), $dormitoryPopulation = _visibleSlaves.filter(s => s.rules.living != "luxurious").length, $roomsPopulation = _visibleSlaves.length - $dormitoryPopulation - _visibleSlaves.filter(s => s.rules.living == "luxurious" && s.relationship >= 4).length * 0.5>> - Living standard: ''<span id="livingRules">$activeSlave.rules.living</span>.'' - <<if setup.facilityCareers.includes($activeSlave.assignment)>> + Living standard: ''<span id="livingRules">$slaves[$i].rules.living</span>.'' + <<if setup.facilityCareers.includes($slaves[$i].assignment)>> //$His living conditions are managed by $his assignment.// - <<elseif ($activeSlave.assignment == "be your Head Girl") && ($HGSuite == 1)>> + <<elseif ($slaves[$i].assignment == "be your Head Girl") && ($HGSuite == 1)>> //$He has $his own little luxurious room in the penthouse with everything $he needs to be a proper Head Girl.// - <<elseif ($activeSlave.assignment == "guard you") && ($dojo > 1)>> + <<elseif ($slaves[$i].assignment == "guard you") && ($dojo > 1)>> //$He has a comfortable room in the armory to call $his own.// <<else>> - <<link "Spare">><<set $activeSlave.rules.living = "spare">><<replace "#livingRules">>$activeSlave.rules.living<</replace>><</link>> | - <<link "Normal">><<set $activeSlave.rules.living = "normal">><<replace "#livingRules">>$activeSlave.rules.living<</replace>><</link>> | - <<if $roomsPopulation <= $rooms-0.5>><<link "Luxurious">><<set $activeSlave.rules.living = "luxurious">><<replace "#livingRules">>$activeSlave.rules.living<</replace>><</link>><<else>>//No luxurious rooms available//<</if>> + <<link "Spare">><<set $slaves[$i].rules.living = "spare">><<replace "#livingRules">>$slaves[$i].rules.living<</replace>><</link>> | + <<link "Normal">><<set $slaves[$i].rules.living = "normal">><<replace "#livingRules">>$slaves[$i].rules.living<</replace>><</link>> | + <<if $roomsPopulation <= $rooms-0.5>><<link "Luxurious">><<set $slaves[$i].rules.living = "luxurious">><<replace "#livingRules">>$slaves[$i].rules.living<</replace>><</link>><<else>>//No luxurious rooms available//<</if>> <</if>> - <br>Typical punishment: ''<span id="standardPunishment">$activeSlave.rules.punishment</span>.'' - <<link "Confinement">><<set $activeSlave.rules.punishment = "confinement">><<replace "#standardPunishment">>$activeSlave.rules.punishment<</replace>><</link>> | - <<link "Whipping">><<set $activeSlave.rules.punishment = "whipping">><<replace "#standardPunishment">>$activeSlave.rules.punishment<</replace>><</link>> | - <<link "Chastity">><<set $activeSlave.rules.punishment = "chastity">><<replace "#standardPunishment">>$activeSlave.rules.punishment<</replace>><</link>> | - <<link "Situational">><<set $activeSlave.rules.punishment = "situational">><<replace "#standardPunishment">>$activeSlave.rules.punishment<</replace>><</link>> - <br>Typical reward: ''<span id="standardReward">$activeSlave.rules.reward</span>.'' - <<link "Relaxation">><<set $activeSlave.rules.reward = "relaxation">><<replace "#standardReward">>$activeSlave.rules.reward<</replace>><</link>> | - <<link "Drugs">><<set $activeSlave.rules.reward = "drugs">><<replace "#standardReward">>$activeSlave.rules.reward<</replace>><</link>> | - <<link "Orgasm">><<set $activeSlave.rules.reward = "orgasm">><<replace "#standardReward">>$activeSlave.rules.reward<</replace>><</link>> | - <<link "Situational">><<set $activeSlave.rules.reward = "situational">><<replace "#standardReward">>$activeSlave.rules.reward<</replace>><</link>> - - <<if setup.facilityHeads.includes($activeSlave.assignment)>> - <<if $activeSlave.lactation != 2>> - <br>Lactation maintenance for facility heads: ''<span id="lactationRules">$activeSlave.rules.lactation</span>.'' - <<link "Left alone">><<set $activeSlave.rules.lactation = "none">><<replace "#lactationRules">>$activeSlave.rules.lactation<</replace>><</link>> | - <<if $activeSlave.lactation == 0>> - <<link "Induce lactation">><<set $activeSlave.rules.lactation = "induce">><<replace "#lactationRules">>$activeSlave.rules.lactation<</replace>><</link>> + <br>Typical punishment: ''<span id="standardPunishment">$slaves[$i].rules.punishment</span>.'' + <<link "Confinement">><<set $slaves[$i].rules.punishment = "confinement">><<replace "#standardPunishment">>$slaves[$i].rules.punishment<</replace>><</link>> | + <<link "Whipping">><<set $slaves[$i].rules.punishment = "whipping">><<replace "#standardPunishment">>$slaves[$i].rules.punishment<</replace>><</link>> | + <<link "Chastity">><<set $slaves[$i].rules.punishment = "chastity">><<replace "#standardPunishment">>$slaves[$i].rules.punishment<</replace>><</link>> | + <<link "Situational">><<set $slaves[$i].rules.punishment = "situational">><<replace "#standardPunishment">>$slaves[$i].rules.punishment<</replace>><</link>> + <br>Typical reward: ''<span id="standardReward">$slaves[$i].rules.reward</span>.'' + <<link "Relaxation">><<set $slaves[$i].rules.reward = "relaxation">><<replace "#standardReward">>$slaves[$i].rules.reward<</replace>><</link>> | + <<link "Drugs">><<set $slaves[$i].rules.reward = "drugs">><<replace "#standardReward">>$slaves[$i].rules.reward<</replace>><</link>> | + <<link "Orgasm">><<set $slaves[$i].rules.reward = "orgasm">><<replace "#standardReward">>$slaves[$i].rules.reward<</replace>><</link>> | + <<link "Situational">><<set $slaves[$i].rules.reward = "situational">><<replace "#standardReward">>$slaves[$i].rules.reward<</replace>><</link>> + + <<if setup.facilityHeads.includes($slaves[$i].assignment)>> + <<if $slaves[$i].lactation != 2>> + <br>Lactation maintenance for facility heads: ''<span id="lactationRules">$slaves[$i].rules.lactation</span>.'' + <<link "Left alone">><<set $slaves[$i].rules.lactation = "none">><<replace "#lactationRules">>$slaves[$i].rules.lactation<</replace>><</link>> | + <<if $slaves[$i].lactation == 0>> + <<link "Induce lactation">><<set $slaves[$i].rules.lactation = "induce">><<replace "#lactationRules">>$slaves[$i].rules.lactation<</replace>><</link>> <<else>> - <<link "Maintain lactation">><<set $activeSlave.rules.lactation = "maintain">><<replace "#lactationRules">>$activeSlave.rules.lactation<</replace>><</link>> + <<link "Maintain lactation">><<set $slaves[$i].rules.lactation = "maintain">><<replace "#lactationRules">>$slaves[$i].rules.lactation<</replace>><</link>> <</if>> <</if>> <</if>> <br><br>Non-assignment orgasm rules: <div style="text-indent:2em"> - Masturbation is ''<span id="relMasturbation"><<if $activeSlave.rules.release.masturbation === 1>>allowed<<else>>forbidden<</if>></span>.'' - <<link "Allow">><<set $activeSlave.rules.release.masturbation = 1>><<replace "#relMasturbation">>allowed<</replace>><</link>> | - <<link "Forbid">><<set $activeSlave.rules.release.masturbation = 0>><<replace "#relMasturbation">>forbidden<</replace>><</link>> + Masturbation is ''<span id="relMasturbation"><<if $slaves[$i].rules.release.masturbation === 1>>allowed<<else>>forbidden<</if>></span>.'' + <<link "Allow">><<set $slaves[$i].rules.release.masturbation = 1>><<replace "#relMasturbation">>allowed<</replace>><</link>> | + <<link "Forbid">><<set $slaves[$i].rules.release.masturbation = 0>><<replace "#relMasturbation">>forbidden<</replace>><</link>> </div> <div style="text-indent:2em"> - Sex with romantic partner is ''<span id="relPartner"><<if $activeSlave.rules.release.partner === 1>>allowed<<else>>forbidden<</if>></span>.'' - <<link "Allow">><<set $activeSlave.rules.release.partner = 1>><<replace "#relPartner">>allowed<</replace>><</link>> | - <<link "Forbid">><<set $activeSlave.rules.release.partner = 0>><<replace "#relPartner">>forbidden<</replace>><</link>> + Sex with romantic partner is ''<span id="relPartner"><<if $slaves[$i].rules.release.partner === 1>>allowed<<else>>forbidden<</if>></span>.'' + <<link "Allow">><<set $slaves[$i].rules.release.partner = 1>><<replace "#relPartner">>allowed<</replace>><</link>> | + <<link "Forbid">><<set $slaves[$i].rules.release.partner = 0>><<replace "#relPartner">>forbidden<</replace>><</link>> </div> <<if $seeIncest == 1>> <div style="text-indent:2em"> - Sex with close family is ''<span id="relFamily"><<if $activeSlave.rules.release.family === 1>>allowed<<else>>forbidden<</if>></span>.'' - <<link "Allow">><<set $activeSlave.rules.release.family = 1>><<replace "#relFamily">>allowed<</replace>><</link>> | - <<link "Forbid">><<set $activeSlave.rules.release.family = 0>><<replace "#relFamily">>forbidden<</replace>><</link>> + Sex with close family is ''<span id="relFamily"><<if $slaves[$i].rules.release.family === 1>>allowed<<else>>forbidden<</if>></span>.'' + <<link "Allow">><<set $slaves[$i].rules.release.family = 1>><<replace "#relFamily">>allowed<</replace>><</link>> | + <<link "Forbid">><<set $slaves[$i].rules.release.family = 0>><<replace "#relFamily">>forbidden<</replace>><</link>> </div> <</if>> <div style="text-indent:2em"> - Sex with other slaves is ''<span id="relSlaves"><<if $activeSlave.rules.release.slaves === 1>>allowed<<else>>forbidden<</if>></span>.'' - <<link "Allow">><<set $activeSlave.rules.release.slaves = 1>><<replace "#relSlaves">>allowed<</replace>><</link>> | - <<link "Forbid">><<set $activeSlave.rules.release.slaves = 0>><<replace "#relSlaves">>forbidden<</replace>><</link>> + Sex with other slaves is ''<span id="relSlaves"><<if $slaves[$i].rules.release.slaves === 1>>allowed<<else>>forbidden<</if>></span>.'' + <<link "Allow">><<set $slaves[$i].rules.release.slaves = 1>><<replace "#relSlaves">>allowed<</replace>><</link>> | + <<link "Forbid">><<set $slaves[$i].rules.release.slaves = 0>><<replace "#relSlaves">>forbidden<</replace>><</link>> </div> <div style="text-indent:2em"> - Routine sex with <<= properMaster()>> is ''<span id="relMaster"><<if $activeSlave.rules.release.master === 1>>granted<<else>>denied<</if>></span>.'' - <<link "Grant">><<set $activeSlave.rules.release.master = 1>><<replace "#relMaster">>granted<</replace>><</link>> | - <<link "Deny">><<set $activeSlave.rules.release.master = 0>><<replace "#relMaster">>denied<</replace>><</link>> + Routine sex with <<= properMaster()>> is ''<span id="relMaster"><<if $slaves[$i].rules.release.master === 1>>granted<<else>>denied<</if>></span>.'' + <<link "Grant">><<set $slaves[$i].rules.release.master = 1>><<replace "#relMaster">>granted<</replace>><</link>> | + <<link "Deny">><<set $slaves[$i].rules.release.master = 0>><<replace "#relMaster">>denied<</replace>><</link>> </div> <</if>> - <<if $activeSlave.clitPiercing == 3 || $activeSlave.vaginalAccessory == "smart bullet vibrator">> + <<if $slaves[$i].clitPiercing == 3 || $slaves[$i].vaginalAccessory == "smart bullet vibrator">> <div> - <<if $activeSlave.clitPiercing == 3>> - <<if $activeSlave.dick < 1>> - $His smart clit piercing <<if $activeSlave.vaginalAccessory == "smart bullet vibrator">>and smart bullet vibrator are<<else>>is<</if>> set to + <<if $slaves[$i].clitPiercing == 3>> + <<if $slaves[$i].dick < 1>> + $His smart clit piercing <<if $slaves[$i].vaginalAccessory == "smart bullet vibrator">>and smart bullet vibrator are<<else>>is<</if>> set to <<else>> - $His smart frenulum piercing <<if $activeSlave.vaginalAccessory == "smart bullet vibrator">>and smart bullet vibrator are<<else>>is<</if>> set to + $His smart frenulum piercing <<if $slaves[$i].vaginalAccessory == "smart bullet vibrator">>and smart bullet vibrator are<<else>>is<</if>> set to <</if>> <<else>> $His smart bullet vibe is set to <</if>> - <strong><span id="setting">$activeSlave.clitSetting</span></strong>. - <<link "Vanilla">><<set $activeSlave.clitSetting = "vanilla">><<replace "#setting">>$activeSlave.clitSetting<</replace>><</link>> - | <<link "Oral">><<set $activeSlave.clitSetting = "oral">><<replace "#setting">>$activeSlave.clitSetting<</replace>><</link>> - | <<link "Anal">><<set $activeSlave.clitSetting = "anal">><<replace "#setting">>$activeSlave.clitSetting<</replace>><</link>> - | <<link "Boobs">><<set $activeSlave.clitSetting = "boobs">><<replace "#setting">>$activeSlave.clitSetting<</replace>><</link>> - | <<link "Sub">><<set $activeSlave.clitSetting = "submissive">><<replace "#setting">>$activeSlave.clitSetting<</replace>><</link>> - | <<link "Dom">><<set $activeSlave.clitSetting = "dom">><<replace "#setting">>$activeSlave.clitSetting<</replace>><</link>> - | <<link "Humiliation">><<set $activeSlave.clitSetting = "humiliation">><<replace "#setting">>$activeSlave.clitSetting<</replace>><</link>> + <strong><span id="setting">$slaves[$i].clitSetting</span></strong>. + <<link "Vanilla">><<set $slaves[$i].clitSetting = "vanilla">><<replace "#setting">>$slaves[$i].clitSetting<</replace>><</link>> + | <<link "Oral">><<set $slaves[$i].clitSetting = "oral">><<replace "#setting">>$slaves[$i].clitSetting<</replace>><</link>> + | <<link "Anal">><<set $slaves[$i].clitSetting = "anal">><<replace "#setting">>$slaves[$i].clitSetting<</replace>><</link>> + | <<link "Boobs">><<set $slaves[$i].clitSetting = "boobs">><<replace "#setting">>$slaves[$i].clitSetting<</replace>><</link>> + | <<link "Sub">><<set $slaves[$i].clitSetting = "submissive">><<replace "#setting">>$slaves[$i].clitSetting<</replace>><</link>> + | <<link "Dom">><<set $slaves[$i].clitSetting = "dom">><<replace "#setting">>$slaves[$i].clitSetting<</replace>><</link>> + | <<link "Humiliation">><<set $slaves[$i].clitSetting = "humiliation">><<replace "#setting">>$slaves[$i].clitSetting<</replace>><</link>> <<if $seePreg != 0>> - | <<link "Preg">><<set $activeSlave.clitSetting = "pregnancy">><<replace "#setting">>$activeSlave.clitSetting<</replace>><</link>> + | <<link "Preg">><<set $slaves[$i].clitSetting = "pregnancy">><<replace "#setting">>$slaves[$i].clitSetting<</replace>><</link>> <</if>> - | <<link "Pain">><<set $activeSlave.clitSetting = "masochist">><<replace "#setting">>$activeSlave.clitSetting<</replace>><</link>> - | <<link "Sadism">><<set $activeSlave.clitSetting = "sadist">><<replace "#setting">>$activeSlave.clitSetting<</replace>><</link>> - | <<link "Men">><<set $activeSlave.clitSetting = "men">><<replace "#setting">>$activeSlave.clitSetting<</replace>><</link>> - | <<link "Anti-men">><<set $activeSlave.clitSetting = "anti-men">><<replace "#setting">>$activeSlave.clitSetting<</replace>><</link>> - | <<link "Women">><<set $activeSlave.clitSetting = "women">><<replace "#setting">>$activeSlave.clitSetting<</replace>><</link>> - | <<link "Anti-women">><<set $activeSlave.clitSetting = "anti-women">><<replace "#setting">>$activeSlave.clitSetting<</replace>><</link>> - | <<link "All sex">><<set $activeSlave.clitSetting = "all">><<replace "#setting">>$activeSlave.clitSetting<</replace>><</link>> - | <<link "No sex">><<set $activeSlave.clitSetting = "none">><<replace "#setting">>$activeSlave.clitSetting<</replace>><</link>> + | <<link "Pain">><<set $slaves[$i].clitSetting = "masochist">><<replace "#setting">>$slaves[$i].clitSetting<</replace>><</link>> + | <<link "Sadism">><<set $slaves[$i].clitSetting = "sadist">><<replace "#setting">>$slaves[$i].clitSetting<</replace>><</link>> + | <<link "Men">><<set $slaves[$i].clitSetting = "men">><<replace "#setting">>$slaves[$i].clitSetting<</replace>><</link>> + | <<link "Anti-men">><<set $slaves[$i].clitSetting = "anti-men">><<replace "#setting">>$slaves[$i].clitSetting<</replace>><</link>> + | <<link "Women">><<set $slaves[$i].clitSetting = "women">><<replace "#setting">>$slaves[$i].clitSetting<</replace>><</link>> + | <<link "Anti-women">><<set $slaves[$i].clitSetting = "anti-women">><<replace "#setting">>$slaves[$i].clitSetting<</replace>><</link>> + | <<link "All sex">><<set $slaves[$i].clitSetting = "all">><<replace "#setting">>$slaves[$i].clitSetting<</replace>><</link>> + | <<link "No sex">><<set $slaves[$i].clitSetting = "none">><<replace "#setting">>$slaves[$i].clitSetting<</replace>><</link>> </div> <</if>> - <<if $activeSlave.voice != 0>> - <br>Speech rules: ''<span id="speechRules">$activeSlave.rules.speech</span>.'' - <<link "Restrictive">><<set $activeSlave.rules.speech = "restrictive">><<replace "#speechRules">>$activeSlave.rules.speech<</replace>><</link>> | - <<link "Permissive">><<set $activeSlave.rules.speech = "permissive">><<replace "#speechRules">>$activeSlave.rules.speech<</replace>><</link>> - <<if $activeSlave.accent > 0 && $activeSlave.accent < 4>>| <<link "Accent elimination">><<set $activeSlave.rules.speech = "accent elimination">><<replace "#speechRules">>$activeSlave.rules.speech<</replace>><</link>> - <<elseif $activeSlave.accent > 3>>| <<link "Language lessons">><<set $activeSlave.rules.speech = "language lessons">><<replace "#speechRules">>$activeSlave.rules.speech<</replace>><</link>> + <<if $slaves[$i].voice != 0>> + <br>Speech rules: ''<span id="speechRules">$slaves[$i].rules.speech</span>.'' + <<link "Restrictive">><<set $slaves[$i].rules.speech = "restrictive">><<replace "#speechRules">>$slaves[$i].rules.speech<</replace>><</link>> | + <<link "Permissive">><<set $slaves[$i].rules.speech = "permissive">><<replace "#speechRules">>$slaves[$i].rules.speech<</replace>><</link>> + <<if $slaves[$i].accent > 0 && $slaves[$i].accent < 4>>| <<link "Accent elimination">><<set $slaves[$i].rules.speech = "accent elimination">><<replace "#speechRules">>$slaves[$i].rules.speech<</replace>><</link>> + <<elseif $slaves[$i].accent > 3>>| <<link "Language lessons">><<set $slaves[$i].rules.speech = "language lessons">><<replace "#speechRules">>$slaves[$i].rules.speech<</replace>><</link>> <</if>> <</if>> <br> - Relationship rules: ''<span id="relationshipRules">$activeSlave.rules.relationship</span>.'' - <<link "Restrictive">><<set $activeSlave.rules.relationship = "restrictive">><<replace "#relationshipRules">>$activeSlave.rules.relationship<</replace>><</link>> | - <<link "Just friends">><<set $activeSlave.rules.relationship = "just friends">><<replace "#relationshipRules">>$activeSlave.rules.relationship<</replace>><</link>> | - <<link "Permissive">><<set $activeSlave.rules.relationship = "permissive">><<replace "#relationshipRules">>$activeSlave.rules.relationship<</replace>><</link>> + Relationship rules: ''<span id="relationshipRules">$slaves[$i].rules.relationship</span>.'' + <<link "Restrictive">><<set $slaves[$i].rules.relationship = "restrictive">><<replace "#relationshipRules">>$slaves[$i].rules.relationship<</replace>><</link>> | + <<link "Just friends">><<set $slaves[$i].rules.relationship = "just friends">><<replace "#relationshipRules">>$slaves[$i].rules.relationship<</replace>><</link>> | + <<link "Permissive">><<set $slaves[$i].rules.relationship = "permissive">><<replace "#relationshipRules">>$slaves[$i].rules.relationship<</replace>><</link>> </div> </div> @@ -544,26 +547,26 @@ <<if $studio == 1>> <h3>Media</h3> - <<if $activeSlave.porn.prestige == 3>> - //$He is so prestigious in the realm of $activeSlave.porn.fameType porn that $his fame is self-sustaining.// - <<elseif $activeSlave.porn.feed == 0>> - The media hub is not releasing highlights of $his sex life. [[Release|Slave Interact][$activeSlave.porn.feed = 1]] + <<if $slaves[$i].porn.prestige == 3>> + //$He is so prestigious in the realm of $slaves[$i].porn.fameType porn that $his fame is self-sustaining.// + <<elseif $slaves[$i].porn.feed == 0>> + The media hub is not releasing highlights of $his sex life. [[Release|Slave Interact][$slaves[$i].porn.feed = 1]] <<else>> - The media hub is releasing highlights of $his sex life <<if $activeSlave.porn.spending < 500>>to those who can find it<<elseif $activeSlave.porn.spending < 2500>>on several websites<<elseif $activeSlave.porn.spending > 5000>>through your old distributor<<else>>on many websites<</if>>. - <<if $activeSlave.porn.spending == 0>> - [[Halt|Slave Interact][$activeSlave.porn.feed = 0, $activeSlave.porn.focus = "none"]] | - [[Publicize|Slave Interact][$activeSlave.porn.spending += 1000]] + The media hub is releasing highlights of $his sex life <<if $slaves[$i].porn.spending < 500>>to those who can find it<<elseif $slaves[$i].porn.spending < 2500>>on several websites<<elseif $slaves[$i].porn.spending > 5000>>through your old distributor<<else>>on many websites<</if>>. + <<if $slaves[$i].porn.spending == 0>> + [[Halt|Slave Interact][$slaves[$i].porn.feed = 0, $slaves[$i].porn.focus = "none"]] | + [[Publicize|Slave Interact][$slaves[$i].porn.spending += 1000]] //Will cost <<print cashFormat(1000)>> weekly.// <<else>> - <<textbox "_newPornSpending" $activeSlave.porn.spending>> weekly is spent to publicize them. [[Save changes|Slave Interact][$activeSlave.porn.spending = Number(_newPornSpending) || 0]] | - [[Halt|Slave Interact][$activeSlave.porn.feed = 0, $activeSlave.porn.spending = 0, $activeSlave.porn.focus = "none", $PCSlutContacts = 1]] | - <<if $activeSlave.porn.spending < 5000>> - [[Increase|Slave Interact][$activeSlave.porn.spending += 1000]] | + <<textbox "_newPornSpending" $slaves[$i].porn.spending>> weekly is spent to publicize them. [[Save changes|Slave Interact][$slaves[$i].porn.spending = Number(_newPornSpending) || 0]] | + [[Halt|Slave Interact][$slaves[$i].porn.feed = 0, $slaves[$i].porn.spending = 0, $slaves[$i].porn.focus = "none", $PCSlutContacts = 1]] | + <<if $slaves[$i].porn.spending < 5000>> + [[Increase|Slave Interact][$slaves[$i].porn.spending += 1000]] | <</if>> - [[Decrease|Slave Interact][$activeSlave.porn.spending -= 1000]] - <<if $activeSlave.porn.spending > 5000>><<set _warn = 1>><</if>> - <<set $activeSlave.porn.spending = Number($activeSlave.porn.spending) || 0>> - <<set $activeSlave.porn.spending = Math.clamp(Math.ceil($activeSlave.porn.spending/1000)*1000, 0, 5000)>> + [[Decrease|Slave Interact][$slaves[$i].porn.spending -= 1000]] + <<if $slaves[$i].porn.spending > 5000>><<set _warn = 1>><</if>> + <<set $slaves[$i].porn.spending = Number($slaves[$i].porn.spending) || 0>> + <<set $slaves[$i].porn.spending = Math.clamp(Math.ceil($slaves[$i].porn.spending/1000)*1000, 0, 5000)>> <<if _warn>><br>//Spending more than <<print cashFormat(5000)>> weekly will have no effect.//<</if>> <<if $PC.career == "escort">> <br> @@ -580,18 +583,18 @@ <<if $studioFeed == 1>> <br> - <<if $activeSlave.porn.viewerCount < 100>> + <<if $slaves[$i].porn.viewerCount < 100>> $He lacks the fame in porn needed to discern what $his feed is getting tagged as. <<else>> - <<if $activeSlave.porn.prestige > 0>> - $He is known for $activeSlave.porn.fameType porn<<if $activeSlave.porn.prestige > 1>> and viewers have grown to expect it from $him<</if>>. + <<if $slaves[$i].porn.prestige > 0>> + $He is known for $slaves[$i].porn.fameType porn<<if $slaves[$i].porn.prestige > 1>> and viewers have grown to expect it from $him<</if>>. <</if>> - <<if $activeSlave.porn.focus == "none">> + <<if $slaves[$i].porn.focus == "none">> You are allowing $his viewers to guide the direction of $his content. <<else>> - You are focusing attention on the $activeSlave.porn.focus aspect of $his content. + You are focusing attention on the $slaves[$i].porn.focus aspect of $his content. <</if>> - <<= App.Porn.genreChoiceLinks("Slave Interact", $activeSlave)>> | [[No focus|Slave Interact][$activeSlave.porn.focus = "none"]] + <<= App.Porn.genreChoiceLinks("Slave Interact", $slaves[$i])>> | [[No focus|Slave Interact][$slaves[$i].porn.focus = "none"]] <</if>> <</if>> <</if>> @@ -599,7 +602,7 @@ <h3>Financial</h3> <p> - <<SlaveExpenses $activeSlave>> + <<SlaveExpenses $slaves[$i]>> </p> <p> @@ -610,14 +613,14 @@ <</if>> <<if (_SL > 1)>> - <<if $activeSlave.origin == "You bought $him from a body dump, completely broken." && ($week-$activeSlave.weekAcquired <= 8)>> + <<if $slaves[$i].origin == "You bought $him from a body dump, completely broken." && ($week-$slaves[$i].weekAcquired <= 8)>> //A discarded slave must be kept for at least two months to ensure health before being sold.// | - <<elseif $activeSlave.accent > 3>> + <<elseif $slaves[$i].accent > 3>> //$His lack of language and basic life skills is a red sign to most slave appraisers. $He must not act like a child to be sold without raising suspicion.// | <<else>> - <<link "Sell $him" "Sell Slave">><<run cashX(-500, "personalBusiness", $activeSlave)>><</link>> //Listing $him for sale will cost <<print cashFormat(500)>>// | - <<if ($seeAge != 0) && ($activeSlave.indenture < 1)>> - <<link "Retire $him" "SE retirement">><<set $retiree = $activeSlave.ID, $retired = 1>><</link>> | + <<link "Sell $him" "Sell Slave">><<run cashX(-500, "personalBusiness", $slaves[$i])>><</link>> //Listing $him for sale will cost <<print cashFormat(500)>>// | + <<if ($seeAge != 0) && ($slaves[$i].indenture < 1)>> + <<link "Retire $him" "SE retirement">><<set $retiree = $slaves[$i].ID, $retired = 1>><</link>> | <</if>> <</if>> <<link "Discard $him" "Discard Confirm">><</link>> @@ -639,7 +642,7 @@ <div id="Customize" class="tabcontent"> <div class="content"> <span id="custom"></span> - <script>App.UI.SlaveInteract.custom (V.activeSlave)</script> + <script>App.UI.SlaveInteract.custom (V.slaves[V.i])</script> /*<<include "Add custom descriptors">>*/ </div>