Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local Muon = elements.allocate("Muon", "MUON")
- local Ptrn = elements.allocate("Ptrn", "PTRN")
- local Dqrk = elements.allocate("Dqrk", "DQRK")
- local Uqrk = elements.allocate("Uqrk", "UQRK")
- elements.element(Uqrk, elements.element(elements.DEFAULT_PT_ELEC))
- elements.property(Uqrk, "Name", "UQRK")
- elements.property(Uqrk, "Colour", 0xFFE02F1B)
- elements.property(Uqrk, "Description", "Up quark, an elementary particle.") -- 2/3
- elements.property(Uqrk, "Weight", -1)
- elements.property(Uqrk, "HeatConduct", 251)
- elements.property(Uqrk, "Temperature", 295.15)
- elements.property(Uqrk, "Properties" , 0x14010)
- elements.property(Uqrk, "AirLoss", 1)
- elements.property(Uqrk, "Loss", 1)
- elements.property(Uqrk, "Collision", -0.99)
- function Uqrk(i, x, y, surround, nt)
- if tpt.get_property("tmp2", i) == 0 then
- local a = (math.random(360)-1) * 0.01745329;
- tpt.set_property("life",680,i)
- tpt.set_property("vx",2*math.cos(a),i)
- tpt.set_property("vy",2*math.sin(a),i)
- tpt.set_property("tmp2",1,i)
- end
- local collx = math.random(-1,1)
- local colly = math.random(-1,1)
- if tpt.get_property("tmp", i) == 0 then
- if tpt.get_property("type", x+collx, y+colly) == tpt.element('uqrk') then
- if tpt.get_property("tmp", x+collx, y+colly) == -1 then
- tpt.delete(x+collx, y+colly)
- sim.pressure(x/4,y/4,50)
- tpt.set_property("tmp2",0,i)
- tpt.set_property("tmp",0,i)
- tpt.set_property("type","mson",i)
- end
- end
- end
- end
- tpt.element_func(Uqrk, tpt.element('uqrk'))
- local function UqrkG(i, r, g, b)
- return 1, 0x00010001, 255, 224, 47, 27, 70, 224, 47, 27
- end
- tpt.graphics_func(UqrkG, tpt.element('uqrk'))
- elements.element(Dqrk, elements.element(elements.DEFAULT_PT_ELEC))
- elements.property(Dqrk, "Name", "DQRK")
- elements.property(Dqrk, "Colour", 0xFFE04C1B)
- elements.property(Dqrk, "Description", "Down quark, an elementary particle.") -- -1/3
- elements.property(Dqrk, "Weight", -1)
- elements.property(Dqrk, "HeatConduct", 251)
- elements.property(Dqrk, "Temperature", 295.15)
- elements.property(Dqrk, "Properties" , 0x14010)
- elements.property(Dqrk, "AirLoss", 1)
- elements.property(Dqrk, "Loss", 1)
- elements.property(Dqrk, "Collision", -0.99)
- function Dqrk(i, x, y, surround, nt)
- if tpt.get_property("tmp2", i) == 0 then
- local a = (math.random(360)-1) * 0.01745329;
- tpt.set_property("life",680,i)
- tpt.set_property("vx",2*math.cos(a),i)
- tpt.set_property("vy",2*math.sin(a),i)
- tpt.set_property("tmp2",1,i)
- end
- local collx = math.random(-1,1)
- local colly = math.random(-1,1)
- if tpt.get_property("tmp", i) == 0 then
- if tpt.get_property("type", x+collx, y+colly) == tpt.element('uqrk') then
- if tpt.get_property("tmp", x+collx, y+colly) == 0 then
- tpt.delete(x+collx, y+colly)
- tpt.set_property("tmp2",0,i)
- tpt.set_property("type","hdrn",i)
- end
- end
- end
- if tpt.get_property("tmp", i) == 0 then
- if tpt.get_property("type", x+collx, y+colly) == tpt.element('dqrk') then
- if tpt.get_property("tmp", x+collx, y+colly) == -1 then
- tpt.delete(x+collx, y+colly)sim.pressure(x/4,y/4,50)
- tpt.set_property("tmp2",0,i)
- tpt.set_property("tmp",0,i)
- tpt.set_property("type","mson",i)
- end
- end
- end
- if tpt.get_property("tmp", i) == 0 then
- if tpt.get_property("type", x+collx, y+colly) == tpt.element('uqrk') then
- if tpt.get_property("tmp", x+collx, y+colly) == -1 then
- tpt.delete(x+collx, y+colly)
- sim.pressure(x/4,y/4,50)
- tpt.set_property("tmp2",0,i)
- tpt.set_property("tmp",-1,i)
- tpt.set_property("type","mson",i)
- end
- end
- end
- if tpt.get_property("tmp", i) == -1 then
- if tpt.get_property("type", x+collx, y+colly) == tpt.element('uqrk') then
- if tpt.get_property("tmp", x+collx, y+colly) == 0 then
- tpt.delete(x+collx, y+colly)
- sim.pressure(x/4,y/4,50)
- tpt.set_property("tmp2",0,i)
- tpt.set_property("tmp",1,i)
- tpt.set_property("type","mson",i)
- end
- end
- end
- if tpt.get_property("tmp", i) == -1 then
- if tpt.get_property("type", x+collx, y+colly) == tpt.element('uqrk') then
- if tpt.get_property("tmp", x+collx, y+colly) == -1 then
- tpt.delete(x+collx, y+colly)
- tpt.set_property("tmp2",0,i)
- tpt.set_property("tmp",-1,i)
- tpt.set_property("type","hdrn",i)
- end
- end
- end
- end
- tpt.element_func(Dqrk, tpt.element('dqrk'))
- local function DqrkG(i, r, g, b)
- return 1, 0x00010001, 255, 224, 76, 27, 70, 224, 76, 27
- end
- tpt.graphics_func(DqrkG, tpt.element('dqrk'))
- local Cqrk = elements.allocate("Cqrk", "CQRK")
- elements.element(Cqrk, elements.element(elements.DEFAULT_PT_ELEC))
- elements.property(Cqrk, "Name", "CQRK")
- elements.property(Cqrk, "Colour", 0xFFE02F1B)
- elements.property(Cqrk, "Description", "Charm quark, an elementary particle.") -- 2/3
- elements.property(Cqrk, "MenuVisible", 0)
- elements.property(Cqrk, "Weight", -1)
- elements.property(Cqrk, "HeatConduct", 251)
- elements.property(Cqrk, "Temperature", 295.15)
- elements.property(Cqrk, "Properties" , 0x14010)
- elements.property(Cqrk, "AirLoss", 1)
- elements.property(Cqrk, "Loss", 1)
- elements.property(Cqrk, "Collision", -0.99)
- function Cqrk(i, x, y, surround, nt)
- if tpt.get_property("tmp2", i) == 0 then
- local a = (math.random(360)-1) * 0.01745329;
- tpt.set_property("life",680,i)
- tpt.set_property("vx",2*math.cos(a),i)
- tpt.set_property("vy",2*math.sin(a),i)
- tpt.set_property("tmp2",1,i)
- end
- local collx = math.random(-1,1)
- local colly = math.random(-1,1)
- if tpt.get_property("tmp", i) == 0 then
- if tpt.get_property("type", x+collx, y+colly) == tpt.element('cqrk') then
- if tpt.get_property("tmp", x+collx, y+colly) == -1 then
- tpt.delete(x+collx, y+colly)
- sim.pressure(x/4,y/4,50)
- tpt.set_property("tmp2",0,i)
- tpt.set_property("tmp",0,i)
- tpt.set_property("type","mson",i)
- end
- end
- end
- end
- tpt.element_func(Cqrk, tpt.element('cqrk'))
- local Sqrk = elements.allocate("Sqrk", "SQRK")
- elements.element(Sqrk, elements.element(elements.DEFAULT_PT_ELEC))
- elements.property(Sqrk, "Name", "SQRK")
- elements.property(Sqrk, "Colour", 0xFFE02F1B)
- elements.property(Sqrk, "Description", "Strange quark, hadrons with it decay slower.") -- -1/3
- elements.property(Sqrk, "MenuVisible", 0)
- elements.property(Sqrk, "Weight", -1)
- elements.property(Sqrk, "HeatConduct", 251)
- elements.property(Sqrk, "Temperature", 295.15)
- elements.property(Sqrk, "Properties" , 0x14010)
- elements.property(Sqrk, "AirLoss", 1)
- elements.property(Sqrk, "Loss", 1)
- elements.property(Sqrk, "Collision", -0.99)
- function Sqrk(i, x, y, surround, nt)
- if tpt.get_property("tmp2", i) == 0 then
- local a = (math.random(360)-1) * 0.01745329;
- tpt.set_property("life",680,i)
- tpt.set_property("vx",2*math.cos(a),i)
- tpt.set_property("vy",2*math.sin(a),i)
- tpt.set_property("tmp2",1,i)
- end
- local collx = math.random(-1,1)
- local colly = math.random(-1,1)
- if tpt.get_property("tmp", i) == 0 then
- if tpt.get_property("type", x+collx, y+colly) == tpt.element('sqrk') then
- if tpt.get_property("tmp", x+collx, y+colly) == -1 then
- tpt.delete(x+collx, y+colly)
- sim.pressure(x/4,y/4,50)
- tpt.set_property("tmp2",0,i)
- tpt.set_property("tmp",0,i)
- tpt.set_property("type","mson",i)
- end
- end
- end
- end
- tpt.element_func(Sqrk, tpt.element('sqrk'))
- local Tqrk = elements.allocate("Tqrk", "TQRK")
- elements.element(Tqrk, elements.element(elements.DEFAULT_PT_ELEC))
- elements.property(Tqrk, "Name", "TQRK")
- elements.property(Tqrk, "Colour", 0xFFE02F1B)
- elements.property(Tqrk, "Description", "Top quark, the most unstable quark, can't make hadrons.") -- 2/3
- elements.property(Tqrk, "MenuVisible", 0)
- elements.property(Tqrk, "Weight", -1)
- elements.property(Tqrk, "HeatConduct", 251)
- elements.property(Tqrk, "Temperature", 295.15)
- elements.property(Tqrk, "Properties" , 0x14010)
- elements.property(Tqrk, "AirLoss", 1)
- elements.property(Tqrk, "Loss", 1)
- elements.property(Tqrk, "Collision", -0.99)
- function Tqrk(i, x, y, surround, nt)
- if tpt.get_property("tmp2", i) == 0 then
- local a = (math.random(360)-1) * 0.01745329;
- tpt.set_property("life",680,i)
- tpt.set_property("vx",2*math.cos(a),i)
- tpt.set_property("vy",2*math.sin(a),i)
- tpt.set_property("tmp2",1,i)
- end
- local collx = math.random(-1,1)
- local colly = math.random(-1,1)
- if tpt.get_property("tmp", i) == 0 then
- if tpt.get_property("type", x+collx, y+colly) == tpt.element('tqrk') then
- if tpt.get_property("tmp", x+collx, y+colly) == -1 then
- tpt.delete(x+collx, y+colly)
- sim.pressure(x/4,y/4,50)
- tpt.set_property("tmp2",0,i)
- tpt.set_property("tmp",0,i)
- tpt.set_property("type","mson",i)
- end
- end
- end
- if math.random(1, 600) == 1 then
- tpt.set_property("tmp2",0,i)
- tpt.set_property("type","bqrk",i)
- tpt.create(x+collx, y+colly, "wbsn")
- tpt.set_property("tmp", -1, x+collx,y+colly)
- end
- end
- tpt.element_func(Tqrk, tpt.element('tqrk'))
- local Bqrk = elements.allocate("Bqrk", "BQRK")
- elements.element(Bqrk, elements.element(elements.DEFAULT_PT_ELEC))
- elements.property(Bqrk, "Name", "BQRK")
- elements.property(Bqrk, "Colour", 0xFFE02F1B)
- elements.property(Bqrk, "Description", "Bottom quark, the second heaviest elementary particle.") -- -1/3
- elements.property(Bqrk, "MenuVisible", 0)
- elements.property(Bqrk, "Weight", -1)
- elements.property(Bqrk, "HeatConduct", 251)
- elements.property(Bqrk, "Temperature", 295.15)
- elements.property(Bqrk, "Properties" , 0x14010)
- elements.property(Bqrk, "AirLoss", 1)
- elements.property(Bqrk, "Loss", 1)
- elements.property(Bqrk, "Collision", -0.99)
- function Bqrk(i, x, y, surround, nt)
- if tpt.get_property("tmp2", i) == 0 then
- local a = (math.random(360)-1) * 0.01745329;
- tpt.set_property("life",680,i)
- tpt.set_property("vx",2*math.cos(a),i)
- tpt.set_property("vy",2*math.sin(a),i)
- tpt.set_property("tmp2",1,i)
- end
- local collx = math.random(-1,1)
- local colly = math.random(-1,1)
- if tpt.get_property("tmp", i) == 0 then
- if tpt.get_property("type", x+collx, y+colly) == tpt.element('bqrk') then
- if tpt.get_property("tmp", x+collx, y+colly) == -1 then
- tpt.delete(x+collx, y+colly)
- sim.pressure(x/4,y/4,50)
- tpt.set_property("tmp2",0,i)
- tpt.set_property("tmp",0,i)
- tpt.set_property("type","mson",i)
- end
- end
- end
- if math.random(1, 1000) == 1 then
- tpt.set_property("tmp2",0,i)
- tpt.set_property("type","cqrk",i)
- tpt.create(x+collx, y+colly, "wbsn")
- end
- end
- tpt.element_func(Bqrk, tpt.element('bqrk'))
- local Hdrn = elements.allocate("Hdrn", "HDRN")
- elements.element(Hdrn, elements.element(elements.DEFAULT_PT_ELEC))
- elements.property(Hdrn, "Name", "HDRN")
- elements.property(Hdrn, "Colour", 0xFF1BCCE0)
- elements.property(Hdrn, "Description", "Hadron, a particle composed by quarks.")
- elements.property(Hdrn, "MenuVisible", 0)
- elements.property(Hdrn, "Weight", -1)
- elements.property(Hdrn, "HeatConduct", 251)
- elements.property(Hdrn, "Temperature", 295.15)
- elements.property(Hdrn, "Properties" , 0x14010)
- elements.property(Hdrn, "AirLoss", 1)
- elements.property(Hdrn, "Loss", 1)
- elements.property(Hdrn, "Collision", -0.99)
- function Hdrn(i, x, y, surround, nt)
- if tpt.get_property("tmp2", i) == 0 then
- local a = (math.random(360)-1) * 0.01745329;
- tpt.set_property("life",680,i)
- tpt.set_property("vx",2*math.cos(a),i)
- tpt.set_property("vy",2*math.sin(a),i)
- tpt.set_property("tmp2",1,i)
- end
- local collx = math.random(-1,1)
- local colly = math.random(-1,1)
- if tpt.get_property("tmp", i) == 0 then
- if tpt.get_property("type", x+collx, y+colly) == tpt.element('uqrk') then
- if tpt.get_property("tmp", x+collx, y+colly) == 0 then
- tpt.delete(x+collx, y+colly)
- tpt.set_property("tmp2",0,i)
- tpt.set_property("type","prot",i)
- end
- end
- end
- if tpt.get_property("tmp", i) == 0 then
- if tpt.get_property("type", x+collx, y+colly) == tpt.element('dqrk') then
- if tpt.get_property("tmp", x+collx, y+colly) == 0 then
- tpt.delete(x+collx, y+colly)
- tpt.set_property("tmp2",0,i)
- tpt.set_property("type","neut",i)
- end
- end
- end
- if tpt.get_property("tmp", i) == -1 then
- if tpt.get_property("type", x+collx, y+colly) == tpt.element('uqrk') then
- if tpt.get_property("tmp", x+collx, y+colly) == -1 then
- tpt.delete(x+collx, y+colly)
- tpt.set_property("tmp2",0,i)
- tpt.set_property("type","aptn",i)
- end
- end
- end
- if tpt.get_property("tmp", i) == 0 then
- if tpt.get_property("type", x+collx, y+colly) == tpt.element('hdrn') then
- if tpt.get_property("tmp", x+collx, y+colly) == -1 then
- tpt.delete(x+collx, y+colly)
- if math.random(1,2) == 1 then
- tpt.set_property("tmp2",0,i)
- tpt.set_property("tmp",0,i)
- tpt.set_property("type","mson",i)
- tpt.create(x+collx, y+colly, "mson")
- end
- if math.random(1,2) == 2 then
- tpt.set_property("tmp2",0,i)
- tpt.set_property("tmp",1,i)
- tpt.set_property("type","mson",i)
- tpt.create(x+collx, y+colly, "mson")
- tpt.set_property("tmp", -1,x+collx,y+colly)
- end
- end
- end
- end
- end
- tpt.element_func(Hdrn, tpt.element('hdrn'))
- local function HdrnG(i, r, g, b)
- return 1, 0x00010001, 255, 27, 204, 224, 70, 27, 204, 224
- end
- tpt.graphics_func(HdrnG, tpt.element('hdrn'))
- elements.element(Ptrn, elements.element(elements.DEFAULT_PT_ELEC))
- elements.property(Ptrn, "Name", "PTRN")
- elements.property(Ptrn, "Colour", 0xFFDFEFFF)
- elements.property(Ptrn, "Description", "Positron, anti-electron.")
- elements.property(Ptrn, "Weight", -1)
- elements.property(Ptrn, "HeatConduct", 251)
- elements.property(Ptrn, "Temperature", 495.15)
- elements.property(Ptrn, "Properties" , 0x14010)
- elements.property(Ptrn, "AirLoss", 1)
- elements.property(Ptrn, "Loss", 1)
- elements.property(Ptrn, "Collision", -0.99)
- function Ptrn(i, x, y, surround, nt)
- if tpt.get_property("tmp2", i) == 0 then
- local a = (math.random(360)-1) * 0.01745329;
- tpt.set_property("life",680,i)
- tpt.set_property("vx",2*math.cos(a),i)
- tpt.set_property("vy",2*math.sin(a),i)
- tpt.set_property("tmp2",1,i)
- end
- local collx = math.random(-1,1)
- local colly = math.random(-1,1)
- if tpt.get_property("type", x+collx, y+colly) == tpt.element('elec') then
- tpt.delete(x+collx, y+colly)
- sim.pressure(x/4,y/4,10)
- tpt.set_property("tmp2",0,i)
- tpt.set_property("type","ntno",i)
- tpt.create(x+collx, y+colly, "ntno")
- tpt.create(x+collx, y+colly, "phot")
- tpt.set_property("ctype", "4177920",x+collx,y+colly)
- tpt.set_property("tmp", 1,x+collx,y+colly)
- tpt.set_property("temp", 5273.15, x+collx, y+colly)
- tpt.create(x+collx, y+colly, "phot")
- tpt.set_property("ctype", "4177920",x+collx,y+colly)
- tpt.set_property("tmp", 1,x+collx,y+colly)
- tpt.set_property("temp", 5273.15, x+collx, y+colly)
- end
- end
- tpt.element_func(Ptrn, tpt.element('ptrn'))
- local function PtrnG(i, r, g, b)
- return 1, 0x00010001, 255, 223, 239, 255, 70, 223, 239, 255
- end
- tpt.graphics_func(PtrnG, tpt.element('ptrn'))
- local Ntno = elements.allocate("Ntno", "NTNO")
- elements.element(Ntno, elements.element(elements.DEFAULT_PT_ELEC))
- elements.property(Ntno, "Name", "NTNO")
- elements.property(Ntno, "Colour", 0xFFDFEFFF)
- elements.property(Ntno, "Description", "Neutrino, created by beta decays and matter-antimatter reactions.")
- elements.property(Ntno, "MenuVisible", 0)
- elements.property(Ntno, "Weight", -1)
- elements.property(Ntno, "HeatConduct", 0)
- elements.property(Ntno, "Temperature", 295.15)
- elements.property(Ntno, "Properties" , 0x14010)
- elements.property(Ntno, "AirLoss", 1)
- elements.property(Ntno, "Loss", 1)
- elements.property(Ntno, "Collision", -0.99)
- function Ntno(i, x, y, surround, nt)
- if tpt.get_property("tmp2", i) == 0 then
- local a = (math.random(360)-1) * 0.01745329;
- tpt.set_property("life",680,i)
- tpt.set_property("vx",10*math.cos(a),i)
- tpt.set_property("vy",10*math.sin(a),i)
- tpt.set_property("tmp2",1,i)
- end
- local collx = math.random(-1,1)
- local colly = math.random(-1,1)
- if tpt.get_property("tmp", i) == 0 then
- if tpt.get_property("type", x+collx, y+colly) == tpt.element('ntno') then
- if tpt.get_property("tmp", x+collx, y+colly) == -1 then
- tpt.delete(x+collx, y+colly)
- tpt.set_property("life",1,i)
- tpt.create(x+collx, y+colly, "phot")
- tpt.set_property("ctype", "4177920",x+collx,y+colly)
- tpt.set_property("tmp", 1,x+collx,y+colly)
- tpt.create(x+collx, y+colly, "phot")
- tpt.set_property("ctype", "4177920",x+collx,y+colly)
- tpt.set_property("tmp", 1,x+collx,y+colly)
- end
- end
- end
- if tpt.get_property("tmp", i) == -1 then
- if tpt.get_property("type", x+collx, y+colly) == tpt.element('hygn') then
- if math.random(1,10000) == 1 then
- tpt.set_property("tmp2",0,i)
- tpt.set_property("type","ptrn",i)
- tpt.set_property("type", neut,x+collx,y+colly)
- tpt.create(x+collx, y+colly, "elec")
- end
- end
- end
- if tpt.get_property("tmp", i) == 0 then
- if tpt.get_property("type", x+collx, y+colly) == tpt.element('deut') then
- if math.random(1,10000) == 1 then
- tpt.set_property("tmp2",0,i)
- tpt.set_property("type","elec",i)
- tpt.set_property("type","watr",x+collx,y+colly)
- tpt.create(x+collx, y+colly, "prot")
- end
- end
- end
- end
- tpt.element_func(Ntno, tpt.element('ntno'))
- local function NtnoG(i, r, g, b)
- if tpt.get_property("tmp", i) == 0 then
- return 1, 0x00010001, 255, 223, 239, 255, 70, 255, 50, 255
- end
- if tpt.get_property("tmp", i) == -1 then
- return 1, 0x00010001, 255, 223, 239, 255, 70, 50, 150, 50
- end
- end
- tpt.graphics_func(NtnoG, tpt.element('ntno'))
- function test(event)
- for i = 1,27 do
- sim.can_move(tpt.element('ntno'), i, 2)
- end
- for i2 = 29,255 do
- sim.can_move(tpt.element('ntno'),i2, 2)
- end
- end
- tpt.register_step(test)
- local Wbsn = elements.allocate("Wbsn", "WBSN")
- elements.element(Wbsn, elements.element(elements.DEFAULT_PT_ELEC))
- elements.property(Wbsn, "Name", "WBSN")
- elements.property(Wbsn, "Colour", 0xFFDFEFFF)
- elements.property(Wbsn, "Description", "W boson, determines beta decay.")
- elements.property(Wbsn, "MenuVisible", 0)
- elements.property(Wbsn, "Weight", -1)
- elements.property(Wbsn, "HeatConduct", 251)
- elements.property(Wbsn, "Temperature", 295.15)
- elements.property(Wbsn, "Properties" , 0x14010)
- elements.property(Wbsn, "AirLoss", 1)
- elements.property(Wbsn, "Loss", 1)
- elements.property(Wbsn, "Collision", -0.99)
- function Wbsn(i, x, y, surround, nt)
- if tpt.get_property("tmp2", i) == 0 then
- local a = (math.random(360)-1) * 0.01745329;
- tpt.set_property("life",680,i)
- tpt.set_property("vx",2*math.cos(a),i)
- tpt.set_property("vy",2*math.sin(a),i)
- tpt.set_property("tmp2",1,i)
- end
- local collx = math.random(-1,1)
- local colly = math.random(-1,1)
- local alife = tpt.get_property("life", i)
- if tpt.get_property("tmp", i) == 0 then
- if math.random(1,alife) == 1 then
- tpt.set_property("tmp2",0,i)
- tpt.set_property("type","elec",i)
- tpt.create(x+collx, y+colly, "ntno")
- tpt.set_property("tmp", -1,x+collx,y+colly)
- end
- end
- if tpt.get_property("tmp", i) == -1 then
- if math.random(1,alife) == 2 then
- tpt.set_property("tmp2",0,i)
- tpt.set_property("type","ptrn",i)
- tpt.create(x+collx, y+colly, "ntno")
- end
- end
- end
- tpt.element_func(Wbsn, tpt.element('wbsn'))
- local function WbsnG(i, r, g, b)
- return 1, 0x00010001, 255, 223, 239, 255, 70, 70, 70, 150
- end
- tpt.graphics_func(WbsnG, tpt.element('wbsn'))
- local Zbsn = elements.allocate("Zbsn", "ZBSN")
- elements.element(Zbsn, elements.element(elements.DEFAULT_PT_ELEC))
- elements.property(Zbsn, "Name", "ZBSN")
- elements.property(Zbsn, "Colour", 0xFFDFEFFF)
- elements.property(Zbsn, "Description", "Z boson, i have no damn idea of what it does, so it just decays.")
- elements.property(Zbsn, "MenuVisible", 0)
- elements.property(Zbsn, "Weight", -1)
- elements.property(Zbsn, "HeatConduct", 251)
- elements.property(Zbsn, "Temperature", 295.15)
- elements.property(Zbsn, "Properties" , 0x14010)
- elements.property(Zbsn, "AirLoss", 1)
- elements.property(Zbsn, "Loss", 1)
- elements.property(Zbsn, "Collision", -0.99)
- function Zbsn(i, x, y, surround, nt)
- if tpt.get_property("tmp2", i) == 0 then
- local a = (math.random(360)-1) * 0.01745329;
- tpt.set_property("life",680,i)
- tpt.set_property("vx",2*math.cos(a),i)
- tpt.set_property("vy",2*math.sin(a),i)
- tpt.set_property("tmp2",1,i)
- end
- local collx = math.random(-1,1)
- local colly = math.random(-1,1)
- local chance = math.random(1, 100)
- local chance2 = math.random(1, 30)
- if math.random(1, 100) == 1 then
- if chance < 11 then
- if chance2 < 11 then
- tpt.set_property("tmp2",0,i)
- tpt.set_property("type","elec",i)
- tpt.create(x+collx, y+colly, "ptrn")
- end
- if chance2 > 10 and chance2 < 21 then
- tpt.set_property("tmp2",0,i)
- tpt.set_property("tmp",1,i)
- tpt.set_property("type","muon",i)
- tpt.create(x+collx, y+colly, "muon")
- end
- if chance2 > 20 then -- tau
- tpt.set_property("tmp2",0,i)
- tpt.set_property("type","none",i)
- tpt.create(x+collx, y+colly, "none")
- --tpt.set_property("tmp", 1,x+collx,y+colly)
- end
- end
- if chance > 10 and chance < 31 then -- neutrino decay
- tpt.set_property("tmp2",0,i)
- tpt.set_property("type","none",i)
- --tpt.create(x+collx, y+colly, "none")
- end
- if chance > 30 then
- if chance2 < 6 then
- tpt.set_property("tmp2",0,i)
- tpt.set_property("type","uqrk",i)
- tpt.create(x+collx, y+colly, "uqrk")
- tpt.set_property("tmp", -1,x+collx,y+colly)
- end
- if chance2 > 5 and chance2 < 11 then
- tpt.set_property("tmp2",0,i)
- tpt.set_property("type","dqrk",i)
- tpt.create(x+collx, y+colly, "dqrk")
- tpt.set_property("tmp", -1,x+collx,y+colly)
- end
- if chance2 > 10 and chance2 < 16 then
- tpt.set_property("tmp2",0,i)
- tpt.set_property("type","sqrk",i)
- tpt.create(x+collx, y+colly, "sqrk")
- tpt.set_property("tmp", -1,x+collx,y+colly)
- end
- if chance2 > 15 and chance2 < 21 then
- tpt.set_property("tmp2",0,i)
- tpt.set_property("type","cqrk",i)
- tpt.create(x+collx, y+colly, "cqrk")
- tpt.set_property("tmp", -1,x+collx,y+colly)
- end
- if chance2 > 20 and chance2 < 26 then
- tpt.set_property("tmp2",0,i)
- tpt.set_property("type","bqrk",i)
- tpt.create(x+collx, y+colly, "bqrk")
- tpt.set_property("tmp", -1,x+collx,y+colly)
- end
- if chance2 > 25 and chance2 < 31 then
- tpt.set_property("tmp2",0,i)
- tpt.set_property("type","tqrk",i)
- tpt.create(x+collx, y+colly, "tqrk")
- tpt.set_property("tmp", -1,x+collx,y+colly)
- end
- end
- end
- end
- tpt.element_func(Zbsn, tpt.element('zbsn'))
- local Mson = elements.allocate("Mson", "MSON")
- elements.element(Mson, elements.element(elements.DEFAULT_PT_ELEC))
- elements.property(Mson, "Name", "MSON")
- elements.property(Mson, "Colour", 0xFF6F87A5)
- elements.property(Mson, "Description", "Meson, quark and anti-quark.")
- elements.property(Mson, "MenuVisible", 0)
- elements.property(Mson, "Weight", -1)
- elements.property(Mson, "HeatConduct", 251)
- elements.property(Mson, "Temperature", 295.15)
- elements.property(Mson, "Properties" , 0x14010)
- elements.property(Mson, "AirLoss", 1)
- elements.property(Mson, "Loss", 1)
- elements.property(Mson, "Collision", -0.99)
- function Mson(i, x, y, surround, nt)
- if tpt.get_property("tmp2", i) == 0 then
- local a = (math.random(360)-1) * 0.01745329;
- tpt.set_property("life",680,i)
- tpt.set_property("vx",2*math.cos(a),i)
- tpt.set_property("vy",2*math.sin(a),i)
- tpt.set_property("tmp2",1,i)
- end
- local collx = math.random(-1,1)
- local colly = math.random(-1,1)
- if tpt.get_property("tmp", i) == 0 then
- if math.random(1,20) == 1 then
- tpt.create(x+collx, y+colly, "phot")
- tpt.set_property("ctype", "4177920",x+collx,y+colly)
- tpt.set_property("tmp", 1,x+collx,y+colly)
- tpt.set_property("temp", 5273.15, x+collx, y+colly)
- tpt.create(x+collx, y+colly, "phot")
- tpt.set_property("ctype", "4177920",x+collx,y+colly)
- tpt.set_property("tmp", 1,x+collx,y+colly)
- tpt.set_property("temp", 5273.15, x+collx, y+colly)
- tpt.set_property("life",1,i)
- end
- end
- if tpt.get_property("tmp", i) == 1 then
- if math.random(1,20) == 1 then
- tpt.create(x+collx, y+colly, "muon")
- tpt.set_property("tmp", 1,x+collx,y+colly)
- tpt.set_property("temp", 5273.15, x+collx, y+colly)
- tpt.set_property("life",1,i)
- end
- end
- if tpt.get_property("tmp", i) == -1 then
- if math.random(1,20) == 1 then
- tpt.create(x+collx, y+colly, "muon")
- tpt.set_property("temp", 5273.15, x+collx, y+colly)
- tpt.set_property("life",1,i)
- end
- end
- end
- tpt.element_func(Mson, tpt.element('mson'))
- elements.element(Muon, elements.element(elements.DEFAULT_PT_ELEC))
- elements.property(Muon, "Name", "MUON")
- elements.property(Muon, "Colour", 0xFF21FF33)
- elements.property(Muon, "Description", "Muon, secondary generation lepton.")
- elements.property(Muon, "Weight", -1)
- elements.property(Muon, "HeatConduct", 251)
- elements.property(Muon, "Temperature", 295.15)
- elements.property(Muon, "Properties" , 0x14010)
- elements.property(Muon, "AirLoss", 1)
- elements.property(Muon, "Loss", 1)
- elements.property(Muon, "Collision", -0.99)
- function Muon(i, x, y, surround, nt)
- if tpt.get_property("tmp2", i) == 0 then
- local a = (math.random(360)-1) * 0.01745329;
- tpt.set_property("life",680,i)
- tpt.set_property("vx",2*math.cos(a),i)
- tpt.set_property("vy",2*math.sin(a),i)
- tpt.set_property("tmp2",1,i)
- end
- local collx = math.random(-1,1)
- local colly = math.random(-1,1)
- if tpt.get_property("type", x+collx, y+colly) == tpt.element('hygn') then
- tpt.set_property("temp",math.huge,i)
- tpt.set_property("temp", math.huge, x+collx, y+colly)
- sim.pressure(x/4,y/4,math.huge)
- tpt.set_property("type","none",i)
- end
- if math.random(1,200) == 1 then
- if tpt.get_property("tmp", i) == 0 then
- tpt.set_property("type","elec",i)
- end
- if tpt.get_property("tmp", i) == 1 then
- tpt.set_property("type","ptrn",i)
- end
- end
- end
- tpt.element_func(Muon, tpt.element('muon'))
- local Aptn = elements.allocate("Aptn", "APTN")
- elements.element(Aptn, elements.element(elements.DEFAULT_PT_PROT))
- elements.property(Aptn, "Name", "APTN")
- elements.property(Aptn, "Colour", 0xFFE02F1B)
- elements.property(Aptn, "Description", "Anti-proton.")
- elements.property(Aptn, "MenuVisible", 0)
- elements.property(Aptn, "Weight", -1)
- elements.property(Aptn, "HeatConduct", 251)
- elements.property(Aptn, "Temperature", 295.15)
- elements.property(Aptn, "Properties" , 0x14010)
- elements.property(Aptn, "AirLoss", 1)
- elements.property(Aptn, "Loss", 1)
- elements.property(Aptn, "Collision", -0.99)
- function Aptn(i, x, y, surround, nt)
- if tpt.get_property("tmp2", i) == 0 then
- local a = (math.random(360)-1) * 0.01745329;
- tpt.set_property("life",680,i)
- tpt.set_property("vx",2*math.cos(a),i)
- tpt.set_property("vy",2*math.sin(a),i)
- tpt.set_property("tmp2",1,i)
- end
- local collx = math.random(-1,1)
- local colly = math.random(-1,1)
- local chance = math.random(1,100)
- if tpt.get_property("type", x+collx, y+colly) == tpt.element('prot') then
- tpt.delete(x+collx, y+colly)
- sim.pressure(x/4,y/4,150)
- if chance < 51 then
- tpt.create(x+collx, y+colly, "mson")
- tpt.create(x+collx, y+colly, "mson")
- tpt.create(x+collx, y+colly, "mson")
- tpt.set_property("life",1,i)
- end
- if chance > 50 then
- tpt.create(x+collx, y+colly, "mson")
- tpt.create(x+collx, y+colly, "mson")
- tpt.set_property("tmp", 1,x+collx,y+colly)
- tpt.create(x+collx, y+colly, "mson")
- tpt.set_property("tmp", -1,x+collx,y+colly)
- tpt.set_property("life",1,i)
- end
- end
- if tpt.get_property("type", x+collx, y+colly) == tpt.element('neut') then
- tpt.delete(x+collx, y+colly)
- sim.pressure(x/4,y/4,150)
- if chance < 51 then
- tpt.create(x+collx, y+colly, "mson")
- tpt.create(x+collx, y+colly, "mson")
- tpt.set_property("tmp", 1,x+collx,y+colly)
- tpt.create(x+collx, y+colly, "mson")
- tpt.set_property("life",1,i)
- end
- if chance > 50 then
- tpt.create(x+collx, y+colly, "mson")
- tpt.set_property("tmp", 1,x+collx,y+colly)
- tpt.create(x+collx, y+colly, "mson")
- tpt.set_property("tmp", -1,x+collx,y+colly)
- tpt.create(x+collx, y+colly, "mson")
- tpt.set_property("tmp", -1,x+collx,y+colly)
- tpt.set_property("life",1,i)
- end
- end
- if tpt.get_property("type", x+collx, y+colly) == tpt.element('hygn') then
- tpt.delete(x+collx, y+colly)
- tpt.create(x+collx, y+colly, "elec")
- sim.pressure(x/4,y/4,150)
- if chance < 51 then
- tpt.create(x+collx, y+colly, "mson")
- tpt.create(x+collx, y+colly, "mson")
- tpt.create(x+collx, y+colly, "mson")
- tpt.set_property("life",1,i)
- end
- if chance > 50 then
- tpt.create(x+collx, y+colly, "mson")
- tpt.create(x+collx, y+colly, "mson")
- tpt.set_property("tmp", 1,x+collx,y+colly)
- tpt.create(x+collx, y+colly, "mson")
- tpt.set_property("tmp", -1,x+collx,y+colly)
- tpt.set_property("life",1,i)
- end
- end
- end
- tpt.element_func(Aptn, tpt.element('aptn'))
- local function AptnG(i, r, g, b)
- return 1, 0x00020001, 255, 224, 47, 27, 7, 250, 170, 170
- end
- tpt.graphics_func(AptnG, tpt.element('aptn'))
- local Antn = elements.allocate("Antn", "ANTN")
- elements.element(Antn, elements.element(elements.DEFAULT_PT_NEUT))
- elements.property(Antn, "Name", "ANTN")
- elements.property(Antn, "Colour", 0x20E0FF)
- elements.property(Antn, "Description", "Anti-neutron.")
- elements.property(Antn, "MenuVisible", 0)
- elements.property(Antn, "Weight", -1)
- elements.property(Antn, "HeatConduct", 251)
- elements.property(Antn, "Temperature", 295.15)
- elements.property(Antn, "Properties" , 0x14010)
- elements.property(Antn, "AirLoss", 1)
- elements.property(Antn, "Loss", 1)
- elements.property(Antn, "Collision", -0.99)
- function Antn(i, x, y, surround, nt)
- if tpt.get_property("tmp2", i) == 0 then
- local a = (math.random(360)-1) * 0.01745329;
- tpt.set_property("life",680,i)
- tpt.set_property("vx",2*math.cos(a),i)
- tpt.set_property("vy",2*math.sin(a),i)
- tpt.set_property("tmp2",1,i)
- end
- local collx = math.random(-1,1)
- local colly = math.random(-1,1)
- local chance = math.random(1,100)
- if tpt.get_property("type", x+collx, y+colly) == tpt.element('neut') then
- tpt.delete(x+collx, y+colly)
- sim.pressure(x/4,y/4,150)
- if chance < 51 then
- tpt.create(x+collx, y+colly, "mson")
- tpt.create(x+collx, y+colly, "mson")
- tpt.create(x+collx, y+colly, "mson")
- tpt.set_property("life",1,i)
- end
- if chance > 50 then
- tpt.create(x+collx, y+colly, "mson")
- tpt.create(x+collx, y+colly, "mson")
- tpt.set_property("tmp", 1,x+collx,y+colly)
- tpt.create(x+collx, y+colly, "mson")
- tpt.set_property("tmp", -1,x+collx,y+colly)
- tpt.set_property("life",1,i)
- end
- end
- if tpt.get_property("type", x+collx, y+colly) == tpt.element('prot') then
- tpt.delete(x+collx, y+colly)
- sim.pressure(x/4,y/4,150)
- if chance < 51 then
- tpt.create(x+collx, y+colly, "mson")
- tpt.create(x+collx, y+colly, "mson")
- tpt.set_property("tmp", 1,x+collx,y+colly)
- tpt.create(x+collx, y+colly, "mson")
- tpt.set_property("life",1,i)
- end
- if chance > 50 then
- tpt.create(x+collx, y+colly, "mson")
- tpt.set_property("tmp", 1,x+collx,y+colly)
- tpt.create(x+collx, y+colly, "mson")
- tpt.set_property("tmp", 1,x+collx,y+colly)
- tpt.create(x+collx, y+colly, "mson")
- tpt.set_property("tmp", -1,x+collx,y+colly)
- tpt.set_property("life",1,i)
- end
- end
- if tpt.get_property("type", x+collx, y+colly) == tpt.element('hygn') then
- tpt.delete(x+collx, y+colly)
- tpt.create(x+collx, y+colly, "elec")
- sim.pressure(x/4,y/4,150)
- if chance < 51 then
- tpt.create(x+collx, y+colly, "mson")
- tpt.create(x+collx, y+colly, "mson")
- tpt.set_property("tmp", 1,x+collx,y+colly)
- tpt.create(x+collx, y+colly, "mson")
- tpt.set_property("life",1,i)
- end
- if chance > 50 then
- tpt.create(x+collx, y+colly, "mson")
- tpt.set_property("tmp", 1,x+collx,y+colly)
- tpt.create(x+collx, y+colly, "mson")
- tpt.set_property("tmp", 1,x+collx,y+colly)
- tpt.create(x+collx, y+colly, "mson")
- tpt.set_property("tmp", -1,x+collx,y+colly)
- tpt.set_property("life",1,i)
- end
- end
- end
- tpt.element_func(Antn, tpt.element('antn'))
- local function AntnG(i, r, g, b)
- return 1, 0x00010001, 255, 32, 224, 255, 120, 170, 48, 208
- end
- tpt.graphics_func(AntnG, tpt.element('antn'))
- local Higg = elements.allocate("Higg", "HIGG")
- elements.element(Higg, elements.element(elements.DEFAULT_PT_ELEC))
- elements.property(Higg, "Name", "HIGG")
- elements.property(Higg, "Colour", 0xFFF3932A)
- elements.property(Higg, "Description", "Higgs boson, gives mass to particles.")
- elements.property(Higg, "MenuVisible", 0)
- elements.property(Higg, "Weight", -1)
- elements.property(Higg, "HeatConduct", 251)
- elements.property(Higg, "Temperature", 295.15)
- elements.property(Higg, "Properties" , 0x14010)
- elements.property(Higg, "AirLoss", 1)
- elements.property(Higg, "Loss", 1)
- elements.property(Higg, "Collision", -0.99)
- function Higg(i, x, y, surround, nt)
- if tpt.get_property("tmp2", i) == 0 then
- local a = (math.random(360)-1) * 0.01745329;
- tpt.set_property("life",10,i)
- tpt.set_property("vx",2*math.cos(a),i)
- tpt.set_property("vy",2*math.sin(a),i)
- tpt.set_property("tmp2",1,i)
- end
- local collx = math.random(-1,1)
- local colly = math.random(-1,1)
- if tpt.get_property("tmp", i) == 0 then
- if tpt.get_property("type", x+collx, y+colly) == tpt.element('uqrk') then
- if tpt.get_property("tmp", x+collx, y+colly) == -1 then
- tpt.delete(x+collx, y+colly)
- sim.pressure(x/4,y/4,50)
- tpt.set_property("tmp2",0,i)
- tpt.set_property("tmp",0,i)
- tpt.set_property("type","mson",i)
- end
- end
- end
- end
- tpt.element_func(Higg, tpt.element('higg'))
- local function HiggG(i, r, g, b)
- return 1, 0x00010001, 255, 243, 147, 42, 70, 243, 147, 42
- end
- tpt.graphics_func(HiggG, tpt.element('higg'))
- function Pairproduction(i, x, y, surround, nt)
- collx = math.random(-1,1)
- colly = math.random(-1,1)
- collx2 = math.random(-1,1)
- colly2 = math.random(-1,1)
- local atmp2 = tpt.get_property("tmp2", i)
- local avx = tpt.get_property("vx", i)
- local avy = tpt.get_property("vy", i)
- local chance = math.random(1,2)
- --if tpt.get_property("ctype", i) == 4177920 then
- if atmp2 > 0 then
- if tpt.get_property("type", x+collx, y+colly) == tpt.element('none') then
- if tpt.get_property("type", x+collx2, y+colly2) == tpt.element('none') then
- tpt.create(x+collx, y+colly, "elec")
- tpt.set_property("tmp2", atmp2 - chance,x+collx,y+colly)
- tpt.set_property("vx", avx/2,x+collx,y+colly)
- tpt.set_property("vy", avy/2,x+collx,y+colly)
- tpt.set_property("life", 500,x+collx,y+colly)
- tpt.create(x+collx2, y+colly2, "ptrn")
- tpt.set_property("tmp2", atmp2 - chance,x+collx2,y+colly2)
- tpt.set_property("vx", avx/2,x+collx2,y+colly2)
- tpt.set_property("vy", avy/2,x+collx2,y+colly2)
- tpt.set_property("life", 500,x+collx2,y+colly2)
- tpt.set_property("life",1,i)
- --end
- end
- end
- end
- --if tpt.get_property("ctype", i) == 4177920 then
- --if tpt.get_property("type", x+collx, y+colly) == tpt.element('nble') then
- --tpt.set_property("type", "plsm",x+collx,y+colly)
- --tpt.set_property("ctype", "nble",x+collx,y+colly)
- --tpt.set_property("life",1000,x+collx,y+colly)
- --tpt.set_property("life",0,i)
- --end
- --end
- end
- tpt.element_func(Pairproduction, tpt.element('phot'))
- function test(event)
- for i = 1,27 do
- sim.can_move(tpt.element('ntno'), i, 2)
- end
- for i2 = 29,255 do
- sim.can_move(tpt.element('ntno'),i2, 2)
- end
- end
- tpt.register_step(test)
- function Gravi(i, x, y, surround, nt)
- if tpt.get_property("tmp2", i) == 0 then
- local a = (math.random(360)-1) * 0.01745329;
- local avx = 2*math.cos(a)
- local avy = 2*math.sin(a)
- tpt.set_property("tmp2",1,i)
- end
- tpt.set_property("vx",avx,i)
- tpt.set_property("vy",avy,i)
- end
- tpt.element_func(Gravi, tpt.element('grvt'))
Advertisement
Add Comment
Please, Sign In to add comment