Fix path warning showing up unnecessarily

This commit is contained in:
SpectralFlame 2022-08-02 09:49:32 -05:00 committed by cyip92
parent c70ef0a60e
commit 384e3296bd

View File

@ -1,8 +1,9 @@
import { GameMechanicState } from "../game-mechanics/index";
function showSecondPreferredWarning(currTree) {
const canPickSecond = currTree.allowedDimPathCount === 2 && currTree.currDimPathCount < 2;
// Show a warning if the player can choose the second preferred dimension path and hasn't yet done so.
if (currTree.allowedDimPathCount === 2 && currTree.currDimPathCount < 2) {
if (canPickSecond && TimeStudy.preferredPaths.dimension.path.length < 2) {
GameUI.notify.error("You haven't selected a second preferred Dimension path.");
return true;
}