function MonsterManager.createInterestWhileTrue(l,s,L)local Q={position=l,weight=s}table.insert(interests,Q);(coroutine.wrap(function()while L()do wait()end interests=TableUtils.without(interests,Q)MonsterManager.updateMonsterInterests()end))()MonsterManager.updateMonsterInterests()end

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
