weatherfactory / cultistsimulator-visible

Read-only preview builds of Cultist Simulator for the convenience of modders and the curious.
https://weatherfactory.biz/cultist-simulator/
36 stars 6 forks source link

COMMUTABILITY #218

Closed alexiskennedy closed 1 year ago

alexiskennedy commented 1 year ago

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.