Skip to main content

LoginPerformInventoryFixups

Callable


  • Perform the inventory and appearance fixups needed.

    This is called by the login code, after the player's item lists are set up but before the inventory and appearance are loaded from the server's data, and applies the specified asset fixups by swapping Old with New in the list of owned items, in the various player item lists, and in the appearance.

    If you're only moving items around, it should work just fine as long as the Old and New asset definitions are compatible. If it's an asset merge (say 3 into one typed asset), it will either set the fixed up item to the specified Option or the first one if unspecified.

    TODO: only typed items are supported.


    Parameters

    • Inventory: Partial<Record<AssetGroupName, string[]>>

      The server-provided inventory object

    • Appearance: ServerItemBundle[]

      The server-provided appearance object

    • Crafting: readonly CraftingItem[]

      The server-provided, uncompressed crafting data

    Returns void