Advertisement
Guest User

1.6b

a guest
Apr 28th, 2017
85
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 61.81 KB | None | 0 0
  1. --Gamma updates after this
  2.  
  3. --To be used colors: 5700C5 (Brugel), A9BBD8 (Gloeu)
  4.  
  5. local function velocity(i,v,n) --*1
  6.  if tpt.get_property("tmp", i) == 0 then --1
  7.   local angle = math.random(1,n)*(2*math.pi/n)
  8.   tpt.set_property("vx", v*math.cos(angle), i)
  9.   tpt.set_property("vy", v*math.sin(angle), i)
  10.   tpt.set_property("tmp", 1, i)
  11.   end --1
  12.  end --*1
  13.  
  14. local function superfluid(i,x,y,s,nt,p,h,u) --*1
  15.   if s ~=8 and nt ~=0 and nt - s > 0 then --1
  16.    for r in sim.neighbors(x,y,1,1) do --2
  17.     if math.random(1,u) == 1 then --3
  18.      if sim.partProperty(i, "vy") > 0.5 then --4/2
  19.       sim.partProperty(i, "vy", p+0.5)
  20.      elseif sim.partProperty(i, "vy") < 0.5 then --4/1
  21.       sim.partProperty(i, "vy", p*-1)
  22.       end --4
  23.      end --3
  24.      if math.random(1,h) > 1 then --5
  25.      sim.partProperty(i, "vx", 0)
  26.      end --5
  27.     end --2
  28.    end --1
  29.   end --*1
  30.  
  31. --Before this, is some important stuff that I have to use here, like extra color list, etc.
  32.  
  33. local trit = elements.allocate("RADM" , "TRIT")
  34.  elements.element(trit, elements.element(elements.DEFAULT_PT_HYGN))
  35.  elements.property(trit, "Name" , "TRIT")
  36.  elements.property(trit, "Description" , "Tritium, reacts with neutrons and creates fusion.")
  37.  elements.property(trit, "Color", 0xA2A0BF)
  38.  elements.property(trit, "MenuSection", 10)
  39.  function tritDecay(i,x,y,s,n) --*1
  40.   if tpt.get_property("type", x + math.random(-2,2), y + math.random(-2,2)) == tpt.el.neut.id then --1
  41.    if math.random(1,3) == 1 then --2/3
  42.    tpt.parts[i].type = tpt.el.neut.id
  43.    sim.pressure(x/4,y/4,75)
  44.    tpt.set_property("temp", math.huge, x, y)
  45.    elseif math.random(1,6) == 3 then --2/2
  46.    tpt.parts[i].type = tpt.el.deut.id
  47.    sim.pressure(x/4,y/4,75)
  48.    tpt.set_property("temp", math.huge, x, y)
  49.    elseif math.random(1,3) == 3 then --2/1
  50.    tpt.parts[i].type = tpt.el.hygn.id
  51.    sim.pressure(x/4,y/4,75)
  52.    tpt.set_property("temp", math.huge, x ,y)
  53.   end --1
  54.  end
  55.  if sim.pressure(x/4,y/4) > 1 then
  56.  if math.random(1,250) == 10 then
  57.  tpt.create(x + math.random(-2,2), y + math.random(-2,2), 'neut')
  58.  end
  59.  end
  60.  end
  61.  tpt.element_func(tritDecay,trit)
  62.  function neutron(i,x,y,s,n) --*2
  63.  if tpt.get_property("type", x + math.random(-2,2), y + math.random(-2,2)) == trit then
  64.  if math.random(1,30) == 10 then
  65.  tpt.create(x + math.random(-2,2), y + math.random(-1,1), 'neut')
  66.  end
  67.  end
  68.  end
  69.  tpt.element_func(neutron,tpt.el.neut.id)
  70.  
  71. local qudr = elements.allocate("RADM" , "QUDR")
  72.  elements.element(qudr, elements.element(elements.DEFAULT_PT_HYGN))
  73.  elements.property(qudr, "Name" , "QUDR")
  74.  elements.property(qudr, "Description" , "Quadrium, reacts with electrons and creates deuterium.")
  75.  elements.property(qudr, "Color", 0x968999)
  76.  elements.property(qudr, "MenuSection", 10)
  77.  function plutonium(i,x,y,s,n)
  78.   if tpt.get_property("type", x + math.random(-2,2), y + math.random(-2,2)) == tpt.el.elec.id then --1
  79.    if math.random(1,3) == 1 then --2/3
  80.    tpt.parts[i].type = tpt.el.elec.id
  81.    sim.pressure(x/4,y/4,75)
  82.    tpt.set_property("temp", math.huge, x, y)
  83.    elseif math.random(1,6) == 3 then --2/2
  84.    tpt.parts[i].type = tpt.el.neut.id
  85.    sim.pressure(x/4,y/4,75)
  86.    tpt.set_property("temp", math.huge, x, y)
  87.    elseif math.random(1,3) == 3 then --2/1
  88.    tpt.parts[i].type = tpt.el.deut.id
  89.    sim.pressure(x/4,y/4,75)
  90.    tpt.set_property("temp", math.huge, x ,y)
  91.    end --2
  92.   end --1
  93.   if sim.pressure(x/4,y/4) > 1 then --3
  94.    if math.random(1,250) == 10 then --4
  95.     tpt.create(x + math.random(-2,2), y + math.random(-2,2), 'elec')
  96.   end --4
  97.  end --3
  98. end --*1
  99. tpt.element_func(quadDecay,qudr)
  100. function neutron(i,x,y,s,n) --*2
  101.  if tpt.get_property("type", x + math.random(-2,2), y + math.random(-2,2)) == qudr then --1
  102.   if math.random(1,30) == 10 then --2
  103.   tpt.create(x + math.random(-2,2), y + math.random(-2,2), 'elec')
  104.   end --2
  105.  end --1
  106. end --*2
  107. tpt.element_func(neutron,tpt.el.elec.id)
  108.  
  109. local pent = elements.allocate("RADM" , "PENT")
  110.  elements.element(pent, elements.element(elements.DEFAULT_PT_HYGN))
  111.  elements.property(pent, "Name" , "PENT")
  112.  elements.property(pent, "Description" , "Pentium, reacts with protons.")
  113.  elements.property(pent, "Color", 0x8BC2C4)
  114.  elements.property(pent, "MenuSection", 10)
  115.  function pentium(i,x,y,s,n) --*1
  116.   if tpt.get_property("type", x + math.random(-2,2), y + math.random(-2,2)) == tpt.el.prot.id then --1
  117.    if math.random(1,3) == 1 then --2/3
  118.     tpt.parts[i].type = tpt.el.prot.id
  119.     sim.pressure(x/4,y/4,75)
  120.     tpt.set_property("temp", math.huge, x, y)
  121.    elseif math.random(1,6) == 3 then --2/2
  122.     tpt.parts[i].type = tpt.el.grvt.id
  123.     sim.pressure(x/4,y/4,75)
  124.     tpt.set_property("temp", math.huge, x, y)
  125.    elseif math.random(1,3) == 3 then --2/1
  126.     tpt.parts[i].type = tpt.el.brmt.id
  127.     sim.pressure(x/4,y/4,75)
  128.     tpt.set_property("temp", math.huge, x ,y)
  129.     end --2
  130.    end --1
  131.   if sim.pressure(x/4,y/4) > 1 then --3
  132.    if math.random(1,250) == 10 then --4
  133.     tpt.create(x + math.random(-2,2), y + math.random(-2,2), 'prot')
  134.     end --3
  135.    end --4
  136.   end --*1
  137.  tpt.element_func(pentium,pent)
  138.  function neutron(i,x,y,s,n) --*2
  139.   if tpt.get_property("type", x + math.random(-2,2), y + math.random(-2,2)) == pent then --1
  140.    if math.random(1,30) == 10 then --2
  141.     tpt.create(x + math.random(-2,2), y + math.random(-2,2), 'prot')
  142.     end --2
  143.    end --1
  144.   end --*2
  145.  tpt.element_func(neutron,tpt.el.prot.id)
  146.  
  147. local phcl = elements.allocate("RADM" , "PHCL")
  148.  elements.element(phcl, elements.element(elements.DEFAULT_PT_BOYL))
  149.  elements.property(phcl, "Name" , "PHCL")
  150.  elements.property(phcl, "Description" , "Photon cloud. reacts with Phot and expands.")
  151.  elements.property(phcl, "Color", 0xFFF6F6)
  152.  elements.property(phcl, "MenuSection", 10)
  153.  function photcl(i,x,y,s,n) --*1
  154.   if tpt.get_property("type", x + math.random(-2,2), y + math.random(-2,2)) == tpt.el.phot.id then --1
  155.    if math.random(1,3) == 1 then --2/3
  156.     tpt.parts[i].type = tpt.el.phot.id
  157.     sim.pressure(x/4,y/4,75)
  158.     tpt.set_property("temp", math.huge, x, y)
  159.    elseif math.random(1,6) == 3 then --2/2
  160.     tpt.parts[i].type = tpt.el.phot.id
  161.     sim.pressure(x/4,y/4,75)
  162.     tpt.set_property("temp", math.huge, x, y)
  163.    elseif math.random(1,3) == 3 then --2/1
  164.     tpt.parts[i].type = tpt.el.phot.id
  165.     sim.pressure(x/4,y/4,75)
  166.     tpt.set_property("temp", math.huge, x ,y)
  167.     end --2
  168.    end --1
  169.   if sim.pressure(x/4,y/4) > 0.4 then --3
  170.    if math.random(1,250) == 10 then --4
  171.     tpt.create(x + math.random(-2,2), y + math.random(-2,2), 'phot')
  172.     end --4
  173.    end --3
  174.   end --*1
  175.  tpt.element_func(photcl,phcl)
  176.  function neutron(i,x,y,s,n)
  177.   if tpt.get_property("type", x + math.random(-2,2), y + math.random(-2,2)) == phcl then --1
  178.    if math.random(1,30) == 10 then --2
  179.    tpt.create(x + math.random(-2,2), y + math.random(-1,1), 'phot')
  180.    end --2
  181.   end --1
  182.  end --*1
  183.  tpt.element_func(neutron,tpt.el.phot.id)
  184.  
  185. local ogan = elements.allocate("RADM" , "OGAN")
  186.  elements.element(ogan, elements.element(elements.DEFAULT_PT_URAN))
  187.  elements.property(ogan, "Name" , "OGAN")
  188.  elements.property(ogan, "Description" , "Oganesson, very heavy and reactive.")
  189.  elements.property(ogan, "Color", 0x063521)
  190.  elements.property(ogan, "MenuSection", 10)
  191.  function oganesson(i,x,y,s,n)
  192.   if tpt.get_property("type", x + math.random(-2,2), y + math.random(-2,2)) == tpt.el.neut.id then --1
  193.    if math.random(1,3) == 1 then --2/3
  194.     tpt.parts[i].type = tpt.el.neut.id
  195.     sim.pressure(x/4,y/4,75)
  196.     tpt.set_property("temp", math.huge, x, y)
  197.    elseif math.random(1,6) == 3 then --2/2
  198.     tpt.parts[i].type = tpt.el.plut.id
  199.     sim.pressure(x/4,y/4,75)
  200.     tpt.set_property("temp", math.huge, x, y)
  201.    elseif math.random(1,3) == 3 then --2/1
  202.     tpt.parts[i].type = tpt.el.uran.id
  203.     sim.pressure(x/4,y/4,75)
  204.     tpt.set_property("temp", math.huge, x ,y)
  205.     end --2
  206.    end --1
  207.   if sim.pressure(x/4,y/4) > 1 then --3
  208.    if math.random(1,250) == 10 then --4
  209.     tpt.create(x + math.random(-2,2), y + math.random(-2,2), 'neut')
  210.     end --4
  211.    end --3
  212.   if math.random(1,10000) == 10 then --5
  213.    tpt.set_property("temp", math.huge, x ,y)
  214.    tpt.create(x + math.random(-2,2), y + math.random(-2,2), 'uran') --4
  215.    tpt.create(x + math.random(-2,2), y + math.random(-2,2), 'stne') --4
  216.    tpt.create(x + math.random(-2,2), y + math.random(-2,2), 'plut') --4
  217.    sim.pressure(x/4,y/4,0.1)
  218.    end --5
  219.   end --*1
  220.  tpt.element_func(oganesson,ogan)
  221.   function neutron(i,x,y,s,n) --*2
  222.    if tpt.get_property("type", x + math.random(-2,2), y + math.random(-2,2)) == ogan then --1
  223.     if math.random(1,30) == 10 then --2
  224.      tpt.create(x + math.random(-2,2), y + math.random(-2,2), 'neut')
  225.      end --2
  226.     end --1
  227.    end --*2
  228.  tpt.element_func(neutron,tpt.el.neut.id)
  229.  
  230. local fral = elements.allocate("RADM" , "FRAL")
  231.  elements.element(fral, elements.element(elements.DEFAULT_PT_IRON))
  232.  elements.property(fral, "Name" , "FRAL")
  233.  elements.property(fral, "Description" , "Fralium, reactive to electricity.")
  234.  elements.property(fral, "Color", 0x9EAFA0)
  235.  function fralium(i,x,y,s,n)
  236.   if tpt.get_property("type", x + math.random(-2,2), y + math.random(-2,2)) == tpt.el.sprk.id then
  237.    if math.random(1,3) == 1 then
  238.     tpt.parts[i].type = tpt.el.elec.id
  239.     sim.pressure(x/4,y/4,0.01)
  240.    elseif math.random(1,6) == 3 then
  241.     tpt.parts[i].type = tpt.el.brmt.id
  242.     sim.pressure(x/4,y/4,0.01)
  243.    elseif math.random(1,3) == 3 then
  244.     tpt.parts[i].type = tpt.el.pscn.id
  245.     tpt.create(x + math.random(-2,2), y + math.random(-2,2), 'elec')
  246.     end
  247.    end
  248.   end
  249.   tpt.element_func(fralium,fral)
  250.   function emit(i,x,y,s,n)
  251.    if tpt.get_property("type", x + math.random(-2,2), y + math.random(-2,2)) == fral then
  252.   if math.random(1,30) == 10 then
  253.   tpt.create(x + math.random(-2,2), y + math.random(-2,2), 'elec')
  254.  end
  255.  end
  256.  end
  257.  tpt.element_func(emit,tpt.el.elec.id)
  258.  
  259. local rcfl = elements.allocate("RADM" , "RCFL")
  260.  elements.element(rcfl, elements.element(elements.DEFAULT_PT_GEL))
  261.  elements.property(rcfl, "Name" , "RCFL")
  262.  elements.property(rcfl, "Description" , "Reactor Fluid, used for reactors, reactive.")
  263.  elements.property(rcfl, "Color", 0xD289FF)
  264.  elements.property(rcfl, "MenuSection", 10)
  265.  function plutonium(i,x,y,s,n)
  266.   if tpt.get_property("type", x + math.random(-2,2), y + math.random(-2,2)) == tpt.el.neut.id then --1
  267.    if math.random(1,3) == 1 then --2/3
  268.     tpt.parts[i].type = tpt.el.neut.id
  269.     sim.pressure(x/4,y/4,75)
  270.     tpt.set_property("temp", math.huge, x, y)
  271.    elseif math.random(1,6) == 3 then --2/2
  272.     tpt.parts[i].type = tpt.el.neut.id
  273.     sim.pressure(x/4,y/4,75)
  274.     tpt.set_property("temp", math.huge, x, y)
  275.    elseif math.random(1,3) == 3 then --2/1
  276.     tpt.parts[i].type = tpt.el.grvt.id
  277.     sim.pressure(x/4,y/4,-2)
  278.     tpt.set_property("temp", math.huge, x ,y)
  279.     end
  280.    end
  281.   if sim.pressure(x/4,y/4) > 1 then
  282.    if math.random(1,250) == 10 then
  283.     tpt.create(x + math.random(-2,2), y + math.random(-2,2), 'neut')
  284.     end
  285.    end
  286.   end
  287.  tpt.element_func(plutonium,rcfl)
  288.  function neutron(i,x,y,s,n)
  289.  if tpt.get_property("type", x + math.random(-2,2), y + math.random(-2,2)) == rcfl then
  290.  if math.random(1,30) == 10 then
  291.  tpt.create(x + math.random(-2,2), y + math.random(-2,2), 'neut')
  292.  end
  293.  end
  294.  end
  295.  tpt.element_func(neutron,tpt.el.neut.id)
  296.  
  297. local niho = elements.allocate("RADM" , "NIHO")
  298. elements.element(niho, elements.element(elements.DEFAULT_PT_GOLD))
  299. elements.property(niho, "Name" , "NIHO")
  300. elements.property(niho, "Description" , "Nihonium, very explosive and reactive.")
  301. elements.property(niho, "Color", 0x2B4D9B)
  302. elements.property(niho, "MenuSection", 10)
  303. function nihonium(i,x,y,s,n) --*1
  304.  if tpt.get_property("type", x + math.random(-2,2), y + math.random(-2,2)) == tpt.el.neut.id then --1
  305.   if math.random(1,3) == 1 then --2/3
  306.    tpt.parts[i].type = tpt.el.neut.id
  307.    sim.pressure(x/4,y/4,75)
  308.    tpt.set_property("temp", math.huge, x, y)
  309.   elseif math.random(1,6) == 3 then --2/2
  310.    tpt.parts[i].type = tpt.el.plut.id
  311.    sim.pressure(x/4,y/4,75)
  312.    tpt.set_property("temp", math.huge, x, y)
  313.   elseif math.random(1,3) == 3 then --2/1
  314.    tpt.parts[i].type = tpt.el.uran.id
  315.    sim.pressure(x/4,y/4,75)
  316.    tpt.set_property("temp", math.huge, x ,y)
  317.    end --2
  318.   end --1
  319.   if sim.pressure(x/4,y/4) > 1 then --3
  320.    if math.random(1,250) == 10 then --4
  321.     tpt.create(x + math.random(-2,2), y + math.random(-2,2), 'neut')
  322.     end --4
  323.    end --3
  324.   end --*1
  325.  tpt.element_func(nihonium,niho)
  326.  function neutron(i,x,y,s,n) --*2
  327.    if tpt.get_property("type", x + math.random(-2,2), y + math.random(-2,2)) == niho then --1
  328.     if math.random(1,30) == 10 then  --2
  329.      tpt.create(x + math.random(-2,2), y + math.random(-2,2), 'neut')
  330.      end --2
  331.     end --1
  332.    end--*2
  333.  tpt.element_func(neutron,tpt.el.neut.id)
  334.  
  335. local rope = elements.allocate("RADM", "ROPE")
  336.  elements.element(rope, elements.element(elements.DEFAULT_PT_COAL))
  337.  elements.property(rope, "Name" , "ROPE")
  338.  elements.property(rope, "Description" , "Rope, flammable.")
  339.  elements.property(rope, "Flammable", 16)
  340.  elements.property(rope, "Color", 0xA58A66)
  341.  
  342. local mthn = elements.allocate("RADM", "MTHN")
  343.  elements.element(mthn, elements.element(elements.DEFAULT_PT_CO2))
  344.  elements.property(mthn, "Name" , "MTHN")
  345.  elements.property(mthn, "Description" , "Methane, flammable.")
  346.  elements.property(mthn, "Flammable", 2.55)
  347.  elements.property(mthn, "Color", 0x000A23)
  348.  elements.property(mthn, "Temperature", 366.8)
  349.  elements.property(mthn, "MenuSection", 5)
  350.  elements.property(mthn, "HighPressure", 1.32)
  351.  elements.property(mthn, "HighPressureTransition", elements.RADM_PT_PRPN)
  352.  
  353. local al26 = elements.allocate("RADM" , "AL26")
  354.  elements.element(al26, elements.element(elements.DEFAULT_PT_PLUT))
  355.  elements.property(al26, "Name" , "AL26")
  356.  elements.property(al26, "Description" , "Aluminium 26, very reactive.")
  357.  elements.property(al26, "Color", 0x727272)
  358.  elements.property(al26, "MenuSection", 10)
  359.  function aluminium(i,x,y,s,n) --*1
  360.   if tpt.get_property("type", x + math.random(-2,2), y + math.random(-2,2)) == tpt.el.neut.id then --1
  361.    if math.random(1,3) == 1 then --2/3
  362.     tpt.parts[i].type = tpt.el.brmt.id
  363.     sim.pressure(x/4,y/4,75)
  364.     tpt.set_property("temp", math.huge, x, y)
  365.    elseif math.random(1,6) == 3 then --2/2
  366.     tpt.parts[i].type = tpt.el.grvt.id
  367.     sim.pressure(x/4,y/4,75)
  368.     tpt.set_property("temp", math.huge, x, y)
  369.    elseif math.random(1,3) == 3 then --2/1
  370.     tpt.parts[i].type = tpt.el.phot.id
  371.     sim.pressure(x/4,y/4,75)
  372.     tpt.set_property("temp", math.huge, x ,y)
  373.     end
  374.    end
  375.   if sim.pressure(x/4,y/4) > 1 then --3
  376.    if math.random(1,250) == 10 then --4
  377.     tpt.create(x + math.random(-2,2), y + math.random(-2,2), 'neut')
  378.     end --4
  379.    end --3
  380.   end --*1
  381.  tpt.element_func(aluminium,al26)
  382.  function neutron(i,x,y,s,n) --*2
  383.   if tpt.get_property("type", x + math.random(-2,2), y + math.random(-2,2)) == al26 then --1
  384.    if math.random(1,30) == 10 then --2
  385.     tpt.create(x + math.random(-2,2), y + math.random(-2,2), 'neut')
  386.     end --2
  387.    end --1
  388.   end --*2
  389.  tpt.element_func(neutron,tpt.el.neut.id)
  390.  
  391. local ptol = elements.allocate("RADM", "PTOL")
  392.  elements.element(ptol, elements.element(elements.DEFAULT_PT_SOAP))
  393.  elements.property(ptol, "Name" , "PTOL")
  394.  elements.property(ptol, "Description" , "Petrol, flammable, burns slow.")
  395.  elements.property(ptol, "Flammable", 18.55)
  396.  elements.property(ptol, "Color", 0x1A3000)
  397.  elements.property(ptol, "Temperature", 293.4)
  398.  elements.property(ptol, "MenuSection", 5)
  399.  elements.property(ptol, "LowPressure", -1.45)
  400.  elements.property(ptol, "LowPressureTransition", elements.RADM_PT_MTHN)
  401.  
  402. local blpd = elements.allocate("RADM" , "BLPD")
  403.  elements.element(blpd, elements.element(elements.DEFAULT_PT_GUN))
  404.  elements.property(blpd, "Name" , "BLPD")
  405.  elements.property(blpd, "Description" , "Black Powder, flammable, burns fast.")
  406.  elements.property(blpd, "Color", 0x2D2B33)
  407.  elements.property(blpd, "MenuSection", 5)
  408.  function burn(i,x,y,s,n)
  409.  if tpt.get_property("type", x + math.random(-2,2), y + math.random(-2,2)) == tpt.el.fire.id then
  410.   if math.random(1,3) == 1 then --2/3
  411.    tpt.parts[i].type = tpt.el.embr.id
  412.    sim.pressure(x/4,y/4,75)
  413.    tpt.set_property("temp", math.huge, x, y)
  414.   elseif math.random(1,6) == 3 then --2/2
  415.    tpt.parts[i].type = tpt.el.fire.id
  416.    sim.pressure(x/4,y/4,75)
  417.    tpt.set_property("temp", math.huge, x, y)
  418.   elseif math.random(1,3) == 3 then --2/1
  419.    tpt.parts[i].type = tpt.el.smke.id
  420.    sim.pressure(x/4,y/4,0.01)
  421.     tpt.set_property("temp", math.huge, x ,y)
  422.    end --2
  423.   end --1
  424.  end --*1
  425.  tpt.element_func(burn,blpd)
  426.  function sparkle(i,x,y,s,n)
  427.   if tpt.get_property("type", x + math.random(-2,2), y + math.random(-2,2)) == blpd then --1
  428.    if math.random(1,30) == 10 then --2
  429.     tpt.create(x + math.random(-2,2), y + math.random(-1,1), 'embr')
  430.     end --2
  431.    end --1
  432.   end --*2
  433.  tpt.element_func(sparkle,tpt.el.fire.id)
  434.  
  435. local gsol = elements.allocate("RADM", "GSOL")
  436.  elements.element(gsol, elements.element(elements.DEFAULT_PT_SOAP))
  437.  elements.property(gsol, "Name" , "GSOL")
  438.  elements.property(gsol, "Description" , "Gasoline, flammable, burns fast.")
  439.  elements.property(gsol, "Flammable", 68.73)
  440.  elements.property(gsol, "Color", 0xFF8F2D)
  441.  elements.property(gsol, "Temperature", 314.65)
  442.  elements.property(gsol, "MenuSection", 5)
  443.  elements.property(gsol, "LowPressure", -0.43)
  444.  elements.property(gsol, "LowPressureTransition", elements.RADM_PT_PTOL)
  445.  
  446. local prpn = elements.allocate("RADM", "PRPN")
  447.  elements.element(prpn, elements.element(elements.DEFAULT_PT_HYGN))
  448.  elements.property(prpn, "Name" , "PRPN")
  449.  elements.property(prpn, "Description" , "Propane, highly flammable gas.")
  450.  elements.property(prpn, "Flammable", 5.55)
  451.  elements.property(prpn, "Color", 0x820000)
  452.  elements.property(prpn, "Temperature", 366.8)
  453.  elements.property(prpn, "MenuSection", 5)
  454.  elements.property(prpn, "HighPressure", 1.32)
  455.  elements.property(prpn, "HighPressureTransition", elements.RADM_PT_GSOL)
  456.  elements.property(prpn, "Diffusion", 1.03)
  457.  
  458. local lhyg = elements.allocate("RADM", "LHYG")
  459.  elements.element(lhyg, elements.element(elements.DEFAULT_PT_LOXY))
  460.  elements.property(lhyg, "Name" , "LHYG")
  461.  elements.property(lhyg, "Description" , "Liquid Hydrogen, very cold, makes water with liquid oxygen when burnt. Superfluid.")
  462.  elements.property(lhyg, "Flammable", 23.65)
  463.  elements.property(lhyg, "Color", 0x75ABE5)
  464.  elements.property(lhyg, "Temperature", 14.15)
  465.  elements.property(lhyg, "MenuSection", 7)
  466.  elements.property(lhyg, "Diffusion", 0.1)
  467.  elements.property(lhyg, "HighTemperature", 18.15)
  468.  elements.property(lhyg, "HighTemperatureTransition", elements.DEFAULT_PT_HYGN)
  469.  elements.property(elem.RADM_PT_LHYG, "Update", --*1
  470.  function(i,x,y,s,nt) --1
  471.   superfluid(i,x,y,s,nt,0.5,4,3)
  472.   end --1
  473.   ) --*1
  474.  
  475. local shxf = elements.allocate("RADM", "SHXF")
  476.  elements.element(shxf, elem.element(elem.DEFAULT_PT_HYGN))
  477.  elements.property(shxf, "Name", "SHXF")
  478.  elements.property(shxf, "Description", "Sulfur Hexaflouride, extremely heavy gas")
  479.  elements.property(shxf, "Color", 0xC6B02F)
  480.  elements.property(shxf, "Weight", 140.99)
  481.  elements.property(shxf, "Gravity", 0.9)
  482.  elements.property(shxf, "Diffusion", 0.45)
  483.  elements.property(shxf, "Falldown", 2)
  484.  
  485. local detr = elements.allocate("RADM" , "DETR")
  486.  elements.element(detr, elements.element(elements.DEFAULT_PT_HYGN))
  487.  elements.property(detr, "Name" , "DETR")
  488.  elements.property(detr, "Description" , "Deuterium, reacts with neutrons. Rarely decays.")
  489.  elements.property(detr, "Color", 0xB2FFB6)
  490.  elements.property(detr, "MenuSection", 10)
  491.  function detrDecay(i,x,y,s,n)
  492.   if tpt.get_property("type", x + math.random(-1,1), y + math.random(-1,1)) == tpt.el.neut.id then --1
  493.    if math.random(1,3) == 1 then --2/3
  494.     tpt.parts[i].type = tpt.el.neut.id
  495.     sim.pressure(x/4,y/4,75)
  496.     tpt.set_property("temp", math.huge, x, y)
  497.    elseif math.random(1,6) == 3 then --2/2
  498.     tpt.parts[i].type = tpt.el.neut.id
  499.     sim.pressure(x/4,y/4,75)
  500.     tpt.set_property("temp", math.huge, x, y)
  501.    elseif math.random(1,3) == 3 then --2/3
  502.     tpt.parts[i].type = tpt.el.trit
  503.     sim.pressure(x/4,y/4,35)
  504.     tpt.set_property("temp", math.huge, x ,y)
  505.     end --2
  506.    end --1
  507.   if math.random(1,64000) == 10 then --3
  508.    tpt.create(x + math.random(-2,2), y + math.random(-2,2), 'hygn')
  509.    end --3
  510.   if math.random(1,65990) == 100 then --4
  511.    tpt.create(x + math.random(-2,2), y + math.random(-2,2), 'neut')
  512.    end --4
  513.   end --*1
  514.  function neutron(i,x,y,s,n) --*2
  515.   if tpt.get_property("type", x + math.random(-2,2), y + math.random(-2,2)) == detr then --1
  516.    if math.random(1,30) == 10 then --2
  517.     tpt.create(x + math.random(-2,2), y + math.random(-1,1), 'neut')
  518.     end --2
  519.    end --1
  520.   end --*2
  521.  tpt.element_func(neutron,tpt.el.neut.id)
  522.  function oxidize(i,x,y,s,n) --*3
  523.   if tpt.get_property("type", x + math.random(-1,1), y + math.random(-1,1)) == tpt.el.oxyg.id then --1
  524.    tpt.parts[i].type = tpt.el.deut.id
  525.    end --1
  526.   end --*3
  527.  function detrUpdate(i,x,y,s,n) --*4
  528.   detrDecay(i,x,y,s,n)
  529.   oxidize(i,x,y,s,n)
  530.   end --*4
  531.  tpt.element_func(detrUpdate,detr)
  532.  
  533. local emrp = elements.allocate("RADM" , "EMRP")
  534.  elements.element(emrp, elements.element(elements.DEFAULT_PT_PLUT))
  535.  elements.property(emrp, "Name" , "EMRP")
  536.  elements.property(emrp, "Description" , "Emerald powder, lets neut pass.")
  537.  elements.property(emrp, "Color", 0xFAFAFA)
  538.  elements.property(emrp, "MenuSection", 8)
  539.  
  540. local emer = elements.allocate("RADM" , "EMER")
  541.  elements.element(emer, elements.element(elements.DEFAULT_PT_GOLD))
  542.  elements.property(emer, "Name" , "EMER")
  543.  elements.property(emer, "Description" , "Emerald, turns into emerald powder at high temperatures")
  544.  elements.property(emer, "Color", 0xFAFAFA)
  545.  elements.property(emer, "MenuSection", 9)
  546.  elements.property(emer, "HighTemperature", 1900)
  547.  elements.property(emer, "HighTemperatureTransition", elements.RADM_PT_EMRP)
  548.  
  549. local ethn = elements.allocate("RADM", "ETHN")
  550. elements.element(ethn, elements.element(elements.DEFAULT_PT_HYGN))
  551. elements.property(ethn, "Name" , "ETHN")
  552. elements.property(ethn, "Description" , "Ethane, flammable gas.")
  553. elements.property(ethn, "Flammable", 157.55)
  554. elements.property(ethn, "Color", 0x89FFE3)
  555. elements.property(ethn, "Temperature", 366.8)
  556. elements.property(ethn, "MenuSection", 5)
  557. elements.property(ethn, "LowPressure", -1.07)
  558. elements.property(ethn, "LowPressureTransition", elements.RADM_PT_PRPN)
  559. elements.property(ethn, "Diffusion", 1.03)
  560.  
  561. local btan = elements.allocate("RADM", "BTAN")
  562. elements.element(btan, elements.element(elements.DEFAULT_PT_HYGN))
  563. elements.property(btan, "Name" , "BTAN")
  564. elements.property(btan, "Description" , "Butane, flammable gas.")
  565. elements.property(btan, "Flammable", 89.55)
  566. elements.property(btan, "Color", 0xD3A50C)
  567. elements.property(btan, "Temperature", 366.8)
  568. elements.property(btan, "MenuSection", 5)
  569. elements.property(btan, "HighPressure", 1.07)
  570. elements.property(btan, "HighPressureTransition", elements.RADM_PT_ETHN)
  571. elements.property(btan, "Diffusion", 1.50)
  572.  
  573. local lith = elements.allocate("RADM", "LITH")
  574. elements.element(lith, elements.element(elements.DEFAULT_PT_METL))
  575. elements.property(lith, "Name" , "LITH")
  576. elements.property(lith, "Description" , "Lithium, alkali metal. Reactive to water.")
  577. elements.property(lith, "Flammable", 0.95)
  578. elements.property(lith, "Color", 0xC4C0E5)
  579. elements.property(lith, "Temperature", 337.8)
  580. elements.property(lith, "MenuSection", 1)
  581. elements.property(lith, "HighPressure", 1.07)
  582. elements.property(lith, "HighPressureTransition", elements.RADM_PT_FIRE)
  583.  elements.property(elem.RADM_PT_LITH, "Update", --*1
  584.  function(i,x,y,s,nt) --1
  585.   if s ~=8 and nt ~= 0 and nt - s > 0 then --2
  586.    for r in sim.neighbors(x,y,1,1) do --3
  587.     if sim.partProperty(r, "type") == elements.DEFAULT_PT_WATR then --4
  588.      if math.random(1,64) == 4 then --5
  589.       sim.partProperty(r, "type", elements.DEFAULT_PT_FIRE)
  590.       if math.random(1,6) == 3 then --6
  591.        sim.pressure(x/4,y/4,1)
  592.        sim.partProperty(i, "temp", 956.42)
  593.        if math.random(1,2) == 2 then --7
  594.         tpt.delete(i)
  595.         end --7
  596.        end --6
  597.       end --5
  598.      end --4
  599.     end --3
  600.    end --2
  601.   end --1
  602.   ) --*1
  603.  
  604. local lhlm = elements.allocate("RADM", "LHLM")
  605.  elements.element(lhlm, elements.element(elements.DEFAULT_PT_SOAP))
  606.  elements.property(lhlm, "Name" , "LHLM")
  607.  elements.property(lhlm, "Description" , "Liquid helium, extremely cold, superfluid.")
  608.  elements.property(lhlm, "Color", 0xDCCCE8)
  609.  elements.property(lhlm, "Temperature", 1.10)
  610.  elements.property(lhlm, "MenuSection", 7)
  611.  elements.property(lhlm, "Diffusion", 0.1)
  612.  elements.property(lhlm, "Falldown", 2)
  613.  elements.property(lhlm, "AirDrag", 0.01)
  614.  elements.property(lhlm, "Gravity", 0.027)
  615.  elements.property(elem.RADM_PT_LHLM, "Update", --*1
  616.  function(i,x,y,s,nt) --1
  617.   superfluid(i,x,y,s,nt,1,2,2)
  618.   end --1
  619.  ) --*1
  620.  
  621. local hlum = elements.allocate("RADM", "HLUM")
  622. elements.element(hlum, elements.element(elements.DEFAULT_PT_HYGN))
  623. elements.property(hlum, "Name" , "HLUM")
  624. elements.property(hlum, "Description" , "Helium, very light. Turns into liquid helium at low temperatures.")
  625. elements.property(hlum, "Color", 0xFFE0F7)
  626. elements.property(hlum, "Temperature", 90.8)
  627. elements.property(hlum, "MenuSection", 6)
  628. elements.property(hlum, "LowTemperature", 4.13)
  629. elements.property(hlum, "LowTemperatureTransition", elements.RADM_PT_LHLM)
  630. elements.property(hlum, "Diffusion", 0.06)
  631. elements.property(hlum, "Falldown", 2)
  632. elements.property(hlum, "AirDrag", 0.01)
  633. elements.property(hlum, "Gravity", -0.028)
  634.  
  635. elements.property(lhlm, "HighTemperature", 4.16)
  636. elements.property(lhlm, "HighTemperatureTransition", elements.RADM_PT_HLUM)
  637.  
  638. local hexn = elements.allocate("RADM", "HEXN")
  639. elements.element(hexn, elements.element(elements.DEFAULT_PT_SOAP))
  640. elements.property(hexn, "Name" , "HEXN")
  641. elements.property(hexn, "Description" , "Hexane, very flammable.")
  642. elements.property(hexn, "Color", 0xE3F2AB)
  643. elements.property(hexn, "Temperature", 134.8)
  644. elements.property(hexn, "MenuSection", 5)
  645. elements.property(hexn, "Flammable", 20.55)
  646. elements.property(hexn, "LowPressure", -2.43)
  647. elements.property(hexn, "LowPressureTransition", elements.RADM_PT_BTAN)
  648.  
  649. local muon = elements.allocate("RADM", "MUON")
  650. elements.element(muon, elements.element(elements.DEFAULT_PT_ELEC))
  651. elements.property(muon, "Name" , "MUON")
  652. elements.property(muon, "Description" , "Muons, decay into electrons.")
  653. elements.property(muon, "Color", 0xE1FF00)
  654. function muonDecay(i,x,y,s,n)
  655. if math.random(1,64000) == 10 then
  656. tpt.create(x + math.random(-2,2), y + math.random(-2,2), 'elec')
  657. tpt.delete(i)
  658. end
  659. end
  660. function muonUpdate(i,x,y,s,n)
  661. velocity(i,2,6)
  662. muonDecay(i,x,y,s,n)
  663. end
  664. elements.property(muon,"Update",muonUpdate)
  665.  
  666. local function funcGraphics(i, colr, colg, colb)
  667.     return 1,ren.FIRE_ADD,255,colr,colg,colb,128,250,255,0
  668. end
  669. elements.property(muon, "Graphics", funcGraphics)
  670.  
  671. local tauo = elements.allocate("RADM", "TAUO")
  672. elements.element(tauo, elements.element(elements.DEFAULT_PT_ELEC))
  673. elements.property(tauo, "Name" , "TAUO")
  674. elements.property(tauo, "Description" , "Tauons, decay into muons.")
  675. elements.property(tauo, "Color", 0x8D4CFF)
  676. function tauonDecay(i,x,y,s,n)
  677. if math.random(1,6400) == 10 then
  678. tpt.create(x + math.random(-2,2), y + math.random(-2,2), 'muon')
  679. tpt.delete(i)
  680. end
  681. end
  682. function tauonUpdate(i,x,y,s,n)
  683. velocity(i,2,3)
  684. tauonDecay(i,x,y,s,n)
  685. end
  686. elements.property(tauo,"Update",tauonUpdate)
  687.  
  688. local function funcGraphics(i, colr, colg, colb)
  689.     return 1,ren.FIRE_ADD,255,colr,colg,colb,128,141,76,255
  690. end
  691. elements.property(tauo, "Graphics", funcGraphics)
  692.  
  693. local mlhg = elements.allocate("RADM", "MLHG")
  694.  elements.element(mlhg,elem.element(elem.DEFAULT_PT_GOLD))
  695.  elements.property(mlhg, "Description" , "Metallic hydrogen, explosive. Melts into liquid hydrogen, conductive.")
  696.  elements.property(mlhg,"Name","MLHG")
  697.  elements.property(mlhg, "Temperature", 2.8)
  698.  elements.property(mlhg, "Color", 0x42D7F4)
  699.  elements.property(mlhg, "HighTemperature", 4.13)
  700.  elements.property(mlhg, "HighTemperatureTransition", elements.RADM_PT_LHYG)
  701.  function burn(i,x,y,s,n)
  702.  if tpt.get_property("type", x + math.random(-2,2), y + math.random(-2,2)) == tpt.el.fire.id then
  703.   if math.random(1,3) == 1 then --2/3
  704.    tpt.parts[i].type = tpt.el.embr.id
  705.    sim.pressure(x/4,y/4,75)
  706.    tpt.set_property("temp", math.huge, x, y)
  707.   elseif math.random(1,6) == 3 then --2/2
  708.    tpt.parts[i].type = tpt.el.fire.id
  709.    sim.pressure(x/4,y/4,75)
  710.    tpt.set_property("temp", math.huge, x, y)
  711.   elseif math.random(1,3) == 3 then --2/1
  712.    tpt.parts[i].type = tpt.el.smke.id
  713.    sim.pressure(x/4,y/4,0.01)
  714.     tpt.set_property("temp", math.huge, x ,y)
  715.     end --2
  716.    end --1
  717.   end --*1
  718.  tpt.element_func(burn,mlhg)
  719.  
  720.  elements.property(lhyg, "LowTemperature", 4.00)
  721.  elements.property(lhyg, "LowTemperatureTransition", elements.RADM_PT_MLHG)
  722.  
  723.  elements.property(elements.DEFAULT_PT_HYGN, "LowTemperature", 15.24)
  724.  elements.property(elements.DEFAULT_PT_HYGN, "LowTemperatureTransition", elements.RADM_PT_LHYG)
  725.  
  726. --Beta updates after this
  727.  
  728. local hprx = elements.allocate("RADM", "HPRX")
  729.  elements.element(hprx,elem.element(elem.DEFAULT_PT_SOAP))
  730.  elements.property(hprx, "Name" , "HPRX")
  731.  elements.property(hprx, "Description" , "Hydrogen Peroxide, turns into water and oxygen over time.")
  732.  elements.property(hprx, "Color", 0x54F7E9)
  733.  elements.property(hprx, "Temperature", 334.8)
  734.  elements.property(hprx, "MenuSection", 7)
  735.  elements.property(hprx, "MenuVisible", 1)
  736.  elements.property(hprx, "Diffusion", 0.1)
  737.  elements.property(hprx, "Weight", 15.34)
  738.  elements.property(hprx, "AirDrag", 0.005)
  739.  elements.property(hprx, "AirLoss", 0.99)
  740.  elements.property(hprx, "Falldown", 2)
  741.  elements.property(hprx, "Gravity", 0.10)
  742.  elements.property(elem.RADM_PT_HPRX, "Update",
  743.  function(i,x,y,s,n) --*1
  744.   if math.random(1,64000) == 10 then --1
  745.    sim.partChangeType(i, elements.DEFAULT_PT_WATR)
  746.    end --1
  747.   if math.random(1,64000) == 10 then --2
  748.    sim.partChangeType(i, elements.DEFAULT_PT_OXYG)
  749.    end --2
  750.   end --*1
  751. )
  752.  
  753. local tst = elements.allocate("RADM" , "LFAL")
  754.  elements.property(tst, "Name" , "LFAL")
  755.  elements.property(tst, "Description" , "Useless liquid.")
  756.  elements.property(tst, "Color", 0xFFFFFF)
  757.  elements.property(tst, "MenuVisible", 0)
  758.  elements.property(tst, "Advection", 1)
  759.  elements.property(tst, "Weight", 1)
  760.  elements.property(tst, "AirDrag", 0.01)
  761.  elements.property(tst, "AirLoss", 0.99)
  762.  elements.property(tst, "Hardness", 0)
  763.  elements.property(tst, "Falldown", 2)
  764.  elements.property(tst, "Gravity", 0.07)
  765.  
  766. local test = elements.allocate("RADM" , "DFAL")
  767.  elements.property(test, "Name" , "DFAL")
  768.  elements.property(test, "Description" , "Useless dequantate.")
  769.  elements.property(test, "Color", 0xFFFFFF)
  770.  elements.property(test, "MenuVisible", 0)
  771.  elements.property(test, "Advection", 1)
  772.  elements.property(test, "Diffusion", 1)
  773.  elements.property(test, "Falldown", 0)
  774.  elements.property(test, "Hardness", 0)
  775.  
  776. local fsac = elements.allocate("RADM" , "FSAC")
  777.  elements.element(fsac,elem.element(elem.DEFAULT_PT_SOAP))
  778.  elements.property(fsac, "Name" , "FSAC")
  779.  elements.property(fsac, "Description" , "Fluoro-Sulfuric acid, much more powerful than sulfuric acid.")
  780.  elements.property(fsac, "Color", 0xB6F442)
  781.  elements.property(fsac, "MenuVisible", 1)
  782.  elements.property(fsac, "Gravity", 0.07)
  783.  elements.property(fsac, "Advection", 0.1)
  784.  elements.property(fsac, "Diffusion", 0.1)
  785.  elements.property(fsac, "Hardness", 0)
  786.  elements.property(fsac, "AirDrag", 0.01)
  787.  elements.property(fsac, "AirLoss", 0.99)
  788.  elements.property(fsac, "Falldown", 2)
  789.  elements.property(elem.RADM_PT_FSAC, "Update", --*1
  790.  function(i,x,y,s,nt) --1
  791.   if s ~=8 and nt ~= 0 and nt - s > 0 then --2
  792.    for r in sim.neighbors(x,y,3,3) do --3
  793.     if sim.partProperty(r, "type") ~= elements.DEFAULT_PT_DMND then --4
  794.      if sim.partProperty(r, "type") ~= elements.DEFAULT_PT_ACID then --5
  795.       if math.random(1,128) == 4 then --6
  796.        sim.partKill(r)
  797.        if math.random(1,256) == 1 then --7
  798.         tpt.delete(i)
  799.         end --7
  800.        end --6
  801.       end --5
  802.      end --4
  803.     end --3
  804.    end --2  
  805.   end --1
  806.  ) --*1
  807.  
  808. local ntrg = elements.allocate("RADM", "NTRG")
  809.  elements.element(ntrg,elem.element(elem.DEFAULT_PT_HYGN))
  810.  elements.property(ntrg, "Name" , "NTRG")
  811.  elements.property(ntrg, "Description" , "Nitrogen, condenses into liquid nitrogen, heavy.")
  812.  elements.property(ntrg, "Color", 0x6156D8)
  813.  elements.property(ntrg, "Temperature", 234.8)
  814.  elements.property(ntrg, "MenuSection", 6)
  815.  elements.property(ntrg, "MenuVisible", 1)
  816.  elements.property(ntrg, "Diffusion", 2.80)
  817.  elements.property(ntrg, "Falldown", 2)
  818.  elements.property(ntrg, "LowTemperature", 68.03)
  819.  elements.property(ntrg, "LowTemperatureTransition", elements.DEFAULT_PT_LN2)
  820.  
  821.  elements.property(elements.DEFAULT_PT_LN2, "Color", 0x616FDF)
  822.  elements.property(elements.DEFAULT_PT_LN2, "Name", "LNTG")
  823.  elements.property(elements.DEFAULT_PT_LN2, "HighTemperature", 71.26)
  824.  elements.property(elements.DEFAULT_PT_LN2, "HighTemperatureTransition", elements.RADM_PT_NTRG)
  825.  
  826.  elements.property(elements.DEFAULT_PT_NICE, "Color", 0x7F7FEF)
  827.  elements.property(elements.DEFAULT_PT_NICE, "Name", "FNTG")
  828.  elements.property(elements.DEFAULT_PT_NICE, "Description", "Frozen nitrogen, Very cold, will melt into liquid nitrogen when heated only slightly")
  829.  
  830.  
  831. local drsn = elements.allocate("RADM", "DRSN")
  832.  elements.element(drsn,elem.element(elem.DEFAULT_PT_DUST))
  833.  elements.property(drsn, "Name" , "DRSN")
  834.  elements.property(drsn, "Description" , "Dry snow, formed when dry ice is pressurized.")
  835.  elements.property(drsn, "Color", 0xCCDDEE)
  836.  elements.property(drsn, "Temperature", 173.15)
  837.  elements.property(drsn, "MenuSection", 8)
  838.  elements.property(drsn, "MenuVisible", 1)
  839.  elements.property(drsn, "Weight", 1)
  840.  elements.property(drsn, "AirDrag", 0.006)
  841.  elements.property(drsn, "AirLoss", 0.99)
  842.  elements.property(drsn, "Falldown", 1)
  843.  elements.property(drsn, "Gravity", 0.07)
  844.  elements.property(drsn, "HighTemperature", 195.15)
  845.  elements.property(drsn, "HighTemperatureTransition", elements.DEFAULT_PT_CO2)
  846.  
  847. local ntsn = elements.allocate("RADM", "NTSN")
  848.  elements.element(ntsn,elem.element(elem.DEFAULT_PT_DUST))
  849.  elements.property(ntsn, "Name" , "NTSN")
  850.  elements.property(ntsn, "Description" , "Nitrogen snow, formed when frozen nitrogen is pressurized.")
  851.  elements.property(ntsn, "Color", 0xB989CC)
  852.  elements.property(ntsn, "Temperature", 51.12)
  853.  elements.property(ntsn, "MenuSection", 8)
  854.  elements.property(ntsn, "MenuVisible", 1)
  855.  elements.property(ntsn, "Weight", 1)
  856.  elements.property(ntsn, "AirDrag", 0.006)
  857.  elements.property(ntsn, "AirLoss", 0.99)
  858.  elements.property(ntsn, "Falldown", 1)
  859.  elements.property(ntsn, "Gravity", 0.07)
  860.  elements.property(ntsn, "HighTemperature", 63.10)
  861.  elements.property(ntsn, "HighTemperatureTransition", elements.DEFAULT_PT_LNTG)
  862.  
  863.  elements.property(elements.DEFAULT_PT_DRIC, "Description", "Dry Ice, formed when carbon dioxide is cooled")
  864.  elements.property(elements.DEFAULT_PT_DRIC, "HighPressure", 1.43)
  865.  elements.property(elements.DEFAULT_PT_DRIC, "HighPressureTransition", elements.RADM_PT_DRSN)
  866.  
  867.  elements.property(elements.DEFAULT_PT_NICE, "HighPressure", 1.43)
  868.  elements.property(elements.DEFAULT_PT_NICE, "HighPressureTransition", elements.RADM_PT_NTSN)
  869.  
  870. local hgsn = elements.allocate("RADM", "HGSN")
  871.  elements.element(hgsn,elem.element(elem.DEFAULT_PT_DUST))
  872.  elements.property(hgsn, "Name" , "HGSN")
  873.  elements.property(hgsn, "Description" , "Hydrogen snow, formed when metallic hydrogen is pressurized.")
  874.  elements.property(hgsn, "Color", 0x4FDFFF)
  875.  elements.property(hgsn, "Temperature", 2.8)
  876.  elements.property(hgsn, "MenuSection", 8)
  877.  elements.property(hgsn, "MenuVisible", 1)
  878.  elements.property(hgsn, "Weight", 1)
  879.  elements.property(hgsn, "AirDrag", 0.006)
  880.  elements.property(hgsn, "AirLoss", 0.99)
  881.  elements.property(hgsn, "Falldown", 1)
  882.  elements.property(hgsn, "Gravity", 0.07)
  883.  elements.property(hgsn, "HighTemperature", 4.13)
  884.  elements.property(hgsn, "HighTemperatureTransition", elements.RADM_PT_LHYG)
  885.  
  886.  elements.property(mlhg, "HighPressure", 1.43)
  887.  elements.property(mlhg, "HighPressureTransition", elements.RADM_PT_HGSN)
  888.  
  889. --Alpha updates after this
  890.  
  891. local irfl = elements.allocate("RADM", "IRFL")
  892.  elements.element(irfl,elem.element(elem.DEFAULT_PT_BRMT))
  893.  elements.property(irfl, "Name" , "IRFL")
  894.  elements.property(irfl, "Description" , "Iron filings, heavy & light.")
  895.  elements.property(irfl, "Color", 0x1F1F2A)
  896.  elements.property(irfl, "Temperature", 340.8)
  897.  elements.property(irfl, "MenuSection", 8)
  898.  elements.property(irfl, "MenuVisible", 1)
  899.  elements.property(irfl, "Weight", 99)
  900.  elements.property(irfl, "AirDrag", 0.001)
  901.  elements.property(irfl, "AirLoss", 0.99)
  902.  elements.property(irfl, "Falldown", 1)
  903.  elements.property(irfl, "Gravity", 0.09)
  904.  elements.property(irfl, "Advection", 3.99)
  905.  elements.property(irfl, "HighTemperature", 3954.12)
  906.  elements.property(irfl, "HighTemperatureTransition", elements.DEFAULT_PT_IRON)
  907.  
  908. local grph = elements.allocate("RADM", "GRPH")
  909.  elements.element(grph,elem.element(elem.DEFAULT_PT_METL))
  910.  elements.property(grph, "Name" , "GRPH")
  911.  elements.property(grph, "Description" , "Graphene, extremely durable and heat conductive. Slightly flammable.")
  912.  elements.property(grph, "Color", 0x303036)
  913.  elements.property(grph, "Temperature", 340.8)
  914.  elements.property(grph, "MenuSection", 9)
  915.  elements.property(grph, "MenuVisible", 1)
  916.  elements.property(grph, "Weight", 100)
  917.  elements.property(grph, "HeatConduct", 255)
  918.  elements.property(grph, "Flammable", 0.34)
  919.  
  920. local derg = elements.allocate("RADM", "DERG")
  921.  elements.property(derg, "Name" , "DERG")
  922.  elements.property(derg, "Description" , "Dark energy, expands quickly.")
  923.  elements.property(derg, "Color", 0x1F0C1F)
  924.  elements.property(derg, "Temperature", 340.8)
  925.  elements.property(derg, "MenuSection", 11)
  926.  elements.property(derg, "MenuVisible", 1)
  927.  elements.property(derg, "Advection", 0.31)
  928.  elements.property(derg, "Collision", -0.99)
  929.  elements.property(derg, "HotAir", 0.005)
  930.  
  931. local oxsn = elements.allocate("RADM", "OXSN")
  932.  elements.element(oxsn,elem.element(elem.DEFAULT_PT_DUST))
  933.  elements.property(oxsn, "Name" , "OXSN")
  934.  elements.property(oxsn, "Description" , "Oxygen snow, forms when solid oxygen is pressurized.")
  935.  elements.property(oxsn, "Color", 0x90B0FF)
  936.  elements.property(oxsn, "Temperature", 24.31)
  937.  elements.property(oxsn, "MenuSection", 8)
  938.  elements.property(oxsn, "MenuVisible", 1)
  939.  elements.property(oxsn, "Weight", 1)
  940.  elements.property(oxsn, "AirDrag", 0.006)
  941.  elements.property(oxsn, "AirLoss", 0.99)
  942.  elements.property(oxsn, "Falldown", 1)
  943.  elements.property(oxsn, "Gravity", 0.07)
  944.  elements.property(oxsn, "HighTemperature", 30.15)
  945.  elements.property(oxsn, "HighTemperatureTransition", elements.DEFAULT_PT_LOXY)
  946.  
  947. local soxg = elements.allocate("RADM", "SOXG")
  948.  elements.element(soxg,elem.element(elem.DEFAULT_PT_FILT))
  949.  elements.property(soxg, "Name" , "SOXG")
  950.  elements.property(soxg, "Description" , "Solid oxygen.")
  951.  elements.property(soxg, "HighTemperature", 32.15)
  952.  elements.property(soxg, "Temperature", 19.42)
  953.  elements.property(soxg, "HighTemperatureTransition", elements.DEFAULT_PT_LOXY)
  954.  elements.property(soxg, "Color", 0x9FBFFF)
  955.  elements.property(soxg, "HighPressure", 0.76)
  956.  elements.property(soxg, "HighPressureTransition", elements.RADM_PT_OXSN)
  957.  
  958.  elements.property(elements.DEFAULT_PT_LOXY, "LowTemperature", 31.78)
  959.  elements.property(elements.DEFAULT_PT_LOXY, "LowTemperatureTransition", elements.RADM_PT_SOXG)
  960.  elements.property(elements.DEFAULT_PT_LOXY, "Color", 0x7080DF)
  961.  
  962. local lgli = elements.allocate("RADM", "LGLI")
  963.  elements.element(lgli,elem.element(elem.DEFAULT_PT_MERC))
  964.  elements.property(lgli, "Name" , "LGLI")
  965.  elements.property(lgli, "Description" , "Liquid gallium.")
  966.  elements.property(lgli, "Temperature", 324.51)
  967.  elements.property(lgli, "Color", 0x8F8F8F)
  968.  elements.property(lgli, "Weight", 40)
  969.  elements.property(elem.RADM_PT_LGLI, "Update", --*1
  970.  function(i,x,y,s,nt) --1
  971.   if s ~=8 and nt ~=0 and nt - s > 0 then --2
  972.    for r in sim.neighbors(x,y,1,1) do --3
  973.     if math.random(1,10) > 1 then --4
  974.      sim.partProperty(i, "vy", 0)
  975.      end --4
  976.     if math.random(1,10) > 3 then --5
  977.      sim.partProperty(i, "vx", 0)
  978.      end --5
  979.     end --3
  980.    end --2
  981.   end --1
  982.   ) --*1
  983.  
  984. local gali = elements.allocate("RADM", "GALI")
  985.  elements.element(gali,elem.element(elem.DEFAULT_PT_NSCN))
  986.  elements.property(gali, "Name" , "GALI")
  987.  elements.property(gali, "Description" , "Gallium, melts easily.")
  988.  elements.property(gali, "Temperature", 295.73)
  989.  elements.property(gali, "Color", 0x9F9F9F)
  990.  elements.property(gali, "HighTemperature", 324.51)
  991.  elements.property(gali, "HighTemperatureTransition", elements.RADM_PT_LGLI)
  992.  
  993.  elements.property(lgli, "LowTemperature", 310.52)
  994.  elements.property(lgli, "LowTemperatureTransition", elements.RADM_PT_GALI)
  995.  
  996.  elements.property(elements.DEFAULT_PT_NBLE, "Description", "Neon, turns into plasma when electrified")
  997.  elements.property(elements.DEFAULT_PT_NBLE, "Name", "NEON")
  998.  elements.property(elements.DEFAULT_PT_NBLE, "Color", 0x7FFF00)
  999.  elements.property(elements.DEFAULT_PT_NBLE, "Diffusion", 2.14)
  1000.  elements.property(elements.DEFAULT_PT_NBLE, "HotAir", 0.0004)
  1001.  elements.property(elements.DEFAULT_PT_NBLE, "Gravity", -0.1)
  1002.  
  1003. local lneo = elements.allocate("RADM", "LNEO")
  1004.  elements.element(lneo,elem.element(elem.DEFAULT_PT_MERC))
  1005.  elements.property(lneo, "Name" , "LNEO")
  1006.  elements.property(lneo, "Description" , "Liquid neon, cold and conductive.")
  1007.  elements.property(lneo, "Temperature", 85.47)
  1008.  elements.property(lneo, "Color", 0x70F040)
  1009.  elements.property(lneo, "Weight", 3)
  1010.  elements.property(lneo, "HighTemperature", 132.45)
  1011.  elements.property(lneo, "HighTemperatureTransition", elements.DEFAULT_PT_NBLE)
  1012.  
  1013.  elements.property(elements.DEFAULT_PT_NBLE, "LowTemperature", 103.26)
  1014.  elements.property(elements.DEFAULT_PT_NBLE, "LowTemperatureTransition", elements.RADM_PT_LNEO)
  1015.  
  1016. local ozon = elements.allocate("RADM", "OZON")
  1017.  elements.element(ozon,elem.element(elem.DEFAULT_PT_HYGN))
  1018.  elements.property(ozon, "Description", "Ozone, turns into oxygen when heated by an object.")
  1019.  elements.property(ozon, "Name", "OZON")
  1020.  elements.property(ozon, "Color", 0x3242CD)
  1021.  elements.property(ozon, "Diffusion", 2.14)
  1022.  elements.property(ozon, "HotAir", 0.001)
  1023.  elements.property(ozon, "Gravity", -0.01)
  1024.  elements.property(elem.RADM_PT_OZON, "Update", --*1
  1025.  function(i,x,y,s,nt) --1
  1026.   if s ~=8 and nt ~= 0 and nt - s > 0 then --2
  1027.    for r in sim.neighbors(x,y,1,1) do --3
  1028.     if sim.partProperty(i, "temp") > 900 then --4
  1029.      if math.random(1,128) == 4 then --5
  1030.       sim.partChangeType(i, elements.DEFAULT_PT_OXYG)
  1031.       end --5
  1032.      end --4
  1033.     end --3
  1034.    end --2  
  1035.   end --1
  1036.  ) --*1
  1037.  
  1038. local lozn = elements.allocate("RADM", "LOZN")
  1039.  elements.element(lozn,elem.element(elem.DEFAULT_PT_SOAP))
  1040.  elements.property(lozn, "Name" , "LOZN")
  1041.  elements.property(lozn, "Description" , "Liquid ozone, cold.")
  1042.  elements.property(lozn, "Temperature", 152.34)
  1043.  elements.property(lozn, "Color", 0x0510AB)
  1044.  elements.property(lozn, "Weight", 3)
  1045.  elements.property(lozn, "HighTemperature", 164.52)
  1046.  elements.property(lozn, "HighTemperatureTransition", elements.RADM_PT_OZON)
  1047.  
  1048.  elements.property(ozon, "LowTemperature", 150.34)
  1049.  elements.property(ozon, "LowTemperatureTransition", elements.RADM_PT_LOZN)
  1050.  
  1051.  elements.property(elements.DEFAULT_PT_PLSM, "Diffusion", 1)
  1052.  
  1053. local bsei = elements.allocate("RADM", "BSEI")
  1054.  elements.element(bsei, elements.element(elements.DEFAULT_PT_ELEC))
  1055.  elements.property(bsei, "Name" , "BSEI")
  1056.  elements.property(bsei, "Description" , "Bose einstein condensates, cold.")
  1057.  elements.property(bsei, "Color", 0xCC7CC0)
  1058.  elements.property(bsei, "Diffusion", 0.3)
  1059.  function boseinDecay(i,x,y,s,n) --*1
  1060.   if math.random(1,10) == 10 then --1
  1061.    sim.partProperty(i, "temp", 0)
  1062.    end --1
  1063.   end --*1
  1064.  function boseinUpdate(i,x,y,s,n) --*2
  1065.   velocity(i,2,360)
  1066.   boseinDecay(i,x,y,s,n)
  1067.   end --*2
  1068.  elements.property(bsei,"Update",boseinUpdate)
  1069.  
  1070.  local function funcGraphics(i, colr, colg, colb) --*1
  1071.   return 1,ren.FIRE_ADD,255,colr,colg,colb,192,204,124,192
  1072.   end --*1
  1073.  elements.property(bsei, "Graphics", funcGraphics)
  1074.  
  1075. local cprn = elements.allocate("RADM" , "CPRN")
  1076.  elements.element(cprn, elements.element(elements.DEFAULT_PT_PLUT))
  1077.  elements.property(cprn, "Name" , "CPRN")
  1078.  elements.property(cprn, "Description" , "Copernicium, extremely reactive.")
  1079.  elements.property(cprn, "Color", 0x073140)
  1080.  elements.property(cprn, "Diffusion", 0.25)
  1081.  elements.property(cprn, "MenuSection", 10)
  1082.  function copernicium(i,x,y,s,n)
  1083.   if tpt.get_property("type", x + math.random(-2,2), y + math.random(-2,2)) == tpt.el.neut.id then --1
  1084.    tpt.create(x + math.random(-2,2), y + math.random(-2,2), 'al26')
  1085.    tpt.create(x + math.random(-2,2), y + math.random(-2,2), 'uran')
  1086.    tpt.create(x + math.random(-2,2), y + math.random(-2,2), 'plut')
  1087.    tpt.create(x + math.random(-2,2), y + math.random(-2,2), 'ogan')
  1088.    sim.pressure(x/4,y/4,0.01)
  1089.    tpt.set_property("temp", math.huge, x, y)
  1090.    tpt.parts[i].type = tpt.el.neut.id
  1091.    end --1
  1092.   if sim.pressure(x/4,y/4) > 1 then --3
  1093.    if math.random(1,250) == 10 then --4
  1094.     tpt.create(x + math.random(-2,2), y + math.random(-2,2), 'neut')
  1095.     end --4
  1096.    end --3
  1097.   if math.random(1,10000) == 10 then --5
  1098.    tpt.set_property("temp", math.huge, x ,y)
  1099.    end --5
  1100.   end --*1
  1101.  tpt.element_func(copernicium,cprn)
  1102.   function neutron(i,x,y,s,n) --*2
  1103.    if tpt.get_property("type", x + math.random(-2,2), y + math.random(-2,2)) == neut then --1
  1104.     if math.random(1,30) == 10 then --2
  1105.      tpt.create(x + math.random(-2,2), y + math.random(-2,2), 'neut')
  1106.      end --2
  1107.     end --1
  1108.    end --*2
  1109.  tpt.element_func(neutron,tpt.el.neut.id)
  1110.  
  1111. local ptsi = elements.allocate("RADM", "PTSI")
  1112.  elements.element(ptsi, elements.element(elements.DEFAULT_PT_BRMT))
  1113.  elements.property(ptsi, "Name" , "PTSI")
  1114.  elements.property(ptsi, "Description" , "Potassium, alkali metal. Incredibly reactive to water.")
  1115.  elements.property(ptsi, "Flammable", 10.95)
  1116.  elements.property(ptsi, "Color", 0x09084D)
  1117.  elements.property(ptsi, "Temperature", 337.8)
  1118.  elements.property(ptsi, "MenuSection", 8)
  1119.  elements.property(ptsi, "HighPressure", 1.07)
  1120.  elements.property(ptsi, "HighPressureTransition", elements.RADM_PT_FIRE)
  1121.  elements.property(ptsi, "Gravity", 0.20)
  1122.  elements.property(ptsi, "Weight", 5.13)
  1123.  elements.property(elem.RADM_PT_PTSI, "Update", --*1
  1124.  function(i,x,y,s,nt) --1
  1125.   if s ~=8 and nt ~= 0 and nt - s > 0 then --2
  1126.    for r in sim.neighbors(x,y,1,1) do --3
  1127.     if sim.partProperty(r, "type") == elements.DEFAULT_PT_WATR then --4
  1128.      if math.random(1,16) == 4 then --5
  1129.       sim.partProperty(r, "type", elements.DEFAULT_PT_FIRE)
  1130.       if math.random(1,3) == 3 then --6
  1131.        sim.pressure(x/4,y/4,0.2)
  1132.        sim.partProperty(i, "temp", 978.56)
  1133.        tpt.delete(i)
  1134.        end --6
  1135.       end --5
  1136.      end --4
  1137.     end --3
  1138.    end --2
  1139.   end --1
  1140.   ) --*1
  1141.  
  1142. local bctr = elements.allocate("RADM", "BCTR")
  1143.  elements.element(bctr, elements.element(elements.DEFAULT_PT_SOAP))
  1144.  elements.property(bctr, "Name" , "BCTR")
  1145.  elements.property(bctr, "Description" , "Bacteria, spreads and sticks.")
  1146.  elements.property(bctr, "Color", 0xE0FAA1)
  1147.  elements.property(bctr, "Diffusion", 0.3)
  1148.  elements.property(bctr, "Weight", 30)
  1149.  elements.property(elem.RADM_PT_BCTR, "Update", --*1
  1150.  function(i,x,y,s,nt) --1
  1151.   if s ~=8 and nt ~=0 and nt - s > 0 then --2
  1152.    for r in sim.neighbors(x,y,1,1) do --3
  1153.     if math.random(1,10) > 1 then --4
  1154.      sim.partProperty(i, "vy", 0)
  1155.      end --4
  1156.     if math.random(1,10) > 1 then --5
  1157.      sim.partProperty(i, "vx", 0)
  1158.      end --5
  1159.     if math.random(1,20) < 4 then --6
  1160.      sim.partCreate(-1, math.random(x-1,x+1),math.random(y-1,y+1),elements.RADM_PT_BCTR)
  1161.      end --6
  1162.     if math.random(1,40) < 2 then --7
  1163.      sim.partKill(i)
  1164.      end --7
  1165.     if sim.partProperty(r, "type") == elements.DEFAULT_PT_WOOD then --8
  1166.      if math.random(1,20) < 2 then --9
  1167.       sim.partKill(r)
  1168.       sim.partCreate(-1, math.random(x-1,x+1),math.random(y-1,y+1),elements.RADM_PT_BCTR)
  1169.       sim.partCreate(-1, math.random(x-1,x+1),math.random(y-1,y+1),elements.RADM_PT_BCTR)
  1170.       end --9
  1171.      end --8
  1172.     if sim.partProperty(r, "type") == elements.DEFAULT_PT_PLNT then --10
  1173.      if math.random(1,20) < 2 then --11
  1174.       sim.partKill(r)
  1175.       sim.partCreate(-1, math.random(x-1,x+1),math.random(y-1,y+1),elements.RADM_PT_BCTR)
  1176.       sim.partCreate(-1, math.random(x-1,x+1),math.random(y-1,y+1),elements.RADM_PT_BCTR)
  1177.       end --11
  1178.      end --10
  1179.     end --3
  1180.    end --2
  1181.   end --1
  1182.   ) --*1
  1183.  
  1184. local naoh = elements.allocate("RADM", "NAOH")
  1185.  elements.element(naoh, elements.element(elements.DEFAULT_PT_SOAP))
  1186.  elements.property(naoh, "Name" , "NAOH")
  1187.  elements.property(naoh, "Description", "NaOH aq, makes salt and water with acid.")
  1188.  elements.property(naoh, "Color", 0x2140DF)
  1189.  elements.property(naoh, "Temperature", 337.8)
  1190.  elements.property(naoh, "MenuSection", 7)
  1191.  elements.property(naoh, "HighPressure", 1.07)
  1192.  elements.property(naoh, "HighPressureTransition", elements.RADM_PT_FIRE)
  1193.  elements.property(naoh, "Gravity", 0.20)
  1194.  elements.property(naoh, "Weight", 5.13)
  1195.  elements.property(elem.RADM_PT_NAOH, "Update", --*1
  1196.  function(i,x,y,s,nt) --1
  1197.   if s ~=8 and nt ~= 0 and nt - s > 0 then --2
  1198.    for r in sim.neighbors(x,y,1,1) do --3
  1199.     if sim.partProperty(r, "type") == elements.DEFAULT_PT_ACID then --4
  1200.      if math.random(1,16) == 4 then --5
  1201.       sim.partProperty(r, "type", elements.DEFAULT_PT_SLTW)
  1202.       if math.random(1,4) == 3 then --6
  1203.        tpt.delete(i)
  1204.        end --6
  1205.       end --5
  1206.      end --4
  1207.     end --3
  1208.    end --2
  1209.   end --1
  1210.   ) --*1
  1211.  
  1212. local sdim = elements.allocate("RADM", "SDIM")
  1213. elements.element(sdim, elements.element(elements.DEFAULT_PT_METL))
  1214. elements.property(sdim, "Name" , "SDIM")
  1215. elements.property(sdim, "Description", "Sodium, alkali metal. Very reactive to water.")
  1216. elements.property(sdim, "Flammable", 3.95)
  1217. elements.property(sdim, "Color", 0xDFEFDF)
  1218. elements.property(sdim, "Temperature", 337.8)
  1219. elements.property(sdim, "MenuSection", 1)
  1220. elements.property(sdim, "HighPressure", 1.07)
  1221. elements.property(sdim, "HighPressureTransition", elements.RADM_PT_FIRE)
  1222.  elements.property(elem.RADM_PT_SDIM, "Update", --*1
  1223.  function(i,x,y,s,nt) --1
  1224.   if s ~=8 and nt ~= 0 and nt - s > 0 then --2
  1225.    for r in sim.neighbors(x,y,1,1) do --3
  1226.     if sim.partProperty(r, "type") == elements.DEFAULT_PT_WATR then --4
  1227.      if math.random(1,32) == 4 then --5
  1228.       sim.partProperty(r, "type", elements.DEFAULT_PT_FIRE)
  1229.       sim.partProperty(i, "type", elements.RADM_PT_NAOH)
  1230.       if math.random(1,3) == 3 then --6
  1231.        sim.pressure(x/4,y/4,0.8)
  1232.        sim.partProperty(i, "temp", 956.42)
  1233.        if math.random(1,2) == 2 then --7
  1234.         tpt.delete(i)
  1235.         end --7
  1236.        end --6
  1237.       end --5
  1238.      end --4
  1239.     end --3
  1240.    end --2
  1241.   end --1
  1242.   ) --*1
  1243.  
  1244. local frnc = elements.allocate("RADM", "FRNC")
  1245. elements.element(frnc, elements.element(elements.DEFAULT_PT_METL))
  1246. elements.property(frnc, "Name" , "FRNC")
  1247. elements.property(frnc, "Description", "Francium, alkali metal. Very reactive to water.")
  1248. elements.property(frnc, "Flammable", 42.95)
  1249. elements.property(frnc, "Color", 0xD1842E)
  1250. elements.property(frnc, "Temperature", 337.8)
  1251. elements.property(frnc, "MenuSection", 1)
  1252. elements.property(frnc, "HighPressure", 0.107)
  1253. elements.property(frnc, "HighPressureTransition", elements.RADM_PT_FIRE)
  1254.  elements.property(elem.RADM_PT_FRNC, "Update", --*1
  1255.  function(i,x,y,s,nt) --1
  1256.   if s ~=8 and nt ~= 0 and nt - s > 0 then --2
  1257.    for r in sim.neighbors(x,y,1,1) do --3
  1258.     if sim.partProperty(r, "type") == elements.DEFAULT_PT_WATR then --4
  1259.      if math.random(1,16) == 4 then --5
  1260.       sim.partProperty(r, "type", elements.DEFAULT_PT_FIRE)
  1261.       if math.random(1,2) == 2 then --6
  1262.        sim.pressure(x/4,y/4,0.8)
  1263.        sim.partProperty(i, "temp", 2956.42)
  1264.        if math.random(1,2) == 2 then --7
  1265.         tpt.delete(i)
  1266.         end --7
  1267.        end --6
  1268.       end --5
  1269.      end --4
  1270.     end --3
  1271.    end --2
  1272.   end --1
  1273.   ) --*1
  1274.  
  1275. local ltrt = elements.allocate("RADM", "LTRT")
  1276.  elements.element(ltrt,elem.element(elem.DEFAULT_PT_DEUT))
  1277.  elements.property(ltrt, "Name" , "LTRT")
  1278.  elements.property(ltrt, "Description" , "Liquid tritium, neutrons can pass through it. Superfluid.")
  1279.  elements.property(ltrt, "Temperature", 23.14)
  1280.  elements.property(ltrt, "Color", 0xB3B1CF)
  1281.  elements.property(ltrt, "Weight", 3)
  1282.  elements.property(ltrt, "HighTemperature", 25.43)
  1283.  elements.property(ltrt, "HighTemperatureTransition", elements.RADM_PT_TRIT)
  1284.  elements.property(ltrt, "MenuSection", 7)
  1285.  elements.property(elem.RADM_PT_LTRT, "Update", --*1
  1286.  function(i,x,y,s,nt) --1
  1287.   superfluid(i,x,y,s,nt,0.75,2,3)
  1288.   end --1
  1289.  ) --*1
  1290.  
  1291.  elements.property(trit, "LowTemperature", 21.54)
  1292.  elements.property(trit, "LowTemperatureTransition", elements.RADM_PT_LTRT)
  1293.  
  1294. local glgs = elements.allocate("RADM", "GLGS")
  1295.  elements.element(glgs,elem.element(elem.DEFAULT_PT_HYGN))
  1296.  elements.property(glgs, "Name" , "GLGS")
  1297.  elements.property(glgs, "Description" , "Glow gas, very heat conductive")
  1298.  elements.property(glgs, "HeatConduct", 255)
  1299.  elements.property(glgs, "Diffusion", 2.45)
  1300.  elements.property(glgs, "Color", 0x00FF00)
  1301.  
  1302. local function funcGraphics(i, colr, colg, colb) --*1
  1303.  return 1,ren.FIRE_ADD,255,colr,colg,colb,192,0,255,0
  1304.  end --*1
  1305. elements.property(glgs, "Graphics", funcGraphics)
  1306.  
  1307. local lmun = elements.allocate("RADM", "LMUN")
  1308.  elements.element(lmun,elem.element(elem.DEFAULT_PT_SOAP))
  1309.  elements.property(lmun, "Name" , "LMUN")
  1310.  elements.property(lmun, "Description", "Liquid muonium, extremely light. Superfluid.")
  1311.  elements.property(lmun, "Temperature", 0.91)
  1312.  elements.property(lmun, "Color", 0xCDCD43)
  1313.  elements.property(lmun, "Weight", 3)
  1314.  elements.property(lmun, "MenuSection", 7)
  1315.  elements.property(lmun, "Gravity", 0.04)
  1316.  elements.property(elem.RADM_PT_LMUN, "Update", --*1
  1317.  function(i,x,y,s,nt) --1
  1318.   superfluid(i,x,y,s,nt,1.5,2,3)
  1319.   end --1
  1320.  ) --*1
  1321.  
  1322. local munm = elements.allocate("RADM", "MUNM")
  1323. elements.element(munm, elements.element(elements.DEFAULT_PT_HYGN))
  1324. elements.property(munm, "Name" , "MUNM")
  1325. elements.property(munm, "Description" , "Muonium, extremely light. Turns into liquid muonium at very low temperatures.")
  1326. elements.property(munm, "Color", 0xBCBC32)
  1327. elements.property(munm, "Temperature", 90.8)
  1328. elements.property(munm, "MenuSection", 6)
  1329. elements.property(munm, "LowTemperature", 1.03)
  1330. elements.property(munm, "LowTemperatureTransition", elements.RADM_PT_LMUN)
  1331. elements.property(munm, "Diffusion", 0.12)
  1332. elements.property(munm, "Falldown", 2)
  1333. elements.property(munm, "AirDrag", 0.015)
  1334. elements.property(munm, "Gravity", -0.189)
  1335.  
  1336.  elements.property(lmun, "HighTemperature", 1.43)
  1337.  elements.property(lmun, "HighTemperatureTransition", elements.RADM_PT_MUNM)
  1338.  
  1339. local caes = elements.allocate("RADM", "CAES")
  1340. elements.element(caes, elements.element(elements.DEFAULT_PT_METL))
  1341. elements.property(caes, "Name" , "CAES")
  1342. elements.property(caes, "Description", "Caesium, alkali metal. Extremely reactive to water.")
  1343. elements.property(caes, "Flammable", 3.95)
  1344. elements.property(caes, "Color", 0xACAC8A)
  1345. elements.property(caes, "Temperature", 337.8)
  1346. elements.property(caes, "MenuSection", 1)
  1347. elements.property(caes, "Explosive", 2)
  1348. elements.property(caes, "HighPressure", 1.07)
  1349. elements.property(caes, "HighPressureTransition", elements.RADM_PT_FIRE)
  1350.  elements.property(elem.RADM_PT_CAES, "Update", --*1
  1351.  function(i,x,y,s,nt) --1
  1352.   if s ~=8 and nt ~= 0 and nt - s > 0 then --2
  1353.    for r in sim.neighbors(x,y,1,1) do --3
  1354.     if sim.partProperty(r, "type") == elements.DEFAULT_PT_WATR then --4
  1355.      if math.random(1,32) == 4 then --5
  1356.       sim.partProperty(r, "type", elements.DEFAULT_PT_PLSM)
  1357.       if math.random(1,3) == 3 then --6
  1358.        sim.pressure(x/4,y/4,0.8)
  1359.        sim.partProperty(i, "temp", 9956.42)
  1360.        if math.random(1,2) == 2 then --7
  1361.         tpt.delete(i)
  1362.         end --7
  1363.        end --6
  1364.       end --5
  1365.      end --4
  1366.     end --3
  1367.    end --2
  1368.   end --1
  1369.   ) --*1
  1370.  
  1371.  elements.property(elem.DEFAULT_PT_LOXY, "Description", "Liquid Oxygen. Very cold, slightly superfluid. Reacts with fire")
  1372.  elements.property(elem.DEFAULT_PT_LOXY, "Update", --*1
  1373.  function(i,x,y,s,nt) --1
  1374.   superfluid(i,x,y,s,nt,0.25,8,5)
  1375.   end --1
  1376.  ) --*1
  1377.  
  1378. local slvr = elements.allocate("RADM", "SLVR")
  1379. elements.element(slvr, elements.element(elements.DEFAULT_PT_METL))
  1380. elements.property(slvr, "Name" , "SLVR")
  1381. elements.property(slvr, "Description", "Silver, resists sulfuric acid. Very heat conductive.")
  1382. elements.property(slvr, "Hardness", 0)
  1383. elements.property(slvr, "Color", 0xA8A8A8)
  1384. elements.property(slvr, "Temperature", 337.8)
  1385. elements.property(slvr, "MenuSection", 1)
  1386. elements.property(slvr, "HeatConduct", 255)
  1387.  
  1388. local nept = elements.allocate("RADM" , "NEPT")
  1389.  elements.element(nept, elements.element(elements.DEFAULT_PT_PLUT))
  1390.  elements.property(nept, "Name" , "NEPT")
  1391.  elements.property(nept, "Description" , "Neptunium, very reactive.")
  1392.  elements.property(nept, "Color", 0x557020)
  1393.  elements.property(nept, "MenuSection", 10)
  1394.  function neptunium(i,x,y,s,n)
  1395.   if tpt.get_property("type", x + math.random(-2,2), y + math.random(-2,2)) == tpt.el.neut.id then --1
  1396.    if math.random(1,4) == 1 then --2/2
  1397.     tpt.parts[i].type = elements.DEFAULT_PT_URAN
  1398.    elseif math.random(1,10) == 1 then --2/1
  1399.     tpt.parts[i].type = elements.RADM_PT_HLUM
  1400.     end --2
  1401.    end --1
  1402.   if sim.pressure(x/4,y/4) > 1 then --3
  1403.    if math.random(1,250) == 10 then --4
  1404.     tpt.create(x + math.random(-2,2), y + math.random(-2,2), 'neut')
  1405.     tpt.set_property("temp", math.huge, x ,y)
  1406.     end --4
  1407.    end --3
  1408.   if math.random(1,10000) == 10 then --5
  1409.    sim.pressure(x/4,y/4,0.1)
  1410.    end --5
  1411.   end --*1
  1412.  tpt.element_func(neptunium,nept)
  1413.   function neutron(i,x,y,s,n) --*2
  1414.    if tpt.get_property("type", x + math.random(-2,2), y + math.random(-2,2)) == nept then --1
  1415.     if math.random(1,30) == 10 then --2
  1416.      tpt.create(x + math.random(-2,2), y + math.random(-2,2), 'neut')
  1417.      end --2
  1418.     end --1
  1419.    end --*2
  1420.  tpt.element_func(neutron,tpt.el.neut.id)
  1421.  
  1422. elements.property(elements.DEFAULT_PT_URAN, "Color", 0x385808)
  1423.  
  1424. elements.property(elements.DEFAULT_PT_PLUT, "Color", 0xA87018)
  1425.  
  1426. local lrdn = elements.allocate("RADM", "LRDN")
  1427.  elements.element(lrdn,elem.element(elem.DEFAULT_PT_SOAP))
  1428.  elements.property(lrdn, "Name" , "LRDN")
  1429.  elements.property(lrdn, "Description", "Liquid radon. Superfluid.")
  1430.  elements.property(lrdn, "Temperature", 0.91)
  1431.  elements.property(lrdn, "Color", 0x688830)
  1432.  elements.property(lrdn, "Weight", 3)
  1433.  elements.property(lrdn, "MenuSection", 7)
  1434.  elements.property(lrdn, "Gravity", 0.04)
  1435.  elements.property(elem.RADM_PT_LRDN, "Update", --*1
  1436.  function(i,x,y,s,nt) --1
  1437.   superfluid(i,x,y,s,nt,0.675,4,3)
  1438.   end --1
  1439.  ) --*1
  1440.  
  1441. local radn = elements.allocate("RADM", "RADN")
  1442. elements.element(radn, elements.element(elements.DEFAULT_PT_HYGN))
  1443. elements.property(radn, "Name" , "RADN")
  1444. elements.property(radn, "Description" , "Radon, light gas.")
  1445. elements.property(radn, "Color", 0x789840)
  1446. elements.property(radn, "Temperature", 301.8)
  1447. elements.property(radn, "MenuSection", 6)
  1448. elements.property(radn, "LowTemperature", 211.45)
  1449. elements.property(radn, "LowTemperatureTransition", elements.RADM_PT_LRDN)
  1450. elements.property(radn, "Diffusion", 0.31)
  1451. elements.property(radn, "Falldown", 2)
  1452. elements.property(radn, "AirDrag", 0.005)
  1453. elements.property(radn, "Gravity", -0.11)
  1454.  
  1455.  elements.property(lrdn, "HighTemperature", 213.56)
  1456.  elements.property(lrdn, "HighTemperatureTransition", elements.RADM_PT_RADN)
  1457.  
  1458. local sulf = elements.allocate("RADM", "SULF")
  1459.  elements.element(sulf, elements.element(elements.DEFAULT_PT_DUST))
  1460.  elements.property(sulf, "Name" , "SULF")
  1461.  elements.property(sulf, "Description" , "Sulfur, very flammable.")
  1462.  elements.property(sulf, "Flammable", 40.12)
  1463.  elements.property(sulf, "Color", 0xA59314)
  1464.  elements.property(sulf, "Temperature", 310.2)
  1465.  elements.property(sulf, "MenuSection", 8)
  1466.  elements.property(sulf, "Gravity", 0.10)
  1467.  elements.property(sulf, "Weight", 30.23)
  1468.  elements.property(sulf, "Explosive", 1)
  1469.  
  1470. local torm = elements.allocate("RADM" , "TORM")
  1471.  elements.element(torm, elements.element(elements.DEFAULT_PT_PLUT))
  1472.  elements.property(torm, "Name" , "TORM")
  1473.  elements.property(torm, "Description" , "Thorium, slightly reactive.")
  1474.  elements.property(torm, "Color", 0xA9BBD8)
  1475.  elements.property(torm, "MenuSection", 10)
  1476.  function thorium(i,x,y,s,n) --*1
  1477.   if tpt.get_property("type", x + math.random(-3,3), y + math.random(-3,3)) == tpt.el.neut.id then --1
  1478.    if math.random(1,6) == 1 then --2/2
  1479.     tpt.parts[i].type = elements.DEFAULT_PT_BRMT
  1480.    elseif math.random(1,13) == 1 then --2/1
  1481.     tpt.parts[i].type = elements.RADM_PT_RADN
  1482.     end --2
  1483.    end --1
  1484.   if sim.pressure(x/4,y/4) > 2 then --3
  1485.    if math.random(1,250) == 10 then --4
  1486.     tpt.create(x + math.random(-2,2), y + math.random(-2,2), 'neut')
  1487.     tpt.set_property("temp", math.huge, x ,y)
  1488.     end --4
  1489.    end --3
  1490.   if math.random(1,10000) == 10 then --5
  1491.    sim.pressure(x/4,y/4,0.05)
  1492.    end --5
  1493.   end --*1
  1494.  tpt.element_func(thorium,torm)
  1495.   function neutron(i,x,y,s,n) --*2
  1496.    if tpt.get_property("type", x + math.random(-2,2), y + math.random(-2,2)) == torm then --1
  1497.     if math.random(1,32) == 10 then --2
  1498.      tpt.create(x + math.random(-2,2), y + math.random(-2,2), 'neut')
  1499.      end --2
  1500.     end --1
  1501.    end --*2
  1502.  tpt.element_func(neutron,tpt.el.neut.id)
  1503.  
  1504. local qgp = elements.allocate("RADM", "QGP")
  1505.  elements.element(qgp, elements.element(elements.RADM_PT_HLUM))
  1506.  elements.property(qgp, "Name" , "QPG")
  1507.  elements.property(qgp, "Description" , "Quark-Gluon Plasma, hot.")
  1508.  elements.property(qgp, "Color", 0x10FF88)
  1509.  elements.property(qgp, "Weight", -1)
  1510.  elements.property(qgp, "Collision", -0.99)
  1511.  elements.property(qgp, "Diffusion", 0.3)
  1512.  function qgpHeat(i,x,y,s,n) --*1
  1513.   if math.random(1,50) == 10 then --1
  1514.    sim.partProperty(i, "temp", 9725.85)
  1515.    end --1
  1516.   end --*1
  1517.  function qgpUpdate(i,x,y,s,n) --*2
  1518.   qgpHeat(i,x,y,s,n)
  1519.   end --*2
  1520.  elements.property(qgp,"Update",qgpUpdate)
  1521.  
  1522.  local function funcGraphics(i, colr, colg, colb) --*1
  1523.   return 1,ren.FIRE_ADD,255,colr,colg,colb,192,16,255,136
  1524.   end --*1
  1525.  elements.property(qgp, "Graphics", funcGraphics)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement