function MonsterManager.createInterest(w,I,y)local p={position=w;weight=I}table.insert(interests,p)if y then delay(y,function()interests=TableUtils.without(interests,p)MonsterManager.updateMonsterInterests()end)end MonsterManager.updateMonsterInterests()end
--[[
	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
