My question is: How is it possible to get a lua function run prior to the textures being loaded?
I have a function which uses an externally (python) generated texture which is named after the current world.
This causes warnings on initially entering the world if the texture hasn't been generated (presumably as the texture is used as the face of a node). Worse yet, it causes a fatal error if attempting to use the texture in a formspec.
I can use lua to check for existance and if absent copy an alternative texture to provide one with the needed name. However this will still cause warnings about lack of the texture on loading the world if the script is run only when player requests the formspec. Therefore ideally I'd like to be able to run a script, before the texture is loaded (but I don't know how, thus my question).
For the relevant code see: https://github.com/dgm3333/mapit/blob/master/init.lua