mirror of
https://github.com/kepler155c/opus
synced 2024-06-26 15:13:20 +00:00
13 lines
226 B
Lua
13 lines
226 B
Lua
|
local peripheral = _G.peripheral
|
||
|
local speaker = peripheral.find('speaker')
|
||
|
|
||
|
local Sound = { }
|
||
|
|
||
|
function Sound.play(sound, vol)
|
||
|
if speaker then
|
||
|
speaker.playSound('minecraft:' .. sound, vol or 1)
|
||
|
end
|
||
|
end
|
||
|
|
||
|
return Sound
|