From 896ad5b65bc4ace9e96182b086c15fca4ece9254 Mon Sep 17 00:00:00 2001
From: Skriv <skrivelese@gmail.com>
Date: Thu, 16 May 2019 21:54:49 +0200
Subject: [PATCH] minor cleanup

---
 src/js/generateNewSlaveJS.js | 4 ++--
 src/js/itemAvailability.js   | 2 +-
 src/js/rulesAutosurgery.js   | 7 +++----
 src/js/storyJS.js            | 2 +-
 4 files changed, 7 insertions(+), 8 deletions(-)

diff --git a/src/js/generateNewSlaveJS.js b/src/js/generateNewSlaveJS.js
index 5e93b736e17..585c3993aac 100644
--- a/src/js/generateNewSlaveJS.js
+++ b/src/js/generateNewSlaveJS.js
@@ -995,7 +995,7 @@ window.GenerateNewSlave = (function() {
 
 	function generateXXTeeth() {
 		let femaleCrookedTeethGen = slave.intelligence + slave.intelligenceImplant;
-		if ("American" === slave.nationality) {
+		if (slave.nationality === "American") {
 			femaleCrookedTeethGen += 20;
 		} else if (["Andorran", "Antiguan", "Argentinian", "Aruban", "Australian", "Austrian", "Bahamian", "Bahraini", "Barbadian", "Belarusian", "Belgian", "Bermudian", "Brazilian", "British", "Bruneian", "Bulgarian", "Canadian", "Catalan", "Chilean", "a Cook Islander", "Croatian", "Curaçaoan", "Cypriot", "Czech", "Danish", "Dutch", "Emirati", "Estonian", "Finnish", "French", "German", "Greek", "Greenlandic", "Guamanian", "Hungarian", "Icelandic", "Irish", "Israeli", "Italian", "Japanese", "Kazakh", "Korean", "Kuwaiti", "Latvian", "a Liechtensteiner", "Lithuanian", "Luxembourgian", "Malaysian", "Maltese", "Mauritian", "Monégasque", "Montenegrin", "New Caledonian", "a New Zealander", "Niuean", "Norwegian", "Omani", "Palauan", "Panamanian", "Polish", "Portuguese", "Puerto Rican", "Qatari", "Romanian", "Russian", "Sammarinese", "Saudi", "Seychellois", "Singaporean", "Slovak", "Slovene", "Spanish", "Swedish", "Swiss", "Taiwanese", "Trinidadian", "Uruguayan", "Vatican"].includes(slave.nationality)) {
 			/* do nothing */
@@ -1016,7 +1016,7 @@ window.GenerateNewSlave = (function() {
 
 	function generateXYTeeth() {
 		let maleCrookedTeethGen = slave.intelligence + slave.intelligenceImplant;
-		if ("American" === slave.nationality) {
+		if (slave.nationality === "American") {
 			maleCrookedTeethGen += 22;
 		} else if (["Andorran", "Antiguan", "Argentinian", "Aruban", "Australian", "Austrian", "Bahamian", "Bahraini", "Barbadian", "Belarusian", "Belgian", "Bermudian", "Brazilian", "British", "Bruneian", "Bulgarian", "Canadian", "Catalan", "Chilean", "a Cook Islander", "Croatian", "Curaçaoan", "Cypriot", "Czech", "Danish", "Dutch", "Emirati", "Estonian", "Finnish", "French", "German", "Greek", "Greenlandic", "Guamanian", "Hungarian", "Icelandic", "Irish", "Israeli", "Italian", "Japanese", "Kazakh", "Korean", "Kuwaiti", "Latvian", "a Liechtensteiner", "Lithuanian", "Luxembourgian", "Malaysian", "Maltese", "Mauritian", "Monégasque", "Montenegrin", "New Caledonian", "a New Zealander", "Niuean", "Norwegian", "Omani", "Palauan", "Panamanian", "Polish", "Portuguese", "Puerto Rican", "Qatari", "Romanian", "Russian", "Sammarinese", "Saudi", "Seychellois", "Singaporean", "Slovak", "Slovene", "Spanish", "Swedish", "Swiss", "Taiwanese", "Trinidadian", "Uruguayan", "Vatican"].includes(slave.nationality)) {
 			/* do nothing */
diff --git a/src/js/itemAvailability.js b/src/js/itemAvailability.js
index a01fbbe2422..1db91451042 100644
--- a/src/js/itemAvailability.js
+++ b/src/js/itemAvailability.js
@@ -2,7 +2,7 @@
 
 /**
  * Checks whether item is accessible
- * @param {string} string Name of the item
+ * @param {string} string Name of wearable item
  * @returns {boolean}
  */
 window.isItemAccessible = function(string) {
diff --git a/src/js/rulesAutosurgery.js b/src/js/rulesAutosurgery.js
index 6be658d7a68..e13a3a9adf6 100644
--- a/src/js/rulesAutosurgery.js
+++ b/src/js/rulesAutosurgery.js
@@ -24,11 +24,10 @@ window.rulesAutosurgery = (function() {
 	}
 
 	/**
-	 * @param {App.Entity.SlaveState} slave
 	 * @param {Object[]} ruleset
 	 * @returns {Object}
 	 */
-	function autoSurgerySelector(slave, ruleset) {
+	function autoSurgerySelector(ruleset) {
 		const surgery = {};
 		ruleset.forEach(rule => {
 			Object.keys(rule)
@@ -115,8 +114,8 @@ window.rulesAutosurgery = (function() {
 				thisSurgery = autoSurgerySelector(
 					slave,
 					V.defaultRules
-					.filter(x => ruleApplied(slave, x) && x.set.autoSurgery === 1)
-					.map(x => x.set));
+						.filter(x => ruleApplied(slave, x) && x.set.autoSurgery === 1)
+						.map(x => x.set));
 				if ((thisSurgery.surgery_hips !== "no default setting") && (thisSurgery.surgery_butt !== "no default setting")) {
 					if (slave.hips < -1) {
 						if (thisSurgery.surgery_butt > 2) {
diff --git a/src/js/storyJS.js b/src/js/storyJS.js
index 13493a30c7f..70eb589a6fe 100644
--- a/src/js/storyJS.js
+++ b/src/js/storyJS.js
@@ -388,7 +388,7 @@ window.bodyguardSuccessorEligible = function(slave) {
 
 window.ngUpdateGenePool = function (genePool = []) {
 	const transferredSlaveIds = (State.variables.slaves || [])
-		.filter(s => (s.ID >= 1200000))
+		.filter(s => s.ID >= 1200000)
 		.map(s => s.ID - 1200000);
 	return genePool.filter(s => (transferredSlaveIds.indexOf(s.ID) >= 0))
 		.map(function (s) {
-- 
GitLab