Skip to content

Commit 4910a4b

Browse files
authored
Merge pull request #447 from amazingalek/dev
2.5.0
2 parents 729092e + ec53075 commit 4910a4b

File tree

3 files changed

+9
-6
lines changed

3 files changed

+9
-6
lines changed

src/OWML.Common/Interfaces/IModStorage.cs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
1-
namespace OWML.Common
1+
using Newtonsoft.Json;
2+
3+
namespace OWML.Common
24
{
35
public interface IModStorage
46
{
5-
T Load<T>(string filename);
7+
T Load<T>(string filename, bool fixBackslashes = true, JsonSerializerSettings settings = null);
68

79
void Save<T>(T obj, string filename);
810
}

src/OWML.Launcher/OWML.Manifest.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"author": "Alek",
33
"name": "OWML",
44
"uniqueName": "Alek.OWML",
5-
"version": "2.4.0",
5+
"version": "2.5.0",
66
"minGameVersion": "1.1.10.47",
77
"maxGameVersion": "1.1.12.201"
88
}

src/OWML.ModHelper/ModStorage.cs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
using OWML.Common;
1+
using Newtonsoft.Json;
2+
using OWML.Common;
23
using OWML.Utils;
34

45
namespace OWML.ModHelper
@@ -14,11 +15,11 @@ public ModStorage(IModManifest manifest, IModConsole console)
1415
_console = console;
1516
}
1617

17-
public T Load<T>(string filename)
18+
public T Load<T>(string filename, bool fixBackslashes = true, JsonSerializerSettings settings = null)
1819
{
1920
var path = _manifest.ModFolderPath + filename;
2021
_console.WriteLine($"Loading config from {path}", MessageType.Debug);
21-
return JsonHelper.LoadJsonObject<T>(path);
22+
return JsonHelper.LoadJsonObject<T>(path, fixBackslashes, settings);
2223
}
2324

2425
public void Save<T>(T obj, string filename)

0 commit comments

Comments
 (0)