Page 1 of 1

Have is_valid_sprite_path work without a player

Posted: Thu Feb 20, 2020 10:29 am
by Therenas
Currently, you can call is_valid_sprite_path on a LuaGui, which means you need to have a reference to a player to be able to call it. In my use case, I'd like to check on_init/on_config_changed if certain entities/items/recipes even have a sprite, and exclude them from a list right away. That way, I won't have to worry about an entity without a sprite in my code down the line.

This is however not possible, as I don't have a player on_init and on_config_changed. I would prefer that you could check for sprites without a player, having it in game would probably be appropriate. Now I don't know exactly how is_valid_sprite_path works, it might require a player that it can check against? Not sure, but I'd like to know if it is possible, and possibly have it changed around, if it is.

Re: Have is_valid_sprite_path work without a player

Posted: Thu Feb 20, 2020 1:12 pm
by Rseding91
Ok.

Re: Have is_valid_sprite_path work without a player

Posted: Thu Feb 20, 2020 4:10 pm
by Therenas
Thanks a bunch!