public virtual ModCategory this[string category] { get { Entries.TryGetValue(category, out var cat); if (cat == null) { cat = new ModCategory(Entries.Any() ? Entries.Max(entry => entry.Value.Index) + 1 : 0); Entries.Add(category, cat); } return(cat); } }
public virtual ModCategory this[string category] { get { Entries.TryGetValue(category, out var cat); if (cat == null) { cat = new ModCategory(); Entries.Add(category, cat); } return(cat); } }