fix previous commit

This commit is contained in:
JohnCorby 2023-05-06 18:49:40 -07:00
parent 033615bfdc
commit e31148c45c
4 changed files with 51 additions and 37 deletions

View File

@ -111,7 +111,7 @@ internal class MenuManager : MonoBehaviour, IAddComponentOnStart
_nowLoadingSB.Length = 0;
}
private void OnLanguageChanged()
public void OnLanguageChanged()
{
if (QSBSceneManager.CurrentScene != OWScene.TitleScreen)
{

View File

@ -157,8 +157,6 @@ public class QSBCore : ModBehaviour
if (DebugSettings.AutoStart)
{
UseKcpTransport = true;
Helper.Config.SetSettingsValue("UseKcpTransport", UseKcpTransport);
Helper.Storage.Save(Helper.Config, Constants.ModConfigFileName);
DebugSettings.DebugMode = true;
}

View File

@ -12,6 +12,7 @@ using QSB.EchoesOfTheEye.EclipseDoors.VariableSync;
using QSB.EchoesOfTheEye.EclipseElevators.VariableSync;
using QSB.EchoesOfTheEye.RaftSync.TransformSync;
using QSB.JellyfishSync.TransformSync;
using QSB.Menus;
using QSB.Messaging;
using QSB.ModelShip;
using QSB.ModelShip.TransformSync;
@ -165,10 +166,18 @@ public class QSBNetworkManager : NetworkManager, IAddComponentOnStart
public static void UpdateTransport()
{
if (!QSBCore.IsInMultiplayer)
if (QSBCore.IsInMultiplayer)
{
return;
}
if (singleton != null)
{
singleton.transport = QSBCore.UseKcpTransport ? _kcpTransport : _eosTransport;
}
if (MenuManager.Instance != null)
{
MenuManager.Instance.OnLanguageChanged(); // hack to update text
}
}
private void InitPlayerName() =>

View File

@ -1,35 +1,42 @@
{
"enabled": true,
"settings": {
"defaultServerIP": {
"title": "Last Entered IP/ID",
"type": "text",
"value": "localhost",
"tooltip": "Used if you leave the connect prompt blank."
},
"incompatibleModsAllowed": {
"title": "Incompatible Mods Allowed",
"type": "toggle",
"value": false,
"tooltip": "Kicks players if they have certain mods."
},
"showPlayerNames": {
"title": "Show Player Names",
"type": "toggle",
"value": true,
"tooltip": "Shows player names in the HUD and the map view."
},
"shipDamage": {
"title": "Ship Damage",
"type": "toggle",
"value": true,
"tooltip": "Take impact damage when inside the ship."
},
"showExtraHud": {
"title": "Show Extra HUD Elements",
"type": "toggle",
"value": true,
"tooltip" : "Show extra HUD elements, like player status and minimap icons."
}
}
"$schema": "https://raw.githubusercontent.com/ow-mods/owml/master/schemas/config_schema.json",
"enabled": true,
"settings": {
"useKcpTransport": {
"title": "Use KCP Transport",
"type": "toggle",
"value": false,
"tooltip": "Use alternative transport that requires port forwarding but seems to be more reliable. The port to forward is 7777. Use this if you are having trouble connecting."
},
"defaultServerIP": {
"title": "Last Entered IP/ID",
"type": "text",
"value": "localhost",
"tooltip": "Used if you leave the connect prompt blank."
},
"incompatibleModsAllowed": {
"title": "Incompatible Mods Allowed",
"type": "toggle",
"value": false,
"tooltip": "Kicks players if they have certain mods."
},
"showPlayerNames": {
"title": "Show Player Names",
"type": "toggle",
"value": true,
"tooltip": "Shows player names in the HUD and the map view."
},
"shipDamage": {
"title": "Ship Damage",
"type": "toggle",
"value": true,
"tooltip": "Take impact damage when inside the ship."
},
"showExtraHud": {
"title": "Show Extra HUD Elements",
"type": "toggle",
"value": true,
"tooltip": "Show extra HUD elements, like player status and minimap icons."
}
}
}