From 246164647caa12ded1fd1a3e42b956ffda677ae7 Mon Sep 17 00:00:00 2001
From: Svornost <11434-svornost@users.noreply.gitgud.io>
Date: Fri, 12 Jun 2020 13:34:33 -0700
Subject: [PATCH] Make hero slave list respect $seeDicks

---
 src/npc/generate/heroCreator.js | 34 ++++++++++++++++-----------------
 1 file changed, 17 insertions(+), 17 deletions(-)

diff --git a/src/npc/generate/heroCreator.js b/src/npc/generate/heroCreator.js
index 7eb32cce059..edd6c568e8a 100644
--- a/src/npc/generate/heroCreator.js
+++ b/src/npc/generate/heroCreator.js
@@ -2,24 +2,24 @@
  * @returns {Array}
  */
 App.Utils.buildHeroArray = function() {
-	let array;
-	$.wiki(`<<include "custom Slaves Database">>`);
-	if (V.seeExtreme === 1) {
-		array = App.Data.HeroSlaves.D.concat(
-			App.Data.HeroSlaves.DD,
-			App.Data.HeroSlaves.DF,
-			App.Data.HeroSlaves.Dextreme,
-			App.Data.HeroSlaves.DDextreme,
-			App.Data.HeroSlaves.DFextreme,
-			V.heroSlaves
-		);
-	} else {
-		array = App.Data.HeroSlaves.D.concat(
-			App.Data.HeroSlaves.DD,
-			App.Data.HeroSlaves.DF,
-			V.heroSlaves
-		);
+	let chunks = [];
+	if (V.seeDicks < 100) { // dickless slaves
+		chunks.push(App.Data.HeroSlaves.D);
+		chunks.push(App.Data.HeroSlaves.DF);
+		if (V.seeExtreme === 1) {
+			chunks.push(App.Data.HeroSlaves.Dextreme);
+			chunks.push(App.Data.HeroSlaves.DFextreme);
+		}
+	}
+	if (V.seeDicks > 0) { // dicked slaves
+		chunks.push(App.Data.HeroSlaves.DD);
+		if (V.seeExtreme === 1) {
+			chunks.push(App.Data.HeroSlaves.DDextreme);
+		}
 	}
+	App.UI.DOM.renderPassage("custom Slaves Database"); // populate V.heroSlaves from user DB
+	chunks.push(V.heroSlaves);
+	let array =	[].concat(...chunks);
 	delete V.heroSlaves;
 
 	for (let hero = 0; hero < array.length; hero++) {
-- 
GitLab