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)
|
||||
|
||||
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
|
||||
|
||||
Reference in New Issue
Block a user