public void AddGlobalChatItem(MyGlobalChatItem chatItem) { if (m_globalChatHistory.Chat.Count == MyChatConstants.MAX_GLOBAL_CHAT_HISTORY_COUNT) { m_globalChatHistory.Chat.Dequeue(); } m_globalChatHistory.Chat.Enqueue(chatItem); }
public void Init(MyObjectBuilder_GlobalChatHistory chatBuilder) { if (chatBuilder.Chat != null) { m_chat = new Queue <MyGlobalChatItem>(chatBuilder.Chat.Count); foreach (var chatItem in chatBuilder.Chat) { MyGlobalChatItem newChatItem = new MyGlobalChatItem(); newChatItem.Init(chatItem); m_chat.Enqueue(newChatItem); } } else { m_chat = new Queue <MyGlobalChatItem>(); } }
public static void AddGlobalChatItem(long localPlayerId, MyGlobalChatItem chatItem) { GetChatHistory(localPlayerId).AddGlobalChatItem(chatItem); }
public void Init(MyObjectBuilder_GlobalChatHistory chatBuilder) { if (chatBuilder.Chat != null) { m_chat = new Queue<MyGlobalChatItem>(chatBuilder.Chat.Count); foreach (var chatItem in chatBuilder.Chat) { MyGlobalChatItem newChatItem = new MyGlobalChatItem(); newChatItem.Init(chatItem); m_chat.Enqueue(newChatItem); } } else { m_chat = new Queue<MyGlobalChatItem>(); } }