Skip to content

Commit

Permalink
Address request changes and bugs
Browse files Browse the repository at this point in the history
  • Loading branch information
Jannify committed May 10, 2024
1 parent cfbe84c commit 8306604
Show file tree
Hide file tree
Showing 6 changed files with 22 additions and 36 deletions.
15 changes: 6 additions & 9 deletions Nitrox.Assets.Subnautica/LanguageFiles/en.json
Original file line number Diff line number Diff line change
@@ -1,14 +1,11 @@
{
"Nitrox_AddServer": "Add Server",
"Nitrox_AddServer_NameDescription": "Name:",
"Nitrox_AddServer_AddressDescription": "Host:",
"Nitrox_AddServer_PortDescription": "Port:",
"Nitrox_AddServer_NamePlaceholder": "Enter a name for the server",
"Nitrox_AddServer_AddressPlaceholder": "Enter the IP or address of the server",
"Nitrox_AddServer_PortPlaceholder": "Enter the numeric port of the server",
"Nitrox_AddServer_Confirm": "Create server",
"Nitrox_AddServer_Back": "Back",
"Nitrox_AddServer_InvalidInput": "You input is invalid. Please check if all text boxes are filled out.",
"Nitrox_AddServerAdd": "Add",
"Nitrox_AddServerHost": "Host:",
"Nitrox_AddServerName": "Name:",
"Nitrox_AddServerPort": "Port:",
"Nitrox_BuildingDesyncDetected": "Server detected a desync with the local client's buildings (go to Nitrox settings to request a resync)",
"Nitrox_BuildingSettings": "Base building",
"Nitrox_Cancel": "Cancel",
"Nitrox_CommandNotAvailable": "This command is not available in Nitrox",
"Nitrox_ConnectTo": "Connect to",
Expand Down
1 change: 0 additions & 1 deletion NitroxClient/GameLogic/Settings/NitroxSettingsManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,6 @@ private void MakeSettings()
BuildingHandler.Main.AskForResync();
}
}));
MainMenuServerListPanel.Main.RefreshServerEntries();

AddSetting("Nitrox_BuildingSettings", new Setting("Nitrox_SafeBuilding", NitroxPrefs.SafeBuilding, safe => NitroxPrefs.SafeBuilding.Value = safe));
AddSetting("Nitrox_BuildingSettings", new Setting("Nitrox_SafeBuildingLog", NitroxPrefs.SafeBuildingLog, safeLog => NitroxPrefs.SafeBuildingLog.Value = safeLog));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ private static void OnCancelClick()

public void UpdatePanelValues(string ip, string playerName, Vector3 hsb)
{
header.text = $" {Language.main.Get("Nitrox_JoinServer")}{ip}";
header.text = $" {Language.main.Get("Nitrox_JoinServer")} {ip}";
playerNameInputField.text = playerName;
colorPicker.SetHSB(hsb);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,13 @@ public void Setup(GameObject savedGamesRef)

CreateAddServerButton();
LoadSavedServers();
_ = FindLANServersAsync();
FindLANServersAsync().ContinueWith(t =>
{
if (t is { IsFaulted: true, Exception: { } ex })
{
Log.Warn($"Failed to execute FindLANServersAsync: {ex.GetFirstNonAggregateMessage()}");
}
});
}

public bool OnButtonDown(GameInput.Button button)
Expand Down Expand Up @@ -272,6 +278,12 @@ public void RefreshServerEntries()

CreateAddServerButton();
LoadSavedServers();
_ = FindLANServersAsync();
FindLANServersAsync().ContinueWith(t =>
{
if (t is { IsFaulted: true, Exception: { } ex })
{
Log.Warn($"Failed to execute FindLANServersAsync: {ex.GetFirstNonAggregateMessage()}");
}
});
}
}
2 changes: 1 addition & 1 deletion NitroxModel/Core/NitroxServiceLocator.cs
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ private static T LocateServicePreLifetimeAndRegister()
/// <summary>
/// Invalidates the cache for type <see cref="T" />. The next <see cref="Value" /> access will request from <see cref="NitroxServiceLocator" /> again.
/// </summary>
public static void Invalidate(object _, EventArgs __)
private static void Invalidate(object _, EventArgs __)
{
value = null;
LifetimeScopeEnded -= Invalidate;
Expand Down

This file was deleted.

0 comments on commit 8306604

Please sign in to comment.