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

Improved getItem inventory matching and fix inventory being stuck #540

Merged
merged 3 commits into from
Jul 25, 2024

Conversation

swkeep
Copy link
Contributor

@swkeep swkeep commented Jun 26, 2024

Description

Just two small fixes:

  1. Fixed inventoryId matching in getItem. Without using the character starting index in find, names ending with "drop-" couldn't be used (ammoDrop, cargoDrop, etc) and we can't use underscores in names because of how find works:
  -- both of these return the same result
  print(('drop-'):find('drop-'))
  print(('drop_'):find('drop-'))
  1. Fixed an issue where players could get stuck in inv_busy = true state, if they had their inventory open before we restarted the inventory. This one typically is not an issue for most servers, but developers may notice it.

Checklist

  • I have personally loaded this code into an updated qbcore project and checked all of its functionality.
  • My code fits the style guidelines.
  • My PR fits the contribution guidelines.

@GhzGarage GhzGarage self-assigned this Jul 25, 2024
@GhzGarage GhzGarage merged commit 79e762f into qbcore-framework:main Jul 25, 2024
1 of 2 checks passed
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.

2 participants