diff --git a/src/js/removeActiveSlave.js b/src/js/removeActiveSlave.js index 45b14664e392d99eb35d05602acfb6b5b5abd4fa..d271a6b8d8eb05f3e9548199359f85d5897d3206 100644 --- a/src/js/removeActiveSlave.js +++ b/src/js/removeActiveSlave.js @@ -125,9 +125,7 @@ window.removeActiveSlave = function removeActiveSlave() { } if (Array.isArray(V.personalAttention)) { - const _rasi = V.personalAttention.findIndex(function(s) { - return s.ID === AS_ID; - }); + const _rasi = V.personalAttention.findIndex(function(s) {return s.ID === AS_ID;}); if (_rasi !== -1) { V.personalAttention.deleteAt(_rasi); if (V.personalAttention.length === 0) { @@ -197,9 +195,7 @@ window.removeActiveSlave = function removeActiveSlave() { } } - const _geneIndex = V.genePool.findIndex(function(s) { - return s.ID === AS_ID; - }); + const _geneIndex = V.genePool.findIndex(function(s) {return s.ID === AS_ID;}); if (_geneIndex !== -1) { let keep = false; if (V.traitor !== 0) { @@ -337,9 +333,7 @@ window.removeNonNGPSlave = function removeNonNGPSlave(removedSlave) { } }); - const _geneIndex = V.genePool.findIndex(function(s) { - return s.ID === ID; - }); + const _geneIndex = V.genePool.findIndex(function(s) {return s.ID === ID;}); if (_geneIndex !== -1) { let keep = false; if (isImpregnatedBy(V.PC, removedSlave)) { diff --git a/src/js/rulesAssistant.js b/src/js/rulesAssistant.js index 16814f68b090331e4a5e6ca0d75d02c8067f1329..9e9d855940e5b4e661588062d043cffb422a58ef 100644 --- a/src/js/rulesAssistant.js +++ b/src/js/rulesAssistant.js @@ -25,7 +25,7 @@ window.hasRuleFor = function(slave, rules, what) { * @returns {boolean} */ window.hasHColorRule = function(slave, rules) { - return hasRulefor(slave, rules, "hColor"); + return hasRuleFor(slave, rules, "hColor"); }; /** @@ -34,7 +34,7 @@ window.hasHColorRule = function(slave, rules) { * @returns {boolean} * */ window.hasHStyleRule = function(slave, rules) { - return hasRulefor(slave, rules, "hStyle"); + return hasRuleFor(slave, rules, "hStyle"); }; /** @@ -43,7 +43,7 @@ window.hasHStyleRule = function(slave, rules) { * @returns {boolean} * */ window.hasEyeColorRule = function(slave, rules) { - return hasRulefor(slave, rules, "eyeColor"); + return hasRuleFor(slave, rules, "eyeColor"); }; /** diff --git a/src/js/rulesAssistantOptions.js b/src/js/rulesAssistantOptions.js index 5fa149f5acbba6b78b4d4277a4ad082f6316f9b5..64ff79ac9da642e5f8c14fae530d0d6c0f192197 100644 --- a/src/js/rulesAssistantOptions.js +++ b/src/js/rulesAssistantOptions.js @@ -26,9 +26,7 @@ window.rulesAssistantOptions = (function() { const root = new Root(element); } - function returnP(e) { - return e.keyCode === 13; - } + function returnP(e) {return e.keyCode === 13;} function newRule(root) { const rule = emptyDefaultRule(); @@ -174,9 +172,7 @@ window.rulesAssistantOptions = (function() { data.forEach(item => this.appendChild(new ListItem(...item))); } - createEditor(...args) { - return null; - } + createEditor(...args) {return null;} render(prefix, editor, ...args) { const elem = document.createElement("div"); @@ -208,14 +204,10 @@ window.rulesAssistantOptions = (function() { this.value.innerHTML = `${what}`; } - getData(what) { - return (this.value.tagName === "INPUT" ? this.parse(this.value.value) : this.selectedItem.data); - } + getData(what) {return (this.value.tagName === "INPUT" ? this.parse(this.value.value) : this.selectedItem.data);} // customizable input field parser / sanity checker - parse(what) { - return what; - } + parse(what) {return what;} propagateChange() { if (this.onchange instanceof Function) @@ -286,9 +278,7 @@ window.rulesAssistantOptions = (function() { return res; } - parse(what) { - return what === "" ? this.nullValue : parseInt(what); - } + parse(what) {return what === "" ? this.nullValue : parseInt(what);} } // a way to organize lists with too many elements in subsections @@ -667,17 +657,11 @@ window.rulesAssistantOptions = (function() { this.show_custom_editor(CustomEditor, current_rule.condition.data); } else if (this.betweenP(value)) { current_rule.condition.function = "between"; - current_rule.condition.data = { - attribute: value, - value: [null, null] - }; + current_rule.condition.data = {attribute: value, value: [null, null]}; this.show_custom_editor(RangeEditor, current_rule.condition.function, current_rule.condition.data); } else if (this.belongsP(value)) { current_rule.condition.function = "belongs"; - current_rule.condition.data = { - attribute: value, - value: [] - }; + current_rule.condition.data = {attribute: value, value: []}; this.show_custom_editor(ItemEditor, current_rule.condition.function, current_rule.condition.data); } } @@ -914,9 +898,7 @@ window.rulesAssistantOptions = (function() { current_rule.condition.selectedSlaves.includes(slave.ID)))); } - onchange() { - current_rule.condition.selectedSlaves = this.getSelection(); - } + onchange() {current_rule.condition.selectedSlaves = this.getSelection();} } class SlaveExclusion extends ButtonList { @@ -928,9 +910,7 @@ window.rulesAssistantOptions = (function() { current_rule.condition.excludedSlaves.includes(slave.ID)))); } - onchange() { - current_rule.condition.excludedSlaves = this.getSelection(); - } + onchange() {current_rule.condition.excludedSlaves = this.getSelection();} } // parent section for effect editing @@ -1293,7 +1273,9 @@ window.rulesAssistantOptions = (function() { this.appendChild(nice); const hcollars = []; - setup.harshCollars.forEach(item => {if (item.fs === "seeAge" && V.seeAge === 0) return; else if (item.fs === "seePreg" && V.seePreg === 0) return; + setup.harshCollars.forEach(item => { + if (item.fs === "seeAge" && V.seeAge === 0) return; + else if (item.fs === "seePreg" && V.seePreg === 0) return; else if (item.rs === "buyGag" && V.toysBoughtGags !== 1) return; else hcollars.push([item.name, item.value]); }); diff --git a/src/js/slaveSummaryWidgets.js b/src/js/slaveSummaryWidgets.js index fac4f0c67c0b7fea5da08ca85e1648cea2bcd001..97643d4fbacf07a8d96bb1d717bdb8bc45295f8a 100644 --- a/src/js/slaveSummaryWidgets.js +++ b/src/js/slaveSummaryWidgets.js @@ -5394,7 +5394,7 @@ App.UI.slaveSummaryList = function(passageName) { else if (App.Data.Facilities.armory.manager.assignment === _Slave.assignment) res.push('<strong><span class="lightcoral">BG</span></strong> '); if (Array.isArray(V.personalAttention) && V.personalAttention.findIndex(s => s.ID === _Slave.ID) !== -1) { - res.push('<strong></span>."lightcoral"; PA</span></strong> '); + res.push('<strong><span class="lightcoral"> PA</span></strong> '); } res.push(this.passageLink(_slaveName, 'Slave Interact', `$activeSlave = $slaves[${_ssi}]`)); /* lists their names */ break; @@ -5419,9 +5419,9 @@ App.UI.slaveSummaryList = function(passageName) { case "New Game Plus": res.push(dividerAndImage(_Slave)); if (V.SlaveSummaryFiler === "assignable") { - res.push(`__''</span>.pink;${_Slave.slaveName}</span>''__`); + res.push(`__''<span class="pink">${_Slave.slaveName}</span>''__`); } else { - res.push(`__''</span>.pink;${_Slave.slaveName}</span>''__`); + res.push(`__''<span class="pink">${_Slave.slaveName}</span>''__`); } break; case "Rules Slave Select": @@ -5527,7 +5527,7 @@ App.UI.slaveSummaryList = function(passageName) { case "Recruiter Select": if (setup.recruiterCareers.includes(_Slave.career) || (_Slave.skill.recruiter >= V.masteredXP)) { res.push(`<br>${ V.seeImages !== 1 || V.seeSummaryImages !== 1 || V.imageChoice === 1}` ? ' ' : ''); - res.push('</span>.lime;Has applicable career experience.</span>'); + res.push('<span class="lime">Has applicable career experience.</span>'); } break; case "New Game Plus": diff --git a/src/js/storyJS.js b/src/js/storyJS.js index 20fa7d554b6b47b442250d0ffd10c7308b0472eb..9d0e5a88cdc3ba26238ffc83123083d006e92c4e 100644 --- a/src/js/storyJS.js +++ b/src/js/storyJS.js @@ -347,8 +347,7 @@ window.repGainSacrifice = function(slave, arcology) { return 0; } return Math.ceil( - (Math.min(100, Math.pow(1.0926, State.variables.week - slave.weekAcquired)) + slave.prestige * 30) * - arcology.FSAztecRevivalist / 100 / ((State.variables.slavesSacrificedThisWeek || 0) + 1)); + (Math.min(100, Math.pow(1.0926, State.variables.week - slave.weekAcquired)) + slave.prestige * 30) * arcology.FSAztecRevivalist / 100 / ((State.variables.slavesSacrificedThisWeek || 0) + 1)); }; /** @@ -385,12 +384,12 @@ window.ngUpdateMissingTable = function(missingTable) { const newTable = {}; (State.variables.slaves || []) - .forEach(s => ([s.pregSource + 1200000, s.mother + 1200000, s.father + 1200000] - .filter(i => (i in missingTable)) - .forEach(i => { - newTable[i - 1200000] = missingTable[i]; - newTable[i - 1200000].ID -= 1200000; - }))); + .forEach(s => ([s.pregSource + 1200000, s.mother + 1200000, s.father + 1200000] + .filter(i => (i in missingTable)) + .forEach(i => { + newTable[i - 1200000] = missingTable[i]; + newTable[i - 1200000].ID -= 1200000; + }))); return newTable; }; diff --git a/src/js/utilJS.js b/src/js/utilJS.js index 16285cc2492e8c6ce9d9c6ab61872ac3c6306e97..3e8fac813c1c6e6ead9964e3665fdfd18d0da063 100644 --- a/src/js/utilJS.js +++ b/src/js/utilJS.js @@ -98,9 +98,443 @@ window.Height = (function() { }; /* if you can find an average for an undefined, add it in! */ - const xxMeanHeight = {"Afghan": 155.08, "Albanian": 161.77, "Algerian": 159.09, "American.asian": 158.4, "American.black": 163.6, "American.latina": 158.9, "American.white": 165, "American": 163.54, "Andorran": 162.90, "Angolan": 157.31, "Antiguan": 160.65, "Argentinian": 159.18, "Armenian": 158.09, "Aruban": 158, "Australian": 165.86, "Austrian": 164.62, "Azerbaijani": 158.25, "Bahamian": 160.68, "Bahraini": 156.69, "Bangladeshi": 150.79, "Barbadian": 165.28, "Belarusian": 166.35, "Belgian": 165.49, "Belizean": 156.88, "Beninese": 156.16, "Bermudian": 160.69, "Bhutanese": 153.63, "Bissau-Guinean": 158.24, "Bolivian": 153.89, "Bosnian": 165.85, "Brazilian": 160.86, "British": 164.40, "Bruneian": 153.98, "Bulgarian": 164.80, "Burkinabé": 160.19, "Burmese": 154.37, "Burundian": 154.02, "Cambodian": 152.91, "Cameroonian": 158.82, "Canadian": 163.91, "Cape Verdean": 161.65, "Catalan": 163.4, "Central African": 158.04, "Chadian": 160.17, "Chilean": 159.36, "Chinese": 159.71, "Colombian": 156.85, "Comorian": 155.58, "Congolese": 157.57, "a Cook Islander": 163.19, "Costa Rican": 156.37, "Croatian": 165.63, "Cuban": 157.98, "Curaçaoan": 158, "Cypriot": 162.27, "Czech": 168.46, "Danish": 167.21, "Djiboutian": 156.11, "Dominican": 159.03, "Dominiquais": 164.34, "Dutch": 168.72, "East Timorese": 151.15, "Ecuadorian": 154.23, "Egyptian": 157.33, "Emirati": 158.68, "Equatoguinean": 157.33, "Eritrean": 156.39, "Estonian": 168.67, "Ethiopian": 155.71, "Fijian": 161.69, "Filipina": 149.60, "Finnish": 165.90, "French Guianan": 157, "French Polynesian": 164.52, "French": 164.88, "Gabonese": 158.84, "Gambian": 160.93, "Georgian": 162.98, "German": 165.86, "Ghanan": 157.91, "Greek": 164.87, "Greenlandic": 161.55, "Grenadian": 164.51, "Guamanian": 153.7, "Guatemalan": 149.39, "Guinean": 157.80, "Guyanese": 157.92, "Haitian": 158.72, "Honduran": 153.84, "Hungarian": 163.66, "I-Kiribati": 157.00, "Icelandic": 165.95, "Indian": 152.59, "Indonesian": 152.80, "Iranian": 159.67, "Iraqi": 158.67, "Irish": 165.11, "Israeli": 161.80, "Italian": 164.61, "Ivorian": 158.07, "Jamaican": 163.12, "Japanese": 158.31, "Jordanian": 158.83, "Kazakh": 158.58, "Kenyan": 158.16, "Kittitian": 159.20, "Korean": 160.65, "Kosovan": 165.7, "Kurdish": 165, "Kuwaiti": 159.43, "Kyrgyz": 159.35, "Laotian": 151.28, "Latvian": 169.80, "Lebanese": 162.43, "Liberian": 157.3, "Libyan": 162.08, "a Liechtensteiner": 164.3, "Lithuanian": 166.61, "Luxembourgian": 164.43, "Macedonian": 159.75, "Malagasy": 151.18, "Malawian": 154.40, "Malaysian": 156.30, "Maldivian": 155.02, "Malian": 160.47, "Maltese": 160.85, "Marshallese": 151.31, "Mauritanian": 157.72, "Mauritian": 157.24, "Mexican": 156.85, "Micronesian": 156.09, "Moldovan": 163.24, "Monégasque": 164.61, "Mongolian": 158.22, "Montenegrin": 164.86, "Moroccan": 157.82, "Mosotho": 155.71, "Motswana": 161.38, "Mozambican": 153.96, "Namibian": 158.78, "Nauruan": 153.98, "Nepalese": 150.86, "New Caledonian": 158.0, "a New Zealander": 164.94, "Ni-Vanuatu": 158.17, "Nicaraguan": 154.39, "Nigerian": 156.32, "Nigerien": 158.25, "Niuean": 164.80, "Norwegian": 165.56, "Omani": 157.19, "Pakistani": 153.84, "Palauan": 156.22, "Palestinian": 158.75, "Panamanian": 155.47, "Papua New Guinean": 154.87, "Paraguayan": 159.86, "Peruvian": 152.93, "Polish": 164.59, "Portuguese": 163.04, "Puerto Rican": 159.20, "Qatari": 159.38, "Romanian": 162.73, "Russian": 165.27, "Rwandan": 154.79, "Sahrawi": 157.82, "Saint Lucian": 162.31, "Salvadoran": 154.55, "Sammarinese": 164.61, "Samoan": 161.97, "São Toméan": 158.91, "Saudi": 155.88, "Scottish": 163, "Senegalese": 162.52, "Serbian": 167.69, "Seychellois": 162.08, "Sierra Leonean": 156.60, "Singaporean": 160.32, "Slovak": 167.47, "Slovene": 166.05, "a Solomon Islander": 154.42, "Somali": 156.06, "South African": 158.03, "South Sudanese": 169.0, "Spanish": 163.40, "Sri Lankan": 154.56, "Sudanese": 156.04, "Surinamese": 160.66, "Swazi": 158.64, "Swedish": 165.70, "Swiss": 163.45, "Syrian": 158.65, "Taiwanese": 161.45, "Tajik": 157.33, "Tanzanian": 156.6, "Thai": 157.87, "Tibetan": 158.75, "Togolese": 158.30, "Tongan": 165.52, "Trinidadian": 160.64, "Tunisian": 160.35, "Turkish": 160.50, "Turkmen": 161.73, "Tuvaluan": 158.10, "Ugandan": 156.72, "Ukrainian": 166.34, "Uruguayan": 162.13, "Uzbek": 157.82, "Vatican": 162.5, "Venezuelan": 157.44, "Vietnamese": 153.59, "Vincentian": 160.70, "Yemeni": 153.97, "Zairian": 155.25, "Zambian": 155.82, "Zimbabwean": 158.22, "": 159.65, // default + const xxMeanHeight = { + "Afghan": 155.08, + "Albanian": 161.77, + "Algerian": 159.09, + "American.asian": 158.4, + "American.black": 163.6, + "American.latina": 158.9, + "American.white": 165, + "American": 163.54, + "Andorran": 162.90, + "Angolan": 157.31, + "Antiguan": 160.65, + "Argentinian": 159.18, + "Armenian": 158.09, + "Aruban": 158, + "Australian": 165.86, + "Austrian": 164.62, + "Azerbaijani": 158.25, + "Bahamian": 160.68, + "Bahraini": 156.69, + "Bangladeshi": 150.79, + "Barbadian": 165.28, + "Belarusian": 166.35, + "Belgian": 165.49, + "Belizean": 156.88, + "Beninese": 156.16, + "Bermudian": 160.69, + "Bhutanese": 153.63, + "Bissau-Guinean": 158.24, + "Bolivian": 153.89, + "Bosnian": 165.85, + "Brazilian": 160.86, + "British": 164.40, + "Bruneian": 153.98, + "Bulgarian": 164.80, + "Burkinabé": 160.19, + "Burmese": 154.37, + "Burundian": 154.02, + "Cambodian": 152.91, + "Cameroonian": 158.82, + "Canadian": 163.91, + "Cape Verdean": 161.65, + "Catalan": 163.4, + "Central African": 158.04, + "Chadian": 160.17, + "Chilean": 159.36, + "Chinese": 159.71, + "Colombian": 156.85, + "Comorian": 155.58, + "Congolese": 157.57, + "a Cook Islander": 163.19, + "Costa Rican": 156.37, + "Croatian": 165.63, + "Cuban": 157.98, + "Curaçaoan": 158, + "Cypriot": 162.27, + "Czech": 168.46, + "Danish": 167.21, + "Djiboutian": 156.11, + "Dominican": 159.03, + "Dominiquais": 164.34, + "Dutch": 168.72, + "East Timorese": 151.15, + "Ecuadorian": 154.23, + "Egyptian": 157.33, + "Emirati": 158.68, + "Equatoguinean": 157.33, + "Eritrean": 156.39, + "Estonian": 168.67, + "Ethiopian": 155.71, + "Fijian": 161.69, + "Filipina": 149.60, + "Finnish": 165.90, + "French Guianan": 157, + "French Polynesian": 164.52, + "French": 164.88, + "Gabonese": 158.84, + "Gambian": 160.93, + "Georgian": 162.98, + "German": 165.86, + "Ghanan": 157.91, + "Greek": 164.87, + "Greenlandic": 161.55, + "Grenadian": 164.51, + "Guamanian": 153.7, + "Guatemalan": 149.39, + "Guinean": 157.80, + "Guyanese": 157.92, + "Haitian": 158.72, + "Honduran": 153.84, + "Hungarian": 163.66, + "I-Kiribati": 157.00, + "Icelandic": 165.95, + "Indian": 152.59, + "Indonesian": 152.80, + "Iranian": 159.67, + "Iraqi": 158.67, + "Irish": 165.11, + "Israeli": 161.80, + "Italian": 164.61, + "Ivorian": 158.07, + "Jamaican": 163.12, + "Japanese": 158.31, + "Jordanian": 158.83, + "Kazakh": 158.58, + "Kenyan": 158.16, + "Kittitian": 159.20, + "Korean": 160.65, + "Kosovan": 165.7, + "Kurdish": 165, + "Kuwaiti": 159.43, + "Kyrgyz": 159.35, + "Laotian": 151.28, + "Latvian": 169.80, + "Lebanese": 162.43, + "Liberian": 157.3, + "Libyan": 162.08, + "a Liechtensteiner": 164.3, + "Lithuanian": 166.61, + "Luxembourgian": 164.43, + "Macedonian": 159.75, + "Malagasy": 151.18, + "Malawian": 154.40, + "Malaysian": 156.30, + "Maldivian": 155.02, + "Malian": 160.47, + "Maltese": 160.85, + "Marshallese": 151.31, + "Mauritanian": 157.72, + "Mauritian": 157.24, + "Mexican": 156.85, + "Micronesian": 156.09, + "Moldovan": 163.24, + "Monégasque": 164.61, + "Mongolian": 158.22, + "Montenegrin": 164.86, + "Moroccan": 157.82, + "Mosotho": 155.71, + "Motswana": 161.38, + "Mozambican": 153.96, + "Namibian": 158.78, + "Nauruan": 153.98, + "Nepalese": 150.86, + "New Caledonian": 158.0, + "a New Zealander": 164.94, + "Ni-Vanuatu": 158.17, + "Nicaraguan": 154.39, + "Nigerian": 156.32, + "Nigerien": 158.25, + "Niuean": 164.80, + "Norwegian": 165.56, + "Omani": 157.19, + "Pakistani": 153.84, + "Palauan": 156.22, + "Palestinian": 158.75, + "Panamanian": 155.47, + "Papua New Guinean": 154.87, + "Paraguayan": 159.86, + "Peruvian": 152.93, + "Polish": 164.59, + "Portuguese": 163.04, + "Puerto Rican": 159.20, + "Qatari": 159.38, + "Romanian": 162.73, + "Russian": 165.27, + "Rwandan": 154.79, + "Sahrawi": 157.82, + "Saint Lucian": 162.31, + "Salvadoran": 154.55, + "Sammarinese": 164.61, + "Samoan": 161.97, + "São Toméan": 158.91, + "Saudi": 155.88, + "Scottish": 163, + "Senegalese": 162.52, + "Serbian": 167.69, + "Seychellois": 162.08, + "Sierra Leonean": 156.60, + "Singaporean": 160.32, + "Slovak": 167.47, + "Slovene": 166.05, + "a Solomon Islander": 154.42, + "Somali": 156.06, + "South African": 158.03, + "South Sudanese": 169.0, + "Spanish": 163.40, + "Sri Lankan": 154.56, + "Sudanese": 156.04, + "Surinamese": 160.66, + "Swazi": 158.64, + "Swedish": 165.70, + "Swiss": 163.45, + "Syrian": 158.65, + "Taiwanese": 161.45, + "Tajik": 157.33, + "Tanzanian": 156.6, + "Thai": 157.87, + "Tibetan": 158.75, + "Togolese": 158.30, + "Tongan": 165.52, + "Trinidadian": 160.64, + "Tunisian": 160.35, + "Turkish": 160.50, + "Turkmen": 161.73, + "Tuvaluan": 158.10, + "Ugandan": 156.72, + "Ukrainian": 166.34, + "Uruguayan": 162.13, + "Uzbek": 157.82, + "Vatican": 162.5, + "Venezuelan": 157.44, + "Vietnamese": 153.59, + "Vincentian": 160.70, + "Yemeni": 153.97, + "Zairian": 155.25, + "Zambian": 155.82, + "Zimbabwean": 158.22, + "": 159.65, // default }; - const xyMeanHeight = {"Afghan": 165.26, "Albanian": 173.39, "Algerian": 170.07, "American.asian": 172.5, "American.black": 177.4, "American.latina": 172.5, "American.white": 178.2, "American": 177.13, "Andorran": 176.06, "Angolan": 167.31, "Antiguan": 164.8, "Argentinian": 174.62, "Armenian": 172.00, "Aruban": 165.1, "Australian": 179.20, "Austrian": 177.41, "Azerbaijani": 169.75, "Bahamian": 172.75, "Bahraini": 167.74, "Bangladeshi": 163.81, "Barbadian": 175.92, "Belarusian": 178.44, "Belgian": 181.70, "Belizean": 168.73, "Beninese": 167.06, "Bermudian": 172.69, "Bhutanese": 165.31, "Bissau-Guinean": 167.90, "Bolivian": 166.85, "Bosnian": 180.87, "Brazilian": 173.55, "British": 177.49, "Bruneian": 165.01, "Bulgarian": 178.24, "Burkinabé": 169.33, "Burmese": 164.67, "Burundian": 166.64, "Cambodian": 163.33, "Cameroonian": 167.82, "Canadian": 178.09, "Cape Verdean": 173.22, "Catalan": 175.8, "Central African": 166.67, "Chadian": 170.44, "Chilean": 171.81, "Chinese": 171.83, "Colombian": 169.50, "Comorian": 166.19, "Congolese": 167.45, "a Cook Islander": 174.77, "Costa Rican": 168.93, "Croatian": 180.78, "Cuban": 172.00, "Curaçaoan": 165.1, "Cypriot": 174.99, "Czech": 180.10, "Danish": 181.39, "Djiboutian": 166.57, "Dominican": 172.75, "Dominiquais": 176.31, "Dutch": 182.54, "East Timorese": 159.79, "Ecuadorian": 167.08, "Egyptian": 166.68, "Emirati": 170.46, "Equatoguinean": 167.36, "Eritrean": 168.36, "Estonian": 181.59, "Ethiopian": 166.23, "Fijian": 173.90, "Filipina": 163.23, "Finnish": 179.59, "French Guianan": 168, "French Polynesian": 177.41, "French": 179.74, "Gabonese": 167.94, "Gambian": 165.40, "Georgian": 174.34, "German": 179.88, "Ghanan": 168.85, "Greek": 177.32, "Greenlandic": 174.87, "Grenadian": 176.97, "Guamanian": 169.8, "Guatemalan": 163.41, "Guinean": 167.54, "Guyanese": 170.21, "Haitian": 172.64, "Honduran": 166.39, "Hungarian": 177.26, "I-Kiribati": 169.20, "Icelandic": 180.49, "Indian": 164.95, "Indonesian": 163.55, "Iranian": 170.3, "Iraqi": 170.43, "Irish": 178.93, "Israeli": 176.86, "Italian": 177.77, "Ivorian": 166.53, "Jamaican": 174.53, "Japanese": 170.82, "Jordanian": 171.03, "Kazakh": 171.14, "Kenyan": 169.64, "Kittitian": 169.62, "Korean": 173.46, "Kosovan": 179.5, "Kurdish": 175, "Kuwaiti": 172.07, "Kyrgyz": 171.24, "Laotian": 160.52, "Latvian": 181.42, "Lebanese": 174.39, "Liberian": 163.66, "Libyan": 173.53, "a Liechtensteiner": 175.4, "Lithuanian": 179.03, "Luxembourgian": 177.86, "Macedonian": 178.33, "Malagasy": 161.55, "Malawian": 166, "Malaysian": 167.89, "Maldivian": 167.68, "Malian": 171.3, "Maltese": 173.32, "Marshallese": 162.81, "Mauritanian": 163.28, "Mauritian": 170.50, "Mexican": 169.01, "Micronesian": 168.51, "Moldovan": 175.49, "Monégasque": 177.77, "Mongolian": 169.07, "Montenegrin": 178.28, "Moroccan": 170.40, "Mosotho": 165.59, "Motswana": 171.63, "Mozambican": 164.80, "Namibian": 166.96, "Nauruan": 167.83, "Nepalese": 162.32, "New Caledonian": 171.0, "a New Zealander": 177.74, "Ni-Vanuatu": 168.09, "Nicaraguan": 166.71, "Nigerian": 165.91, "Nigerien": 167.68, "Niuean": 175.83, "Norwegian": 179.75, "Omani": 169.16, "Pakistani": 166.95, "Palauan": 167.69, "Palestinian": 172.09, "Panamanian": 168.49, "Papua New Guinean": 163.57, "Paraguayan": 172.83, "Peruvian": 165.23, "Polish": 177.33, "Portuguese": 172.93, "Puerto Rican": 172.08, "Qatari": 170.48, "Romanian": 174.74, "Russian": 176.46, "Rwandan": 162.68, "Sahrawi": 170.40, "Saint Lucian": 171.95, "Salvadoran": 169.77, "Sammarinese": 177.77, "Samoan": 174.38, "São Toméan": 167.38, "Saudi": 167.67, "Scottish": 177.6, "Senegalese": 173.14, "Serbian": 180.57, "Seychellois": 174.21, "Sierra Leonean": 164.41, "Singaporean": 172.57, "Slovak": 179.50, "Slovene": 179.80, "a Solomon Islander": 164.14, "Somali": 166.60, "South African": 166.68, "South Sudanese": 175.9, "Spanish": 176.59, "Sri Lankan": 165.69, "Sudanese": 166.63, "Surinamese": 172.72, "Swazi": 168.13, "Swedish": 179.74, "Swiss": 178.42, "Syrian": 170.43, "Taiwanese": 174.52, "Tajik": 171.26, "Tanzanian": 164.80, "Thai": 169.16, "Tibetan": 168.91, "Togolese": 168.33, "Tongan": 176.76, "Trinidadian": 173.74, "Tunisian": 173.95, "Turkish": 174.21, "Turkmen": 171.97, "Tuvaluan": 169.64, "Ugandan": 165.62, "Ukrainian": 178.46, "Uruguayan": 173.43, "Uzbek": 169.38, "Vatican": 176.5, "Venezuelan": 171.59, "Vietnamese": 164.45, "Vincentian": 172.78, "Yemeni": 159.89, "Zairian": 166.80, "Zambian": 166.52, "Zimbabwean": 168.59, "": 171.42, // defaults + const xyMeanHeight = { + "Afghan": 165.26, + "Albanian": 173.39, + "Algerian": 170.07, + "American.asian": 172.5, + "American.black": 177.4, + "American.latina": 172.5, + "American.white": 178.2, + "American": 177.13, + "Andorran": 176.06, + "Angolan": 167.31, + "Antiguan": 164.8, + "Argentinian": 174.62, + "Armenian": 172.00, + "Aruban": 165.1, + "Australian": 179.20, + "Austrian": 177.41, + "Azerbaijani": 169.75, + "Bahamian": 172.75, + "Bahraini": 167.74, + "Bangladeshi": 163.81, + "Barbadian": 175.92, + "Belarusian": 178.44, + "Belgian": 181.70, + "Belizean": 168.73, + "Beninese": 167.06, + "Bermudian": 172.69, + "Bhutanese": 165.31, + "Bissau-Guinean": 167.90, + "Bolivian": 166.85, + "Bosnian": 180.87, + "Brazilian": 173.55, + "British": 177.49, + "Bruneian": 165.01, + "Bulgarian": 178.24, + "Burkinabé": 169.33, + "Burmese": 164.67, + "Burundian": 166.64, + "Cambodian": 163.33, + "Cameroonian": 167.82, + "Canadian": 178.09, + "Cape Verdean": 173.22, + "Catalan": 175.8, + "Central African": 166.67, + "Chadian": 170.44, + "Chilean": 171.81, + "Chinese": 171.83, + "Colombian": 169.50, + "Comorian": 166.19, + "Congolese": 167.45, + "a Cook Islander": 174.77, + "Costa Rican": 168.93, + "Croatian": 180.78, + "Cuban": 172.00, + "Curaçaoan": 165.1, + "Cypriot": 174.99, + "Czech": 180.10, + "Danish": 181.39, + "Djiboutian": 166.57, + "Dominican": 172.75, + "Dominiquais": 176.31, + "Dutch": 182.54, + "East Timorese": 159.79, + "Ecuadorian": 167.08, + "Egyptian": 166.68, + "Emirati": 170.46, + "Equatoguinean": 167.36, + "Eritrean": 168.36, + "Estonian": 181.59, + "Ethiopian": 166.23, + "Fijian": 173.90, + "Filipina": 163.23, + "Finnish": 179.59, + "French Guianan": 168, + "French Polynesian": 177.41, + "French": 179.74, + "Gabonese": 167.94, + "Gambian": 165.40, + "Georgian": 174.34, + "German": 179.88, + "Ghanan": 168.85, + "Greek": 177.32, + "Greenlandic": 174.87, + "Grenadian": 176.97, + "Guamanian": 169.8, + "Guatemalan": 163.41, + "Guinean": 167.54, + "Guyanese": 170.21, + "Haitian": 172.64, + "Honduran": 166.39, + "Hungarian": 177.26, + "I-Kiribati": 169.20, + "Icelandic": 180.49, + "Indian": 164.95, + "Indonesian": 163.55, + "Iranian": 170.3, + "Iraqi": 170.43, + "Irish": 178.93, + "Israeli": 176.86, + "Italian": 177.77, + "Ivorian": 166.53, + "Jamaican": 174.53, + "Japanese": 170.82, + "Jordanian": 171.03, + "Kazakh": 171.14, + "Kenyan": 169.64, + "Kittitian": 169.62, + "Korean": 173.46, + "Kosovan": 179.5, + "Kurdish": 175, + "Kuwaiti": 172.07, + "Kyrgyz": 171.24, + "Laotian": 160.52, + "Latvian": 181.42, + "Lebanese": 174.39, + "Liberian": 163.66, + "Libyan": 173.53, + "a Liechtensteiner": 175.4, + "Lithuanian": 179.03, + "Luxembourgian": 177.86, + "Macedonian": 178.33, + "Malagasy": 161.55, + "Malawian": 166, + "Malaysian": 167.89, + "Maldivian": 167.68, + "Malian": 171.3, + "Maltese": 173.32, + "Marshallese": 162.81, + "Mauritanian": 163.28, + "Mauritian": 170.50, + "Mexican": 169.01, + "Micronesian": 168.51, + "Moldovan": 175.49, + "Monégasque": 177.77, + "Mongolian": 169.07, + "Montenegrin": 178.28, + "Moroccan": 170.40, + "Mosotho": 165.59, + "Motswana": 171.63, + "Mozambican": 164.80, + "Namibian": 166.96, + "Nauruan": 167.83, + "Nepalese": 162.32, + "New Caledonian": 171.0, + "a New Zealander": 177.74, + "Ni-Vanuatu": 168.09, + "Nicaraguan": 166.71, + "Nigerian": 165.91, + "Nigerien": 167.68, + "Niuean": 175.83, + "Norwegian": 179.75, + "Omani": 169.16, + "Pakistani": 166.95, + "Palauan": 167.69, + "Palestinian": 172.09, + "Panamanian": 168.49, + "Papua New Guinean": 163.57, + "Paraguayan": 172.83, + "Peruvian": 165.23, + "Polish": 177.33, + "Portuguese": 172.93, + "Puerto Rican": 172.08, + "Qatari": 170.48, + "Romanian": 174.74, + "Russian": 176.46, + "Rwandan": 162.68, + "Sahrawi": 170.40, + "Saint Lucian": 171.95, + "Salvadoran": 169.77, + "Sammarinese": 177.77, + "Samoan": 174.38, + "São Toméan": 167.38, + "Saudi": 167.67, + "Scottish": 177.6, + "Senegalese": 173.14, + "Serbian": 180.57, + "Seychellois": 174.21, + "Sierra Leonean": 164.41, + "Singaporean": 172.57, + "Slovak": 179.50, + "Slovene": 179.80, + "a Solomon Islander": 164.14, + "Somali": 166.60, + "South African": 166.68, + "South Sudanese": 175.9, + "Spanish": 176.59, + "Sri Lankan": 165.69, + "Sudanese": 166.63, + "Surinamese": 172.72, + "Swazi": 168.13, + "Swedish": 179.74, + "Swiss": 178.42, + "Syrian": 170.43, + "Taiwanese": 174.52, + "Tajik": 171.26, + "Tanzanian": 164.80, + "Thai": 169.16, + "Tibetan": 168.91, + "Togolese": 168.33, + "Tongan": 176.76, + "Trinidadian": 173.74, + "Tunisian": 173.95, + "Turkish": 174.21, + "Turkmen": 171.97, + "Tuvaluan": 169.64, + "Ugandan": 165.62, + "Ukrainian": 178.46, + "Uruguayan": 173.43, + "Uzbek": 169.38, + "Vatican": 176.5, + "Venezuelan": 171.59, + "Vietnamese": 164.45, + "Vincentian": 172.78, + "Yemeni": 159.89, + "Zairian": 166.80, + "Zambian": 166.52, + "Zimbabwean": 168.59, + "": 171.42, // defaults }; // Helper method - table lookup for nationality/race combinations @@ -677,7 +1111,7 @@ window.budgetLine = function(category, title) { </td>\ <td>\ <<if (${expenses}.${category}) < 0>>\ - <span class="red">-<<print cashFormat(Math.abs(${expenses}.${category}))>>\ + <span class="red">-<<print cashFormat(Math.abs(${expenses}.${category}))>></span>\ <<else>>\ <<print cashFormat(${expenses}.${category})>>\ <</if>>\ @@ -1470,13 +1904,19 @@ window.upgradeMultiplierTrade = function() { }; window.jsNdef = function(input) { - if (typeof input === "undefined") return true; - else return false; + if (typeof input === "undefined") { + return true; + } else { + return false; + } }; window.jsDef = function(input) { - if (typeof input !== "undefined") return true; - else return false; + if (typeof input !== "undefined") { + return true; + } else { + return false; + } }; /* Return a career at random that would be suitable for the given slave. @@ -1537,8 +1977,8 @@ window.resyncSlaveToAge = function(slave) { }; window.IncreasePCSkills = function(input, increase = 1) { - const player = State.variables.PC, - oldSkill = player[input]; + const player = State.variables.PC; + const oldSkill = player[input]; player[input] += increase; if (oldSkill <= 10) { if (player[input] >= 10) { @@ -1736,9 +2176,9 @@ window.changeSkinTone = function(skin, value) { */ App.UI.disabledLink = function(link, reasons) { const tooltips = reasons.length === 1 ? - `<span class=tooltip>${reasons}</span>`: - `<div class="tooltip"><ul>${reasons.map(e => `<li>${e}</li>`).join('')}</ul></div>`; - return '<span class=textWithTooltip>' + link + tooltips + '</span>'; + `<span class="tooltip">${reasons}</span>`: + `<div class=""tooltip""><ul>${reasons.map(e => `<li>${e}</li>`).join('')}</ul></div>`; + return '<span class="textWithTooltip">' + link + tooltips + '</span>'; }; /**