REPENTOGON icon indicating copy to clipboard operation
REPENTOGON copied to clipboard

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

Open BenevolusGoat opened this issue 11 months ago • 1 comments

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).

BenevolusGoat avatar Jan 07 '25 16:01 BenevolusGoat

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

Sylmir avatar Jan 07 '25 18:01 Sylmir