Remove sound playback from numpad toggle

ppi (the sound engine handle) and dir aren't globals in
NumpadMovement.xml's own Lua state - they belong to other plugins -
so toggle_numpad crashed with "attempt to index global 'ppi' (a nil
value)" every time. Dropped the sound calls entirely, kept the spoken
confirmation. Updated the readme to match.
This commit is contained in:
OlegTheSnowman
2026-07-11 00:29:02 +03:00
parent 450fdf0fe2
commit 695dd80626
2 changed files with 1 additions and 3 deletions

View File

@@ -101,10 +101,8 @@ function toggle_numpad()
set_numpad_bindings(enabled)
if enabled then
ppi.play(dir.."sounds/ogg/general/misc/on.ogg", 0, 0, 100)
Execute("tts_interrupt Numpad movement enabled.")
else
ppi.play(dir.."sounds/ogg/general/misc/off.ogg", 0, 0, 100)
Execute("tts_interrupt Numpad movement disabled.")
end
end

View File

@@ -178,7 +178,7 @@ The numpad can be dedicated entirely to movement, freeing you from typing full d
### Turning it off
Press **Alt + Enter** to toggle numpad movement on or off - useful if you need the numpad free for typing numbers instead. You'll hear a confirmation sound and a spoken message each time you toggle it. When it's off, the numpad keys behave normally again rather than doing nothing.
Press **Alt + Enter** to toggle numpad movement on or off - useful if you need the numpad free for typing numbers instead. You'll hear a spoken message each time you toggle it. When it's off, the numpad keys behave normally again rather than doing nothing.
## FAQ