using BepInEx.Configuration; using BepInEx.Unity.IL2CPP; using BetterAmongUs.Helpers; using System.ComponentModel; namespace BetterAmongUs.Examples; /// /// Example class demonstrating how to create modded support for BetterAmongUs. /// /// /// All methods and fields must be static and decorated with the appropriate /// to be discovered by BetterAmongUs through reflection. /// internal class ModdedSupportExampleClass { /// /// Array of flags to control BetterAmongUs behavior. /// Check BAUModdedSupportFlags for available flag constants. /// [Category("bau:flags")] public static string[] BAUFlags = []; /// /// Called when BetterAmongUs is loading. Return false to prevent BAU from loading. /// /// The BetterAmongUs plugin instance. /// True to allow BAU to load, false to prevent it. [Category("bau:event.bau_load")] public static bool OnBAULoad(BasePlugin bauPlugin) { Logger_.Error("TEST 1"); return true; } /// /// Called when BetterAmongUs game options have been loaded. /// /// /// Array of game option objects from BetterAmongUs. Common types include: /// OptionItem, OptionItem{T}, OptionCheckboxItem, OptionFloatItem, /// OptionIntItem, OptionPercentItem, OptionPlayerItem, OptionStringItem /// [Category("bau:event.options_load")] public static void OnBAUOptionsLoaded(object[] options) { Logger_.Error("TEST 2"); } /// /// Called when BetterAmongUs configuration entries have been loaded. /// /// Array of BepInEx ConfigEntryBase objects from BetterAmongUs. [Category("bau:event.configs_load")] public static void OnBAUConfigEntriesLoaded(ConfigEntryBase[] configs) { Logger_.Error("TEST 3"); } }