Skip to content

Commit 156ba80

Browse files
committed
Added message for newest version upon server start
1 parent 2286395 commit 156ba80

File tree

3 files changed

+16
-2
lines changed

3 files changed

+16
-2
lines changed

NitroxModel/Helper/NitroxUser.cs

+1
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,7 @@ public static string GamePath
7878
string path = GameInstallationFinder.Instance.FindGame(errors);
7979
if (!string.IsNullOrWhiteSpace(path) && Directory.Exists(path))
8080
{
81+
GamePlatform = GamePlatforms.GetPlatformByGameDir(path);
8182
return gamePath = path;
8283
}
8384

NitroxServer-Subnautica/Program.cs

+13
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,19 @@ private static async Task StartServer(string[] args)
8282
});
8383
}
8484

85+
if (NitroxUser.IsNewestSubnautica.GetValueOrDefault(false))
86+
{
87+
Log.Error("Due to Subnautica's recent update \"Living Large\", Nitrox is currently not compatible. However you can still use older version of Subnautica in order to play Nitrox. You can do so by following these steps");
88+
89+
if (NitroxUser.GamePlatform?.Platform == Platform.STEAM)
90+
{
91+
Log.Warn("ENSURE NITROX AND SUBNAUTICA ARE CLOSED BEFORE PROCEEDING!");
92+
Log.Warn("Changing Subnautica to Legacy Build on STEAM:\n1. Right click Subnautica in Steam\n2. Click Properties\n3. Click Betas\n4. Select Legacy - Public legacy builds\n5. Close it out and let Steam download and install the Legacy version of Subnautica\n6. Run Subnautica through Steam (It will say \"Subnautica [legacy]\" in your library if you did it right)\n7. Launch Subnautica through Nitrox to play.");
93+
}
94+
95+
throw new Exception("Unable to start server, Nitrox isn't compatible with this Subnautica version");
96+
}
97+
8598
NitroxServiceLocator.InitializeDependencyContainer(new SubnauticaServerAutoFacRegistrar());
8699
NitroxServiceLocator.BeginNewLifetimeScope();
87100

NitroxServer/Server.cs

+2-2
Original file line numberDiff line numberDiff line change
@@ -54,13 +54,13 @@ public Server(WorldPersistence worldPersistence, World world, ServerConfig serve
5454

5555
public string GetSaveSummary(Perms viewerPerms = Perms.CONSOLE)
5656
{
57-
// TODO: Extend summary with more useful save file data
58-
// Note for later additions: order these lines by their length
5957
StringBuilder builder = new("\n");
58+
6059
if (viewerPerms is Perms.CONSOLE)
6160
{
6261
builder.AppendLine($" - Save location: {Path.GetFullPath(serverConfig.SaveName)}");
6362
}
63+
6464
builder.AppendLine($" - Aurora's state: {world.EventTriggerer.GetAuroraStateSummary()}");
6565
builder.AppendLine($" - Current time: day {world.EventTriggerer.Day} ({Math.Floor(world.EventTriggerer.ElapsedSeconds)}s)");
6666
builder.AppendLine($" - Scheduled goals stored: {world.GameData.StoryGoals.ScheduledGoals.Count}");

0 commit comments

Comments
 (0)