-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathMod.cs
More file actions
38 lines (33 loc) · 1.1 KB
/
Mod.cs
File metadata and controls
38 lines (33 loc) · 1.1 KB
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
using System;
using System.IO;
using Game;
using Game.Modding;
using Colossal.Logging;
using Colossal.PSI.Environment;
namespace AssetPacksManager
{
public class Mod : IMod
{
public static ILog log = LogManager.GetLogger("AssetPacksManager");
public void OnLoad(UpdateSystem updateSystem)
{
try
{
var modsDataPath = Path.Combine(EnvPath.kUserDataPath, "ModsData", "AssetPacksManager");
if (Directory.Exists(modsDataPath))
{
log.Info("Loading Final Version of Asset Packs Manager Mod");
Directory.Delete(modsDataPath, true);
log.Info("Deleted Asset Packs Manager ModsData to prevent conflicts. It will no longer be used. Thank you everyone, it's been an honor. Asset Packs Manager signing off.");
}
}
catch (Exception e)
{
log.Warn("Error while trying to delete Asset Packs Manager ModsData folder: " + e);
}
}
public void OnDispose()
{
}
}
}