ID:1485520
 
Applies to:Dream Maker
Status: Open

Issue hasn't been assigned a status value.
Would it be possible to add a new error in to the compiler?

Basically it will tell you if you have an icon state set in your icon.

Basically the same error as "Icon not found", just "icon state not found" as well.
I imagine that would slow the compiler down by a ton since it would have to open every icon file you've included and read every icon_state inside of it to generate an error.

Probably not worth it.
I'm honestly trying to avoid going through all my icons to ensure I have all the icon states I need (I'm redoing all the icons in my project so they're not placeholders (Random shapes)). My problem is I've deleted the icon states without thinking to write the state names down first. T_T
You could probably add some code to check the icon_state against icon_states(icon) at runtime and spit out some log entries telling you which icons are lacking proper states. You'd only have to run the code once and it would tell you all you need to know.
Yeah sure I'll do that. It'll save a lot of time, thanks.
This could slow down compilation if included, since any time the icon_state was used, we'd have to look at the icon for that object (and more likely, its parent object) and then load it from the cache, look for the state, etc. It could be done at the end of compilation I guess, but it's a bit of a hassle.

This would actually be better done as a warning anyway, if it was added. It's not desirable for compilation to fail outright in this case.
Could make it a compiler preference, but I honestly don't see it being worth the effort to add at all. I see it being handy, but at the same time, if your states are off you'd probably figure it out pretty quick.
Agreed.
It's fine, I'm making a code snippet to run as Nadrew suggested (After I finish my mysql issues). I might throw it out there as a library for others at some point.