diff --git a/src/npc/generate/newChildIntro.js b/src/npc/generate/newChildIntro.js index 5e8b0557b7c945ffa9f83072af11de5e81078bfa..729421996eb0946142f2741925489721aa4cb81e 100644 --- a/src/npc/generate/newChildIntro.js +++ b/src/npc/generate/newChildIntro.js @@ -5,7 +5,7 @@ App.UI.newChildIntro = function(slave) { const { His, He, his, him, he, girl, hers, himself, daughter } = getPronouns(slave); - let he2, his2, wife2, He2, himself2, mother2; + let he2, his2, wife2, He2, himself2; const el = new DocumentFragment(); let r; @@ -229,7 +229,7 @@ App.UI.newChildIntro = function(slave) { naming.append(parentNaming(tempMom)); } if (tempDad && slave.father !== slave.mother) { - naming.append(parentNaming(tempDad)); + naming.append(parentNaming(tempDad, true)); } el.append(naming); @@ -787,11 +787,11 @@ App.UI.newChildIntro = function(slave) { return el; - function parentNaming(parent) { + function parentNaming(parent, father) { console.log(parent); const el = new DocumentFragment(); ({ - he2, his2, He2, wife2, mother2 + he2, his2, He2, wife2 } = getPronouns(parent).appendSuffix("2")); if (parent.ID === V.ConcubineID) { App.UI.DOM.appendNewElement( @@ -866,7 +866,7 @@ App.UI.newChildIntro = function(slave) { "div", el, App.UI.DOM.link( - `Permit ${his} devoted ${mother2}, ${parent.slaveName}, to name ${his2} ${daughter}`, + `Permit ${his} devoted ${father ? `father`:`mother`}, ${parent.slaveName}, to name ${his2} ${daughter}`, () => { parentNames(parent, slave); slave.birthName = slave.slaveName;