Why didn't anyone think of this?
Saves sooo much space!!!!
XD
And gate:
tpt.el.bran.name="ANDG"
tpt.el.bran.description="AND gate."
tpt.el.bran.heat=273.15
tpt.el.bran.enabled=1
math.randomseed(os.time())
function notgate (i,x,y,s,n)
tpt.create(x+1,y,"insl")
tpt.create(x,y+1,"insl")
tpt.create(x+1,y-1,"metl")
tpt.create(x+1,y+1,"metl")
tpt.create(x,y-1,"insl")
tpt.create(x-1,y,"insl")
tpt.create(x-1,y+1,"insl")
tpt.create(x-1,y-1,"metl")
a=tpt.get_property("type",x+1,y-1)
b=tpt.get_property("type",x-1,y-1)
if a==tpt.el.sprk.id and b==tpt.el.sprk.id then
tpt.create(x+1,y+1,"sprk")
end
end
tpt.element_func (notgate, tpt.el.bran.id)
Not(Xand)
tpt.el.bran.name="NOTG"
tpt.el.bran.description="XAND gate."
tpt.el.bran.heat=273.15
tpt.el.bran.enabled=1
math.randomseed(os.time())
function notgate (i,x,y,s,n)
tpt.create(x+1,y,"insl")
tpt.create(x,y+1,"insl")
tpt.create(x+1,y-1,"metl")
tpt.create(x+1,y+1,"metl")
tpt.create(x,y-1,"insl")
tpt.create(x-1,y,"insl")
tpt.create(x-1,y+1,"insl")
tpt.create(x-1,y-1,"metl")
a=tpt.get_property("type",x+1,y-1)
b=tpt.get_property("type",x-1,y-1)
if a==tpt.el.sprk.id and b~=tpt.el.sprk.id then
tpt.create(x+1,y+1,"sprk")
end
end
tpt.element_func (notgate, tpt.el.bran.id)
I've actually done something similar to that, but it doesn't work in tpt++.
But aren't the smallest ones at least 5x5? I've tried to make a smaller one, but never succeeded.
it's don't works for me
Don't necro.