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

Have Sprite:Load and Sprite:ReplaceSpritesheet return if they were successful in loading the provided string #612

Open
BenevolusGoat opened this issue Jan 7, 2025 · 1 comment
Labels

Comments

@BenevolusGoat
Copy link
Collaborator

Being able to check if any specific file exists within your mod would be super handy, or even in other mods. Namely for the purpose of creating a default behavior if a file for supporting something specific hasn't been made yet. Right now the best we have is preloading an anm2 and it returning if it was successful or not (you can't even check sprite:IsLoaded(), its true even if loading wasn't successful).

@Sylmir
Copy link
Collaborator

Sylmir commented Jan 7, 2025

Not sure how safe this would be, I don't know whether checking the presence of a file can lead to potential security issues ?
IMO the paths given by modders should, ideally, resolve relative to the root of the game's folder

@BenevolusGoat BenevolusGoat changed the title Check if any particular file exists Have Sprite:Load and Sprite:ReplaceSpritesheet return if they were successful in loading the provided string Jan 7, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants