Merge pull request #784 from MihailRis/acoustics

acoustics
This commit is contained in:
MihailRis 2026-02-13 02:05:35 +03:00 • committed by GitHub
commit 2aa9042fa4
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
27 changed files with 447 additions and 60 deletions

View file

@ -1,5 +1,6 @@
{
"steps-sound": "steps/carpet",
"place-sound": "blocks/carpet_place",
"break-sound": "blocks/carpet_break"
"break-sound": "blocks/carpet_break",
"sound-absorption": 0.96
}

View file

@ -1,5 +1,6 @@
{
"steps-sound": "steps/glass",
"place-sound": "blocks/glass_place",
"break-sound": "blocks/glass_break"
"break-sound": "blocks/glass_break",
"sound-absorption": 0.3
}

View file

@ -1,5 +1,6 @@
{
"steps-sound": "steps/grass",
"place-sound": "steps/grass",
"break-sound": "steps/grass"
"break-sound": "steps/grass",
"sound-absorption": 0.85
}

View file

@ -2,5 +2,6 @@
"steps-sound": "steps/grass",
"place-sound": "blocks/ground_place",
"break-sound": "blocks/ground_break",
"hit-sound": "blocks/ground_hit"
"hit-sound": "blocks/ground_hit",
"sound-absorption": 0.8
}

View file

@ -2,5 +2,6 @@
"steps-sound": "steps/ground",
"place-sound": "blocks/ground_place",
"break-sound": "blocks/ground_break",
"hit-sound": "blocks/ground_hit"
"hit-sound": "blocks/ground_hit",
"sound-absorption": 0.7
}

View file

@ -1,5 +1,6 @@
{
"steps-sound": "steps/metal",
"place-sound": "blocks/metal_place",
"break-sound": "blocks/metal_break"
"break-sound": "blocks/metal_break",
"sound-absorption": 0.1
}

View file

@ -1,5 +1,6 @@
{
"steps-sound": "steps/sand",
"place-sound": "blocks/ground_place",
"break-sound": "blocks/ground_break"
"break-sound": "blocks/ground_break",
"sound-absorption": 0.8
}

View file

@ -2,5 +2,6 @@
"steps-sound": "steps/stone",
"place-sound": "blocks/stone_place",
"break-sound": "blocks/stone_break",
"hit-sound": "blocks/stone_hit"
"hit-sound": "blocks/stone_hit",
"sound-absorption": 0.3
}

View file

@ -2,5 +2,6 @@
"steps-sound": "steps/wood",
"place-sound": "blocks/wood_place",
"break-sound": "blocks/wood_break",
"hit-sound": "blocks/wood_hit"
"hit-sound": "blocks/wood_hit",
"sound-absorption": 0.5
}

View file

@ -24,6 +24,14 @@ function update_setting(x, id, name, postfix)
)
end
function create_checkbox(id, name, tooltip)
tooltip = tooltip or ''
document.root:add(string.format(
"<checkbox consumer='function(x) app.set_setting(\"%s\", x) end' checked='%s' tooltip='%s'>%s</checkbox>",
id, app.str_setting(id), gui.str(tooltip, "settings"), gui.str(name, "settings")
))
end
local initialized = false
function on_open()
@ -71,4 +79,6 @@ function on_open()
if info then
selectbox.value = info.device_specifier
end
create_checkbox("audio.acoustic-effects", "Acoustic effects", "audio.acoustic-effects.tooltip")
end

View file

@ -39,7 +39,7 @@ function on_open()
create_setting("chunks.load-distance", "Load Distance", 1)
create_setting("chunks.load-speed", "Load Speed", 1)
create_setting("graphics.fog-curve", "Fog Curve", 0.1)
create_checkbox("graphics.backlight", "Backlight", "graphics.backlight.tooltip")
create_checkbox("graphics.soft-lighting", "Soft lighting", "graphics.soft-lighting.tooltip")
create_checkbox("graphics.dense-render", "Dense blocks render", "graphics.dense-render.tooltip")

View file

@ -17,6 +17,7 @@ devtools.traceback=Traceback (most recent call first)
devtools.output=Output
# Tooltips
audio.acoustic-effects.tooltip=Acoustic effects may not be supported by your system
graphics.gamma.tooltip=Lighting brightness curve
graphics.backlight.tooltip=Backlight to prevent total darkness
graphics.dense-render.tooltip=Enables transparency in blocks like leaves

View file

@ -38,6 +38,7 @@ error.dependency-version-not-met=Версия зависимости не соо
pack.remove-confirm=Удалить весь поставляемый паком/паками контент из мира (безвозвратно)?
# Подсказки
audio.acoustic-effects.tooltip=Акустические эффекты могут не поддерживаться системой
graphics.gamma.tooltip=Кривая яркости освещения
graphics.backlight.tooltip=Подсветка, предотвращающая полную темноту
graphics.dense-render.tooltip=Включает прозрачность блоков, таких как листья
@ -111,6 +112,7 @@ settings.Windowed=Оконный
settings.Borderless=Безрамочный
settings.Microphone=Микрофон
settings.microphone.None=Нет
settings.Acoustic effects=Акустические эффекты
# Управление
chunks.reload=Перезагрузить Чанки