if (shouldShowDungeonItem(config, 'Big')) {
++count;
}
- return count > 2 ? LAYOUTS.manyDungeonItemsVertical : LAYOUTS.defaultVertical;
+ const compact = config.compactKeysanity && count === 4;
+ return !compact && count > 2
+ ? LAYOUTS.manyDungeonItemsVertical : LAYOUTS.defaultVertical;
} else {
return LAYOUTS.defaultHorizontal;
}
)}
</Form.Select>
</Form.Group>
+ <Form.Group
+ className="d-flex justify-content-between my-2"
+ controlId="tracker.compactKeysanity"
+ >
+ <Form.Label>{t('tracker.config.compactKeysanity')}</Form.Label>
+ <Form.Control
+ as={LargeCheck}
+ name="compactKeysanity"
+ onChange={handleChange}
+ value={!!config.compactKeysanity}
+ />
+ </Form.Group>
</Col>
<Col sm={6}>
<h3>{t('tracker.config.calculation')}</h3>
BOSSES,
getDungeonAcquiredSKs,
getDungeonRemainingItems,
+ shouldCompactKeysanity,
shouldShowDungeonItem,
} from '../../helpers/tracker';
import { useTracker } from '../../hooks/tracker';
const { config, dungeons, state } = useTracker();
const layout = React.useMemo(() => {
+ const compact = shouldCompactKeysanity(config);
const mapX = 1;
const compassX = shouldShowDungeonItem(config, 'Map') ? mapX + 1 : mapX;
const smallX = shouldShowDungeonItem(config, 'Compass') ? compassX + 1 : compassX;
const bigX = shouldShowDungeonItem(config, 'Small') ? smallX + 1 : smallX;
- const countX = shouldShowDungeonItem(config, 'Big') ? bigX + 1 : bigX;
+ const countX = compact ? 2 : shouldShowDungeonItem(config, 'Big') ? bigX + 1 : bigX;
const bossX = countX + 1;
const prizeX = bossX + 1;
const dungeonWidth = Math.max(5, prizeX + 1);
const transforms = {
tag: null,
- map: `translate(${mapX} 0) scale(0.9)`,
- compass: `translate(${compassX} 0) scale(0.9)`,
- small: `translate(${smallX} 0) scale(0.9)`,
- big: `translate(${bigX} 0) scale(0.9)`,
+ map: compact
+ ? 'translate(0.75 -0.25) scale(0.45)' : `translate(${mapX} 0) scale(0.9)`,
+ compass: compact
+ ? 'translate(1.25 -0.25) scale(0.45)' : `translate(${compassX} 0) scale(0.9)`,
+ small: compact
+ ? 'translate(0.75 0.25) scale(0.45)' : `translate(${smallX} 0) scale(0.9)`,
+ big: compact
+ ? 'translate(1.25 0.25) scale(0.45)' : `translate(${bigX} 0) scale(0.9)`,
checks: `translate(${countX} 0) scale(0.9)`,
boss: `translate(${bossX} 0)`,
prize: `translate(${prizeX} 0)`,
} from '../../helpers/tracker';
import { useTracker } from '../../hooks/tracker';
-const ToggleIcon = ({ controller, className, icons, svg, transform }) => {
+const ToggleIcon = ({ controller, className, icons, svg, title, transform }) => {
const { setManualState, state } = useTracker();
const activeController = controller || ToggleIcon.nullController;
const active = activeController.getActive(state, icons);
}}
transform={transform}
>
- <ZeldaIcon name={icon} svg />
+ <ZeldaIcon name={icon} svg title={title} />
</g>;
}
return <span
e.stopPropagation();
}}
>
- <ZeldaIcon name={active || defaultIcon || icons[0]} />
+ <ZeldaIcon name={active || defaultIcon || icons[0]} title={title} />
</span>;
};
}),
icons: PropTypes.arrayOf(PropTypes.string),
svg: PropTypes.bool,
+ title: PropTypes.string,
transform: PropTypes.string,
};
<Button
className="me-3"
onClick={() => setShowConfigDialog(true)}
+ title={t('button.settings')}
variant="outline-secondary"
>
- <Icon.SETTINGS />
+ <Icon.SETTINGS title="" />
</Button>
- <ToggleIcon controller={wildController} icons={['map']} />
- <ToggleIcon controller={wildController} icons={['compass']} />
- <ToggleIcon controller={wildController} icons={['small-key']} />
- <ToggleIcon controller={wildController} icons={['big-key']} />
- <ToggleIcon className="ms-3" controller={bossController} icons={['armos']} />
- <ToggleIcon controller={worldController} icons={['link-head', 'bunny-head']} />
+ <ToggleIcon
+ controller={wildController}
+ icons={['map']}
+ title={t('tracker.config.shuffleMap')}
+ />
+ <ToggleIcon
+ controller={wildController}
+ icons={['compass']}
+ title={t('tracker.config.shuffleCompass')}
+ />
+ <ToggleIcon
+ controller={wildController}
+ icons={['small-key']}
+ title={t('tracker.config.shuffleSmall')}
+ />
+ <ToggleIcon
+ controller={wildController}
+ icons={['big-key']}
+ title={t('tracker.config.shuffleBig')}
+ />
+ <ToggleIcon
+ className="ms-3"
+ controller={bossController}
+ icons={['armos']}
+ title={t('tracker.config.bossShuffle')}
+ />
+ <ToggleIcon
+ controller={worldController}
+ icons={['link-head', 'bunny-head']}
+ title={t('tracker.config.inverted')}
+ />
</div>
<div>
<Form.Group
export const CONFIG = {
bossShuffle: false,
checkCalculation: 'room-data',
+ compactKeysanity: true,
glitches: 'none',
mapLayout: 'horizontal',
showMap: 'situational',
}
};
+export const showsFullKeysanity = (config) =>
+ shouldShowDungeonItem(config, 'Map') &&
+ shouldShowDungeonItem(config, 'Compass') &&
+ shouldShowDungeonItem(config, 'Small') &&
+ shouldShowDungeonItem(config, 'Big');
+
+export const shouldCompactKeysanity = (config) =>
+ config.compactKeysanity && showsFullKeysanity(config);
+
export const toggleBoolean = name => state => ({
...state,
[name]: !state[name],
inventory: 'Inventar (Doors)',
'room-data': 'Raumdaten (Glitched)',
},
+ compactKeysanity: 'Kompaktes Keysanity',
ganonCrystals: 'Ganon Crystals',
glitches: 'Glitches',
glitchRules: {
trinity: 'Trinity',
},
gtCrystals: 'GT Crystals',
+ inverted: 'Inverted',
layout: 'Layout',
logic: 'Logik',
mapLayout: 'Karte',
showItems: 'Zeige Dungeon Items',
showMap: 'Maps',
showSmall: 'Small Keys',
+ shuffleBig: 'Big Key Shuffle',
+ shuffleCompass: 'Kompass Shuffle',
+ shuffleMap: 'Map Shuffle',
+ shuffleSmall: 'Small Key Shuffle',
title: 'Konfiguration',
wildBig: 'Big Keys',
wildCompass: 'Kompanden',
inventory: 'Inventory (Doors)',
'room-data': 'Room data (glitched)',
},
+ compactKeysanity: 'Compact Keysanity',
ganonCrystals: 'Ganon Crystals',
glitches: 'Glitches',
glitchRules: {
trinity: 'Trinity',
},
gtCrystals: 'GT Crystals',
+ inverted: 'Inverted',
layout: 'Layout',
logic: 'Logic',
mapLayout: 'Map',
showItems: 'Show Dungeon Items',
showMap: 'Maps',
showSmall: 'Small Keys',
+ shuffleBig: 'Big Key Shuffle',
+ shuffleCompass: 'Compass Shuffle',
+ shuffleMap: 'Map Shuffle',
+ shuffleSmall: 'Small Key Shuffle',
title: 'Configuration',
wildBig: 'Big Keys',
wildCompass: 'Compasses',
.dungeons {
.count-display,
.dungeon-tag {
- font-size: 0.5px;
+ font-size: 0.45px;
font-weight: bold;
fill: white;
stroke: black;
- stroke-width: 0.25px;
+ stroke-width: 0.2px;
stroke-linejoin: round;
paint-order: stroke fill;
dominant-baseline: middle;
}
.count-display {
font-size: 0.65px;
+ stroke-width: 0.3px;
}
}
.items {