mirror of
https://github.com/Kelsidavis/WoWee.git
synced 2026-03-22 23:30:14 +00:00
feat: add GetNumAddOns and GetAddOnInfo for addon introspection
- GetNumAddOns() — returns count of loaded addons - GetAddOnInfo(indexOrName) — returns name, title, notes, loadable Addon info is stored in the Lua registry from the .toc directives and populated before addon files execute. Useful for addon managers and compatibility checks between addons. Total WoW API: 33 functions.
This commit is contained in:
parent
66431ab762
commit
ee3f60a1bb
3 changed files with 77 additions and 0 deletions
|
|
@ -9,6 +9,8 @@ namespace wowee::game { class GameHandler; }
|
|||
|
||||
namespace wowee::addons {
|
||||
|
||||
struct TocFile; // forward declaration
|
||||
|
||||
class LuaEngine {
|
||||
public:
|
||||
LuaEngine();
|
||||
|
|
@ -39,6 +41,9 @@ public:
|
|||
bool loadSavedVariables(const std::string& path);
|
||||
bool saveSavedVariables(const std::string& path, const std::vector<std::string>& varNames);
|
||||
|
||||
// Store addon info in registry for GetAddOnInfo/GetNumAddOns
|
||||
void setAddonList(const std::vector<TocFile>& addons);
|
||||
|
||||
lua_State* getState() { return L_; }
|
||||
bool isInitialized() const { return L_ != nullptr; }
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue