Skip to content
Snippets Groups Projects
Commit a633155b authored by lowercasedonkey's avatar lowercasedonkey
Browse files

svorn fix

parent d7b66209
No related branches found
No related tags found
No related merge requests found
...@@ -90,18 +90,19 @@ App.UI.SlaveInteract.rename = function(slave, {oldName = "", oldSurname = ""} = ...@@ -90,18 +90,19 @@ App.UI.SlaveInteract.rename = function(slave, {oldName = "", oldSurname = ""} =
/* Wife's surname reaction */ /* Wife's surname reaction */
if (oldSurname !== slave.slaveSurname) { if (oldSurname !== slave.slaveSurname) {
if (slave.relationship >= 5) { if (slave.relationship >= 5) {
let _i = V.slaveIndices[slave.relationshipTarget]; const slaveWife = getSlave(slave.relationshipTarget);
if (!_i) { if (!slaveWife) {
r.push(`<span class="red">Error, relationshipTarget not found.</span>`); r.push(`<span class="red">Error, relationshipTarget not found.</span>`);
} } else {
if (V.slaves[_i].slaveSurname) { if (slaveWife.slaveSurname) {
const {wife2} = getPronouns(V.slaves[_i]).appendSuffix('2'); const {wife2} = getPronouns(slaveWife).appendSuffix('2');
if (slave.slaveSurname === V.slaves[_i].slaveSurname) { if (slave.slaveSurname === slaveWife.slaveSurname) {
r.push(`${He}'s touched that ${he} now shares a surname with ${his} ${wife2} ${V.slaves[_i].slaveName} ${V.slaves[_i].slaveSurname}, and is <span class="mediumaquamarine">more confident than ever</span> that you intend to keep them together in marital bliss.`); r.push(`${He}'s touched that ${he} now shares a surname with ${his} ${wife2} ${slaveWife.slaveName} ${slaveWife.slaveSurname}, and is <span class="mediumaquamarine">more confident than ever</span> that you intend to keep them together in marital bliss.`);
slave.trust += 5; slave.trust += 5;
} else if (oldSurname === V.slaves[_i].slaveSurname) { } else if (oldSurname === slaveWife.slaveSurname) {
r.push(`${He}'s concerned that ${he} no longer shares a surname with ${his} ${wife2} ${V.slaves[_i].slaveName} ${V.slaves[_i].slaveSurname}, and is <span class="gold">very worried</span> that you might be considering splitting them up.`); r.push(`${He}'s concerned that ${he} no longer shares a surname with ${his} ${wife2} ${slaveWife.slaveName} ${slaveWife.slaveSurname}, and is <span class="gold">very worried</span> that you might be considering splitting them up.`);
slave.trust -= 5; slave.trust -= 5;
}
} }
} }
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment