From 27944feebe3eb4ccc102389e9187c03dee23f027 Mon Sep 17 00:00:00 2001 From: Svornost <11434-svornost@users.noreply.gitgud.io> Date: Fri, 31 Jul 2020 22:07:10 -0700 Subject: [PATCH] Global variable fixes --- js/003-data/gameVariableData.js | 1 + src/Mods/SecExp/SecExpBackwardCompatibility.tw | 3 --- .../nursery/widgets/children/childSummary.js | 10 ++++------ src/interaction/rename.js | 4 ++-- src/personalAssistant/assistant.js | 2 +- 5 files changed, 8 insertions(+), 12 deletions(-) diff --git a/js/003-data/gameVariableData.js b/js/003-data/gameVariableData.js index 96c74c650b5..807375a16cf 100644 --- a/js/003-data/gameVariableData.js +++ b/js/003-data/gameVariableData.js @@ -517,6 +517,7 @@ App.Data.resetOnNGPlus = { gainedWarfare: 0, SFIntervention: 0, rebellingID: [], + loyalID: [], saveValid: 0, lastSelection: [], diff --git a/src/Mods/SecExp/SecExpBackwardCompatibility.tw b/src/Mods/SecExp/SecExpBackwardCompatibility.tw index 969ce8f11c8..7c59d88428e 100644 --- a/src/Mods/SecExp/SecExpBackwardCompatibility.tw +++ b/src/Mods/SecExp/SecExpBackwardCompatibility.tw @@ -563,9 +563,6 @@ <<if ndef $SFIntervention>> <<set $SFIntervention = 0>> <</if>> -<<if ndef $rebellingID>> - <<set $rebellingID = []>> -<</if>> <<if ndef $saveValid>> <<set $saveValid = 0>> <</if>> diff --git a/src/facilities/nursery/widgets/children/childSummary.js b/src/facilities/nursery/widgets/children/childSummary.js index 0ba86b5aa61..655e4bdab3e 100644 --- a/src/facilities/nursery/widgets/children/childSummary.js +++ b/src/facilities/nursery/widgets/children/childSummary.js @@ -53,10 +53,8 @@ App.Facilities.Nursery.ChildSummary = function(child) { r += " "; } } - V.desc = SlaveTitle(child); - const firstLetter = V.desc.substring(0, 1).toUpperCase(); - V.desc = firstLetter + V.desc.substring(1); - r += `<strong><span class="coral">${V.desc}${abbreviate.physicals === 2? '.' : ''}</span></strong> `; + const desc = capFirstChar(SlaveTitle(child)); + r += `<strong><span class="coral">${desc}${abbreviate.physicals === 2? '.' : ''}</span></strong> `; if (V.seeRace) { r += `<span class="tan">`; if (abbreviate.race === 1) { @@ -3821,7 +3819,7 @@ App.Facilities.Nursery.ChildSummary = function(child) { } else if (child.mother === -1) { r += `Your daughter`; if (child.relationship < -1) { - res += ` & ${PCrelationshipTerm(child)}`; + r += ` & ${PCrelationshipTerm(child)}`; handled = 1; } r += " "; @@ -3844,7 +3842,7 @@ App.Facilities.Nursery.ChildSummary = function(child) { } else if (child.father === -1 && child.mother !== -1) { r += `Your daughter`; if (child.relationship < -1) { - res += ` & ${PCrelationshipTerm(child)}`; + r += ` & ${PCrelationshipTerm(child)}`; handled = 1; } r += " "; diff --git a/src/interaction/rename.js b/src/interaction/rename.js index c852ef4feb9..6785d52bfc8 100644 --- a/src/interaction/rename.js +++ b/src/interaction/rename.js @@ -115,7 +115,7 @@ App.UI.SlaveInteract.rename = function(slave, {oldName = "", oldSurname = ""} = slave.devotion += 5; slave.trust += 5; } else if (oldSurname === V.PC.slaveSurname) { - r.push(`${He}'s devastated that you'd rename ${him} something other than your name. ${He}'s <span class="trust dec">terrified</span> that you intend to discard ${him} as your slave ${V.wife}, and <span class="devotion dec">saddened</span> that you would take away something that was precious to ${him}.`); + r.push(`${He}'s devastated that you'd rename ${him} something other than your name. ${He}'s <span class="trust dec">terrified</span> that you intend to discard ${him} as your slave ${wife}, and <span class="devotion dec">saddened</span> that you would take away something that was precious to ${him}.`); slave.devotion -= 5; slave.trust -= 5; } @@ -140,7 +140,7 @@ App.UI.SlaveInteract.rename = function(slave, {oldName = "", oldSurname = ""} = r.push(`When you tell ${him} that ${he}'s to be known as ${slave.slaveName} ${slave.slaveSurname} now, ${he} nods with approval feeling <span class="trust inc">that ${he} may hold at least some value in your eyes.</span>`); slave.trust += 5; } else if (oldSurname === V.PC.slaveSurname) { - r.push(`${He} accepts that you'd rename ${him} something other than your name. ${He}'s <span class="trust dec">a little scared</span> that you intend to discard ${him} as your slave ${V.wife}, or worse, but realizes this was not only a possibility, but likely.`); + r.push(`${He} accepts that you'd rename ${him} something other than your name. ${He}'s <span class="trust dec">a little scared</span> that you intend to discard ${him} as your slave ${wife}, or worse, but realizes this was not only a possibility, but likely.`); slave.trust -= 5; } } diff --git a/src/personalAssistant/assistant.js b/src/personalAssistant/assistant.js index 848c946ec41..c00c4970e6d 100644 --- a/src/personalAssistant/assistant.js +++ b/src/personalAssistant/assistant.js @@ -17,7 +17,7 @@ globalThis.assistant = (function() { if (V.assistant.appearance === "incubus" && V.diversePronouns > 0) { o.main = {pronoun: App.Data.Pronouns.Kind.male}; o.market = {pronoun: App.Data.Pronouns.Kind.female}; - } else if (V.assistantAppearance === "succubus" && V.diversePronouns > 0) { + } else if (V.assistant.appearance === "succubus" && V.diversePronouns > 0) { o.main = {pronoun: App.Data.Pronouns.Kind.female}; o.market = {pronoun: App.Data.Pronouns.Kind.male}; } else { -- GitLab