RynthCore/src/RynthCore.Engine/Plugins/LoadedPlugin.cs
Tom Bohar 68c301dac8 RynthCore as of 2026-09-05 (internal f9abab9)
A snapshot of the working tree for aelrynth.com/git/: the code, build files
and public docs. Internal review notes and agent instructions are left out.
MIT licensed; see LICENSE.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-25 21:22:59 -04:00

65 lines
3.8 KiB
C#

// ============================================================================
// RynthCore.Engine - Plugins/LoadedPlugin.cs
// Represents a single plugin DLL that has been loaded and had its exports
// resolved. Holds the module handle and cached delegates.
// ============================================================================
using System;
namespace RynthCore.Engine.Plugins;
internal sealed class LoadedPlugin
{
public string SourceFilePath { get; init; } = "";
public string FilePath { get; init; } = "";
public string FileName { get; init; } = "";
public IntPtr ModuleHandle { get; init; }
// ─── Required exports ────────────────────────────────────────────
public PluginInitDelegate? Init { get; set; }
public PluginShutdownDelegate? Shutdown { get; set; }
// ─── Optional exports ────────────────────────────────────────────
public PluginNameDelegate? GetName { get; set; }
public PluginVersionDelegate? GetVersion { get; set; }
public PluginOnLoginCompleteDelegate? OnLoginComplete { get; set; }
public PluginOnLogoutDelegate? OnLogout { get; set; }
public PluginOnUIInitializedDelegate? OnUIInitialized { get; set; }
public PluginOnBusyCountIncrementedDelegate? OnBusyCountIncremented { get; set; }
public PluginOnBusyCountDecrementedDelegate? OnBusyCountDecremented { get; set; }
public PluginOnSelectedTargetChangeDelegate? OnSelectedTargetChange { get; set; }
public PluginOnCombatModeChangeDelegate? OnCombatModeChange { get; set; }
public IntPtr OnSmartBoxEventPtr { get; set; }
public PluginOnSmartBoxEventDelegate? OnSmartBoxEvent { get; set; }
public PluginOnDeleteObjectDelegate? OnDeleteObject { get; set; }
public PluginOnCreateObjectDelegate? OnCreateObject { get; set; }
public IntPtr OnUpdateObjectPtr { get; set; }
public PluginOnUpdateObjectDelegate? OnUpdateObject { get; set; }
public PluginOnUpdateObjectInventoryDelegate? OnUpdateObjectInventory { get; set; }
public PluginOnViewObjectContentsDelegate? OnViewObjectContents { get; set; }
public PluginOnStopViewingObjectContentsDelegate? OnStopViewingObjectContents { get; set; }
public PluginOnVendorOpenDelegate? OnVendorOpen { get; set; }
public PluginOnVendorCloseDelegate? OnVendorClose { get; set; }
public IntPtr OnUpdateHealthPtr { get; set; }
public PluginOnUpdateHealthDelegate? OnUpdateHealth { get; set; }
public IntPtr OnCombatDamagePtr { get; set; }
public PluginOnCombatDamageDelegate? OnCombatDamage { get; set; }
public IntPtr OnKillNotificationPtr { get; set; }
public PluginOnKillNotificationDelegate? OnKillNotification { get; set; }
public IntPtr OnChatWindowTextPtr { get; set; }
public PluginOnChatWindowTextDelegate? OnChatWindowText { get; set; }
public PluginOnChatBarEnterDelegate? OnChatBarEnter { get; set; }
public PluginBarActionDelegate? OnBarAction { get; set; }
public PluginOnEnchantmentAddedDelegate? OnEnchantmentAdded { get; set; }
public PluginOnEnchantmentRemovedDelegate? OnEnchantmentRemoved { get; set; }
public PluginTickDelegate? Tick { get; set; }
public PluginRenderDelegate? Render { get; set; }
// ─── Runtime state ───────────────────────────────────────────────
public bool Initialized { get; set; }
public bool LoginCompleteDispatched { get; set; }
public bool UIInitializedDispatched { get; set; }
public bool Failed { get; set; }
public string DisplayName { get; set; } = "";
public string VersionString { get; set; } = "";
}