From 44fcf4fa7c417a0dd08c581479a9576bfb467046 Mon Sep 17 00:00:00 2001
From: Arkerthan <arkerthan@gmail.com>
Date: Thu, 27 May 2021 22:39:16 +0200
Subject: [PATCH] fix recruiter and bodyguard hotkeys properly

Bodyguard was tagged as a hidden passage despite not being one, removed tag.
 recruiter select is a hidden passage, added ability for hidden passages to have hotkeys if explicitly specified
---
 src/002-config/mousetrapConfig.js      | 10 ----------
 src/005-passages/facilitiesPassages.js |  2 +-
 src/gui/quicklinks.js                  |  6 ++++--
 3 files changed, 5 insertions(+), 13 deletions(-)

diff --git a/src/002-config/mousetrapConfig.js b/src/002-config/mousetrapConfig.js
index a7dae198f0f..f2a106d1eec 100644
--- a/src/002-config/mousetrapConfig.js
+++ b/src/002-config/mousetrapConfig.js
@@ -352,13 +352,3 @@ App.UI.Hotkeys.add("HG Select", {
 		$("#manageHG a").trigger("click");
 	}, combinations: ["h"]
 });
-App.UI.Hotkeys.add("BG Select", {
-	callback: function() {
-		$("#manageHG a").trigger("click");
-	}, combinations: ["b"]
-});
-App.UI.Hotkeys.add("Recruiter Select", {
-	callback: function() {
-		$("#manageHG a").trigger("click");
-	}, combinations: ["u"]
-});
diff --git a/src/005-passages/facilitiesPassages.js b/src/005-passages/facilitiesPassages.js
index 96780671218..2e1a0d93f97 100644
--- a/src/005-passages/facilitiesPassages.js
+++ b/src/005-passages/facilitiesPassages.js
@@ -65,7 +65,7 @@ new App.DomPassage("BG Select",
 		V.encyclopedia = "Bodyguard";
 
 		return App.Facilities.BGSelect();
-	}, ["jump-to-safe", "jump-hidden", "jump-from-safe"]
+	}, ["jump-to-safe", "jump-from-safe"]
 );
 
 new App.DomPassage("Concubine Select",
diff --git a/src/gui/quicklinks.js b/src/gui/quicklinks.js
index aebe0a9fbd2..45b846afdc1 100644
--- a/src/gui/quicklinks.js
+++ b/src/gui/quicklinks.js
@@ -85,7 +85,7 @@ App.UI.quickMenu = (function() {
 	// true means hidden
 	const hiddenPassages = cleanPassageMapping({
 		"Arcade": () => !V.arcade,
-		"BG Select": () => V.dojo <= 1,
+		"BG Select": () => !V.dojo,
 		"Brothel": () => !V.brothel,
 		"Cellblock": () => !V.cellblock,
 		"Clinic": () => !V.clinic,
@@ -241,7 +241,9 @@ App.UI.quickMenu = (function() {
 
 		// register
 		for (const passage of jumpTo) {
-			if (!hidden.includes(passage)) {
+			if (!hidden.includes(passage)
+				// some passages may be hidden, but still accessible through hotkeys
+				|| hotkeys.hasOwnProperty(passage)) {
 				const action = {
 					callback: () => {
 						if (hotkeysEnabled
-- 
GitLab