Save some config settings

This commit is contained in:
KillzXGaming 2020-08-31 19:21:57 -04:00
parent e45df3ca22
commit d79e59b524
2 changed files with 22 additions and 3 deletions

View file

@ -308,7 +308,15 @@ namespace Toolbox.Library
Enum.TryParse(node.InnerText, out cameraMovement);
Runtime.cameraMovement = cameraMovement;
break;
case "KCLGamePreset":
Runtime.CollisionSettings.KCLGamePreset = node.InnerText;
break;
case "KCLPlatform":
Runtime.CollisionSettings.KCLPlatform = node.InnerText;
break;
case "KCLUsePresetEditor":
bool.TryParse(node.InnerText, out Runtime.CollisionSettings.KCLUsePresetEditor);
break;
}
}
@ -417,11 +425,22 @@ namespace Toolbox.Library
AppendDeveloperSettings(doc, mainNode);
AppendLayoutEditorSettings(doc, mainNode);
AppendByamlEditorSettings(doc, mainNode);
AppendCollisionSettings(doc, mainNode);
return doc;
}
private static void AppendCollisionSettings(XmlDocument doc, XmlNode parentNode)
{
XmlNode layoutSettingsNode = doc.CreateElement("KCL_EDITOR");
parentNode.AppendChild(layoutSettingsNode);
layoutSettingsNode.AppendChild(createNode(doc, "KCLGamePreset", Runtime.CollisionSettings.KCLGamePreset.ToString()));
layoutSettingsNode.AppendChild(createNode(doc, "KCLPlatform", Runtime.CollisionSettings.KCLPlatform.ToString()));
layoutSettingsNode.AppendChild(createNode(doc, "KCLUsePresetEditor", Runtime.CollisionSettings.KCLUsePresetEditor.ToString()));
}
private static void AppendLayoutEditorSettings(XmlDocument doc, XmlNode parentNode)
{
XmlNode layoutSettingsNode = doc.CreateElement("LAYOUT_EDITOR");

View file

@ -16,7 +16,7 @@ assembly_info:
assembly_informational_version: '{version}'
deploy:
- provider: GitHub
tag: `EXPERIMENTAL_LATEST-v$(appveyor_build_version)`
tag: 'EXPERIMENTAL_LATEST-v$(appveyor_build_version)'
description: 'This is the latest build of the tool automatically built from the latest commit!\n\nMessage: $(APPVEYOR_REPO_COMMIT_MESSAGE)\n\n Timestamp: $(APPVEYOR_REPO_COMMIT_TIMESTAMP)
**If this program does not open, make sure to unblock the zip file then extract!**