Patchouli

Patchouli

168M Downloads

Feature Request: Basic conditionals for hiding template components

thephoenixlodge opened this issue ยท 0 comments

commented

Currently, if I want to have relatively generic templates to allow for uses in multiple places, I often have to have some features that are left awkwardly unused. It would be good if, from the pack dev angle there was a means to have a basic conditional to check if a variable is actually having anything passed through it. My suggestion would be to do it as a variable function such as those which were recently added and then perhaps have it return as a boolean for use with the existing config flags argument.

So for example, on my cauldron template I could hide the output arrow with the following argument if there was no output item for a specific recipe:
"flag": "!#output_item->null"

(This is also particularly useful for with other var functions, as a count will return 0, and a iname will return air for any unused item variables, as with my checklist_end template.)