Made Core Logger Only Gettable
This commit is contained in:
19
Core.cs
19
Core.cs
@@ -15,11 +15,26 @@ namespace VMM
|
|||||||
{
|
{
|
||||||
internal class Core : MelonMod
|
internal class Core : MelonMod
|
||||||
{
|
{
|
||||||
public static MelonLogger.Instance Logger { get; private set; }
|
public static MelonLogger.Instance Logger
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
if (_logger != null)
|
||||||
|
{
|
||||||
|
return _logger;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
throw new System.Exception("Logger instance is not initialized yet.");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private static MelonLogger.Instance _logger;
|
||||||
|
|
||||||
public override void OnInitializeMelon()
|
public override void OnInitializeMelon()
|
||||||
{
|
{
|
||||||
Logger = LoggerInstance;
|
_logger = LoggerInstance;
|
||||||
LoggerInstance.Msg("Initialized.");
|
LoggerInstance.Msg("Initialized.");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user