mirror of
https://gitgud.io/AbstractConcept/rimworld-animation-studio.git
synced 2024-08-15 00:43:27 +00:00
Remove and save custom tags
This commit is contained in:
parent
e36ef6a368
commit
2f3f807911
264 changed files with 1118 additions and 498 deletions
|
@ -20,17 +20,17 @@ namespace RimWorldAnimationStudio
|
|||
}
|
||||
}
|
||||
|
||||
public static void WriteXML(Defs defs, string path)
|
||||
public static void WriteXML<T>(T obj, string path)
|
||||
{
|
||||
if (defs == null || path == null || path == "")
|
||||
if (obj == null || path == null || path == "")
|
||||
{ return; }
|
||||
|
||||
XmlSerializer writer = new XmlSerializer(typeof(Defs));
|
||||
XmlSerializer writer = new XmlSerializer(typeof(T));
|
||||
XmlSerializerNamespaces nameSpaces = new XmlSerializerNamespaces();
|
||||
nameSpaces.Add("", "");
|
||||
|
||||
FileStream file = File.Create(path);
|
||||
writer.Serialize(file, defs, nameSpaces);
|
||||
writer.Serialize(file, obj, nameSpaces);
|
||||
file.Close();
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue