- Removed unused settings

- Added Settings.xml
This commit is contained in:
Maplewheels
2026-01-25 16:48:23 -05:00
parent c2aa7dd948
commit 0a9c673753
4 changed files with 18 additions and 49 deletions

View File

@@ -28,28 +28,6 @@ namespace Barotrauma
}
};
new GUITickBox(new RectTransform(new Vector2(0.8f, 0.1f), list.Content.RectTransform), "Treat Forced Mods As Normal")
{
Selected = GameMain.LuaCs.TreatForcedModsAsNormal,
ToolTip = "This makes mods that were setup to run even when disabled to only run when enabled.",
OnSelected = (GUITickBox tick) =>
{
GameMain.LuaCs.TreatForcedModsAsNormal = tick.Selected;
return true;
}
};
new GUITickBox(new RectTransform(new Vector2(0.8f, 0.1f), list.Content.RectTransform), "Prefer To Use Workshop Lua Setup")
{
Selected = GameMain.LuaCs.PreferToUseWorkshopLuaSetup,
ToolTip = "This makes Lua look first for the Lua/LuaSetup.lua located in the Workshop package instead of the one located locally.",
OnSelected = (GUITickBox tick) =>
{
GameMain.LuaCs.PreferToUseWorkshopLuaSetup = tick.Selected;
return true;
}
};
new GUITickBox(new RectTransform(new Vector2(0.8f, 0.1f), list.Content.RectTransform), "Disable Error GUI Overlay")
{
Selected = GameMain.LuaCs.DisableErrorGUIOverlay,

View File

@@ -0,0 +1,11 @@
<?xml version="1.0" encoding="utf-8"?>
<Configuration>
<Settings>
<Setting Name="DisableErrorGUIOverlay" Type="bool" Value="true"/>
<Setting Name="HideUserNamesInLogs" Type="bool" Value="true"/>
<Setting Name="LocalDataSavePath" Type="string" Value="/Data/Mods" AllowChangesWhileExecuting="false"/>
<Setting Name="LuaForBarotraumaSteamId" Type="ulong" Value="2559634234"/>
<Setting Name="IsCsEnabled" Type="bool" Value="false" AllowChangesWhileExecuting="false"/>
<Setting Name="RestrictMessageSize" Type="bool" Value="true"/>
</Settings>
</Configuration>

View File

@@ -1,4 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<ModConfig>
<Lua File="%ModDir%/Lua/LuaSetup.lua" Target="Any" />
</ModConfig>
<Lua File="%ModDir%/Lua/LuaSetup.lua"/>
<Config File="%ModDir%/Config/SettingsShared.xml"/>
</ModConfig>

View File

@@ -106,27 +106,6 @@ namespace Barotrauma
private ISettingEntry<bool> _isCsEnabled;
/// <summary>
/// Whether mods marked as 'forced' or 'always load' should only be loaded if they're in the enabled mods list.
/// </summary>
public bool TreatForcedModsAsNormal
{
get => _treatForcedModsAsNormal?.Value ?? true;
internal set => _treatForcedModsAsNormal?.TrySetValue(value);
}
private ISettingEntry<bool> _treatForcedModsAsNormal;
/// <summary>
/// Whether the lua script runner from Workshop package should be used over the in-built version.
/// </summary>
public bool PreferToUseWorkshopLuaSetup
{
get => _preferToUseWorkshopLuaSetup?.Value ?? false;
internal set => _preferToUseWorkshopLuaSetup?.TrySetValue(value);
}
private ISettingEntry<bool> _preferToUseWorkshopLuaSetup;
/// <summary>
/// Whether the popup error GUI should be hidden/suppressed.
/// </summary>
@@ -181,8 +160,6 @@ namespace Barotrauma
{
_isCsEnabled = ConfigService.TryGetConfig<ISettingEntry<bool>>(ContentPackageManager.VanillaCorePackage, "IsCsEnabled", out var val1) ? val1
: throw new NullReferenceException($"{nameof(IsCsEnabled)} cannot be loaded.");
_treatForcedModsAsNormal = ConfigService.TryGetConfig<ISettingEntry<bool>>(ContentPackageManager.VanillaCorePackage, "TreatForcedModsAsNormal", out var val2) ? val2
: throw new NullReferenceException($"{nameof(TreatForcedModsAsNormal)} cannot be loaded.");
_disableErrorGUIOverlay = ConfigService.TryGetConfig<ISettingEntry<bool>>(ContentPackageManager.VanillaCorePackage, "DisableErrorGUIOverlay", out var val3) ? val3
: throw new NullReferenceException($"{nameof(DisableErrorGUIOverlay)} cannot be loaded.");
_hideUserNamesInLogs = ConfigService.TryGetConfig<ISettingEntry<bool>>(ContentPackageManager.VanillaCorePackage, "HideUserNamesInLogs", out var val4) ? val4
@@ -191,6 +168,8 @@ namespace Barotrauma
: throw new NullReferenceException($"{nameof(LuaForBarotraumaSteamId)} cannot be loaded.");
_restrictMessageSize = ConfigService.TryGetConfig<ISettingEntry<bool>>(ContentPackageManager.VanillaCorePackage, "RestrictMessageSize", out var val7) ? val7
: throw new NullReferenceException($"{nameof(RestrictMessageSize)} cannot be loaded.");
_localDataSavePath = ConfigService.TryGetConfig<ISettingEntry<string>>(ContentPackageManager.VanillaCorePackage, "LocalDataSavePath", out var val8) ? val8
: throw new NullReferenceException($"{nameof(LocalDataSavePath)} cannot be loaded.");
}
private IServicesProvider SetupServicesProvider()
@@ -330,7 +309,8 @@ namespace Barotrauma
if (!PackageManagementService.IsAnyPackageLoaded())
{
Logger.LogResults(PackageManagementService.LoadPackagesInfo(ContentPackageManager.EnabledPackages.All.ToImmutableArray()));
LoadLuaCsConfig();
// TODO: Enable later
//LoadLuaCsConfig();
}
if (!PackageManagementService.IsAnyPackageRunning())
@@ -399,7 +379,6 @@ namespace Barotrauma
void DisposeLuaCsConfig()
{
_isCsEnabled = null;
_treatForcedModsAsNormal = null;
_disableErrorGUIOverlay = null;
_hideUserNamesInLogs = null;
_luaForBarotraumaSteamId = null;