ID:170969
 
does anyone know how to change the icon state of anything that has the icon "turfs" and the icon_state "grass" with a verb?
Tsonic112 wrote:
does anyone know how to change the icon state of anything that has the icon "turfs" and the icon_state "grass" with a verb?

I am pretty sure this is what you are wanting..

mob
verb
change_turf_state()
for(var/turf/T)
if(T.icon == 'turfs.dmi' && T.icon_state == "grass") //EDIT I had to fix the ='s to =='s
var/icon/I = icon(T.icon)
var/state = input(src, "Select an iconstate.", "change icon state")as null|anything in I.IconStates()
if(state == null) return
T.icon_state = state