Modding
Discord Wishlist on Steam

Library›Items

Swap item

fn/game.SwapItem

Takes so many of one item from somebody and, if they had them, gives so many of another. Done tells whether the swap happened.

Swap itemallwhogiveBreadSlicegive amount1getBreadSliceget amount1done
Does
An action: done when the run reaches it
Runs
On every machine
Listed under
Library › Items
In a file
fn/game.SwapItem

Pins

  • inwhoa character

    The person.

  • ingivean item data

    Give.

    Starts as item/BreadSlice

  • ingiveAmounta whole number

    GiveAmount.

    Starts as 1

  • ingetan item data

    Get.

    Starts as item/BreadSlice

  • ingetAmounta whole number

    GetAmount.

    Starts as 1

  • outdoneyes or no

    Done.

How it is made

Its body, as the bench opens it read-only. Copy into my mod on the bench makes a copy to change. The library's file is items.graph.json.

Startallwhogivegive amountgetget amountHas enoughwhoitemamountenoughBranchconditiontruefalseTake itemwhoitemamountokGive itemwhoitemamountokReturnalldoneReturnalldone
Swap item

Built from