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

[Bug] u_spawn_item only spawn one item when the item group's subtype is "collection" #71000

Closed
PipeYume opened this issue Jan 16, 2024 · 0 comments · Fixed by #71014
Closed
Labels
(S1 - Need confirmation) Report waiting on confirmation of reproducibility

Comments

@PipeYume
Copy link
Contributor

Describe the bug

The u_spawn_item function only spawns a single item when the item group's subtype is "collection," which is not what I expected. Upon reviewing all the mods, I noticed that every item group used by this method is of the "distribution" type.

It seems that u_spawn_item may not be suitable for handling item groups with the "collection" subtype.

Attach save file

None

Steps to reproduce

[
  {
    "type": "effect_on_condition",
    "id": "EOC_test_equip_items",
    "effect": { "u_spawn_item": "GROUP_test_equipment", "use_item_group": true, "force_equip": true, "flags": [ "UNBREAKABLE" ] }
  },
  {
    "type": "item_group",
    "id": "GROUP_test_equipment",
    "subtype": "collection",
    "entries": [
      { "item": "bodysuit_lycra", "variant": "superhero_suit_purple" },
      { "item": "mask_bal" },
      { "item": "long_patchwork_scarf", "prob": 50 }
    ]
  }
]

This will spawn only 1 item ("bodysuit_lycra")

Expected behavior

When the item group is "collection" type, spawn all the items with give probability inside it.

Screenshots

No response

Versions and configuration

0.G-6554-g1eb1b6fe88

Additional context

No response

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
(S1 - Need confirmation) Report waiting on confirmation of reproducibility
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant