diff --git a/Jenkins/jenkins-grab-se.ps1 b/Jenkins/jenkins-grab-se.ps1 index 7670e02..26ca62e 100644 --- a/Jenkins/jenkins-grab-se.ps1 +++ b/Jenkins/jenkins-grab-se.ps1 @@ -1,6 +1,6 @@ pushd -$steamData = "C:/Steam/Data/" +$steamData = "C:/Steam/Data-playtest/" $steamCMDPath = "C:/Steam/steamcmd/" $steamCMDZip = "C:/Steam/steamcmd.zip" @@ -17,6 +17,6 @@ if (!(Test-Path $steamCMDPath)) { } cd "$steamData" -& "$steamCMDPath/steamcmd.exe" "+login anonymous" "+force_install_dir $steamData" "+app_update 298740" "+quit" +& "$steamCMDPath/steamcmd.exe" "+login anonymous" "+force_install_dir $steamData" "+app_update 298740 -beta playtest -betapassword nt8WuDw9kdvE validate" "+quit" -popd \ No newline at end of file +popd diff --git a/Jenkinsfile b/Jenkinsfile index e554cf4..b2a5471 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -22,7 +22,7 @@ node { stage('Acquire SE') { bat 'powershell -File Jenkins/jenkins-grab-se.ps1' bat 'IF EXIST GameBinaries RMDIR GameBinaries' - bat 'mklink /J GameBinaries "C:/Steam/Data/DedicatedServer64/"' + bat 'mklink /J GameBinaries "C:/Steam/Data-playtest/DedicatedServer64/"' } stage('Acquire NuGet Packages') { diff --git a/Torch.API/Torch.API.csproj b/Torch.API/Torch.API.csproj index c7137e0..10bedc2 100644 --- a/Torch.API/Torch.API.csproj +++ b/Torch.API/Torch.API.csproj @@ -31,6 +31,7 @@ prompt MinimumRecommendedRules.ruleset $(SolutionDir)\bin\x64\Release\Torch.API.xml + 1591 diff --git a/Torch.Client/Torch.Client.csproj b/Torch.Client/Torch.Client.csproj index 40f2506..82a74fa 100644 --- a/Torch.Client/Torch.Client.csproj +++ b/Torch.Client/Torch.Client.csproj @@ -36,6 +36,7 @@ MinimumRecommendedRules.ruleset true $(SolutionDir)\bin\x64\Release\Torch.Client.xml + 1591 torchicon.ico diff --git a/Torch.Server/Initializer.cs b/Torch.Server/Initializer.cs index 3a7e11e..a3ef962 100644 --- a/Torch.Server/Initializer.cs +++ b/Torch.Server/Initializer.cs @@ -31,7 +31,7 @@ namespace Torch.Server private const string RUNSCRIPT = @"force_install_dir ../ login anonymous -app_update 298740 +app_update 298740 -beta playtest -betapassword nt8WuDw9kdvE quit"; private TorchConfig _config; @@ -243,4 +243,4 @@ quit"; Process.GetCurrentProcess().Kill(); } } -} \ No newline at end of file +} diff --git a/Torch.Server/Managers/InstanceManager.cs b/Torch.Server/Managers/InstanceManager.cs index 245f8d1..b47cb4e 100644 --- a/Torch.Server/Managers/InstanceManager.cs +++ b/Torch.Server/Managers/InstanceManager.cs @@ -87,7 +87,15 @@ namespace Torch.Server.Managers public void SelectWorld(string worldPath, bool modsOnly = true) { DedicatedConfig.LoadWorld = worldPath; - DedicatedConfig.SelectedWorld = DedicatedConfig.Worlds.FirstOrDefault(x => x.WorldPath == worldPath); + + var worldInfo = DedicatedConfig.Worlds.FirstOrDefault(x => x.WorldPath == worldPath); + if (worldInfo?.Checkpoint == null) + { + worldInfo = new WorldViewModel(worldPath); + DedicatedConfig.Worlds.Add(worldInfo); + } + + DedicatedConfig.SelectedWorld = worldInfo; if (DedicatedConfig.SelectedWorld?.Checkpoint != null) { DedicatedConfig.Mods.Clear(); diff --git a/Torch.Server/Torch.Server.csproj b/Torch.Server/Torch.Server.csproj index ed9e330..3593712 100644 --- a/Torch.Server/Torch.Server.csproj +++ b/Torch.Server/Torch.Server.csproj @@ -51,6 +51,7 @@ MinimumRecommendedRules.ruleset true $(SolutionDir)\bin\x64\Release\Torch.Server.xml + 1591 Torch.Server.Program 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.Server/Views/WorldGeneratorDialog.xaml.cs b/Torch.Server/Views/WorldGeneratorDialog.xaml.cs index cfbfad8..eec25de 100644 --- a/Torch.Server/Views/WorldGeneratorDialog.xaml.cs +++ b/Torch.Server/Views/WorldGeneratorDialog.xaml.cs @@ -93,7 +93,6 @@ namespace Torch.Server _instanceManager.SelectWorld(worldPath, false); - _instanceManager.LoadInstance(worldPath); _instanceManager.ImportSelectedWorldConfig(); Close(); } 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/Managers/MultiplayerManagerBase.cs b/Torch/Managers/MultiplayerManagerBase.cs index d892a8e..30bf775 100644 --- a/Torch/Managers/MultiplayerManagerBase.cs +++ b/Torch/Managers/MultiplayerManagerBase.cs @@ -116,7 +116,7 @@ namespace Torch.Managers protected void RaiseClientJoined(ulong steamId) { var vm = new PlayerViewModel(steamId) { State = ConnectionState.Connected }; - _log.Info($"Player {vm.Name} joined ({vm.SteamId}"); + _log.Info($"Player {vm.Name} joined ({vm.SteamId})"); Players.Add(steamId, vm); PlayerJoined?.Invoke(vm); } diff --git a/Torch/Torch.csproj b/Torch/Torch.csproj index 1a50d4f..defaca4 100644 --- a/Torch/Torch.csproj +++ b/Torch/Torch.csproj @@ -33,6 +33,7 @@ MinimumRecommendedRules.ruleset $(SolutionDir)\bin\x64\Release\Torch.xml true + 1591