unlockedWhen

Unlock when a custom condition is met.

Example:

.withTool(actionTool).unlockedWhen(ctx -> ctx.getIterationCount() 2)

Unlock when a predicate returns true.

Example:

.withTool(actionTool).unlockedWhen { it.calledToolNames.size >= 2 }