private static ContainerRow ParseSettingRows(ModContentPack content) { var r = new ContainerRow(); var xmlDoc = DirectXmlLoader.XmlAssetsInModFolder(content, "Settings")?.Where(x => x.name == "Settings.xml")?.ToList().FirstOrDefault(); if (xmlDoc == null || xmlDoc.xmlDoc == null) { Log.Error("Settings/Settings.xml not found or invalid xml."); return(r); } var rootElem = xmlDoc.xmlDoc.DocumentElement; if (rootElem.Name != "SettingRows") { Log.Error("SettingRows not found. name=" + rootElem.Name); return(r); } r.Rows.LoadDataFromXmlCustom(rootElem); return(r); }