From a28afe50faa2ec1846a941093db92ff9cbcee33c Mon Sep 17 00:00:00 2001 From: lowercase-donkey <lowercasedonkey@gmail.com> Date: Tue, 28 May 2019 00:49:51 -0400 Subject: [PATCH] progress, brandLocation removed --- slave variables documentation - Pregmod.txt | 14 ++----------- src/js/SlaveState.js | 22 ++++++--------------- src/js/datatypeCleanupJS.js | 4 ---- src/js/descriptionWidgets.js | 2 +- src/npc/descriptions/boobs/boobs.js | 11 +++++------ src/npc/uploadSlave.tw | 11 +++++++++-- src/pregmod/newChildIntro.tw | 3 +-- src/pregmod/widgets/bodyswapWidgets.tw | 1 - src/uncategorized/bodyModification.tw | 3 +-- src/uncategorized/newSlaveIntro.tw | 6 ++---- src/uncategorized/reRelativeRecruiter.tw | 5 +++-- src/uncategorized/remoteSurgery.tw | 4 +--- src/uncategorized/saLongTermEffects.tw | 13 ++++++++++-- src/uncategorized/sellSlave.tw | 2 +- src/uncategorized/slaveStats.tw | 10 ++++++++-- src/utility/descriptionWidgetsFlesh.tw | 20 ++++--------------- 16 files changed, 55 insertions(+), 76 deletions(-) diff --git a/slave variables documentation - Pregmod.txt b/slave variables documentation - Pregmod.txt index 0ef827374e4..fbff5403ce4 100644 --- a/slave variables documentation - Pregmod.txt +++ b/slave variables documentation - Pregmod.txt @@ -2152,18 +2152,8 @@ nail type brand: -brand description -accepts 0 or string - -brandLocation: - -brand location -accepts string -"back" -"chest" -"ankles" -"wrists" -"thighs" +is an object +keys include any place on a slave body that can recieve a brand, and values are 0 for no brand or a string for the brand. earPiercing: diff --git a/src/js/SlaveState.js b/src/js/SlaveState.js index c16046c6b41..13c12350e3b 100644 --- a/src/js/SlaveState.js +++ b/src/js/SlaveState.js @@ -1344,23 +1344,13 @@ App.Entity.SlaveState = class SlaveState { */ this.nails = 0; /** - * has brand + * brand * - * accepts 0 or string - * * 0: no brand - * * string: brand description */ - this.brand = 0; - /** - * brand location - * - * accepts string - * * "back" - * * "chest" - * * "ankles" - * * "wrists" - * * "thighs" - * @type {string|number} */ - this.brandLocation = 0; + * Object describing the brands a slave has, key is a string, values are strings or int 0 for no brand at that location.*/ + this.brand = { + penis: 0, + neck: "your initials" + }; /** has pierced ears * * 0: no; 1: yes; 2: heavy */ diff --git a/src/js/datatypeCleanupJS.js b/src/js/datatypeCleanupJS.js index 9e31e223139..5ce4dd696e6 100644 --- a/src/js/datatypeCleanupJS.js +++ b/src/js/datatypeCleanupJS.js @@ -1204,10 +1204,6 @@ window.childCosmeticsDatatypeCleanup = function childCosmeticsDatatypeCleanup(ch if (typeof child.eyewear !== "string") { child.eyewear = "none"; } - /*child.brand = Math.clamp(+child.brand, 0, 1) || 0; - if (typeof child.brandLocation !== "string") { - child.brandLocation = 0; - }*/ if (typeof child.markings !== "string") { child.markings = "none"; } diff --git a/src/js/descriptionWidgets.js b/src/js/descriptionWidgets.js index a6763f113f8..bae5911a2ea 100644 --- a/src/js/descriptionWidgets.js +++ b/src/js/descriptionWidgets.js @@ -591,7 +591,7 @@ App.Desc.brand = function(slave, surface) { if (State.variables.showBodyMods === 1) { if (surface) { if (slave.brand[surface]) { - r += `${slave.brand[surface]} branded into the flesh of ${his} ${surface}. `; + r += `${He} has ${slave.brand[surface]} branded into the flesh of ${his} ${surface}. `; } return r; } diff --git a/src/npc/descriptions/boobs/boobs.js b/src/npc/descriptions/boobs/boobs.js index bf5f75b626c..35eba224778 100644 --- a/src/npc/descriptions/boobs/boobs.js +++ b/src/npc/descriptions/boobs/boobs.js @@ -1481,15 +1481,14 @@ App.Desc.boobsExtra = function(slave, pronouns) { */ App.Desc.boobsBrand = function(slave) { if (State.variables.showBodyMods === 1) { + let r = ``; if (slave.fuckdoll === 0) { - pronouns = pronouns || getPronouns(slave); - r = ``; - r += App.Desc.brand($activeSlave, "breasts"); - r += App.Desc.brand($activeSlave, "left breast"); - r += App.Desc.brand($activeSlave, "right breast"); + r += App.Desc.brand(slave, "breasts"); + r += App.Desc.brand(slave, "left breast"); + r += App.Desc.brand(slave, "right breast"); } + return r; } - return r; }; /** diff --git a/src/npc/uploadSlave.tw b/src/npc/uploadSlave.tw index 2e8309e14bf..59fcb784691 100644 --- a/src/npc/uploadSlave.tw +++ b/src/npc/uploadSlave.tw @@ -135,8 +135,15 @@ anusPiercing: $activeSlave.anusPiercing, anusTat: "$activeSlave.anusTat", makeup: $activeSlave.makeup, nails: $activeSlave.nails, -brand: <<if $activeSlave.brand == 0>>0<<else>>"$activeSlave.brand "<</if>>, -brandLocation: <<if $activeSlave.brandLocation == 0>>0<<else>>"$activeSlave.brandLocation"<</if>>, +brand: <<if keySum($activeSlave.brand) == 0>>0,<<else>> +<<for _brandName, _brand range $activeSlave.brand>> + <<if _brand == 0>> + <<continue>> + <<else>> + _brandName: _brand, + <</if>> +<</for>> +<</if>> earPiercing: $activeSlave.earPiercing, nosePiercing: $activeSlave.nosePiercing, eyebrowPiercing: $activeSlave.eyebrowPiercing, diff --git a/src/pregmod/newChildIntro.tw b/src/pregmod/newChildIntro.tw index c3131af5637..be86c8f0a3f 100644 --- a/src/pregmod/newChildIntro.tw +++ b/src/pregmod/newChildIntro.tw @@ -649,8 +649,7 @@ You slowly strip down, gauging $his reactions to your show, until you are fully //Now would be a good time to introduce $him to life in your stable of sex slaves.// <br> <<link "Brand $him on the _brandTarget">> -<<set $activeSlave.brand = $brandDesign.primary>> -<<set $activeSlave.brandLocation = _brandTarget>> +<<set $activeSlave.brand[_brandTarget] = $brandDesign.primary>> <<set $activeSlave.devotion -= 25>> <<set $activeSlave.trust -= 30>> <<set $activeSlave.health -= 20>> diff --git a/src/pregmod/widgets/bodyswapWidgets.tw b/src/pregmod/widgets/bodyswapWidgets.tw index c8bb8ea867f..6a288d87b82 100644 --- a/src/pregmod/widgets/bodyswapWidgets.tw +++ b/src/pregmod/widgets/bodyswapWidgets.tw @@ -110,7 +110,6 @@ <<set $args[0].anusPiercing = $args[1].anusPiercing>> <<set $args[0].anusTat = $args[1].anusTat>> <<set $args[0].brand = $args[1].brand>> -<<set $args[0].brandLocation = $args[1].brandLocation>> <<set $args[0].nosePiercing = $args[1].nosePiercing>> <<set $args[0].eyebrowPiercing = $args[1].eyebrowPiercing>> <<set $args[0].navelPiercing = $args[1].navelPiercing>> diff --git a/src/uncategorized/bodyModification.tw b/src/uncategorized/bodyModification.tw index 8e5e39d572a..ce51aa58d0d 100644 --- a/src/uncategorized/bodyModification.tw +++ b/src/uncategorized/bodyModification.tw @@ -886,13 +886,12 @@ Custom Tats: Branding: <<if $activeSlave.brand != 0>> - <<= App.Desc.brand($activeSlave, "penis")>> <br> <<for _brandName, _brand range $activeSlave.brand>> <<if _brand == 0>> <<continue>> <<else>> - $His _brandName is marked with _brand + $His _brandName is marked with _brand: <<capture _brandName>> <<link "Remove Brand">> <<set $brandApplied = 0>> diff --git a/src/uncategorized/newSlaveIntro.tw b/src/uncategorized/newSlaveIntro.tw index 2367a539abe..a0ed655c7a8 100644 --- a/src/uncategorized/newSlaveIntro.tw +++ b/src/uncategorized/newSlaveIntro.tw @@ -592,8 +592,7 @@ The legalities completed, ''__@@.pink;<<= SlaveFullName($activeSlave)>>@@__'' << <<replace "#introResult">> You tell $him you'll be marking $him as one of your working <<= $girl>>s. $He looks resigned as $he follows you to the body modification studio, and lets you strap $him down with $his _brandTarget bare. $He understands what's coming. You've got $him positioned just right<<if canDoAnal($activeSlave)>>, so your cock slides up $his experienced asshole easily<</if>>. You bring the brand in close so $he can feel the radiated heat, which breaks through even $his jaded exterior and makes $him tighten with fear. When you're close, you apply the brand<<if canDoAnal($activeSlave)>>, making the poor whore cinch $his sphincter down hard in agony, bringing you to climax<</if>>. $He knows you know how to @@.gold;apply pain,@@ now, and $he @@.mediumorchid;learns to dislike you@@ even as $his @@.red;wound@@ heals. <</replace>> - <<set $activeSlave.brand = $brandDesign.primary>> - <<set $activeSlave.brandLocation = _brandTarget>> + <<set $activeSlave.brand[_brandTarget] = $brandDesign.primary>> <<set $activeSlave.devotion -= 5>> <<set $activeSlave.trust -= 10>> <<set $activeSlave.health -= 10>> @@ -1118,8 +1117,7 @@ The legalities completed, ''__@@.pink;<<= SlaveFullName($activeSlave)>>@@__'' << <<= FutureSocieties.Change("Supremacist", -2)>> <</if>> <</replace>> - <<set $activeSlave.brand = $brandDesign.primary>> - <<set $activeSlave.brandLocation = _brandTarget>> + <<set $activeSlave.brand[_brandTarget] = $brandDesign.primary>> <<set $activeSlave.devotion -= 5>> <<set $activeSlave.trust -= 10>> <<set $activeSlave.health -= 10>> diff --git a/src/uncategorized/reRelativeRecruiter.tw b/src/uncategorized/reRelativeRecruiter.tw index 5a919b82f06..2bdcd8145ce 100644 --- a/src/uncategorized/reRelativeRecruiter.tw +++ b/src/uncategorized/reRelativeRecruiter.tw @@ -462,8 +462,9 @@ <<set $activeSlave.anusPiercing = 0>> <<set $activeSlave.anusTat = 0>> <<set $activeSlave.bellyAccessory = "none">> -<<set $activeSlave.brand = 0>> -<<set $activeSlave.brandLocation = "">> +<<for _brandName, _brand range $activeSlave.brand>> + <<set _brand = 0>> +<</for>> <<set $activeSlave.shouldersTat = 0>> <<set $activeSlave.armsTat = 0>> <<set $activeSlave.legsTat = 0>> diff --git a/src/uncategorized/remoteSurgery.tw b/src/uncategorized/remoteSurgery.tw index 2911fa14e79..d0b511a6f6b 100644 --- a/src/uncategorized/remoteSurgery.tw +++ b/src/uncategorized/remoteSurgery.tw @@ -197,9 +197,7 @@ $He has <<if $activeSlave.hears != -2 && $activeSlave.earImplant != 1>> <<set $activeSlave.hears = -1>> <</if>> - <<if $activeSlave.brandLocation == "left ear" || $activeSlave.brandLocation == "right ear" || $activeSlave.brandLocation == "both ear">> - <<set $activeSlave.brand = 0>> - <</if>> + <<set $activeSlave.brand["left ear"] = 0, $activeSlave.brand["right ear"] = 0, $activeSlave.brand["both ear"] = 0>> <<else>> <<if $activeSlave.earShape != "pointy">> | [[Reshape into small elfin ears|Surgery Degradation][$activeSlave.earShape = "pointy", cashX(forceNeg($surgeryCost), "slaveSurgery", $activeSlave), $activeSlave.health -= 10, $surgeryType = "earMinor"]] diff --git a/src/uncategorized/saLongTermEffects.tw b/src/uncategorized/saLongTermEffects.tw index 0b2d34ac880..bb743a2c97e 100644 --- a/src/uncategorized/saLongTermEffects.tw +++ b/src/uncategorized/saLongTermEffects.tw @@ -5895,9 +5895,18 @@ /* LONG TERM PHYSICAL EFFECTS */ <<if $slaves[$i].fuckdoll == 0>> - <<if ($slaves[$i].brand != 0)>> + <<if (keySum($slaves[$i].brand) != 0)>> <<if ($slaves[$i].assignment == "serve the public") || ($slaves[$i].assignment == "whore") || ($slaves[$i].assignment == "work in the brothel") || ($slaves[$i].assignment == "serve in the club")>> - Since $he is in public, your brand against the $slaves[$i].skin skin of $his $slaves[$i].brandLocation @@.green;slightly increases your reputation@@ as a slaveowner. + Since $he is in public, your brand against the $slaves[$i].skin skin of $his + <<for _brandName, _brand range $activeSlave.brand>> + <<if _brand == 0>> + <<continue>> + <<else>> + _brandName + <<break>> + <</if>> + <</for>> + @@.green;slightly increases your reputation@@ as a slaveowner. <<run repX(5, "futureSocieties", $slaves[$i])>> <<switch $slaves[$i].assignment>> <<case "work in the brothel">><<run getSlaveStatisticData($slaves[$i], $facility.brothel).rep += 5>> diff --git a/src/uncategorized/sellSlave.tw b/src/uncategorized/sellSlave.tw index 70c757960d9..d921989da5b 100644 --- a/src/uncategorized/sellSlave.tw +++ b/src/uncategorized/sellSlave.tw @@ -580,7 +580,7 @@ A reputable slave appraiser arrives promptly to inspect $him and certify $his qu <</if>> <</if>> -<<if $activeSlave.brand != 0>> +<<if keySum($activeSlave.brand) != 0>> <<if $rep > 10000>> I see $he's branded with your mark; with your stellar reputation, that will make $him appraise better. <<elseif $rep < 5000>> diff --git a/src/uncategorized/slaveStats.tw b/src/uncategorized/slaveStats.tw index 0612cff0056..2886504111f 100644 --- a/src/uncategorized/slaveStats.tw +++ b/src/uncategorized/slaveStats.tw @@ -211,8 +211,14 @@ slaveName: $activeSlave.slaveName /* TODO: figure out why this is being inden <br>anusTat: $activeSlave.anusTat <br>makeup: $activeSlave.makeup <br>nails: $activeSlave.nails -<br>brand: $activeSlave.brand -<br>brandLocation: $activeSlave.brandLocation +<br>brand: +<<for _brandName, _brand range $activeSlave.brand>> + <<if _brand == 0>> + <<continue>> + <<else>> + _brandName: _brand, + <</if>> +<</for>> <br>earPiercing: $activeSlave.earPiercing <br>nosePiercing: $activeSlave.nosePiercing <br>eyebrowPiercing: $activeSlave.eyebrowPiercing diff --git a/src/utility/descriptionWidgetsFlesh.tw b/src/utility/descriptionWidgetsFlesh.tw index f5c1dd65d5b..fa2052bf483 100644 --- a/src/utility/descriptionWidgetsFlesh.tw +++ b/src/utility/descriptionWidgetsFlesh.tw @@ -15407,9 +15407,7 @@ $He has It has a short length of chain dangling from it. <</if>> <</if>> - <<if ($activeSlave.brand != 0) && ($activeSlave.brandLocation == "belly")>> - $His fake belly has $activeSlave.brand branded on it. - <</if>> + <<= App.Desc.brand($activeSlave, "belly")>> <</if>> <<else>> <<if $showBodyMods == 1>> @@ -15484,9 +15482,7 @@ $He has <<elseif $activeSlave.abortionTat == 0 && $activeSlave.birthsTat == -1 && $activeSlave.pregKnown == 1>> $He has a single baby-shaped temporary tattoo adorning $his stomach. <</if>> - <<if ($activeSlave.brand != 0) && ($activeSlave.brandLocation == "belly")>> - $He has $activeSlave.brand branded into the flesh of $his $activeSlave.brandLocation. - <</if>> + <<= App.Desc.brand($activeSlave, "belly")>> <</if>> <<if $activeSlave.breedingMark == 1>> <<if $propOutcome == 1>> @@ -18467,13 +18463,7 @@ $His womb contains <<= num(_slaveWD.litters.length)>> separate pregnancies; <<elseif $activeSlave.abortionTat == 0 && $activeSlave.birthsTat == -1 && $activeSlave.pregKnown == 1>> $He has a single baby-shaped temporary tattoo adorning $his stomach. <</if>> - <<if ($activeSlave.brand != 0) && ($activeSlave.brandLocation == "belly")>> - $He has $activeSlave.brand branded into the flesh of $his $activeSlave.brandLocation. - <</if>> - - <<if ($activeSlave.brand != 0) && ($activeSlave.brandLocation == "belly")>> - $He has $activeSlave.brand branded into the flesh of $his $activeSlave.brandLocation. - <</if>> + <<= App.Desc.brand($activeSlave, "belly")>> <<if $activeSlave.breedingMark == 1>> <<if $propOutcome == 1>> @@ -19553,9 +19543,7 @@ $His womb contains <<= num(_slaveWD.litters.length)>> separate pregnancies; <</if>> <</if>> -<<if ($activeSlave.brand != 0) && ($activeSlave.brandLocation == "belly")>> - $He has $activeSlave.brand branded into the flesh of $his $activeSlave.brandLocation. -<</if>> +<<= App.Desc.brand($activeSlave, "belly")>> <<if $activeSlave.breedingMark == 1>> <<if $propOutcome == 1>> -- GitLab