public override void Load(TagCompound tag) { // we store the list as a list<string> since we can't seralize the enum // but to use effectively at runtime we need a list of list<Element> List <Element> names = tag.Get <List <string> >("demonNames").ConvertAll(x => ElementData.elementFromString(x)); List <bool> values = tag.Get <List <bool> >("demonValues"); // combine list of Element and bool to form a dictionary<Element, bool>S soulDemonsDowned = names.Zip(values, (k, v) => new { Key = k, Value = v }).ToDictionary(x => x.Key, x => x.Value); mod.Logger.Info("Loaded demon values = " + ToPrettyString(soulDemonsDowned)); }