public static bool Available(RecipeSlot slot) { return(!( slot == null || slot.Equals(null) || slot.Defunct || slot.IsGreedy || slot.IsBeingAnimated || slot.GetElementStackInSlot() != null )); }
bool TrySatisfySlot(RecipeSlot slot, IEnumerable <ElementStackToken> candidates) { if (slot.GetElementStackInSlot() != null) { // Already something in the slot. return(true); } var candidate = candidates.FirstOrDefault(x => slot.GetSlotMatchForStack(x).MatchType == SlotMatchForAspectsType.Okay); if (candidate == null) { return(false); } this.PopulateSlot(slot, candidate); return(true); }