diff --git a/src/facilities/nursery/longChildDescription.tw b/src/facilities/nursery/longChildDescription.tw index 4a1ebb19e48f6c9c71db572756ea21e1b447ccd2..a7a4091c21c21938fa185c46006a513b28151b7b 100644 --- a/src/facilities/nursery/longChildDescription.tw +++ b/src/facilities/nursery/longChildDescription.tw @@ -684,11 +684,9 @@ is <</if>> <<if $activeChild.fuckdoll == 0>> - <<= App.Desc.brand($activeChild, "left cheek")>> - <<= App.Desc.brand($activeChild, "left ear")>> + <<= App.Desc.brand($activeChild, "cheek")>> + <<= App.Desc.brand($activeChild, "ear")>> <<= App.Desc.brand($activeChild, "neck")>> - <<= App.Desc.brand($activeChild, "right cheek")>> - <<= App.Desc.brand($activeChild, "right ear")>> <</if>> <<if $familyTesting == 1>> @@ -1175,25 +1173,16 @@ $He is <<= App.Desc.brand($activeChild, "lower back")>> /* Arms */ - <<= App.Desc.brand($activeChild, "left upper arm")>> - <<= App.Desc.brand($activeChild, "left lower arm")>> - <<= App.Desc.brand($activeChild, "left wrist")>> - <<= App.Desc.brand($activeChild, "left hand")>> - - <<= App.Desc.brand($activeChild, "right upper arm")>> - <<= App.Desc.brand($activeChild, "right lower arm")>> - <<= App.Desc.brand($activeChild, "right hand")>> - <<= App.Desc.brand($activeChild, "right wrist")>> + <<= App.Desc.brand($activeChild, "upper arm")>> + <<= App.Desc.brand($activeChild, "lower arm")>> + <<= App.Desc.brand($activeChild, "wrist")>> + <<= App.Desc.brand($activeChild, "hand")>> /* Legs */ /*buttock and thigh are displayed in descriptionWidgetsTattoos, if you can believe it */ - <<= App.Desc.brand($activeChild), "left calf")>> - <<= App.Desc.brand($activeChild), "left ankle")>> - <<= App.Desc.brand($activeChild), "left foot")>> - - <<= App.Desc.brand($activeChild), "right calf")>> - <<= App.Desc.brand($activeChild), "right ankle")>> - <<= App.Desc.brand($activeChild), "right foot")>> + <<= App.Desc.brand($activeChild), "calf")>> + <<= App.Desc.brand($activeChild), "ankle")>> + <<= App.Desc.brand($activeChild), "foot")>> <</if>> /* Opposite way of handling above, if that ever proves more conevient. This will print everything that's not on the face. The risk is that it may print things that are already printed elsewhere. */ diff --git a/src/js/descriptionWidgets.js b/src/js/descriptionWidgets.js index 37c771a001d3bab8831817e5d4d39d9851e8d28b..6a1c561852c0043d62b25003a467392b3014c52e 100644 --- a/src/js/descriptionWidgets.js +++ b/src/js/descriptionWidgets.js @@ -564,7 +564,7 @@ App.Desc.ageAndHealth = function(slave) { /** * @param {App.Entity.SlaveState} slave - * @returns {string} Slave's brand + * @returns {string} Slave's brand. Slave is the slave in question, but call the body part without modifiers. Rather than using "left breast" and "right breast" just use "breast". The function will then describe any brands on the breasts, if present, in natural language. */ App.Desc.brand = function(slave, surface) { "use strict"; @@ -579,8 +579,28 @@ App.Desc.brand = function(slave, surface) { if (surface) { /* describes a single branded body part */ if (surface === "belly" && setup.fakeBellies.includes(bellyAccessory) && slave.brand.belly) { r += `${His} fake belly has the same brand, ${slave.brand.belly}, as ${his} real one. `; - } else if (slave.brand[surface]) { - r += `${He} has ${slave.brand[surface]} branded into the flesh of ${his} ${surface}. `; + } else { + surface = App.Desc.oppositeSides(surface); + if (slave.brand[surface.center]) { // center defined, body part has no mirror. + r += `${He} has ${slave.brand[surface.center]} branded into the flesh of ${his} ${surface.center}. `; + } else { // Center not defined, body part has a mirror. + if (!slave.brand[surface.left] && !slave.brand[surface.right]) { + // no marks + } else if (slave.brand[surface.left] === slave.brand[surface.right]) { + // matching places and marks + // note that the slave.brand object won't have slave.brand["upper armS"] with an S defined, just the left and right, so we just use the left since we know they match. + r += `${He} has ${slave.brand[surface.left]} branded into the flesh of both ${his} ${surface.both}. `; + } else if (slave.brand[surface.left] && slave.brand[surface.right]) { + // matching places but different marks + r += `${He} has both ${slave.brand[surface.left]} branded into the flesh of ${his} ${surface.left}, and ${slave.brand[surface.right]} branded into ${his} ${surface.right}. `; + } else if (slave.brand[surface.left]) { + // left + r += `${He} has ${slave.brand[surface.left]} branded into the flesh of ${his} ${surface.left}. `; + } else if (slave.brand[surface.right]) { + // right + r += `${He} has ${slave.brand[surface.right]} branded into the flesh of ${his} ${surface.right}. `; + } + } } } else { /* describes all branded body parts */ for (let [key, value] of Object.entries(slave.brand)) { @@ -673,3 +693,29 @@ App.Desc.inscrip = function(slave) { } return `"I <3 ${object}"`; }; + +/** + * @param {string} surface + * @returns {object} Checks if body part has an opposite side. Returns an object with the appropriate part as center if it has no mirror, or left/right/both if it does. + */ +App.Desc.oppositeSides = function(surface) { + let parts = {}; + if (["neck", "chest", "back", "lower back", "belly", "pubic mound"].includes(surface)) { + parts.center = surface; + } else { + // set up a left part and a right to check for a mirror brand or marking + if (surface === "feet") { + parts.both = surface; + surface = "foot"; + } else if (surface === "calves") { + parts.both = surface; + surface = "calf"; + } + parts.left = "left " + surface; + parts.right = "right " + surface; + if (!parts.both) { + parts.both = surface + "s"; + } + } + return parts; +}; diff --git a/src/npc/descriptions/boobs/boobs.js b/src/npc/descriptions/boobs/boobs.js index 09869c2f8be77846bf0d38968f94b9d2def1b5cc..0e2219c712c1bb4b74984524f9d6c3d8d4a98726 100644 --- a/src/npc/descriptions/boobs/boobs.js +++ b/src/npc/descriptions/boobs/boobs.js @@ -1480,7 +1480,7 @@ App.Desc.boobsExtra = function(slave, pronouns) { App.Desc.boobsBrand = function(slave) { if (State.variables.showBodyMods === 1) { if (slave.fuckdoll === 0) { - return(App.Desc.brand(slave, "chest") + App.Desc.brand(slave, "left breast") + App.Desc.brand(slave, "right breast")); + return(App.Desc.brand(slave, "chest") + App.Desc.brand(slave, "breast")); } } }; diff --git a/src/uncategorized/longSlaveDescription.tw b/src/uncategorized/longSlaveDescription.tw index 7e36640708f9391746037d663a2e4297a5e755b3..667ece4b8fd4fe2ef9e783828661fd5d286cae4e 100644 --- a/src/uncategorized/longSlaveDescription.tw +++ b/src/uncategorized/longSlaveDescription.tw @@ -1151,11 +1151,9 @@ is <</if>> <<if $activeSlave.fuckdoll == 0>> - <<= App.Desc.brand($activeSlave, "left cheek")>> - <<= App.Desc.brand($activeSlave, "left ear")>> + <<= App.Desc.brand($activeSlave, "cheek")>> + <<= App.Desc.brand($activeSlave, "ear")>> <<= App.Desc.brand($activeSlave, "neck")>> - <<= App.Desc.brand($activeSlave, "right cheek")>> - <<= App.Desc.brand($activeSlave, "right ear")>> <</if>> <<if $familyTesting == 1>> diff --git a/src/utility/descriptionWidgetsFlesh.tw b/src/utility/descriptionWidgetsFlesh.tw index 2ace2c2c3c88a66f8f0afd0b45fa2611a85c8a2e..ff7ab99c276e4fa863a23f0146aa0ea1ff64abd0 100644 --- a/src/utility/descriptionWidgetsFlesh.tw +++ b/src/utility/descriptionWidgetsFlesh.tw @@ -3617,8 +3617,7 @@ $He's got a <<dickTatDescription>> <<dickPiercingDescription>> <<= App.Desc.brand($activeSlave, "penis")>> - <<= App.Desc.brand($activeSlave, "left testicle")>> - <<= App.Desc.brand($activeSlave, "right testicle")>> + <<= App.Desc.brand($activeSlave, "testicle")>> <</if>> <</if>> diff --git a/src/utility/descriptionWidgetsTattoos.tw b/src/utility/descriptionWidgetsTattoos.tw index bd81e81e61fdd8857d07f0b7dbb0ad701aef05d7..f020af540a09a2766204dc99ce77f4526a845383 100644 --- a/src/utility/descriptionWidgetsTattoos.tw +++ b/src/utility/descriptionWidgetsTattoos.tw @@ -44,8 +44,7 @@ $activeSlave.shouldersTat <</switch>> <</if>> - <<= App.Desc.brand($activeSlave, "left shoulder")>> - <<= App.Desc.brand($activeSlave, "right shoulder")>> + <<= App.Desc.brand($activeSlave, "shoulder")>> <</if>> <</widget>> @@ -137,8 +136,7 @@ <</switch>> <</if>> /* App.Desc.boobsBrand handles boobBrands */ - /*<<= App.Desc.brand($activeSlave, "left breast")>>*/ - /*<<= App.Desc.brand($activeSlave, "right breast")>>*/ + /*<<= App.Desc.brand($activeSlave, "breast")>>*/ <</if>> <</widget>> @@ -226,15 +224,10 @@ $activeSlave.armsTat <</switch>> <</if>> - <<= App.Desc.brand($activeSlave, "right upper arm")>> - <<= App.Desc.brand($activeSlave, "right lower arm")>> - <<= App.Desc.brand($activeSlave, "right hand")>> - <<= App.Desc.brand($activeSlave, "right wrist")>> - - <<= App.Desc.brand($activeSlave, "left upper arm")>> - <<= App.Desc.brand($activeSlave, "left lower arm")>> - <<= App.Desc.brand($activeSlave, "left wrist")>> - <<= App.Desc.brand($activeSlave, "left hand")>> + <<= App.Desc.brand($activeSlave, "upper arm")>> + <<= App.Desc.brand($activeSlave, "lower arm")>> + <<= App.Desc.brand($activeSlave, "hand")>> + <<= App.Desc.brand($activeSlave, "wrist")>> <</if>> <</widget>> @@ -431,8 +424,7 @@ $activeSlave.buttTat <</switch>> <</if>> -<<= App.Desc.brand($activeSlave, "left buttock")>> -<<= App.Desc.brand($activeSlave, "right buttock")>> +<<= App.Desc.brand($activeSlave, "buttock")>> <</if>> <</widget>> @@ -641,14 +633,9 @@ $activeSlave.legsTat <</switch>> <</if>> - <<= App.Desc.brand($activeSlave, "left thigh")>> - <<= App.Desc.brand($activeSlave, "left calf")>> - <<= App.Desc.brand($activeSlave, "left ankle")>> - <<= App.Desc.brand($activeSlave, "left foot")>> - - <<= App.Desc.brand($activeSlave, "right thigh")>> - <<= App.Desc.brand($activeSlave, "right calf")>> - <<= App.Desc.brand($activeSlave, "right ankle")>> - <<= App.Desc.brand($activeSlave, "right foot")>> + <<= App.Desc.brand($activeSlave, "thigh")>> + <<= App.Desc.brand($activeSlave, "calf")>> + <<= App.Desc.brand($activeSlave, "ankle")>> + <<= App.Desc.brand($activeSlave, "foot")>> <</if>> <</widget>>