Characters with no CharacterInfo can't be selected, fixed broken tickboxes in server settings, inventory log tweaking, one gap sound per hull, chat message "commands" changed from /d to d;

This commit is contained in:
Regalis
2016-02-17 20:43:42 +02:00
parent 8129aa2ae5
commit 4ad8105cd6
16 changed files with 216 additions and 70 deletions
@@ -214,6 +214,24 @@ namespace Barotrauma.Networking
public virtual void SendChatMessage(string message, ChatMessageType type = ChatMessageType.Server) { }
protected string GetChatMessageCommand(string message)
{
int separatorIndex = message.IndexOf(";");
if (separatorIndex == -1) return "";
int colonIndex = message.IndexOf(":");
string command = "";
try
{
command = message.Substring(colonIndex + 2, separatorIndex - colonIndex - 2);
}
catch { }
return command;
}
public virtual void Update(float deltaTime)
{
if (gameStarted && Screen.Selected == GameMain.GameScreen)