]> git.localhorst.tv Git - alttp.git/blobdiff - resources/js/helpers/tracker.js
simple tracker config dialog
[alttp.git] / resources / js / helpers / tracker.js
index 2bc477bff1b632813829f7d4a3ee944d62e6fb57..e4b0ebe9f765a33d497ff2d994537a64168860ae 100644 (file)
@@ -68,6 +68,10 @@ export const BOSSES = [
 ];
 
 export const CONFIG = {
+       showMap: 'situational',
+       showCompass: 'situational',
+       showSmall: 'always',
+       showBig: 'always',
        wildMap: false,
        wildCompass: false,
        wildSmall: false,
@@ -1552,6 +1556,20 @@ export const UNDERWORLD_LOCATIONS = [
        },
 ];
 
+export const shouldShowDungeonItem = (config, which) => {
+       const show = config[`show${which}`] || 'always';
+       const wild = config[`wild${which}`] || false;
+       switch (show) {
+               default:
+               case 'always':
+                       return true;
+               case 'situational':
+                       return wild;
+               case 'never':
+                       return false;
+       }
+};
+
 export const toggleBoolean = name => state => ({
        ...state,
        [name]: !state[name],