-
Notifications
You must be signed in to change notification settings - Fork 13
/
Copy pathCSURToolBox.cs
53 lines (52 loc) · 1.36 KB
/
CSURToolBox.cs
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
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
using ICities;
using System.IO;
using ColossalFramework;
using System;
using CSURToolBox.Util;
using CSURToolBox.UI;
using CitiesHarmony.API;
namespace CSURToolBox
{
public class CSURToolBox : IUserMod
{
public static bool IsEnabled = false;
public string Name
{
get { return "CSUR ToolBox"; }
}
public string Description
{
get { return "Tool Box for CSUR Road"; }
}
public void OnEnabled()
{
IsEnabled = true;
FileStream fs = File.Create("CSURToolBox.txt");
fs.Close();
HarmonyHelper.EnsureHarmonyInstalled();
}
public void OnDisabled()
{
IsEnabled = false;
}
public CSURToolBox()
{
try
{
if (GameSettings.FindSettingsFileByName("CSURToolBox_SETTING") == null)
{
// Creating setting file
GameSettings.AddSettingsFile(new SettingsFile { fileName = "CSURToolBox_SETTING" });
}
}
catch (Exception)
{
DebugLog.LogToFileOnly("Could not load/create the setting file.");
}
}
public void OnSettingsUI(UIHelperBase helper)
{
OptionUI.MakeSettings(helper);
}
}
}