mirror of
https://github.com/MikuLeaks/MikuSB.git
synced 2026-06-04 20:53:58 +00:00
@@ -121,6 +121,7 @@ public class CommandTextCHS
|
|||||||
public HelpTextCHS Help { get; } = new();
|
public HelpTextCHS Help { get; } = new();
|
||||||
public GirlTextCHS Girl { get; } = new();
|
public GirlTextCHS Girl { get; } = new();
|
||||||
public GiveAllTextCHS GiveAll { get; } = new();
|
public GiveAllTextCHS GiveAll { get; } = new();
|
||||||
|
public DebugTextCHS Debug { get; } = new();
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
@@ -237,6 +238,21 @@ public class GiveAllTextCHS
|
|||||||
public string WeaponAdded => "已添加 {0} 把武器给玩家!";
|
public string WeaponAdded => "已添加 {0} 把武器给玩家!";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// path: Game.Command.Debug
|
||||||
|
/// </summary>
|
||||||
|
public class DebugTextCHS
|
||||||
|
{
|
||||||
|
public string Desc => "调试包输出开关";
|
||||||
|
public string Usage => "用法: /debug [on|off|simple|detail|file]";
|
||||||
|
public string Enabled => "已启用调试包输出。";
|
||||||
|
public string Disabled => "已禁用调试包输出。";
|
||||||
|
public string SimpleEnabled => "已启用简单调试包输出。";
|
||||||
|
public string DetailEnabled => "已启用详细调试包输出。";
|
||||||
|
public string FileEnabled => "个人调试文件输出已启用。";
|
||||||
|
public string FileDisabled => "个人调试文件输出已禁用。";
|
||||||
|
}
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
@@ -121,6 +121,7 @@ public class CommandTextCHT
|
|||||||
public HelpTextCHT Help { get; } = new();
|
public HelpTextCHT Help { get; } = new();
|
||||||
public GirlTextCHT Girl { get; } = new();
|
public GirlTextCHT Girl { get; } = new();
|
||||||
public GiveAllTextCHT GiveAll { get; } = new();
|
public GiveAllTextCHT GiveAll { get; } = new();
|
||||||
|
public DebugTextCHT Debug { get; } = new();
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
@@ -237,6 +238,21 @@ public class GiveAllTextCHT
|
|||||||
public string WeaponAdded => "已添加 {0} 把武器給玩家!";
|
public string WeaponAdded => "已添加 {0} 把武器給玩家!";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// path: Game.Command.Debug
|
||||||
|
/// </summary>
|
||||||
|
public class DebugTextCHT
|
||||||
|
{
|
||||||
|
public string Desc => "切換調試封包輸出";
|
||||||
|
public string Usage => "用法: /debug [on|off|simple|detail|file]";
|
||||||
|
public string Enabled => "已啟用調試封包輸出。";
|
||||||
|
public string Disabled => "已停用調試封包輸出。";
|
||||||
|
public string SimpleEnabled => "已啟用簡易調試封包輸出。";
|
||||||
|
public string DetailEnabled => "已啟用詳細調試封包輸出。";
|
||||||
|
public string FileEnabled => "個人調試檔案輸出已啟用。";
|
||||||
|
public string FileDisabled => "個人調試檔案輸出已停用。";
|
||||||
|
}
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
@@ -83,6 +83,7 @@ public class CommandTextEN
|
|||||||
public HelpTextEN Help { get; } = new();
|
public HelpTextEN Help { get; } = new();
|
||||||
public GirlTextEN Girl { get; } = new();
|
public GirlTextEN Girl { get; } = new();
|
||||||
public GiveAllTextEN GiveAll { get; } = new();
|
public GiveAllTextEN GiveAll { get; } = new();
|
||||||
|
public DebugTextEN Debug { get; } = new();
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
@@ -206,6 +207,21 @@ public class GiveAllTextEN
|
|||||||
public string WeaponAdded => "Added {0} weapon(s) to player!";
|
public string WeaponAdded => "Added {0} weapon(s) to player!";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// path: Game.Command.Debug
|
||||||
|
/// </summary>
|
||||||
|
public class DebugTextEN
|
||||||
|
{
|
||||||
|
public string Desc => "Toggle debug packet output";
|
||||||
|
public string Usage => "Usage: /debug [on|off|simple|detail|file]";
|
||||||
|
public string Enabled => "Debug packet output enabled.";
|
||||||
|
public string Disabled => "Debug packet output disabled.";
|
||||||
|
public string SimpleEnabled => "Simple debug packet output enabled.";
|
||||||
|
public string DetailEnabled => "Detailed debug packet output enabled.";
|
||||||
|
public string FileEnabled => "Personal debug file output enabled.";
|
||||||
|
public string FileDisabled => "Personal debug file output disabled.";
|
||||||
|
}
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
@@ -1,6 +1,7 @@
|
|||||||
using MikuSB.Configuration;
|
using MikuSB.Configuration;
|
||||||
using MikuSB.Enums.Player;
|
using MikuSB.Enums.Player;
|
||||||
using MikuSB.Util;
|
using MikuSB.Util;
|
||||||
|
using MikuSB.Internationalization;
|
||||||
|
|
||||||
namespace MikuSB.GameServer.Command.Commands;
|
namespace MikuSB.GameServer.Command.Commands;
|
||||||
|
|
||||||
@@ -19,7 +20,7 @@ public class CommandDebug : ICommands
|
|||||||
"on" => EnableDebug(serverOption),
|
"on" => EnableDebug(serverOption),
|
||||||
"off" => DisableDebug(serverOption),
|
"off" => DisableDebug(serverOption),
|
||||||
"simple" => EnableSimpleDebug(serverOption),
|
"simple" => EnableSimpleDebug(serverOption),
|
||||||
"detail" => EnableDebug(serverOption),
|
"detail" => EnableDetailDebug(serverOption),
|
||||||
"file" => ToggleDebugFile(serverOption),
|
"file" => ToggleDebugFile(serverOption),
|
||||||
_ => "Usage: /debug [on|off|simple|detail|file]"
|
_ => "Usage: /debug [on|off|simple|detail|file]"
|
||||||
};
|
};
|
||||||
@@ -33,13 +34,13 @@ public class CommandDebug : ICommands
|
|||||||
serverOption.EnableDebug = true;
|
serverOption.EnableDebug = true;
|
||||||
serverOption.DebugMessage = true;
|
serverOption.DebugMessage = true;
|
||||||
serverOption.DebugDetailMessage = true;
|
serverOption.DebugDetailMessage = true;
|
||||||
return "Debug packet output enabled.";
|
return I18NManager.Translate("Game.Command.Debug.Enabled");
|
||||||
}
|
}
|
||||||
|
|
||||||
private static string DisableDebug(ServerOption serverOption)
|
private static string DisableDebug(ServerOption serverOption)
|
||||||
{
|
{
|
||||||
serverOption.EnableDebug = false;
|
serverOption.EnableDebug = false;
|
||||||
return "Debug packet output disabled.";
|
return I18NManager.Translate("Game.Command.Debug.Disabled");
|
||||||
}
|
}
|
||||||
|
|
||||||
private static string EnableSimpleDebug(ServerOption serverOption)
|
private static string EnableSimpleDebug(ServerOption serverOption)
|
||||||
@@ -47,14 +48,22 @@ public class CommandDebug : ICommands
|
|||||||
serverOption.EnableDebug = true;
|
serverOption.EnableDebug = true;
|
||||||
serverOption.DebugMessage = true;
|
serverOption.DebugMessage = true;
|
||||||
serverOption.DebugDetailMessage = false;
|
serverOption.DebugDetailMessage = false;
|
||||||
return "Simple debug packet output enabled.";
|
return I18NManager.Translate("Game.Command.Debug.SimpleEnabled");
|
||||||
|
}
|
||||||
|
|
||||||
|
private static string EnableDetailDebug(ServerOption serverOption)
|
||||||
|
{
|
||||||
|
serverOption.EnableDebug = true;
|
||||||
|
serverOption.DebugMessage = true;
|
||||||
|
serverOption.DebugDetailMessage = true;
|
||||||
|
return I18NManager.Translate("Game.Command.Debug.DetailEnabled");
|
||||||
}
|
}
|
||||||
|
|
||||||
private static string ToggleDebugFile(ServerOption serverOption)
|
private static string ToggleDebugFile(ServerOption serverOption)
|
||||||
{
|
{
|
||||||
serverOption.SavePersonalDebugFile = !serverOption.SavePersonalDebugFile;
|
serverOption.SavePersonalDebugFile = !serverOption.SavePersonalDebugFile;
|
||||||
return serverOption.SavePersonalDebugFile
|
return serverOption.SavePersonalDebugFile
|
||||||
? "Personal debug file output enabled."
|
? I18NManager.Translate("Game.Command.Debug.FileEnabled")
|
||||||
: "Personal debug file output disabled.";
|
: I18NManager.Translate("Game.Command.Debug.FileDisabled");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user