--[[
	Creates a point of interest at specified position, with specified weight. Will continue to exist until the callback function returns false
]]

function MonsterManager.createInterestWhileTrue(position, weight, callback)
	local entry = {position = position, weight = weight}

	table.insert(interests, entry)

	coroutine.wrap(
		function()
			while callback() do
				wait()
			end
			interests = TableUtils.without(interests, entry)

			MonsterManager.updateMonsterInterests()
		end
	)()

	MonsterManager.updateMonsterInterests()
end
