From 7e541cef3de5690e536af59f9b37843c600bf729 Mon Sep 17 00:00:00 2001 From: MapleWheels Date: Sun, 1 Feb 2026 18:48:40 -0500 Subject: [PATCH] - Removed ACsMod.cs --- .../SharedSource/LuaCs/_Plugins/ACsMod.cs | 64 ------------------- 1 file changed, 64 deletions(-) delete mode 100644 Barotrauma/BarotraumaShared/SharedSource/LuaCs/_Plugins/ACsMod.cs diff --git a/Barotrauma/BarotraumaShared/SharedSource/LuaCs/_Plugins/ACsMod.cs b/Barotrauma/BarotraumaShared/SharedSource/LuaCs/_Plugins/ACsMod.cs deleted file mode 100644 index 76dfac73f..000000000 --- a/Barotrauma/BarotraumaShared/SharedSource/LuaCs/_Plugins/ACsMod.cs +++ /dev/null @@ -1,64 +0,0 @@ -using System; -using System.Collections.Generic; -using System.IO; - -namespace Barotrauma -{ - [Obsolete("Make your class implement IAssemblyPlugin instead.")] - public abstract class ACsMod : IAssemblyPlugin - { - private static List mods = new List(); - public static List LoadedMods { get => mods; } - - private const string MOD_STORE = "LocalMods/.modstore"; - public static string GetStoreFolder() where T : ACsMod - { - if (!Directory.Exists(MOD_STORE)) Directory.CreateDirectory(MOD_STORE); - var modFolder = $"{MOD_STORE}/{typeof(T)}"; - if (!Directory.Exists(modFolder)) Directory.CreateDirectory(modFolder); - return modFolder; - } - - public bool IsDisposed { get; private set; } - - /// Mod initialization - public ACsMod() - { - IsDisposed = false; - LoadedMods.Add(this); - } - - /// - /// Called as soon as plugin loading begins, use this for internal setup only. - /// - public virtual void Initialize() { } - - /// - /// Called once all plugins have completed Initialization. Put cross-mod code here. - /// - public virtual void OnLoadCompleted() { } - - /// - /// [NotImplemented] Called before vanilla content is loaded. Use to patch Barotrauma classes before they're - /// instantiated. - /// - public void PreInitPatching() { } - - public virtual void Dispose() - { - try - { - Stop(); - } - catch (Exception e) - { - LuaCsLogger.HandleException(e, LuaCsMessageOrigin.CSharpMod); - } - - LoadedMods.Remove(this); - IsDisposed = true; - } - - public abstract void Stop(); - } -}