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

Upgrade linked icon support #47

Merged
merged 1 commit into from
Nov 15, 2023
Merged

Conversation

jimathy
Copy link
Contributor

@jimathy jimathy commented Oct 26, 2023

Due to issues with other scripts (including my own), I made it a bit more dynamic.

  • Detects wether an icon is an external link (nui:// or http://) and ignores changing it
  • If the item image is a link already, ignore it
  • If the icon is just an item name, create a nui link to grab the image
  • Moved the "nui://" icon addition from the js file to the main.lua file
  • Added the "update core" event to help with the script finding new items

Describe Pull request
First, make sure you've read and are following the contribution guidelines and style guide and your code reflects that.
Write up a clear and concise description of what your pull request adds or fixes and if it's an added feature explain why you think it should be included in the core.

If your PR is to fix an issue mention that issue here

Fixes QoL issues with icons being added from links

Questions (please complete the following information):

  • Have you personally loaded this code into an updated qbcore project and checked all it's functionality?
    Yes
  • Does your code fit the style guidelines?
    I believe so
  • Does your PR fit the contribution guidelines?
    I believe so

@GhzGarage GhzGarage self-assigned this Nov 15, 2023
@GhzGarage GhzGarage merged commit 83deaa0 into qbcore-framework:main Nov 15, 2023
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.

3 participants