From a8494d5300b9078bb35dbff999a3236d2fe33b75 Mon Sep 17 00:00:00 2001 From: sowgro Date: Sun, 18 May 2025 00:34:11 -0400 Subject: [PATCH] Add option to export to JSON --- OMI Filetypes Library/Formats/GameRuleFile.cs | 2 ++ OMI Filetypes Library/OMI Filetype Library.csproj | 6 ++++++ 2 files changed, 8 insertions(+) diff --git a/OMI Filetypes Library/Formats/GameRuleFile.cs b/OMI Filetypes Library/Formats/GameRuleFile.cs index 7c50435..2e4676c 100644 --- a/OMI Filetypes Library/Formats/GameRuleFile.cs +++ b/OMI Filetypes Library/Formats/GameRuleFile.cs @@ -2,6 +2,7 @@ using System.Collections.Generic; using System.Linq; using System.IO.Compression; +using Newtonsoft.Json; using OMI.Workers.GameRule; namespace OMI.Formats.GameRule @@ -261,6 +262,7 @@ public class GameRule public string Name { get; set; } = string.Empty; + [JsonIgnore] public GameRule Parent { get; } = null; public Dictionary Parameters { get; } = new Dictionary(); public List ChildRules { get; } = new List(); diff --git a/OMI Filetypes Library/OMI Filetype Library.csproj b/OMI Filetypes Library/OMI Filetype Library.csproj index e6b286b..3d1d5c7 100644 --- a/OMI Filetypes Library/OMI Filetype Library.csproj +++ b/OMI Filetypes Library/OMI Filetype Library.csproj @@ -32,6 +32,9 @@ 4 + + ..\..\..\..\..\.nuget\packages\newtonsoft.json\13.0.3\lib\net45\Newtonsoft.Json.dll + @@ -89,6 +92,9 @@ + + 13.0.3 + 1.4.2