Merge branch 'playtest' of https://github.com/TorchAPI/Torch into survival
This commit is contained in:
@@ -1,6 +1,6 @@
|
|||||||
pushd
|
pushd
|
||||||
|
|
||||||
$steamData = "C:/Steam/Data/"
|
$steamData = "C:/Steam/Data-playtest/"
|
||||||
$steamCMDPath = "C:/Steam/steamcmd/"
|
$steamCMDPath = "C:/Steam/steamcmd/"
|
||||||
$steamCMDZip = "C:/Steam/steamcmd.zip"
|
$steamCMDZip = "C:/Steam/steamcmd.zip"
|
||||||
|
|
||||||
@@ -17,6 +17,6 @@ if (!(Test-Path $steamCMDPath)) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
cd "$steamData"
|
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
|
popd
|
||||||
|
2
Jenkinsfile
vendored
2
Jenkinsfile
vendored
@@ -22,7 +22,7 @@ node {
|
|||||||
stage('Acquire SE') {
|
stage('Acquire SE') {
|
||||||
bat 'powershell -File Jenkins/jenkins-grab-se.ps1'
|
bat 'powershell -File Jenkins/jenkins-grab-se.ps1'
|
||||||
bat 'IF EXIST GameBinaries RMDIR GameBinaries'
|
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') {
|
stage('Acquire NuGet Packages') {
|
||||||
|
@@ -31,6 +31,7 @@
|
|||||||
<ErrorReport>prompt</ErrorReport>
|
<ErrorReport>prompt</ErrorReport>
|
||||||
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
|
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
|
||||||
<DocumentationFile>$(SolutionDir)\bin\x64\Release\Torch.API.xml</DocumentationFile>
|
<DocumentationFile>$(SolutionDir)\bin\x64\Release\Torch.API.xml</DocumentationFile>
|
||||||
|
<NoWarn>1591</NoWarn>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Reference Include="HavokWrapper, Version=1.0.6278.22649, Culture=neutral, processorArchitecture=AMD64">
|
<Reference Include="HavokWrapper, Version=1.0.6278.22649, Culture=neutral, processorArchitecture=AMD64">
|
||||||
|
@@ -36,6 +36,7 @@
|
|||||||
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
|
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
|
||||||
<Prefer32Bit>true</Prefer32Bit>
|
<Prefer32Bit>true</Prefer32Bit>
|
||||||
<DocumentationFile>$(SolutionDir)\bin\x64\Release\Torch.Client.xml</DocumentationFile>
|
<DocumentationFile>$(SolutionDir)\bin\x64\Release\Torch.Client.xml</DocumentationFile>
|
||||||
|
<NoWarn>1591</NoWarn>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<ApplicationIcon>torchicon.ico</ApplicationIcon>
|
<ApplicationIcon>torchicon.ico</ApplicationIcon>
|
||||||
|
@@ -31,7 +31,7 @@ namespace Torch.Server
|
|||||||
|
|
||||||
private const string RUNSCRIPT = @"force_install_dir ../
|
private const string RUNSCRIPT = @"force_install_dir ../
|
||||||
login anonymous
|
login anonymous
|
||||||
app_update 298740
|
app_update 298740 -beta playtest -betapassword nt8WuDw9kdvE
|
||||||
quit";
|
quit";
|
||||||
|
|
||||||
private TorchConfig _config;
|
private TorchConfig _config;
|
||||||
@@ -243,4 +243,4 @@ quit";
|
|||||||
Process.GetCurrentProcess().Kill();
|
Process.GetCurrentProcess().Kill();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -87,7 +87,15 @@ namespace Torch.Server.Managers
|
|||||||
public void SelectWorld(string worldPath, bool modsOnly = true)
|
public void SelectWorld(string worldPath, bool modsOnly = true)
|
||||||
{
|
{
|
||||||
DedicatedConfig.LoadWorld = worldPath;
|
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)
|
if (DedicatedConfig.SelectedWorld?.Checkpoint != null)
|
||||||
{
|
{
|
||||||
DedicatedConfig.Mods.Clear();
|
DedicatedConfig.Mods.Clear();
|
||||||
|
@@ -51,6 +51,7 @@
|
|||||||
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
|
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
|
||||||
<Prefer32Bit>true</Prefer32Bit>
|
<Prefer32Bit>true</Prefer32Bit>
|
||||||
<DocumentationFile>$(SolutionDir)\bin\x64\Release\Torch.Server.xml</DocumentationFile>
|
<DocumentationFile>$(SolutionDir)\bin\x64\Release\Torch.Server.xml</DocumentationFile>
|
||||||
|
<NoWarn>1591</NoWarn>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<StartupObject>Torch.Server.Program</StartupObject>
|
<StartupObject>Torch.Server.Program</StartupObject>
|
||||||
|
@@ -120,8 +120,14 @@ namespace Torch.Server.ViewModels
|
|||||||
public bool EnableSaving { get => _settings.EnableSaving; set => SetValue(ref _settings.EnableSaving, value); }
|
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")]
|
[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")]
|
[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); }
|
public bool InfiniteAmmo { get => _settings.InfiniteAmmo; set => SetValue(ref _settings.InfiniteAmmo, value); }
|
||||||
|
|
||||||
|
@@ -93,7 +93,6 @@ namespace Torch.Server
|
|||||||
|
|
||||||
|
|
||||||
_instanceManager.SelectWorld(worldPath, false);
|
_instanceManager.SelectWorld(worldPath, false);
|
||||||
_instanceManager.LoadInstance(worldPath);
|
|
||||||
_instanceManager.ImportSelectedWorldConfig();
|
_instanceManager.ImportSelectedWorldConfig();
|
||||||
Close();
|
Close();
|
||||||
}
|
}
|
||||||
|
@@ -48,7 +48,8 @@ namespace Torch.Managers.ChatManager
|
|||||||
MyMultiplayerBase.SendScriptedChatMessage(ref scripted);
|
MyMultiplayerBase.SendScriptedChatMessage(ref scripted);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
MyMultiplayer.Static.SendChatMessage(message);
|
throw new NotImplementedException("Chat system changes broke this");
|
||||||
|
//MyMultiplayer.Static.SendChatMessage(message);
|
||||||
}
|
}
|
||||||
else if (HasHud)
|
else if (HasHud)
|
||||||
MyHud.Chat.ShowMessage(MySession.Static.LocalHumanPlayer?.DisplayName ?? "Player", message);
|
MyHud.Chat.ShowMessage(MySession.Static.LocalHumanPlayer?.DisplayName ?? "Player", message);
|
||||||
@@ -59,12 +60,6 @@ namespace Torch.Managers.ChatManager
|
|||||||
{
|
{
|
||||||
if (HasHud)
|
if (HasHud)
|
||||||
MyHud.Chat?.ShowMessage(author, message, font);
|
MyHud.Chat?.ShowMessage(author, message, font);
|
||||||
MySession.Static.GlobalChatHistory.GlobalChatHistory.Chat.Enqueue(new MyGlobalChatItem()
|
|
||||||
{
|
|
||||||
Author = author,
|
|
||||||
AuthorFont = font,
|
|
||||||
Text = message
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <inheritdoc/>
|
/// <inheritdoc/>
|
||||||
@@ -76,7 +71,7 @@ namespace Torch.Managers.ChatManager
|
|||||||
{
|
{
|
||||||
_chatMessageRecievedReplacer = _chatMessageReceivedFactory.Invoke();
|
_chatMessageRecievedReplacer = _chatMessageReceivedFactory.Invoke();
|
||||||
_scriptedChatMessageRecievedReplacer = _scriptedChatMessageReceivedFactory.Invoke();
|
_scriptedChatMessageRecievedReplacer = _scriptedChatMessageReceivedFactory.Invoke();
|
||||||
_chatMessageRecievedReplacer.Replace(new Action<ulong, string>(Multiplayer_ChatMessageReceived),
|
_chatMessageRecievedReplacer.Replace(new Action<ulong, string, ChatChannel, long, string>(Multiplayer_ChatMessageReceived),
|
||||||
MyMultiplayer.Static);
|
MyMultiplayer.Static);
|
||||||
_scriptedChatMessageRecievedReplacer.Replace(
|
_scriptedChatMessageRecievedReplacer.Replace(
|
||||||
new Action<string, string, string>(Multiplayer_ScriptedChatMessageReceived), MyMultiplayer.Static);
|
new Action<string, string, string>(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);
|
(steamUserId == MyGameService.UserId) ? MyFontEnum.DarkBlue : MyFontEnum.Blue);
|
||||||
if (!RaiseMessageRecieved(torchMsg) && HasHud)
|
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)
|
private void Multiplayer_ScriptedChatMessageReceived(string message, string author, string font)
|
||||||
|
@@ -137,13 +137,13 @@ namespace Torch.Managers.ChatManager
|
|||||||
return consumed;
|
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;
|
var tmp = false;
|
||||||
RaiseMessageRecieved(new ChatMsg()
|
RaiseMessageRecieved(new ChatMsg
|
||||||
{
|
{
|
||||||
Author = a,
|
Author = steamUserId,
|
||||||
Text = b
|
Text = messageText
|
||||||
}, ref tmp);
|
}, ref tmp);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -116,7 +116,7 @@ namespace Torch.Managers
|
|||||||
protected void RaiseClientJoined(ulong steamId)
|
protected void RaiseClientJoined(ulong steamId)
|
||||||
{
|
{
|
||||||
var vm = new PlayerViewModel(steamId) { State = ConnectionState.Connected };
|
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);
|
Players.Add(steamId, vm);
|
||||||
PlayerJoined?.Invoke(vm);
|
PlayerJoined?.Invoke(vm);
|
||||||
}
|
}
|
||||||
|
@@ -33,6 +33,7 @@
|
|||||||
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
|
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
|
||||||
<DocumentationFile>$(SolutionDir)\bin\x64\Release\Torch.xml</DocumentationFile>
|
<DocumentationFile>$(SolutionDir)\bin\x64\Release\Torch.xml</DocumentationFile>
|
||||||
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
|
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
|
||||||
|
<NoWarn>1591</NoWarn>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Reference Include="ControlzEx, Version=3.0.2.4, Culture=neutral, processorArchitecture=MSIL">
|
<Reference Include="ControlzEx, Version=3.0.2.4, Culture=neutral, processorArchitecture=MSIL">
|
||||||
|
Reference in New Issue
Block a user