diff --git a/src/js/assayJS.js b/src/js/assayJS.js index 7a2ca939872fce77d319f4dfd7ec7a8dbab96a87..2e97d25564d2f57542eb635e44a231c047e0a389 100644 --- a/src/js/assayJS.js +++ b/src/js/assayJS.js @@ -412,11 +412,12 @@ globalThis.getNonlocalPronouns = function(dickRatio) { /** Get the origin for a given slave, with the correct pronouns. * @param {App.Entity.SlaveState} slave + * @param {string} prop * @returns {string} */ -globalThis.getSlaveOrigins = function(slave) { +globalThis.pronounsForSlaveProp = function(slave, prop) { const pronouns = getPronouns(slave); - return slave.origin.replace(/\$([A-Z]?[a-z]+)/g, (match, cap1) => pronouns[cap1] || match); + return prop.replace(/\$([A-Z]?[a-z]+)/g, (match, cap1) => pronouns[cap1] || match); }; /** Get the written title for a given slave, without messing with global state. diff --git a/src/npc/descriptions/longSlave.js b/src/npc/descriptions/longSlave.js index bd2be1610781afaa893821ec4abfda1da4a26638..5d1e11dc13c99dca2992969026756632744b3821 100644 --- a/src/npc/descriptions/longSlave.js +++ b/src/npc/descriptions/longSlave.js @@ -169,7 +169,7 @@ App.Desc.longSlave = function({slave = V.activeSlave, saleDescription = V.saleDe if (saleDescription === 0) { if (slave.origin !== 0) { - r.push(getSlaveOrigins(slave)); + r.push(pronounsForSlaveProp(slave, slave.origin)); } } diff --git a/src/npc/descriptions/prestige.js b/src/npc/descriptions/prestige.js index 177c17dde9720c419ef227ec6ae111c20fabb5ff..a64107b3ea33215bbcb2a036addd20b9fbb652a4 100644 --- a/src/npc/descriptions/prestige.js +++ b/src/npc/descriptions/prestige.js @@ -10,7 +10,7 @@ App.Desc.prestige = function(slave) { if (slave.prestige > 0) { if (slave.prestigeDesc) { - r.push(`${slave.prestigeDesc}`); + r.push(pronounsForSlaveProp(slave, slave.prestigeDesc)); } if (slave.prestige > 2) { r.push(`<span class="green">It is extremely prestigious to own ${him}.</span>`); @@ -23,7 +23,7 @@ App.Desc.prestige = function(slave) { if (slave.porn.prestige > 0) { if (slave.porn.prestigeDesc) { - r.push(`${slave.porn.prestigeDesc}`); + r.push(pronounsForSlaveProp(slave, slave.porn.prestigeDesc)); } if (slave.porn.prestige > 2) { r.push(`As such, ${he} tends to gain a following wherever ${he} goes.`);