-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMod.cs
More file actions
50 lines (42 loc) · 1.98 KB
/
Mod.cs
File metadata and controls
50 lines (42 loc) · 1.98 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
39
40
41
42
43
44
45
46
47
48
49
50
using Kitchen;
using KitchenLib;
using KitchenMods;
using System.Reflection;
using UnityEngine;
// Namespace should have "Kitchen" in the beginning
namespace KitchenBetterBuildPhase
{
public class Mod : BaseMod
{
// guid must be unique and is recommended to be in reverse domain name notation
// mod name that is displayed to the player and listed in the mods menu
// mod version must follow semver e.g. "1.2.3"
public const string MOD_GUID = "jaredjj3.PlateUp.BetterBuildPhase";
public const string MOD_NAME = "BetterBuildPhase";
public const string MOD_VERSION = "0.1.0";
public const string MOD_AUTHOR = "jaredjj3";
public const string MOD_GAMEVERSION = ">=1.1.1";
// Game version this mod is designed for in semver
// e.g. ">=1.1.1" current and all future
// e.g. ">=1.1.1 <=1.2.3" for all from/until
public Mod() : base(MOD_GUID, MOD_NAME, MOD_AUTHOR, MOD_VERSION, MOD_GAMEVERSION, Assembly.GetExecutingAssembly()) { }
protected override void Initialise()
{
base.Initialise();
// For log file output so the official plateup support staff can identify if/which a mod is being used
LogWarning($"{MOD_GUID} v{MOD_VERSION} in use!");
}
protected override void OnUpdate()
{
}
#region Logging
// You can remove this, I just prefer a more standardized logging
public static void LogInfo(string _log) { Debug.Log($"{MOD_NAME} " + _log); }
public static void LogWarning(string _log) { Debug.LogWarning($"{MOD_NAME} " + _log); }
public static void LogError(string _log) { Debug.LogError($"{MOD_NAME} " + _log); }
public static void LogInfo(object _log) { LogInfo(_log.ToString()); }
public static void LogWarning(object _log) { LogWarning(_log.ToString()); }
public static void LogError(object _log) { LogError(_log.ToString()); }
#endregion
}
}