goodify config

This commit is contained in:
JohnCorby 2022-11-19 01:34:35 -08:00
parent b4c18c9e3d
commit cf9d5a5529
3 changed files with 19 additions and 7 deletions

View File

@ -241,9 +241,9 @@ public class QSBCore : ModBehaviour
public override void Configure(IModConfig config)
{
DefaultServerIP = config.GetSettingsValue<string>("defaultServerIP");
IncompatibleModsAllowed = config.GetSettingsValue<bool>("incompatibleModsAllowed");
ShipDamage = config.GetSettingsValue<bool>("shipDamage");
DefaultServerIP = config.GetSettingsValue<string>("Default Server IP");
IncompatibleModsAllowed = config.GetSettingsValue<bool>("Incompatible Mods Allowed");
ShipDamage = config.GetSettingsValue<bool>("Ship Damage");
}
private void Update()

View File

@ -270,7 +270,7 @@ public class QSBNetworkManager : NetworkManager, IAddComponentOnStart
{
QSBCore.DefaultServerIP = networkAddress;
var config = QSBCore.Helper.Config;
config.SetSettingsValue("defaultServerIP", networkAddress);
config.SetSettingsValue("Default Server IP", networkAddress);
QSBCore.Helper.Storage.Save(config, Constants.ModConfigFileName);
}

View File

@ -1,8 +1,20 @@
{
"enabled": true,
"settings": {
"defaultServerIP": "localhost",
"incompatibleModsAllowed": false,
"shipDamage": true
"Default Server IP": {
"type": "text",
"value": "localhost",
"tooltip": "The last entered IP/ID. Used if you leave the connect prompt blank."
},
"Incompatible Mods Allowed": {
"type": "toggle",
"value": false,
"tooltip": "Kicks players if they have certain mods."
},
"Ship Damage": {
"type": "toggle",
"value": true,
"tooltip": "Take impact damage when inside the ship."
}
}
}