tpt.el.oil.color=0x333300
tpt.el.oil.description="Modified Oil"
math.randomseed(os.time())
function oil_clog()
if tpt.get_property("type",partx+1,party)=="BMTL" then
tpt.set_property("type",partx,party, "COAL")
end
if tpt.get_property("type",partx-1,y)=="BMTL" then
tpt.set_property("type",partx,party, "COAL")
end
if tpt.get_property("type",partx,party+1)=="BMTL" then
tpt.set_property("type",partx,party, "COAL")
end
if tpt.get_property("type",partx,party-1)=="BMTL" then
tpt.set_property("type",partx,party, "COAL")
end
end
tpt.element_func(oil_clog,tpt.el.oil.id,1)
tpt.el.oil.color=0x333300
tpt.el.oil.description="Modified Oil"
math.randomseed(os.time())
function oil_clog(i,x,y,surround_space,nt)
local found_bmtl = false
if tpt.get_property("type",x+1,y)==tpt.el.bmtl.id then
found_bmtl = true
end
if tpt.get_property("type",x-1,y)==tpt.el.bmtl.id then
found_bmtl = true
end
if tpt.get_property("type",x,y+1)==tpt.el.bmtl.id then
found_bmtl = true
end
if tpt.get_property("type",x,y-1)==tpt.el.bmtl.id then
found_bmtl = true
end
if found_bmtl then
tpt.set_property("type","COAL",x,y)
tpt.set_property("life",110,x,y)
tpt.set_property("tmp",50,x,y)
end
end
tpt.element_func(oil_clog,tpt.el.oil.id,1)