--[[
	Creates an interest point that the monsters can pathfind to at specified position, and with specified weight. If no timeout is supplied, then the interest point exists forever
]]

function MonsterManager.createInterest(position, weight, timeout)
	local entry = {position = position, weight = weight}

	table.insert(interests, entry)

	if timeout then
		delay(
			timeout,
			function()
				interests = TableUtils.without(interests, entry)

				MonsterManager.updateMonsterInterests()
			end
		)
	end

	MonsterManager.updateMonsterInterests()
end
