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] Unqiue = false don't take care of metadata #583

Open
Capy1174 opened this issue Sep 25, 2024 · 4 comments
Open

[BUG] Unqiue = false don't take care of metadata #583

Capy1174 opened this issue Sep 25, 2024 · 4 comments
Labels
bug Something isn't working

Comments

@Capy1174
Copy link

Summary

if for a item that use metadata we make unique = false so in that if two same item name but different metadata they stack on each other then put the metadata of item which is already on a slot and new item with metadata stack on that make mess

Reproduction

  1. Create a item like pizza
  2. Add two item in inventory but both item should use different metadata info.
  3. 1 item of pizza should have Size = 10 and another item of pizza should have size = 2
  4. when u add these item one by one these will stack on each other and if u already have pizza size = 10 and you adding item with size = 2 then inventory will make both pizza item size = 10

Expected behavior

It should stack items when they have same metadata info but if any item has different metadata info it should not be stacked on item that has same name but different metadata info

Actual behavior

It not comparing metadata on unique = false

Additional context

its important if we using metadata in any item like a useable pizza item we can't make it unique for each pizza item if we do it will fill whole inventory slots just with eating item so it should stack if metadata if same even if unique = false

Last Updated

yesterday i check by downloading latest version of qb-inventory

Custom Resources

qb-inventory has this issue i use exports to add item with a command

Resource Rename

no i use name qb-inventory which is default name

@Capy1174 Capy1174 added the bug Something isn't working label Sep 25, 2024
@CxCore-xyz
Copy link

CxCore-xyz commented Sep 25, 2024

Or just create example:

pizza10 and pizza2 and use 2 items of that wouldn't be easier? you also need to add the item to consumables in the qb-smallresources wich does not use metadata and only uses item spawn name so it's your best option to use 2 seperate items.

@Capy1174
Copy link
Author

its all about meta cause i fill some detail for example if i want to make each pizza item slice like 8 slice in one pizza if u use once then 1 gone so 7 left so each item different from other if u eat single slice of any in that cause metadata must

@CxCore-xyz
Copy link

CxCore-xyz commented Sep 25, 2024

its all about meta cause i fill some detail for example if i want to make each pizza item slice like 8 slice in one pizza if u use once then 1 gone so 7 left so each item different from other if u eat single slice of any in that cause metadata must

Well if it's your vision then ya you must use metadata, But i would just make like the 10 slice pizza gives you 100percent of hunger and the let's say 5slices pizza would give you 50percent

@Capy1174
Copy link
Author

its just a use but in many case if item name is same and metadata is same its mean item is similar so thats good reason to make them stack on each other to save slots in inventory

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants