private Material(string EDName, string category, string name, Rarity rarity, string symbol = null, decimal? goodpctbody = null, decimal? greatpctbody = null)
        {
            this.EDName = EDName;
            this.category = category;
            this.symbol= symbol;
            this.name = name;
            this.rarity = rarity;
            this.goodpctbody = goodpctbody;
            this.greatpctbody = greatpctbody;

            MATERIALS.Add(this);
        }
Пример #2
0
        public static Rarity FromName(string from)
        {
            if (from == null)
            {
                return(null);
            }

            Rarity result = RARITIES.FirstOrDefault(v => v.name == from);

            if (result == null)
            {
                Logging.Report("Unknown Rarity name " + from);
            }
            return(result);
        }
Пример #3
0
        public static Rarity FromEDName(string from)
        {
            if (from == null)
            {
                return(null);
            }

            string tidiedFrom = from.ToLowerInvariant();
            Rarity result     = RARITIES.FirstOrDefault(v => v.edname.ToLowerInvariant() == tidiedFrom);

            if (result == null)
            {
                Logging.Report("Unknown Rarity ED name " + from);
            }
            return(result);
        }