regions.xml and warps.xml are now located in tshock dir. Will auto move them on first run

This commit is contained in:
Twitchy 2011-06-25 04:37:55 +12:00
parent 0a69d1ae3b
commit 57627f6846
3 changed files with 24 additions and 4 deletions

View file

@ -59,7 +59,7 @@ namespace TShockAPI
xmlWriterSettings.Indent = true;
xmlWriterSettings.NewLineChars = Environment.NewLine;
using (XmlWriter settingsw = XmlWriter.Create("warps.xml", xmlWriterSettings))
using (XmlWriter settingsw = XmlWriter.Create(FileTools.WarpsPath, xmlWriterSettings))
{
settingsw.WriteStartDocument();
settingsw.WriteStartElement("Warps");
@ -92,7 +92,7 @@ namespace TShockAPI
XmlReaderSettings xmlReaderSettings = new XmlReaderSettings();
xmlReaderSettings.IgnoreWhitespace = true;
using (XmlReader settingr = XmlReader.Create("warps.xml", xmlReaderSettings))
using (XmlReader settingr = XmlReader.Create(FileTools.WarpsPath, xmlReaderSettings))
{
while (settingr.Read())
{