benilla's layer speaks the 1.12 API alone: handlers take this and no arguments, GetBinding answers the 1.12 list, the Key Bindings page captures through its window, /errors chains the error handler, and the host hooks leave the VM (#569)
benilla's layer now uses only the 1.12 API and the 1.12 Lua forms, and the host hooks it used are gone from the VM. - **The VM calls handlers as 1.12.1 does.** A handler body is compiled as the chunk itself, so `self` in it is an ordinary global (`0x704c70`). A handler is called with no arguments (`0x705199`). The loader reads no `function=` attribute. - **`GetBinding`/`GetNumBindings` answer the 1.12 list** (`0x4b7f60`): `HEADER_*` section rows, plus every key bound to a command, with no category column. The stock `KeyBindingFrame` now shows its section headers and both key columns. - **The Key Bindings page captures keys through its own window**, as `Blizzard_BindingUI` does: the frame's `OnKeyDown` for keys, clicks for mouse buttons, and the wheel. It takes the `Benilla` prefix, so loading the stock binding addon no longer breaks it. The UI pointer feed now hands frames mouse buttons 4 and 5. - **`/errors` keeps its log by chaining the Lua error handler**, and the stock ScriptErrors dialog is unchanged. Load failures that never raise now print one chat line each at world entry. - **Slash commands:** `/reload` and `/errors` are `SlashCmdList` rows in the layer. `/convertraid` is gone; 1.12.1 has no such command. The dev commands are host rows in dev builds only, so a player build answers them with the unknown-command line once. - **Naming:** every global the layer defines is `Benilla`-prefixed. `BenillaBindCapture`, `KeyBindings_OnHostKey`, the three script-error globals and `SubmitChatInput` are removed. Verified: - New tests for each rule and each removed surface; 16 mutations each fail a test. - Region dumps of the Options window (general page, Key Bindings, armed) are identical before and after. - `scripts/gates.sh` and `scripts/smoke.sh` are green. - A live run bound a key, a Shift chord and the middle button through the page, and opened `/errors`. Built on macOS; no platform seam touched. Fixes #539 Fixes #544 Fixes #407 Part of #171 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 5.5
parent
0f36374445
commit
05e204de10
@@ -33,15 +33,13 @@ fn allowed_beyond_1_12() -> HashSet<&'static str> {
|
||||
// `getfenv(0)`); ours does, as our `getglobal`/`setglobal` are written over it.
|
||||
"_G",
|
||||
// ── WoW API past 1.12 ──
|
||||
// Only `SubmitChatInput` is called from our UI files (`ScriptLogFrame.xml`'s slash
|
||||
// commands); each of the rest awaits its 1.12 equivalent, removal or a reason.
|
||||
// Each awaits its 1.12 equivalent, removal or a reason; none is called from our UI files.
|
||||
"CancelUnitBuff",
|
||||
"GetCursorInfo",
|
||||
"GetInventoryItemID",
|
||||
"GetPlayerFacing",
|
||||
"GetTradePartnerName",
|
||||
"IsGossipOptionCoded",
|
||||
"SubmitChatInput",
|
||||
"UnitAura",
|
||||
"UnitIsAFK",
|
||||
"UnitIsDND",
|
||||
@@ -1514,3 +1512,24 @@ fn the_nameplate_verbs_ignore_their_arguments_and_return_nothing() {
|
||||
"zero values — observably different from nil for a caller that counts"
|
||||
);
|
||||
}
|
||||
|
||||
/// The host seams benilla's own interface used are gone, now that it speaks 1.12 alone: the key
|
||||
/// capture, the error-log reads, the chat forwarders and the uncalled binding-set probe.
|
||||
#[test]
|
||||
fn the_layers_host_seams_are_gone() {
|
||||
let s = script();
|
||||
for name in [
|
||||
"BenillaBindCapture",
|
||||
"BenillaCharacterBindingsExist",
|
||||
"BenillaGetNumScriptErrors",
|
||||
"BenillaGetScriptErrorInfo",
|
||||
"BenillaClearScriptErrors",
|
||||
"SubmitChatInput",
|
||||
"BenillaChatTabPressed",
|
||||
] {
|
||||
assert!(
|
||||
s.eval::<bool>(&format!("return {name} == nil")).unwrap(),
|
||||
"{name} is still a global"
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user