Adding nested ternary to detect a max pot value, and add an infinite grain repeat at that value.