diff --git a/src/interaction/prostheticConfig.tw b/src/interaction/prostheticConfig.tw index 268627f4fec1d2d91ae5795851b5937488839cd4..457182669062dc7ad0c76f663dfd02daf44fd252 100644 --- a/src/interaction/prostheticConfig.tw +++ b/src/interaction/prostheticConfig.tw @@ -263,7 +263,7 @@ This room is lined with shelves and cabinets, it could be easily mistaken for a <br><br> These prosthetics are in storage or already equipped by $him:<br> <<for _p range $activeSlave.readyProsthetics>> - <<= capitalizeFirstLetter(setup.prosthetics[_p.id].name)>> <br> + <<= capFirstChar(setup.prosthetics[_p.id].name)>> <br> <</for>> <</if>> @@ -272,7 +272,7 @@ Fit prosthetics to $him: <<for _p range setup.prostheticIDs>> <<if _p != "erectile">> /* exclude erectile implant */ <<if $adjustProsthetics.findIndex(function(p) {return p.id == _p && p.slaveID == $activeSlave.ID}) != -1 || $researchLab.tasks.findIndex(function(p) {return p.type == "craftFit" && p.id == _p && p.slaveID == $activeSlave.ID}) != -1>><br> - //<<= capitalizeFirstLetter(addA(setup.prosthetics[_p].name))>> is already being fitted to $him.// + //<<= capFirstChar(addA(setup.prosthetics[_p].name))>> is already being fitted to $him.// <<elseif setup.prosthetics[_p].level > $prostheticsUpgrade>><br> //You need better contracts to buy <<= addA(setup.prosthetics[_p].name)>>.// <<elseif $activeSlave.readyProsthetics.findIndex(function(p) {return p.id == _p}) == -1>> diff --git a/src/interaction/prothesticLab.tw b/src/interaction/prothesticLab.tw index 564cb33bc3a609d9622d868a0a4c95521bcf0cb4..727274503ec01b4eddfb96713d9f8f42c2401afb 100644 --- a/src/interaction/prothesticLab.tw +++ b/src/interaction/prothesticLab.tw @@ -10,7 +10,7 @@ Prosthetic Lab <<if $adjustProsthetics.length > 0>> Currently adjusting these prosthetics:<br> <<for _p range $adjustProsthetics>> - <<= capitalizeFirstLetter(setup.prosthetics[_p.id].name)>> for <<= SlaveFullName($slaves[$slaveIndices[_p.slaveID]])>><br> + <<= capFirstChar(setup.prosthetics[_p.id].name)>> for <<= SlaveFullName($slaves[$slaveIndices[_p.slaveID]])>><br> <</for>> <<else>> //Currently there are no prosthetics being fit to a slave.// @@ -147,7 +147,7 @@ Prosthetic Lab @@.red;Error: Unknown $$researchLab.tasks[].type: $researchLab.tasks[_i].type@@ <</switch>> <<set _j += $researchLab.tasks[_i].workLeft>> - @@.yellow;<<= capitalizeFirstLetter(setup.prosthetics[$researchLab.tasks[_i].id].name)>>@@. + @@.yellow;<<= capFirstChar(setup.prosthetics[$researchLab.tasks[_i].id].name)>>@@. <<if $researchLab.speed > 0>> Finished in approximately <<= (Math.floor(_j / $researchLab.speed) + 1)>> week(s). <</if>> @@ -184,13 +184,13 @@ Prosthetic Lab <<if setup.prosthetics[_p].level <= $prostheticsUpgrade>> <<capture _p>> - <<link "Reverse engineer <<= capitalizeFirstLetter(setup.prosthetics[_p].name)>>" "Prosthetic Lab">> + <<link "Reverse engineer <<= capFirstChar(setup.prosthetics[_p].name)>>" "Prosthetic Lab">> <<set cashX(forceNeg(setup.prosthetics[_p].costs), "lab"), $prosthetics[_p].research = -1, $researchLab.tasks.push({type: "research", id: _p, workLeft: setup.prosthetics[_p].research})>> <</link>> <</capture>> //Costs <<= cashFormat(setup.prosthetics[_p].costs)>> of initial investment.// <<else>> - //You need better contracts to get the needed research material for researching <<= capitalizeFirstLetter(setup.prosthetics[_p].name)>>.// + //You need better contracts to get the needed research material for researching <<= capFirstChar(setup.prosthetics[_p].name)>>.// <</if>> <br> <</if>> diff --git a/src/js/utilJS.js b/src/js/utilJS.js index b06620b5ecb8ae9e53cbef2f18073fcd31badcb1..90cc29d79687462d7f79f824725d1b6b02018bc2 100644 --- a/src/js/utilJS.js +++ b/src/js/utilJS.js @@ -1740,8 +1740,4 @@ window.addA = function(word) { return "an " + word; } return "a " + word; -} - -window.capitalizeFirstLetter = function(string) { - return string.charAt(0).toUpperCase() + string.slice(1); -} +}; \ No newline at end of file