local mod_name = core.get_current_modname()
local mod_path = core.get_modpath(mod_name)
local S = core.get_translator(mod_name)


aom_longship = {}

aom_longship.has_aom_tcraft = (core.get_modpath("aom_tcraft") ~= nil)
aom_longship.has_aom_settings = (core.get_modpath("aom_settings") ~= nil)

if aom_longship.has_aom_settings then
    -- TL: setting description
    aom_settings.register_setting("longship_can_place_land", true, S("Can place ships on land"), "server")
    -- TL: setting description
    aom_settings.register_setting("longship_max_speed_multiplier", 1, S("Speed multiplier at max wind"), "server")
    -- TL: setting description
    aom_settings.register_setting("longship_min_speed_multiplier", 1, S("Speed multiplier at no wind"), "server")
end

function aom_longship.get_setting(player, name, default)
    if aom_longship.has_aom_settings then return aom_settings.get_setting(player, name) or default
    else return default end
end

dofile(mod_path .. "/entity.lua")
