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:
@@ -101,10 +101,8 @@ function toggle_numpad()
|
|||||||
set_numpad_bindings(enabled)
|
set_numpad_bindings(enabled)
|
||||||
|
|
||||||
if enabled then
|
if enabled then
|
||||||
ppi.play(dir.."sounds/ogg/general/misc/on.ogg", 0, 0, 100)
|
|
||||||
Execute("tts_interrupt Numpad movement enabled.")
|
Execute("tts_interrupt Numpad movement enabled.")
|
||||||
else
|
else
|
||||||
ppi.play(dir.."sounds/ogg/general/misc/off.ogg", 0, 0, 100)
|
|
||||||
Execute("tts_interrupt Numpad movement disabled.")
|
Execute("tts_interrupt Numpad movement disabled.")
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -178,7 +178,7 @@ The numpad can be dedicated entirely to movement, freeing you from typing full d
|
|||||||
|
|
||||||
### Turning it off
|
### 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
|
## FAQ
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user