-------------------------------------------------------------------------------
--Variables
-------------------------------------------------------------------------------

local y_min = -31000
local y_max = tonumber(
    core.settings:get("simple_music_overworld_underground_max_y")) or -16

if core.get_modpath("df_caverns") then
    y_max = tonumber(core.settings:get("dfcaverns_ymax"))
    or -193
end

if core.get_modpath("nether") and 
core.get_modpath("simple_music_nether") then
    y_min = tonumber(core.settings:get("nether_depth_ymax"))
    or -5000
end

local gain = 0.7

-------------------------------------------------------------------------------
--Music
-------------------------------------------------------------------------------

simple_music.register_track({
    name = "ossuary_5_rest",
    length = 236,
    gain = gain,
    day = true,
    night = true,
    ymin = y_min,
    ymax = y_max,
})

simple_music.register_track({
    name = "past_the_edge",
    length = 79,
    gain = gain,
    day = true,
    night = true,
    ymin = y_min,
    ymax = y_max,
})

simple_music.register_track({
    name = "thunderbird",
    length = 362,
    gain = gain,
    day = true,
    night = true,
    ymin = y_min,
    ymax = y_max,
})

simple_music.register_track({
    name = "crypto",
    length = 205,
    gain = gain,
    day = true,
    night = true,
    ymin = y_min,
    ymax = y_max,
})

simple_music.register_track({
    name = "shores_of_avalon",
    length = 237,
    gain = gain,
    day = true,
    night = true,
    ymin = y_min,
    ymax = y_max,
})

simple_music.register_track({
    name = "morgana_rides",
    length = 247,
    gain = gain,
    day = true,
    night = true,
    ymin = y_min,
    ymax = y_max,
})

simple_music.register_track({
    name = "lightless_dawn",
    length = 380,
    gain = gain,
    day = true,
    night = true,
    ymin = y_min,
    ymax = y_max,
})

simple_music.register_track({
    name = "floating_cities",
    length = 185,
    gain = gain,
    day = true,
    night = true,
    ymin = y_min,
    ymax = y_max,
})
