From 47b721d419506920846c64a4ba4f09892612ca7c Mon Sep 17 00:00:00 2001 From: glax Date: Sun, 14 Jan 2024 01:04:55 +0100 Subject: [PATCH] Settings ToString --- OpenCS2hock/Settings.cs | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/OpenCS2hock/Settings.cs b/OpenCS2hock/Settings.cs index f615d35..fea077b 100644 --- a/OpenCS2hock/Settings.cs +++ b/OpenCS2hock/Settings.cs @@ -1,4 +1,6 @@ -namespace OpenCS2hock; +using Newtonsoft.Json; + +namespace OpenCS2hock; public struct Settings { @@ -35,7 +37,12 @@ public struct Settings { } - + + public override string ToString() + { + return JsonConvert.SerializeObject(this, Formatting.Indented); + } + public static Shocker.ControlAction StringToAction(string str) { return str.ToLower() switch