Skip to content

Commit

Permalink
Fix JSON dependency issues
Browse files Browse the repository at this point in the history
  • Loading branch information
bbepis committed Jul 29, 2021
1 parent 1efe32c commit c5b1be5
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 9 deletions.
7 changes: 6 additions & 1 deletion SRML/SRML.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -81,9 +81,14 @@
<HintPath>..\packages\MonoMod.Utils.21.4.21.3\lib\net40\MonoMod.Utils.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="Newtonsoft.Json, Version=12.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
<HintPath>..\packages\Newtonsoft.Json.12.0.3\lib\net40\Newtonsoft.Json.dll</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="System.Core" />
<Reference Include="System.Runtime.Serialization" />
<Reference Include="System.Runtime.Serialization">
<Private>True</Private>
</Reference>
<Reference Include="Unity.TextMeshPro">
<HintPath>..\libs\Unity.TextMeshPro.dll</HintPath>
<Private>False</Private>
Expand Down
14 changes: 6 additions & 8 deletions SRML/SRModLoader.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
using System.IO;
using System.Linq;
using System.Reflection;
using Newtonsoft.Json;
using Exception = System.Exception;

namespace SRML
Expand Down Expand Up @@ -300,14 +301,11 @@ public static ProtoMod ParseFromJson(String jsonFile)

public static ProtoMod ParseFromJson(String jsonData, string path)
{
//var proto =
// JsonConvert.DeserializeObject<ProtoMod>(jsonData);
//proto.path = Path.GetDirectoryName(path);
//proto.entryFile = path;
//proto.ValidateFields();
//return proto;

return null;
var proto = JsonConvert.DeserializeObject<ProtoMod>(jsonData);
proto.path = Path.GetDirectoryName(path);
proto.entryFile = path;
proto.ValidateFields();
return proto;
}

/// <summary>
Expand Down
Binary file added libs/System.Runtime.Serialization.dll
Binary file not shown.

0 comments on commit c5b1be5

Please sign in to comment.