[Save/Sync] Commit work before .NET 10 tests.

This commit is contained in:
MapleWheels
2026-03-03 20:45:51 -05:00
parent 26b3827210
commit 83c198bc26
8 changed files with 91 additions and 28 deletions
@@ -0,0 +1,35 @@
using System;
using Barotrauma.Extensions;
using Microsoft.Xna.Framework;
namespace Barotrauma.LuaCs;
internal abstract class ModsSettingsMenuBase : IDisposable
{
public GUIFrame ContentFrame { get; private set; }
protected IPackageManagementService PackageManagementService { get; private set; }
protected IConfigService ConfigService { get; private set; }
protected SettingsMenu SettingsMenuInstance { get; private set; }
protected ModsSettingsMenuBase(GUIFrame contentFrame,
IPackageManagementService packageManagementService,
IConfigService configService, SettingsMenu settingsMenuInstance)
{
ContentFrame = contentFrame;
PackageManagementService = packageManagementService;
ConfigService = configService;
SettingsMenuInstance = settingsMenuInstance;
}
protected abstract void DisposeInternal();
public void Dispose()
{
DisposeInternal();
ContentFrame?.Parent.RemoveChild(ContentFrame);
SettingsMenuInstance = null;
ContentFrame = null;
PackageManagementService = null;
ConfigService = null;
}
}