diff --git a/devNotes/twine JS.txt b/devNotes/twine JS.txt index 8ad86dbfe60b4ff78775634c4e5e881f511ad843..a3edb5091a531e57f11b65a14e0a33762f5b93ff 100644 --- a/devNotes/twine JS.txt +++ b/devNotes/twine JS.txt @@ -7574,6 +7574,14 @@ window.properTitle = function properTitle() { else return "Ma'am"; }; +// helper function returning slave's title for PC in situations where WrittenMaster() is inappropriate +window.properMaster = function properMaster() { + const PC = State.variables.PC; + if (PC.customTitle) return PC.customTitle; + else if (PC.title !== 0) return "Master"; + else return "Mistress"; +}; + window.newSlave = function newSlave(slave) { const V = State.variables; diff --git a/src/js/assayJS.tw b/src/js/assayJS.tw index e05a98340fea65a0f4a090431e4aa33e7f4fe8e8..b4ba453632b75702523cecafab66c7e881390e9c 100644 --- a/src/js/assayJS.tw +++ b/src/js/assayJS.tw @@ -235,6 +235,14 @@ window.properTitle = function properTitle() { else return "Ma'am"; }; +// helper function returning slave's title for PC in situations where WrittenMaster() is inappropriate +window.properMaster = function properMaster() { + const PC = State.variables.PC; + if (PC.customTitle) return PC.customTitle; + else if (PC.title !== 0) return "Master"; + else return "Mistress"; +}; + window.newSlave = function newSlave(slave) { const V = State.variables;