Compare commits

...

2 Commits

Author SHA1 Message Date
Bishbash777
5804165d2b 205 fixes. (#590)
All checks were successful
Release / Get Version (push) Successful in 7s
Release / Build and Publish Nuget (push) Successful in 2m33s
Release / Build and Publish Package (push) Successful in 3m9s
(cherry picked from commit e41a26dbd2fb966b21757fa0248f6b4a4e716aad)
2024-10-15 01:18:02 +07:00
zznty
1960d2a0de fix world path being truncated if missing trailing slash
Some checks failed
Release / Get Version (push) Failing after 1s
Release / Build and Publish Nuget (push) Has been skipped
Release / Build and Publish Package (push) Has been skipped
2024-10-14 23:20:49 +07:00
8 changed files with 25 additions and 24 deletions

View File

@@ -18,7 +18,7 @@
<PackageReference Include="NuGet.Commands" Version="6.11.0" /> <PackageReference Include="NuGet.Commands" Version="6.11.0" />
<PackageReference Include="NuGet.DependencyResolver.Core" Version="6.11.0" /> <PackageReference Include="NuGet.DependencyResolver.Core" Version="6.11.0" />
<PackageReference Include="SemanticVersioning" Version="2.0.2" /> <PackageReference Include="SemanticVersioning" Version="2.0.2" />
<PackageReference Include="SpaceEngineersDedicated.ReferenceAssemblies" Version="1.204.18"> <PackageReference Include="SpaceEngineersDedicated.ReferenceAssemblies" Version="1.*">
<ExcludeAssets>runtime</ExcludeAssets> <ExcludeAssets>runtime</ExcludeAssets>
</PackageReference> </PackageReference>
<PackageReference Include="System.Linq.Async" Version="6.0.1" /> <PackageReference Include="System.Linq.Async" Version="6.0.1" />

View File

@@ -54,9 +54,9 @@
}, },
"SpaceEngineersDedicated.ReferenceAssemblies": { "SpaceEngineersDedicated.ReferenceAssemblies": {
"type": "Direct", "type": "Direct",
"requested": "[1.204.18, )", "requested": "[1.*, )",
"resolved": "1.204.18", "resolved": "1.205.23",
"contentHash": "GT7/9CBMx4jjor41zLOOl87YYM/JdJD8xp9ccXyuhP2oUaz25H3ZmCQuGeAuZNENKru1a/7hZrId4PwlMDGoew==", "contentHash": "J7mF5hY39PzzCZps6vhIRzKiq8vD6Af9TgumTJR068vjEi+BzyeEFhqX+cl2Dd1ngOmsBtGWc5m+vxgTfs5YuA==",
"dependencies": { "dependencies": {
"SharpDX": "4.2.0-keen-cringe", "SharpDX": "4.2.0-keen-cringe",
"protobuf-net": "1.0.0" "protobuf-net": "1.0.0"

View File

@@ -468,8 +468,8 @@
}, },
"SpaceEngineersDedicated.ReferenceAssemblies": { "SpaceEngineersDedicated.ReferenceAssemblies": {
"type": "Transitive", "type": "Transitive",
"resolved": "1.204.18", "resolved": "1.205.23",
"contentHash": "GT7/9CBMx4jjor41zLOOl87YYM/JdJD8xp9ccXyuhP2oUaz25H3ZmCQuGeAuZNENKru1a/7hZrId4PwlMDGoew==", "contentHash": "J7mF5hY39PzzCZps6vhIRzKiq8vD6Af9TgumTJR068vjEi+BzyeEFhqX+cl2Dd1ngOmsBtGWc5m+vxgTfs5YuA==",
"dependencies": { "dependencies": {
"SharpDX": "4.2.0-keen-cringe", "SharpDX": "4.2.0-keen-cringe",
"protobuf-net": "1.0.0" "protobuf-net": "1.0.0"
@@ -630,7 +630,7 @@
"NuGet.Commands": "[6.11.0, )", "NuGet.Commands": "[6.11.0, )",
"NuGet.DependencyResolver.Core": "[6.11.0, )", "NuGet.DependencyResolver.Core": "[6.11.0, )",
"SemanticVersioning": "[2.0.2, )", "SemanticVersioning": "[2.0.2, )",
"SpaceEngineersDedicated.ReferenceAssemblies": "[1.204.18, )", "SpaceEngineersDedicated.ReferenceAssemblies": "[1.*, )",
"System.Linq.Async": "[6.0.1, )" "System.Linq.Async": "[6.0.1, )"
} }
}, },

View File

@@ -134,7 +134,7 @@ namespace Torch.Server.Managers
worldPath = DedicatedConfig.Worlds.First().WorldPath; worldPath = DedicatedConfig.Worlds.First().WorldPath;
else else
// make sure we won't end up with a file path when we expect it to be a directory // make sure we won't end up with a file path when we expect it to be a directory
worldPath = Path.EndsInDirectorySeparator(worldPath) ? worldPath : Path.GetDirectoryName(worldPath); worldPath = worldPath.EndsWith(".sbc") ? Path.GetDirectoryName(worldPath) : worldPath;
SelectWorld(worldPath, false); SelectWorld(worldPath, false);
@@ -235,7 +235,7 @@ namespace Torch.Server.Managers
try try
{ {
MyObjectBuilderSerializer.DeserializeXML(sandboxPath, out MyObjectBuilder_Checkpoint checkpoint, out ulong sizeInBytes); MyObjectBuilderSerializerKeen.DeserializeXML(sandboxPath, out MyObjectBuilder_Checkpoint checkpoint, out ulong sizeInBytes);
if (checkpoint == null) if (checkpoint == null)
{ {
Log.Error($"Failed to load {DedicatedConfig.LoadWorld}, checkpoint null ({sizeInBytes} bytes, instance {Torch.Config.InstancePath})"); Log.Error($"Failed to load {DedicatedConfig.LoadWorld}, checkpoint null ({sizeInBytes} bytes, instance {Torch.Config.InstancePath})");
@@ -368,14 +368,14 @@ namespace Torch.Server.Managers
public void LoadSandbox() public void LoadSandbox()
{ {
if (!MyObjectBuilderSerializer.DeserializeXML(_checkpointPath, out MyObjectBuilder_Checkpoint checkpoint)) if (!MyObjectBuilderSerializerKeen.DeserializeXML(_checkpointPath, out MyObjectBuilder_Checkpoint checkpoint))
throw new SerializationException("Error reading checkpoint, see keen log for details"); throw new SerializationException("Error reading checkpoint, see keen log for details");
Checkpoint = new CheckpointViewModel(checkpoint); Checkpoint = new CheckpointViewModel(checkpoint);
// migrate old saves // migrate old saves
if (File.Exists(_worldConfigPath)) if (File.Exists(_worldConfigPath))
{ {
if (!MyObjectBuilderSerializer.DeserializeXML(_worldConfigPath, out MyObjectBuilder_WorldConfiguration worldConfig)) if (!MyObjectBuilderSerializerKeen.DeserializeXML(_worldConfigPath, out MyObjectBuilder_WorldConfiguration worldConfig))
throw new SerializationException("Error reading settings, see keen log for details"); throw new SerializationException("Error reading settings, see keen log for details");
WorldConfiguration = new WorldConfigurationViewModel(worldConfig); WorldConfiguration = new WorldConfigurationViewModel(worldConfig);
} }

View File

@@ -472,8 +472,8 @@
}, },
"SpaceEngineersDedicated.ReferenceAssemblies": { "SpaceEngineersDedicated.ReferenceAssemblies": {
"type": "Transitive", "type": "Transitive",
"resolved": "1.204.18", "resolved": "1.205.23",
"contentHash": "GT7/9CBMx4jjor41zLOOl87YYM/JdJD8xp9ccXyuhP2oUaz25H3ZmCQuGeAuZNENKru1a/7hZrId4PwlMDGoew==", "contentHash": "J7mF5hY39PzzCZps6vhIRzKiq8vD6Af9TgumTJR068vjEi+BzyeEFhqX+cl2Dd1ngOmsBtGWc5m+vxgTfs5YuA==",
"dependencies": { "dependencies": {
"SharpDX": "4.2.0-keen-cringe", "SharpDX": "4.2.0-keen-cringe",
"protobuf-net": "1.0.0" "protobuf-net": "1.0.0"
@@ -581,7 +581,7 @@
"NuGet.Commands": "[6.11.0, )", "NuGet.Commands": "[6.11.0, )",
"NuGet.DependencyResolver.Core": "[6.11.0, )", "NuGet.DependencyResolver.Core": "[6.11.0, )",
"SemanticVersioning": "[2.0.2, )", "SemanticVersioning": "[2.0.2, )",
"SpaceEngineersDedicated.ReferenceAssemblies": "[1.204.18, )", "SpaceEngineersDedicated.ReferenceAssemblies": "[1.*, )",
"System.Linq.Async": "[6.0.1, )" "System.Linq.Async": "[6.0.1, )"
} }
} }

View File

@@ -313,8 +313,8 @@
}, },
"SpaceEngineersDedicated.ReferenceAssemblies": { "SpaceEngineersDedicated.ReferenceAssemblies": {
"type": "Transitive", "type": "Transitive",
"resolved": "1.204.18", "resolved": "1.205.23",
"contentHash": "GT7/9CBMx4jjor41zLOOl87YYM/JdJD8xp9ccXyuhP2oUaz25H3ZmCQuGeAuZNENKru1a/7hZrId4PwlMDGoew==", "contentHash": "J7mF5hY39PzzCZps6vhIRzKiq8vD6Af9TgumTJR068vjEi+BzyeEFhqX+cl2Dd1ngOmsBtGWc5m+vxgTfs5YuA==",
"dependencies": { "dependencies": {
"SharpDX": "4.2.0-keen-cringe", "SharpDX": "4.2.0-keen-cringe",
"protobuf-net": "1.0.0" "protobuf-net": "1.0.0"
@@ -454,7 +454,7 @@
"NuGet.Commands": "[6.11.0, )", "NuGet.Commands": "[6.11.0, )",
"NuGet.DependencyResolver.Core": "[6.11.0, )", "NuGet.DependencyResolver.Core": "[6.11.0, )",
"SemanticVersioning": "[2.0.2, )", "SemanticVersioning": "[2.0.2, )",
"SpaceEngineersDedicated.ReferenceAssemblies": "[1.204.18, )", "SpaceEngineersDedicated.ReferenceAssemblies": "[1.*, )",
"System.Linq.Async": "[6.0.1, )" "System.Linq.Async": "[6.0.1, )"
} }
} }

View File

@@ -10,6 +10,7 @@ using Torch.API;
using Torch.API.Managers; using Torch.API.Managers;
using Torch.Utils; using Torch.Utils;
using VRage.Game; using VRage.Game;
using VRage.GameServices;
using Color = VRageMath.Color; using Color = VRageMath.Color;
namespace Torch.Managers.ChatManager namespace Torch.Managers.ChatManager
@@ -76,7 +77,7 @@ namespace Torch.Managers.ChatManager
_chatMessageRecievedReplacer = _chatMessageReceivedFactory.Invoke(); _chatMessageRecievedReplacer = _chatMessageReceivedFactory.Invoke();
_scriptedChatMessageRecievedReplacer = _scriptedChatMessageReceivedFactory.Invoke(); _scriptedChatMessageRecievedReplacer = _scriptedChatMessageReceivedFactory.Invoke();
_chatMessageRecievedReplacer.Replace( _chatMessageRecievedReplacer.Replace(
new Action<ulong, string, ChatChannel, long, string, ulong?>(Multiplayer_ChatMessageReceived), new Action<ulong, string, ChatChannel, long, ChatMessageCustomData?>(Multiplayer_ChatMessageReceived),
MyMultiplayer.Static); MyMultiplayer.Static);
_scriptedChatMessageRecievedReplacer.Replace( _scriptedChatMessageRecievedReplacer.Replace(
new Action<string, string, string, Color>(Multiplayer_ScriptedChatMessageReceived), new Action<string, string, string, Color>(Multiplayer_ScriptedChatMessageReceived),
@@ -133,14 +134,14 @@ namespace Torch.Managers.ChatManager
} }
private void Multiplayer_ChatMessageReceived(ulong steamUserId, string messageText, ChatChannel channel, long targetId, string customAuthorName, ulong? customSenderId = null) private void Multiplayer_ChatMessageReceived(ulong steamUserId, string messageText, ChatChannel channel, long targetId, ChatMessageCustomData? customData )
{ {
#pragma warning disable CS0612 #pragma warning disable CS0612
var torchMsg = new TorchChatMessage(steamUserId, messageText, channel, targetId, var torchMsg = new TorchChatMessage(steamUserId, messageText, channel, targetId,
#pragma warning restore CS0612 #pragma warning restore CS0612
(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, messageText, channel, targetId, customAuthorName, customSenderId); _hudChatMessageReceived.Invoke(MyHud.Chat, steamUserId, messageText, channel, targetId, customData);
} }
private void Multiplayer_ScriptedChatMessageReceived(string message, string author, string font, Color color) private void Multiplayer_ScriptedChatMessageReceived(string message, string author, string font, Color color)
@@ -165,7 +166,7 @@ namespace Torch.Managers.ChatManager
protected static bool HasHud => !Sandbox.Engine.Platform.Game.IsDedicated; protected static bool HasHud => !Sandbox.Engine.Platform.Game.IsDedicated;
[ReflectedMethod(Name = _hudChatMessageReceivedName)] [ReflectedMethod(Name = _hudChatMessageReceivedName)]
private static Action<MyHudChat, ulong, string, ChatChannel, long, string, ulong?> _hudChatMessageReceived = null!; private static Action<MyHudChat, ulong, string, ChatChannel, long, ChatMessageCustomData?> _hudChatMessageReceived = null!;
[ReflectedMethod(Name = _hudChatScriptedMessageReceivedName)] [ReflectedMethod(Name = _hudChatScriptedMessageReceivedName)]
private static Action<MyHudChat, string, string, string, Color> _hudChatScriptedMessageReceived = null!; private static Action<MyHudChat, string, string, string, Color> _hudChatScriptedMessageReceived = null!;

View File

@@ -314,8 +314,8 @@
}, },
"SpaceEngineersDedicated.ReferenceAssemblies": { "SpaceEngineersDedicated.ReferenceAssemblies": {
"type": "Transitive", "type": "Transitive",
"resolved": "1.204.18", "resolved": "1.205.23",
"contentHash": "GT7/9CBMx4jjor41zLOOl87YYM/JdJD8xp9ccXyuhP2oUaz25H3ZmCQuGeAuZNENKru1a/7hZrId4PwlMDGoew==", "contentHash": "J7mF5hY39PzzCZps6vhIRzKiq8vD6Af9TgumTJR068vjEi+BzyeEFhqX+cl2Dd1ngOmsBtGWc5m+vxgTfs5YuA==",
"dependencies": { "dependencies": {
"SharpDX": "4.2.0-keen-cringe", "SharpDX": "4.2.0-keen-cringe",
"protobuf-net": "1.0.0" "protobuf-net": "1.0.0"
@@ -387,7 +387,7 @@
"NuGet.Commands": "[6.11.0, )", "NuGet.Commands": "[6.11.0, )",
"NuGet.DependencyResolver.Core": "[6.11.0, )", "NuGet.DependencyResolver.Core": "[6.11.0, )",
"SemanticVersioning": "[2.0.2, )", "SemanticVersioning": "[2.0.2, )",
"SpaceEngineersDedicated.ReferenceAssemblies": "[1.204.18, )", "SpaceEngineersDedicated.ReferenceAssemblies": "[1.*, )",
"System.Linq.Async": "[6.0.1, )" "System.Linq.Async": "[6.0.1, )"
} }
} }