sorcery  Artifact [4a989c354e]

Artifact 4a989c354e33ed4366ecf54acdea2437f5b786ea4cabe11c26cb28865e1395ec:


sorcery.ctx = {
	users = {};
	get = function(uo)
		local name = uo:get_player_name()
		if sorcery.ctx.users[name] == nil then
			sorcery.ctx.users[name] = {}
		end
		return sorcery.ctx.users[name]
	end;
	stat = function(uo)
		local name = uo:get_player_name()
		return (sorcery.ctx.users[name] ~= nil)
	end;
}

minetest.register_on_leaveplayer(function(obj)
	local name = obj:get_player_name()
	if sorcery.ctx.users[name] then
		sorcery.ctx.users[name] = nil
	end
end)