An aspect can have 'commute' specified as an array of objects.
When that aspect is present at the completion of a recipe, every element specified in the commute list is removed - and then enough elements created in the commute list to satisfy the requirement of presence of the aspect.
Canonical example (using insane pre-decimalisation UK currency):
{
id: "pence",
label: "Pence",
description: "One penny is, of course, four farthings.",
commute:[1:"penny",6:"sixpence",12:"shilling",30:"halfcrown",60:"crown"],
isAspect: true
}
Someone puts a half-crown (30 pence) in a recipe and pence:-5 is applied.
The final output should contain two shillings and one penny.
Q. What if some of the removed elements have mutations? A. They're gone.
An aspect can have 'commute' specified as an array of objects.
When that aspect is present at the completion of a recipe, every element specified in the commute list is removed - and then enough elements created in the commute list to satisfy the requirement of presence of the aspect.
Canonical example (using insane pre-decimalisation UK currency): { id: "pence", label: "Pence", description: "One penny is, of course, four farthings.", commute:[1:"penny",6:"sixpence",12:"shilling",30:"halfcrown",60:"crown"], isAspect: true }
Someone puts a half-crown (30 pence) in a recipe and pence:-5 is applied. The final output should contain two shillings and one penny. Q. What if some of the removed elements have mutations? A. They're gone.