Say you have a crafting writer for an item you only want crafted when there's X on the network and you don't want to dedicate a chest + inventory reader to this cause it's junky.
You could use an operator, possibly called "iif" that takes anything and use it like this
iif(recipe,do-i-need-to-craft-this) ---> recipe
if condition true, return recipe
if condition false, return null
Bonus points for adding a iif_or_default() that you specify the default for, so you could have an empty recipe handy in the above example.
Unless of course I'm missing something here, there's so many operators.
Issue type:
Short description:
Say you have a crafting writer for an item you only want crafted when there's X on the network and you don't want to dedicate a chest + inventory reader to this cause it's junky.
You could use an operator, possibly called "iif" that takes anything and use it like this
iif(recipe,do-i-need-to-craft-this) ---> recipe if condition true, return recipe if condition false, return null
Bonus points for adding a iif_or_default() that you specify the default for, so you could have an empty recipe handy in the above example.
Unless of course I'm missing something here, there's so many operators.