forked from BattletechModders/Timeline
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathModSettings.cs
More file actions
27 lines (25 loc) · 724 Bytes
/
ModSettings.cs
File metadata and controls
27 lines (25 loc) · 724 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
using Newtonsoft.Json;
using System;
namespace Timeline
{
internal class ModSettings
{
public string DateFormatString = "{0:yyyy MMMM d}{1}";
public float AdvanceToTaskTime = 0.25f;
public bool UseScroller = false;
public float ScrollerSpeed = 0.015f;
public float ReadTimeFactor = 0.175f;
public static ModSettings ReadSettings(string json)
{
try
{
return JsonConvert.DeserializeObject<ModSettings>(json);
}
catch (Exception e)
{
Main.HBSLog.Log($"Reading settings failed: {e.Message}");
return new ModSettings();
}
}
}
}