From 450fdf0fe24f7acdfcac2e1b88fafd3b001d5e4c Mon Sep 17 00:00:00 2001 From: OlegTheSnowman <123775785+OlegTheSnowman@users.noreply.github.com> Date: Sat, 11 Jul 2026 00:28:07 +0300 Subject: [PATCH] Fix Accelerator function-call bindings and jump-to-end false triggers Accelerator(key, text) always sends text as a literal typed command - it only calls a Lua function if a matching routes it there (the pattern GagManager already used correctly). Several bindings added this session skipped that step and were silently sending gibberish to the MUD instead of running: Ctrl+S (save_state_func) in CosmicRage.xml, Ctrl+Alt+J (toggle_jump_to_end) in output_functions.xml, and Alt+Enter (toggle_numpad) in NumpadMovement.xml. Added the missing aliases for all three. Separately, poll_output_focus's jump-to-end was firing repeatedly even while focus never changed: it compared Alien pointer returns with "==", which is unreliable for Alien's userdata-wrapped pointers (two separate calls returning the same real HWND don't reliably compare equal). Switched to comparing tostring() output instead, which is address-based. Debug log confirmed SmartAppendToNotepad's own restore logic was correct throughout - this poll was the sole cause of the "jumps to end when new text arrives" complaint. --- cosmic rage/worlds/plugins/CosmicRage.xml | 11 +++++++++++ cosmic rage/worlds/plugins/NumpadMovement.xml | 17 ++++++++++++++++- .../worlds/plugins/output_functions.xml | 18 +++++++++++++++++- 3 files changed, 44 insertions(+), 2 deletions(-) diff --git a/cosmic rage/worlds/plugins/CosmicRage.xml b/cosmic rage/worlds/plugins/CosmicRage.xml index d263cf3..6f2f8e4 100644 --- a/cosmic rage/worlds/plugins/CosmicRage.xml +++ b/cosmic rage/worlds/plugins/CosmicRage.xml @@ -392,6 +392,17 @@ match="^\$sphook\s+(?P[\w]+):(?P[-\w./\\\s]+):(?P[\w]+):(? + + + + + + + +