1
0
mirror of https://github.com/kepler155c/opus synced 2024-11-15 05:04:50 +00:00
opus/sys/apis/sound.lua

13 lines
223 B
Lua
Raw Normal View History

2018-11-27 01:53:28 +00:00
local peripheral = _G.peripheral
local Sound = { }
function Sound.play(sound, vol)
2018-11-29 20:12:25 +00:00
local speaker = peripheral.find('speaker')
2018-11-27 01:53:28 +00:00
if speaker then
speaker.playSound('minecraft:' .. sound, vol or 1)
end
end
return Sound