milo: sounds
This commit is contained in:
@@ -163,9 +163,9 @@ local page = UI.Page {
|
|||||||
items = { },
|
items = { },
|
||||||
}
|
}
|
||||||
|
|
||||||
local function playSound(sound)
|
local function playSound(sound, vol)
|
||||||
if speaker then
|
if speaker then
|
||||||
speaker.playSound('minecraft:' .. sound)
|
speaker.playSound('minecraft:' .. sound, vol or 1)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
@@ -279,7 +279,7 @@ function page.grid:getDisplayValues(row)
|
|||||||
end
|
end
|
||||||
|
|
||||||
function page:transfer(item, count, msg)
|
function page:transfer(item, count, msg)
|
||||||
playSound('ui.button.click')
|
playSound('ui.button.click', .3)
|
||||||
local response = self:sendRequest({ request = 'transfer', item = item, count = count }, msg)
|
local response = self:sendRequest({ request = 'transfer', item = item, count = count }, msg)
|
||||||
if response then
|
if response then
|
||||||
item.count = response.current - response.count
|
item.count = response.current - response.count
|
||||||
|
|||||||
Reference in New Issue
Block a user