-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathConfig.cs
32 lines (28 loc) · 978 Bytes
/
Config.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
using System.Runtime.CompilerServices;
using IPA.Config.Stores;
[assembly: InternalsVisibleTo(GeneratedStore.AssemblyVisibilityTarget)]
namespace PurpleSabers {
internal class Config {
public static Config Instance;
public virtual bool enabled { get; set; } = false;
/// <summary>
/// This is called whenever BSIPA reads the config from disk (including when file changes are detected).
/// </summary>
public virtual void OnReload() {
// Do stuff after config is read from disk.
}
/// <summary>
/// Call this to force BSIPA to update the config file. This is also called by BSIPA if it detects the file was modified.
/// </summary>
public virtual void Changed() {
// Do stuff when the config is changed.
}
/// <summary>
/// Call this to have BSIPA copy the values from <paramref name="other"/> into this config.
/// </summary>
public virtual void CopyFrom(Config other) {
// This instance's members populated from other
}
}
}