Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding popup messages for errors with status codes alongside the exception message #2116

Closed
wants to merge 39 commits into from
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
39 commits
Select commit Hold shift + click to select a range
59924de
Initial commit to open PR
OhmV-IR Jan 16, 2024
2bc36cb
Added enum for status codes and function to print them
OhmV-IR Jan 17, 2024
a4afd49
Use integer enum overload
OhmV-IR Jan 18, 2024
3651990
Added project reference and status codes for NitroxConfig.cs
OhmV-IR Jan 26, 2024
cd4392c
Added error messages in a popup for nitroxModel
OhmV-IR Feb 4, 2024
4aaf86d
fix missing import statements so the solution can build
OhmV-IR Feb 4, 2024
6fb3a87
added a better messageBox dialog to display status code errors
OhmV-IR Feb 4, 2024
7488213
moved display status code enum out of nitrox server into new files in…
OhmV-IR Feb 5, 2024
6b23109
MORE FUNCTION CALLS
OhmV-IR Feb 6, 2024
60e673a
added more descriptive names for statusCodes in the files and moved s…
OhmV-IR Feb 12, 2024
e76df2f
Finished adding statusCode calls to NitroxClient
OhmV-IR Feb 12, 2024
388fd96
Check if nitroxLauncher is in a oneDrive folder implementation
OhmV-IR Feb 14, 2024
741099a
Added fatal flag to statusCode function calls
OhmV-IR Feb 20, 2024
ca8a205
Added exception message to StatusCode messageBox
OhmV-IR Feb 20, 2024
051f09a
Added exception messages to PrintStatusCode <- server status codes fu…
OhmV-IR Feb 20, 2024
df46194
Merge pull request #1 from OhmV-IR/inDev
OhmV-IR Feb 20, 2024
2a03491
removed unused isPirate bool in CustomMessagebox.cs
OhmV-IR Feb 20, 2024
9f3e552
Added test fail case for FatalStatusCodes and removed success status …
OhmV-IR Feb 20, 2024
219ef4e
Added text wrapping so that the exception message does not exceed the…
OhmV-IR Feb 21, 2024
cb86f5c
Change statusCode enum to use HTTP status codes and condense redundan…
OhmV-IR Feb 22, 2024
5ca499c
Changed enum names to follow upper snake case convention
OhmV-IR Feb 22, 2024
4a2bf7c
Changed SYNC_FAIL to use a different code than MISSING_FEATURE
OhmV-IR Feb 22, 2024
973015b
Fixed a typo that caused build errors
OhmV-IR Feb 22, 2024
a23a8ed
Added some more comments and finished unit testing, just need to play…
OhmV-IR Feb 24, 2024
f778fe1
Change enum names, use HTTP status codes, unit tests, should be ready…
OhmV-IR Feb 24, 2024
81cce0e
Client disconnects are never recognized as fatal, even if they happen…
OhmV-IR Feb 24, 2024
fc0e7dd
Merge branch 'prod-status-codes' into polishing-status-codes
OhmV-IR Feb 27, 2024
3ba4bbf
Added missing using statement
OhmV-IR Feb 27, 2024
c0b9278
Removed unneeded comments
OhmV-IR Mar 12, 2024
ace18b4
removed a useless comment
OhmV-IR Mar 17, 2024
0b542eb
Removed some usings and fixed using assemblies that had not yet been …
OhmV-IR Mar 18, 2024
1b2cb10
Merge branch 'polishing-status-codes' into master
OhmV-IR Mar 19, 2024
57b8ea2
Merge pull request #6 from OhmV-IR/master
OhmV-IR Mar 19, 2024
0137f03
Removed fatal program closes(its just bad design to end execution so …
OhmV-IR Mar 20, 2024
2baf570
Use Log.InGame for less important codes when in InDev and ignore the …
OhmV-IR Mar 20, 2024
505da81
Fixed creating release builds
OhmV-IR Mar 20, 2024
20b28f7
Changed ingame log string + removed unneeded reference in NitroxLauncher
OhmV-IR Mar 20, 2024
5a1f315
Added more function calls
OhmV-IR Mar 24, 2024
5db1930
Small fixes
OhmV-IR Mar 25, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Small fixes
  • Loading branch information
OhmV-IR committed Mar 25, 2024
commit 5db1930b5196d5c4dcb5d6439311383aa0938013
2 changes: 1 addition & 1 deletion NitroxLauncher/LauncherLogic.cs
Original file line number Diff line number Diff line change
Expand Up @@ -317,7 +317,7 @@ private void OnSubnauticaExited(object sender, EventArgs e)
}
catch (Exception ex)
{
DisplayStatusCode(StatusCode.INJECTION_FAIL, "Unhandled exception while trying to inject Nitrox: " + ex.ToString());
DisplayStatusCode(StatusCode.INJECTION_FAIL, "Unhandled exception while trying to remove the Nitrox patch: " + ex.ToString());
}
}

Expand Down
4 changes: 2 additions & 2 deletions NitroxLauncher/LauncherNotifier.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
using ToastNotifications.Position;
using ToastNotifications.Messages;
using ToastNotifications.Core;

using static NitroxModel.DisplayStatusCodes;
namespace NitroxLauncher
{
internal static class LauncherNotifier
Expand Down Expand Up @@ -45,7 +45,7 @@ public static void Setup()
}
else
{
Log.Error("Notifier is already set up");
DisplayStatusCode(StatusCode.INVALID_FUNCTION_CALL, "Notifier is already set up");
}
}

Expand Down
6 changes: 3 additions & 3 deletions NitroxLauncher/Models/Patching/NitroxEntryPatch.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using System;
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
Expand All @@ -7,7 +7,7 @@
using dnlib.DotNet.Emit;
using NitroxModel.Platforms.OS.Shared;
using FileAttributes = System.IO.FileAttributes;

using static NitroxModel.DisplayStatusCodes;
namespace NitroxLauncher.Models.Patching
{
internal sealed class NitroxEntryPatch
Expand Down Expand Up @@ -66,7 +66,7 @@ public void Apply()
Exception error = RetryWait(() => File.Delete(assemblyCSharp), 100, 5);
if (error != null)
{
throw error;
DisplayStatusCode(StatusCode.MISC_UNHANDLED_EXCEPTION, error.Message);
}
FileSystem.Instance.ReplaceFile(modifiedAssemblyCSharp, assemblyCSharp);
}
Expand Down
2 changes: 1 addition & 1 deletion NitroxLauncher/Models/Utils/WindowsHelper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ internal static void RestartAsAdmin()
}
catch (Exception ex)
{
DisplayStatusCode(StatusCode.PRIVILEGES_ERR, "Error while trying to instantiate an admin process of the launcher, aborting");
DisplayStatusCode(StatusCode.PRIVILEGES_ERR, "Error while trying to instantiate an admin process of the launcher, aborting. " + ex.Message);
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion NitroxLauncher/ServerLogic.cs
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ internal void SendServerCommand(string inputText)
}
catch (Exception ex)
{
Log.Error(ex);
PrintStatusCode(StatusCode.MISC_UNHANDLED_EXCEPTION, ex.Message);
}
}

Expand Down
2 changes: 1 addition & 1 deletion NitroxServer/Communication/NitroxServer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ protected void ProcessIncomingData(INitroxConnection connection, Packet packet)
}
catch (Exception ex)
{
PrintStatusCode(StatusCode.MISC_UNHANDLED_EXCEPTION, ex.Message + $"Exception while processing packet: {packet}");
//PrintStatusCode(StatusCode.MISC_UNHANDLED_EXCEPTION, ex.Message + $"Exception while processing packet: {packet}");
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion NitroxServer/Communication/Packets/PacketHandler.cs
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ private void ProcessUnauthenticated(Packet packet, INitroxConnection connection)
}
catch (Exception ex)
{
PrintStatusCode(StatusCode.MISC_UNHANDLED_EXCEPTION, $"Error in packet processor {processor.GetType()}" + ex.Message);
//PrintStatusCode(StatusCode.MISC_UNHANDLED_EXCEPTION, $"Error in packet processor {processor.GetType()}" + ex.Message);
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ public override void Process(Packet packet, Player player)

if (defaultPacketProcessorBlacklist.Contains(packet.GetType()))
{
PrintStatusCode(StatusCode.INVALID_PACKET, $"Player {player.Name} [{player.Id}] sent a packet which is blacklisted by the server. It's likely that the said player is using a modified version of Nitrox and action could be taken accordingly.");
//PrintStatusCode(StatusCode.INVALID_PACKET, $"Player {player.Name} [{player.Id}] sent a packet which is blacklisted by the server. It's likely that the said player is using a modified version of Nitrox and action could be taken accordingly.");
return;
}
playerManager.SendPacketToOtherPlayers(packet, player);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ public override void Process(EntityMetadataUpdate packet, Player sendingPlayer)
}
else
{
PrintStatusCode(StatusCode.INVALID_PACKET, $"Entity metadata updated on an entity unknown to the server {packet.Id} {packet.NewValue.GetType()} ");
//PrintStatusCode(StatusCode.INVALID_PACKET, $"Entity metadata updated on an entity unknown to the server {packet.Id} {packet.NewValue.GetType()} ");
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ public override void Process(FMODAssetPacket packet, Player sendingPlayer)
{
if (!fmodWhitelist.TryGetSoundData(packet.AssetPath, out SoundData soundData))
{
PrintStatusCode(StatusCode.INVALID_PACKET, $"[{nameof(FMODAssetProcessor)}] Whitelist has no item for {packet.AssetPath}.");
//PrintStatusCode(StatusCode.INVALID_PACKET, $"[{nameof(FMODAssetProcessor)}] Whitelist has no item for {packet.AssetPath}.");
return;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,13 @@ public override void Process(VehicleDocking packet, Player player)
{
if (!entityRegistry.TryGetEntityById(packet.VehicleId, out Entity vehicleEntity))
{
PrintStatusCode(StatusCode.INVALID_PACKET, $"Unable to find vehicle to dock {packet.VehicleId}");
//PrintStatusCode(StatusCode.INVALID_PACKET, $"Unable to find vehicle to dock {packet.VehicleId}");
return;
}

if (!entityRegistry.TryGetEntityById(packet.DockId, out Entity dockEntity))
{
PrintStatusCode(StatusCode.INVALID_PACKET, $"Unable to find dock {packet.DockId} for docking vehicle {packet.VehicleId}");
//PrintStatusCode(StatusCode.INVALID_PACKET, $"Unable to find dock {packet.DockId} for docking vehicle {packet.VehicleId}");
return;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,13 @@ public override void Process(VehicleUndocking packet, Player player)
{
if (!entityRegistry.TryGetEntityById(packet.VehicleId, out Entity vehicleEntity))
{
PrintStatusCode(StatusCode.INVALID_PACKET, $"Unable to find vehicle to undock {packet.VehicleId}");
//PrintStatusCode(StatusCode.INVALID_PACKET, $"Unable to find vehicle to undock {packet.VehicleId}");
return;
}

if (!entityRegistry.GetEntityById(vehicleEntity.ParentId).HasValue)
{
PrintStatusCode(StatusCode.INVALID_PACKET, $"Unable to find docked vehicles parent {vehicleEntity.ParentId} to undock from");
//PrintStatusCode(StatusCode.INVALID_PACKET, $"Unable to find docked vehicles parent {vehicleEntity.ParentId} to undock from");
return;
}

Expand Down
2 changes: 1 addition & 1 deletion NitroxServer/ConsoleCommands/ConfigCommand.cs
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ protected override void Execute(CallArgs args)
#if DEBUG
if (t.Exception != null)
{
PrintStatusCode(StatusCode.FILE_SYSTEM_ERR, t.Exception.ToString());
//PrintStatusCode(StatusCode.FILE_SYSTEM_ERR, t.Exception.ToString());
}
#endif
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ public ConsoleCommandProcessor(IEnumerable<Command> cmds)
{
if (commands.ContainsKey(cmd.Name))
{
PrintStatusCode(StatusCode.INVALID_FUNCTION_CALL, $"Command {cmd.Name} is registered multiple times.");
//PrintStatusCode(StatusCode.INVALID_FUNCTION_CALL, $"Command {cmd.Name} is registered multiple times.");
}

commands[cmd.Name] = cmd;
Expand All @@ -27,7 +27,7 @@ public ConsoleCommandProcessor(IEnumerable<Command> cmds)
{
if (commands.ContainsKey(alias))
{
PrintStatusCode(StatusCode.INVALID_FUNCTION_CALL, $"Command {alias} is registered multiple times.");
//PrintStatusCode(StatusCode.INVALID_FUNCTION_CALL, $"Command {alias} is registered multiple times.");
}
commands[alias] = cmd;
}
Expand Down
4 changes: 2 additions & 2 deletions NitroxServer/ConsoleCommands/RestartCommand.cs
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,14 @@ protected override void Execute(CallArgs args)
{
if (Debugger.IsAttached)
{
PrintStatusCode(StatusCode.INVALID_FUNCTION_CALL, "Cannot restart server while debugger is attached.");
//PrintStatusCode(StatusCode.INVALID_FUNCTION_CALL, "Cannot restart server while debugger is attached.");
return;
}

string program = Process.GetCurrentProcess().MainModule?.FileName;
if (program == null)
{
PrintStatusCode(StatusCode.FILE_SYSTEM_ERR, "Failed to get location of server.");
//PrintStatusCode(StatusCode.FILE_SYSTEM_ERR, "Failed to get location of server.");
return;
}

Expand Down
38 changes: 19 additions & 19 deletions NitroxServer/GameLogic/Bases/BuildingManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ public bool AddGhost(PlaceGhost placeGhost)
{
if (entityRegistry.GetEntityById(ghostEntity.Id).HasValue)
{
PrintStatusCode(StatusCode.SUBNAUTICA_ERROR, $"Trying to add a ghost to Global Root but another entity with the same id already exists (GhostId: {ghostEntity.Id})");
//PrintStatusCode(StatusCode.SUBNAUTICA_ERROR, $"Trying to add a ghost to Global Root but another entity with the same id already exists (GhostId: {ghostEntity.Id})");
return false;
}

Expand All @@ -42,17 +42,17 @@ public bool AddGhost(PlaceGhost placeGhost)

if (!entityRegistry.TryGetEntityById(ghostEntity.ParentId, out Entity parentEntity))
{
PrintStatusCode(StatusCode.INVALID_PACKET, $"Trying to add a ghost to a build that isn't registered (ParentId: {ghostEntity.ParentId})");
//PrintStatusCode(StatusCode.INVALID_PACKET, $"Trying to add a ghost to a build that isn't registered (ParentId: {ghostEntity.ParentId})");
return false;
}
if (parentEntity is not BuildEntity)
{
PrintStatusCode(StatusCode.SUBNAUTICA_ERROR, $"Trying to add a ghost to an entity that is not a building (ParentId: {ghostEntity.ParentId})");
//PrintStatusCode(StatusCode.SUBNAUTICA_ERROR, $"Trying to add a ghost to an entity that is not a building (ParentId: {ghostEntity.ParentId})");
return false;
}
if (parentEntity.ChildEntities.Any(childEntity => childEntity.Id.Equals(ghostEntity.Id)))
{
PrintStatusCode(StatusCode.INVALID_PACKET, $"Trying to add a ghost to a building but another child with the same id already exists (GhostId: {ghostEntity.Id})");
//PrintStatusCode(StatusCode.INVALID_PACKET, $"Trying to add a ghost to a building but another child with the same id already exists (GhostId: {ghostEntity.Id})");
return false;
}

Expand All @@ -67,7 +67,7 @@ public bool AddModule(PlaceModule placeModule)
{
if (entityRegistry.GetEntityById(moduleEntity.Id).HasValue)
{
PrintStatusCode(StatusCode.INVALID_PACKET, $"Trying to add a module to Global Root but another entity with the same id already exists ({moduleEntity.Id})");
//PrintStatusCode(StatusCode.INVALID_PACKET, $"Trying to add a module to Global Root but another entity with the same id already exists ({moduleEntity.Id})");
return false;
}

Expand All @@ -77,17 +77,17 @@ public bool AddModule(PlaceModule placeModule)

if (!entityRegistry.TryGetEntityById(moduleEntity.ParentId, out Entity parentEntity))
{
PrintStatusCode(StatusCode.INVALID_PACKET, $"Trying to add a module to a build that isn't registered (ParentId: {moduleEntity.ParentId})");
//PrintStatusCode(StatusCode.INVALID_PACKET, $"Trying to add a module to a build that isn't registered (ParentId: {moduleEntity.ParentId})");
return false;
}
if (parentEntity is not BuildEntity && parentEntity is not VehicleWorldEntity)
{
PrintStatusCode(StatusCode.INVALID_PACKET, $"Trying to add a module to an entity that is not a building/vehicle (ParentId: {moduleEntity.ParentId})");
//PrintStatusCode(StatusCode.INVALID_PACKET, $"Trying to add a module to an entity that is not a building/vehicle (ParentId: {moduleEntity.ParentId})");
return false;
}
if (parentEntity.ChildEntities.Any(childEntity => childEntity.Id.Equals(moduleEntity.Id)))
{
PrintStatusCode(StatusCode.INVALID_PACKET, $"Trying to add a module to a building but another child with the same id already exists (ModuleId: {moduleEntity.Id})");
//PrintStatusCode(StatusCode.INVALID_PACKET, $"Trying to add a module to a building but another child with the same id already exists (ModuleId: {moduleEntity.Id})");
return false;
}

Expand All @@ -99,12 +99,12 @@ public bool ModifyConstructedAmount(ModifyConstructedAmount modifyConstructedAmo
{
if (!entityRegistry.TryGetEntityById(modifyConstructedAmount.GhostId, out Entity entity))
{
PrintStatusCode(StatusCode.INVALID_PACKET, $"Trying to modify the constructed amount of a non-registered object (GhostId: {modifyConstructedAmount.GhostId})");
//PrintStatusCode(StatusCode.INVALID_PACKET, $"Trying to modify the constructed amount of a non-registered object (GhostId: {modifyConstructedAmount.GhostId})");
return false;
}
if (entity is not GhostEntity && entity is not ModuleEntity)
{
PrintStatusCode(StatusCode.INVALID_PACKET, $"Trying to modify the constructed amount of an entity that is not a ghost (Id: {modifyConstructedAmount.GhostId})");
//PrintStatusCode(StatusCode.INVALID_PACKET, $"Trying to modify the constructed amount of an entity that is not a ghost (Id: {modifyConstructedAmount.GhostId})");
return false;
}
if (modifyConstructedAmount.ConstructedAmount == 0f)
Expand All @@ -129,12 +129,12 @@ public bool CreateBase(PlaceBase placeBase)
{
if (!entityRegistry.TryGetEntityById(placeBase.FormerGhostId, out Entity entity))
{
PrintStatusCode(StatusCode.INVALID_PACKET, $"Trying to place a base from a non-registered ghost (Id: {placeBase.FormerGhostId})");
//PrintStatusCode(StatusCode.INVALID_PACKET, $"Trying to place a base from a non-registered ghost (Id: {placeBase.FormerGhostId})");
return false;
}
if (entity is not GhostEntity)
{
PrintStatusCode(StatusCode.INVALID_PACKET, $"Trying to add a new build to Global Root but another build with the same id already exists (GhostId: {placeBase.FormerGhostId})");
//PrintStatusCode(StatusCode.INVALID_PACKET, $"Trying to add a new build to Global Root but another build with the same id already exists (GhostId: {placeBase.FormerGhostId})");
return false;
}

Expand All @@ -147,13 +147,13 @@ public bool UpdateBase(Player player, UpdateBase updateBase, out int operationId
{
if (!entityRegistry.TryGetEntityById<GhostEntity>(updateBase.FormerGhostId, out _))
{
PrintStatusCode(StatusCode.INVALID_PACKET, $"Trying to place a base from a non-registered ghost (GhostId: {updateBase.FormerGhostId})");
//PrintStatusCode(StatusCode.INVALID_PACKET, $"Trying to place a base from a non-registered ghost (GhostId: {updateBase.FormerGhostId})");
operationId = -1;
return false;
}
if (!entityRegistry.TryGetEntityById(updateBase.BaseId, out BuildEntity buildEntity))
{
PrintStatusCode(StatusCode.INVALID_PACKET, $"Trying to update a non-registered build (BaseId: {updateBase.BaseId})");
//PrintStatusCode(StatusCode.INVALID_PACKET, $"Trying to update a non-registered build (BaseId: {updateBase.BaseId})");
operationId = -1;
return false;
}
Expand Down Expand Up @@ -223,7 +223,7 @@ public bool ReplaceBaseByGhost(BaseDeconstructed baseDeconstructed)
{
if (!entityRegistry.TryGetEntityById(baseDeconstructed.FormerBaseId, out BuildEntity _))
{
PrintStatusCode(StatusCode.INVALID_PACKET, $"Trying to replace a non-registered build (BaseId: {baseDeconstructed.FormerBaseId})");
//PrintStatusCode(StatusCode.INVALID_PACKET, $"Trying to replace a non-registered build (BaseId: {baseDeconstructed.FormerBaseId})");
return false;
}

Expand All @@ -236,14 +236,14 @@ public bool ReplacePieceByGhost(Player player, PieceDeconstructed pieceDeconstru
{
if (!entityRegistry.TryGetEntityById(pieceDeconstructed.BaseId, out BuildEntity buildEntity))
{
PrintStatusCode(StatusCode.INVALID_PACKET, $"Trying to replace a non-registered build (BaseId: {pieceDeconstructed.BaseId})");
//PrintStatusCode(StatusCode.INVALID_PACKET, $"Trying to replace a non-registered build (BaseId: {pieceDeconstructed.BaseId})");
removedEntity = null;
operationId = -1;
return false;
}
if (entityRegistry.TryGetEntityById(pieceDeconstructed.PieceId, out GhostEntity _))
{
PrintStatusCode(StatusCode.INVALID_PACKET, $"Trying to add a ghost to a building but another ghost child with the same id already exists (GhostId: {pieceDeconstructed.PieceId})");
//PrintStatusCode(StatusCode.INVALID_PACKET, $"Trying to add a ghost to a building but another ghost child with the same id already exists (GhostId: {pieceDeconstructed.PieceId})");
removedEntity = null;
operationId = -1;
return false;
Expand Down Expand Up @@ -273,12 +273,12 @@ public bool CreateWaterParkPiece(WaterParkDeconstructed waterParkDeconstructed,
{
if (!entityRegistry.TryGetEntityById(waterParkDeconstructed.BaseId, out Entity entity) || entity is not BuildEntity buildEntity)
{
PrintStatusCode(StatusCode.INVALID_PACKET, $"Trying to create a WaterPark piece in a non-registered build ({waterParkDeconstructed.BaseId})");
//PrintStatusCode(StatusCode.INVALID_PACKET, $"Trying to create a WaterPark piece in a non-registered build ({waterParkDeconstructed.BaseId})");
return false;
}
if (buildEntity.ChildEntities.Any(childEntity => childEntity.Id.Equals(waterParkDeconstructed.NewWaterPark.Id)))
{
PrintStatusCode(StatusCode.SUBNAUTICA_ERROR, $"Trying to create a WaterPark piece with an already registered id ({waterParkDeconstructed.NewWaterPark.Id})");
//PrintStatusCode(StatusCode.SUBNAUTICA_ERROR, $"Trying to create a WaterPark piece with an already registered id ({waterParkDeconstructed.NewWaterPark.Id})");
return false;
}
InteriorPieceEntity newPiece = waterParkDeconstructed.NewWaterPark;
Expand Down
Loading