tpt.el.dmnd.properties=16416
tpt.el.dmnd.color=0xffaa55
tpt.el.dmnd.name="INHT"
tpt.el.dmnd.description="Induction Heater. This device when being fed by SPRK will heat nearby metals (but not semiconductors or water)."
tpt.el.dmnd.menusection=1
math.randomseed(os.time())
function inht_update(i, x, y, s, n)
if tpt.get_property("life",i) > 0 then
scany2 = math.random(-20,20)
maxscanx2 = math.sqrt(400-(scany2^2))
scanx2 = math.random(-maxscanx2,maxscanx2)
elemtype = tpt.get_property("type",x+scanx2,y+scany2)
celemtype = tpt.get_property("ctype",x+scanx2,y+scany2)
if elemtype == tpt.el.iron.id or elemtype == tpt.el.metl.id or elemtype == tpt.el.bmtl.id or elemtype == tpt.el.rbdm.id then
tpt.set_property("temp",tpt.get_property("temp",x+scanx2,y+scany2)+100,x+scanx2,y+scany2)
elseif elemtype == tpt.el.lrbd.id or elemtype == tpt.el.merc.id or elemtype == tpt.el.lava.id and (celemtype == tpt.el.iron.id or celemtype == tpt.el.metl.id or celemtype == tpt.el.bmtl.id) then
tpt.set_property("temp",tpt.get_property("temp",x+scanx2,y+scany2)+50,x+scanx2,y+scany2)
elseif elemtype == tpt.el.brmt.id then
tpt.set_property("temp",tpt.get_property("temp",x+scanx2,y+scany2)+25,x+scanx2,y+scany2)
end
end
end
tpt.element_func(inht_update, tpt.el.dmnd.id)
keperitan:
I'd like to point out that induction heaters can heat water. Have you seen an induction stove?
Turban-of-Terror:
This would be good with materials like the conductors that only conduct above or below a certain temperature.
Turban-of-Terror:
I see what ya did there sonny. My bad, for reasons I don't feel like explaining I have been out of it all day and I just forgot the word I was looking for. Why wouldn't it affect semiconductors though? I would think that that would be its only true good purpose in TPT.