Skip to content

Conversation

@leon-w
Copy link

@leon-w leon-w commented Oct 31, 2024

#98 added charm support to item inspection, however, there is currently no support for charms on items in the own inventory/storage units.

This PR adds charm detail parsing so the item objects are populated with a new charm property:

  • charm - If a charm (sometimes referred to as keychain) is attached to the item, this object contains details about the charm.
    • charm_id - The ID of the charm
    • offset_x - Float
    • offset_y - Float
    • offset_z - Float
    • pattern - The charm's pattern (1-100,000)

The naming i chose is not consistent with the names in the inspectItem result, however as this is the case for most of the keys, i decided to go with charm for clarity.
Let me know if you think we should go with a different naming scheme.

In the inspectItem result, an array is provided as it seems like there is technical support for multiple charms (possibly because the logic is copied from stickers). As of now, only a single charm is allowed so i decided against using an array of lenght one. If you think we should go with the array solution for possible future compatability, let me know.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant