diff --git a/src/js/sexActsJS.js b/src/js/sexActsJS.js index dafc34f40b3d532fad2664096d540e3abc6d5da9..363cc80c2086f8fc7f2d7243fa3c3a704aff3de9 100644 --- a/src/js/sexActsJS.js +++ b/src/js/sexActsJS.js @@ -236,6 +236,7 @@ globalThis.VCheck = (function() { } else if (canDoAnal(slave)) { return AnalVCheck(slave, times); } + return ""; } /** call as VCheck.Partner diff --git a/src/js/utilsPC.js b/src/js/utilsPC.js index 5ac08cf1b06a8bc5183e8e164c931dca5d2e0020..557a8e61eb2a2e8ed1e103196d95f7fe736e2d30 100644 --- a/src/js/utilsPC.js +++ b/src/js/utilsPC.js @@ -959,6 +959,7 @@ globalThis.playerConsistencyCheck = function(actor = V.PC) { if (isHindered(actor)) { r += "+Hindered"; } + return r; } } else { return "Incapacitated"; diff --git a/src/npc/descriptions/describeBrands.js b/src/npc/descriptions/describeBrands.js index d81c3c66a12a050d32132c81e9e0c6d0f673e92a..d5a08f090aaedcbaef2725658f1ed794f3ca96f1 100644 --- a/src/npc/descriptions/describeBrands.js +++ b/src/npc/descriptions/describeBrands.js @@ -72,5 +72,6 @@ App.Desc.brand = function(slave, surface) { return `${rightBrand} branded into the flesh of ${his} ${surface.right}`; } } + return ``; } }; diff --git a/src/npc/descriptions/describePiercings.js b/src/npc/descriptions/describePiercings.js index 4bac4f12cde343780c5ffa0a1066ef0a927ee9de..137317f5f0f15217fb3a25d7e33058af4b325b7d 100644 --- a/src/npc/descriptions/describePiercings.js +++ b/src/npc/descriptions/describePiercings.js @@ -1,7 +1,7 @@ /** * @param {App.Entity.SlaveState} slave * @param {string} surface - * @returns {string} Relevant slave piercing, if present + * @returns {string|undefined} Relevant slave piercing, if present */ App.Desc.piercing = function(slave, surface) { "use strict"; @@ -10,7 +10,7 @@ App.Desc.piercing = function(slave, surface) { he, him, his, himself, girl, He, His } = getPronouns(slave); if (V.showBodyMods !== 1) { - return; + return undefined; } else if (slave.piercing[surface] && slave.piercing[surface].weight > 0 && slave.piercing[surface].desc) { return `${pronounsForSlaveProp(slave, slave.piercing[surface].desc)}.`; } diff --git a/src/npc/descriptions/describeTattoos.js b/src/npc/descriptions/describeTattoos.js index b821b8be6a8c5dbb4b7945761e88d074ac5f41ae..2205fd8a137259013e32cd48a083cf6dd702bc59 100644 --- a/src/npc/descriptions/describeTattoos.js +++ b/src/npc/descriptions/describeTattoos.js @@ -1,7 +1,7 @@ /** * @param {App.Entity.SlaveState} slave * @param {string} surface - * @returns {string} Relevant slave tattoo, if present + * @returns {string|undefined} Relevant slave tattoo, if present */ App.Desc.tattoo = function(slave, surface) { "use strict"; @@ -10,7 +10,7 @@ App.Desc.tattoo = function(slave, surface) { he, him, his, He, His, hers, himself } = getPronouns(slave); if (V.showBodyMods !== 1) { - return; + return undefined; } switch (surface) { case "shoulder": { diff --git a/src/npc/descriptions/descriptionWidgets.js b/src/npc/descriptions/descriptionWidgets.js index cf7532ff5631331f3537660191b39baab3901f3f..14da986554939d38cc2590ef40df0558512f5f0a 100644 --- a/src/npc/descriptions/descriptionWidgets.js +++ b/src/npc/descriptions/descriptionWidgets.js @@ -823,11 +823,11 @@ App.Desc.ageAndHealth = function(slave) { /** * @param {App.Entity.SlaveState} slave * @returns {string} Slave's mods. - * @param {string} surface + * @param {string|undefined} surface */ App.Desc.mods = function(slave, surface) { if (V.showBodyMods !== 1) { - return; + return undefined; } if (slave.fuckdoll !== 0 && !["anus", "lips", "vagina"].includes(surface)) { /* Fuckdoll vulva and anus alone are visible, plus enormous lips */ return App.Desc.piercing(slave, surface); // Most piercings are part of the suit and have appropriate descriptions diff --git a/src/npc/descriptions/legs.js b/src/npc/descriptions/legs.js index 87d7d5bb81770228e28c434e18b72d228eca7edc..2860de9e5874d309905b679a8fb7ac59318fc39e 100644 --- a/src/npc/descriptions/legs.js +++ b/src/npc/descriptions/legs.js @@ -70,4 +70,6 @@ App.Desc.legs = function(slave) { } } } + + return ``; }; diff --git a/src/npc/generate/generateNewSlaveJS.js b/src/npc/generate/generateNewSlaveJS.js index 2921544c7fee615fbb5e4264cde3cb88e8a92fdf..9bc98f76d9d5b33b1ea1237f96a1277236be3793 100644 --- a/src/npc/generate/generateNewSlaveJS.js +++ b/src/npc/generate/generateNewSlaveJS.js @@ -47,7 +47,7 @@ globalThis.GenerateNewSlave = (function() { /** * @returns {App.Entity.SlaveState} * @param {"XY"|"XX"|""} [sex] null or omit to use default rules - * @param {GenerateNewSlavePram|Object} [Obj] + * @param {GenerateNewSlavePram|object} [Obj] */ function GenerateNewSlave(sex, { minAge, diff --git a/src/npc/generate/heroCreator.js b/src/npc/generate/heroCreator.js index bc94d06acc9d182b7dc65a713d22dbd3fa4a6326..1d2972592ee7b204d7a1292ef7f45c3a94d9dddc 100644 --- a/src/npc/generate/heroCreator.js +++ b/src/npc/generate/heroCreator.js @@ -185,7 +185,7 @@ App.Utils.getHeroSlave = function(heroSlave) { /** * Marks limbs to be removed when going trough App.Utils.getHeroSlave. * Does not actually remove limbs, only use on slaves that go through App.Utils.getHeroSlave!! - * @param {Object} hero + * @param {object} hero * @param {FC.LimbArgumentAll} [limb="all"] */ App.Utils.removeHeroLimbs = function(hero, limb = "all") { diff --git a/src/npc/generate/newChildIntro.js b/src/npc/generate/newChildIntro.js index 25cdd4523005b00d62f1ba8de1e4439d4fc2f18f..8f5fd6274d3dbc53f5bcc0e0b6289967f4abdda1 100644 --- a/src/npc/generate/newChildIntro.js +++ b/src/npc/generate/newChildIntro.js @@ -49,7 +49,9 @@ App.UI.newChildIntro = function(slave) { if (slave.preg > 0) { /* Unused for now. Fetal development would be accelerated as well. As a result, the released slave would be shocking to see in such a state. */ if (slave.geneticQuirks.progeria) { + // unused for now } else if (slave.geneticQuirks.neoteny && slave.actualAge > 12 && V.geneticMappingUpgrade < 2) { + // unused for now } } else if (slave.geneticQuirks.progeria && V.geneticMappingUpgrade < 2) { r.push(`you barely manage to pull yourself together to catch ${him} in time. There must have been some mistake with the settings; ${he} should not be <i>this</i> old. You help ${him} to ${his} unstable feet and slowly walk ${him} to your penthouse.`); diff --git a/src/npc/generate/newSlaveIntro.js b/src/npc/generate/newSlaveIntro.js index eca70abc97149e86cb74c86223c853cc7fd20fa8..cc5e74c7acd3df72abbfb013c6990e5f46d141e9 100644 --- a/src/npc/generate/newSlaveIntro.js +++ b/src/npc/generate/newSlaveIntro.js @@ -1,7 +1,7 @@ /** * @param {FC.GingeredSlave} slave * @param {App.Entity.SlaveState} [slave2] recruiter slave, if present in the scene - * @param {Object} [obj] + * @param {object} [obj] * @param {boolean} [obj.tankBorn] * @param {string} [obj.momInterest] * @param {string} [obj.dadInterest] diff --git a/src/npc/generateSlaveBot.js b/src/npc/generateSlaveBot.js index 386ab27b319f82adeb0b3aab51a3d5f0e282bdf6..69b50a1184466256b15efd38b2dc9b27c82b11d3 100644 --- a/src/npc/generateSlaveBot.js +++ b/src/npc/generateSlaveBot.js @@ -1,3 +1,4 @@ +/* eslint-disable camelcase */ /** @param {App.Entity.SlaveState} slave */ App.UI.SlaveInteract.createSlaveBot = function(slave) { const el = new DocumentFragment(); @@ -8,7 +9,6 @@ App.UI.SlaveInteract.createSlaveBot = function(slave) { // Adapted from https://github.com/ZoltanAI/character-editor class Exporter { - static downloadFile(file) { const link = window.URL.createObjectURL(file); @@ -19,7 +19,7 @@ class Exporter { } static Json(characterCard) { - const file = new File([JSON.stringify(characterCard, undefined, '\t')], (characterCard.data.name || 'character') + '.json', { type: 'application/json;charset=utf-8' }); + const file = new File([JSON.stringify(characterCard, undefined, '\t')], (characterCard.data.name || 'character') + '.json', {type: 'application/json;charset=utf-8'}); Exporter.downloadFile(file); } @@ -27,41 +27,41 @@ class Exporter { /** @param {App.Entity.SlaveState} slave */ function createCharacterDataFromSlave(slave) { - // Construct a character card based on the Card v2 spec: https://github.com/malfoyslastname/character-card-spec-v2 - var characterCard = { - spec: 'chara_card_v2', - spec_version: '2.0', // May 8th addition - data: { + // Construct a character card based on the Card v2 spec: https://github.com/malfoyslastname/character-card-spec-v2 + const characterCard = { + spec: 'chara_card_v2', + spec_version: '2.0', // May 8th addition + data: { alternate_greetings: [], avatar: "none", character_version: "main", creator: `FreeCities ${App.Version.pmod} System Generated`, creator_notes: `FreeCities ${App.Version.pmod} System Generated Slave Bot`, - description: generateDescription(slave) + generatePromptStd(slave), - first_mes: generateFirstMessage(slave), + description: generateDescription(slave) + generatePromptStd(slave), + first_mes: generateFirstMessage(slave), mes_example: "", name: slave.slaveName, personality: generatePersonality(slave), - scenario: `{{char}} and {{user}} exist in the slaveholding arcology of ${V.arcologies[0].name}. {{char}} is in {{user}}'s office, waiting for inspection.`, - system_prompt: "", + scenario: `{{char}} and {{user}} exist in the slaveholding arcology of ${V.arcologies[0].name}. {{char}} is in {{user}}'s office, waiting for inspection.`, + system_prompt: "", character_book: { // aka Lorebook - entries: [ - lorebookArcology(0), - lorebookFuckdoll(1), - lorebookMindbroken(2), - lorebookArcade(3), - lorebookDairy(4) + entries: [ + lorebookArcology(0), + lorebookFuckdoll(1), + lorebookMindbroken(2), + lorebookArcade(3), + lorebookDairy(4) // lorebookActiveFS(100), // adds all active FS starting at (n) ], name: `Free Cities ${slave.slaveName}` - } + } } - } - return characterCard + }; + return characterCard; } function generateDescription(slave) { - let r = []; + let r = []; const {He, His, he, him, his} = getPronouns(slave); let descParts = []; @@ -69,14 +69,14 @@ function generateDescription(slave) { // r.push(lorebookActiveFS()); // NAME - r.push(`Name: ${SlaveFullName(slave)}`); - - //RELATIONSHIP - r.push("\r\nRelationship: {{char}} is {{user}}'s "); + r.push(`Name: ${SlaveFullName(slave)}`); + + // RELATIONSHIP + r.push("\r\nRelationship: {{char}} is {{user}}'s "); // Slave age (consider visible age) r.push(`${slave.actualAge} year old `); - - // Devotion + + // Devotion if (slave.fetish !== Fetish.MINDBROKEN) { if (slave.devotion < -95) { r.push("hate-filled, "); @@ -104,11 +104,13 @@ function generateDescription(slave) { } else if (slave.trust < 20) { r.push("fearful "); } else if (slave.trust <= 50) { - if (slave.devotion < -20) { - r.push("careful "); - } else { - r.push("careful "); - } + // if (slave.devotion < -20) { + // r.push("careful "); + // } else { + // r.push("careful "); + // } + // FIXME: @null this block always spits out the same result. It should be changed or removed + r.push("careful "); } else if (slave.trust < 95) { if (slave.devotion < -20) { r.push("bold "); @@ -126,19 +128,19 @@ function generateDescription(slave) { r.push("mindbroken "); } - // Slave's Title, ex:"pregnant big bottomed busty milky hourglass broodmother" + // Slave's Title, ex:"pregnant big bottomed busty milky hourglass broodmother" if (slave.fuckdoll > 0) { r.push("Fuckdoll"); } else { r.push(`${SlaveTitle(slave)}`); } - + // DESCRIPTION r.push("\r\nDescription: "); - + // Eyes // eye color (orig vs. current?), Add check for no eyes (does it matter?) - + if (slave.fuckdoll > 0) { r.push(`blinded, `); } else if (!canSee(slave)) { @@ -152,7 +154,7 @@ function generateDescription(slave) { } else { // Skin r.push(`${slave.skin} skin, `); - + // Slave intelligence: Ignore average, include mindbroken if (slave.fetish === Fetish.MINDBROKEN) { r.push("mindbroken, "); @@ -165,96 +167,96 @@ function generateDescription(slave) { } else if (slave.intelligence > 50) { r.push("very smart, "); } - + // Beauty if (slave.face < -40) { - r.push(`${slave.faceShape} ugly face, `); - } else if (slave.face > 50) { - r.push(`${slave.faceShape} gorgeous face, `); - } else if (slave.face > 10) { - r.push(`${slave.faceShape} very pretty face, `); - } else { - r.push(`${slave.faceShape} face, `); - } + r.push(`${slave.faceShape} ugly face, `); + } else if (slave.face > 50) { + r.push(`${slave.faceShape} gorgeous face, `); + } else if (slave.face > 10) { + r.push(`${slave.faceShape} very pretty face, `); + } else { + r.push(`${slave.faceShape} face, `); + } // Hairstyle if (slave.hLength > 100) { - r.push("very long ") + r.push("very long "); } else if (slave.hLength > 30) { - r.push("long ") + r.push("long "); } else if (slave.hLength > 10) { - r.push("short ") + r.push("short "); } else if (slave.hLength > 0) { - r.push("very short ") + r.push("very short "); } - r.push(`${slave.hColor} `) + r.push(`${slave.hColor} `); // Add "hair" to hairstyles that need it to make sense (e.g. "messy" becomes "messy hair" but "dreadlocks" stays as is) if (["braided", "curled", "eary", "bun", "messy bun", "tails", "drills", "luxurious", "messy", "neat", "permed", "bangs", "hime", "strip", "up", "trimmed", "undercut", "double buns", "chignon"].includes(slave.hStyle)) { - r.push(`${slave.hStyle} hair, `) + r.push(`${slave.hStyle} hair, `); } else { - r.push(`${slave.hStyle}, `) + r.push(`${slave.hStyle}, `); } - + // Start conditional descriptions - // Eductation (bimbo/hindered, well educated) + // Education (bimbo/hindered, well educated) if (slave.education < -10) { - descParts.push("vapid bimbo with no education"); + descParts.push("vapid bimbo with no education"); } else if (slave.intelligence > 25) { - descParts.push("very well educated"); - } - } + descParts.push("very well educated"); + } + } // Height. Ignore Average if (slave.height < 150) { - descParts.push(`short`); - } else if (slave.height > 180) { - descParts.push(`tall`); - } - - // Weight. Ignore average + descParts.push(`short`); + } else if (slave.height > 180) { + descParts.push(`tall`); + } + + // Weight. Ignore average if (slave.weight < -95) { - descParts.push(`emaciated`); - } else if (slave.weight < -30) { - descParts.push(`very skinny`); - } else if (slave.weight > 95) { - descParts.push(`very fat`); - } else if (slave.weight > 30) { - descParts.push(`plump`); - } - + descParts.push(`emaciated`); + } else if (slave.weight < -30) { + descParts.push(`very skinny`); + } else if (slave.weight > 95) { + descParts.push(`very fat`); + } else if (slave.weight > 30) { + descParts.push(`plump`); + } + // Boobs. Ignore Average. Add lactation? NG if (slave.boobs < 300) { - descParts.push(`flat chested`); - } else if (slave.boobs < 500) { - descParts.push(`small breasts`); - } else if (slave.boobs > 1400) { - descParts.push(`massive breasts that impede movement`); - } else if (slave.boobs > 800) { - descParts.push(`large breasts`); - } - + descParts.push(`flat chested`); + } else if (slave.boobs < 500) { + descParts.push(`small breasts`); + } else if (slave.boobs > 1400) { + descParts.push(`massive breasts that impede movement`); + } else if (slave.boobs > 800) { + descParts.push(`large breasts`); + } + // Butt. Ignore average if (slave.butt <= 1) { - descParts.push(`flat butt`); - } else if (slave.butt > 7) { - descParts.push(`gigantic ass`); - } else if (slave.butt > 3) { - descParts.push(`big ass`); - } - + descParts.push(`flat butt`); + } else if (slave.butt > 7) { + descParts.push(`gigantic ass`); + } else if (slave.butt > 3) { + descParts.push(`big ass`); + } + // Musculature if (slave.muscles < -31) { - descParts.push(`very weak`); - } else if (slave.muscles > 50) { - descParts.push(`very muscular`); - } - + descParts.push(`very weak`); + } else if (slave.muscles > 50) { + descParts.push(`very muscular`); + } + // Check amputee (add missing just arms/legs) if (isAmputee(slave)) { descParts.push(`missing both arms and both legs`); } - + // Check pregnant if (slave.preg > 30) { descParts.push(`very pregnant`); @@ -277,6 +279,9 @@ function generateDescription(slave) { // BACKGROUND if (slave.fuckdoll > 0 || slave.fetish === Fetish.MINDBROKEN) { // in neither case would slave recall or this be important null; + // FIXME: @null Is this supposed to be a return? or is this supposed to do nothing? + // If nothing it should be a single if statement, not if else. `if (slave.fuckdoll <== 0 || slave.fetish !== Fetish.MINDBROKEN) {` + // If it's a place holder replace null with a `// TODO: thing to do` comment } else { if (slave.career === "a slave") { r.push(`\r\nBackground: {{char}} has been enslaved for as long as ${he} can remember`); @@ -287,11 +292,14 @@ function generateDescription(slave) { // ASSIGNMENT r.push(`\r\nAssignment: ${slave.assignment}`); - + if (slave.fuckdoll > 0) { null; + // FIXME: @null Is this supposed to be a return? or is this supposed to do nothing? + // If nothing it should be a single if statement, not if else. `if (slave.fuckdoll <== 0) {` + // If it's a place holder replace null with a `// TODO: thing to do` comment } else { - // FETISH + // FETISH // Paraphilias listed and prompted if (slave.sexualFlaw === SexualFlaw.CUMADDICT ) { r.push(`\r\nFetish: pathologically addicted to cum`); @@ -300,17 +308,17 @@ function generateDescription(slave) { } else if (slave.sexualFlaw === SexualFlaw.NEGLECT ) { r.push(`\r\nTrait: only considers ${his} partner's pleasure`); } else if (slave.sexualFlaw === SexualFlaw.ATTENTION ) { - r.push(`\r\nTrait: pathologically narcissistic`); + r.push(`\r\nTrait: pathologically narcissistic`); } else if (slave.sexualFlaw === SexualFlaw.BREASTEXP ) { r.push(`\r\nFetish: pathologically addicted to breast augmentation`); // is this right } else if (slave.sexualFlaw === SexualFlaw.SELFHATING ) { r.push(`\r\nTrait: pathologically masochistic`); } else if (slave.sexualFlaw === SexualFlaw.ABUSIVE || slave.sexualFlaw === SexualFlaw.MALICIOUS) { - r.push(`\r\nTrait: sociopathic, delights in abusing others`); //Are above the same for purposes of LLM + r.push(`\r\nTrait: sociopathic, delights in abusing others`); // Are above the same for purposes of LLM } - - // Explain sex/entertainment skill level. Leave off average. Check virgin status. - + + // Explain sex/entertainment skill level. Leave off average. Check virgin status. + // ABILITIES let abilParts = []; if (slave.vagina === 0){ @@ -322,7 +330,7 @@ function generateDescription(slave) { } else if (slave.skill.whoring > 61){ abilParts.push("expert whore"); } - + if (slave.skill.entertainment > 100){ abilParts.push(`renowned entertainer`); } else if (slave.skill.entertainment > 61){ @@ -344,7 +352,7 @@ function generateDescription(slave) { r.push("\r\nGenitals: "); if (slave.dick === 0 && slave.vagina === -1) { // null slave r.push("No genitals"); - } else if (slave.vagina < 0) { // has a dick + } else if (slave.vagina < 0) { // has a dick if (slave.dick < 1) { r.push("tiny penis"); } else if (slave.dick > 8) { @@ -366,23 +374,25 @@ function generateDescription(slave) { r.push("pussy"); } // Back - if (slave.anus === 0) { + if (slave.anus === 0) { r.push(", virgin anus"); } else if (slave.vagina > 3) { r.push(", loose anus"); - } + } // PHair - if (slave.pubicHStyle === "hairless" || slave.pubicHStyle === "bald") { + if (slave.pubicHStyle === "hairless" || slave.pubicHStyle === "bald") { r.push(", no pubic hair"); } else { r.push(`, pubic hair ${slave.pubicHStyle}`); - } - + } // RULES let rulesParts = []; if (slave.fuckdoll > 0) { null; + // FIXME: @null Is this supposed to be a return? or is this supposed to do nothing? + // If nothing it should be a single if statement, not if else. `if (slave.fuckdoll <== 0) {` + // If it's a place holder replace null with a `// TODO: thing to do` comment } else { // Speech (also check for mute) if (slave.voice === 0) { @@ -396,20 +406,22 @@ function generateDescription(slave) { } // How they address the user, if not mute if (slave.voice !== 0) { - rulesParts.push(`Addresses {{user}} as ${properMaster()}`) + rulesParts.push(`Addresses {{user}} as ${properMaster()}`); } - } - + } + if (rulesParts.length > 0) { r.push(`\r\nRules: ${rulesParts.join(', ')}`); } - // TATTOOS - Too much context for impact? let tattooParts = []; if (slave.fuckdoll > 0) { null; + // FIXME: @null Is this supposed to be a return? or is this supposed to do nothing? + // If nothing it should be a single if statement, not if else. `if (slave.fuckdoll <== 0) {` + // If it's a place holder replace null with a `// TODO: thing to do` comment } else { if (slave.armsTat) { tattooParts.push(`${slave.armsTat} arm tattoo`); @@ -420,7 +432,7 @@ function generateDescription(slave) { if (slave.bellyTat) { tattooParts.push(`${slave.bellyTat} belly tattoo`); } - if (slave.boobsTat) { + if (slave.boobsTat) { tattooParts.push(`${slave.boobsTat} breast tattoo`); } @@ -433,14 +445,13 @@ function generateDescription(slave) { let chasParts = []; if (slave.chastityVagina === 1) { chasParts.push(`vagina`); - } + } if (slave.chastityPenis === 1) { chasParts.push(`penis`); - } + } if (slave.chastityAnus === 1) { chasParts.push(`anus`); - } - + } if (chasParts.length > 0) { r.push(`\r\nChastity device covers: ${chasParts.join(', ')}`); } @@ -458,13 +469,16 @@ function generateDescription(slave) { // Lover if (slave.fuckdoll > 0) { null; + // FIXME: @null Is this supposed to be a return? or is this supposed to do nothing? + // If nothing it should be a single if statement, not if else. `if (slave.fuckdoll <== 0) {` + // If it's a place holder replace null with a `// TODO: thing to do` comment } else { const lover = slave.relationship > 0 ? getSlave(slave.relationshipTarget) : null; if (lover) { if (slave.relationship > 4) { r.push(`\r\n${SlaveFullName(lover)} is {{char}}'s wife`); } else if (slave.relationship > 3) { - r.push(`\r\n${SlaveFullName(lover)} is {{char}}'s lover`); + r.push(`\r\n${SlaveFullName(lover)} is {{char}}'s lover`); } else if (slave.relationship > 2) { r.push(`\r\n${SlaveFullName(lover)} is {{char}}'s girlfriend`); } else if (slave.relationship > 1) { @@ -478,6 +492,9 @@ function generateDescription(slave) { // Rival if (slave.fuckdoll > 0) { null; + // FIXME: @null Is this supposed to be a return? or is this supposed to do nothing? + // If nothing it should be a single if statement, not if else. `if (slave.fuckdoll <== 0) {` + // If it's a place holder replace null with a `// TODO: thing to do` comment } else { const rival = slave.rivalry > 0 ? getSlave(slave.rivalryTarget) : null; if (rival) { @@ -490,12 +507,12 @@ function generateDescription(slave) { } } } - - return r.join(""); + + return r.join(""); } function generatePromptStd(slave) { - let r = [] + let r = []; // PERMANENT CHAR PROMPT PART - Does not rely on any slave attributes, but leaving with .join and (slave) passthrough for future conditionals r.push(`\r\n{{user}} is the owner of ${V.arcologies[0].name}, an arcology in the fictional slave-holding world of Free Cities. `); @@ -506,11 +523,10 @@ function generatePromptStd(slave) { } function generateFirstMessage(slave) { - let r = [] + let r = []; const {He, His, he, him, his} = getPronouns(slave); - // Set up basic scenario - r.push("I am sitting in my office as {{char}} arrives for inspection.\r\n") + r.push("I am sitting in my office as {{char}} arrives for inspection.\r\n"); // Trust switches if (slave.fuckdoll > 0) { @@ -521,7 +537,7 @@ function generateFirstMessage(slave) { r.push(`${He} is eerily still. `); } } else { - r.push("{{char}} comes in, ") + r.push("{{char}} comes in, "); if (slave.trust < -95) { r.push(`appearing abjectly terrified, barely able to control ${his} terror.`); @@ -532,11 +548,13 @@ function generateFirstMessage(slave) { } else if (slave.trust < 20) { r.push("looking fearful. "); } else if (slave.trust <= 50) { - if (slave.devotion < -20) { - r.push("appearing cautious. "); - } else { - r.push("appearing cautious. "); - } + // if (slave.devotion < -20) { + // r.push("appearing cautious. "); + // } else { + // r.push("appearing cautious. "); + // } + // FIXME: @null this block always spits out the same result. It should be changed or removed + r.push("appearing cautious. "); } else if (slave.trust < 95) { if (slave.devotion < -20) { r.push("boldly approaching my desk. "); @@ -550,7 +568,7 @@ function generateFirstMessage(slave) { r.push(`a serene look of profound trust on ${his} face. `); } } - + // Devotion switches if (slave.devotion < -95) { r.push(`${His} hate-filled face is barely under control. `); @@ -567,28 +585,26 @@ function generateFirstMessage(slave) { } else { r.push(`${He} is positively glowing at the opportunity to have ${his} precious ${properMaster()}'s attention, radiating worshipful devotion.`); } - - } + } r.push("\r\n"); // Check Voice and Vocal Rules - if (slave.voice === 0 || slave.rules.speech === "restrictive") { + if (slave.voice === 0 || slave.rules.speech === "restrictive") { r.push(`{{char}} is silent, waiting for {{user}} to act.`); } else { r.push(`{{char}} looks forward and speaks, "${properMaster()}, how may I serve you?"`); } return r.join(""); - } function generatePersonality(slave) { - let r = [] + let r = []; r.push("\r\n{{char}} is {{user}}'s "); // Slave age (consider visible age) r.push(`${slave.actualAge} year old `); - - // Devotion + + // Devotion if (slave.fetish !== Fetish.MINDBROKEN) { if (slave.devotion < -95) { r.push("hate-filled, "); @@ -616,11 +632,13 @@ function generatePersonality(slave) { } else if (slave.trust < 20) { r.push("fearful "); } else if (slave.trust <= 50) { - if (slave.devotion < -20) { - r.push("careful "); - } else { - r.push("careful "); - } + // if (slave.devotion < -20) { + // r.push("careful "); + // } else { + // r.push("careful "); + // } + // FIXME: @null this block always spits out the same result. It should be changed or removed + r.push("careful "); } else if (slave.trust < 95) { if (slave.devotion < -20) { r.push("bold "); @@ -635,12 +653,12 @@ function generatePersonality(slave) { } } } else { - r.push("mindbroken "); + r.push("mindbroken "); } - // Slave's Title + // Slave's Title if (slave.fuckdoll > 0) { - r.push("Fuckdoll"); + r.push("Fuckdoll"); } else { r.push(`${SlaveTitle(slave)}`); } @@ -652,9 +670,9 @@ function generatePlayerSummary() { // sections here taken from pLongDescription.js const PC = V.PC; const raceA = ["asian", "amerindian", "indo-aryan"].includes(PC.race) ? "an" : "a"; // addA() was inheriting colors. - const r = [] - - r.push(`{{user}} is `) + const r = []; + + r.push(`{{user}} is `); if (!PC.nationality || V.seeNationality !== 1 || PC.nationality === "Stateless" || PC.nationality === "slave") { r.push(`${PC.race} `); } else if (PC.nationality === "Zimbabwean" && PC.race === "white") { @@ -688,8 +706,8 @@ function generatePlayerSummary() { ageDifference = `{{user}} has taken measures to look a younger ${PC.visualAge}.`; } r.push(`{{user}} is ${PC.actualAge} years old.`, ageDifference); - - return r.join("") + + return r.join(""); } function lorebookArcology(_n) { // First entry is primarily an example @@ -697,7 +715,7 @@ function lorebookArcology(_n) { // First entry is primarily an example id: _n, keys: ["arcology"], // Trigger word for ST to use the content secondary_keys: [], // Second Trigger condition (requires both to insert) - comment: "", + comment: "", content: "Arcology: sustainable urban living complex, integrating living spaces, workspaces, and recreational areas in a harmonious and efficient manner. ", // This content is inserted in context. Note it includes Key constant: false, selective: true, @@ -714,7 +732,7 @@ function lorebookArcology(_n) { // First entry is primarily an example selectiveLogic: 0, group: "" } - } + }; } function lorebookFuckdoll(_n) { @@ -739,11 +757,11 @@ function lorebookFuckdoll(_n) { selectiveLogic: 0, group: "" } - } + }; } function lorebookMindbroken(_n) { - return{ + return { id: _n, keys: ["mindbroken"], secondary_keys: [], @@ -764,16 +782,16 @@ function lorebookMindbroken(_n) { selectiveLogic: 0, group: "" } - } + }; } function lorebookArcade(_n) { - return{ + return { id: _n, keys: ["arcade"], secondary_keys: [], comment: "", - content: "Arcade: gloryhole stalls, offering retrained slaves mouths, vaginas and anuses for use by the public", + content: "Arcade: gloryhole stalls, offering retrained slaves mouths, vaginas and anuses for use by the public", constant: false, selective: true, insertion_order: 100, @@ -789,7 +807,7 @@ function lorebookArcade(_n) { selectiveLogic: 0, group: "" } - } + }; } function lorebookDairy(_n) { @@ -798,7 +816,7 @@ function lorebookDairy(_n) { keys: ["dairy"], secondary_keys: [], comment: "", - content: "Dairy: barn used for milking and breeding human slaves, collecting human milk for sale and selling breeding services", + content: "Dairy: barn used for milking and breeding human slaves, collecting human milk for sale and selling breeding services", constant: false, selective: true, insertion_order: 100, @@ -814,5 +832,5 @@ function lorebookDairy(_n) { selectiveLogic: 0, group: "" } - } + }; } diff --git a/src/npc/startingGirls/startingGirls.js b/src/npc/startingGirls/startingGirls.js index c0b2306c72e7423c5961d87cbefc92c68b8550e4..0a7b3a3a38074925ddb8da2ca07b9a0343f6e271 100644 --- a/src/npc/startingGirls/startingGirls.js +++ b/src/npc/startingGirls/startingGirls.js @@ -663,7 +663,7 @@ App.StartingGirls.playerOrigin = function(slave) { }; /** - * @param {Object} option + * @param {object} option * @param {Array<startingGirlsOptionsPreset>} set */ App.StartingGirls.addSet = function(option, set) { @@ -1636,7 +1636,7 @@ App.StartingGirls.careerFilter = "Any"; /** @type {Map<string, function(string): boolean>} */ App.StartingGirls.careerBonusFilters = (function() { /** - * @param {Object} obj + * @param {object} obj * @param {string} key * @returns {[string, function(string): boolean]} */ diff --git a/src/npc/surgery/organFarm.js b/src/npc/surgery/organFarm.js index aaa889265c91e8d4f9c24f15c7a59d3e0641250c..19852bdb94e3c39a68cb8832e502d7dd00fe730b 100644 --- a/src/npc/surgery/organFarm.js +++ b/src/npc/surgery/organFarm.js @@ -197,7 +197,7 @@ App.Medicine.OrganFarm.implantAction = function(slave, organType) { /** * @param {string} organType * @param {App.Medicine.Surgery.Procedure} procedure - * @returns {DocumentFragment} + * @returns {(DocumentFragment|undefined)} */ App.Medicine.OrganFarm.implant = function(organType, procedure) { App.Medicine.OrganFarm.implantAction(procedure._slave, organType); @@ -205,7 +205,7 @@ App.Medicine.OrganFarm.implant = function(organType, procedure) { const result = App.Medicine.Surgery.apply(procedure, false); if (result === null) { Engine.play("Surgery Death"); - return; + return undefined; } const [diff, reaction] = result;