Closed Arxareon closed 3 weeks ago
Worth noting that neither GetTexture nor GetTextureFilePath have consistently worked since even before DF; and any code reliant upon them returning a path could have broken under certain circumstances anyway.
The behaviour as I recall was that if any other texture object in the UI was the first to load an asset via a file ID then the return values of these functions for all other texture objects referencing the same asset wouldn't return the path even if they themselves had supplied one in the SetTexture call - specifically, GetTexture would return the file ID and GetTextureFilePath would have returned either nil or (after some point) a "FileData ID \<ID>" string.
I was since able to find a reliable workaround using the file ID for what I needed (textures in text - I found I can use CreateTextureMarkup and CreateSimpleTextureMarkup respectively for that).
Hey!
Found a very, very annoying little issue, apparently since DF, TextureBase:GetTextureFilePath() returns a number, not file path, a string as one would expect.
Has anyone found a simple workaround for this?