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

aom_player_init = {}

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

core.register_on_dieplayer(function(player, reason)
    player:get_meta():set_string("dead", "true")
end)
core.register_on_respawnplayer(function(player)
    player:get_meta():set_string("dead", "")
end)

core.register_globalstep(function(dtime)
    for i, player in ipairs(core.get_connected_players()) do
        local meta = player:get_meta()
        if player:get_hp() > 0 then
            meta:set_string("dead", "")
        end
    end
end)
