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

Item state resetting to 0 when using datastore database #7

Open
negrifelipe opened this issue May 29, 2023 · 4 comments · May be fixed by #5
Open

Item state resetting to 0 when using datastore database #7

negrifelipe opened this issue May 29, 2023 · 4 comments · May be fixed by #5
Labels
bug Something isn't working help wanted Extra attention is needed

Comments

@negrifelipe
Copy link

For some reason when you add guns or any item that has a state to the kit, the state of it only works once after that use the item starts to be received without attachments or any state at all.
Like here:
image

@DiFFoZ DiFFoZ added bug Something isn't working help wanted Extra attention is needed labels May 30, 2023
@DiFFoZ
Copy link
Member

DiFFoZ commented May 30, 2023

Are you using datastore database? Someone already reported about that in my discord.

Still, I don't know how to fix it and why it is happening. Maybe it is a bug from YAML lib or from OpenMod.
Easy workaround is just using MySQL database

@negrifelipe
Copy link
Author

Yes, I am using data store. Will change to MySql soon. Thanks apart from that the plugin works awesome!

@DiFFoZ DiFFoZ changed the title Item state is ignored after certain random time Item state resetting to 0 when using datastore database May 30, 2023
@DiFFoZ DiFFoZ pinned this issue May 30, 2023
@negrifelipe
Copy link
Author

negrifelipe commented May 31, 2023

Using MySQL seems to have fixed it. Maybe switching to json instead of openmod's data store would be a quick solution.
The yaml lib seems to work but not all the time that's why sometimes kits works as expected. For example if i reload openmod and the plugin loads again the first that uses a kit gets it right

@DiFFoZ
Copy link
Member

DiFFoZ commented May 31, 2023

Suggestion to fix: try to copy the state of the item when adding to the store

@DiFFoZ DiFFoZ linked a pull request Oct 1, 2023 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working help wanted Extra attention is needed
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants