Guest User

2.0!!!

a guest
Jun 17th, 2019
139
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 102.43 KB | None | 0 0
  1. local function velocity(i,v,n) --*1
  2.  local angle = math.random(1,n)*(2*math.pi/n)
  3.  tpt.set_property("vx", v*math.cos(angle), i)
  4.  tpt.set_property("vy", v*math.sin(angle), i)
  5.  tpt.set_property("tmp", -1, i)
  6.  end --*1
  7.  
  8. local function velocity_2(i,v,n) --*1
  9.  if tpt.get_property("tmp", i) == 0 then --1
  10.   local angle_2 = math.random(1,n)*(2*math.pi/n)
  11.   tpt.set_property("vx", v*math.cos(angle_2), i)
  12.   tpt.set_property("vy", v*math.sin(angle_2), i)
  13.   tpt.set_property("tmp", -1, i)
  14.   end --1
  15.  end --*1
  16.  
  17. local function attract(i,x,y,a) --*1
  18.  sim.gravMap(x/4,y/4,a)
  19. end --*1
  20.  
  21.  
  22. local qtfm = elements.allocate("TPT", "RADI")
  23.  elements.element(qtfm, elements.element(elements.DEFAULT_PT_PROT))
  24.  elements.property(qtfm, "Name", "RADI")
  25.  elements.property(qtfm, "Description" , "Background Radiation. Spreads.")
  26.  elements.property(qtfm, "Color", 0x888888)
  27.  elements.property(qtfm, "Diffusion", 0.75)
  28.  elements.property(qtfm, "Update", --*1
  29.  function(i,x,y) --1
  30.   sim.partProperty(i, "life", 10)
  31.   if sim.partProperty(i, "tmp") == 0 then --2
  32.    sim.partProperty(i, "tmp", 50)
  33.    end --2
  34.   if math.random(0,7) > 0 then --3
  35.   sim.partProperty(i, "tmp", sim.partProperty(i, "tmp")-1)
  36.    if sim.partProperty(i, "tmp") < 1 then --4
  37.     sim.partKill(i)
  38.     end --4
  39.    end --3
  40.   if math.random(1,20000) == 1 then --5
  41.    sim.partProperty(i, "life", 500)
  42.    sim.partProperty(i, "ctype", 1073741823)
  43.    sim.partProperty(i, "type", elements.DEFAULT_PT_PHOT)
  44.    end --5
  45.   if math.random(1,200000) == 1 then --6
  46.    sim.partProperty(i, "life", 275)
  47.    sim.partProperty(i, "ctype", 1073741823)
  48.    sim.partProperty(i, "type", elements.DEFAULT_PT_PROT)
  49.    end --6
  50.   if math.random(1,200000) == 1 then --7
  51.    sim.partProperty(i, "life", 50)
  52.    sim.partProperty(i, "ctype", 1073741823)
  53.    sim.partProperty(i, "type", elements.DEFAULT_PT_NEUT)
  54.    end --7
  55.   end --1
  56.   ) --*1
  57.  
  58.  local function funcGraphics(i, colr, colg, colb) --*1
  59.   return 1,ren.PMODE_SPARK,255,colr,colg,colb,64,184,200,223
  60.   end --*1
  61.  elements.property(qtfm, "Graphics", funcGraphics)
  62.  
  63. local function radiate(i,x,y,s,t) --*1
  64.  if math.random(0,(s/5)) == 0 then --31
  65.   sim.partCreate(-1, math.random(x-1,x+1),math.random(y-1,y+1),elements.TPT_PT_RADI)
  66.   sim.partProperty(i, "temp", sim.partProperty(i, "temp")+t)
  67.   end --1
  68. end --*1
  69.  
  70. local nept = elements.allocate("TPT" , "NEPT")
  71.  elements.element(nept, elements.element(elements.DEFAULT_PT_PLUT))
  72.  elements.property(nept, "Name" , "NEPT")
  73.  elements.property(nept, "Description" , "Neptunium, radioactive. Quickly heats up when bombarded with neutrons.")
  74.  elements.property(nept, "Color", 0x557020)
  75.  elements.property(nept, "PhotonReflectWavelengths", 0x002FF200)
  76.  elements.property(nept, "MenuSection", 10)
  77.  
  78. local vsns = elements.allocate("TPT" , "VSNS")
  79.  elements.element(vsns, elements.element(elements.DEFAULT_PT_DMND))
  80.  elements.property(vsns, "Name" , "VSNS")
  81.  elements.property(vsns, "Description" , "Velocity sensor, creates power when something's velocity is higher than its temperature.")
  82.  elements.property(vsns, "Color", 0x3D3125)
  83.  elements.property(vsns, "MenuSection", 3)
  84.  elements.property(vsns, "HeatConduct", 0)
  85.  elements.property(elem.TPT_PT_VSNS, "Update",
  86.  function(i,x,y,s,nt) --1
  87.   for r in sim.neighbors(x,y,1,1) do --2
  88.    if math.sqrt(math.pow(sim.partProperty(r, "vx"),2)+math.pow(sim.partProperty(r, "vy"),2)) > sim.partProperty(i, "temp")-273.15 then --3
  89.     sim.partCreate(-1, x, y+1, elements.DEFAULT_PT_SPRK)
  90.     sim.partCreate(-1, x+1, y+1, elements.DEFAULT_PT_SPRK)
  91.     sim.partCreate(-1, x-1, y+1, elements.DEFAULT_PT_SPRK)
  92.     sim.partCreate(-1, x, y-1, elements.DEFAULT_PT_SPRK)
  93.     sim.partCreate(-1, x+1, y-1, elements.DEFAULT_PT_SPRK)
  94.     sim.partCreate(-1, x-1, y-1, elements.DEFAULT_PT_SPRK)
  95.     sim.partCreate(-1, x+1, y, elements.DEFAULT_PT_SPRK)
  96.     sim.partCreate(-1, x-1, y, elements.DEFAULT_PT_SPRK)
  97.     end --3
  98.    end --2
  99.   end --1
  100. ) --*1
  101.  
  102. local mrcv = elements.allocate("TPT", "MRCV")
  103.  elements.element(mrcv,elem.element(elem.DEFAULT_PT_WTRV))
  104.  elements.property(mrcv, "Name" , "MRCV")
  105.  elements.property(mrcv, "Description" , "Mercury Vapor.")
  106.  elements.property(mrcv, "Color", 0x6D6567)
  107.  elements.property(mrcv, "Temperature", 637.85)
  108.  elements.property(mrcv, "AirDrag", 0.01)
  109.  elements.property(mrcv, "Loss", 0.5)
  110.  elements.property(mrcv, "LowTemperature", 618.32)
  111.  elements.property(mrcv, "LowTemperatureTransition", elements.DEFAULT_PT_MERC)
  112.  
  113.  elements.property(elements.DEFAULT_PT_MERC, "Update", --*1
  114.  function(i,x,y) --1
  115.   if sim.partProperty(i, "temp") > 628.91 then --2
  116.    if math.random(1,450) == 1 then --3
  117.     sim.partChangeType(i, elements.TPT_PT_MRCV)
  118.     end --3
  119.    end --2
  120.   end --1
  121.  ) --*1
  122.  
  123. local anti = elements.allocate("TPT" , "ANTI")
  124.  elements.element(anti, elements.element(elements.DEFAULT_PT_SING))
  125.  elements.property(anti, "Name" , "ANTI")
  126.  elements.property(anti, "Description" , "Anti Singularity, incredibly destructive. Slowly increases in size")
  127.  elements.property(anti, "Color", 0xDBDBDB)
  128.  elements.property(anti, "HotAir", 0.15)
  129.  elements.property(anti, "MenuSection", 16)
  130.  elements.property(elements.TPT_PT_ANTI, "Update", --*1
  131.  function(i,x,y) --1
  132.   attract(i,x,y,-0.75)
  133.   if math.random(1,50) == 1 then --2
  134.    sim.partCreate(-1, x+math.random(-1,1),y+math.random(-1,1),elements.TPT_PT_ANTI)
  135.    sim.partProperty(i, "temp", sim.partProperty(i, "temp")-200)
  136.    end --2
  137.   end --1
  138.  ) --*1
  139.  
  140.  elements.property(elements.DEFAULT_PT_SING, "Update", --*1
  141.  function(i,x,y) --1
  142.   attract(i,x,y,0.75)
  143.   end --1
  144.  ) --*1
  145.  
  146. local ash = elements.allocate("TPT", "ASH")
  147.  elements.element(ash, elements.element(elements.DEFAULT_PT_DUST))
  148.  elements.property(ash, "Name" , "ASH")
  149.  elements.property(ash, "Description" , "Ash, light powder. Turns into oil under pressure.")
  150.  elements.property(ash, "Color", 0x393224)
  151.  elements.property(ash, "Gravity", 0.056)
  152.  elements.property(ash, "Advection", 0.2)
  153.  elements.property(ash, "Weight", 2)
  154.  elements.property(ash, "AirDrag", 0.05)
  155.  elements.property(ash, "Flammable", 25.56)
  156.  
  157. local lhyg = elements.allocate("TPT", "LHYG")
  158.  elements.element(lhyg, elements.element(elements.DEFAULT_PT_LOXY))
  159.  elements.property(lhyg, "Name" , "LHYG")
  160.  elements.property(lhyg, "Description" , "Liquid Hydrogen, very cold. Incredibly flammable")
  161.  elements.property(lhyg, "Flammable", 5000.65)
  162.  elements.property(lhyg, "Explosive", 1)
  163.  elements.property(lhyg, "Color", 0x3D68CD)
  164.  elements.property(lhyg, "Temperature", 14.15)
  165.  elements.property(lhyg, "MenuSection", 7)
  166.  elements.property(lhyg, "HighTemperature", 18.15)
  167.  elements.property(lhyg, "HighTemperatureTransition", elements.DEFAULT_PT_HYGN)
  168.  
  169.  elements.property(elements.DEFAULT_PT_HYGN, "LowTemperature", 15.24)
  170.  elements.property(elements.DEFAULT_PT_HYGN, "LowTemperatureTransition", elements.TPT_PT_LHYG)
  171.  
  172. local pb = elements.allocate("TPT" , "LEAD")
  173.  elements.element(pb, elements.element(elements.DEFAULT_PT_IRON))
  174.  elements.property(pb, "Name" , "LEAD")
  175.  elements.property(pb, "Description" , "Lead, absorbs neutrons. Conducts electricity.")
  176.  elements.property(pb, "Color", 0x686868)
  177.  elements.property(pb, "Hardness", 0)
  178.  elements.property(pb, "HighTemperature", 601.25)
  179.  elements.property(pb, "Properties", elements.PROP_NEUTABSORB+elements.PROP_CONDUCTS+elements.PROP_LIFE_DEC+elements.TYPE_SOLID+elements.PROP_DEADLY)
  180.  
  181. local mnpr = elements.allocate("TPT", "MNPR")
  182.  elements.element(mnpr, elements.element(elements.DEFAULT_PT_BOYL))
  183.  elements.property(mnpr, "Name" , "MONO")
  184.  elements.property(mnpr, "Description" , "Monopropellant. Disperses quickly.")
  185.  elements.property(mnpr, "Color", 0xB0B0B0)
  186.  elements.property(mnpr, "Advection", 0.2)
  187.  elements.property(mnpr, "AirDrag", 0.05)
  188.  elements.property(mnpr, "HotAir", 0.01)
  189.  elements.property(mnpr, "MenuSection", 16)
  190.  elements.property(elements.TPT_PT_MNPR, "Update", --*1
  191. function(i,x,y) --1
  192.  if math.random(1,30) == 1 then --2
  193.   sim.partKill(i)
  194.   end --2
  195.  end --1
  196.  ) --*1
  197.  
  198. local mnpl = elements.allocate("TPT", "MNPL")
  199.  elements.element(mnpl, elements.element(elements.DEFAULT_PT_LOXY))
  200.  elements.property(mnpl, "Name" , "MNPL")
  201.  elements.property(mnpl, "Description" , "Liquid Monopropellant. Releases lots of pressure and cools down when boiled")
  202.  elements.property(mnpl, "Flammable", 0)
  203.  elements.property(mnpl, "Color", 0xA0A0A0)
  204.  elements.property(mnpl, "Temperature", 180.15)
  205.  elements.property(mnpl, "MenuSection", 5)
  206.  elements.property(mnpl, "Diffusion", 0.1)
  207.  elements.property(mnpl, "HighTemperature", 200.15)
  208.  elements.property(mnpl, "HighTemperatureTransition", elements.TPT_PT_MNPR)
  209.  elements.property(elements.TPT_PT_MNPL, "Update", --*1
  210.  function(i,x,y,s,nt) --1
  211.   for r in sim.neighbors(x,y,1,1) do --2
  212.    if sim.partProperty(r, "type") == elements.TPT_PT_MNPR then --3
  213.     if math.random(1,45) == 1 then --4
  214.      sim.partProperty(i, "temp", sim.partProperty(i, "temp")-75)
  215.      sim.pressure(x/4,y/4,10)
  216.      end --4
  217.     end --3
  218.    end --2
  219.   end --1
  220.  ) --*1
  221.  
  222.  elements.property(mnpr, "LowTemperature", 190.15)
  223.  elements.property(mnpr, "LowTemperatureTransition", elements.TPT_PT_MNPL)
  224.  
  225. local tchn = elements.allocate("TPT" , "TCHN")
  226.  elements.element(tchn, elements.element(elements.DEFAULT_PT_URAN))
  227.  elements.property(tchn, "Name" , "TCHN")
  228.  elements.property(tchn, "Description" , "Technetium, decays over time and leaves heat.")
  229.  elements.property(tchn, "Color", 0x205570)
  230.  elements.property(tchn, "MenuSection", 11)
  231. elements.property(elements.TPT_PT_TCHN, "Update", --*1
  232.  function(i,x,y) --1
  233.   if math.random(1,11520) == 1 then --2
  234.    sim.partProperty(i, "temp", sim.partProperty(i, "temp")+400)
  235.    sim.pressure(x/4,y/4,8)
  236.    sim.partProperty(i, "type", elements.DEFAULT_PT_STNE)
  237.    radiate(i,x,y,125,100)
  238.    end --2
  239.   end --1
  240.  ) --*1
  241.  elements.property(tchn, "HighTemperatureTransition", elements.TPT_PT_TCHN)
  242.  
  243. local psac = elements.allocate("TPT", "PSAC")
  244.  elements.element(psac, elements.element(elements.DEFAULT_PT_SOAP))
  245.  elements.property(psac, "Name" , "PSAC")
  246.  elements.property(psac, "Description" , "Positronic acid, reacts violently with matter, weak acid.")
  247.  elements.property(psac, "Color", 0xFF20BB)
  248.  elements.property(psac, "Advection", 0.01)
  249.  elements.property(psac, "Hardness", 0)
  250.  elements.property(psac, "Properties", elements.TYPE_LIQUID+elements.PROP_NEUTPENETRATE+elements.PROP_RADIOACTIVE)
  251.  elements.property(elem.TPT_PT_PSAC, "Update", --*1
  252.  function(i,x,y,s,nt) --1
  253.   if s ~=8 and nt ~=0 and nt - s > 0 then --2
  254.    if math.random(1,100) == 10 then --3
  255.     for r in sim.neighbors(x,y,1,1) do --4
  256.      if sim.partProperty(r, "type") ~= elements.DEFAULT_PT_DMND then --5
  257.       if sim.partProperty(r, "type") ~= elements.DEFAULT_PT_VACU then --6
  258.        if sim.partProperty(r, "type") ~= elements.DEFAULT_PT_VOID then --7
  259.         if sim.partProperty(r, "type") ~= elements.DEFAULT_PT_CLNE then --8
  260.          if sim.partProperty(r, "type") ~= elements.DEFAULT_PT_PCLN then --9
  261.           if math.random(1,3) == 1 then --10
  262.            sim.partKill(r)
  263.            sim.partProperty(i, "temp", sim.partProperty(i, "temp")+3200)
  264.            if math.random(1,13) == 1 then --11
  265.             sim.pressure(x/4,y/4,16)
  266.             sim.partKill(i)
  267.             return
  268.             end --11
  269.            end --10
  270.           end --9
  271.          end --8
  272.         end --7
  273.        end --6
  274.       end --5
  275.      end --4
  276.     end --3
  277.    end --2
  278.   radiate(i,x,y,250,200)
  279.   end --1
  280.   ) --*1
  281.  
  282. local si = elements.allocate("TPT" , "SILC")
  283.  elements.element(si, elements.element(elements.DEFAULT_PT_IRON))
  284.  elements.property(si, "Name" , "SILC")
  285.  elements.property(si, "Description" , "Silicon, conducts electricity. Lets air pass through")
  286.  elements.property(si, "Color", 0x686E76)
  287.  elements.property(si, "AirLoss", 1)
  288.  elements.property(si, "HighTemperature", 1687.01)
  289.  elements.property(si, "Properties", elements.PROP_CONDUCTS+elements.PROP_LIFE_DEC+elements.TYPE_SOLID+elements.PROP_HOT_GLOW)
  290.  
  291. local torn = elements.allocate("TPT" , "TORN")
  292.  elements.element(torn, elements.element(elements.DEFAULT_PT_BOYL))
  293.  elements.property(torn, "Name" , "TORN")
  294.  elements.property(torn, "Description" , "Tornado, self explanatory.")
  295.  elements.property(torn, "Color", 0x8A9098)
  296.  elements.property(torn, "Collision", -1)
  297.  elements.property(torn, "Loss", 0.5)
  298.  elements.property(torn, "AirDrag", 0.05)
  299.  elements.property(torn, "HotAir", -0.001)
  300.  elements.property(torn, "MenuSection", 16)
  301.  
  302. local lhlm = elements.allocate("TPT", "LHE")
  303.  elements.element(lhlm, elements.element(elements.DEFAULT_PT_SOAP))
  304.  elements.property(lhlm, "Name" , "LHE")
  305.  elements.property(lhlm, "Description" , "Liquid helium, incredibly cold.")
  306.  elements.property(lhlm, "Temperature", 4.01)
  307.  elements.property(lhlm, "Color", 0x5000FF)
  308.  elements.property(lhlm, "MenuSection", 11)
  309.  elements.property(lhlm, "Weight", 30)
  310.  elements.property(elem.TPT_PT_LHE, "Update", --*1
  311. function(i,x,y,s) --1
  312.   if math.random(1,200) == 1 then --2
  313.    if sim.partProperty(i, "temp") > 4.21 then --3
  314.     if math.random(1,150) > 1 then --4
  315.      sim.partKill(i)
  316.      else
  317.      sim.partProperty(i, "type", elements.TPT_PT_HE)
  318.      end --4
  319.     end --3
  320.    end --2
  321.   end --1
  322.   ) --*1
  323.  
  324. local he = elements.allocate("TPT", "HE")
  325.  elements.element(he, elements.element(elements.DEFAULT_PT_HYGN))
  326.  elements.property(he, "Name" , "HE")
  327.  elements.property(he, "Description", "Helium, floats.")
  328.  elements.property(he, "Color", 0x6111FF)
  329.  elements.property(he, "Diffusion", 1.5)
  330.  elements.property(he, "Gravity", -0.3)
  331.  elements.property(he, "Flammable", 0)
  332.  elements.property(he, "LowTemperature", -1)
  333.  elements.property(he, "LowTemperatureTransition", -1)
  334.  elements.property(he, "MenuSection", 16)
  335.  
  336. local n237 = elements.allocate("TPT" , "N237")
  337.  elements.element(n237, elements.element(elements.DEFAULT_PT_POLO))
  338.  elements.property(n237, "Name" , "N237")
  339.  elements.property(n237, "Description" , "Neptunium 237, decays very quickly. Radioactive waste.")
  340.  elements.property(n237, "Color", 0x668131)
  341.  elements.property(n237, "HighTemperature", 1644)
  342.  elements.property(n237, "PhotonReflectWavelengths", 0x002FF200)
  343.  elements.property(n237, "MenuSection", 16)
  344.  function nept237(i,x,y,s,n)
  345.   if tpt.get_property("type", x + math.random(-2,2), y + math.random(-2,2)) == tpt.el.neut.id then --1
  346.    if math.random(1,2) == 1 then --2
  347.     tpt.parts[i].type = elements.DEFAULT_PT_PLUT
  348.     tpt.create(x + math.random(-2,2), y + math.random(-2,2), 'neut')
  349.     else if math.random(1,6) == 1 then --3
  350.      tpt.parts[i].type = elements.DEFAULT_PT_HE
  351.      tpt.create(x + math.random(-2,2), y + math.random(-2,2), 'neut')
  352.      tpt.create(x + math.random(-2,2), y + math.random(-2,2), 'neut')
  353.      end --3
  354.     end --2
  355.    end --1
  356.   if sim.pressure(x/4,y/4) > 1 then --3
  357.    if math.random(1,125) == 10 then --4
  358.     tpt.create(x + math.random(-2,2), y + math.random(-2,2), 'neut')
  359.     tpt.create(x + math.random(-2,2), y + math.random(-2,2), 'neut')
  360.     tpt.create(x + math.random(-2,2), y + math.random(-2,2), 'neut')
  361.     tpt.set_property("temp", math.huge, x ,y)
  362.     end --4
  363.    end --3
  364.   if math.random(1,100) == 10 then --5
  365.    sim.pressure(x/4,y/4,0.2)
  366.    end --5
  367.   radiate(i,x,y,125,30)
  368.   end --*1
  369.  tpt.element_func(nept237,elements.TPT_PT_N237)
  370.  
  371.  function neptunium(i,x,y,s,n)
  372.   if tpt.get_property("type", x + math.random(-2,2), y + math.random(-2,2)) == tpt.el.neut.id then --1
  373.    if math.random(1,2) == 1 then --2
  374.     tpt.parts[i].type = elements.DEFAULT_PT_URAN
  375.     else if math.random(1,6) == 1 then --3
  376.      tpt.create(x + math.random(-2,2), y + math.random(-2,2), elements.TPT_PT_N237)
  377.      tpt.create(x + math.random(-2,2), y + math.random(-2,2), elements.TPT_PT_N237)
  378.      tpt.parts[i].type = elements.DEFAULT_PT_NBLE
  379.      end --3
  380.     end --2
  381.    end --1
  382.   if sim.pressure(x/4,y/4) > 1 then --3
  383.    if math.random(1,250) == 10 then --4
  384.     tpt.create(x + math.random(-2,2), y + math.random(-2,2), 'neut')
  385.     tpt.set_property("temp", math.huge, x ,y)
  386.     end --4
  387.    end --3
  388.   if math.random(1,10000) == 10 then --5
  389.    sim.pressure(x/4,y/4,0.1)
  390.    end --5
  391.   radiate(i,x,y,500,15)
  392.   end --*1
  393.  tpt.element_func(neptunium,nept)
  394.   function neutron(i,x,y,s,n) --*2
  395.    if tpt.get_property("type", x + math.random(-2,2), y + math.random(-2,2)) == nept then --1
  396.     if math.random(1,25) == 10 then --2
  397.      tpt.create(x, y, 'neut')
  398.      tpt.set_property("temp", tpt.get_property("temp", x, y)+7000, x ,y)
  399.      sim.pressure(x/4,y/4,8)
  400.      end --2
  401.     end --1
  402.    end --*2
  403.  tpt.element_func(neutron,tpt.el.neut.id)
  404.  
  405. local he3 = elements.allocate("TPT", "HE3")
  406.  elements.element(he3, elements.element(elements.DEFAULT_PT_HYGN))
  407.  elements.property(he3, "Name" , "HE3")
  408.  elements.property(he3, "Description", "Helium 3, fuses with tritium.")
  409.  elements.property(he3, "Color", 0xD6EE00)
  410.  elements.property(he3, "Diffusion", 1.7)
  411.  elements.property(he3, "Gravity", -1.0)
  412.  elements.property(he3, "Flammable", 0)
  413.  elements.property(he3, "LowTemperature", -1)
  414.  elements.property(he3, "LowTemperatureTransition", -1)
  415.  elements.property(he3, "MenuSection", 16)
  416.  
  417. local shake = elements.allocate("TPT", "SHAKE")
  418.  elements.element(shake, elements.element(elements.DEFAULT_PT_DMND))
  419.  elements.property(shake, "Name" , "SHAK")
  420.  elements.property(shake, "Description", "Shakes particles.")
  421.  elements.property(shake, "Color", 0xFFCCCC)
  422.  elements.property(shake, "Weight", 0)
  423.  elements.property(shake, "MenuSection", 13)
  424.  elements.property(elem.TPT_PT_SHAKE, "Update", --*1
  425. function(i,x,y,s) --1
  426.   for r in sim.neighbors(x,y,1,1) do --2
  427.    velocity(r,6,360)
  428.    end --2
  429.   sim.partKill(i)
  430.   end --1
  431.  ) --*1
  432.  
  433. local normal = elements.allocate("TPT", "NORMAL")
  434.  elements.element(normal, elements.element(elements.DEFAULT_PT_DMND))
  435.  elements.property(normal, "Name" , "NORM")
  436.  elements.property(normal, "Description", "Normalizes temperature and pressure in the selected area.")
  437.  elements.property(normal, "Color", 0xCCFFCC)
  438.  elements.property(normal, "Weight", 0)
  439.  elements.property(normal, "MenuSection", 13)
  440.  elements.property(elem.TPT_PT_NORMAL, "Update", --*1
  441. function(i,x,y,s) --1
  442.   sim.pressure(x/4,y/4,0)
  443.   for r in sim.neighbors(x,y,1,1) do --2
  444.    if sim.partProperty(r, "temp") > 295.15 then --3
  445.     sim.partProperty(r, "temp", sim.partProperty(r, "temp")-5)
  446.     end --3
  447.    if sim.partProperty(r, "temp") < 295.15 then --4
  448.     sim.partProperty(r, "temp", sim.partProperty(r, "temp")+5)
  449.     end --4
  450.    end --2
  451.   sim.partKill(i)
  452.   end --1
  453.  ) --*1
  454.  
  455. local os = elements.allocate("TPT" , "OSMM")
  456.  elements.element(os, elements.element(elements.DEFAULT_PT_BRMT))
  457.  elements.property(os, "Name" , "OSMM")
  458.  elements.property(os, "Description" , "Osmium, heavy metal. Mostly the norwegian kind")
  459.  elements.property(os, "Color", 0x4D5763)
  460.  elements.property(os, "Gravity", 0.5)
  461.  elements.property(os, "AirDrag", 0.08)
  462.  elements.property(os, "Weight", 97)
  463.  elements.property(os, "Meltable", 1)
  464.  elements.property(os, "HighTemperature", 3306)
  465.  elements.property(os, "HighTemperatureTransition", elements.DEFAULT_PT_LAVA)
  466.  elements.property(elements.TPT_PT_OSMM, "Update", --*1
  467.  function(i,x,y) --1
  468.   attract(i,x,y,0.0025)
  469.   end --1
  470.  ) --*1
  471.  
  472. local anco = elements.allocate("TPT", "ACOL")
  473.  elements.element(anco, elements.element(elements.DEFAULT_PT_COAL))
  474.  elements.property(anco, "Name" , "ACOL")
  475.  elements.property(anco, "Description" , "Anti-Coal, burns slowly and very... surprisingly cold.")
  476.  elements.property(anco, "MenuSection", 16)
  477.  elements.property(anco, "Color", 0xDDDDDD)
  478.  elements.property(elem.TPT_PT_ACOL, "Update", --*1
  479.  function(i,x,y,s,nt) --1
  480.   if math.random(1,2) == 2 then --2
  481.    if s ~=8 and nt ~=0 and nt - s > 0 then --3
  482.     for r in sim.neighbors(x,y,1,1) do --4
  483.      if sim.partProperty(i, "tmp") == 0 then --5
  484.       if sim.partProperty(r, "type") == elements.DEFAULT_PT_CFLM then --6
  485.        sim.partProperty(i, "tmp", -1)
  486.        end --6
  487.       end --5
  488.      if sim.partProperty(i, "tmp") == -1 then --7
  489.       if math.random(1,9) == 1 then --8
  490.        sim.partCreate(-1, x+math.random(-1,1), y+math.random(-1,1), elements.DEFAULT_PT_CFLM)
  491.        sim.partProperty(i, "temp", sim.partProperty(i, "temp")-200)
  492.        if math.random(1,900) == 1 then --9
  493.         sim.partKill(i)
  494.         return
  495.         end --9
  496.        end --8
  497.       end --7
  498.      end --4
  499.     end --3
  500.    end --2
  501.   end --1
  502.   ) --*1
  503.  
  504.  elements.property(elements.DEFAULT_PT_PLSM, "HeatConduct", 255)
  505.  elements.property(elements.DEFAULT_PT_GLOW, "HeatConduct", 255)
  506.  
  507.  elements.property(elements.DEFAULT_PT_IRON, "Update", --*1
  508.  function(i,x,y,s,nt) --1
  509.    if s ~=8 and nt ~=0 and nt - s > 0 then --2
  510.     for r in sim.neighbors(x,y,1,1) do --3
  511.      if sim.pressure(x/4,y/4) > 2.51 then --4
  512.       if sim.partProperty(r, "type") == elements.DEFAULT_PT_FIRE then --5
  513.        sim.partProperty(i, "tmp", -1)
  514.        end --5
  515.       if sim.partProperty(i, "tmp") == -1 then --6
  516.        if math.random(1,9) == 1 then --7
  517.         sim.partCreate(-1, x+math.random(-1,1), y+math.random(-1,1), elements.DEFAULT_PT_FIRE)
  518.          if math.random(1,25) == 1 then --8
  519.           sim.partProperty(i, "temp", sim.partProperty(i, "temp")+10000)
  520.           sim.partProperty(i, "temp", sim.partProperty(i, "temp")+10000)
  521.           sim.partProperty(i, "temp", sim.partProperty(i, "temp")+10000)
  522.           sim.partProperty(i, "tmp", 0)
  523.           end --8
  524.          end --7
  525.         end --6
  526.        end --5
  527.       end --4
  528.      end --3
  529.     end --2
  530.  ) --*1
  531.  
  532. local bhut = elements.allocate("TPT" , "BHUT")
  533.  elements.element(bhut, elements.element(elements.DEFAULT_PT_BOYL))
  534.  elements.property(bhut, "Name" , "BHUT")
  535.  elements.property(bhut, "HeatConduct", 255)
  536.  elements.property(bhut, "HotAir", 0.001)
  537.  elements.property(bhut, "Color", 0x706050)
  538.  elements.property(bhut, "AirDrag", 0.001)
  539.  elements.property(bhut, "AirLoss", 1)
  540.  elements.property(bhut, "Diffusion", 1.25)
  541.  elements.property(bhut, "MenuSection", 5)
  542.  elements.property(bhut, "Description" , "Bhutane, explosive gas")
  543.  elements.property(elem.TPT_PT_BHUT, "Update", --*1
  544.  function(i,x,y,s,nt) --1
  545.   if math.random(1,2) == 2 then --2
  546.    if s ~=8 and nt ~=0 and nt - s > 0 then --3
  547.     for r in sim.neighbors(x,y,1,1) do --4
  548.      if sim.partProperty(i, "tmp") == 0 then --5
  549.       if sim.partProperty(r, "type") == elements.DEFAULT_PT_FIRE then --6
  550.        sim.partProperty(i, "tmp", -1)
  551.        end --6
  552.       end --5
  553.      if sim.partProperty(i, "tmp") == -1 then --7
  554.       if math.random(1,3) > 1 then --8
  555.        sim.partCreate(-1, x+math.random(-1,1), y+math.random(-1,1), elements.DEFAULT_PT_FIRE)
  556.        sim.partProperty(i, "temp", sim.partProperty(i, "temp")+400)
  557.        sim.pressure(x/4,y/4,5)
  558.        if math.random(1,6) == 1 then --9
  559.         sim.partKill(i)
  560.         return
  561.         end --9
  562.        end --8
  563.       end --7
  564.      end --4
  565.     end --3
  566.    end --2
  567.   end --1
  568.   ) --*1
  569.  
  570.  elements.property(elements.TPT_PT_ASH, "Update", --*1
  571. function(i,x,y,s) --1
  572.   if sim.pressure(x/4,y/4) > 5.9 then --2
  573.    if math.random(1,950) == 1 then --3
  574.     sim.partProperty(i, "type", elements.DEFAULT_PT_OIL)
  575.     else if math.random (1,3000) == 1 then --4
  576.      sim.partProperty(i, "type", elements.TPT_PT_BHUT)
  577.      else if math.random (1,3000) == 1 then --4
  578.       sim.partProperty(i, "type", elements.DEFAULT_PT_SAWD)
  579.       end --5
  580.      end --4
  581.     end --3
  582.    end --2
  583.   end --1
  584.   ) --*1
  585.  
  586. local gr = elements.allocate("TPT" , "GRPH")
  587.  elements.element(gr, elements.element(elements.DEFAULT_PT_COAL))
  588.  elements.property(gr, "Name" , "GRPH")
  589.  elements.property(gr, "Description" , "Graphite, melts at an incredibly high temperature.")
  590.  elements.property(gr, "Color", 0x111113)
  591.  elements.property(gr, "HeatConduct", 7)
  592.  elements.property(gr, "HighTemperature", 4003.15)
  593.  elements.property(gr, "Meltable", 1)
  594.  elements.property(gr, "HighTemperatureTransition", elements.DEFAULT_PT_LAVA)
  595.  elements.property(gr, "Properties", elements.PROP_CONDUCTS+elements.TYPE_SOLID+elements.PROP_HOT_GLOW)
  596.  elements.property(elements.TPT_PT_GRPH, "Update", --*1
  597.  function(i,x,y,s,nt) --1
  598.    if sim.partProperty(i, "life") > 0 then --2
  599.     if math.random(1,65) == 1 then --3
  600.      sim.partProperty(i, "life", 0)
  601.      end --3
  602.     end --2
  603.    if sim.pressure(x/4,y/4) > 11.8 then --4
  604.     if math.random(1,950) == 1 then --5
  605.      sim.partProperty(i, "type", elements.DEFAULT_PT_DMND)
  606.      end --5
  607.     end --4
  608.    end --1
  609.   ) --*1
  610.  
  611. local thor = elements.allocate("TPT" , "THOR")
  612.  elements.element(thor, elements.element(elements.DEFAULT_PT_PLUT))
  613.  elements.property(thor, "Name" , "THOR")
  614.  elements.property(thor, "Description" , "Thorium, not radioactive on its own, needs help from another radioactive material to function.")
  615.  elements.property(thor, "Color", 0x404043)
  616.  elements.property(thor, "PhotonReflectWavelengths", 0x8FFFFFFF)
  617.  elements.property(thor, "MenuSection", 10)
  618.   function neutron2(i,x,y,s,n) --*2
  619.    if tpt.get_property("type", x + math.random(-2,2), y + math.random(-2,2)) == thor then --1
  620.     if math.random(1,70) == 1 then --2
  621.      tpt.set_property("temp", tpt.get_property("temp", x, y)+4500, x, y)
  622.      radiate(i,x,y,250,100)
  623.      end --2
  624.     end --1
  625.    end --*2
  626.  tpt.element_func(neutron2,tpt.el.neut.id)
  627.  
  628. local para = elements.allocate("TPT" , "PARA")
  629.  elements.element(para, elements.element(elements.DEFAULT_PT_WAX))
  630.  elements.property(para, "Name" , "FZOL")
  631.  elements.property(para, "HeatConduct", 5)
  632.  elements.property(para, "Color", 0x474530)
  633.  elements.property(para, "Flammable", 1)
  634.  elements.property(para, "Description" , "Frozen oil, flammable")
  635.  elements.property(para, "HighTemperature", 277.14)
  636.  elements.property(para, "Temperature", 274.14)
  637.  elements.property(para, "HighTemperatureTransition", elements.DEFAULT_PT_OIL)
  638.  
  639.  elements.property(elements.DEFAULT_PT_OIL, "LowTemperature", 278.14)
  640.  elements.property(elements.DEFAULT_PT_OIL, "LowTemperatureTransition", elements.TPT_PT_PARA)
  641.  
  642. local plwd = elements.allocate("TPT" , "PLWD")
  643.  elements.element(plwd, elements.element(elements.DEFAULT_PT_WOOD))
  644.  elements.property(plwd, "Name" , "PLWD")
  645.  elements.property(plwd, "HeatConduct", 2)
  646.  elements.property(plwd, "Color", 0x808445)
  647.  elements.property(plwd, "Flammable", 1)
  648.  elements.property(plwd, "Description" , "Plywood. Durable material.")
  649.  elements.property(plwd, "AirLoss", 0.2)
  650.  elements.property(plwd, "Hardness", 1)
  651.  
  652. local lbl = elements.allocate("TPT" , "LBYL")
  653.  elements.element(lbl, elements.element(elements.DEFAULT_PT_LOXY))
  654.  elements.property(lbl, "Name" , "LBYL")
  655.  elements.property(lbl, "HeatConduct", 25)
  656.  elements.property(lbl, "Color", 0x001F00)
  657.  elements.property(lbl, "Flammable", 5)
  658.  elements.property(lbl, "HotAir", -0.0001)
  659.  elements.property(lbl, "Description" , "Liquid Boyle gas. Explosive.")
  660.  elements.property(lbl, "HighTemperature", 220.14)
  661.  elements.property(lbl, "Temperature", 213.14)
  662.  elements.property(lbl, "HighTemperatureTransition", elements.DEFAULT_PT_BOYL)
  663.  elements.property(lbl, "MenuSection", 16)
  664.  
  665.  elements.property(elements.DEFAULT_PT_BOYL, "LowTemperature", 219.14)
  666.  elements.property(elements.DEFAULT_PT_BOYL, "HighTemperatureTransition", elements.TPT_PT_LBYL)
  667.  
  668. local mgns = elements.allocate("TPT", "CAVE")
  669.  elements.element(mgns, elements.element(elements.DEFAULT_PT_BRMT))
  670.  elements.property(mgns, "Name" , "CAVE")
  671.  elements.property(mgns, "Description" , "Burn life's house down! With the lemons!")
  672.  elements.property(mgns, "Color", 0xA5A515)
  673.  elements.property(mgns, "Weight", 49)
  674.  elements.property(mgns, "Gravity", 0.3)
  675.  elements.property(mgns, "MenuSection", 16)
  676.  elements.property(elem.TPT_PT_CAVE, "Update", --*1
  677.  function(i,x,y,s) --1
  678.   if s > 6 then --2
  679.    if math.random(1,20) == 20 then --3
  680.     sim.partCreate(-1, x+math.random(-2,2), y+math.random(-2,2), elements.DEFAULT_PT_FIRE)
  681.     sim.partCreate(-1, x+math.random(-2,2), y+math.random(-2,2), elements.DEFAULT_PT_FIRE)
  682.     sim.partCreate(-1, x+math.random(-2,2), y+math.random(-2,2), elements.DEFAULT_PT_FIRE)
  683.     sim.partChangeType(i, elements.DEFAULT_PT_FIRE)
  684.     sim.pressure(x/4,y/4,16)
  685.     if math.random(1,5) == 5 then --4
  686.      sim.partKill(i)
  687.      end --4
  688.     end --3
  689.    end --2
  690.   end --1
  691.   ) --*1
  692.  
  693. local tmpsns = elements.allocate("TPT" , "TMPS")
  694. elements.element(tmpsns, elements.element(elements.DEFAULT_PT_DMND))
  695. elements.property(tmpsns, "Name" , "TMPS")
  696. elements.property(tmpsns, "Description" , "Temporary value sensor, creates power when something's tmp or tmp2 is higher than its temperature.")
  697. elements.property(tmpsns, "Color", 0x22713D)
  698. elements.property(tmpsns, "MenuSection", 3)
  699. elements.property(tmpsns, "HeatConduct", 0)
  700. elements.property(elem.TPT_PT_TMPS, "Update",
  701.  function(i,x,y,s,nt) --1
  702.   for r in sim.neighbors(x,y,1,1) do --2
  703.    if sim.partProperty(r, "tmp") > sim.partProperty(i, "temp")-273.15 then --3
  704.     sim.partCreate(-1, x, y+1, elements.DEFAULT_PT_SPRK)
  705.     sim.partCreate(-1, x+1, y+1, elements.DEFAULT_PT_SPRK)
  706.     sim.partCreate(-1, x-1, y+1, elements.DEFAULT_PT_SPRK)
  707.     sim.partCreate(-1, x, y-1, elements.DEFAULT_PT_SPRK)
  708.     sim.partCreate(-1, x+1, y-1, elements.DEFAULT_PT_SPRK)
  709.     sim.partCreate(-1, x-1, y-1, elements.DEFAULT_PT_SPRK)
  710.     sim.partCreate(-1, x+1, y, elements.DEFAULT_PT_SPRK)
  711.     sim.partCreate(-1, x-1, y, elements.DEFAULT_PT_SPRK)
  712.     end --3
  713.    end --2
  714.   end --1
  715. ) --*1
  716.  
  717. local erode = elements.allocate("TPT", "ERODE")
  718.  elements.element(erode, elements.element(elements.DEFAULT_PT_DMND))
  719.  elements.property(erode, "Name" , "EROD")
  720.  elements.property(erode, "Description", "Erodes.")
  721.  elements.property(erode, "Color", 0xCCCCCC)
  722.  elements.property(erode, "Weight", 0)
  723.  elements.property(erode, "MenuSection", 13)
  724.  elements.property(elem.TPT_PT_ERODE, "Update", --*1
  725.  function(i,x,y,s,nt) --1
  726.   if s ~=8 and nt ~=0 and nt - s > 0 then --2
  727.    if math.random(1,25) == 10 then --3
  728.     for r in sim.neighbors(x,y,1,1) do --4
  729.      if math.random(1,6) == 3 then --5
  730.       sim.partKill(r)
  731.       end --5
  732.      end --4
  733.     end --3
  734.    end --2
  735.   sim.partKill(i)
  736.   end --1
  737.   ) --*1
  738.  
  739. local storm = elements.allocate("TPT", "STORM")
  740.  elements.element(storm, elements.element(elements.DEFAULT_PT_DMND))
  741.  elements.property(storm, "Name" , "STRM")
  742.  elements.property(storm, "Description", "Storms.")
  743.  elements.property(storm, "Color", 0x889F9F)
  744.  elements.property(storm, "Weight", 0)
  745.  elements.property(storm, "MenuSection", 11)
  746.  elements.property(elem.TPT_PT_STORM, "Update", --*1
  747.  function(i,x,y,s) --1
  748.   sim.pressure(x/4,y/4,math.random(-112,112))
  749.   if math.random(1,1000) == 1 then --2
  750.    sim.partProperty(i, "type", elements.DEFAULT_PT_WATR)
  751.    else if math.random(1,100) == 1 then --3
  752.     sim.partProperty(i, "type", elements.DEFAULT_PT_FOG)
  753.     else if math.random(1,5000) == 1 then --5
  754.      sim.partProperty(i, "tmp2", 4)
  755.      sim.partProperty(i, "tmp", math.random(0,359))
  756.      sim.partProperty(i, "life", math.random(15,25))
  757.      sim.partProperty(i, "type", elements.DEFAULT_PT_LIGH)
  758.      else if math.random(1,5) == 1 then --4
  759.       sim.partProperty(i, "type", elements.TPT_PT_TORN)
  760.       else
  761.       sim.partKill(i)
  762.       end --5
  763.      end --4
  764.     end --3
  765.    end --2
  766.   end --1
  767.  ) --*1
  768.  
  769. local aliq = elements.allocate("TPT", "ANLIQ")
  770.  elements.element(aliq, elements.element(elements.DEFAULT_PT_GLOW))
  771.  elements.property(aliq, "Name" , "ALIQ")
  772.  elements.property(aliq, "Description", "Anti-liquid. Flows upwards.")
  773.  elements.property(aliq, "Color", 0xEFEFFF)
  774.  elements.property(aliq, "Gravity", -0.1)
  775.  elements.property(aliq, "Advection", -0.6)
  776.  elements.property(aliq, "AirDrag", -0.01)
  777.  elements.property(aliq, "HeatConduct", 2)
  778.  elements.property(aliq, "MenuSection", 16)
  779.  elements.property(elem.TPT_PT_ANLIQ, "Update", --*1
  780.  function(i,x,y,s,nt) --1
  781.   if math.random(1,2) == 2 then --2
  782.    if s ~=8 and nt ~=0 and nt - s > 0 then --3
  783.     for r in sim.neighbors(x,y,1,1) do --4
  784.      if sim.partProperty(i, "tmp") == 0 then --5
  785.       if sim.partProperty(r, "type") == elements.DEFAULT_PT_CFLM then --6
  786.        sim.partProperty(i, "tmp", -1)
  787.        end --6
  788.       end --5
  789.      if sim.partProperty(i, "tmp") == -1 then --7
  790.       if math.random(1,2) == 1 then --8
  791.        sim.partCreate(-1, x+math.random(-1,1), y+math.random(-1,1), elements.DEFAULT_PT_CFLM)
  792.        sim.partProperty(i, "temp", sim.partProperty(i, "temp")-200)
  793.        sim.pressure(x/4,y/4,5)
  794.        if math.random(1,50) == 1 then --9
  795.         sim.partKill(i)
  796.         return
  797.         end --9
  798.        end --8
  799.       end --7
  800.      end --4
  801.     end --3
  802.    end --2
  803.   end --1
  804.   ) --*1
  805.  
  806. local neutr = elements.allocate("TPT" , "NETR")
  807.  elements.element(neutr, elements.element(elements.DEFAULT_PT_DMND))
  808.  elements.property(neutr, "Name" , "NETR")
  809.  elements.property(neutr, "Description" , "Neutronium. Dense, Radioactive solid. Slowly implodes and decays after time. Rarely grows")
  810.  elements.property(neutr, "Color", 0x0606FF)
  811.  elements.property(neutr, "Properties", elements.TYPE_SOLID+elements.PROP_CONDUCTS+elements.PROP_LIFE_DEC+elements.PROP_RADIOACTIVE+elements.PROP_NEUTPASS)
  812.  elements.property(neutr, "PhotonReflectWavelengths", 0x00000001)
  813.  elements.property(neutr, "MenuSection", 10)
  814. elements.property(elements.TPT_PT_NETR, "Update", --*1
  815.  function(i,x,y) --1
  816.   attract(i,x,y,0.1)
  817.    if math.random(1,(sim.pressure(x/4,y/4)+256)/100) == 1 then --2
  818.     if math.random(1,50) == 1 then --3
  819.      sim.partCreate(-1, x+math.random(-1,1), y+math.random(-1,1), elements.TPT_PT_NETR)
  820.      if math.random(1,500) == 1 then --4
  821.       sim.partCreate(-1, x+math.random(-1,1), y+math.random(-1,1), elements.TPT_PT_NETR)
  822.       end --4
  823.      end --3
  824.     end --2
  825.   if math.random(1,(sim.pressure(x/4,y/4)+256)*100) == 1 then --5
  826.    sim.partProperty(i, "temp", sim.partProperty(i, "temp")+400)
  827.    sim.pressure(x/4,y/4,32)
  828.    sim.partCreate(-1, x+math.random(-1,1), y+math.random(-1,1), elements.DEFAULT_PT_NEUT)
  829.    sim.pressure(x/4,y/4,-32)
  830.    sim.partProperty(i, "life", 90)
  831.    repeat --6
  832.     attract(i,x,y,-10)
  833.     if math.random(1,2) == 1 then --7
  834.      sim.partProperty(i, "life", sim.partProperty(i, "life")-1)
  835.      end --7
  836.     until sim.partProperty(i, "life") < 0 --6
  837.    sim.partKill(i)
  838.    end --5
  839.   end --1
  840.  ) --*1
  841.  
  842. local brcryst = elements.allocate("TPT" , "BCRY")
  843.  elements.element(brcryst, elements.element(elements.DEFAULT_PT_PQRT))
  844.  elements.property(brcryst, "Name" , "BCRY")
  845.  elements.property(brcryst, "Description" , "Broken Crystal. Light powder, may shred lungs of organisms.")
  846.  elements.property(brcryst, "Properties", elements.TYPE_PART+elements.PROP_DEADLY)
  847.  elements.property(brcryst, "Color", 0xE9E9EF)
  848.  elements.property(brcryst, "PhotonReflectWavelengths", 0xEFEFEFF6)
  849.  elements.property(brcryst, "MenuSection", 8)
  850.  elements.property(brcryst, "Gravity", 0.056)
  851.  elements.property(brcryst, "Advection", 0.2)
  852.  elements.property(brcryst, "Weight", 2)
  853.  elements.property(brcryst, "AirDrag", 0.05)
  854.  elements.property(brcryst, "Diffusion", 0.1)
  855.  
  856. local cryst = elements.allocate("TPT" , "CRYT")
  857.  elements.element(cryst, elements.element(elements.DEFAULT_PT_QRTZ))
  858.  elements.property(cryst, "Name" , "CRYS")
  859.  elements.property(cryst, "Description" , "Crystal. Durable, grows")
  860.  elements.property(cryst, "Color", 0xEEEEF3)
  861.  elements.property(cryst, "PhotonReflectWavelengths", 0xF8F8F8FF)
  862.  elements.property(cryst, "MenuSection", 9)
  863.  elements.property(cryst, "HighPressure", 20.14)
  864.  elements.property(cryst, "HighPressureTransition", elements.TPT_PT_BCRY)
  865. elements.property(elements.TPT_PT_CRYT, "Update", --*1
  866.  function(i,x,y) --1
  867.   if math.random(1,100) == 1 then --2
  868.    sim.partCreate(-1, x+math.random(-1,1), y+math.random(-1,1), elements.TPT_PT_CRYT)
  869.    if math.random(1,20) == 1 then --3
  870.     sim.partCreate(-1, x+math.random(-1,1), y+math.random(-1,1), elements.TPT_PT_CRYT)
  871.     end --3
  872.    end --2
  873.   end --1
  874. ) --*1
  875.  
  876.  
  877.  elements.property(brcryst, "HighTemperatureTransition", elements.TPT_PT_CRYT)
  878.  
  879. local gasl = elements.allocate("TPT" , "GASL")
  880.  elements.element(gasl, elements.element(elements.DEFAULT_PT_GLOW))
  881.  elements.property(gasl, "Name" , "GASL")
  882.  elements.property(gasl, "HeatConduct", 255)
  883.  elements.property(gasl, "Color", 0xF0C020)
  884.  elements.property(gasl, "Flammable", 0)
  885.  elements.property(gasl, "MenuSection", 5)
  886.  elements.property(gasl, "Description" , "Gasoline, highly flammable.")
  887.  elements.property(elem.TPT_PT_GASL, "Update", --*1
  888.  function(i,x,y,s,nt) --1
  889.   if math.random(1,2) == 2 then --2
  890.    if s ~=8 and nt ~=0 and nt - s > 0 then --3
  891.     for r in sim.neighbors(x,y,1,1) do --4
  892.      if sim.partProperty(i, "tmp") == 0 then --5
  893.       if sim.partProperty(r, "type") == elements.DEFAULT_PT_FIRE then --6
  894.        sim.partProperty(i, "tmp", -1)
  895.        end --6
  896.       end --5
  897.      if sim.partProperty(i, "tmp") == -1 then --7
  898.       if math.random(1,3) > 1 then --8
  899.        sim.partCreate(-1, x+math.random(-2,2), y+math.random(-2,2), elements.DEFAULT_PT_FIRE)
  900.        sim.partProperty(i, "temp", sim.partProperty(i, "temp")+100)
  901.        sim.pressure(x/4,y/4,2)
  902.        if math.random(1,60) == 1 then --9
  903.         sim.partKill(i)
  904.         return
  905.         end --9
  906.        end --8
  907.       end --7
  908.      end --4
  909.     end --3
  910.    end --2
  911.   end --1
  912.   ) --*1
  913.  
  914. local logan = elements.allocate("TPT" , "XMEN")
  915.  elements.element(logan, elements.element(elements.DEFAULT_PT_IRON))
  916.  elements.property(logan, "Name" , "ADMT")
  917.  elements.property(logan, "Description" , "Adamantium, incredibly durable material. Almost virtually indestructible. An alloy of steel and vibranium")
  918.  elements.property(logan, "Color", 0xC8C8D0)
  919.  elements.property(logan, "HighTemperature", 9500.50)
  920.  elements.property(logan, "Weight", 1010)
  921.  elements.property(logan, "Hardness", 0)
  922.  
  923. local dmdd = elements.allocate("TPT" , "DMDD")
  924.  elements.element(dmdd, elements.element(elements.DEFAULT_PT_DMND))
  925.  elements.property(dmdd, "Name" , "DMDD")
  926.  elements.property(dmdd, "Description" , "Diamond dust. Yeah.")
  927.  elements.property(dmdd, "Color", 0xC6F6F6)
  928.  elements.property(dmdd, "MenuSection", 8)
  929.  elements.property(dmdd, "Properties", elements.TYPE_PART)
  930.  elements.property(dmdd, "Gravity", 0.112)
  931.  elements.property(dmdd, "Advection", 1)
  932.  elements.property(dmdd, "Weight", 100)
  933.  elements.property(dmdd, "AirDrag", 0.1)
  934.  elements.property(dmdd, "Falldown", 1)
  935.  elements.property(dmdd, "HighTemperature", 9999)
  936.  elements.property(dmdd, "HighTemperatureTransition", elements.DEFAULT_PT_LAVA)
  937.  elements.property(dmdd, "Falldown", 1)
  938.  
  939. local anih = elements.allocate("TPT" , "ANIH")
  940.  elements.element(anih, elements.element(elements.DEFAULT_PT_DEST))
  941.  elements.property(anih, "Name" , "ANIH")
  942.  elements.property(anih, "Description" , "Annihilation.")
  943.  elements.property(anih, "Color", 0x603090)
  944.  elements.property(anih, "HotAir", 0.1)
  945.  elements.property(anih, "MenuSection", 11)
  946.  elements.property(elements.TPT_PT_ANIH, "Update", --*1
  947.   function(i,x,y,s,nt) --1
  948.   attract(i,x,y,0.1)
  949.   if s ~=8 and nt ~=0 and nt - s > 0 then --2
  950.    if math.random(1,1) == 1 then --3
  951.     for r in sim.neighbors(x,y,2,2) do --4
  952.      if math.random(1,6) == 3 then --5
  953.       sim.partProperty(i, "temp", sim.partProperty(i, "temp")+10000)
  954.       if math.random(1,2) == 1 then --6
  955.        if sim.partProperty(r, "type") == elements.DEFAULT_PT_DMND then --7
  956.         sim.partProperty(r, "type", elements.TPT_PT_DMDD)
  957.         else if sim.partProperty(r, "type") ~= elements.TPT_PT_DMDD then --8
  958.          sim.pressure(x/4,y/4,255)
  959.          sim.partKill(r)
  960.          return
  961.          end --8
  962.         end --7
  963.        end --6
  964.       end --5
  965.      end --4
  966.     end --3
  967.    end --2
  968.   if math.random(1,8) == 1 then --9
  969.    sim.partCreate(-1, x+math.random(-10,10),y+math.random(-10,10),elements.TPT_PT_ANTI)
  970.    sim.partCreate(-1, x+math.random(-10,10),y+math.random(-10,10),elements.TPT_PT_ANTI)
  971.    sim.partCreate(-1, x+math.random(-10,10),y+math.random(-10,10),elements.TPT_PT_ANTI)
  972.    sim.partCreate(-1, x+math.random(-10,10),y+math.random(-10,10),elements.DEFAULT_PT_SING)
  973.    sim.partCreate(-1, x+math.random(-10,10),y+math.random(-10,10),elements.DEFAULT_PT_PROT)
  974.    sim.partCreate(-1, x+math.random(-10,10),y+math.random(-10,10),elements.DEFAULT_PT_HYGN)
  975.    sim.partCreate(-1, x+math.random(-10,10),y+math.random(-10,10),elements.DEFAULT_PT_PROT)
  976.    sim.partCreate(-1, x+math.random(-10,10),y+math.random(-10,10),elements.DEFAULT_PT_HYGN)
  977.    sim.partCreate(-1, x+math.random(-10,10),y+math.random(-10,10),elements.DEFAULT_PT_PROT)
  978.    sim.partCreate(-1, x+math.random(-10,10),y+math.random(-10,10),elements.DEFAULT_PT_HYGN)
  979.    sim.partCreate(-1, x+math.random(-10,10),y+math.random(-10,10),elements.DEFAULT_PT_DEST)
  980.    sim.partProperty(i, "temp", sim.partProperty(i, "temp")+10000)
  981.    end --9
  982.   end --1
  983.  ) --*1
  984.  
  985.  local function funcGraphics(i, colr, colg, colb) --*1
  986.   return 1,ren.PMODE_LFLARE,30,colr,colg,colb,255,96,48,144
  987.   end --*1
  988.  elements.property(anih, "Graphics", funcGraphics)
  989.  
  990. local bullet = elements.allocate("TPT" , "BULT")
  991.  elements.element(bullet, elements.element(elements.DEFAULT_PT_BREL))
  992.  elements.property(bullet, "Name" , "BLLT")
  993.  elements.property(bullet, "Description" , "Bullet, travels with minimum decceleration and creates winds.")
  994.  elements.property(bullet, "Color", 0x433141)
  995.  elements.property(bullet, "MenuSection", 16)
  996.  elements.property(bullet, "Flammable", 0)
  997.  elements.property(bullet, "Loss", 1)
  998.  elements.property(bullet, "AirDrag", 0.35)
  999.  elements.property(bullet, "Weight", 101)
  1000.  elements.property(bullet, "Gravity", 0.002)
  1001.  elements.property(elem.TPT_PT_BULT, "Update",
  1002.  function(i,x,y,s,nt) --1
  1003.   if math.sqrt(math.pow(sim.partProperty(i, "vx"),2)+math.pow(sim.partProperty(i, "vy"),2)) > 50 then --2
  1004.    sim.partCreate(-1, x, y+1, elements.DEFAULT_PT_FIRE)
  1005.    sim.partCreate(-1, x+1, y+1, elements.DEFAULT_PT_FIRE)
  1006.    sim.partCreate(-1, x-1, y+1, elements.DEFAULT_PT_FIRE)
  1007.    sim.partCreate(-1, x, y-1, elements.DEFAULT_PT_FIRE)
  1008.    sim.partCreate(-1, x+1, y-1, elements.DEFAULT_PT_FIRE)
  1009.    sim.partCreate(-1, x-1, y-1, elements.DEFAULT_PT_FIRE)
  1010.    sim.partCreate(-1, x+1, y, elements.DEFAULT_PT_FIRE)
  1011.    sim.partCreate(-1, x-1, y, elements.DEFAULT_PT_FIRE)
  1012.    end --2
  1013.   end --1
  1014. ) --*1
  1015.  
  1016. local anmt = elements.allocate("TPT" , "AMTL")
  1017.  elements.element(anmt, elements.element(elements.DEFAULT_PT_METL))
  1018.  elements.property(anmt, "Name" , "AMTL")
  1019.  elements.property(anmt, "Description" , "Anti-Metal, violently heats surrounding materials when sparked. Melts at cold temperatures.")
  1020.  elements.property(anmt, "Color", 0x899469)
  1021.  elements.property(anmt, "LowTemperature", 10)
  1022.  elements.property(anmt, "LowTemperatureTransition", elements.DEFAULT_PT_LAVA)
  1023.  elements.property(anmt, "HighTemperature", 10001)
  1024.  elements.property(elem.TPT_PT_AMTL, "Update",
  1025.  function(i,x,y,s,nt) --1
  1026.   for r in sim.neighbors(x,y,2,2) do --2
  1027.    if sim.partProperty(r, "type") == elements.DEFAULT_PT_SPRK then --3
  1028.     sim.partProperty(i, "temp", sim.partProperty(i, "temp")+500)
  1029.     end --3
  1030.    end --2
  1031.   end --1
  1032. ) --*1
  1033.  
  1034. local agas = elements.allocate("TPT" , "AGAS")
  1035.  elements.element(agas, elements.element(elements.DEFAULT_PT_BOYL))
  1036.  elements.property(agas, "Name" , "AGAS")
  1037.  elements.property(agas, "HeatConduct", 255)
  1038.  elements.property(agas, "HotAir", 0.001)
  1039.  elements.property(agas, "Color", 0xFDFDB7)
  1040.  elements.property(agas, "AirDrag", 0.001)
  1041.  elements.property(agas, "AirLoss", 1)
  1042.  elements.property(agas, "Diffusion", 1.25)
  1043.  elements.property(agas, "MenuSection", 16)
  1044.  elements.property(agas, "LowPressure",  -5)
  1045.  elements.property(agas, "LowPressureTransition", elements.TPT_PT_ANLIQ)
  1046.  elements.property(agas, "Description" , "Anti-Gas. Opposite of gas")
  1047.  elements.property(elem.TPT_PT_AGAS, "Update", --*1
  1048.  function(i,x,y,s,nt) --1
  1049.   if math.random(1,2) == 2 then --2
  1050.    if s ~=8 and nt ~=0 and nt - s > 0 then --3
  1051.     for r in sim.neighbors(x,y,1,1) do --4
  1052.      if sim.partProperty(i, "tmp") == 0 then --5
  1053.       if sim.partProperty(r, "type") == elements.DEFAULT_PT_CFLM then --6
  1054.        sim.partProperty(i, "tmp", -1)
  1055.        end --6
  1056.       end --5
  1057.      if sim.partProperty(i, "tmp") == -1 then --7
  1058.       if math.random(1,2) == 1 then --8
  1059.        sim.partCreate(-1, x+math.random(-1,1), y+math.random(-1,1), elements.DEFAULT_PT_CFLM)
  1060.        sim.partProperty(i, "temp", sim.partProperty(i, "temp")-200)
  1061.        sim.pressure(x/4,y/4,10)
  1062.        if math.random(1,50) == 1 then --9
  1063.         sim.partKill(i)
  1064.         return
  1065.         end --9
  1066.        end --8
  1067.       end --7
  1068.      end --4
  1069.     end --3
  1070.    end --2
  1071.   end --1
  1072.   ) --*1
  1073.  
  1074.  elements.property(aliq, "LowTemperature",  5)
  1075.  elements.property(aliq, "LowTemperatureTransition", elements.TPT_PT_AGAS)
  1076.  
  1077.  elements.property(elements.DEFAULT_PT_CO2, "Color", 0xBBBBBB)
  1078.  
  1079.  elements.property(elements.DEFAULT_PT_METL, "Name" , "STEL")
  1080.  elements.property(elements.DEFAULT_PT_METL, "Description" , "Steel, basic metal. Conducts")
  1081.  elements.property(elements.DEFAULT_PT_METL, "Color", 0x54545D)
  1082.  elements.property(elements.DEFAULT_PT_METL, "HighTemperature", 1643.15)
  1083.  
  1084. local argi = elements.allocate("TPT" , "ARGI")
  1085.  elements.element(argi, elements.element(elements.DEFAULT_PT_GOLD))
  1086.  elements.property(argi, "Name" , "SLVR")
  1087.  elements.property(argi, "Description" , "Silver, resistant to corrosion. Conducts at a faster pulse")
  1088.  elements.property(argi, "Color", 0xA0A5B0)
  1089.  elements.property(argi, "HighTemperature", 1235.46)
  1090.  elements.property(elem.TPT_PT_ARGI, "Update",
  1091.  function(i,x,y,s,nt) --1
  1092.   if sim.partProperty(i, "life") > 0 then --2
  1093.    sim.partProperty(i, "life", sim.partProperty(i, "life")-1)
  1094.    end --2
  1095.   end --1
  1096. ) --*1
  1097.  
  1098.  elements.property(elements.DEFAULT_PT_SPRK, "Color", 0xDCECFF)
  1099.  
  1100. local trit = elements.allocate("TPT" , "TRIT")
  1101.  elements.element(trit, elements.element(elements.DEFAULT_PT_HYGN))
  1102.  elements.property(trit, "Name" , "TRIT")
  1103.  elements.property(trit, "Description" , "Tritium, decays into lighter components when struck with neutrons.")
  1104.  elements.property(trit, "Color", 0x11161D)
  1105.  elements.property(trit, "Gravity", 0.2)
  1106.  elements.property(trit, "PhotonReflectWavelengths", 0x00000001)
  1107.  elements.property(trit, "MenuSection", 10)
  1108.  function tritium(i,x,y,s,n)
  1109.   if tpt.get_property("type", x + math.random(-2,2), y + math.random(-2,2)) == tpt.el.neut.id then --1
  1110.    if math.random(1,2) == 1 then --2
  1111.     tpt.parts[i].type = elements.DEFAULT_PT_DEUT
  1112.     tpt.set_property("temp", tpt.get_property("temp", x, y)+7000, x ,y)
  1113.     tpt.create(x + math.random(-2,2), y + math.random(-2,2), 'neut')
  1114.     sim.pressure(x/4,y/4,5)
  1115.     else if math.random(1,6) == 1 then --3
  1116.      tpt.parts[i].type = elements.DEFAULT_PT_HYGN
  1117.      tpt.set_property("temp", tpt.get_property("temp", x, y)+7000, x ,y)
  1118.      tpt.create(x + math.random(-2,2), y + math.random(-2,2), 'neut')
  1119.      tpt.create(x + math.random(-2,2), y + math.random(-2,2), 'neut')
  1120.      sim.pressure(x/4,y/4,5)
  1121.      else if math.random(1,6) == 1 then --4
  1122.       tpt.parts[i].type = elements.TPT_PT_HE
  1123.       sim.pressure(x/4,y/4,5)
  1124.       tpt.set_property("temp", tpt.get_property("temp", x, y)+7000, x ,y)
  1125.       tpt.create(x + math.random(-2,2), y + math.random(-2,2), 'elec')
  1126.       end --4
  1127.      end --3
  1128.     end --2
  1129.    end --1
  1130.   if sim.pressure(x/4,y/4) > 1 then --3
  1131.    if math.random(1,250) == 10 then --4
  1132.     tpt.create(x + math.random(-2,2), y + math.random(-2,2), 'neut')
  1133.     tpt.set_property("temp", math.huge, x ,y)
  1134.     end --4
  1135.    end --3
  1136.   if math.random(1,10000) == 10 then --5
  1137.    sim.pressure(x/4,y/4,2)
  1138.    end --5
  1139.   end --*1
  1140.  
  1141.  elements.property(elem.TPT_PT_TRIT, "Update", --*1
  1142.  function(i,x,y,s,nt) --1
  1143.   if math.random(1,2) == 2 then --2
  1144.    if s ~=8 and nt ~=0 and nt - s > 0 then --3
  1145.     for r in sim.neighbors(x,y,1,1) do --4
  1146.      if sim.partProperty(i, "tmp") == 0 then --5
  1147.       if sim.partProperty(r, "type") == elements.DEFAULT_PT_WATR then --6
  1148.        sim.partProperty(i, "tmp", -1)
  1149.        end --6
  1150.       end --5
  1151.      if sim.partProperty(i, "tmp") == -1 then --7
  1152.       if math.random(1,2) == 1 then --8
  1153.        sim.partCreate(-1, x+math.random(-1,1), y+math.random(-1,1), elements.DEFAULT_PT_ACID)
  1154.        sim.partProperty(i, "temp", sim.partProperty(i, "temp")+20)
  1155.        if math.random(1,2) == 1 then --9
  1156.         sim.partKill(i)
  1157.         return
  1158.         end --9
  1159.        end --8
  1160.       end --7
  1161.      end --4
  1162.     end --3
  1163.    end --2
  1164.    tritium(i,x,y,s,n)
  1165.   end --1
  1166.   ) --*1
  1167.  
  1168. local ltrt = elements.allocate("TPT" , "LTRT")
  1169.  elements.element(ltrt, elements.element(elements.TPT_PT_LHYG))
  1170.  elements.property(ltrt, "Name" , "LTRT")
  1171.  elements.property(ltrt, "Description" , "Liquid Tritium, dangerous.")
  1172.  elements.property(ltrt, "Color", 0x13161C)
  1173.  elements.property(ltrt, "HighTemperatureTransition", elements.TPT_PT_TRIT)
  1174.  elements.property(ltrt, "PhotonReflectWavelengths", 0x00000001)
  1175.  elements.property(ltrt, "MenuSection", 16)
  1176.  elements.property(ltrt, "Flammable", 16)
  1177.  elements.property(elem.TPT_PT_LTRT, "Update", --*1
  1178.  function(i,x,y,s,nt) --1
  1179.   if math.random(1,2) == 2 then --2
  1180.    if s ~=8 and nt ~=0 and nt - s > 0 then --3
  1181.     for r in sim.neighbors(x,y,1,1) do --4
  1182.      if sim.partProperty(i, "tmp") == 0 then --5
  1183.       if sim.partProperty(r, "type") == elements.DEFAULT_PT_DEUT then --6
  1184.        sim.partProperty(i, "tmp", -2)
  1185.        end --6
  1186.       end --5
  1187.      if sim.partProperty(i, "tmp") == -2 then --7
  1188.       if math.random(1,500) == 1 then --8
  1189.        sim.partCreate(-1, x+math.random(-1,1), y+math.random(-1,1), elements.TPT_PT_LHE)
  1190.        sim.partProperty(i, "temp", sim.partProperty(i, "temp")+200)
  1191.        if math.random(1,2) == 1 then --9
  1192.         sim.partKill(i)
  1193.         return
  1194.         end --9
  1195.        end --8
  1196.       end --7
  1197.      end --4
  1198.     end --3
  1199.    end --2
  1200.   end --1
  1201.   ) --*1
  1202.  
  1203. elements.property(trit, "LowTemperatureTransition", elements.TPT_PT_LTRT)
  1204.  
  1205. local pkic = elements.allocate("TPT" , "PKIC")
  1206.  elements.element(pkic, elements.element(elements.DEFAULT_PT_DMND))
  1207.  elements.property(pkic, "Name" , "PKIC")
  1208.  elements.property(pkic, "Description" , "Packed Ice.")
  1209.  elements.property(pkic, "Color", 0x6F94F4)
  1210.  elements.property(pkic, "MenuSection", 9)
  1211.  elements.property(pkic, "Temperature", 210.32)
  1212.  elements.property(pkic, "HeatConduct", 5)
  1213.  elements.property(elem.TPT_PT_PKIC, "Update",
  1214.  function(i,x,y,s,nt) --1
  1215.   if math.random(1,20) == 1 then --2
  1216.    if sim.partProperty(i, "temp") > 220.35 then --3
  1217.     sim.partProperty(i, "type", elements.DEFAULT_PT_ICE)
  1218.     end --3
  1219.    end --2
  1220.   end --1
  1221. ) --*1
  1222.  
  1223.  elements.property(elem.DEFAULT_PT_ICE, "Update",
  1224.  function(i,x,y,s,nt) --1
  1225.   if math.random(1,2) == 1 then --2
  1226.    if sim.partProperty(i, "temp") < 220.30 then --3
  1227.     sim.partProperty(i, "type", elements.TPT_PT_PKIC)
  1228.     end --3
  1229.    end --2
  1230.   end --1
  1231. ) --*1
  1232.  
  1233.  
  1234. local pala = elements.allocate("TPT" , "PALA")
  1235.  elements.element(pala, elements.element(elements.DEFAULT_PT_GOLD))
  1236.  elements.property(pala, "Name" , "PALA")
  1237.  elements.property(pala, "Description" , "Paladium, desintegrates over time with neutrons.")
  1238.  elements.property(pala, "Color", 0xCCC7BD)
  1239.  elements.property(pala, "PhotonReflectWavelengths", 0x2FF20000)
  1240.  elements.property(pala, "MenuSection", 10)
  1241.  elements.property(pala, "HighTemperature", 1828)
  1242.  function paladium(i,x,y,s,n)
  1243.   if tpt.get_property("type", x + math.random(-2,2), y + math.random(-2,2)) == tpt.el.neut.id then --1
  1244.    if math.random(1,2) == 1 then --2
  1245.     tpt.parts[i].type = elements.TPT_PT_ARGI
  1246.     if math.random(1,2) == 1 then --3
  1247.      tpt.create(x + math.random(-2,2), y + math.random(-2,2), 'slvr')
  1248.      tpt.create(x + math.random(-2,2), y + math.random(-2,2), 'slvr')
  1249.      tpt.create(x + math.random(-2,2), y + math.random(-2,2), 'slvr')
  1250.      tpt.create(x + math.random(-2,2), y + math.random(-2,2), 'slvr')
  1251.      tpt.create(x + math.random(-2,2), y + math.random(-2,2), 'lead')
  1252.      tpt.create(x + math.random(-2,2), y + math.random(-2,2), 'neut')
  1253.      tpt.create(x + math.random(-2,2), y + math.random(-2,2), 'neut')
  1254.      tpt.create(x + math.random(-2,2), y + math.random(-2,2), 'neut')
  1255.      tpt.set_property("temp", tpt.get_property("temp", x ,y)+5000, x ,y)
  1256.      end --3
  1257.     end --2
  1258.    end --1
  1259.   if math.random(1,10000) == 10 then --4
  1260.    sim.pressure(x/4,y/4,5)
  1261.    end --4
  1262.   end --*1
  1263.  tpt.element_func(paladium,pala)
  1264.  
  1265. local ltac = elements.allocate("TPT", "LTAC")
  1266.  elements.element(ltac, elements.element(elements.DEFAULT_PT_SOAP))
  1267.  elements.property(ltac, "Name" , "LTAC")
  1268.  elements.property(ltac, "Description" , "Lactic acid, helps to decompose organic matter.")
  1269.  elements.property(ltac, "Color", 0xD7BCCD)
  1270.  elements.property(ltac, "Hardness", 1)
  1271.  elements.property(elem.TPT_PT_LTAC, "Update", --*1
  1272.  function(i,x,y,s,nt) --1
  1273.   if s ~=8 and nt ~=0 and nt - s > 0 then --2
  1274.    if math.random(1,100) == 10 then --3
  1275.     for r in sim.neighbors(x,y,1,1) do --4
  1276.      if sim.partProperty(r, "type") == elements.DEFAULT_PT_PLNT or sim.partProperty(r, "type") == elements.DEFAULT_PT_WOOD then --5
  1277.       if math.random(1,3) == 1 then --6
  1278.        sim.partProperty(r, "type", elements.TPT_PT_ASH)
  1279.        sim.partProperty(i, "temp", sim.partProperty(i, "temp")+10)
  1280.        if math.random(1,13) == 1 then --7
  1281.         sim.pressure(x/4,y/4,0.1)
  1282.         sim.partKill(i)
  1283.         return
  1284.         end --7
  1285.        end --6
  1286.       end --5
  1287.      end --4
  1288.     end --3
  1289.    end --2
  1290.   end --1
  1291.   ) --*1
  1292.  
  1293. local bctr = elements.allocate("TPT", "BACT")
  1294.  elements.element(bctr, elements.element(elements.DEFAULT_PT_SOAP))
  1295.  elements.property(bctr, "Name" , "BCTR")
  1296.  elements.property(bctr, "Description" , "Bacteria, spreads and sticks.")
  1297.  elements.property(bctr, "Color", 0xE0F0A1)
  1298.  elements.property(bctr, "Diffusion", 0.3)
  1299.  elements.property(bctr, "Weight", 30)
  1300.  elements.property(bctr, "MenuSection", 11)
  1301.  
  1302. local bctrb = elements.allocate("TPT", "BCTR")
  1303.  elements.element(bctrb, elements.element(elements.DEFAULT_PT_SOAP))
  1304.  elements.property(bctrb, "Name" , "BCTD")
  1305.  elements.property(bctrb, "Description" , "Decomposer bacteria, decomposes plant matter.")
  1306.  elements.property(bctrb, "Color", 0xFFE990)
  1307.  elements.property(bctrb, "Diffusion", 0.3)
  1308.  elements.property(bctrb, "Weight", 30)
  1309.  elements.property(bctrb, "MenuSection", 16)
  1310.  
  1311. local bctra = elements.allocate("TPT", "BCTRA")
  1312.  elements.element(bctra, elements.element(elements.DEFAULT_PT_SOAP))
  1313.  elements.property(bctra, "Name" , "ABCT")
  1314.  elements.property(bctra, "Description" , "Airbourne bacteria.")
  1315.  elements.property(bctra, "Color", 0xC9E9FF)
  1316.  elements.property(bctra, "Diffusion", 0.2)
  1317.  elements.property(bctra, "Weight", 29)
  1318.  elements.property(bctra, "MenuSection", 16)
  1319.  elements.property(bctra, "Gravity", -0.025)
  1320.  
  1321. local bctrc = elements.allocate("TPT", "BCTRC")
  1322.  elements.element(bctrc, elements.element(elements.DEFAULT_PT_SOAP))
  1323.  elements.property(bctrc, "Name" , "BCTW")
  1324.  elements.property(bctrc, "Description" , "Bacterial wall, solid but still flows")
  1325.  elements.property(bctrc, "Color", 0xC9FF90)
  1326.  elements.property(bctrc, "Diffusion", 0.1)
  1327.  elements.property(bctrc, "Weight", 31)
  1328.  elements.property(bctrc, "MenuSection", 16)
  1329.  
  1330. local bctrp = elements.allocate("TPT", "BCTRP")
  1331.  elements.element(bctrp, elements.element(elements.DEFAULT_PT_SOAP))
  1332.  elements.property(bctrp, "Name" , "AQBC")
  1333.  elements.property(bctrp, "Description" , "Aquatic Bacteria. Floats and spreads through water slowly.")
  1334.  elements.property(bctrp, "Color", 0xFFF0FF)
  1335.  elements.property(bctrp, "Diffusion", 0.3)
  1336.  elements.property(bctrp, "Weight", 31)
  1337.  elements.property(bctrp, "MenuSection", 16)
  1338.  elements.property(elem.TPT_PT_BCTRP, "Update", --*1
  1339.  function(i,x,y,s,nt) --1
  1340.   if nt == 8 then --2
  1341.    for r in sim.neighbors(x,y,1,1) do --3
  1342.     if math.random(1,1000) > 1 then --4
  1343.      sim.partProperty(i, "vy", -0.05)
  1344.      end --4
  1345.     if math.random(1,1000) > 1 then --5
  1346.      sim.partProperty(i, "vx", math.random(-0.01,0.01))
  1347.      end --5
  1348.     if math.random(1,2000) < 4 then --6
  1349.      sim.partCreate(-1, math.random(x-1,x+1),math.random(y-1,y+1),elements.TPT_PT_BCTRC)
  1350.      sim.partCreate(-1, math.random(x-1,x+1),math.random(y-1,y+1),elements.TPT_PT_BCTRC)
  1351.      sim.partCreate(-1, math.random(x-1,x+1),math.random(y-1,y+1),elements.TPT_PT_BCTRC)
  1352.      end --6
  1353.     if math.random(1,40000) < 2 then --7
  1354.      sim.partKill(i)
  1355.      end --7
  1356.     if sim.partProperty(r, "type") == elements.DEFAULT_PT_CO2 then --8
  1357.      sim.partCreate(-1, math.random(x-3,x+3),math.random(y-3,y+3),elements.TPT_PT_BCTRP)
  1358.      sim.partCreate(-1, math.random(x-3,x+3),math.random(y-3,y+3),elements.TPT_PT_BCTR)
  1359.      sim.partCreate(-1, math.random(x-3,x+3),math.random(y-3,y+3),elements.TPT_PT_BCTRC)
  1360.      end --8
  1361.     end --3
  1362.    end --2
  1363.   end --1
  1364. ) --*1
  1365.  
  1366.  elements.property(elem.TPT_PT_BCTRC, "Update", --*1
  1367.  function(i,x,y,s,nt) --1
  1368.   if s ~=8 and nt ~=0 and s > 0 then --2
  1369.    for r in sim.neighbors(x,y,1,1) do --3
  1370.     if math.random(1,1000) > 1 then --4
  1371.      sim.partProperty(i, "vy", 0)
  1372.      end --4
  1373.     if math.random(1,1000) > 1 then --5
  1374.      sim.partProperty(i, "vx", 0)
  1375.      end --5
  1376.     if math.random(1,200000) < 4 then --6
  1377.      sim.partCreate(-1, math.random(x-1,x+1),math.random(y-1,y+1),elements.TPT_PT_BCTR)
  1378.      sim.partProperty(i, "temp", 338)
  1379.      end --6
  1380.     if math.random(1,200000) == 1 then --7
  1381.      sim.partCreate(-1, math.random(x-1,x+1),math.random(y-1,y+1),elements.TPT_PT_BCTRA)
  1382.      end --7
  1383.     if math.random(1,200000) == 1 then --8
  1384.      sim.partCreate(-1, math.random(x-1,x+1),math.random(y-1,y+1),elements.TPT_PT_BCTR)
  1385.      sim.partProperty(i, "temp", 338)
  1386.      end --8
  1387.     if math.random(1,4000) < 2 then --9
  1388.      sim.partKill(i)
  1389.      end --9
  1390.     if sim.partProperty(r, "type") == elements.DEFAULT_PT_CO2 then --10
  1391.      if math.random(1,40) then --11
  1392.       sim.partCreate(-1, math.random(x-3,x+3),math.random(y-3,y+3),elements.TPT_PT_BCTRC)
  1393.       sim.partProperty(i, "temp", 338)
  1394.       sim.partKill(4)
  1395.       end --11
  1396.      end --10
  1397.     if sim.partProperty(r, "type") == elements.DEFAULT_PT_WATR then --12
  1398.      if math.random(1,20) == 1 then --13
  1399.       if math.random(1,50) == 1 then --14
  1400.        sim.partProperty(i, "type", elements.TPT_PT_BCTRP)
  1401.        end --14
  1402.       sim.partCreate(-1, math.random(x-1,x+1),math.random(y-1,y+1),elements.TPT_PT_BCTRP)
  1403.       sim.partCreate(-1, math.random(x-3,x+3),math.random(y-3,y+3),elements.TPT_PT_BCTRP)
  1404.       sim.partCreate(-1, math.random(x-3,x+3),math.random(y-3,y+3),elements.TPT_PT_BCTRP)
  1405.      sim.partProperty(i, "temp", 338)
  1406.       sim.partKill(i)
  1407.       end --13
  1408.      end --12
  1409.     if sim.partProperty(r, "type") == elements.TPT_PT_BCTRP then --15
  1410.      if math.random(1,200) == 1 then --16
  1411.       sim.partKill(i)
  1412.       end --16
  1413.      end --15
  1414.     end --3
  1415.    end --2
  1416.   end --1
  1417. ) --*1
  1418.  
  1419.  elements.property(elem.TPT_PT_BCTR, "Update", --*1
  1420.  function(i,x,y,s,nt) --1
  1421.   if s ~=8 and nt ~=0 and nt - s > 0 then --2
  1422.    for r in sim.neighbors(x,y,1,1) do --3
  1423.     if math.random(1,10) > 1 then --4
  1424.      sim.partProperty(i, "vy", 0)
  1425.      end --4
  1426.     if math.random(1,10) > 1 then --5
  1427.      sim.partProperty(i, "vx", 0)
  1428.      end --5
  1429.     if math.random(1,200) < 4 then --6
  1430.      sim.partCreate(-1, math.random(x-1,x+1),math.random(y-1,y+1),elements.TPT_PT_BCTR)
  1431.      sim.partProperty(i, "temp", 338)
  1432.      end --6
  1433.     if math.random(1,4000) < 2 then --7
  1434.      sim.partKill(i)
  1435.      end --7
  1436.     if sim.partProperty(r, "type") == elements.DEFAULT_PT_WOOD then --8
  1437.      if math.random(1,20) < 2 then --9
  1438.       sim.partCreate(-1, math.random(x-1,x+1),math.random(y-1,y+1),elements.TPT_PT_BCTR)
  1439.       sim.partCreate(-1, math.random(x-1,x+1),math.random(y-1,y+1),elements.TPT_PT_BCTR)
  1440.       sim.partCreate(-1, math.random(x-1,x+1),math.random(y-1,y+1),elements.TPT_PT_LTAC)
  1441.       sim.partCreate(-1, math.random(x-1,x+1),math.random(y-1,y+1),elements.TPT_PT_LTAC)
  1442.       sim.partCreate(-1, math.random(x-1,x+1),math.random(y-1,y+1),elements.TPT_PT_ASH)
  1443.      sim.partProperty(i, "temp", 338)
  1444.       sim.partKill(r)
  1445.       end --9
  1446.      end --8
  1447.     if sim.partProperty(r, "type") == elements.DEFAULT_PT_PLNT then --10
  1448.      if math.random(1,20) < 2 then --11
  1449.       sim.partCreate(-1, math.random(x-1,x+1),math.random(y-1,y+1),elements.TPT_PT_BCTR)
  1450.       sim.partCreate(-1, math.random(x-1,x+1),math.random(y-1,y+1),elements.TPT_PT_BCTR)
  1451.       sim.partCreate(-1, math.random(x-1,x+1),math.random(y-1,y+1),elements.TPT_PT_ASH)
  1452.       sim.partKill(r)
  1453.       end --11
  1454.      end --10
  1455.     if sim.partProperty(r, "type") == elements.TPT_PT_ALGAE then --12
  1456.      if math.random(1,20) < 2 then --13
  1457.       sim.partCreate(-1, math.random(x-1,x+1),math.random(y-1,y+1),elements.TPT_PT_BCTR)
  1458.       sim.partCreate(-1, math.random(x-1,x+1),math.random(y-1,y+1),elements.TPT_PT_BCTRP)
  1459.       sim.partCreate(-1, math.random(x-1,x+1),math.random(y-1,y+1),elements.TPT_PT_ASH)
  1460.       sim.partKill(r)
  1461.       end --13
  1462.      end --12
  1463.     if math.random(1,1000) == 1 then --14
  1464.      sim.partCreate(-1, math.random(x-1,x+1),math.random(y-1,y+1),elements.TPT_PT_BCTRC)
  1465.      sim.partCreate(-1, math.random(x-1,x+1),math.random(y-1,y+1),elements.TPT_PT_BCTRC)
  1466.      sim.partCreate(-1, math.random(x-1,x+1),math.random(y-3,y+3),elements.TPT_PT_BCTRC)
  1467.      sim.partCreate(-1, math.random(x-3,x+3),math.random(y-1,y+1),elements.TPT_PT_BCTRC)
  1468.      sim.partProperty(i, "temp", 338)
  1469.      end --14
  1470.     if math.random(1,10000) == 1 then --15
  1471.      sim.partCreate(-1, math.random(x-1,x+1),math.random(y-1,y+1),elements.TPT_PT_BCTRA)
  1472.      end --15
  1473.     if math.random(1,1000) == 1 then --16
  1474.      sim.partCreate(-1, math.random(x-1,x+1),math.random(y-1,y+1),elements.TPT_PT_BCTRP)
  1475.      end --16
  1476.     end --3
  1477.    end --2
  1478.   end --1
  1479.   ) --*1
  1480.  
  1481.  elements.property(elem.TPT_PT_BCTRA, "Update", --*1
  1482.  function(i,x,y,s,nt) --1
  1483.   if s ~=8 and nt ~=0 and nt - s > 0 then --2
  1484.    for r in sim.neighbors(x,y,1,1) do --3
  1485.     if math.random(1,20) > 1 then --4
  1486.      sim.partProperty(i, "vy", -0.01)
  1487.      end --4
  1488.     if math.random(1,20) > 1 then --5
  1489.      sim.partProperty(i, "vx", 0)
  1490.      end --5
  1491.     if math.random(1,400) < 4 then --6
  1492.      sim.partCreate(-1, math.random(x-1,x+1),math.random(y-1,y+1),elements.TPT_PT_BCTRA)
  1493.      end --6
  1494.     if math.random(1,1600) < 2 then --7
  1495.      sim.partKill(i)
  1496.      end --7
  1497.     if sim.partProperty(r, "type") == elements.TPT_PT_ASH then --8
  1498.      if math.random(1,20) < 2 then --9
  1499.       sim.partCreate(-1, math.random(x-1,x+1),math.random(y-1,y+1),elements.TPT_PT_BCTRA)
  1500.       sim.partCreate(-1, math.random(x-1,x+1),math.random(y-1,y+1),elements.TPT_PT_BCTRC)
  1501.       sim.partCreate(-1, math.random(x-1,x+1),math.random(y-1,y+1),elements.DEFAULT_PT_CO2)
  1502.       sim.partKill(r)
  1503.       end --9
  1504.      end --8
  1505.     if sim.partProperty(r, "type") == elements.DEFAULT_PT_OXYG then --10
  1506.      if math.random(1,20) < 2 then --11
  1507.       sim.partCreate(-1, math.random(x-1,x+1),math.random(y-1,y+1),elements.TPT_PT_BCTRA)
  1508.       sim.partCreate(-1, math.random(x-1,x+1),math.random(y-1,y+1),elements.TPT_PT_BCTRC)
  1509.       sim.partCreate(-1, math.random(x-1,x+1),math.random(y-1,y+1),elements.DEFAULT_PT_CO2)
  1510.       sim.partKill(r)
  1511.       end --11
  1512.      end --10
  1513.     if math.random(1,125) == 1 then --12
  1514.      sim.partCreate(-1, math.random(x-1,x+1),math.random(y-3,y+1),elements.TPT_PT_BCTRC)
  1515.      end --12
  1516.     if math.random(1,10000) == 1 then --12
  1517.      sim.partCreate(-1, math.random(x-1,x+1),math.random(y-1,y+1),elements.TPT_PT_BCTRA)
  1518.      end --12
  1519.     end --3
  1520.    end --2
  1521.   end --1
  1522.   ) --*1
  1523.  
  1524.  elements.property(elem.TPT_PT_BACT, "Update", --*1
  1525.  function(i,x,y,s,nt) --1
  1526.   if s ~=8 and nt ~=0 and nt - s > 0 then --2
  1527.    for r in sim.neighbors(x,y,1,1) do --3
  1528.     if math.random(1,20) > 1 then --4
  1529.      sim.partProperty(i, "vy", -0.01)
  1530.      end --4
  1531.     if math.random(1,20) > 1 then --5
  1532.      sim.partProperty(i, "vx", 0)
  1533.      end --5
  1534.     if math.random(1,20) < 2 then --6
  1535.      sim.partCreate(-1, math.random(x-1,x+1),math.random(y-1,y+1),elements.TPT_PT_BCTRC)
  1536.      sim.partKill(i)
  1537.      end --6
  1538.     end --3
  1539.    end --2
  1540.   end --1
  1541.   ) --*1
  1542.  
  1543. local sdpr = elements.allocate("TPT" , "SPPR")
  1544.  elements.element(sdpr, elements.element(elements.DEFAULT_PT_DMND))
  1545.  elements.property(sdpr, "Name" , "SPPR")
  1546.  elements.property(sdpr, "Description" , "Sandpaper, Gritty.")
  1547.  elements.property(sdpr, "Color", 0x6F6245)
  1548.  elements.property(sdpr, "HeatConduct", 4)
  1549.  elements.property(elem.TPT_PT_SPPR, "Update",
  1550.  function(i,x,y,s,nt) --1
  1551.   for r in sim.neighbors(x,y,1,1) do --2
  1552.    if sim.partProperty(r, "type") > 0 then --3
  1553.     sim.partProperty(i, "temp", sim.partProperty(i, "temp")+math.sqrt(math.pow(sim.partProperty(r, "vx"),2)+math.pow(sim.partProperty(r, "vy"),2))*4)
  1554.     sim.partProperty(r, "vy", 0)
  1555.     sim.partProperty(r, "vx", 0)
  1556.     end --3
  1557.    end --2
  1558.   end --1
  1559. ) --*1
  1560.  
  1561. local jean = elements.allocate("TPT", "DISA")
  1562.  elements.element(jean, elements.element(elements.DEFAULT_PT_THDR))
  1563.  elements.property(jean, "Name" , "DISA")
  1564.  elements.property(jean, "Description" , "\"Cause Havok.\"")
  1565.  elements.property(jean, "Weight", -1)
  1566.  elements.property(jean, "Loss", -1.01)
  1567.  elements.property(jean, "MenuSection", 16)
  1568.  elements.property(jean, "Diffusion", 0)
  1569.  elements.property(elem.TPT_PT_DISA, "Update", --*1
  1570.  function(i,x,y,s) --1
  1571.   if s > 6 then --2
  1572.    if math.random(1,20) == 20 then --3
  1573.     sim.partCreate(-1, x+math.random(-9,9), y+math.random(-9,9), elements.DEFAULT_PT_THDR)
  1574.     sim.partCreate(-1, x+math.random(-9,9), y+math.random(-9,9), elements.TPT_PT_TORN)
  1575.     sim.partCreate(-1, x+math.random(-9,9), y+math.random(-9,9), elements.TPT_PT_STRM)
  1576.     sim.partCreate(-1, x+math.random(-9,9), y+math.random(-9,9), elements.TPT_PT_CAVE)
  1577.     sim.pressure(x/4,y/4,16)
  1578.     if math.random(1,5) == 5 then --4
  1579.      sim.partKill(i)
  1580.      end --4
  1581.     end --3
  1582.    end --2
  1583.   end --1
  1584.   ) --*1
  1585.  
  1586. local co2s = elements.allocate("TPT", "CSNW")
  1587.  elements.element(co2s, elements.element(elements.DEFAULT_PT_SNOW))
  1588.  elements.property(co2s, "Name" , "CSNW")
  1589.  elements.property(co2s, "Description" , "CO2 Snow.")
  1590.  elements.property(co2s, "Color", 0xC2C2C2)
  1591.  elements.property(co2s, "Diffusion", 0.1)
  1592.  elements.property(co2s, "HighTemperature", 10001)
  1593.  elements.property(co2s, "Temperature", 186.65)
  1594.  elements.property(co2s, "Weight", 31)
  1595.  elements.property(co2s, "MenuSection", 16)
  1596.  elements.property(elements.TPT_PT_CSNW, "Update", --*1
  1597.  function(i,x,y) --1
  1598.   if sim.partProperty(i, "temp") > 194.65 then --2
  1599.    if math.random(1,450) == 1 then --3
  1600.     sim.partChangeType(i, elements.DEFAULT_PT_CO2)
  1601.     end --3
  1602.    end --2
  1603.   end --1
  1604.  ) --*1
  1605.  
  1606.  elements.property(elements.DEFAULT_PT_DRIC, "HighPressure", 1.2)
  1607.  elements.property(elements.DEFAULT_PT_DRIC, "HighPressureTransition", elements.TPT_PT_CSNW)
  1608.  
  1609.  elements.property(elements.DEFAULT_PT_COAL, "Update", --*1
  1610.  function(i,x,y,s,nt) --1
  1611.   if sim.pressure(x/4,y/4) < -9.5 then --2
  1612.    if math.random(1,950) == 1 then --3
  1613.     sim.partProperty(i, "type", elements.TPT_PT_GRPH)
  1614.     sim.partCreate(-1, x+math.random(-9,9), y+math.random(-9,9), elements.DEFAULT_PT_SMKE)
  1615.     sim.partCreate(-1, x+math.random(-2,2), y+math.random(-2,2), elements.TPT_PT_ASH)
  1616.     end --3
  1617.    end --2
  1618.   end --1
  1619.   ) --*1
  1620.  
  1621. local ground = elements.allocate("TPT" , "GRND")
  1622.  elements.element(ground, elements.element(elements.DEFAULT_PT_STNE))
  1623.  elements.property(ground, "Name" , "GRND")
  1624.  elements.property(ground, "Description" , "Ground.")
  1625.  elements.property(ground, "Color", 0xA2A29A)
  1626.  elements.property(ground, "HighTemperature", 10001)
  1627.  elements.property(ground, "MenuSection", 16)
  1628.  elements.property(ground, "Flammable", 0)
  1629.  elements.property(elem.TPT_PT_GRND, "Update",
  1630.  function(i,x,y,s,nt) --1
  1631.   if math.random(1,2) == 1 then --2
  1632.   sim.partCreate(-1, x+math.random(-2,2), y+math.random(-2,2), elements.DEFAULT_PT_SAND)
  1633.   sim.partCreate(-1, x+math.random(-2,2), y+math.random(-2,2), elements.DEFAULT_PT_STNE)
  1634.   sim.partCreate(-1, x+math.random(-2,2), y+math.random(-2,2), elements.DEFAULT_PT_DUST)
  1635.   end --2
  1636.  end --1
  1637. ) --*1
  1638.  
  1639. local brwf = elements.allocate("TPT" , "BRWF")
  1640.  elements.element(brwf, elements.element(elements.DEFAULT_PT_EQVE))
  1641.  elements.property(brwf, "Name" , "BRWF")
  1642.  elements.property(brwf, "Description" , "Broken Tungsten.")
  1643.  elements.property(brwf, "Color", 0x5E575B)
  1644.  elements.property(brwf, "HighTemperature", 3595.0)
  1645.  elements.property(brwf, "HighTemperatureTransition", elements.DEFAULT_PT_TUNG)
  1646.  elements.property(brwf, "MenuSection", 16)
  1647.  elements.property(brwf, "Flammable", 0)
  1648.  elements.property(elem.DEFAULT_PT_BRMT, "Update",
  1649.  function(i,x,y,s,nt) --1
  1650.   if sim.partProperty(i, "ctype") == elements.DEFAULT_PT_TUNG then --2
  1651.   sim.partProperty(i, "type", elements.TPT_PT_BRWF)
  1652.   end --2
  1653.  end --1
  1654. ) --*1
  1655.  
  1656.  elements.property(elements.DEFAULT_PT_CFLM, "Falldown", 2)
  1657.  elements.property(elements.DEFAULT_PT_CFLM, "Gravity", 0.1)
  1658.  
  1659. local lo3 = elements.allocate("TPT", "LO3")
  1660.  elements.element(lo3, elements.element(elements.DEFAULT_PT_LOXY))
  1661.  elements.property(lo3, "Name" , "LO3")
  1662.  elements.property(lo3, "Description" , "Liquid Ozone, very cold. Horrifying")
  1663.  elements.property(lo3, "Flammable", 5.65)
  1664.  elements.property(lo3, "Explosive", 0)
  1665.  elements.property(lo3, "Color", 0x4F68AC)
  1666.  elements.property(lo3, "Temperature", 145.15)
  1667.  elements.property(lo3, "MenuSection", 7)
  1668.  
  1669. local o3 = elements.allocate("TPT", "O3")
  1670.  elements.element(o3, elements.element(elements.DEFAULT_PT_HYGN))
  1671.  elements.property(o3, "Name" , "O3")
  1672.  elements.property(o3, "Description" , "Ozone, strong oxidizer.")
  1673.  elements.property(o3, "Color", 0x6079BD)
  1674.  elements.property(o3, "LowTemperature", 159.1)
  1675.  elements.property(o3, "LowTemperatureTransition", elements.TPT_PT_LO3)
  1676.  elements.property(elem.TPT_PT_O3, "Update",
  1677.  function(i,x,y,s,nt) --1
  1678.   for r in sim.neighbors(x,y,1,1) do --2
  1679.    if sim.partProperty(r, "type") == elements.DEFAULT_PT_FIRE then --3
  1680.     sim.partProperty(r, "life", 1000)
  1681.     sim.partProperty(r, "vy", sim.partProperty(r, "vy")*1.05)
  1682.     sim.partProperty(r, "vx", sim.partProperty(r, "vx")*1.05)
  1683.     sim.partProperty(r, "temp", sim.partProperty(r, "temp")+100)
  1684.     sim.pressure(x/4,y/4,0.1)
  1685.     if math.random(1,500) == 1 then --4
  1686.      sim.partKill(i)
  1687.      end --4
  1688.     end --3
  1689.    if sim.partProperty(r, "type") == elements.DEFAULT_PT_PLSM then --5
  1690.     sim.partProperty(r, "life", math.random(125,500))
  1691.     sim.partProperty(r, "vy", sim.partProperty(r, "vy")*1.1)
  1692.     sim.partProperty(r, "vx", sim.partProperty(r, "vx")*1.1)
  1693.     sim.partProperty(r, "temp", sim.partProperty(r, "temp")+200)
  1694.     sim.pressure(x/4,y/4,0.1)
  1695.     if math.random(1,500) == 1 then --6
  1696.      sim.partKill(i)
  1697.      end --6
  1698.     end --5
  1699.    end --2
  1700.   end --1
  1701. ) --*1
  1702.  
  1703.  elements.property(lo3, "HighTemperature", 161.1)
  1704.  elements.property(lo3, "HighTemperatureTransition", elements.TPT_PT_O3)
  1705.  
  1706.  elements.property(elements.DEFAULT_PT_PLSM, "Falldown", 2)
  1707.  elements.property(elements.DEFAULT_PT_PLSM, "Gravity", 0)
  1708.  
  1709.  elements.property(elem.TPT_PT_HE, "Update", --*1
  1710. function(i,x,y,s) --1
  1711.   if sim.partProperty(i, "temp") < 4.15 then --2
  1712.    if math.random(1,800) == 1 then --3
  1713.     sim.partProperty(i, "type", elements.TPT_PT_LHE)
  1714.     end --3
  1715.    end --2
  1716.   if sim.partProperty(i, "temp") > 4000 then --4
  1717.    if sim.pressure(x/4,y/4) > 100 then --5
  1718.     sim.partCreate(-1, x, y+1, elements.DEFAULT_PT_PHOT)
  1719.     sim.partCreate(-1, x+1, y+1, elements.DEFAULT_PT_PHOT)
  1720.     sim.partCreate(-1, x, y-1, elements.DEFAULT_PT_CO2)
  1721.     sim.partCreate(-1, x+1, y-1, elements.DEFAULT_PT_OXYG)
  1722.     sim.partCreate(-1, x-1, y-1, elements.DEFAULT_PT_NBLE)
  1723.     sim.partCreate(-1, x+1, y, elements.TPT_PT_HE3)
  1724.     sim.partCreate(-1, x-1, y, elements.TPT_PT_NEUT)
  1725.     if math.random(1,25) == 1 then --6
  1726.      sim.partCreate(-1, x-1, y, elements.TPT_PT_O3)
  1727.      sim.partProperty(i, "tmp2", 4)
  1728.      sim.partProperty(i, "tmp", math.random(0,359))
  1729.      sim.partProperty(i, "life", math.random(1,4))
  1730.      sim.pressure(x/4,y/4,150)
  1731.      sim.partProperty(i, "type", elements.DEFAULT_PT_LIGH)
  1732.      return
  1733.      end --6
  1734.     end --5
  1735.    end --4
  1736.   end --1
  1737.   ) --*1
  1738.  
  1739.  elements.property(elem.DEFAULT_PT_OXYG, "Update",
  1740.  function(i,x,y,s,nt) --1
  1741.   for r in sim.neighbors(x,y,1,1) do --2
  1742.    if sim.partProperty(r, "type") == elements.DEFAULT_PT_LIGH then --3
  1743.     sim.partProperty(i, "type", elements.TPT_PT_O3)
  1744.     end --3
  1745.    end --2
  1746.   end --1
  1747. ) --*1
  1748.  
  1749. local magm = elements.allocate("TPT" , "MAGM")
  1750.  elements.element(magm, elements.element(elements.DEFAULT_PT_LAVA))
  1751.  elements.property(magm, "Name" , "MAGM")
  1752.  elements.property(magm, "Description" , "Magma.")
  1753.  elements.property(magm, "Color", 0xFA7E3B)
  1754.  elements.property(magm, "Weight", 99)
  1755.  elements.property(magm, "Temperature", 1950.32)
  1756.  elements.property(magm, "HeatConduct", 10)
  1757.  elements.property(magm, "HotAir", 0.01)
  1758.  elements.property(magm, "Advection", 0.05)
  1759.  elements.property(elem.TPT_PT_MAGM, "Update",
  1760.  function(i,x,y,s,nt) --1
  1761.   if math.random(1,20) == 1 then --2
  1762.    sim.partProperty(i, "type", elements.DEFAULT_PT_LAVA)
  1763.    end --2
  1764.   end --1
  1765. ) --*1
  1766.  
  1767.  elements.property(elem.DEFAULT_PT_LAVA, "Update", --*1
  1768.  function(i,x,y,s,nt) --1
  1769.   if math.random(1,2) == 2 then --2
  1770.    for r in sim.neighbors(x,y,1,1) do --3
  1771.     if sim.partProperty(r, "type") == elements.DEFAULT_PT_LAVA then --4
  1772.      if sim.partProperty(r, "ctype") == elements.DEFAULT_PT_METL then --5
  1773.       if sim.partProperty(i, "ctype") == elements.DEFAULT_PT_VIBR then --6
  1774.        sim.partProperty(r, "type", elements.TPT_PT_XMEN)
  1775.        sim.partProperty(i, "type", elements.TPT_PT_XMEN)
  1776.        end --6
  1777.       end --5
  1778.      end --4
  1779.     end --3
  1780.    end --2
  1781.   if math.random(1,2) == 2 then --7
  1782.    if sim.partProperty(i, "ctype") == elements.TPT_PT_DMDD then --9
  1783.     sim.partProperty(i, "ctype", elements.DEFAULT_PT_DMND)
  1784.     end --8
  1785.    end --7
  1786.   if math.random(1,100) == 1 then --9
  1787.    if sim.partProperty(i, "temp") > 1920.30 then --10
  1788.     sim.partProperty(i, "type", elements.TPT_PT_MAGM)
  1789.     end --10
  1790.    end --9
  1791.   end --1
  1792.   ) --*1
  1793.  
  1794. local h2o2 = elements.allocate("TPT", "H2O2")
  1795.  elements.element(h2o2, elements.element(elements.DEFAULT_PT_SOAP))
  1796.  elements.property(h2o2, "Name" , "H2O2")
  1797.  elements.property(h2o2, "Description" , "Hydrogen Peroxide, corrosive, decomposes into oxygen and water, rarely ozone.")
  1798.  elements.property(h2o2, "Color", 0x1E41CF)
  1799.  elements.property(h2o2, "Hardness", 0)
  1800.  elements.property(h2o2, "Weight", 30)
  1801.  elements.property(elem.TPT_PT_H2O2, "Update", --*1
  1802.  function(i,x,y,s,nt) --1
  1803.   if s ~=8 and nt ~=0 and nt - s > 0 then --2
  1804.    if math.random(1,100) == 10 then --3
  1805.     for r in sim.neighbors(x,y,1,1) do --4
  1806.      if sim.partProperty(r, "type") ~= elements.DEFAULT_PT_DMND then --5
  1807.       if sim.partProperty(r, "type") ~= elements.DEFAULT_PT_VACU then --6
  1808.        if sim.partProperty(r, "type") ~= elements.DEFAULT_PT_VOID then --7
  1809.         if sim.partProperty(r, "type") ~= elements.DEFAULT_PT_CLNE then --8
  1810.          if sim.partProperty(r, "type") ~= elements.DEFAULT_PT_PCLN then --9
  1811.           if sim.partProperty(r, "type") ~= elements.DEFAULT_PT_OXYG then --10
  1812.            if sim.partProperty(r, "type") ~= elements.TPT_PT_O3 then --11
  1813.             if math.random(1,20) == 1 then --12
  1814.              sim.partProperty(r, "type", elements.DEFAULT_PT_O2)
  1815.              sim.partProperty(i, "temp", sim.partProperty(i, "temp")+300)
  1816.              if math.random(1,10) == 1 then --13
  1817.               sim.pressure(x/4,y/4,2)
  1818.               sim.partProperty(r, "type", elements.DEFAULT_PT_WATR)
  1819.               if math.random(1,10) == 1 then --14
  1820.                sim.partProperty(i, "type", elements.TPT_PT_O3)
  1821.                return
  1822.                end --14
  1823.               end --13
  1824.              end --12
  1825.             end --11
  1826.            end --10
  1827.           end --9
  1828.          end --8
  1829.         end --7
  1830.        end --6
  1831.       end --5
  1832.      end --4
  1833.     end --3
  1834.    end --2
  1835.   end --1
  1836.   ) --*1
  1837.  
  1838. local cmnt = elements.allocate("TPT" , "CMNT")
  1839.  elements.element(cmnt, elements.element(elements.DEFAULT_PT_WATR))
  1840.  elements.property(cmnt, "Name" , "CMNT")
  1841.  elements.property(cmnt, "Description" , "Cement, hardens over time.")
  1842.  elements.property(cmnt, "HighTemperature", 10001)
  1843.  elements.property(cmnt, "Weight", 31)
  1844.  elements.property(cmnt, "Color", 0x5E5E5E)
  1845.  elements.property(elem.TPT_PT_CMNT, "Update",
  1846.  function(i,x,y,s,nt) --1
  1847.   if math.random(1,12) == 1 then --2
  1848.    if math.sqrt(math.pow(sim.partProperty(i, "vx"),2)+math.pow(sim.partProperty(i, "vy"),2)) < 0.1 then --3
  1849.     if math.random(1,10) == 1 then --4
  1850.      sim.partProperty(i, "type", elements.DEFAULT_PT_BRCK)
  1851.      else if math.random(1,100) == 1 then --5
  1852.       sim.partProperty(i, "type", elements.DEFAULT_PT_CNCT)
  1853.       else if math.random(1,500) == 1 then --6
  1854.       sim.partProperty(i, "type", elements.DEFAULT_PT_STNE)
  1855.       end --6
  1856.      end --5
  1857.     end --4
  1858.    end --3
  1859.   end --2
  1860.  end --1
  1861. ) --*1
  1862.  
  1863. local cmnp = elements.allocate("TPT", "CMNP")
  1864.  elements.element(cmnp, elements.element(elements.DEFAULT_PT_DUST))
  1865.  elements.property(cmnp, "Name" , "CMNP")
  1866.  elements.property(cmnp, "Description" , "Cement powder, mix with water to get cement.")
  1867.  elements.property(cmnp, "Color", 0x7F7F7F)
  1868.  elements.property(cmnp, "Flammable", 0)
  1869.  elements.property(elem.TPT_PT_CMNP, "Update", --*1
  1870.  function(i,x,y,s,nt) --1
  1871.   if math.random(1,50) == 10 then --2
  1872.    if s ~=8 and nt ~=0 and nt - s > 0 then --3
  1873.     for r in sim.neighbors(x,y,1,1) do --4
  1874.      if sim.partProperty(r, "type") == elements.DEFAULT_PT_WATR then --5
  1875.       sim.partChangeType(r, elements.TPT_PT_CMNT)
  1876.       sim.partChangeType(i, elements.TPT_PT_CMNT)
  1877.       end --5
  1878.      end --4
  1879.     end --3
  1880.    end --2
  1881.   end --1
  1882.   ) --*1
  1883.  
  1884. local bulb = elements.allocate("TPT" , "BULB")
  1885.  elements.element(bulb, elements.element(elements.DEFAULT_PT_GLAS))
  1886.  elements.property(bulb, "Name" , "BULB")
  1887.  elements.property(bulb, "Description" , "Light bulb, emits light permanently.")
  1888.  elements.property(bulb, "Color", 0xFFFF80)
  1889.  elements.property(bulb, "Hardness", 0)
  1890.  elements.property(bulb, "Temperature", 273.15)
  1891.  elements.property(bulb, "HighTemperature", 10001)
  1892.  elements.property(bulb, "Properties", elements.PROP_NEUTPASS+elements.PROP_RADIOACTIVE+elements.TYPE_SOLID)
  1893.  elements.property(elem.TPT_PT_BULB, "Update", --*1
  1894.  function(i,x,y) --1
  1895.   if math.random(1,10) == 1 then --2
  1896.    if sim.pressure(x/4,y/4) < 393.15 then --3
  1897.     sim.partProperty(i, "temp", sim.partProperty(i, "temp")+5)
  1898.     end --3
  1899.    if sim.pressure(x/4,y/4) > 2.00 then --4
  1900.     sim.pressure(x/4,y/4,5.00)
  1901.     sim.partProperty(i, "temp", sim.partProperty(i, "temp")+500)
  1902.     sim.partProperty(i, "type", elements.DEFAULT_PT_BGLA);
  1903.     end --4
  1904.    end --2
  1905.   end --1
  1906.   ) --*1
  1907.  
  1908.  local function funcGraphics(i, colr, colg, colb) --*1
  1909.   return 1,ren.FIRE_ADD,255,colr,colg,colb,128,255,255,128
  1910.   end --*1
  1911.  elements.property(bulb, "Graphics", funcGraphics)
  1912.  
  1913. local tau = elements.allocate("TPT", "TAU")
  1914.  elements.element(tau, elements.element(elements.DEFAULT_PT_PROT))
  1915.  elements.property(tau, "Name" , "TAU")
  1916.  elements.property(tau, "Description" , "Tauons, heavy particles which decay quickly.")
  1917.  elements.property(tau, "Color", 0x880098)
  1918.  elements.property(tau, "MenuSection", 16)
  1919.  elements.property(tau, "Diffusion", 0.1)
  1920.  elements.property(tau, "Update", --*1
  1921.  function(i,x,y,colr,colg,colb) --1
  1922.   velocity_2(i,2,3)
  1923.   for r in sim.neighbors(x,y,1,1) do --2
  1924.    if math.random(1,10000) == 1 then --3
  1925.      sim.partCreate(-1, x-1, y+1, elements.TPT_PT_RADI)
  1926.      sim.partCreate(-1, x+1, y-1, elements.TPT_PT_RADI)
  1927.      sim.partCreate(-1, x-1, y-1, elements.TPT_PT_RADI)
  1928.      sim.partCreate(-1, x+1, y+1, elements.TPT_PT_RADI)
  1929.      sim.partCreate(-1, x-1, y+1, elements.TPT_PT_RADI)
  1930.      sim.partCreate(-1, x, y+1, elements.TPT_PT_RADI)
  1931.      sim.partCreate(-1, x-1, y+1, elements.TPT_PT_RADI)
  1932.      sim.partCreate(-1, x+1, y+1, elements.TPT_PT_RADI)
  1933.      sim.pressure(x/4,y/4,10)
  1934.      sim.partProperty(i, "temp", sim.partProperty(i, "temp")+5000)
  1935.      sim.partProperty(i, "life", 500)
  1936.      sim.partProperty(i, "type", elements.DEFAULT_PT_NEUT)
  1937.     end --3
  1938.    if math.random(1,20000) == 1 then --4
  1939.     sim.pressure(x/4,y/4,10)
  1940.     sim.partProperty(i, "temp", sim.partProperty(i, "temp")+8000)
  1941.     sim.partProperty(i, "life", 500)
  1942.     sim.partProperty(i, "type", elements.DEFAULT_PT_ELEC)
  1943.     end --4
  1944.    end --2
  1945.   end --1
  1946.   ) --*1
  1947.  
  1948.  local function funcGraphics(i, colr, colg, colb) --*1
  1949.   return 1,ren.PMODE_SPARK,255,colr,colg,colb,192,136,16,152
  1950.   end --*1
  1951.  elements.property(tau, "Graphics", funcGraphics)
  1952.  
  1953.  
  1954. local wyst = elements.allocate("TPT" , "WYST")
  1955.  elements.element(wyst, elements.element(elements.DEFAULT_PT_WATR))
  1956.  elements.property(wyst, "Name" , "WYST")
  1957.  elements.property(wyst, "Description" , "Water-Yeast mixture, spreads quickly under heat.")
  1958.  elements.property(wyst, "HighTemperature", 10001)
  1959.  elements.property(wyst, "Weight", 30.1)
  1960.  elements.property(wyst, "Color", 0x9E9280)
  1961.  elements.property(elem.TPT_PT_WYST, "Update",
  1962.  function(i,x,y,s,nt) --1
  1963.   for r in sim.neighbors(x,y,1,1) do --2
  1964.    if sim.partProperty(r, "type") == elements.DEFAULT_PT_WATR then --3
  1965.     if math.random(1,12) == 1 then --4
  1966.      if sim.partProperty(i, "temp") > 309.15 then --5
  1967.       if math.random(1,10) == 1 then --6
  1968.        sim.partProperty(r, "type", elements.TPT_PT_WYST)
  1969.        end --6
  1970.       end --5
  1971.      end --4
  1972.     end --3
  1973.    end --2
  1974.   end --1
  1975. ) --*1
  1976.  
  1977.  elements.property(elem.DEFAULT_PT_YEST, "Update",
  1978.  function(i,x,y,s,nt) --1
  1979.   if math.random(1,50) == 10 then --2
  1980.    if s ~=8 and nt ~=0 and nt - s > 0 then --3
  1981.     for r in sim.neighbors(x,y,1,1) do --4
  1982.      if sim.partProperty(r, "type") == elements.DEFAULT_PT_WATR then --5
  1983.       sim.partChangeType(r, elements.TPT_PT_WYST)
  1984.       sim.partChangeType(i, elements.TPT_PT_WYST)
  1985.       end --5
  1986.      end --4
  1987.     end --3
  1988.    end --2
  1989.   end --1
  1990.   ) --*1
  1991.  
  1992.  
  1993. local algae = elements.allocate("TPT", "ALGAE")
  1994.  elements.element(algae, elements.element(elements.DEFAULT_PT_SOAP))
  1995.  elements.property(algae, "Name" , "ALGE")
  1996.  elements.property(algae, "Description" , "Algae, spreads in water.")
  1997.  elements.property(algae, "Color", 0x407010)
  1998.  elements.property(algae, "Diffusion", 0.3)
  1999.  elements.property(algae, "Weight", 31)
  2000.  elements.property(algae, "MenuSection", 16)
  2001.  elements.property(elem.TPT_PT_ALGAE, "Update", --*1
  2002.  function(i,x,y,s,nt) --1
  2003.   if nt == 8 then --2
  2004.    for r in sim.neighbors(x,y,1,1) do --3
  2005.     if sim.partProperty(r, "type") == elements.DEFAULT_PT_WATR then --4
  2006.      if math.random(1,1000) > 1 then --4
  2007.       sim.partProperty(i, "vy", -0.05)
  2008.       end --5
  2009.      if math.random(1,1000) > 1 then --5
  2010.       sim.partProperty(i, "vx", math.random(-0.01,0.01))
  2011.       end --6
  2012.      end --4
  2013.     if math.random(1,250) < 4 then --7
  2014.      sim.partCreate(-1, math.random(x-1,x+1),math.random(y-1,y+1),elements.TPT_PT_BALGAE)
  2015.      sim.partCreate(-1, math.random(x-1,x+1),math.random(y-1,y+1),elements.TPT_PT_BALGAE)
  2016.      sim.partCreate(-1, math.random(x-1,x+1),math.random(y-1,y+1),elements.TPT_PT_BALGAE)
  2017.      sim.partCreate(-1, math.random(x-1,x+1),math.random(y-1,y+1),elements.TPT_PT_RALGAE)
  2018.      sim.partCreate(-1, math.random(x-1,x+1),math.random(y-1,y+1),elements.TPT_PT_GALGAE)
  2019.      sim.partCreate(-1, math.random(x-1,x+1),math.random(y-1,y+1),elements.TPT_PT_GALGAE)
  2020.      end --7
  2021.     if math.random(1,400) < 2 then --8
  2022.      sim.partKill(i)
  2023.      end --8
  2024.     if sim.partProperty(r, "type") == elements.DEFAULT_PT_CO2 then --9
  2025.      if math.random(1,200) == 1 then --10
  2026.       sim.partCreate(-1, math.random(x-3,x+3),math.random(y-3,y+3),elements.TPT_PT_BALGAE)
  2027.       sim.partCreate(-1, math.random(x-3,x+3),math.random(y-3,y+3),elements.TPT_PT_BALGAE)
  2028.       sim.partCreate(-1, math.random(x-3,x+3),math.random(y-3,y+3),elements.TPT_PT_GALGAE)
  2029.       end --10
  2030.      end --9
  2031.     end --3
  2032.    end --2
  2033.   if math.random(1,400) < 2 then --11
  2034.    sim.partKill(i)
  2035.    end --11
  2036.   end --1
  2037. ) --*1
  2038.  
  2039.  
  2040. local balgae = elements.allocate("TPT", "BALGAE")
  2041.  elements.element(balgae, elements.element(elements.DEFAULT_PT_SOAP))
  2042.  elements.property(balgae, "Name" , "BLGE")
  2043.  elements.property(balgae, "Description" , "Blue Algae, spreads in water.")
  2044.  elements.property(balgae, "Color", 0x107050)
  2045.  elements.property(balgae, "Diffusion", 0.3)
  2046.  elements.property(balgae, "Weight", 31)
  2047.  elements.property(balgae, "MenuSection", 16)
  2048.  
  2049. local galgae = elements.allocate("TPT", "GALGAE")
  2050.  elements.element(galgae, elements.element(elements.DEFAULT_PT_SOAP))
  2051.  elements.property(galgae, "Name" , "GLGE")
  2052.  elements.property(galgae, "Description" , "Green Algae, grows in water.")
  2053.  elements.property(galgae, "Color", 0x209010)
  2054.  elements.property(galgae, "Diffusion", 0.3)
  2055.  elements.property(galgae, "Weight", 31)
  2056.  elements.property(galgae, "MenuSection", 16)
  2057.  elements.property(elem.TPT_PT_GALGAE, "Update", --*1
  2058.  function(i,x,y,s,nt) --1
  2059.   for r in sim.neighbors(x,y,1,20) do --2
  2060.    if (nt > 2) and (nt < 6) then --3 --**DRY**
  2061.     if math.random(1,500) < 2 then --4
  2062.      sim.partKill(i)
  2063.      end --4
  2064.     if math.random(1,1000) < 1000 then --5
  2065.      sim.partProperty(i, "vy", 0)
  2066.      end --5
  2067.    if math.random(1,100) < 100 then --5
  2068.      sim.partProperty(i, "vx", 0)
  2069.      end --5
  2070.     end --3
  2071.    if nt == 8 then --3
  2072.     if sim.partProperty(r, "type") == elements.DEFAULT_PT_WATR then --4 --**WET**
  2073.      if math.random(1,1000) < 1000 then --5
  2074.       sim.partProperty(i, "vy", 0)
  2075.        if math.random(1,5000) < 4 then --6
  2076.        sim.partCreate(-1, math.random(x-1,x+1),math.random(y-1,y+1),elements.TPT_PT_RALGAE)
  2077.        sim.partCreate(-1, math.random(x-1,x+1),math.random(y-1,y+1),elements.TPT_PT_BALGAE)
  2078.        end --6
  2079.       end --5
  2080.      if math.random(1,100) < 100 then --7
  2081.       sim.partProperty(i, "vx", 0)
  2082.       end --7
  2083.      end --8
  2084.     if math.random(1,4000) < 2 then --8
  2085.      sim.partKill(i)
  2086.      end --8
  2087.     if sim.partProperty(r, "type") == elements.DEFAULT_PT_CO2 then --9
  2088.      if math.random(1,200) == 1 then --10
  2089.       sim.partCreate(-1, math.random(x-3,x+3),math.random(y-3,y+3),elements.TPT_PT_GALGAE)
  2090.       sim.partCreate(-1, math.random(x-3,x+3),math.random(y-3,y+3),elements.TPT_PT_GALGAE)
  2091.       sim.partCreate(-1, math.random(x-1,x+1),math.random(y-1,y+1),elements.TPT_PT_GALGAE)
  2092.       sim.partCreate(-1, math.random(x-3,x+3),math.random(y-3,y+3),elements.DEFAULT_PT_OXYG)
  2093.       end --10
  2094.      end --9
  2095.     end --3
  2096.    end --2
  2097.   if math.random(1,400) < 2 then --11
  2098.    sim.partKill(i)
  2099.    end --11
  2100.   end --1
  2101. ) --*1
  2102.  
  2103.  elements.property(elem.TPT_PT_BALGAE, "Update", --*1
  2104.  function(i,x,y,s,nt) --1
  2105.   if nt == 8 then --2
  2106.    for r in sim.neighbors(x,y,1,1) do --3
  2107.     if sim.partProperty(r, "type") == elements.DEFAULT_PT_WATR then --4
  2108.      if math.random(1,1000) > 1 then --4
  2109.       sim.partProperty(i, "vy", -0.05)
  2110.       end --5
  2111.      if math.random(1,1000) > 1 then --5
  2112.       sim.partProperty(i, "vx", math.random(-0.01,0.01))
  2113.       end --6
  2114.      end --4
  2115.     if math.random(1,62) < 4 then --7
  2116.      sim.partCreate(-1, math.random(x-1,x+1),math.random(y-1,y+1),elements.TPT_PT_BALGAE)
  2117.      sim.partCreate(-1, math.random(x-1,x+1),math.random(y-1,y+1),elements.TPT_PT_BALGAE)
  2118.      sim.partCreate(-1, math.random(x-4,x+4),math.random(y-2,y+2),elements.TPT_PT_BALGAE)
  2119.      if math.random(1,8000) < 4 then --8
  2120.       sim.partProperty(i, "type", elements.TPT_PT_H2O2)
  2121.       end --8
  2122.      end --7
  2123.     if math.random(1,100) < 2 then --9
  2124.      sim.partKill(i)
  2125.      end --9
  2126.     if sim.partProperty(r, "type") == elements.DEFAULT_PT_CO2 then --10
  2127.      if math.random(1,200) == 1 then --11
  2128.       sim.partCreate(-1, math.random(x-3,x+3),math.random(y-3,y+3),elements.TPT_PT_BALGAE)
  2129.       sim.partCreate(-1, math.random(x-3,x+3),math.random(y-3,y+3),elements.TPT_PT_BALGAE)
  2130.       sim.partCreate(-1, math.random(x-3,x+3),math.random(y-3,y+3),elements.TPT_PT_BALGAE)
  2131.       sim.partCreate(-1, math.random(x-3,x+3),math.random(y-3,y+3),elements.TPT_PT_H2O2)
  2132.       sim.partCreate(-1, math.random(x-2,x+2),math.random(y-2,y+2),elements.TPT_PT_GALGAE)
  2133.       end --11
  2134.      end --10
  2135.     end --3
  2136.    end --2
  2137.   if math.random(1,400) < 2 then --11
  2138.    sim.partKill(i)
  2139.    end --11
  2140.   end --1
  2141. ) --*1
  2142.  
  2143. local ralgae = elements.allocate("TPT", "RALGAE")
  2144.  elements.element(ralgae, elements.element(elements.DEFAULT_PT_SOAP))
  2145.  elements.property(ralgae, "Name" , "RLGE")
  2146.  elements.property(ralgae, "Description" , "Red Algae, grows in water.")
  2147.  elements.property(ralgae, "Color", 0x802010)
  2148.  elements.property(ralgae, "Diffusion", 0.3)
  2149.  elements.property(ralgae, "Weight", 31)
  2150.  elements.property(ralgae, "MenuSection", 16)
  2151.  elements.property(elem.TPT_PT_RALGAE, "Update", --*1
  2152.  function(i,x,y,s,nt) --1
  2153.   if nt == 8 then --2
  2154.    for r in sim.neighbors(x,y,1,1) do --3
  2155.     if sim.partProperty(r, "type") == elements.DEFAULT_PT_WATR then --4
  2156.      if math.random(1,1000) > 1 then --4
  2157.       sim.partProperty(i, "vy", -0.25)
  2158.       end --5
  2159.      if math.random(1,1000) > 1 then --5
  2160.       sim.partProperty(i, "vx", math.random(-0.4,0.4))
  2161.       end --6
  2162.      end --4
  2163.     if math.random(1,5000) < 4 then --7
  2164.      sim.partCreate(-1, math.random(x-1,x+1),math.random(y-1,y+1),elements.TPT_PT_RALGAE)
  2165.      sim.partCreate(-1, math.random(x-1,x+1),math.random(y-1,y+1),elements.TPT_PT_RALGAE)
  2166.      sim.partCreate(-1, math.random(x-1,x+1),math.random(y-1,y+1),elements.TPT_PT_BALGAE)
  2167.      sim.partCreate(-1, math.random(x-1,x+1),math.random(y-1,y+1),elements.TPT_PT_BALGAE)
  2168.      sim.partCreate(-1, math.random(x-1,x+1),math.random(y-1,y+1),elements.TPT_PT_BALGAE)
  2169.      end --7
  2170.     if math.random(1,900) < 2 then --8
  2171.      sim.partKill(i)
  2172.      end --8
  2173.     if sim.partProperty(r, "type") == elements.DEFAULT_PT_CO2 then --9
  2174.      if math.random(1,4000) == 1 then --10
  2175.       sim.partCreate(-1, math.random(x-3,x+3),math.random(y-3,y+3),elements.TPT_PT_GALGAE)
  2176.       sim.partCreate(-1, math.random(x-1,x+1),math.random(y-1,y+1),elements.DEFAULT_PT_GAS)
  2177.       sim.partCreate(-1, math.random(x-1,x+1),math.random(y-1,y+1),elements.DEFAULT_PT_GAS)
  2178.       sim.partCreate(-1, math.random(x-1,x+1),math.random(y-1,y+1),elements.DEFAULT_PT_GAS)
  2179.       sim.partCreate(-1, math.random(x-1,x+1),math.random(y-1,y+1),elements.DEFAULT_PT_GAS)
  2180.       sim.partCreate(-1, math.random(x-1,x+1),math.random(y-1,y+1),elements.DEFAULT_PT_GAS)
  2181.       sim.partCreate(-1, math.random(x-1,x+1),math.random(y-1,y+1),elements.DEFAULT_PT_GAS)
  2182.       sim.partCreate(-1, math.random(x-3,x+3),math.random(y-3,y+3),elements.DEFAULT_PT_OXYG)
  2183.       end --10
  2184.      end --9
  2185.     end --3
  2186.    end --2
  2187.   if math.random(1,400) < 2 then --11
  2188.    sim.partKill(i)
  2189.    end --11
  2190.   end --1
  2191. ) --*1
  2192.  
  2193. local qgp = elements.allocate("TPT" , "QGP")
  2194.  elements.element(qgp, elements.element(elements.DEFAULT_PT_WTRV))
  2195.  elements.property(qgp, "Name" , "QGP")
  2196.  elements.property(qgp, "Description" , "Quark-Gluon Plasma,")
  2197.  elements.property(qgp, "Color", 0x06FF18)
  2198.  elements.property(qgp, "PhotonReflectWavelengths", 0x00008000)
  2199.  elements.property(qgp, "MenuSection", 10)
  2200.  elements.property(qgp, "Diffusion", 0.035)
  2201.  elements.property(qgp, "Flammable", 0)
  2202.  elements.property(qgp, "Loss", -1.01)
  2203.  elements.property(qgp, "LowTemperature", -256)
  2204. elements.property(elements.TPT_PT_QGP, "Update", --*1
  2205.  function(i,x,y,s,nt) --1
  2206.   sim.partProperty(i, "life", 1)
  2207.   attract(i,x,y,math.random(-0.1,0.1))
  2208.   sim.partProperty(i, "temp", sim.partProperty(i, "temp")*1.01)
  2209.   if math.random(0,1000) == 0 then --2
  2210.    sim.partKill(i)
  2211.    end --2
  2212.   if math.random(0,500) == 0 then --3
  2213.    sim.partCreate(-1, math.random(x-1,x+1),math.random(y-1,y+1),elements.TPT_PT_RADI)
  2214.    end --3
  2215.   if math.random(0,500) == 0 then --3
  2216.    sim.partCreate(-1, math.random(x-1,x+1),math.random(y-1,y+1),elements.TPT_PT_PROT)
  2217.    sim.partKill(i)
  2218.    end --3
  2219.   if math.random(0,500) == 0 then --3
  2220.    sim.partCreate(-1, math.random(x-1,x+1),math.random(y-1,y+1),elements.TPT_PT_NEUT)
  2221.    sim.partKill(i)
  2222.    end --3
  2223.   end --1
  2224. ) --*1
  2225.  
  2226.  
  2227.  local function funcGraphics(i, colr, colg, colb) --*1
  2228.   return 0,ren.FIRE_ADD,255,colr,colg,colb,(sim.partProperty(i, "temp")-273.15)/5.84+75,128+96-(sim.partProperty(i, "temp")-273.15)/28.4+1,math.random(1,256),(sim.partProperty(i, "temp")-273.15)/28.4+1+24
  2229.   end --*1
  2230.  elements.property(qgp, "Graphics", funcGraphics)
  2231.  
  2232. local lno2 = elements.allocate("TPT" , "LNO2")
  2233.  elements.element(lno2, elements.element(elements.DEFAULT_PT_LOXY))
  2234.  elements.property(lno2, "Name" , "LNO2")
  2235.  elements.property(lno2, "Description" , "Liquid Nitrogen Dioxide, explosive.")
  2236.  elements.property(lno2, "Color", 0xD58C4A)
  2237.  elements.property(lno2, "Gravity", 0.3)
  2238.  elements.property(lno2, "Temperature", 290.15)
  2239.  elements.property(lno2, "MenuSection", 5)
  2240.  elements.property(lno2, "Flammable", 3)
  2241.  elements.property(lno2, "HeatConduct", 16)
  2242.  
  2243. local no2 = elements.allocate("TPT" , "NO2")
  2244.  elements.element(no2, elements.element(elements.DEFAULT_PT_HYGN))
  2245.  elements.property(no2, "Name" , "NO2")
  2246.  elements.property(no2, "Description" , "Nitrogen Dioxide, reacts with water to form nitric acid.")
  2247.  elements.property(no2, "Color", 0xB54C2A)
  2248.  elements.property(no2, "Gravity", 0.3)
  2249.  elements.property(no2, "Falldown", 2)
  2250.  elements.property(no2, "PhotonReflectWavelengths", 0x100000000000)
  2251.  elements.property(no2, "MenuSection", 6)
  2252.  elements.property(no2, "Flammable", 10)
  2253.  elements.property(no2, "LowTemperature", 293.15)
  2254.  elements.property(no2, "LowTemperatureTransition", elements.TPT_PT_LNO2)
  2255.  
  2256.  elements.property(lno2, "HighTemperature", 294.3)
  2257.  elements.property(lno2, "HighTemperatureTransition", elements.TPT_PT_NO2)
  2258.  
  2259. local hno3 = elements.allocate("TPT", "HNO3")
  2260.  elements.element(hno3, elements.element(elements.DEFAULT_PT_SOAP))
  2261.  elements.property(hno3, "Name" , "HNO3")
  2262.  elements.property(hno3, "Description" , "Nitric acid, corrosive, releases deadly gasses.")
  2263.  elements.property(hno3, "Color", 0x6991B5)
  2264.  elements.property(hno3, "Hardness", 0)
  2265.  elements.property(hno3, "Flammable", 500)
  2266.  elements.property(hno3, "Weight", 30)
  2267.  elements.property(elem.TPT_PT_HNO3, "Update", --*1
  2268.  function(i,x,y,s,nt) --1
  2269.  sim.partProperty(i, "tmp", 2)
  2270.   if s ~=8 and nt ~=0 and nt - s > 0 then --2
  2271.    if math.random(1,100) == 10 then --3
  2272.     for r in sim.neighbors(x,y,1,1) do --4
  2273.      if sim.partProperty(r, "type") ~= elements.DEFAULT_PT_DMND then --5
  2274.       if sim.partProperty(r, "type") ~= elements.DEFAULT_PT_VACU then --6
  2275.        if sim.partProperty(r, "type") ~= elements.DEFAULT_PT_VOID then --7
  2276.         if sim.partProperty(r, "type") ~= elements.DEFAULT_PT_CLNE then --8
  2277.          if sim.partProperty(r, "type") ~= elements.DEFAULT_PT_PCLN then --9
  2278.           if sim.partProperty(r, "type") ~= elements.DEFAULT_PT_GLAS then --10
  2279.            if sim.partProperty(r, "type") ~= elements.TPT_PT_BRAU then --11
  2280.             if math.random(1,20) == 1 then --12
  2281.              if sim.partProperty(r, "type") ~= elements.DEFAULT_PT_GOLD then --13
  2282.               sim.partProperty(r, "type", elements.TPT_PT_NO2)
  2283.               sim.partProperty(i, "temp", sim.partProperty(i, "temp")+300)
  2284.               sim.partProperty(i, "tmp", sim.partProperty(i, "tmp")+1)
  2285.               end --13
  2286.              if sim.partProperty(r, "type") == elements.DEFAULT_PT_GOLD then --14
  2287.               sim.pressure(x/4,y/4,2)
  2288.               sim.partProperty(r, "type", elements.TPT_PT_BRAU)
  2289.               sim.partProperty(i, "tmp", sim.partProperty(i, "tmp")+1)
  2290.               if math.random(1,10) == 1 then --15
  2291.                sim.partProperty(i, "type", elements.TPT_PT_NO2)
  2292.                return
  2293.                end --15
  2294.               end --14
  2295.              end --12
  2296.             end --11
  2297.            end --10
  2298.           end --9
  2299.          end --8
  2300.         end --7
  2301.        end --6
  2302.       end --5
  2303.      end --4
  2304.     end --3
  2305.    end --2
  2306.   end --1
  2307.   ) --*1
  2308.  
  2309.  local function funcGraphics2(i, colr, colg, colb) --*1
  2310.   return 0,ren.PMODE_FLAT,255,colr,colg,colb,255,105+sim.partProperty(i, "tmp")*8-1,145,181
  2311.   end --*1
  2312.  elements.property(hno3, "Graphics", funcGraphics2)
  2313.  
  2314.  elements.property(elem.TPT_PT_NO2, "Update", --*1
  2315.  function(i,x,y,s,nt) --1
  2316.   if math.random(1,2) == 2 then --2
  2317.    if s ~=8 and nt ~=0 and nt - s > 0 then --3
  2318.     for r in sim.neighbors(x,y,1,1) do --4
  2319.      if sim.partProperty(i, "tmp") == 0 then --5
  2320.       if sim.partProperty(r, "type") == elements.DEFAULT_PT_WATR then --6
  2321.        sim.partProperty(i, "tmp", -1)
  2322.        end --6
  2323.       end --5
  2324.      if sim.partProperty(i, "tmp") == -1 then --7
  2325.       if math.random(1,2) == 1 then --8
  2326.        sim.partCreate(-1, x+math.random(-1,1), y+math.random(-1,1), elements.TPT_PT_HNO3)
  2327.        sim.partProperty(i, "temp", sim.partProperty(i, "temp")+20)
  2328.        if math.random(1,2) == 1 then --9
  2329.         sim.partKill(i)
  2330.         return
  2331.         end --9
  2332.        end --8
  2333.       end --7
  2334.      end --4
  2335.     end --3
  2336.    end --2
  2337.   end --1
  2338.   ) --*1
  2339.  
  2340. local brau = elements.allocate("TPT" , "BRAU")
  2341.  elements.element(brau, elements.element(elements.DEFAULT_PT_EQVE))
  2342.  elements.property(brau, "Name" , "BRAU")
  2343.  elements.property(brau, "Description" , "Broken Gold.")
  2344.  elements.property(brau, "Color", 0xB98C33)
  2345.  elements.property(brau, "HighTemperature", 1337.0)
  2346.  elements.property(brau, "HighTemperatureTransition", elements.DEFAULT_PT_GOLD)
  2347.  elements.property(brau, "MenuSection", 16)
  2348.  elements.property(brau, "Flammable", 0)
  2349.  
  2350.  elements.property(elements.DEFAULT_PT_GOLD, "HighPressure", 10)
  2351.  elements.property(elements.DEFAULT_PT_GOLD, "HighPressureTransition", elements.TPT_PT_BRAU)
  2352.  
  2353. local rad = elements.allocate("TPT", "RADON")
  2354.  elements.element(rad, elements.element(elements.DEFAULT_PT_WTRV))
  2355.  elements.property(rad, "Name" , "RADN")
  2356.  elements.property(rad, "Description" , "Radon, screws up electronics and kills organic matter.")
  2357.  elements.property(rad, "Color", 0xD8D8C0)
  2358.  elements.property(rad, "MenuSection", 16)
  2359.  elements.property(rad, "LowTemperature", -1)
  2360.  elements.property(elem.TPT_PT_RADON, "Update", --*1
  2361.  function(i,x,y,s,nt) --1
  2362.   if s ~=8 and nt ~=0 and nt - s > 0 then --2
  2363.    if math.random(1,100) == 10 then --3
  2364.     for r in sim.neighbors(x,y,1,1) do --4
  2365.      if sim.partProperty(r, "type") == elements.DEFAULT_PT_YEST then --5
  2366.       if math.random(1,2) == 2 then --6
  2367.        sim.partKill(r)
  2368.        end --6
  2369.       end --5
  2370.      if sim.partProperty(r, "type") == elements.DEFAULT_PT_PLNT then --7
  2371.       if math.random(1,2) == 2 then --8
  2372.        sim.partKill(r)
  2373.        end --8
  2374.       end --7
  2375.      if sim.partProperty(r, "type") == elements.DEFAULT_PT_WOOD then --9
  2376.       if math.random(1,5) == 5 then --10
  2377.        sim.partKill(r)
  2378.        end --10
  2379.       end --9
  2380.      if sim.partProperty(r, "type") == elements.DEFAULT_PT_STKM then --11
  2381.       if math.random(1,2) == 2 then --12
  2382.        sim.partKill(r)
  2383.        end --12
  2384.       end --11
  2385.      if sim.partProperty(r, "type") == elements.DEFAULT_PT_FIGH then --13
  2386.       if math.random(1,2) == 2 then --14
  2387.        sim.partKill(r)
  2388.        end --14
  2389.       end --13
  2390.      if sim.partProperty(r, "type") == elements.TPT_PT_BCTR then --15
  2391.       if math.random(1,2) == 2 then --16
  2392.        sim.partKill(r)
  2393.        end --14
  2394.       end --13
  2395.      if sim.partProperty(r, "type") == elements.TPT_PT_ALGAE then --17
  2396.       if math.random(1,2) == 2 then --18
  2397.        sim.partKill(r)
  2398.        end --14
  2399.       end --13
  2400.      if sim.partProperty(r, "type") == elements.TPT_PT_GALGAE then --19
  2401.       if math.random(1,2) == 2 then --20
  2402.        sim.partKill(r)
  2403.        end --14
  2404.       end --13
  2405.      if sim.partProperty(r, "type") == elements.TPT_PT_BALGAE then --21
  2406.       if math.random(1,2) == 2 then --22
  2407.        sim.partKill(r)
  2408.        end --14
  2409.       end --13
  2410.      if sim.partProperty(r, "type") == elements.TPT_PT_BCTRC then --23
  2411.       if math.random(1,2) == 2 then --24
  2412.        sim.partKill(r)
  2413.        end --14
  2414.       end --13
  2415.      if sim.partProperty(r, "type") == elements.TPT_PT_BCTRP then --25
  2416.       if math.random(1,2) == 2 then --26
  2417.        sim.partKill(r)
  2418.        end --14
  2419.       end --13
  2420.      if sim.partProperty(r, "type") == elements.TPT_PT_BCTRD then --27
  2421.       if math.random(1,2) == 3 then --28
  2422.        sim.partKill(r)
  2423.        end --14
  2424.       end --13
  2425.      if sim.partProperty(r, "type") == elements.TPT_PT_BCTRA then --29
  2426.       if math.random(1,3) == 3 then --30
  2427.        sim.partKill(r)
  2428.        end --14
  2429.       end --13
  2430.      end --4
  2431.     end --3
  2432.    end --2
  2433.   radiate(i,x,y,250,25)
  2434.   end --1
  2435.   ) --*1
  2436.  
  2437. local stea = elements.allocate("TPT", "STEAM")
  2438.  elements.element(stea, elements.element(elements.DEFAULT_PT_WTRV))
  2439.  elements.property(stea, "Name" , "STEA")
  2440.  elements.property(stea, "Description" , "Steam.")
  2441.  elements.property(stea, "Color", 0xC2C6CA)
  2442.  elements.property(stea, "MenuSection", 16)
  2443.  elements.property(stea, "HotAir", 0.001)
  2444.  elements.property(stea, "AirDrag", 0.015)
  2445.  elements.property(stea, "Loss", 0.2)
  2446.  elements.property(stea, "LowTemperature", 372.15)
  2447.  elements.property(stea, "Diffusion", 0.25)
  2448.  elements.property(stea, "LowTemperatureTransition", elements.DEFAULT_PT_WTRV)
  2449.  elements.property(elem.TPT_PT_STEAM, "Update", --*1
  2450.  function(i,x,y,s,nt) --1
  2451.   if s > 2 then --2
  2452.    if math.random(0,65535) == 0 then --3
  2453.     sim.partProperty(i, "type", elements.DEFAULT_PT_WTRV)
  2454.     end --3
  2455.    end --2
  2456.   end --1
  2457.   ) --*1
  2458.  
  2459.  elements.property(elements.DEFAULT_PT_WTRV, "HighTemperature", 402.15)
  2460.  elements.property(elements.DEFAULT_PT_WTRV, "HighTemperatureTransition", elements.TPT_PT_STEAM)
  2461.  
  2462.  elements.property(stea, "Graphics",
  2463. function(i, colr, colg, colb) --1
  2464.   return 1,ren.FIRE_BLEND,255,colr,colg,colb,8,128,128,128
  2465.   end --1
  2466. ) --*1
  2467.  
  2468. local sball = elements.allocate("TPT" , "SBALL")
  2469.  elements.element(sball, elements.element(elements.DEFAULT_PT_CNCT))
  2470.  elements.property(sball, "Name" , "SBAL")
  2471.  elements.property(sball, "Description" , "Super Bouncy Ball from the old Dan-Ball powder game.")
  2472.  elements.property(sball, "Color", 0xFF4080)
  2473.  elements.property(sball, "Falldown", 1)
  2474.  elements.property(sball, "PhotonReflectWavelengths", 0x20000100)
  2475.  elements.property(sball, "Collision", -1)
  2476.  elements.property(sball, "Gravity", 0.2)
  2477.  elements.property(sball, "HighTemperature", 10001.00)
  2478.  elements.property(sball, "AirDrag", 0.0001)
  2479.  elements.property(sball, "Advection", 0.001)
  2480.  
  2481. local after = elements.allocate("TPT" , "AFTER")
  2482.  elements.element(after, elements.element(elements.DEFAULT_PT_DMND))
  2483.  elements.property(after, "Name" , "!!!")
  2484.  elements.property(after, "Description" , "Destroyed matter.")
  2485.  elements.property(after, "Color", 0xD02000)
  2486.  elements.property(after, "Falldown", 1)
  2487.  elements.property(after, "PhotonReflectWavelengths", 0x20000001)
  2488.  elements.property(elem.TPT_PT_AFTER, "Update", --*1
  2489.  function(i,x,y) --1
  2490.   if math.random(0,255) == 0 then --2
  2491.    sim.partKill(i)
  2492.    end --2
  2493.   end --1
  2494. ) --*1
  2495.  
  2496. local nuke = elements.allocate("TPT" , "NUKE")
  2497.  elements.element(nuke, elements.element(elements.DEFAULT_PT_DMND))
  2498.  elements.property(nuke, "Name" , "???")
  2499.  elements.property(nuke, "Description" , "Destroys everything.")
  2500.  elements.property(nuke, "Color", 0xFF00FF)
  2501.  elements.property(nuke, "Falldown", 1)
  2502.  elements.property(nuke, "PhotonReflectWavelengths", 0x20000001)
  2503.  elements.property(nuke, "HighTemperature", 10001.00)
  2504.  elements.property(elem.TPT_PT_NUKE, "Update", --*1
  2505.  function(i,x,y,s,nt) --1
  2506.   if s >= 0 then --2
  2507.    if math.random(0,1) == 1 then --3
  2508.     for r in sim.neighbors(x,y,1,1) do --4
  2509.      if sim.partProperty(r, "type") ~= elements.TPT_PT_AFTER then --5
  2510.       if math.random(0,1) == 1 then --6
  2511.        sim.partProperty(r, "type", elements.TPT_PT_NUKE)
  2512.        end --6
  2513.       end --5
  2514.      end --4
  2515.     end --3
  2516.   if sim.partProperty(i, "tmp") == 0 then --7
  2517.    sim.partProperty(i, "life", 3)
  2518.    sim.partProperty(i, "tmp", 1)
  2519.    end --7
  2520.    if sim.partProperty(i, "life") < 1 then --8
  2521.     sim.partProperty(i, "type", elements.TPT_PT_AFTER)
  2522.     end --8
  2523.    if math.random(0,1) == 1 then --9
  2524.     sim.partCreate(-1, math.random(x-1,x+1),math.random(y-1,y+1),elements.TPT_PT_NUKE)
  2525.     sim.partCreate(-1, math.random(x-1,x+1),math.random(y-1,y+1),elements.TPT_PT_NUKE)
  2526.     sim.partCreate(-1, math.random(x-1,x+1),math.random(y-1,y+1),elements.TPT_PT_NUKE)
  2527.     end --9
  2528.    end --2
  2529.   sim.partProperty(i, "life", sim.partProperty(i, "life")-1)
  2530.   end --1
  2531. ) --*1
Add Comment
Please, Sign In to add comment