Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Parse charm details in inventory array #99

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

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