From 2cb79e19c05132c70085d86a507e20f99a8a26fb Mon Sep 17 00:00:00 2001 From: kopareigns <kopareigns@gmail.com> Date: Fri, 26 Oct 2018 01:27:59 -0400 Subject: [PATCH] Slave variable datatype cleanup --- devNotes/twine JS.txt | 499 ++++++++++++++++++ .../mod_EditSlaveCheatDatatypeCleanup.tw | 66 +-- .../mod_EditSlaveCheatDatatypeCleanupNew.tw | 86 +-- src/js/datatypeCleanupJS.tw | 498 +++++++++++++++++ src/pregmod/widgets/pregmodWidgets.tw | 304 ----------- src/uncategorized/BackwardsCompatibility.tw | 301 +---------- 6 files changed, 1009 insertions(+), 745 deletions(-) create mode 100644 src/js/datatypeCleanupJS.tw diff --git a/devNotes/twine JS.txt b/devNotes/twine JS.txt index 4446a379bf4..9307dc740b3 100644 --- a/devNotes/twine JS.txt +++ b/devNotes/twine JS.txt @@ -33439,3 +33439,502 @@ window.findNaN = function findNan() { } return result; }; + +/*:: Datatype Cleanup JS [script]*/ + +/* + This function does not ensure values make sense. For example, it does not fix weird relations/relationships/rivalries/pregnancies/prosthetics. + It only makes sure most datatypes are correct, and sets to default if not. Number values are clamped to the correct bounds. + Any values that are supposed to be objects or arrays are not handled (yet). + + A tutorial on how to add to this passage: + The || operator can be very useful for setting default values. To be precise, + x = y || z + is the same thing as + if (y) {x = y} + else {x = z} + This means that if z is the default value, in the ideal case you could write x = x || z. If x is already in use, this won't change it, and if x is not defined it will set it to z. + However, for example, if x is 0 but the default is -1 this will actually set x to -1! So care must be taken. + + Let's say you want to add slave.value to this function, and you want it to be a number. + First, you need to take whatever slave.value currently is, and turn it into a number. You can use either +slave.value or Number(slave.value) to do this. + Second, you need to determine what range to restrict slave.value to. You'll either use Math.max, Math.min, Math.clamp, or none of them. + Finally, you need to consider the default value if the .max/.min/.clamp returned 0 (or NaN). To make a long story short, + Use slave.value = Math.max(+slave.value, a) || default; if you need slave.value >= a. + Use slave.value = Math.min(+slave.value, a) || default; if you need slave.value <= a. + Use slave.value = Math.clamp(+slave.value, a, b) || default; if you need a <= slave.value <= b. + Use slave.value = +slave.value || default; if slave.value can be any number. + The exception to this is if the default != 0. In this case, it's usually good enough to just check if slave.value !== 0 first. The strict equality is important! + + If you want slave.value to be a string, there's no easy tricks to make sure it's already an accepted value. The simplest way is the following + if (typeof slave.value !== "string") slave.value = default; +*/ +window.SlaveDatatypeCleanup = function SlaveDatatypeCleanup (slave) { + const V = State.variables; + + slave.weekAcquired = Math.max(+slave.weekAcquired, 1) || 1; + slave.prestige = Math.clamp(+slave.prestige, 0, 3) || 0; + slave.pornFeed = Math.clamp(+slave.pornFeed, 0, 1) || 0; + slave.pornFame = Math.max(+slave.pornFame, 0) || 0; + slave.pornFameSpending = Math.max(+slave.pornFameSpending, 0) || 0; + slave.pornPrestige = Math.clamp(+slave.pornPrestige, 0, 3) || 0; + if (typeof slave.pornPrestigeDesc !== "string") { + slave.pornPrestigeDesc = 0; + } + if (typeof slave.pornFameType !== "string") { + slave.pornFameType = "none"; + } + if (typeof slave.pornFocus !== "string") { + slave.pornFocus = "none"; + } + slave.pornTypeGeneral = Math.max(+slave.pornTypeGeneral, 0) || 0; + slave.pornTypeFuckdoll = Math.max(+slave.pornTypeFuckdoll, 0) || 0; + slave.pornTypeRape = Math.max(+slave.pornTypeRape, 0) || 0; + slave.pornTypePreggo = Math.max(+slave.pornTypePreggo, 0) || 0; + slave.pornTypeBBW = Math.max(+slave.pornTypeBBW, 0) || 0; + slave.pornTypeGainer = Math.max(+slave.pornTypeGainer, 0) || 0; + slave.pornTypeStud = Math.max(+slave.pornTypeStud, 0) || 0; + slave.pornTypeLoli = Math.max(+slave.pornTypeLoli, 0) || 0; + slave.pornTypeDeepThroat = Math.max(+slave.pornTypeDeepThroat, 0) || 0; + slave.pornTypeStruggleFuck = Math.max(+slave.pornTypeStruggleFuck, 0) || 0; + slave.pornTypePainal = Math.max(+slave.pornTypePainal, 0) || 0; + slave.pornTypeTease = Math.max(+slave.pornTypeTease, 0) || 0; + slave.pornTypeRomantic = Math.max(+slave.pornTypeRomantic, 0) || 0; + slave.pornTypePervert = Math.max(+slave.pornTypePervert, 0) || 0; + slave.pornTypeCaring = Math.max(+slave.pornTypeCaring, 0) || 0; + slave.pornTypeUnflinching = Math.max(+slave.pornTypeUnflinching, 0) || 0; + slave.pornTypeSizeQueen = Math.max(+slave.pornTypeSizeQueen, 0) || 0; + slave.pornTypeNeglectful = Math.max(+slave.pornTypeNeglectful, 0) || 0; + slave.pornTypeCumAddict = Math.max(+slave.pornTypeCumAddict, 0) || 0; + slave.pornTypeAnalAddict = Math.max(+slave.pornTypeAnalAddict, 0) || 0; + slave.pornTypeAttentionWhore = Math.max(+slave.pornTypeAttentionWhore, 0) || 0; + slave.pornTypeBreastGrowth = Math.max(+slave.pornTypeBreastGrowth, 0) || 0; + slave.pornTypeAbusive = Math.max(+slave.pornTypeAbusive, 0) || 0; + slave.pornTypeMalicious = Math.max(+slave.pornTypeMalicious, 0) || 0; + slave.pornTypeSelfHating = Math.max(+slave.pornTypeSelfHating, 0) || 0; + slave.pornTypeBreeder = Math.max(+slave.pornTypeBreeder, 0) || 0; + slave.pornTypeSub = Math.max(+slave.pornTypeSub, 0) || 0; + slave.pornTypeCumSlut = Math.max(+slave.pornTypeCumSlut, 0) || 0; + slave.pornTypeAnal = Math.max(+slave.pornTypeAnal, 0) || 0; + slave.pornTypeHumiliation = Math.max(+slave.pornTypeHumiliation, 0) || 0; + slave.pornTypeBoobs = Math.max(+slave.pornTypeBoobs, 0) || 0; + slave.pornTypeDom = Math.max(+slave.pornTypeDom, 0) || 0; + slave.pornTypeSadist = Math.max(+slave.pornTypeSadist, 0) || 0; + slave.pornTypeMasochist = Math.max(+slave.pornTypeMasochist, 0) || 0; + slave.pornTypePregnancy = Math.max(+slave.pornTypePregnancy, 0) || 0; + slave.mother = +slave.mother || 0; + slave.father = +slave.father || 0; + if (V.familyTesting == 0) { + slave.relationTarget = Math.max(+slave.relationTarget, 0) || 0; + } + slave.relationship = Math.clamp(+slave.relationship, -3, 5) || 0; + slave.relationshipTarget = Math.max(+slave.relationshipTarget, 0) || 0; + slave.rivalryTarget = Math.max(+slave.rivalryTarget, 0) || 0; + slave.rivalry = Math.clamp(+slave.rivalry, 0, 3) || 0; + slave.subTarget = Math.max(+slave.subTarget, 0) || 0; + slave.canRecruit = Math.clamp(+slave.canRecruit, 0, 1) || 0; + slave.choosesOwnAssignment = Math.clamp(+slave.choosesOwnAssignment, 0) || 0; + slave.sentence = Math.max(+slave.sentence, 0) || 0; + slave.training = Math.clamp(+slave.training, 0, 150) || 0; + if (slave.indenture !== 0) { + slave.indenture = Math.max(+slave.indenture, -1) || -1; + } + slave.indentureRestrictions = Math.clamp(+slave.indentureRestriction, 0, 2) || 0; + slave.birthWeek = Math.clamp(+slave.birthWeek, 0, 51) || 0; + if (slave.age > 0) { + slave.actualAge = Math.max(+slave.actualAge, 0) || slave.age; /* if negative or undefined, this sets to slave.age */ + } else { + slave.actualAge = Math.max(+slave.actualAge, 0) || 18; + slave.age = slave.actualAge; + } + slave.visualAge = Math.max(+slave.visualAge, 0) || slave.actualAge; + slave.physicalAge = Math.max(+slave.physicalAge, 0) || slave.actualAge; + slave.ovaryAge = Math.max(+slave.ovaryAge, 0) || slave.actualAge; + slave.ageImplant = Math.clamp(+slave.ageImplant, 0, 1) || 0; + slave.health = Math.clamp(+slave.health, -100, 100) || 0; + if (typeof slave.minorInjury !== "string") { + slave.minorInjury = 0; + } + slave.devotion = Math.clamp(+slave.devotion, -100, 100) || 0; + slave.oldDevotion = Math.clamp(+slave.oldDevotion, -100, 100) || 0; + slave.trust = Math.clamp(+slave.trust, -100, 100) || 0; + slave.oldTrust = Math.clamp(+slave.oldTrust, -100, 100) || 0; + slave.muscles = Math.clamp(+slave.muscles, -100, 100) || 0; + slave.weight = Math.clamp(+slave.weight, -100, 200) || 0; + slave.waist = Math.clamp(+slave.waist, -100, 100) || 0; + if (typeof slave.nationality !== "string") { + slave.nationality = "slave"; + } + if (typeof slave.race !== "string") { + nationalityToRace(slave); + } + if (typeof slave.origRace !== "string") { + slave.origRace = slave.race; + } + slave.height = Math.round(Math.max(+slave.height, 0)) || Math.round(Height.mean(slave)); + slave.heightImplant = Math.clamp(+slave.heightImplant, -1, 1) || 0; + if (typeof slave.markings !== "string") { + slave.markings = "none"; + } + slave.eyes = Math.clamp(+slave.eyes, -3, 1) || 1; /* if 0 or undefined, this sets to 1 */ + if (typeof slave.eyeColor !== "string") { + slave.eyeColor = "brown"; + } + if (typeof slave.origEye !== "string") { + slave.origEye = slave.eyeColor; + } + if (typeof slave.pupil !== "string") { + slave.pupil = "circular"; + } + if (typeof slave.sclerae !== "string") { + slave.sclerae = "white"; + } + if (typeof slave.eyewear !== "string") { + slave.eyewear = "none"; + } + slave.hears = Math.clamp(+slave.hears, -2, 0) || 0; + if (typeof slave.earwear !== "string") { + slave.earwear = "none"; + } + slave.earImplant = Math.clamp(+slave.earImplant, 0, 1) || 0; + if (typeof slave.hColor !== "string") { + slave.hColor = "brown"; + } + if (typeof slave.origHColor !== "string") { + slave.origHColor = slave.hColor; + } + if (typeof slave.pubicHColor !== "string") { + slave.pubicHColor = slave.hColor; + } + if (typeof slave.underArmHColor !== "string") { + slave.underArmHColor = "slave.hColor"; + } + if (typeof slave.eyebrowHColor !== "string") { + slave.eyebrowHColor = "slave.hColor"; + } + if (typeof slave.skin !== "string") { + slave.skin = "light"; + } + if (typeof slave.origSkin !== "string") { + slave.origSkin = slave.skin; + } + if (slave.hLength !== 0) { + slave.hLength = Math.clamp(+slave.hLength, 0, 300) || 60; + } + if (typeof slave.hStyle !== "string") { + slave.hStyle = "long"; + } + if (typeof slave.pubicHStyle !== "string") { + slave.pubicHStyle = "neat"; + } + if (typeof slave.underArmHStyle !== "string") { + slave.underArmHStyle = "waxed"; + } + if (typeof slave.eyebrowHStyle !== "string") { + slave.eyebrowHStyle = "natural"; + } + if (typeof slave.eyebrowFullness !== "string") { + slave.eyebrowFullness = "natural"; + } + slave.corsetPiercing = Math.clamp(+slave.corsetPiercing, 0, 1) || 0; + slave.amp = Math.clamp(+slave.amp, -5, 1) || 0; + slave.PLimb = Math.clamp(+slave.PLimb, 0, 1) || 0; + slave.heels = Math.clamp(+slave.heels, 0, 1) || 0; + slave.voiceImplant = Math.clamp(+slave.voiceImplant, -1, 1) || 0; + if (slave.voice !== 0) { + slave.voice = Math.clamp(+slave.voice, 0, 3) || 1; + } + slave.electrolarynx = Math.clamp(+slave.electrolarynx, 0, 1) || 0; + slave.accent = Math.clamp(+slave.accent, 0, 3) || 0; + slave.shoulders = Math.clamp(+slave.shoulders, -2, 2) || 0; + slave.shouldersImplant = Math.clamp(+slave.shouldersImplant, -1, 1) || 0; + slave.boobs = Math.max(+slave.boobs, 100) || 200; + slave.boobsImplant = Math.max(+slave.boobsImplant, 0) || 0; + slave.boobsImplantType = Math.clamp(+slave.boobsImplantType, 0, 1) || 0; + if (typeof slave.boobShape !== "string") { + slave.boobShape = "normal"; + } + if (typeof slave.nipples !== "string") { + slave.nipples = "cute"; + } + slave.nipplesPiercing = Math.clamp(+slave.nipplesPiercing, 0, 2) || 0; + if (typeof slave.nipplesAccessory !== "string") { + slave.nipplesAccessory = "none"; + } + slave.areolae = Math.clamp(+slave.areolae, 0, 3) || 0; + slave.areolaePiercing = Math.clamp(+slave.areolaePiercing, 0, 2) || 0; + slave.areolaeShape = "" + slave.areolaeShape || "circle"; + if (typeof slave.boobsTat !== "string") { + slave.boobsTat = 0; + } + slave.lactation = Math.clamp(+slave.lactation, 0, 2) || 0; + slave.lactationAdaptation = Math.clamp(+slave.lactationAdaptation, 0, 100) || 0; + slave.milk = Math.max(+slave.milk, 0) || 0; + slave.cum = Math.max(+slave.cum, 0) || 0; + slave.hips = Math.clamp(+slave.hips, -2, 3) || 0; + slave.hipsImplant = Math.clamp(+slave.hipsImplant, -1, 1) || 0; + if (slave.butt !== 0) { + slave.butt = Math.clamp(+slave.butt, 0, 20) || 1; + } + slave.buttImplant = Math.clamp(+slave.buttImplant, 0, 3) || 0; + slave.buttImplantType = Math.clamp(+slave.buttImplantType, 0, 1) || 0; + if (typeof slave.buttTat !== "string") { + slave.buttTat = 0; + } + slave.face = Math.clamp(+slave.face, -100, 100) || 0; + slave.faceImplant = Math.clamp(+slave.faceImplant, 0, 100) || 0; + if (typeof slave.faceShape !== "string") { + slave.faceShape = "normal"; + } + if (slave.lips !== 0) { + slave.lips = Math.clamp(+slave.lips, 0, 100) || 15; + } + slave.lipsImplant = Math.clamp(+slave.lipsImplant, 0, 100) || 0; + slave.lipsPiercing = Math.clamp(+slave.lipsPiercing, 0, 2) || 0; + if (typeof slave.lipsTat !== "string") { + slave.lipsTat = 0; + } + slave.tonguePiercing = Math.clamp(+slave.tonguePiercing, 0, 2) || 0; + slave.vagina = Math.clamp(+slave.vagina, -1, 10) || 0; + slave.vaginaLube = Math.clamp(+slave.vaginaLube, 0, 2) || 0; + slave.vaginaPiercing = Math.clamp(+slave.vaginaPiercing, 0, 2) || 0; + if (typeof slave.vaginaTat !== "string") { + slave.vaginaTat = 0; + } + if (slave.pregAdaptation !== 0) { + slave.pregAdaptation = Math.max(+slave.pregAdaptation, 0) || 50; + } + slave.superfetation = Math.clamp(+slave.superfetation, 0, 1) || 0; + slave.ovaImplant = Math.clamp(+slave.ovaImplant, -1, 2) || 0; + slave.broodmother = Math.clamp(+slave.broodmother, 0, 3) || 0; + slave.broodmotherFetuses = Math.max(+slave.broodmotherFetuses, 0) || 0; + slave.broodmotherOnHold = Math.clamp(+slave.broodmotherOnHold, 0, 1) || 0; + slave.pregSource = +slave.pregSource || 0; + slave.labor = Math.clamp(+slave.labor, 0, 1) || 0; + slave.births = Math.max(+slave.births, 0) || 0; + slave.birthsTotal = Math.max(+slave.birthsTotal, 0) || slave.births; + slave.laborCount = Math.max(+slave.laborCount, 0) || slave.birthsTotal; + slave.cSec = Math.clamp(+slave.cSec, 0, 1) || 0; + if (typeof slave.bellyAccessory !== "string") { + slave.bellyAccessory = "none"; + } + slave.labia = Math.clamp(+slave.labia, 0, 3) || 0; + slave.clit = Math.clamp(+slave.clit, 0, 5) || 0; + slave.clitPiercing = Math.clamp(+slave.clitPiercing, 0, 3) || 0; + slave.foreskin = Math.max(+slave.foreskin, 0) || 0; + slave.anus = Math.clamp(+slave.anus, 0, 4) || 0; + slave.dick = Math.max(+slave.dick, 0) || 0; + if (slave.dick && slave.prostate !== 0) { + slave.prostate = Math.clamp(+slave.prostate, 0, 3) || 1; + } else { + slave.prostate = Math.clamp(+slave.prostate, 0, 3) || 0; + } + slave.balls = Math.max(+slave.balls, 0) || 0; + slave.scrotum = Math.max(+slave.scrotum, 0) || slave.balls; + slave.ovaries = Math.clamp(+slave.ovaries, 0, 1) || 0; + slave.analArea = Math.max(+slave.analArea, 0) || 0; + slave.dickPiercing = Math.clamp(+slave.dickPiercing, 0, 2) || 0; + if (typeof slave.dickTat !== "string") { + slave.dickTat = 0; + } + slave.anusPiercing = Math.clamp(+slave.anusPiercing, 0, 2) || 0; + if (typeof slave.anusTat !== "string") { + slave.anusTat = 0; + } + slave.makeup = Math.clamp(+slave.makeup, 0, 8) || 0; + slave.nails = Math.clamp(+slave.nails, 0, 9) || 0; + slave.brand = Math.clamp(+slave.brand, 0, 1) || 0; + if (typeof slave.brandLocation !== "string") { + slave.brandLocation = 0; + } + slave.earPiercing = Math.clamp(+slave.earPiercing, 0, 2) || 0; + slave.nosePiercing = Math.clamp(+slave.nosePiercing, 0, 2) || 0; + slave.eyebrowPiercing = Math.clamp(+slave.eyebrowPiercing, 0, 2) || 0; + slave.navelPiercing = Math.clamp(+slave.navelPiercing, 0, 2) || 0; + if (typeof slave.shouldersTat !== "string") { + slave.shouldersTat = 0; + } + if (typeof slave.armsTat !== "string") { + slave.armsTat = 0; + } + if (typeof slave.legsTat !== "string") { + slave.legsTat = 0; + } + if (typeof slave.backTat !== "string") { + slave.backTat = 0; + } + if (typeof slave.stampTat !== "string") { + slave.stampTat = 0; + } + slave.oralSkill = Math.clamp(+slave.oralSkill, 0, 100) || 0; + slave.vaginalSkill = Math.clamp(+slave.vaginalSkill, 0, 100) || 0; + slave.analSkill = Math.clamp(+slave.analSkill, 0, 100) || 0; + slave.whoreSkill = Math.clamp(+slave.whoreSkill, 0, 100) || 0; + slave.entertainSkill = Math.clamp(+slave.entertainSkill, 0, 100) || 0; + slave.combatSkill = Math.clamp(+slave.combatSkill, 0, 1) || 0; + if (typeof slave.standardPunishment !== "string") { + slave.standardPunishment = "situational"; + } + if (typeof slave.standardReward !== "string") { + slave.standardReward = "situational"; + } + if (slave.useRulesAssistant !== 0) { + slave.useRulesAssistant = 1; + } + if (typeof slave.diet !== "string") { + slave.diet = "healthy"; + } + slave.dietCum = Math.clamp(+slave.dietCum, 0, 2) || 0; + slave.dietMilk = Math.clamp(+slave.dietMilk, 0, 2) || 0; + slave.tired = Math.clamp(+slave.tired, 0, 1) || 0; + slave.hormones = Math.clamp(+slave.hormones, -2, 2) || 0; + if (typeof slave.drugs !== "string") { + slave.drugs = "no drugs"; + } + slave.aphrodisiacs = Math.clamp(+slave.aphrodisiacs, 0, 2) || 0; + slave.curatives = Math.clamp(+slave.curatives, 0, 2) || 0; + slave.chem = Math.max(+slave.chem, 0) || 0; + slave.addict = Math.max(+slave.addict, 0) || 0; + slave.fuckdoll = Math.clamp(+slave.fuckdoll, 0, 100) || 0; + slave.choosesOwnClothes = Math.clamp(+slave.choosesOwnClothes, 0, 1) || 0; + if (typeof slave.clothes !== "string") { + slave.clothes = "no clothing"; + } + if (typeof slave.collar !== "string") { + slave.collar = "none"; + } + if (typeof slave.shoes !== "string") { + slave.shoes = "none"; + } + if (typeof slave.vaginalAccessory !== "string") { + slave.vaginalAccessory = "none"; + } + if (typeof slave.dickAccessory !== "string") { + slave.dickAccessory = "none"; + } + if (typeof slave.legAccessory !== "string") { + slave.legAccessory = "none"; + } + if (typeof slave.buttplug !== "string") { + slave.buttplug = "none"; + } + if (typeof slave.buttplugAttachment !== "string") { + slave.buttplugAttachment = "none"; + } + slave.intelligence = Math.clamp(+slave.intelligence, -100, 100) || 0; + slave.intelligenceImplant = Math.clamp(+slave.intelligenceImplant, 0, 30) || 0; + slave.energy = Math.clamp(+slave.energy, 0, 100) || 0; + slave.need = Math.max(+slave.need, 0) || 0; + slave.attrXY = Math.clamp(+slave.attrXY, 0, 100) || 0; + slave.attrXX = Math.clamp(+slave.attrXX, 0, 100) || 0; + slave.attrKnown = Math.clamp(+slave.attrKnown, 0, 1) || 0; + slave.fetishStrength = Math.clamp(+slave.fetishStrength, 0, 100) || 0; + slave.fetishKnown = Math.clamp(+slave.fetishKnown, 0, 1) || 0; + slave.oralCount = Math.max(+slave.oralCount, 0) || 0; + slave.vaginalCount = Math.max(+slave.vaginalCount, 0) || 0; + slave.analCount = Math.max(+slave.analCount, 0) || 0; + slave.publicCount = Math.max(+slave.publicCount, 0) || 0; + slave.mammaryCount = Math.max(+slave.mammaryCount, 0) || 0; + slave.penetrativeCount = Math.max(+slave.penetrativeCount, 0) || 0; + slave.pitKills = Math.max(+slave.pitKills, 0) || 0; + if (typeof slave.customTat !== "string") { + slave.customTat = ""; + } + if (typeof slave.customLabel !== "string") { + slave.customLabel = ""; + } + if (typeof slave.customDesc !== "string") { + slave.customDesc = ""; + } + if (typeof slave.customTitle !== "string") { + slave.customTitle = ""; + } + if (typeof slave.customTitleLisp !== "string") { + slave.customTitleLisp = ""; + } + slave.rudeTitle = Math.clamp(+slave.rudeTitle, 0, 1) || 0; + if (typeof slave.customImage !== "string") { + slave.customImage = 0; + } + if (typeof slave.bellyTat !== "string") { + slave.bellyTat = 0; + } + slave.induce = Math.clamp(+slave.induce, 0, 1) || 0; + slave.mpreg = Math.clamp(+slave.mpreg, 0, 1) || 0; + slave.inflation = Math.clamp(+slave.inflation, 0, 3) || 0; + if (typeof slave.inflationType !== "string") { + slave.inflationType = "none"; + } + slave.inflationMethod = Math.clamp(+slave.inflationMethod, 0, 3) || 0; + slave.milkSource = Math.max(+slave.milkSource, 0) || 0; + slave.cumSource = Math.max(+slave.cumSource, 0) || 0; + slave.burst = Math.clamp(+slave.burst, 0, 1) || 0; + SetBellySize(slave); + if (slave.bellyImplant !== 0) { + slave.bellyImplant = Math.max(+slave.bellyImplant, -1) || -1; + } + slave.bellySag = Math.max(+slave.bellySag, 0) || 0; + slave.bellySagPreg = Math.max(+slave.bellySagPreg, 0) || slave.bellySag; + slave.bellyPain = Math.clamp(+slave.bellyPain, 0, 2) || 0; + slave.cervixImplant = Math.clamp(+slave.cervixImplant, 0, 1) || 0; + slave.pubertyAgeXX = Math.max(+slave.pubertyAgeXX, 0) || V.fertilityAge; + slave.pubertyAgeXY = Math.max(+slave.pubertyAgeXY, 0) || V.potencyAge; + slave.scars = Math.clamp(+slave.scars, 0, 6) || 0; + slave.breedingMark = Math.clamp(+slave.breedingMark, 0, 1) || 0; + slave.bodySwap = Math.max(+slave.bodySwap, 0) || 0; + slave.HGExclude = Math.clamp(+slave.HGExclude, 0, 1) || 0; + if (typeof slave.ballType !== "string") { + slave.ballType = "human"; + } + if (typeof slave.eggType !== "string") { + slave.eggType = "human"; + } + slave.reservedChildren = Math.max(+slave.reservedChildren, 0) || 0; + slave.reservedChildrenNursery = Math.max(+slave.reservedChildrenNursery, 0) || 0; + slave.choosesOwnChastity = Math.clamp(+slave.choosesOwnChastity, 0, 1) || 0; + if (typeof slave.pregControl !== "string") { + slave.pregControl = "none"; + } + slave.ageAdjust = Math.clamp(+slave.ageAdjust, -40, 40) || 0; + slave.bald = Math.clamp(+slave.bald, 0, 1) || 0; + if (typeof slave.origBodyOwner !== "string") { + slave.origBodyOwner = ""; + } + slave.origBodyOwnerID = Math.max(+slave.origBodyOwnerID, 0) || 0; + if (typeof slave.death !== "string") { + slave.death = ""; + } + slave.hormoneBalance = Math.clamp(+slave.hormoneBalance, -400, 400) || 0; + slave.onDiet = Math.clamp(+slave.onDiet, 0, 1) || 0; + slave.breastMesh = Math.clamp(+slave.breastMesh, 0, 1) || 0; + slave.slavesFathered = Math.max(+slave.slavesFathered, 0) || 0; + slave.PCChildrenFathered = Math.max(+slave.PCChildrenFathered, 0) || 0; + slave.slavesKnockedUp = Math.max(+slave.slavesKnockedUp, 0) || 0; + slave.PCKnockedUp = Math.max(+slave.PCKnockedUp, 0) || 0; + slave.prematureBirth = Math.clamp(+slave.prematureBirth, 0, 1) || 0; + slave.premature = Math.clamp(+slave.premature, 0, 1) || 0; + slave.vasectomy = Math.clamp(+slave.vasectomy, 0, 1) || 0; + slave.haircuts = Math.clamp(+slave.haircuts, 0, 1) || 0; + slave.newGamePlus = Math.clamp(+slave.newGamePlus, 0, 1) || 0; + slave.skillHG = Math.clamp(+slave.skillHG, 0, 200) || 0; + slave.skillRC = Math.clamp(+slave.skillRC, 0, 200) || 0; + slave.skillBG = Math.clamp(+slave.skillBG, 0, 200) || 0; + slave.skillMD = Math.clamp(+slave.skillMD, 0, 200) || 0; + slave.skillDJ = Math.clamp(+slave.skillDJ, 0, 200) || 0; + slave.skillNU = Math.clamp(+slave.skillNU, 0, 200) || 0; + slave.skillTE = Math.clamp(+slave.skillTE, 0, 200) || 0; + slave.skillAT = Math.clamp(+slave.skillAT, 0, 200) || 0; + slave.skillMT = Math.clamp(+slave.skillMT, 0, 200) || 0; + slave.skillST = Math.clamp(+slave.skillST, 0, 200) || 0; + slave.skillMM = Math.clamp(+slave.skillMM, 0, 200) || 0; + slave.skillWA = Math.clamp(+slave.skillWA, 0, 200) || 0; + slave.skillS = Math.clamp(+slave.skillS, 0, 200) || 0; + slave.skillE = Math.clamp(+slave.skillE, 0, 200) || 0; + slave.skillW = Math.clamp(+slave.skillW, 0, 200) || 0; + slave.tankBaby = Math.clamp(+slave.tankBaby, 0, 2) || 0; + slave.NCSyouthening = Math.max(+slave.NCSyouthening, 0) || 0; + slave.missingEyes = Math.clamp(+slave.missingEyes, 0, 3) || 0; + slave.missingArms = Math.clamp(+slave.missingArms, 0, 3) || 0; + slave.missingLegs = Math.clamp(+slave.missingLegs, 0, 3) || 0; + generatePronouns(slave); +}; diff --git a/src/cheats/mod_EditSlaveCheatDatatypeCleanup.tw b/src/cheats/mod_EditSlaveCheatDatatypeCleanup.tw index d3f6b4ba848..9b32a9d8178 100644 --- a/src/cheats/mod_EditSlaveCheatDatatypeCleanup.tw +++ b/src/cheats/mod_EditSlaveCheatDatatypeCleanup.tw @@ -6,74 +6,14 @@ <<unset $tempSlave>> <<goto "Slave Interact">> <</if>> + +<<run SlaveDatatypeCleanup($tempSlave)>> <<set $rep = Number($rep) || 0>> <<set $cash = Number($cash) || 0>> <<set $week = Number($week) || 1>> -<<if $familyTesting == 1>> - <<set $tempSlave.mother = Number($tempSlave.mother) || 0>> - <<set $tempSlave.father = Number($tempSlave.father) || 0>> -<<else>> - <<set $tempSlave.relationTarget = Number($tempSlave.relationTarget) || 0>> -<</if>> -<<set $tempSlave.relationshipTarget = Number($tempSlave.relationshipTarget) || 0>> -<<set $tempSlave.indenture = Number($tempSlave.indenture) || 0>> -<<set $tempSlave.face = Number($tempSlave.face) || 0>> -<<set $tempSlave.hLength = Number($tempSlave.hLength) || 0>> -<<set $tempSlave.oralSkill = Number($tempSlave.oralSkill) || 0>> -<<set $tempSlave.prestige = Number($tempSlave.prestige) || 0>> -<<set $tempSlave.devotion = Number($tempSlave.devotion) || 0>> -<<set $tempSlave.oldDevotion = Number($tempSlave.oldDevotion) || 0>> -<<set $tempSlave.trust = Number($tempSlave.trust) || 0>> -<<set $tempSlave.oldTrust = Number($tempSlave.oldTrust) || 0>> -<<set $tempSlave.age = Number($tempSlave.age) || 18>> -<<set $tempSlave.actualAge = Number($tempSlave.actualAge)>> -<<set $tempSlave.visualAge = Number($tempSlave.visualAge) || 18>> -<<set $tempSlave.physicalAge = Number($tempSlave.physicalAge) || 18>> -<<set $tempSlave.ovaryAge = Number($tempSlave.ovaryAge) || 18>> -<<set $tempSlave.birthWeek = Number($tempSlave.birthWeek) || 0>> -<<set $tempSlave.health = Number($tempSlave.health) || 0>> -<<set $tempSlave.addict = Number($tempSlave.addict) || 0>> -<<set $tempSlave.muscles = Number($tempSlave.muscles) || 0>> -<<set $tempSlave.height = Number($tempSlave.height) || 0>> -<<set $tempSlave.heightImplant = Number($tempSlave.heightImplant) || 0>> -<<set $tempSlave.amp = Number($tempSlave.amp) || 0>> -<<set $tempSlave.lips = Number($tempSlave.lips) || 0>> -<<set $tempSlave.lipsImplant = Number($tempSlave.lipsImplant) || 0>> -<<set $tempSlave.voice = Number($tempSlave.voice) || 0>> -<<set $tempSlave.accent = Number($tempSlave.accent) || 0>> -<<set $tempSlave.weight = Number($tempSlave.weight) || 0>> -<<set $tempSlave.waist = Number($tempSlave.waist) || 0>> -<<set $tempSlave.boobs = Number($tempSlave.boobs) || 200>> -<<set $tempSlave.boobsImplant = Number($tempSlave.boobsImplant) || 0>> -<<set $tempSlave.lactation = Number($tempSlave.lactation) || 0>> -<<set $tempSlave.areolae = Number($tempSlave.areolae) || 0>> -<<set $tempSlave.butt = Number($tempSlave.butt) || 0>> -<<set $tempSlave.buttImplant = Number($tempSlave.buttImplant) || 0>> -<<set $tempSlave.anus = Number($tempSlave.anus) || 0>> -<<set $tempSlave.vagina = Number($tempSlave.vagina) || 0>> -<<set $tempSlave.vaginaLube = Number($tempSlave.vaginaLube) || 0>> -<<set $tempSlave.vaginalSkill = Number($tempSlave.vaginalSkill) || 0>> -<<set $tempSlave.preg = Number($tempSlave.preg) || 0>> -<<set $tempSlave.dick = Number($tempSlave.dick) || 0>> -<<set $tempSlave.clit = Number($tempSlave.clit) || 0>> -<<set $tempSlave.labia = Number($tempSlave.labia) || 0>> -<<set $tempSlave.balls = Number($tempSlave.balls) || 0>> -<<set $tempSlave.whoreSkill = Number($tempSlave.whoreSkill) || 0>> -<<set $tempSlave.entertainSkill = Number($tempSlave.entertainSkill) || 0>> -<<set $tempSlave.intelligence = Number($tempSlave.intelligence) || 0>> -<<set $tempSlave.intelligenceImplant = Number($tempSlave.intelligenceImplant) || 0>> -<<if $tempSlave.intelligenceImplant > 30>> - <<set $tempSlave.intelligenceImplant = 30>> -<</if>> -<<set $tempSlave.fetishStrength = Number($tempSlave.fetishStrength) || 0>> -<<set $tempSlave.attrXY = Number($tempSlave.attrXY) || 0>> -<<set $tempSlave.attrXX = Number($tempSlave.attrXX) || 0>> -<<set $tempSlave.energy = Number($tempSlave.energy) || 0>> -<<set $tempSlave.lactationAdaptation = Number($tempSlave.lactationAdaptation) || 0>> <<set $tempSlave.preg = Number($tempSlave.preg) || 0>> -<<set $tempSlave.pregSource = Number($tempSlave.pregSource) || 0>> <<set $tempSlave.pregType = Number($tempSlave.pregType) || 0>> -<<if $tempSlave.broodmother == 0>> + <<if $tempSlave.broodmother == 0>> <<set WombInit($tempSlave)>> /* just to make sure */ <<set $tempSlave.womb.length = 0>> /* simple way to delete all fetuses */ <<set WombImpregnate($tempSlave, $tempSlave.pregType, $tempSlave.pregSource, $tempSlave.preg)>> /* recreates fetuses */ diff --git a/src/cheats/mod_EditSlaveCheatDatatypeCleanupNew.tw b/src/cheats/mod_EditSlaveCheatDatatypeCleanupNew.tw index a82bd2cb010..8c32a1f521e 100644 --- a/src/cheats/mod_EditSlaveCheatDatatypeCleanupNew.tw +++ b/src/cheats/mod_EditSlaveCheatDatatypeCleanupNew.tw @@ -17,68 +17,11 @@ <</if>> <<unset $customEvalCode>> +<<run SlaveDatatypeCleanup($tempSlave)>> <<set $rep = Number($rep) || 0>> <<set $cash = Number($cash) || 0>> <<set $week = Number($week) || 1>> - -<<set $tempSlave.indenture = Number($tempSlave.indenture) || 0>> -<<set $tempSlave.indentureRestrictions = Number($tempSlave.indentureRestrictions) || 0>> -<<set $tempSlave.weekAcquired = Number($tempSlave.weekAcquired) || 0>> - -<<if $familyTesting == 0 >> - <<set $tempSlave.relationTarget = Number($tempSlave.relationTarget) || 0>> -<<else>> - <<set $tempSlave.mother = Number($tempSlave.mother) || 0>> - <<set $tempSlave.father = Number($tempSlave.father) || 0>> -<</if>> -<<set $tempSlave.relationship = Number($tempSlave.relationship) || 0>> -<<set $tempSlave.relationshipTarget = Number($tempSlave.relationshipTarget) || 0>> -<<set $tempSlave.rivalry = Number($tempSlave.rivalry) || 0>> -<<set $tempSlave.rivalryTarget = Number($tempSlave.rivalryTarget) || 0>> -<<set $tempSlave.actualAge = Number($tempSlave.actualAge) || 18>> -<<set $tempSlave.visualAge = Number($tempSlave.visualAge) || 18>> -<<set $tempSlave.physicalAge = Number($tempSlave.physicalAge) || 18>> -<<set $tempSlave.ovaryAge = Number($tempSlave.ovaryAge) || 18>> -<<set $tempSlave.ageImplant = Number($tempSlave.ageImplant) || 0>> -<<set $tempSlave.birthWeek = Number($tempSlave.birthWeek) || 0>> -<<set $tempSlave.health = Number($tempSlave.health) || 0>> -<<set $tempSlave.chem = Number($tempSlave.chem) || 0>> -<<set $tempSlave.addict = Number($tempSlave.addict) || 0>> -<<set $tempSlave.devotion = Number($tempSlave.devotion) || 0>> -<<set $tempSlave.oldDevotion = Number($tempSlave.oldDevotion) || 0>> -<<set $tempSlave.trust = Number($tempSlave.trust) || 0>> -<<set $tempSlave.oldTrust = Number($tempSlave.oldTrust) || 0>> -<<set $tempSlave.face = Number($tempSlave.face) || 0>> -<<set $tempSlave.faceImplant = Number($tempSlave.faceImplant) || 0>> -<<set $tempSlave.bald = Number($tempSlave.bald) || 0>> -<<set $tempSlave.hLength = Number($tempSlave.hLength) || 0>> -<<set $tempSlave.lips = Number($tempSlave.lips) || 0>> -<<set $tempSlave.lipsImplant = Number($tempSlave.lipsImplant) || 0>> -<<set $tempSlave.voiceImplant = Number($tempSlave.voiceImplant) || 0>> -<<set $tempSlave.voice = Number($tempSlave.voice) || 0>> -<<set $tempSlave.accent = Number($tempSlave.accent) || 0>> -<<set $tempSlave.amp = Number($tempSlave.amp) || 0>> -<<set $tempSlave.fuckdoll = Number($tempSlave.fuckdoll) || 0>> -<<set $tempSlave.muscles = Number($tempSlave.muscles) || 0>> -<<set $tempSlave.weight = Number($tempSlave.weight) || 0>> -<<set $tempSlave.waist = Number($tempSlave.waist) || 0>> -<<set $tempSlave.height = Number($tempSlave.height) || 0>> -<<set $tempSlave.heightImplant = Number($tempSlave.heightImplant) || 0>> -<<set $tempSlave.bellyImplant = Number($tempSlave.bellyImplant) || -1>> -<<set $tempSlave.bellySag = Number($tempSlave.bellySag) || 0>> -<<set $tempSlave.boobs = Number($tempSlave.boobs) || 200>> -<<set $tempSlave.boobsImplant = Number($tempSlave.boobsImplant) || 0>> -<<set $tempSlave.lactation = Number($tempSlave.lactation) || 0>> -<<set $tempSlave.areolae = Number($tempSlave.areolae) || 0>> -<<set $tempSlave.butt = Number($tempSlave.butt) || 0>> -<<set $tempSlave.buttImplant = Number($tempSlave.buttImplant) || 0>> -<<set $tempSlave.anus = Number($tempSlave.anus) || 0>> -<<set $tempSlave.vagina = Number($tempSlave.vagina) || 0>> -<<set $tempSlave.vaginaLube = Number($tempSlave.vaginaLube) || 0>> -<<set $tempSlave.lactationAdaptation = Number($tempSlave.lactationAdaptation) || 0>> -<<set $tempSlave.pubertyAgeXX = Number($tempSlave.pubertyAgeXX) || 13>> <<set $tempSlave.preg = Number($tempSlave.preg) || 0>> -<<set $tempSlave.pregSource = Number($tempSlave.pregSource) || 0>> <<set $tempSlave.pregType = Number($tempSlave.pregType) || 0>> <<if $tempSlave.broodmother == 0>> <<set WombInit($tempSlave)>> /* just to make sure */ @@ -93,33 +36,6 @@ <<elseif $tempSlave.preg > 0>> <<set $tempSlave.pregKnown = 1>> <</if>> -<<set $tempSlave.dick = Number($tempSlave.dick) || 0>> -<<set $tempSlave.clit = Number($tempSlave.clit) || 0>> -<<set $tempSlave.labia = Number($tempSlave.labia) || 0>> -<<set $tempSlave.balls = Number($tempSlave.balls) || 0>> -<<set $tempSlave.foreskin = Number($tempSlave.foreskin) || 0>> -<<set $tempSlave.scrotum = Number($tempSlave.scrotum) || 0>> -<<set $tempSlave.pubertyAgeXY = Number($tempSlave.pubertyAgeXY) || 13>> -<<set $tempSlave.oralSkill = Number($tempSlave.oralSkill) || 0>> -<<set $tempSlave.vaginalSkill = Number($tempSlave.vaginalSkill) || 0>> -<<set $tempSlave.analSkill = Number($tempSlave.analSkill) || 0>> -<<set $tempSlave.whoreSkill = Number($tempSlave.whoreSkill) || 0>> -<<set $tempSlave.entertainSkill = Number($tempSlave.entertainSkill) || 0>> -<<set $tempSlave.intelligence = Number($tempSlave.intelligence) || 0>> -<<set $tempSlave.intelligenceImplant = Number($tempSlave.intelligenceImplant) || 0>> -<<set $tempSlave.fetishStrength = Number($tempSlave.fetishStrength) || 0>> -<<set $tempSlave.attrXY = Number($tempSlave.attrXY) || 0>> -<<set $tempSlave.attrXX = Number($tempSlave.attrXX) || 0>> -<<set $tempSlave.energy = Number($tempSlave.energy) || 0>> -<<set $tempSlave.penetrativeCount = Number($tempSlave.penetrativeCount) || 0>> -<<set $tempSlave.oralCount = Number($tempSlave.oralCount) || 0>> -<<set $tempSlave.vaginalCount = Number($tempSlave.vaginalCount) || 0>> -<<set $tempSlave.analCount = Number($tempSlave.analCount) || 0>> -<<set $tempSlave.publicCount = Number($tempSlave.publicCount) || 0>> -<<set $tempSlave.mammaryCount = Number($tempSlave.mammaryCount) || 0>> -<<set $tempSlave.birthsTotal = Number($tempSlave.birthsTotal) || 0>> -<<set $tempSlave.pitKills = Number($tempSlave.pitKills) || 0>> -<<set $tempSlave.prestige = Number($tempSlave.prestige) || 0>> /* Dependency Check */ <br> diff --git a/src/js/datatypeCleanupJS.tw b/src/js/datatypeCleanupJS.tw new file mode 100644 index 00000000000..b2855ef9214 --- /dev/null +++ b/src/js/datatypeCleanupJS.tw @@ -0,0 +1,498 @@ +:: Datatype Cleanup JS [script] + +/* + This function does not ensure values make sense. For example, it does not fix weird relations/relationships/rivalries/pregnancies/prosthetics. + It only makes sure most datatypes are correct, and sets to default if not. Number values are clamped to the correct bounds. + Any values that are supposed to be objects or arrays are not handled (yet). + + A tutorial on how to add to this passage: + The || operator can be very useful for setting default values. To be precise, + x = y || z + is the same thing as + if (y) {x = y} + else {x = z} + This means that if z is the default value, in the ideal case you could write x = x || z. If x is already in use, this won't change it, and if x is not defined it will set it to z. + However, for example, if x is 0 but the default is -1 this will actually set x to -1! So care must be taken. + + Let's say you want to add slave.value to this function, and you want it to be a number. + First, you need to take whatever slave.value currently is, and turn it into a number. You can use either +slave.value or Number(slave.value) to do this. + Second, you need to determine what range to restrict slave.value to. You'll either use Math.max, Math.min, Math.clamp, or none of them. + Finally, you need to consider the default value if the .max/.min/.clamp returned 0 (or NaN). To make a long story short, + Use slave.value = Math.max(+slave.value, a) || default; if you need slave.value >= a. + Use slave.value = Math.min(+slave.value, a) || default; if you need slave.value <= a. + Use slave.value = Math.clamp(+slave.value, a, b) || default; if you need a <= slave.value <= b. + Use slave.value = +slave.value || default; if slave.value can be any number. + The exception to this is if the default != 0. In this case, it's usually good enough to just check if slave.value !== 0 first. The strict equality is important! + + If you want slave.value to be a string, there's no easy tricks to make sure it's already an accepted value. The simplest way is the following + if (typeof slave.value !== "string") slave.value = default; +*/ +window.SlaveDatatypeCleanup = function SlaveDatatypeCleanup (slave) { + const V = State.variables; + + slave.weekAcquired = Math.max(+slave.weekAcquired, 1) || 1; + slave.prestige = Math.clamp(+slave.prestige, 0, 3) || 0; + slave.pornFeed = Math.clamp(+slave.pornFeed, 0, 1) || 0; + slave.pornFame = Math.max(+slave.pornFame, 0) || 0; + slave.pornFameSpending = Math.max(+slave.pornFameSpending, 0) || 0; + slave.pornPrestige = Math.clamp(+slave.pornPrestige, 0, 3) || 0; + if (typeof slave.pornPrestigeDesc !== "string") { + slave.pornPrestigeDesc = 0; + } + if (typeof slave.pornFameType !== "string") { + slave.pornFameType = "none"; + } + if (typeof slave.pornFocus !== "string") { + slave.pornFocus = "none"; + } + slave.pornTypeGeneral = Math.max(+slave.pornTypeGeneral, 0) || 0; + slave.pornTypeFuckdoll = Math.max(+slave.pornTypeFuckdoll, 0) || 0; + slave.pornTypeRape = Math.max(+slave.pornTypeRape, 0) || 0; + slave.pornTypePreggo = Math.max(+slave.pornTypePreggo, 0) || 0; + slave.pornTypeBBW = Math.max(+slave.pornTypeBBW, 0) || 0; + slave.pornTypeGainer = Math.max(+slave.pornTypeGainer, 0) || 0; + slave.pornTypeStud = Math.max(+slave.pornTypeStud, 0) || 0; + slave.pornTypeLoli = Math.max(+slave.pornTypeLoli, 0) || 0; + slave.pornTypeDeepThroat = Math.max(+slave.pornTypeDeepThroat, 0) || 0; + slave.pornTypeStruggleFuck = Math.max(+slave.pornTypeStruggleFuck, 0) || 0; + slave.pornTypePainal = Math.max(+slave.pornTypePainal, 0) || 0; + slave.pornTypeTease = Math.max(+slave.pornTypeTease, 0) || 0; + slave.pornTypeRomantic = Math.max(+slave.pornTypeRomantic, 0) || 0; + slave.pornTypePervert = Math.max(+slave.pornTypePervert, 0) || 0; + slave.pornTypeCaring = Math.max(+slave.pornTypeCaring, 0) || 0; + slave.pornTypeUnflinching = Math.max(+slave.pornTypeUnflinching, 0) || 0; + slave.pornTypeSizeQueen = Math.max(+slave.pornTypeSizeQueen, 0) || 0; + slave.pornTypeNeglectful = Math.max(+slave.pornTypeNeglectful, 0) || 0; + slave.pornTypeCumAddict = Math.max(+slave.pornTypeCumAddict, 0) || 0; + slave.pornTypeAnalAddict = Math.max(+slave.pornTypeAnalAddict, 0) || 0; + slave.pornTypeAttentionWhore = Math.max(+slave.pornTypeAttentionWhore, 0) || 0; + slave.pornTypeBreastGrowth = Math.max(+slave.pornTypeBreastGrowth, 0) || 0; + slave.pornTypeAbusive = Math.max(+slave.pornTypeAbusive, 0) || 0; + slave.pornTypeMalicious = Math.max(+slave.pornTypeMalicious, 0) || 0; + slave.pornTypeSelfHating = Math.max(+slave.pornTypeSelfHating, 0) || 0; + slave.pornTypeBreeder = Math.max(+slave.pornTypeBreeder, 0) || 0; + slave.pornTypeSub = Math.max(+slave.pornTypeSub, 0) || 0; + slave.pornTypeCumSlut = Math.max(+slave.pornTypeCumSlut, 0) || 0; + slave.pornTypeAnal = Math.max(+slave.pornTypeAnal, 0) || 0; + slave.pornTypeHumiliation = Math.max(+slave.pornTypeHumiliation, 0) || 0; + slave.pornTypeBoobs = Math.max(+slave.pornTypeBoobs, 0) || 0; + slave.pornTypeDom = Math.max(+slave.pornTypeDom, 0) || 0; + slave.pornTypeSadist = Math.max(+slave.pornTypeSadist, 0) || 0; + slave.pornTypeMasochist = Math.max(+slave.pornTypeMasochist, 0) || 0; + slave.pornTypePregnancy = Math.max(+slave.pornTypePregnancy, 0) || 0; + slave.mother = +slave.mother || 0; + slave.father = +slave.father || 0; + if (V.familyTesting == 0) { + slave.relationTarget = Math.max(+slave.relationTarget, 0) || 0; + } + slave.relationship = Math.clamp(+slave.relationship, -3, 5) || 0; + slave.relationshipTarget = Math.max(+slave.relationshipTarget, 0) || 0; + slave.rivalryTarget = Math.max(+slave.rivalryTarget, 0) || 0; + slave.rivalry = Math.clamp(+slave.rivalry, 0, 3) || 0; + slave.subTarget = Math.max(+slave.subTarget, 0) || 0; + slave.canRecruit = Math.clamp(+slave.canRecruit, 0, 1) || 0; + slave.choosesOwnAssignment = Math.clamp(+slave.choosesOwnAssignment, 0) || 0; + slave.sentence = Math.max(+slave.sentence, 0) || 0; + slave.training = Math.clamp(+slave.training, 0, 150) || 0; + if (slave.indenture !== 0) { + slave.indenture = Math.max(+slave.indenture, -1) || -1; + } + slave.indentureRestrictions = Math.clamp(+slave.indentureRestriction, 0, 2) || 0; + slave.birthWeek = Math.clamp(+slave.birthWeek, 0, 51) || 0; + if (slave.age > 0) { + slave.actualAge = Math.max(+slave.actualAge, 0) || slave.age; /* if negative or undefined, this sets to slave.age */ + } else { + slave.actualAge = Math.max(+slave.actualAge, 0) || 18; + slave.age = slave.actualAge; + } + slave.visualAge = Math.max(+slave.visualAge, 0) || slave.actualAge; + slave.physicalAge = Math.max(+slave.physicalAge, 0) || slave.actualAge; + slave.ovaryAge = Math.max(+slave.ovaryAge, 0) || slave.actualAge; + slave.ageImplant = Math.clamp(+slave.ageImplant, 0, 1) || 0; + slave.health = Math.clamp(+slave.health, -100, 100) || 0; + if (typeof slave.minorInjury !== "string") { + slave.minorInjury = 0; + } + slave.devotion = Math.clamp(+slave.devotion, -100, 100) || 0; + slave.oldDevotion = Math.clamp(+slave.oldDevotion, -100, 100) || 0; + slave.trust = Math.clamp(+slave.trust, -100, 100) || 0; + slave.oldTrust = Math.clamp(+slave.oldTrust, -100, 100) || 0; + slave.muscles = Math.clamp(+slave.muscles, -100, 100) || 0; + slave.weight = Math.clamp(+slave.weight, -100, 200) || 0; + slave.waist = Math.clamp(+slave.waist, -100, 100) || 0; + if (typeof slave.nationality !== "string") { + slave.nationality = "slave"; + } + if (typeof slave.race !== "string") { + nationalityToRace(slave); + } + if (typeof slave.origRace !== "string") { + slave.origRace = slave.race; + } + slave.height = Math.round(Math.max(+slave.height, 0)) || Math.round(Height.mean(slave)); + slave.heightImplant = Math.clamp(+slave.heightImplant, -1, 1) || 0; + if (typeof slave.markings !== "string") { + slave.markings = "none"; + } + slave.eyes = Math.clamp(+slave.eyes, -3, 1) || 1; /* if 0 or undefined, this sets to 1 */ + if (typeof slave.eyeColor !== "string") { + slave.eyeColor = "brown"; + } + if (typeof slave.origEye !== "string") { + slave.origEye = slave.eyeColor; + } + if (typeof slave.pupil !== "string") { + slave.pupil = "circular"; + } + if (typeof slave.sclerae !== "string") { + slave.sclerae = "white"; + } + if (typeof slave.eyewear !== "string") { + slave.eyewear = "none"; + } + slave.hears = Math.clamp(+slave.hears, -2, 0) || 0; + if (typeof slave.earwear !== "string") { + slave.earwear = "none"; + } + slave.earImplant = Math.clamp(+slave.earImplant, 0, 1) || 0; + if (typeof slave.hColor !== "string") { + slave.hColor = "brown"; + } + if (typeof slave.origHColor !== "string") { + slave.origHColor = slave.hColor; + } + if (typeof slave.pubicHColor !== "string") { + slave.pubicHColor = slave.hColor; + } + if (typeof slave.underArmHColor !== "string") { + slave.underArmHColor = "slave.hColor"; + } + if (typeof slave.eyebrowHColor !== "string") { + slave.eyebrowHColor = "slave.hColor"; + } + if (typeof slave.skin !== "string") { + slave.skin = "light"; + } + if (typeof slave.origSkin !== "string") { + slave.origSkin = slave.skin; + } + if (slave.hLength !== 0) { + slave.hLength = Math.clamp(+slave.hLength, 0, 300) || 60; + } + if (typeof slave.hStyle !== "string") { + slave.hStyle = "long"; + } + if (typeof slave.pubicHStyle !== "string") { + slave.pubicHStyle = "neat"; + } + if (typeof slave.underArmHStyle !== "string") { + slave.underArmHStyle = "waxed"; + } + if (typeof slave.eyebrowHStyle !== "string") { + slave.eyebrowHStyle = "natural"; + } + if (typeof slave.eyebrowFullness !== "string") { + slave.eyebrowFullness = "natural"; + } + slave.corsetPiercing = Math.clamp(+slave.corsetPiercing, 0, 1) || 0; + slave.amp = Math.clamp(+slave.amp, -5, 1) || 0; + slave.PLimb = Math.clamp(+slave.PLimb, 0, 1) || 0; + slave.heels = Math.clamp(+slave.heels, 0, 1) || 0; + slave.voiceImplant = Math.clamp(+slave.voiceImplant, -1, 1) || 0; + if (slave.voice !== 0) { + slave.voice = Math.clamp(+slave.voice, 0, 3) || 1; + } + slave.electrolarynx = Math.clamp(+slave.electrolarynx, 0, 1) || 0; + slave.accent = Math.clamp(+slave.accent, 0, 3) || 0; + slave.shoulders = Math.clamp(+slave.shoulders, -2, 2) || 0; + slave.shouldersImplant = Math.clamp(+slave.shouldersImplant, -1, 1) || 0; + slave.boobs = Math.max(+slave.boobs, 100) || 200; + slave.boobsImplant = Math.max(+slave.boobsImplant, 0) || 0; + slave.boobsImplantType = Math.clamp(+slave.boobsImplantType, 0, 1) || 0; + if (typeof slave.boobShape !== "string") { + slave.boobShape = "normal"; + } + if (typeof slave.nipples !== "string") { + slave.nipples = "cute"; + } + slave.nipplesPiercing = Math.clamp(+slave.nipplesPiercing, 0, 2) || 0; + if (typeof slave.nipplesAccessory !== "string") { + slave.nipplesAccessory = "none"; + } + slave.areolae = Math.clamp(+slave.areolae, 0, 3) || 0; + slave.areolaePiercing = Math.clamp(+slave.areolaePiercing, 0, 2) || 0; + slave.areolaeShape = "" + slave.areolaeShape || "circle"; + if (typeof slave.boobsTat !== "string") { + slave.boobsTat = 0; + } + slave.lactation = Math.clamp(+slave.lactation, 0, 2) || 0; + slave.lactationAdaptation = Math.clamp(+slave.lactationAdaptation, 0, 100) || 0; + slave.milk = Math.max(+slave.milk, 0) || 0; + slave.cum = Math.max(+slave.cum, 0) || 0; + slave.hips = Math.clamp(+slave.hips, -2, 3) || 0; + slave.hipsImplant = Math.clamp(+slave.hipsImplant, -1, 1) || 0; + if (slave.butt !== 0) { + slave.butt = Math.clamp(+slave.butt, 0, 20) || 1; + } + slave.buttImplant = Math.clamp(+slave.buttImplant, 0, 3) || 0; + slave.buttImplantType = Math.clamp(+slave.buttImplantType, 0, 1) || 0; + if (typeof slave.buttTat !== "string") { + slave.buttTat = 0; + } + slave.face = Math.clamp(+slave.face, -100, 100) || 0; + slave.faceImplant = Math.clamp(+slave.faceImplant, 0, 100) || 0; + if (typeof slave.faceShape !== "string") { + slave.faceShape = "normal"; + } + if (slave.lips !== 0) { + slave.lips = Math.clamp(+slave.lips, 0, 100) || 15; + } + slave.lipsImplant = Math.clamp(+slave.lipsImplant, 0, 100) || 0; + slave.lipsPiercing = Math.clamp(+slave.lipsPiercing, 0, 2) || 0; + if (typeof slave.lipsTat !== "string") { + slave.lipsTat = 0; + } + slave.tonguePiercing = Math.clamp(+slave.tonguePiercing, 0, 2) || 0; + slave.vagina = Math.clamp(+slave.vagina, -1, 10) || 0; + slave.vaginaLube = Math.clamp(+slave.vaginaLube, 0, 2) || 0; + slave.vaginaPiercing = Math.clamp(+slave.vaginaPiercing, 0, 2) || 0; + if (typeof slave.vaginaTat !== "string") { + slave.vaginaTat = 0; + } + if (slave.pregAdaptation !== 0) { + slave.pregAdaptation = Math.max(+slave.pregAdaptation, 0) || 50; + } + slave.superfetation = Math.clamp(+slave.superfetation, 0, 1) || 0; + slave.ovaImplant = Math.clamp(+slave.ovaImplant, -1, 2) || 0; + slave.broodmother = Math.clamp(+slave.broodmother, 0, 3) || 0; + slave.broodmotherFetuses = Math.max(+slave.broodmotherFetuses, 0) || 0; + slave.broodmotherOnHold = Math.clamp(+slave.broodmotherOnHold, 0, 1) || 0; + slave.pregSource = +slave.pregSource || 0; + slave.labor = Math.clamp(+slave.labor, 0, 1) || 0; + slave.births = Math.max(+slave.births, 0) || 0; + slave.birthsTotal = Math.max(+slave.birthsTotal, 0) || slave.births; + slave.laborCount = Math.max(+slave.laborCount, 0) || slave.birthsTotal; + slave.cSec = Math.clamp(+slave.cSec, 0, 1) || 0; + if (typeof slave.bellyAccessory !== "string") { + slave.bellyAccessory = "none"; + } + slave.labia = Math.clamp(+slave.labia, 0, 3) || 0; + slave.clit = Math.clamp(+slave.clit, 0, 5) || 0; + slave.clitPiercing = Math.clamp(+slave.clitPiercing, 0, 3) || 0; + slave.foreskin = Math.max(+slave.foreskin, 0) || 0; + slave.anus = Math.clamp(+slave.anus, 0, 4) || 0; + slave.dick = Math.max(+slave.dick, 0) || 0; + if (slave.dick && slave.prostate !== 0) { + slave.prostate = Math.clamp(+slave.prostate, 0, 3) || 1; + } else { + slave.prostate = Math.clamp(+slave.prostate, 0, 3) || 0; + } + slave.balls = Math.max(+slave.balls, 0) || 0; + slave.scrotum = Math.max(+slave.scrotum, 0) || slave.balls; + slave.ovaries = Math.clamp(+slave.ovaries, 0, 1) || 0; + slave.analArea = Math.max(+slave.analArea, 0) || 0; + slave.dickPiercing = Math.clamp(+slave.dickPiercing, 0, 2) || 0; + if (typeof slave.dickTat !== "string") { + slave.dickTat = 0; + } + slave.anusPiercing = Math.clamp(+slave.anusPiercing, 0, 2) || 0; + if (typeof slave.anusTat !== "string") { + slave.anusTat = 0; + } + slave.makeup = Math.clamp(+slave.makeup, 0, 8) || 0; + slave.nails = Math.clamp(+slave.nails, 0, 9) || 0; + slave.brand = Math.clamp(+slave.brand, 0, 1) || 0; + if (typeof slave.brandLocation !== "string") { + slave.brandLocation = 0; + } + slave.earPiercing = Math.clamp(+slave.earPiercing, 0, 2) || 0; + slave.nosePiercing = Math.clamp(+slave.nosePiercing, 0, 2) || 0; + slave.eyebrowPiercing = Math.clamp(+slave.eyebrowPiercing, 0, 2) || 0; + slave.navelPiercing = Math.clamp(+slave.navelPiercing, 0, 2) || 0; + if (typeof slave.shouldersTat !== "string") { + slave.shouldersTat = 0; + } + if (typeof slave.armsTat !== "string") { + slave.armsTat = 0; + } + if (typeof slave.legsTat !== "string") { + slave.legsTat = 0; + } + if (typeof slave.backTat !== "string") { + slave.backTat = 0; + } + if (typeof slave.stampTat !== "string") { + slave.stampTat = 0; + } + slave.oralSkill = Math.clamp(+slave.oralSkill, 0, 100) || 0; + slave.vaginalSkill = Math.clamp(+slave.vaginalSkill, 0, 100) || 0; + slave.analSkill = Math.clamp(+slave.analSkill, 0, 100) || 0; + slave.whoreSkill = Math.clamp(+slave.whoreSkill, 0, 100) || 0; + slave.entertainSkill = Math.clamp(+slave.entertainSkill, 0, 100) || 0; + slave.combatSkill = Math.clamp(+slave.combatSkill, 0, 1) || 0; + if (typeof slave.standardPunishment !== "string") { + slave.standardPunishment = "situational"; + } + if (typeof slave.standardReward !== "string") { + slave.standardReward = "situational"; + } + if (slave.useRulesAssistant !== 0) { + slave.useRulesAssistant = 1; + } + if (typeof slave.diet !== "string") { + slave.diet = "healthy"; + } + slave.dietCum = Math.clamp(+slave.dietCum, 0, 2) || 0; + slave.dietMilk = Math.clamp(+slave.dietMilk, 0, 2) || 0; + slave.tired = Math.clamp(+slave.tired, 0, 1) || 0; + slave.hormones = Math.clamp(+slave.hormones, -2, 2) || 0; + if (typeof slave.drugs !== "string") { + slave.drugs = "no drugs"; + } + slave.aphrodisiacs = Math.clamp(+slave.aphrodisiacs, 0, 2) || 0; + slave.curatives = Math.clamp(+slave.curatives, 0, 2) || 0; + slave.chem = Math.max(+slave.chem, 0) || 0; + slave.addict = Math.max(+slave.addict, 0) || 0; + slave.fuckdoll = Math.clamp(+slave.fuckdoll, 0, 100) || 0; + slave.choosesOwnClothes = Math.clamp(+slave.choosesOwnClothes, 0, 1) || 0; + if (typeof slave.clothes !== "string") { + slave.clothes = "no clothing"; + } + if (typeof slave.collar !== "string") { + slave.collar = "none"; + } + if (typeof slave.shoes !== "string") { + slave.shoes = "none"; + } + if (typeof slave.vaginalAccessory !== "string") { + slave.vaginalAccessory = "none"; + } + if (typeof slave.dickAccessory !== "string") { + slave.dickAccessory = "none"; + } + if (typeof slave.legAccessory !== "string") { + slave.legAccessory = "none"; + } + if (typeof slave.buttplug !== "string") { + slave.buttplug = "none"; + } + if (typeof slave.buttplugAttachment !== "string") { + slave.buttplugAttachment = "none"; + } + slave.intelligence = Math.clamp(+slave.intelligence, -100, 100) || 0; + slave.intelligenceImplant = Math.clamp(+slave.intelligenceImplant, 0, 30) || 0; + slave.energy = Math.clamp(+slave.energy, 0, 100) || 0; + slave.need = Math.max(+slave.need, 0) || 0; + slave.attrXY = Math.clamp(+slave.attrXY, 0, 100) || 0; + slave.attrXX = Math.clamp(+slave.attrXX, 0, 100) || 0; + slave.attrKnown = Math.clamp(+slave.attrKnown, 0, 1) || 0; + slave.fetishStrength = Math.clamp(+slave.fetishStrength, 0, 100) || 0; + slave.fetishKnown = Math.clamp(+slave.fetishKnown, 0, 1) || 0; + slave.oralCount = Math.max(+slave.oralCount, 0) || 0; + slave.vaginalCount = Math.max(+slave.vaginalCount, 0) || 0; + slave.analCount = Math.max(+slave.analCount, 0) || 0; + slave.publicCount = Math.max(+slave.publicCount, 0) || 0; + slave.mammaryCount = Math.max(+slave.mammaryCount, 0) || 0; + slave.penetrativeCount = Math.max(+slave.penetrativeCount, 0) || 0; + slave.pitKills = Math.max(+slave.pitKills, 0) || 0; + if (typeof slave.customTat !== "string") { + slave.customTat = ""; + } + if (typeof slave.customLabel !== "string") { + slave.customLabel = ""; + } + if (typeof slave.customDesc !== "string") { + slave.customDesc = ""; + } + if (typeof slave.customTitle !== "string") { + slave.customTitle = ""; + } + if (typeof slave.customTitleLisp !== "string") { + slave.customTitleLisp = ""; + } + slave.rudeTitle = Math.clamp(+slave.rudeTitle, 0, 1) || 0; + if (typeof slave.customImage !== "string") { + slave.customImage = 0; + } + if (typeof slave.bellyTat !== "string") { + slave.bellyTat = 0; + } + slave.induce = Math.clamp(+slave.induce, 0, 1) || 0; + slave.mpreg = Math.clamp(+slave.mpreg, 0, 1) || 0; + slave.inflation = Math.clamp(+slave.inflation, 0, 3) || 0; + if (typeof slave.inflationType !== "string") { + slave.inflationType = "none"; + } + slave.inflationMethod = Math.clamp(+slave.inflationMethod, 0, 3) || 0; + slave.milkSource = Math.max(+slave.milkSource, 0) || 0; + slave.cumSource = Math.max(+slave.cumSource, 0) || 0; + slave.burst = Math.clamp(+slave.burst, 0, 1) || 0; + SetBellySize(slave); + if (slave.bellyImplant !== 0) { + slave.bellyImplant = Math.max(+slave.bellyImplant, -1) || -1; + } + slave.bellySag = Math.max(+slave.bellySag, 0) || 0; + slave.bellySagPreg = Math.max(+slave.bellySagPreg, 0) || slave.bellySag; + slave.bellyPain = Math.clamp(+slave.bellyPain, 0, 2) || 0; + slave.cervixImplant = Math.clamp(+slave.cervixImplant, 0, 1) || 0; + slave.pubertyAgeXX = Math.max(+slave.pubertyAgeXX, 0) || V.fertilityAge; + slave.pubertyAgeXY = Math.max(+slave.pubertyAgeXY, 0) || V.potencyAge; + slave.scars = Math.clamp(+slave.scars, 0, 6) || 0; + slave.breedingMark = Math.clamp(+slave.breedingMark, 0, 1) || 0; + slave.bodySwap = Math.max(+slave.bodySwap, 0) || 0; + slave.HGExclude = Math.clamp(+slave.HGExclude, 0, 1) || 0; + if (typeof slave.ballType !== "string") { + slave.ballType = "human"; + } + if (typeof slave.eggType !== "string") { + slave.eggType = "human"; + } + slave.reservedChildren = Math.max(+slave.reservedChildren, 0) || 0; + slave.reservedChildrenNursery = Math.max(+slave.reservedChildrenNursery, 0) || 0; + slave.choosesOwnChastity = Math.clamp(+slave.choosesOwnChastity, 0, 1) || 0; + if (typeof slave.pregControl !== "string") { + slave.pregControl = "none"; + } + slave.ageAdjust = Math.clamp(+slave.ageAdjust, -40, 40) || 0; + slave.bald = Math.clamp(+slave.bald, 0, 1) || 0; + if (typeof slave.origBodyOwner !== "string") { + slave.origBodyOwner = ""; + } + slave.origBodyOwnerID = Math.max(+slave.origBodyOwnerID, 0) || 0; + if (typeof slave.death !== "string") { + slave.death = ""; + } + slave.hormoneBalance = Math.clamp(+slave.hormoneBalance, -400, 400) || 0; + slave.onDiet = Math.clamp(+slave.onDiet, 0, 1) || 0; + slave.breastMesh = Math.clamp(+slave.breastMesh, 0, 1) || 0; + slave.slavesFathered = Math.max(+slave.slavesFathered, 0) || 0; + slave.PCChildrenFathered = Math.max(+slave.PCChildrenFathered, 0) || 0; + slave.slavesKnockedUp = Math.max(+slave.slavesKnockedUp, 0) || 0; + slave.PCKnockedUp = Math.max(+slave.PCKnockedUp, 0) || 0; + slave.prematureBirth = Math.clamp(+slave.prematureBirth, 0, 1) || 0; + slave.premature = Math.clamp(+slave.premature, 0, 1) || 0; + slave.vasectomy = Math.clamp(+slave.vasectomy, 0, 1) || 0; + slave.haircuts = Math.clamp(+slave.haircuts, 0, 1) || 0; + slave.newGamePlus = Math.clamp(+slave.newGamePlus, 0, 1) || 0; + slave.skillHG = Math.clamp(+slave.skillHG, 0, 200) || 0; + slave.skillRC = Math.clamp(+slave.skillRC, 0, 200) || 0; + slave.skillBG = Math.clamp(+slave.skillBG, 0, 200) || 0; + slave.skillMD = Math.clamp(+slave.skillMD, 0, 200) || 0; + slave.skillDJ = Math.clamp(+slave.skillDJ, 0, 200) || 0; + slave.skillNU = Math.clamp(+slave.skillNU, 0, 200) || 0; + slave.skillTE = Math.clamp(+slave.skillTE, 0, 200) || 0; + slave.skillAT = Math.clamp(+slave.skillAT, 0, 200) || 0; + slave.skillMT = Math.clamp(+slave.skillMT, 0, 200) || 0; + slave.skillST = Math.clamp(+slave.skillST, 0, 200) || 0; + slave.skillMM = Math.clamp(+slave.skillMM, 0, 200) || 0; + slave.skillWA = Math.clamp(+slave.skillWA, 0, 200) || 0; + slave.skillS = Math.clamp(+slave.skillS, 0, 200) || 0; + slave.skillE = Math.clamp(+slave.skillE, 0, 200) || 0; + slave.skillW = Math.clamp(+slave.skillW, 0, 200) || 0; + slave.tankBaby = Math.clamp(+slave.tankBaby, 0, 2) || 0; + slave.NCSyouthening = Math.max(+slave.NCSyouthening, 0) || 0; + slave.missingEyes = Math.clamp(+slave.missingEyes, 0, 3) || 0; + slave.missingArms = Math.clamp(+slave.missingArms, 0, 3) || 0; + slave.missingLegs = Math.clamp(+slave.missingLegs, 0, 3) || 0; + generatePronouns(slave); +}; diff --git a/src/pregmod/widgets/pregmodWidgets.tw b/src/pregmod/widgets/pregmodWidgets.tw index 36b5723eb6c..5686b3fa494 100644 --- a/src/pregmod/widgets/pregmodWidgets.tw +++ b/src/pregmod/widgets/pregmodWidgets.tw @@ -11,96 +11,6 @@ <<set WombInit($args[0])>> -<<if ndef $args[0].actualAge>> - <<set $args[0].actualAge = $args[0].age>> -<</if>> -<<if ndef $args[0].physicalAge>> - <<set $args[0].physicalAge = $args[0].actualAge>> -<</if>> -<<if ndef $args[0].visualAge>> - <<set $args[0].visualAge = $args[0].actualAge>> -<</if>> -<<if ndef $args[0].ovaryAge>> - <<set $args[0].ovaryAge = $args[0].actualAge>> -<</if>> -<<if ndef $args[0].age>> - <<set $args[0].age = $args[0].actualAge>> -<</if>> -<<if ndef $args[0].boobsImplantType>> - <<set $args[0].boobsImplantType = 0>> -<</if>> -<<if ndef $args[0].buttImplantType>> - <<set $args[0].buttImplantType = 0>> -<</if>> -<<if ndef $args[0].bellyTat>> - <<set $args[0].bellyTat = 0>> -<</if>> -<<if ndef $args[0].cSec>> - <<set $args[0].cSec = 0>> -<</if>> -<<if ndef $args[0].labor>> - <<set $args[0].labor = 0>> -<</if>> -<<if ndef $args[0].induce>> - <<set $args[0].induce = 0>> -<</if>> -<<if ndef $args[0].mpreg>> - <<set $args[0].mpreg = 0>> -<</if>> -<<if ndef $args[0].inflation>> - <<set $args[0].inflation = 0>> -<</if>> -<<if ndef $args[0].inflationType>> - <<set $args[0].inflationType = "none">> -<</if>> -<<if ndef $args[0].inflationMethod>> - <<set $args[0].inflationMethod = 0>> -<</if>> -<<if ndef $args[0].milkSource>> - <<set $args[0].milkSource = 0>> -<</if>> -<<if ndef $args[0].cumSource>> - <<set $args[0].cumSource = 0>> -<</if>> -<<if ndef $args[0].burst>> - <<set $args[0].burst = 0>> -<</if>> -<<if ndef $args[0].bellyImplant>> - <<set $args[0].bellyImplant = -1>> -<</if>> -<<if ndef $args[0].bellySag>> - <<set $args[0].bellySag = 0>> -<</if>> -<<if ndef $args[0].birthsTotal>> - <<set $args[0].birthsTotal = $args[0].births>> -<</if>> -<<if ndef $args[0].pubertyAgeXX>> - <<set $args[0].pubertyAgeXX = $fertilityAge>> -<</if>> -<<if ndef $args[0].bellyPain>> - <<set $args[0].bellyPain = 0>> -<</if>> -<<if ndef $args[0].scars>> - <<set $args[0].scars = 0>> -<</if>> -<<if ndef $args[0].breedingMark>> - <<set $args[0].breedingMark = 0>> -<</if>> -<<if ndef $args[0].underArmHColor>> - <<set $args[0].underArmHColor = $args[0].hColor>> -<</if>> -<<if ndef $args[0].underArmHStyle>> - <<set $args[0].underArmHStyle = "waxed">> -<</if>> -<<if ndef $args[0].eyebrowHColor>> - <<set $args[0].eyebrowHColor = $args[0].hColor>> -<</if>> -<<if ndef $args[0].eyebrowHStyle>> - <<set $args[0].eyebrowHStyle = "natural">> -<</if>> -<<if ndef $args[0].eyebrowFullness>> - <<set $args[0].eyebrowFullness = "natural">> -<</if>> <<if ndef $args[0].missingEyes>> <<if $args[0].eyes == -3>> <<set $args[0].missingEyes = 3>> @@ -128,117 +38,18 @@ <</if>> <<set $args[0].prostateImplant = undefined>> <</if>> -<<if ndef $args[0].bodySwap>> - <<set $args[0].bodySwap = 0>> -<</if>> -<<if ndef $args[0].origBodyOwner>> - <<set $args[0].origBodyOwner = "">> -<</if>> -<<if ndef $args[0].origBodyOwnerID>> - <<set $args[0].origBodyOwnerID = 0>> -<</if>> -<<if ndef $args[0].father>> - <<set $args[0].father = 0>> -<</if>> -<<if ndef $args[0].mother>> - <<set $args[0].mother = 0>> -<</if>> <<if ndef $args[0].daughters>> <<set $args[0].daughters = 0>> <</if>> <<if ndef $args[0].sisters>> <<set $args[0].sisters = 0>> <</if>> -<<if ndef $args[0].canRecruit>> - <<set $args[0].canRecruit = 0>> -<</if>> -<<if ndef $args[0].ballType>> - <<set $args[0].ballType = "human">> -<</if>> -<<if ndef $args[0].eggType>> - <<set $args[0].eggType = "human">> -<</if>> -<<if ndef $args[0].HGExclude>> - <<set $args[0].HGExclude = 0>> -<</if>> -<<if ndef $args[0].reservedChildren>> - <<set $args[0].reservedChildren = 0>> -<</if>> -<<if ndef $args[0].reservedChildrenNursery>> - <<set $args[0].reservedChildrenNursery = 0>> -<</if>> -<<if ndef $args[0].choosesOwnChastity>> - <<set $args[0].choosesOwnChastity = 0>> -<</if>> -<<if ndef $args[0].pregControl>> - <<set $args[0].pregControl = "none">> -<</if>> <<if ndef $args[0].readyLimbs>> <<set $args[0].readyLimbs = []>> <</if>> -<<if ndef $args[0].ageAdjust>> - <<set $args[0].ageAdjust = 0>> -<</if>> -<<if ndef $args[0].bald>> - <<set $args[0].bald = 0>> -<</if>> -<<if ndef $args[0].death>> - <<set $args[0].death = "">> -<</if>> -<<if ndef $args[0].hormoneBalance>> - <<set $args[0].hormoneBalance = 0>> -<</if>> -<<if ndef $args[0].onDiet>> - <<set $args[0].onDiet = 0>> -<</if>> -<<if ndef $args[0].breastMesh>> - <<set $args[0].breastMesh = 0>> -<</if>> -<<if ndef $args[0].bellySagPreg>> - <<set $args[0].bellySagPreg = $args[0].bellySag>> -<</if>> -<<if ndef $args[0].buttplugAttachment>> - <<set $args[0].buttplugAttachment = "none">> -<</if>> -<<if ndef $args[0].slavesFathered>> - <<set $args[0].slavesFathered = 0>> -<</if>> -<<if ndef $args[0].PCChildrenFathered>> - <<set $args[0].PCChildrenFathered = 0>> -<</if>> -<<if ndef $args[0].slavesKnockedUp>> - <<set $args[0].slavesKnockedUp = 0>> -<</if>> -<<if ndef $args[0].PCKnockedUp>> - <<set $args[0].PCKnockedUp = 0>> -<</if>> -<<if ndef $args[0].vasectomy>> - <<set $args[0].vasectomy = 0>> -<</if>> -<<if ndef $args[0].haircuts>> - <<set $args[0].haircuts = 0>> -<</if>> -<<if ndef $args[0].newGamePlus>> - <<set $args[0].newGamePlus = 0>> -<</if>> -<<if ndef $args[0].nipplesAccessory>> - <<set $args[0].nipplesAccessory = "none">> -<</if>> -<<if ndef $args[0].legAccessory>> - <<set $args[0].legAccessory = "none">> -<</if>> <<if def $args[0].pregGenerator>> <<run delete $args[0].pregGenerator>> <</if>> -<<if ndef $args[0].broodmother>> - <<set $args[0].broodmother = 0>> -<</if>> -<<if ndef $args[0].broodmotherCountDown>> - <<set $args[0].broodmotherCountDown = 0>> -<</if>> -<<if ndef $args[0].laborCount>> - <<set $args[0].laborCount = $args[0].birthsTotal>> -<</if>> <<if ndef $args[0].pregAdaptation>> <<if $args[0].physicalAge <= 3>> <<set $args[0].pregAdaptation = 10>> @@ -251,14 +62,6 @@ <</if>> <</if>> -<<if $args[0].fuckdoll > 0>> - <<set $args[0].pronoun = "it", $args[0].possessivePronoun = "its", $args[0].possessive = "its", $args[0].object = "it", $args[0].objectReflexive = "itself", $args[0].noun = "toy">> -<<elseif $args[0].dick > 0 && $args[0].vagina == -1 && $diversePronouns == 1>> - <<set $args[0].pronoun = "he", $args[0].possessivePronoun = "his", $args[0].possessive = "his", $args[0].object = "him", $args[0].objectReflexive = "himself", $args[0].noun = "boy">> -<<else>> - <<set $args[0].pronoun = "she", $args[0].possessivePronoun = "hers", $args[0].possessive = "her", $args[0].object = "her", $args[0].objectReflexive = "herself", $args[0].noun = "girl">> -<</if>> - <<if ndef $args[0].pregKnown>> <<if $args[0].preg > 0>> <<set $args[0].pregKnown = 1>> @@ -273,7 +76,6 @@ <<set $args[0].pregWeek = 0>> <</if>> <</if>> -<<run SetBellySize($args[0])>> <<if ndef $args[0].pubertyXX>> <<if $args[0].physicalAge >= $args[0].pubertyAgeXX>> @@ -282,9 +84,6 @@ <<set $args[0].pubertyXX = 0>> <</if>> <</if>> -<<if ndef $args[0].pubertyAgeXY>> - <<set $args[0].pubertyAgeXY = $potencyAge>> -<</if>> <<if ndef $args[0].pubertyAgeXY>> <<if $args[0].physicalAge >= $args[0].pubertyAgeXY>> <<set $args[0].pubertyXY = 1>> @@ -292,51 +91,6 @@ <<set $args[0].pubertyXY = 0>> <</if>> <</if>> -<<if ndef $args[0].skillHG>> - <<set $args[0].skillHG = 0>> -<</if>> -<<if ndef $args[0].skillRC>> - <<set $args[0].skillRC = 0>> -<</if>> -<<if ndef $args[0].skillBG>> - <<set $args[0].skillBG = 0>> -<</if>> -<<if ndef $args[0].skillMD>> - <<set $args[0].skillMD = 0>> -<</if>> -<<if ndef $args[0].skillDJ>> - <<set $args[0].skillDJ = 0>> -<</if>> -<<if ndef $args[0].skillNU>> - <<set $args[0].skillNU = 0>> -<</if>> -<<if ndef $args[0].skillTE>> - <<set $args[0].skillTE = 0>> -<</if>> -<<if ndef $args[0].skillAT>> - <<set $args[0].skillAT = 0>> -<</if>> -<<if ndef $args[0].skillMT>> - <<set $args[0].skillMT = 0>> -<</if>> -<<if ndef $args[0].skillST>> - <<set $args[0].skillST = 0>> -<</if>> -<<if ndef $args[0].skillMM>> - <<set $args[0].skillMM = 0>> -<</if>> -<<if ndef $args[0].skillWA>> - <<set $args[0].skillWA = 0>> -<</if>> -<<if ndef $args[0].skillS>> - <<set $args[0].skillS = 0>> -<</if>> -<<if ndef $args[0].skillE>> - <<set $args[0].skillE = 0>> -<</if>> -<<if ndef $args[0].skillW>> - <<set $args[0].skillW = 0>> -<</if>> <<if ndef $args[0].geneMods>> <<set $args[0].geneMods = {NCS: 0, rapidCellGrowth: 0}>> <</if>> @@ -344,68 +98,10 @@ <<set $args[0].geneMods.NCS = $args[0].inducedNCS>> <<set $args[0].inducedNCS = undefined>> <</if>> -<<if ndef $args[0].NCSyouthening>> - <<set $args[0].NCSyouthening = 0>> -<</if>> -<<if ndef $args[0].prematureBirth>> - <<set $args[0].prematureBirth = 0>> -<</if>> -<<if ndef $args[0].premature>> - <<set $args[0].premature = 0>> -<</if>> <<if ndef $args[0].wombImplant>> <<set $args[0].wombImplant = "none">> <</if>> -<<if ndef $args[0].pornFeed>> - <<set $args[0].pornFame = 0>> - <<set $args[0].pornFameSpending = 0>> - <<set $args[0].pornFeed = 0>> - <<set $args[0].pornPrestige = 0>> - <<set $args[0].pornPrestigeDesc = 0>> - <<set $args[0].pornFameType = "none">> - <<set $args[0].pornFocus = "none">> - /*General*/ - <<set $args[0].pornTypeGeneral = 0>> - <<set $args[0].pornTypeFuckdoll = 0>> - <<set $args[0].pornTypeRape = 0>> - <<set $args[0].pornTypePreggo = 0>> - <<set $args[0].pornTypeBBW = 0>> - <<set $args[0].pornTypeGainer = 0>> - <<set $args[0].pornTypeStud = 0>> - <<set $args[0].pornTypeLoli = 0>> - /*Quirks*/ - <<set $args[0].pornTypeDeepThroat = 0>> - <<set $args[0].pornTypeStruggleFuck = 0>> - <<set $args[0].pornTypePainal = 0>> - <<set $args[0].pornTypeTease = 0>> - <<set $args[0].pornTypeRomantic = 0>> - <<set $args[0].pornTypePervert = 0>> - <<set $args[0].pornTypeCaring = 0>> - <<set $args[0].pornTypeUnflinching = 0>> - <<set $args[0].pornTypeSizeQueen = 0>> - /*Paraphilia*/ - <<set $args[0].pornTypeNeglectful = 0>> - <<set $args[0].pornTypeCumAddict = 0>> - <<set $args[0].pornTypeAnalAddict = 0>> - <<set $args[0].pornTypeAttentionWhore = 0>> - <<set $args[0].pornTypeBreastGrowth = 0>> - <<set $args[0].pornTypeAbusive = 0>> - <<set $args[0].pornTypeMalicious = 0>> - <<set $args[0].pornTypeSelfHating = 0>> - <<set $args[0].pornTypeBreeder = 0>> - /*fetish*/ - <<set $args[0].pornTypeSub = 0>> - <<set $args[0].pornTypeCumSlut = 0>> - <<set $args[0].pornTypeAnal = 0>> - <<set $args[0].pornTypeHumiliation = 0>> - <<set $args[0].pornTypeBoobs = 0>> - <<set $args[0].pornTypeDom = 0>> - <<set $args[0].pornTypeSadist = 0>> - <<set $args[0].pornTypeMasochist = 0>> - <<set $args[0].pornTypePregnancy = 0>> -<</if>> - <</widget>> <<widget "setLocalPronouns">> diff --git a/src/uncategorized/BackwardsCompatibility.tw b/src/uncategorized/BackwardsCompatibility.tw index d7dfbc6456b..f1ca8d2ef42 100644 --- a/src/uncategorized/BackwardsCompatibility.tw +++ b/src/uncategorized/BackwardsCompatibility.tw @@ -2657,6 +2657,7 @@ Done! <br><br> Setting missing slave variables: +/* Adding a new variable? Consider putting it in datatypeCleanupJS.tw instead of here */ <<for _bci = 0; _bci < $slaves.length; _bci++>> <<set _Slave = $slaves[_bci]>> @@ -2669,10 +2670,6 @@ Setting missing slave variables: <<set WombInit(_Slave)>> -<<if ndef _Slave.publicCount>> - <<set _Slave.publicCount = 0>> -<</if>> - <<if _Slave.origin == "Shortly after birth, she was sealed in an aging tank until she was of age. She knows only of the terror that awaits her should she not obey her master.">> <<set _Slave.tankBaby = 2>> <<elseif _Slave.origin == "Shortly after birth, she was sealed in an aging tank until she was of age. She knows nothing of the world outside of what the tank imprinted her with.">> @@ -2685,25 +2682,12 @@ Setting missing slave variables: <<unset _Slave.PCSlutContacts>> <</if>> -<<if ndef _Slave.need>> - <<set _Slave.need = 0>> -<</if>> - -<<if ndef _Slave.mother>> - <<set _Slave.mother = 0>> -<</if>> -<<if ndef _Slave.father>> - <<set _Slave.father = 0>> -<</if>> <<if ndef _Slave.sisters>> <<set _Slave.sisters = 0>> <</if>> <<if ndef _Slave.daughters>> <<set _Slave.daughters = 0>> <</if>> -<<if ndef _Slave.canRecruit>> - <<set _Slave.canRecruit = 0>> -<</if>> <<if _Slave.rivalry != 0>> <<set _backwardsCompatibility = $slaveIndices[_Slave.rivalryTarget]>> <<if ndef _backwardsCompatibility>><<set _Slave.rivalry = 0, _Slave.rivalryTarget = 0>><</if>> @@ -2716,9 +2700,6 @@ Setting missing slave variables: <<set _backwardsCompatibility = $slaveIndices[_Slave.relationTarget]>> <<if ndef _backwardsCompatibility>><<set _Slave.relation = 0, _Slave.relationTarget = 0>><</if>> <</if>> -<<if ndef _Slave.buttplugAttachment>> - <<set _Slave.buttplugAttachment = "none">> -<</if>> <<if _Slave.race == "surgically altered to look white">> <<set _Slave.race = "white">> @@ -2756,12 +2737,6 @@ Setting missing slave variables: <<if (_Slave.race == "surgically altered to look mixed race") || (_Slave.race == "surgically altered to look mixed")>> <<set _Slave.race = "mixed race">> <</if>> -<<if ndef _Slave.race>> - <<run nationalityToRace(_Slave)>> -<</if>> -<<if ndef _Slave.origRace>> - <<set _Slave.origRace = _Slave.race>> -<</if>> <<if ndef _Slave.override_Race>> <<set _Slave.override_Race = 0>> @@ -2792,51 +2767,12 @@ Setting missing slave variables: <<set _Slave.skin = "dyed blue">> <</if>> -<<if ndef _Slave.aphrodisiacs>> - <<set _Slave.aphrodisiacs = 0>> -<</if>> -<<if ndef _Slave.curatives>> - <<set _Slave.curatives = 0>> -<</if>> -<<if ndef _Slave.lactationAdaptation>> - <<set _Slave.lactationAdaptation = 0>> -<</if>> -<<if ndef _Slave.dietCum>> - <<set _Slave.dietCum = 0>> -<</if>> -<<if ndef _Slave.dietMilk>> - <<set _Slave.dietMilk = 0>> -<</if>> -<<if ndef _Slave.fuckdoll>> - <<set _Slave.fuckdoll = 0>> -<</if>> -<<if ndef _Slave.customImage>> - <<set _Slave.customImage = 0>> -<</if>> -<<if ndef _Slave.nationality || _Slave.nationality == 0>> - <<set _Slave.nationality = "slave">> -<</if>> - -<<if ndef _Slave.faceShape>> - <<set _Slave.faceShape = "normal">> -<</if>> - <<if _Slave.markings == "heavily">> <<set _Slave.markings = "heavily freckled">> <<elseif _Slave.markings == "beauty">> <<set _Slave.markings = "beauty mark">> <</if>> -<<if ndef _Slave.customTitle>> - <<set _Slave.customTitle = "">> -<</if>> -<<if ndef _Slave.customTitleLisp>> - <<set _Slave.customTitleLisp = "">> -<</if>> -<<if ndef _Slave.rudeTitle>> - <<set _Slave.rudeTitle = 0>> -<</if>> - <<if ndef _Slave.genes>> <<if _Slave.ovaries == 1>> <<set _Slave.genes = "XX">> @@ -2891,42 +2827,6 @@ Setting missing slave variables: <<set _Slave.teeth = "cosmetic braces">> <</if>> -<<if ndef _Slave.boobShape>> - <<set _Slave.boobShape = "perky">> -<</if>> - -<<if ndef _Slave.vaginaLube>> - <<set _Slave.vaginaLube = 0>> -<</if>> - -<<if ndef _Slave.hips>> - <<set _Slave.hips = 0>> -<</if>> - -<<if ndef _Slave.hipsImplant>> - <<set _Slave.hipsImplant = 0>> -<</if>> - -<<if ndef _Slave.shoulders>> - <<set _Slave.shoulders = 0>> -<</if>> - -<<if ndef _Slave.shouldersImplant>> - <<set _Slave.shouldersImplant = 0>> -<</if>> - -<<if ndef _Slave.voiceImplant>> - <<set _Slave.voiceImplant = 0>> -<</if>> - -<<if ndef _Slave.electrolarynx>> - <<set _Slave.electrolarynx = 0>> -<</if>> - -<<if ndef _Slave.backTat>> - <<set _Slave.backTat = 0>> -<</if>> - <<if ndef _Slave.areolaeShape>> <<if _Slave.areolae == 4>> <<set _Slave.areolaeShape = "heart">> @@ -2939,24 +2839,6 @@ Setting missing slave variables: <</if>> <</if>> -<<if ndef _Slave.hColor>> - <<set _Slave.hColor = either("black", "blonde", "red", "brown")>> -<</if>> - -<<if ndef _Slave.hStyle>> - <<set _Slave.hStyle = either("ass-length", "long", "shoulder-length")>> -<</if>> - -<<if ndef _Slave.eyebrowHColor>> - <<set _Slave.eyebrowHColor = _Slave.hColor>> -<</if>> -<<if ndef _Slave.eyebrowHStyle>> - <<set _Slave.eyebrowHStyle = "natural">> -<</if>> -<<if ndef _Slave.eyebrowFullness>> - <<set _Slave.eyebrowFullness = "natural">> -<</if>> - <<if ndef _Slave.eyeColor>> <<set _Slave.eyeColor = _Slave.eyes>> <<set _Slave.eyes = 1>> @@ -3004,55 +2886,6 @@ Setting missing slave variables: <</if>> <</if>> -<<if ndef _Slave.sclerae>> - <<set _Slave.sclerae = "white">> -<</if>> - -<<if ndef _Slave.eyewear>> - <<set _Slave.eyewear = "none">> -<</if>> - -<<if ndef _Slave.hears>> - <<set _Slave.hears = 0>> -<</if>> - -<<if ndef _Slave.earwear>> - <<set _Slave.earwear = "none">> -<</if>> - -<<if ndef _Slave.earImplant>> - <<set _Slave.earImplant = 0>> -<</if>> - -<<if ndef _Slave.indenture>> - <<set _Slave.indenture = -1>> -<</if>> -<<if ndef _Slave.indentureRestrictions>> - <<set _Slave.indentureRestrictions = 0>> -<</if>> -<<if ndef _Slave.birthWeek>> - <<set _Slave.birthWeek = random(0,51)>> -<</if>> -<<if ndef _Slave.cSec>> - <<set _Slave.cSec = 0>> -<</if>> -<<if ndef _Slave.labor>> - <<set _Slave.labor = 0>> -<</if>> -<<if ndef _Slave.pregSource>> - <<set _Slave.pregSource = 0>> -<</if>> - -<<if ndef _Slave.superfetation>> - <<set _Slave.superfetation = 0>> -<</if>> - -<<if ndef _Slave.ovaImplant>> - <<set _Slave.ovaImplant = 0>> -<</if>> - -<<set _Slave.training = Math.clamp(Number(_Slave.training), 0, 150) || 0>> - <<if def _Slave.pitkills>> <<run delete _Slave.pitkills>> <</if>> @@ -3382,59 +3215,14 @@ Setting missing slave variables: <<set _Slave.lipsTat = "advertisements">> <</switch>> -<<if ndef _Slave.areolaePiercing>> - <<set _Slave.areolaePiercing = 0>> -<</if>> - -<<if ndef _Slave.standardPunishment>> - <<set _Slave.standardPunishment = "situational">> +<<if def _Slave.headAccessory>> + <<run delete _Slave.headAccessory>> <</if>> - -<<if ndef _Slave.standardReward>> - <<set _Slave.standardReward = "situational">> +<<if def _Slave.rearAccessory>> + <<run delete _Slave.rearAccessory>> <</if>> - -<<if ndef _Slave.corsetPiercing>> - <<set _Slave.corsetPiercing = 0>> -<</if>> - -<<if ndef _Slave.dickAccessory>> - <<set _Slave.dickAccessory = "none">> -<</if>> - -<<if ndef _Slave.scrotum>> - <<set _Slave.scrotum = _Slave.balls>> -<</if>> - -<<if ndef _Slave.markings>> - <<set _Slave.markings = "none">> -<</if>> - -<<if ndef _Slave.accent>> - <<set _Slave.accent = random(0,3)>> -<</if>> - -<<if ndef _Slave.pornFame>> - <<set _Slave.pornFame = 0>> -<</if>> -<<if ndef _Slave.pornFameSpending>> - <<set _Slave.pornFameSpending = 0>> -<</if>> - -<<if ndef _Slave.bellyAccessory>> - <<set _Slave.bellyAccessory = "none">> -<</if>> -<<if ndef _Slave.legAccessory>> - <<set _Slave.legAccessory = "none">> -<</if>> -<<if ndef _Slave.headAccessory>> - <<set _Slave.headAccessory = "none">> -<</if>> -<<if ndef _Slave.rearAccessory>> - <<set _Slave.rearAccessory = "none">> -<</if>> -<<if ndef _Slave.backAccessory>> - <<set _Slave.backAccessory = "none">> +<<if def _Slave.backAccessory>> + <<run delete _Slave.backAccessory>> <</if>> <<if (ndef _Slave.currentRules) || (_Slave.currentRules.length < 1)>> @@ -3453,75 +3241,6 @@ Setting missing slave variables: <<set _Slave.height = random(185,200)>> <</if>> -<<if _Slave.customTat == " ">> - <<set _Slave.customTat = "">> -<</if>> - -<<if _Slave.customLabel == " " || ndef _Slave.customLabel>> - <<set _Slave.customLabel = "">> -<</if>> -<<if _Slave.lipsPiercing == "no default setting">> - <<set _Slave.lipsPiercing = 0>> -<</if>> -<<if _Slave.tonguePiercing == "no default setting">> - <<set _Slave.tonguePiercing = 0>> -<</if>> -<<if _Slave.nipplesPiercing == "no default setting">> - <<set _Slave.nipplesPiercing = 0>> -<</if>> -<<if _Slave.areolaePiercing == "no default setting">> - <<set _Slave.areolaePiercing = 0>> -<</if>> -<<if _Slave.dickPiercing == "no default setting">> - <<set _Slave.dickPiercing = 0>> -<</if>> -<<if _Slave.vaginaPiercing == "no default setting">> - <<set _Slave.vaginaPiercing = 0>> -<</if>> -<<if _Slave.clitPiercing == "no default setting">> - <<set _Slave.clitPiercing = 0>> -<</if>> -<<if _Slave.anusPiercing == "no default setting">> - <<set _Slave.anusPiercing = 0>> -<</if>> -<<if _Slave.earPiercing == "no default setting">> - <<set _Slave.earPiercing = 0>> -<</if>> -<<if _Slave.eyebrowPiercing == "no default setting">> - <<set _Slave.eyebrowPiercing = 0>> -<</if>> -<<if _Slave.nosePiercing == "no default setting">> - <<set _Slave.nosePiercing = 0>> -<</if>> -<<if _Slave.navelPiercing == "no default setting">> - <<set _Slave.navelPiercing = 0>> -<</if>> -<<if _Slave.corsetPiercing == "no default setting">> - <<set _Slave.corsetPiercing = 0>> -<</if>> - -<<if _Slave.customDesc == " " || _Slave.customDesc == 0>> - <<set _Slave.customDesc = "">> -<</if>> - -<<if ndef _Slave.prostate>> - <<if _Slave.dick > 0>> - <<set _Slave.prostate = 1>> - <<else>> - <<set _Slave.prostate = 0>> - <</if>> -<</if>> - -<<if ndef _Slave.origEye>> - <<set _Slave.origEye = _Slave.eyeColor>> -<</if>> -<<if ndef _Slave.origHColor>> - <<set _Slave.origHColor = _Slave.hColor>> -<</if>> -<<if ndef _Slave.origSkin>> - <<set _Slave.origSkin = _Slave.skin>> -<</if>> - <<if _Slave.eyeColor == "no default value">> <<set _Slave.eyeColor = _Slave.origEye>> <</if>> @@ -3535,10 +3254,6 @@ Setting missing slave variables: <<set _Slave.faceImplant = 65>> <</if>> -<<if !isInt(_Slave.height)>> - <<set _Slave.height = Math.trunc(_Slave.height)>> -<</if>> - <<if $cyberMod == 0 && (_Slave.amp < 0 || _Slave.PLimb == 2)>> <<set _Slave.PLimb = 1>> <</if>> @@ -3551,7 +3266,7 @@ Setting missing slave variables: <</if>> <</for>> -<<set _Slave.chem = Number(_Slave.chem) || 0>> +<<run SlaveDatatypeCleanup(_Slave)>> <<set $slaves[_bci] = _Slave>> <</for>> -- GitLab