--Settings
local default_shapeshift_sound = core.settings:get("shapetester_default_sound") or "shapetester_shift"

--For modders
function shapetester.sound(player)
    core.sound_play(default_shapeshift_sound, {pos=player:get_pos(),gain=0.4,max_hear_distance=16})
end

function shapetester.open_menu(player)
    local name = player:get_player_name()
    shapetester.menu_pages[name] = 1
    local formspec = shapetester.get_formspec(player)
    core.show_formspec(name, "shapetester:form", formspec)
end

function shapetester.get_shapeshift(player_name)
    local player = core.get_player_by_name(player_name)
    local value = player:get_meta():get_string("shapetester_last_shapeshift")
    if value then
        return value
    else
        return "unknown"
    end
end