示例#1
0
        public bool HasSource(BaseProducibleObject source)
        {
            RecipeInputsOutputs rio = this;

            if (rio.Sources == null)
            {
                rio = Normal;
            }
            if (rio?.Sources == null)
            {
                rio = Expensive;
            }
            if (rio?.Sources == null)
            {
                return(false);
            }
            return(rio.Sources.Any(x => x.Value.Name == source.Name && x.Value.Type == source.Type));
        }
示例#2
0
        public bool HasResult(BaseProducibleObject result)
        {
            RecipeInputsOutputs rio = this;

            if (rio.Results == null)
            {
                rio = Normal;
            }
            if (rio?.Results == null)
            {
                rio = Expensive;
            }
            if (rio?.Results == null)
            {
                return(false);
            }
            return(rio.Results.Any(x => x.Value.Name == result.Name && x.Value.Type == result.Type));
        }