override public bool CheckCondition() { MenuElement menuElement = PlayerMenus.GetElementWithName(menuToCheck, elementToCheck); if (menuElement != null) { int numSlots = menuElement.GetNumSlots(); if (intCondition == IntCondition.EqualTo) { if (numToCheck == numSlots) { return(true); } } else if (intCondition == IntCondition.LessThan) { if (numToCheck > numSlots) { return(true); } } else if (intCondition == IntCondition.MoreThan) { if (numToCheck < numSlots) { return(true); } } else if (intCondition == IntCondition.NotEqualTo) { if (numToCheck != numSlots) { return(true); } } } return(false); }