Use Console.WriteLine instead of Log.Out
Remove unnecessary empty patch class
This commit is contained in:
@@ -1,24 +1,16 @@
|
|||||||
using HarmonyLib;
|
using HarmonyLib;
|
||||||
using System.Reflection;
|
using System.Reflection;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
using System;
|
||||||
|
|
||||||
public class BotCommandMod : IModApi
|
public class BotCommandMod : IModApi
|
||||||
{
|
{
|
||||||
public void InitMod(Mod _modInstance)
|
public void InitMod(Mod _modInstance)
|
||||||
{
|
{
|
||||||
Log.Out("[BotCommandMod] Loading");
|
Console.WriteLine("[BotCommandMod] Loading");
|
||||||
var harmony = new Harmony("com.botcommand.mod");
|
var harmony = new Harmony("com.botcommand.mod");
|
||||||
harmony.PatchAll(Assembly.GetExecutingAssembly());
|
harmony.PatchAll(Assembly.GetExecutingAssembly());
|
||||||
Log.Out("[BotCommandMod] Loaded");
|
Console.WriteLine("[BotCommandMod] Loaded");
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
[HarmonyPatch(typeof(ConsoleCmdAbstract))]
|
|
||||||
[HarmonyPatch("getCommands")]
|
|
||||||
public class ChatInterceptPatch
|
|
||||||
{
|
|
||||||
static void Postfix(ref string __result)
|
|
||||||
{
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -31,7 +23,7 @@ public class ChatMessagePatch
|
|||||||
if (_msg != null && _msg.StartsWith("/bot "))
|
if (_msg != null && _msg.StartsWith("/bot "))
|
||||||
{
|
{
|
||||||
string playerName = _cInfo != null ? _cInfo.playerName : "Server";
|
string playerName = _cInfo != null ? _cInfo.playerName : "Server";
|
||||||
Log.Out($"[Bot] {playerName}: {_msg}");
|
Console.WriteLine($"[Bot] {playerName}: {_msg}");
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
|
|||||||
Reference in New Issue
Block a user