A class in TavernLib, TavernLib.
TavernLib's MelonPlugin. It registers TavernLib's services, collects its console commands and applies its late patches. Both sides; MelonLoader creates it.
Constructors
| Member | What it is |
|---|
Tavern() | Created by TavernLib; mods don't make one. |
Fields
| Member | What it is |
|---|
const string Version | TavernLib's version string, the same one given to MelonInfo. |
2 private and internal fields
| Member | What it is |
|---|
private bool _didInitialLogArchive | Set after the timer's first tick, which archives the log once at startup. |
private Timer _logArchiveTimer | Timer that checks every 60 seconds whether unity-log.csv needs archiving; started on servers that TavernLib manages auth for. |
Properties
1 private and internal property
| Member | What it is |
|---|
internal static MelonLogger.Instance Logger { get; private set; } | TavernLib's own MelonLogger.Instance, set in OnEarlyInitializeMelon. TavernLogger writes through it. |
Methods
| Member | What it is |
|---|
override void OnEarlyInitializeMelon() | Sets up the services. Server: console tokens, mod reconcile, TavernManager, roles, backups. Client: mod folders and Quick join. Both: EntranceMessageHandler. |
override void OnInitializeMelon() | Collects TavernLib's console command modules into the game's CommandService.CommandCollection. |
override void OnLateInitializeMelon() | Hooks the select object search and applies GameCommandPatches, once Unity is up. |
3 private and internal methods
| Member | What it is |
|---|
private void SetupSelectionFixPatch() | Hooks SelectionCommandModule.FindObjects so select find runs SelectFixPatch.SelectionFix instead. |
private void SetupServices() | Registers TavernLib's services at early init: console tokens, mod reconcile, TavernManager, roles and backups on a server, and quick join on a client, plus EntranceMessageHandler on both. |
private void StartLogArchiveTimer() | Starts the timer that archives the log on its first tick (10 s after start) and then whenever it passes the size limit. |