Update image preloading to handle external links#296
Open
DerHobbs wants to merge 4 commits intoVORPCORE:mainfrom
Open
Update image preloading to handle external links#296DerHobbs wants to merge 4 commits intoVORPCORE:mainfrom
DerHobbs wants to merge 4 commits intoVORPCORE:mainfrom
Conversation
Added functions to save and apply HUD position using localStorage. Updated image preloading and modified inventory item loading logic.
Refactor tooltip content generation and improve metadata documentation.
Removed custom comments and reorganized HUD position application.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Type of change
Motive for This Pull Request
Allow external image URLs for items.
Provide a brief explanation of why these changes are being proposed and what they aim to achieve.
Changed preloadImages to check if an image string starts with http:// or https://. If yes, it uses the link directly. If no, it loads from the local folder like normal.
Explain the necessity of these changes and how they will impact the framework or its users.
Players can craft their own custom food and drinks. Instead of making 100 different items in the database, I use one generic item and just put the image link in the metadata. This PR lets the UI actually show those external links. Really helpful for dynamic items, so you don't have to restart or add new images to the UI folder every time a player creates a new dish.
Test:
Spawned an item with a discord link in metadata -> image loaded fine.
Notes if any
Just a tiny quality of-life update.