(e1516fabb) Don't allow selecting railgun shell or depthcharge ItemContainers (can only be accessed when the item is in the inventory). Fixes characters getting locked to looking towards the shell/charge they're holding.

This commit is contained in:
Joonas Rikkonen
2019-04-08 16:00:08 +03:00
parent 4902de606b
commit 35ee8dc883
@@ -271,6 +271,7 @@ namespace Barotrauma
DebugConsole.ThrowError("Tried to add the same character info to CrewManager twice.\n" + Environment.StackTrace); DebugConsole.ThrowError("Tried to add the same character info to CrewManager twice.\n" + Environment.StackTrace);
return; return;
} }
}
characterInfos.Add(characterInfo); characterInfos.Add(characterInfo);
} }
@@ -598,20 +599,7 @@ namespace Barotrauma
characterListBox.BarScroll = roundedPos; characterListBox.BarScroll = roundedPos;
} }
#region Dialog return radioItem.GetComponent<WifiComponent>();
/// <summary>
/// Adds the message to the single player chatbox.
/// </summary>
public void AddSinglePlayerChatMessage(string senderName, string text, ChatMessageType messageType, Character sender)
{
if (!isSinglePlayer)
{
DebugConsole.ThrowError("Cannot add messages to single player chat box in multiplayer mode!\n" + Environment.StackTrace);
return;
}
if (string.IsNullOrEmpty(text)) { return; }
chatBox.AddMessage(ChatMessage.Create(senderName, text, messageType, sender));
} }
private IEnumerable<object> KillCharacterAnim(GUIComponent component) private IEnumerable<object> KillCharacterAnim(GUIComponent component)