diff --git a/src/002-config/fc-version.js b/src/002-config/fc-version.js index 5e322c743b7c1ed3499e6d0791b1d98647f9af49..86917d4b34807cea99329f3261a336f25142af07 100644 --- a/src/002-config/fc-version.js +++ b/src/002-config/fc-version.js @@ -2,5 +2,5 @@ App.Version = { base: "0.10.7.1", // The vanilla version the mod is based off of, this should never be changed. pmod: "4.0.0-alpha.23", commitHash: null, - release: 1186, // When getting close to 2000, please remove the check located within the onLoad() function defined at line five of src/js/eventHandlers.js. + release: 1187, // When getting close to 2000, please remove the check located within the onLoad() function defined at line five of src/js/eventHandlers.js. }; diff --git a/src/data/backwardsCompatibility/datatypeCleanup.js b/src/data/backwardsCompatibility/datatypeCleanup.js index eb155928a0f0d97565feabf185eb828255034371..6c457b108f7164fc74e520e0aad5818af3171049 100644 --- a/src/data/backwardsCompatibility/datatypeCleanup.js +++ b/src/data/backwardsCompatibility/datatypeCleanup.js @@ -249,6 +249,10 @@ App.Entity.Utils.SlaveDataSchemeCleanup = (function() { hairVector: "customHairVector" }); } + + if (!slave.custom.hasOwnProperty("name")) { + slave.custom.name = ""; + } } /** diff --git a/src/interaction/siCustom.js b/src/interaction/siCustom.js index e8e6312e3a83eea55ed43746a268a21391b7b23c..71418245b010b8bf09fbaea3c431c9c2a7e1e8ad 100644 --- a/src/interaction/siCustom.js +++ b/src/interaction/siCustom.js @@ -33,6 +33,7 @@ App.UI.SlaveInteract.custom = function(slave, refresh) { customTattoo(), customOriginStory(), customDescription(), + customSlaveTitle(), customLabel() ); @@ -635,6 +636,26 @@ App.UI.SlaveInteract.custom = function(slave, refresh) { return el; } + function customSlaveTitle() { + let el = document.createElement('p'); + el.append(`Change ${his} custom slave title: `); + el.appendChild( + App.UI.DOM.makeTextBox(slave.custom.name, + v => { + slave.custom.name = v; + refresh(); + } + ) + ); + + let choices = document.createElement('div'); + choices.className = "choices"; + choices.appendChild(App.UI.DOM.makeElement('span', ` For best results, should fit into a sentence like: '${SlaveFullName(slave)} is a "slave title"'`, 'note')); + el.appendChild(choices); + + return el; + } + function customLabel() { let el = document.createElement('p'); el.append(`Change ${his} custom label: `); diff --git a/src/js/SlaveState.js b/src/js/SlaveState.js index 4954d4c97a55ef55b1a23726ccef77dcc8e7d06e..5224aead3fbdf748b80116a71209de4b6709e2c3 100644 --- a/src/js/SlaveState.js +++ b/src/js/SlaveState.js @@ -358,6 +358,8 @@ App.Entity.SlaveCustomAddonsState = class SlaveCustomAddonsState { this.desc = ""; /** What the slave refers to you as. */ this.title = ""; + /** Replaces SlaveTitle() if set. */ + this.name = ""; /** What the slave refers to you as, with a lisp.*/ this.titleLisp = ""; /** diff --git a/src/js/utilsSlave.js b/src/js/utilsSlave.js index 336c3ec997e80ef7ed4e14719942eb47fe7d8c63..9c0c46f67e867a423c5075296437431aeb5f795a 100644 --- a/src/js/utilsSlave.js +++ b/src/js/utilsSlave.js @@ -1592,6 +1592,9 @@ globalThis.PoliteRudeTitle = function(slave) { * @returns {string} */ globalThis.SlaveTitle = function(slave, adjective = true, variability = true) { + if (slave.custom.name) { + return slave.custom.name; + } let r; if (V.newDescriptions === 1) { if (slave.dick > 0 && slave.balls > 0 && slave.boobs > 300 && slave.vagina > -1 && slave.ovaries === 1) {