Files
LuaCsForBarotraumaEP/BarotraumaServer/Source/DebugConsole.cs
juanjp600 7003214847 Console colors, begin RNG rework
This is gonna be a PAIN
2017-06-19 21:30:57 -03:00

54 lines
1.5 KiB
C#

using System;
using System.Collections.Generic;
using System.Linq;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;
using Microsoft.Xna.Framework.Input;
using Barotrauma.Networking;
using Barotrauma.Items.Components;
using System.Text;
using FarseerPhysics;
namespace Barotrauma
{
static partial class DebugConsole
{
public static List<string> QueuedCommands = new List<string>();
public static void Update()
{
lock (QueuedCommands)
{
while (QueuedCommands.Count>0)
{
ExecuteCommand(QueuedCommands[0], GameMain.Instance);
QueuedCommands.RemoveAt(0);
}
}
}
private static bool ExecProjSpecific(string[] commands)
{
switch (commands[0].ToLower())
{
case "startgame":
case "startround":
case "start":
if (Screen.Selected == GameMain.GameScreen) break;
if (!GameMain.Server.StartGame()) NewMessage("Failed to start server",Color.Yellow);
break;
case "endgame":
case "endround":
case "end":
if (Screen.Selected == GameMain.NetLobbyScreen) break;
GameMain.Server.EndGame();
break;
default:
return false;
break;
}
return true; //command found
}
}
}