diff --git a/Torch.Server/ViewModels/SessionSettingsViewModel.cs b/Torch.Server/ViewModels/SessionSettingsViewModel.cs index 9f43d01..5a658ca 100644 --- a/Torch.Server/ViewModels/SessionSettingsViewModel.cs +++ b/Torch.Server/ViewModels/SessionSettingsViewModel.cs @@ -120,8 +120,14 @@ namespace Torch.Server.ViewModels public bool EnableSaving { get => _settings.EnableSaving; set => SetValue(ref _settings.EnableSaving, value); } [Torch.Views.Display(Description = "Enables respawn screen.", Name = "Enable Respawn Screen in the Game", GroupName = "Players")] - public bool EnableRespawnScreen { get => _settings.EnableRespawnScreen; set => SetValue(ref _settings.EnableRespawnScreen, value); } - + public bool StartInRespawnScreen { get => _settings.StartInRespawnScreen; set => SetValue(ref _settings.StartInRespawnScreen, value); } + + [Torch.Views.Display(Description = "Enables research.", Name = "Enable Research", GroupName = "Players")] + public bool EnableResearch { get => _settings.EnableResearch; set => SetValue(ref _settings.EnableResearch, value); } + + [Torch.Views.Display(Description = "Enables Good.bot hints.", Name = "Enable Good.bot hints", GroupName = "Players")] + public bool EnableGoodBotHints { get => _settings.EnableGoodBotHints; set => SetValue(ref _settings.EnableGoodBotHints, value); } + [Torch.Views.Display(Description = "Enables infinite ammunition in survival game mode.", Name = "Enable Infinite Ammunition in Survival", GroupName = "Others")] public bool InfiniteAmmo { get => _settings.InfiniteAmmo; set => SetValue(ref _settings.InfiniteAmmo, value); } diff --git a/Torch/Managers/ChatManager/ChatManagerClient.cs b/Torch/Managers/ChatManager/ChatManagerClient.cs index 0ded357..f7b175c 100644 --- a/Torch/Managers/ChatManager/ChatManagerClient.cs +++ b/Torch/Managers/ChatManager/ChatManagerClient.cs @@ -48,7 +48,8 @@ namespace Torch.Managers.ChatManager MyMultiplayerBase.SendScriptedChatMessage(ref scripted); } else - MyMultiplayer.Static.SendChatMessage(message); + throw new NotImplementedException("Chat system changes broke this"); + //MyMultiplayer.Static.SendChatMessage(message); } else if (HasHud) MyHud.Chat.ShowMessage(MySession.Static.LocalHumanPlayer?.DisplayName ?? "Player", message); @@ -59,12 +60,6 @@ namespace Torch.Managers.ChatManager { if (HasHud) MyHud.Chat?.ShowMessage(author, message, font); - MySession.Static.GlobalChatHistory.GlobalChatHistory.Chat.Enqueue(new MyGlobalChatItem() - { - Author = author, - AuthorFont = font, - Text = message - }); } /// @@ -76,7 +71,7 @@ namespace Torch.Managers.ChatManager { _chatMessageRecievedReplacer = _chatMessageReceivedFactory.Invoke(); _scriptedChatMessageRecievedReplacer = _scriptedChatMessageReceivedFactory.Invoke(); - _chatMessageRecievedReplacer.Replace(new Action(Multiplayer_ChatMessageReceived), + _chatMessageRecievedReplacer.Replace(new Action(Multiplayer_ChatMessageReceived), MyMultiplayer.Static); _scriptedChatMessageRecievedReplacer.Replace( new Action(Multiplayer_ScriptedChatMessageReceived), MyMultiplayer.Static); @@ -130,12 +125,12 @@ namespace Torch.Managers.ChatManager } - private void Multiplayer_ChatMessageReceived(ulong steamUserId, string message) + private void Multiplayer_ChatMessageReceived(ulong steamUserId, string messageText, ChatChannel channel, long targetId, string customAuthorName) { - var torchMsg = new TorchChatMessage(steamUserId, message, + var torchMsg = new TorchChatMessage(steamUserId, $"[{channel}] {messageText}", (steamUserId == MyGameService.UserId) ? MyFontEnum.DarkBlue : MyFontEnum.Blue); if (!RaiseMessageRecieved(torchMsg) && HasHud) - _hudChatMessageReceived.Invoke(MyHud.Chat, steamUserId, message); + _hudChatMessageReceived.Invoke(MyHud.Chat, steamUserId, $"[{channel}] {messageText}"); } private void Multiplayer_ScriptedChatMessageReceived(string message, string author, string font) diff --git a/Torch/Managers/ChatManager/ChatManagerServer.cs b/Torch/Managers/ChatManager/ChatManagerServer.cs index ba92ad3..6a0ec34 100644 --- a/Torch/Managers/ChatManager/ChatManagerServer.cs +++ b/Torch/Managers/ChatManager/ChatManagerServer.cs @@ -137,13 +137,13 @@ namespace Torch.Managers.ChatManager return consumed; } - private void MpStaticChatMessageReceived(ulong a, string b) + private void MpStaticChatMessageReceived(ulong steamUserId, string messageText, ChatChannel channel, long targetId, string customAuthorName) { var tmp = false; - RaiseMessageRecieved(new ChatMsg() + RaiseMessageRecieved(new ChatMsg { - Author = a, - Text = b + Author = steamUserId, + Text = messageText }, ref tmp); } diff --git a/Torch/VRageGame.cs b/Torch/VRageGame.cs index eafe74a..e470878 100644 --- a/Torch/VRageGame.cs +++ b/Torch/VRageGame.cs @@ -277,7 +277,7 @@ namespace Torch MyObjectBuilder_Checkpoint checkpoint = MyLocalCache.LoadCheckpoint(sessionPath, out checkpointSize); if (MySession.IsCompatibleVersion(checkpoint)) { - if (MyWorkshop.DownloadWorldModsBlocking(checkpoint.Mods).Success) + if (MyWorkshop.DownloadWorldModsBlocking(checkpoint.Mods, null).Success) { // MySpaceAnalytics.Instance.SetEntry(MyGameEntryEnum.Load); MySession.Load(sessionPath, checkpoint, checkpointSize);