New vtank control

This commit is contained in:
erik 2025-04-29 09:58:25 +02:00
parent de1b72aae5
commit 347cfe6423
5 changed files with 244 additions and 3 deletions

View file

@ -34,7 +34,7 @@ namespace MosswartMassacre
try
{
MyHost = Host;
WriteToChat("Mosswart Massacre has started!");
// Subscribe to chat message event
@ -52,6 +52,8 @@ namespace MosswartMassacre
// Enable TLS1.2
ServicePointManager.SecurityProtocol |= SecurityProtocolType.Tls12;
//Enable vTank interface
vTank.Enable();
}
catch (Exception ex)
{
@ -82,6 +84,9 @@ namespace MosswartMassacre
// Clean up the view
MainView.ViewDestroy();
//Disable vtank interface
vTank.Disable();
MyHost = null;
}
catch (Exception ex)
@ -409,6 +414,7 @@ namespace MosswartMassacre
WriteToChat("/mm meta - Toggle rare meta state");
WriteToChat("/mm http - Local http-command server enable|disable");
WriteToChat("/mm remotecommand - Listen to allegiance !do/!dot enable|disable");
WriteToChat("/mm getmetastate - Gets the current metastate");
break;
case "report":
@ -416,6 +422,10 @@ namespace MosswartMassacre
string reportMessage = $"Total Kills: {totalKills}, Kills per Hour: {killsPerHour:F2}, Elapsed Time: {elapsed:dd\\.hh\\:mm\\:ss}, Rares Found: {rareCount}";
WriteToChat(reportMessage);
break;
case "getmetastate":
string metaState = VtankControl.VtGetMetaState();
WriteToChat(metaState);
break;
case "loc":
Coordinates here = Coordinates.Me;