the addon arc: the AddOns folder opens

- benilla loads real 1.12 addons from Interface/AddOns — TOC, XML and Lua through one loader, with per-addon saved variables, Bindings.xml and the lifecycle events addons expect
- both AddOns screens are in: the character-select list with per-addon enable state, and the ESC menu's in-game list
- the API surface is measured, not guessed — a corpus harness runs hundreds of real 1.12 addons and ranks exactly which globals, templates and verbs they demand
- the Lua dialect is the client's own, read off the binary — 5.0 semantics with the 1.12 additions, and UI source files are bytes, not UTF-8

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
Sam
2026-08-11 18:18:31 +07:00
co-authored by Claude Fable 5
parent bfb3e3addc
commit 44ff435304
231 changed files with 31316 additions and 5594 deletions
+15 -6
View File
@@ -244,22 +244,31 @@ pub(super) fn install(lua: &Lua) -> mlua::Result<()> {
// re-points the ButtonText to the current state's object each frame, so Enable/Disable and
// hover swap the label's paint with no Lua involvement (the client's own behavior:
// UIPanelButtonTemplate's gold/white/gray label states).
//
// Each takes the font OBJECT, its name, or nil, like `FontString:SetFontObject` — across the
// trio the corpus splits 5 object-form to 4 string-form, so accepting one shape only would
// break about half the callers, and nil clears the state back to the default. Because the
// state is stored as a NAME and re-resolved at every `extract`, a later mutation of that font
// object reaches these labels for free.
m.set(
"SetTextFontObject",
lua.create_function(|lua, (this, name): (Table, String)| {
with_button(lua, &this, |bs| bs.normal_font = Some(name))
lua.create_function(|lua, (this, font): (Table, Value)| {
let name = super::font::resolve("SetTextFontObject", &font)?;
with_button(lua, &this, |bs| bs.normal_font = name)
})?,
)?;
m.set(
"SetHighlightFontObject",
lua.create_function(|lua, (this, name): (Table, String)| {
with_button(lua, &this, |bs| bs.highlight_font = Some(name))
lua.create_function(|lua, (this, font): (Table, Value)| {
let name = super::font::resolve("SetHighlightFontObject", &font)?;
with_button(lua, &this, |bs| bs.highlight_font = name)
})?,
)?;
m.set(
"SetDisabledFontObject",
lua.create_function(|lua, (this, name): (Table, String)| {
with_button(lua, &this, |bs| bs.disabled_font = Some(name))
lua.create_function(|lua, (this, font): (Table, Value)| {
let name = super::font::resolve("SetDisabledFontObject", &font)?;
with_button(lua, &this, |bs| bs.disabled_font = name)
})?,
)?;