From b083977cb5e6c62fc0311877189fa1b710bf361e Mon Sep 17 00:00:00 2001 From: Pregmodder <pregmodder@gmail.com> Date: Tue, 25 Aug 2020 18:17:42 -0400 Subject: [PATCH] fix naming --- slave variables documentation - Pregmod.txt | 4 ++ src/npc/descriptions/name.js | 61 ++++++++++++--------- 2 files changed, 38 insertions(+), 27 deletions(-) diff --git a/slave variables documentation - Pregmod.txt b/slave variables documentation - Pregmod.txt index 02f6c6253ca..39178fb9de0 100644 --- a/slave variables documentation - Pregmod.txt +++ b/slave variables documentation - Pregmod.txt @@ -5,6 +5,8 @@ slaveName: Slave's current name accepts string +-1 - copy birthName + birthName: slave's original name @@ -15,6 +17,8 @@ slaveSurname: Slave's current surname accepts string +-1 - copy birthSurname (make sure it is not "") + birthSurname: slave's original surname diff --git a/src/npc/descriptions/name.js b/src/npc/descriptions/name.js index 7afd2ff1339..a1fe8a2f789 100644 --- a/src/npc/descriptions/name.js +++ b/src/npc/descriptions/name.js @@ -10,7 +10,7 @@ App.Desc.name = function(slave) { if (slave.slaveName !== slave.birthName || slave.slaveSurname !== slave.birthSurname) { let nameLoss = 0; if (slave.fuckdoll === 0) { - if (slave.slaveName !== slave.birthName && slave.slaveSurname !== slave.birthSurname) { + if (slave.slaveName !== slave.birthName && slave.slaveSurname !== slave.birthSurname && slave.slaveSurname !== 0) { r.push(`${SlaveFullName(slave)} is not ${his} original full name;`); if (slave.birthName === "" || slave.birthSurname === "") { r.push(`whatever it was, however, has been lost forever.`); @@ -37,40 +37,47 @@ App.Desc.name = function(slave) { } } if (slave.birthName !== "" || slave.birthSurname !== "") { - if (nameLoss === 1) { - r.push(`${He}`); + if (slave.slaveName === slave.birthName && slave.birthSurname === "") { + // deadend } else { - r.push(`${he}`); - } - if (slave.devotion > 95) { - r.push(`adores ${his} slave name and affects to have forgotten that ${he} was ever called`); - } else if (slave.devotion > 50) { - r.push(`uses ${his} slave name automatically and gives no sign that ${he} was ever called`); - } else if (slave.devotion > 20) { - r.push(`uses ${his} slave name despite once being known as`); - } else if (slave.devotion >= -20) { - r.push(`uses ${his} slave name hesitantly since ${he} was once called`); - } else if (slave.devotion >= -50) { - r.push(`uses ${his} slave name with resentment since ${he} prefers ${his} original name,`); - } else { - r.push(`uses ${his} slave name only when constantly punished, since ${he} feels ${his} real name is`); - } - if (slave.slaveName !== slave.birthName && slave.slaveSurname !== slave.birthSurname) { - r.push(`${SlaveFullBirthName(slave)}.`); - } else if (slave.slaveName !== slave.birthName) { - if (slave.slaveName.endsWith(slave.birthName)) { - r.push(`just plain`); + if (nameLoss === 1) { + r.push(`${He}`); + } else { + r.push(`${he}`); + } + if (slave.devotion > 95) { + r.push(`adores ${his} slave name and affects to have forgotten that ${he} was ever called`); + } else if (slave.devotion > 50) { + r.push(`uses ${his} slave name automatically and gives no sign that ${he} was ever called`); + } else if (slave.devotion > 20) { + r.push(`uses ${his} slave name despite once being known as`); + } else if (slave.devotion >= -20) { + r.push(`uses ${his} slave name hesitantly since ${he} was once called`); + } else if (slave.devotion >= -50) { + r.push(`uses ${his} slave name with resentment since ${he} prefers ${his} original name,`); + } else { + r.push(`uses ${his} slave name only when constantly punished, since ${he} feels ${his} real name is`); + } + if (slave.slaveName !== slave.birthName && slave.slaveSurname !== slave.birthSurname) { + r.push(`${SlaveFullBirthName(slave)}.`); + } else if (slave.slaveName !== slave.birthName) { + if (slave.slaveName.endsWith(slave.birthName)) { + r.push(`just plain`); + } + r.push(`${slave.birthName}.`); + } else if (slave.slaveSurname !== slave.birthSurname) { + r.push(`${slave.birthSurname}.`); } - r.push(`${slave.birthName}.`); - } else if (slave.slaveSurname !== slave.birthSurname) { - r.push(`${slave.birthSurname}.`); } - } if (slave.slaveSurname === 0) { + } + if (slave.slaveSurname === 0) { r.push(`${He} has no surname as a slave, which ${he}`); if (slave.devotion > 95) { r.push(`loves.`); } else if (slave.devotion > 50) { r.push(`likes.`); + } else if (slave.birthSurname === "") { + r.push(`is indifferent to.`); } else if (slave.devotion > 20) { r.push(`accepts.`); } else if (slave.devotion >= -20) { -- GitLab