ID:141822
 
Code:
client/New()
..()
var/obj/clay/c=new
screen+=c
clayref=c
client/proc
updatefiregui()
var/x=text2num(winget(src,"default.heat" ,"text"))
winset(src,"default.heatlabel" ,"text=[round(x)]%")
var/icon/clay=icon(clayref.icon,clayref.icon_state)
if(x>oldheat)
var/y=round(x-oldheat)
clay.Blend(rgb(y,0,0),ICON_ADD)
Debug("->Fire RGB added [y]")
else
var/y=round(oldheat-x)
clay.Blend(rgb(y,0,0),ICON_SUBTRACT)
Debug("->Fire RGB removed [y]")
oldheat=x
Debug("Fire GUI updated")


Problem description:
Alright, I have this code, and it's not blending the red in rgb(). I have a similar code which works just fine.

client/proc
updateoxygui()
var/x=text2num(winget(src,"default.oxy" ,"text"))
winset(src,"default.oxylabel" ,"text=[round(x)]%")
var/icon/clay=icon(clayref.icon,clayref.icon_state)
if(x>oldoxygen)
var/y=round(x-oldoxygen)
clay.Blend(rgb(y,y,y),ICON_SUBTRACT)
Debug("->Oxygen RGB added [rgb(y,y,y)]")
else
var/y=round(oldoxygen-x)
clay.Blend(rgb(y,y,y),ICON_ADD)
Debug("->Oxygen RGB removed [rgb(y,y,y)]")
oldoxygen=x
clayref.icon=clay
Debug("Oxygen GUI updated")


Am I just doing something wrong?
You're creating an /icon object (stored in local var clay) to manipulate an icon with Blend(), but after you've done that you're not doing anything with the /icon object and it is deleted without being utilized (after the proc ends). You created a new, modified icon, but you didn't actually do something with it (use it for something, namely something's icon), so it appears as if nothing has happened.
I trust you can follow the rest. =)
In response to Kaioken
/facepalm.
Thank you much, I see it now.