Advertisement
Guest User

1.8a Algae!

a guest
Apr 30th, 2017
66
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 65.33 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.  elements.property(elem.RADM_PT_LNEO, "Update", --*1
  1013.  function(i,x,y,s,nt) --1
  1014.   superfluid(i,x,y,s,nt,0.45,3,3)
  1015.   end --1
  1016.  ) --*1
  1017.  
  1018.  
  1019.  elements.property(elements.DEFAULT_PT_NBLE, "LowTemperature", 103.26)
  1020.  elements.property(elements.DEFAULT_PT_NBLE, "LowTemperatureTransition", elements.RADM_PT_LNEO)
  1021.  
  1022. local ozon = elements.allocate("RADM", "OZON")
  1023.  elements.element(ozon,elem.element(elem.DEFAULT_PT_HYGN))
  1024.  elements.property(ozon, "Description", "Ozone, turns into oxygen when heated by an object.")
  1025.  elements.property(ozon, "Name", "OZON")
  1026.  elements.property(ozon, "Color", 0x3242CD)
  1027.  elements.property(ozon, "Diffusion", 2.14)
  1028.  elements.property(ozon, "HotAir", 0.001)
  1029.  elements.property(ozon, "Gravity", -0.01)
  1030.  elements.property(elem.RADM_PT_OZON, "Update", --*1
  1031.  function(i,x,y,s,nt) --1
  1032.   if s ~=8 and nt ~= 0 and nt - s > 0 then --2
  1033.    for r in sim.neighbors(x,y,1,1) do --3
  1034.     if sim.partProperty(i, "temp") > 900 then --4
  1035.      if math.random(1,128) == 4 then --5
  1036.       sim.partChangeType(i, elements.DEFAULT_PT_OXYG)
  1037.       end --5
  1038.      end --4
  1039.     end --3
  1040.    end --2  
  1041.   end --1
  1042.  ) --*1
  1043.  
  1044. local lozn = elements.allocate("RADM", "LOZN")
  1045.  elements.element(lozn,elem.element(elem.DEFAULT_PT_SOAP))
  1046.  elements.property(lozn, "Name" , "LOZN")
  1047.  elements.property(lozn, "Description" , "Liquid ozone, cold.")
  1048.  elements.property(lozn, "Temperature", 152.34)
  1049.  elements.property(lozn, "Color", 0x0510AB)
  1050.  elements.property(lozn, "Weight", 3)
  1051.  elements.property(lozn, "HighTemperature", 164.52)
  1052.  elements.property(lozn, "HighTemperatureTransition", elements.RADM_PT_OZON)
  1053.  elements.property(elem.RADM_PT_LOZN, "Update", --*1
  1054.  function(i,x,y,s,nt) --1
  1055.   superfluid(i,x,y,s,nt,0.333,3,2)
  1056.   end --1
  1057.  ) --*1
  1058.  
  1059.  elements.property(ozon, "LowTemperature", 150.34)
  1060.  elements.property(ozon, "LowTemperatureTransition", elements.RADM_PT_LOZN)
  1061.  
  1062.  elements.property(elements.DEFAULT_PT_PLSM, "Diffusion", 1)
  1063.  
  1064. local bsei = elements.allocate("RADM", "BSEI")
  1065.  elements.element(bsei, elements.element(elements.DEFAULT_PT_ELEC))
  1066.  elements.property(bsei, "Name" , "BSEI")
  1067.  elements.property(bsei, "Description" , "Bose einstein condensates, cold.")
  1068.  elements.property(bsei, "Color", 0xCC7CC0)
  1069.  elements.property(bsei, "Diffusion", 0.3)
  1070.  function boseinDecay(i,x,y,s,n) --*1
  1071.   if math.random(1,10) == 10 then --1
  1072.    sim.partProperty(i, "temp", 0)
  1073.    end --1
  1074.   end --*1
  1075.  function boseinUpdate(i,x,y,s,n) --*2
  1076.   velocity(i,2,360)
  1077.   boseinDecay(i,x,y,s,n)
  1078.   end --*2
  1079.  elements.property(bsei,"Update",boseinUpdate)
  1080.  
  1081.  local function funcGraphics(i, colr, colg, colb) --*1
  1082.   return 1,ren.FIRE_ADD,255,colr,colg,colb,192,204,124,192
  1083.   end --*1
  1084.  elements.property(bsei, "Graphics", funcGraphics)
  1085.  
  1086. local cprn = elements.allocate("RADM" , "CPRN")
  1087.  elements.element(cprn, elements.element(elements.DEFAULT_PT_PLUT))
  1088.  elements.property(cprn, "Name" , "CPRN")
  1089.  elements.property(cprn, "Description" , "Copernicium, extremely reactive.")
  1090.  elements.property(cprn, "Color", 0x073140)
  1091.  elements.property(cprn, "Diffusion", 0.25)
  1092.  elements.property(cprn, "MenuSection", 10)
  1093.  function copernicium(i,x,y,s,n)
  1094.   if tpt.get_property("type", x + math.random(-2,2), y + math.random(-2,2)) == tpt.el.neut.id then --1
  1095.    tpt.create(x + math.random(-2,2), y + math.random(-2,2), 'al26')
  1096.    tpt.create(x + math.random(-2,2), y + math.random(-2,2), 'uran')
  1097.    tpt.create(x + math.random(-2,2), y + math.random(-2,2), 'plut')
  1098.    tpt.create(x + math.random(-2,2), y + math.random(-2,2), 'ogan')
  1099.    sim.pressure(x/4,y/4,0.01)
  1100.    tpt.set_property("temp", math.huge, x, y)
  1101.    tpt.parts[i].type = tpt.el.neut.id
  1102.    end --1
  1103.   if sim.pressure(x/4,y/4) > 1 then --3
  1104.    if math.random(1,250) == 10 then --4
  1105.     tpt.create(x + math.random(-2,2), y + math.random(-2,2), 'neut')
  1106.     end --4
  1107.    end --3
  1108.   if math.random(1,10000) == 10 then --5
  1109.    tpt.set_property("temp", math.huge, x ,y)
  1110.    end --5
  1111.   end --*1
  1112.  tpt.element_func(copernicium,cprn)
  1113.   function neutron(i,x,y,s,n) --*2
  1114.    if tpt.get_property("type", x + math.random(-2,2), y + math.random(-2,2)) == neut then --1
  1115.     if math.random(1,30) == 10 then --2
  1116.      tpt.create(x + math.random(-2,2), y + math.random(-2,2), 'neut')
  1117.      end --2
  1118.     end --1
  1119.    end --*2
  1120.  tpt.element_func(neutron,tpt.el.neut.id)
  1121.  
  1122. local ptsi = elements.allocate("RADM", "PTSI")
  1123.  elements.element(ptsi, elements.element(elements.DEFAULT_PT_BRMT))
  1124.  elements.property(ptsi, "Name" , "PTSI")
  1125.  elements.property(ptsi, "Description" , "Potassium, alkali metal. Incredibly reactive to water.")
  1126.  elements.property(ptsi, "Flammable", 10.95)
  1127.  elements.property(ptsi, "Color", 0x09084D)
  1128.  elements.property(ptsi, "Temperature", 337.8)
  1129.  elements.property(ptsi, "MenuSection", 8)
  1130.  elements.property(ptsi, "HighPressure", 1.07)
  1131.  elements.property(ptsi, "HighPressureTransition", elements.RADM_PT_FIRE)
  1132.  elements.property(ptsi, "Gravity", 0.20)
  1133.  elements.property(ptsi, "Weight", 5.13)
  1134.  elements.property(elem.RADM_PT_PTSI, "Update", --*1
  1135.  function(i,x,y,s,nt) --1
  1136.   if s ~=8 and nt ~= 0 and nt - s > 0 then --2
  1137.    for r in sim.neighbors(x,y,1,1) do --3
  1138.     if sim.partProperty(r, "type") == elements.DEFAULT_PT_WATR then --4
  1139.      if math.random(1,16) == 4 then --5
  1140.       sim.partProperty(r, "type", elements.DEFAULT_PT_FIRE)
  1141.       if math.random(1,3) == 3 then --6
  1142.        sim.pressure(x/4,y/4,0.2)
  1143.        sim.partProperty(i, "temp", 978.56)
  1144.        tpt.delete(i)
  1145.        end --6
  1146.       end --5
  1147.      end --4
  1148.     end --3
  1149.    end --2
  1150.   end --1
  1151.   ) --*1
  1152.  
  1153. local bctr = elements.allocate("RADM", "BCTR")
  1154.  elements.element(bctr, elements.element(elements.DEFAULT_PT_SOAP))
  1155.  elements.property(bctr, "Name" , "BCTR")
  1156.  elements.property(bctr, "Description" , "Bacteria, spreads and sticks.")
  1157.  elements.property(bctr, "Color", 0xE0FAA1)
  1158.  elements.property(bctr, "Diffusion", 0.3)
  1159.  elements.property(bctr, "Weight", 30)
  1160.  elements.property(elem.RADM_PT_BCTR, "Update", --*1
  1161.  function(i,x,y,s,nt) --1
  1162.   if s ~=8 and nt ~=0 and nt - s > 0 then --2
  1163.    for r in sim.neighbors(x,y,1,1) do --3
  1164.     if math.random(1,10) > 1 then --4
  1165.      sim.partProperty(i, "vy", 0)
  1166.      end --4
  1167.     if math.random(1,10) > 1 then --5
  1168.      sim.partProperty(i, "vx", 0)
  1169.      end --5
  1170.     if math.random(1,20) < 4 then --6
  1171.      sim.partCreate(-1, math.random(x-1,x+1),math.random(y-1,y+1),elements.RADM_PT_BCTR)
  1172.      end --6
  1173.     if math.random(1,40) < 2 then --7
  1174.      sim.partKill(i)
  1175.      end --7
  1176.     if sim.partProperty(r, "type") == elements.DEFAULT_PT_WOOD then --8
  1177.      if math.random(1,20) < 2 then --9
  1178.       sim.partKill(r)
  1179.       sim.partCreate(-1, math.random(x-1,x+1),math.random(y-1,y+1),elements.RADM_PT_BCTR)
  1180.       sim.partCreate(-1, math.random(x-1,x+1),math.random(y-1,y+1),elements.RADM_PT_BCTR)
  1181.       end --9
  1182.      end --8
  1183.     if sim.partProperty(r, "type") == elements.DEFAULT_PT_PLNT then --10
  1184.      if math.random(1,20) < 2 then --11
  1185.       sim.partKill(r)
  1186.       sim.partCreate(-1, math.random(x-1,x+1),math.random(y-1,y+1),elements.RADM_PT_BCTR)
  1187.       sim.partCreate(-1, math.random(x-1,x+1),math.random(y-1,y+1),elements.RADM_PT_BCTR)
  1188.       end --11
  1189.      end --10
  1190.     end --3
  1191.    end --2
  1192.   end --1
  1193.   ) --*1
  1194.  
  1195. local naoh = elements.allocate("RADM", "NAOH")
  1196.  elements.element(naoh, elements.element(elements.DEFAULT_PT_SOAP))
  1197.  elements.property(naoh, "Name" , "NAOH")
  1198.  elements.property(naoh, "Description", "NaOH aq, makes salt and water with acid.")
  1199.  elements.property(naoh, "Color", 0x2140DF)
  1200.  elements.property(naoh, "Temperature", 337.8)
  1201.  elements.property(naoh, "MenuSection", 7)
  1202.  elements.property(naoh, "HighPressure", 1.07)
  1203.  elements.property(naoh, "HighPressureTransition", elements.RADM_PT_FIRE)
  1204.  elements.property(naoh, "Gravity", 0.20)
  1205.  elements.property(naoh, "Weight", 5.13)
  1206.  elements.property(elem.RADM_PT_NAOH, "Update", --*1
  1207.  function(i,x,y,s,nt) --1
  1208.   if s ~=8 and nt ~= 0 and nt - s > 0 then --2
  1209.    for r in sim.neighbors(x,y,1,1) do --3
  1210.     if sim.partProperty(r, "type") == elements.DEFAULT_PT_ACID then --4
  1211.      if math.random(1,16) == 4 then --5
  1212.       sim.partProperty(r, "type", elements.DEFAULT_PT_SLTW)
  1213.       if math.random(1,4) == 3 then --6
  1214.        tpt.delete(i)
  1215.        end --6
  1216.       end --5
  1217.      end --4
  1218.     end --3
  1219.    end --2
  1220.   end --1
  1221.   ) --*1
  1222.  
  1223. local sdim = elements.allocate("RADM", "SDIM")
  1224. elements.element(sdim, elements.element(elements.DEFAULT_PT_METL))
  1225. elements.property(sdim, "Name" , "SDIM")
  1226. elements.property(sdim, "Description", "Sodium, alkali metal. Very reactive to water.")
  1227. elements.property(sdim, "Flammable", 3.95)
  1228. elements.property(sdim, "Color", 0xDFEFDF)
  1229. elements.property(sdim, "Temperature", 337.8)
  1230. elements.property(sdim, "MenuSection", 1)
  1231. elements.property(sdim, "HighPressure", 1.07)
  1232. elements.property(sdim, "HighPressureTransition", elements.RADM_PT_FIRE)
  1233.  elements.property(elem.RADM_PT_SDIM, "Update", --*1
  1234.  function(i,x,y,s,nt) --1
  1235.   if s ~=8 and nt ~= 0 and nt - s > 0 then --2
  1236.    for r in sim.neighbors(x,y,1,1) do --3
  1237.     if sim.partProperty(r, "type") == elements.DEFAULT_PT_WATR then --4
  1238.      if math.random(1,32) == 4 then --5
  1239.       sim.partProperty(r, "type", elements.DEFAULT_PT_FIRE)
  1240.       sim.partProperty(i, "type", elements.RADM_PT_NAOH)
  1241.       if math.random(1,3) == 3 then --6
  1242.        sim.pressure(x/4,y/4,0.8)
  1243.        sim.partProperty(i, "temp", 956.42)
  1244.        if math.random(1,2) == 2 then --7
  1245.         tpt.delete(i)
  1246.         end --7
  1247.        end --6
  1248.       end --5
  1249.      end --4
  1250.     end --3
  1251.    end --2
  1252.   end --1
  1253.   ) --*1
  1254.  
  1255. local frnc = elements.allocate("RADM", "FRNC")
  1256. elements.element(frnc, elements.element(elements.DEFAULT_PT_METL))
  1257. elements.property(frnc, "Name" , "FRNC")
  1258. elements.property(frnc, "Description", "Francium, alkali metal. Very reactive to water.")
  1259. elements.property(frnc, "Flammable", 42.95)
  1260. elements.property(frnc, "Color", 0xD1842E)
  1261. elements.property(frnc, "Temperature", 337.8)
  1262. elements.property(frnc, "MenuSection", 1)
  1263. elements.property(frnc, "HighPressure", 0.107)
  1264. elements.property(frnc, "HighPressureTransition", elements.RADM_PT_FIRE)
  1265.  elements.property(elem.RADM_PT_FRNC, "Update", --*1
  1266.  function(i,x,y,s,nt) --1
  1267.   if s ~=8 and nt ~= 0 and nt - s > 0 then --2
  1268.    for r in sim.neighbors(x,y,1,1) do --3
  1269.     if sim.partProperty(r, "type") == elements.DEFAULT_PT_WATR then --4
  1270.      if math.random(1,16) == 4 then --5
  1271.       sim.partProperty(r, "type", elements.DEFAULT_PT_FIRE)
  1272.       if math.random(1,2) == 2 then --6
  1273.        sim.pressure(x/4,y/4,0.8)
  1274.        sim.partProperty(i, "temp", 2956.42)
  1275.        if math.random(1,2) == 2 then --7
  1276.         tpt.delete(i)
  1277.         end --7
  1278.        end --6
  1279.       end --5
  1280.      end --4
  1281.     end --3
  1282.    end --2
  1283.   end --1
  1284.   ) --*1
  1285.  
  1286. local ltrt = elements.allocate("RADM", "LTRT")
  1287.  elements.element(ltrt,elem.element(elem.DEFAULT_PT_DEUT))
  1288.  elements.property(ltrt, "Name" , "LTRT")
  1289.  elements.property(ltrt, "Description" , "Liquid tritium, neutrons can pass through it. Superfluid.")
  1290.  elements.property(ltrt, "Temperature", 23.14)
  1291.  elements.property(ltrt, "Color", 0xB3B1CF)
  1292.  elements.property(ltrt, "Weight", 3)
  1293.  elements.property(ltrt, "HighTemperature", 25.43)
  1294.  elements.property(ltrt, "HighTemperatureTransition", elements.RADM_PT_TRIT)
  1295.  elements.property(ltrt, "MenuSection", 7)
  1296.  elements.property(elem.RADM_PT_LTRT, "Update", --*1
  1297.  function(i,x,y,s,nt) --1
  1298.   superfluid(i,x,y,s,nt,0.75,2,3)
  1299.   end --1
  1300.  ) --*1
  1301.  
  1302.  elements.property(trit, "LowTemperature", 21.54)
  1303.  elements.property(trit, "LowTemperatureTransition", elements.RADM_PT_LTRT)
  1304.  
  1305. local glgs = elements.allocate("RADM", "GLGS")
  1306.  elements.element(glgs,elem.element(elem.DEFAULT_PT_HYGN))
  1307.  elements.property(glgs, "Name" , "GLGS")
  1308.  elements.property(glgs, "Description" , "Glow gas, very heat conductive")
  1309.  elements.property(glgs, "HeatConduct", 255)
  1310.  elements.property(glgs, "Diffusion", 2.45)
  1311.  elements.property(glgs, "Color", 0x00FF00)
  1312.  
  1313. local function funcGraphics(i, colr, colg, colb) --*1
  1314.  return 1,ren.FIRE_ADD,255,colr,colg,colb,192,0,255,0
  1315.  end --*1
  1316. elements.property(glgs, "Graphics", funcGraphics)
  1317.  
  1318. local lmun = elements.allocate("RADM", "LMUN")
  1319.  elements.element(lmun,elem.element(elem.DEFAULT_PT_SOAP))
  1320.  elements.property(lmun, "Name" , "LMUN")
  1321.  elements.property(lmun, "Description", "Liquid muonium, extremely light. Superfluid.")
  1322.  elements.property(lmun, "Temperature", 0.91)
  1323.  elements.property(lmun, "Color", 0xCDCD43)
  1324.  elements.property(lmun, "Weight", 3)
  1325.  elements.property(lmun, "MenuSection", 7)
  1326.  elements.property(lmun, "Gravity", 0.04)
  1327.  elements.property(elem.RADM_PT_LMUN, "Update", --*1
  1328.  function(i,x,y,s,nt) --1
  1329.   superfluid(i,x,y,s,nt,1.5,2,3)
  1330.   end --1
  1331.  ) --*1
  1332.  
  1333. local munm = elements.allocate("RADM", "MUNM")
  1334. elements.element(munm, elements.element(elements.DEFAULT_PT_HYGN))
  1335. elements.property(munm, "Name" , "MUNM")
  1336. elements.property(munm, "Description" , "Muonium, extremely light. Turns into liquid muonium at very low temperatures.")
  1337. elements.property(munm, "Color", 0xBCBC32)
  1338. elements.property(munm, "Temperature", 90.8)
  1339. elements.property(munm, "MenuSection", 6)
  1340. elements.property(munm, "LowTemperature", 1.03)
  1341. elements.property(munm, "LowTemperatureTransition", elements.RADM_PT_LMUN)
  1342. elements.property(munm, "Diffusion", 0.12)
  1343. elements.property(munm, "Falldown", 2)
  1344. elements.property(munm, "AirDrag", 0.015)
  1345. elements.property(munm, "Gravity", -0.189)
  1346.  
  1347.  elements.property(lmun, "HighTemperature", 1.43)
  1348.  elements.property(lmun, "HighTemperatureTransition", elements.RADM_PT_MUNM)
  1349.  
  1350. local caes = elements.allocate("RADM", "CAES")
  1351. elements.element(caes, elements.element(elements.DEFAULT_PT_METL))
  1352. elements.property(caes, "Name" , "CAES")
  1353. elements.property(caes, "Description", "Caesium, alkali metal. Extremely reactive to water.")
  1354. elements.property(caes, "Flammable", 3.95)
  1355. elements.property(caes, "Color", 0xACAC8A)
  1356. elements.property(caes, "Temperature", 337.8)
  1357. elements.property(caes, "MenuSection", 1)
  1358. elements.property(caes, "Explosive", 2)
  1359. elements.property(caes, "HighPressure", 1.07)
  1360. elements.property(caes, "HighPressureTransition", elements.RADM_PT_FIRE)
  1361.  elements.property(elem.RADM_PT_CAES, "Update", --*1
  1362.  function(i,x,y,s,nt) --1
  1363.   if s ~=8 and nt ~= 0 and nt - s > 0 then --2
  1364.    for r in sim.neighbors(x,y,1,1) do --3
  1365.     if sim.partProperty(r, "type") == elements.DEFAULT_PT_WATR then --4
  1366.      if math.random(1,32) == 4 then --5
  1367.       sim.partProperty(r, "type", elements.DEFAULT_PT_PLSM)
  1368.       if math.random(1,3) == 3 then --6
  1369.        sim.pressure(x/4,y/4,0.8)
  1370.        sim.partProperty(i, "temp", 9956.42)
  1371.        if math.random(1,2) == 2 then --7
  1372.         tpt.delete(i)
  1373.         end --7
  1374.        end --6
  1375.       end --5
  1376.      end --4
  1377.     end --3
  1378.    end --2
  1379.   end --1
  1380.   ) --*1
  1381.  
  1382.  elements.property(elem.DEFAULT_PT_LOXY, "Description", "Liquid Oxygen. Very cold, slightly superfluid. Reacts with fire")
  1383.  elements.property(elem.DEFAULT_PT_LOXY, "Update", --*1
  1384.  function(i,x,y,s,nt) --1
  1385.   superfluid(i,x,y,s,nt,0.25,8,5)
  1386.   end --1
  1387.  ) --*1
  1388.  
  1389. local slvr = elements.allocate("RADM", "SLVR")
  1390. elements.element(slvr, elements.element(elements.DEFAULT_PT_METL))
  1391. elements.property(slvr, "Name" , "SLVR")
  1392. elements.property(slvr, "Description", "Silver, resists sulfuric acid. Very heat conductive.")
  1393. elements.property(slvr, "Hardness", 0)
  1394. elements.property(slvr, "Color", 0xA8A8A8)
  1395. elements.property(slvr, "Temperature", 337.8)
  1396. elements.property(slvr, "MenuSection", 1)
  1397. elements.property(slvr, "HeatConduct", 255)
  1398.  
  1399. local nept = elements.allocate("RADM" , "NEPT")
  1400.  elements.element(nept, elements.element(elements.DEFAULT_PT_PLUT))
  1401.  elements.property(nept, "Name" , "NEPT")
  1402.  elements.property(nept, "Description" , "Neptunium, very reactive.")
  1403.  elements.property(nept, "Color", 0x557020)
  1404.  elements.property(nept, "MenuSection", 10)
  1405.  function neptunium(i,x,y,s,n)
  1406.   if tpt.get_property("type", x + math.random(-2,2), y + math.random(-2,2)) == tpt.el.neut.id then --1
  1407.    if math.random(1,4) == 1 then --2/2
  1408.     tpt.parts[i].type = elements.DEFAULT_PT_URAN
  1409.    elseif math.random(1,10) == 1 then --2/1
  1410.     tpt.parts[i].type = elements.RADM_PT_HLUM
  1411.     end --2
  1412.    end --1
  1413.   if sim.pressure(x/4,y/4) > 1 then --3
  1414.    if math.random(1,250) == 10 then --4
  1415.     tpt.create(x + math.random(-2,2), y + math.random(-2,2), 'neut')
  1416.     tpt.set_property("temp", math.huge, x ,y)
  1417.     end --4
  1418.    end --3
  1419.   if math.random(1,10000) == 10 then --5
  1420.    sim.pressure(x/4,y/4,0.1)
  1421.    end --5
  1422.   end --*1
  1423.  tpt.element_func(neptunium,nept)
  1424.   function neutron(i,x,y,s,n) --*2
  1425.    if tpt.get_property("type", x + math.random(-2,2), y + math.random(-2,2)) == nept then --1
  1426.     if math.random(1,30) == 10 then --2
  1427.      tpt.create(x + math.random(-2,2), y + math.random(-2,2), 'neut')
  1428.      end --2
  1429.     end --1
  1430.    end --*2
  1431.  tpt.element_func(neutron,tpt.el.neut.id)
  1432.  
  1433. elements.property(elements.DEFAULT_PT_URAN, "Color", 0x385808)
  1434.  
  1435. elements.property(elements.DEFAULT_PT_PLUT, "Color", 0xA87018)
  1436.  
  1437. local lrdn = elements.allocate("RADM", "LRDN")
  1438.  elements.element(lrdn,elem.element(elem.DEFAULT_PT_SOAP))
  1439.  elements.property(lrdn, "Name" , "LRDN")
  1440.  elements.property(lrdn, "Description", "Liquid radon. Superfluid.")
  1441.  elements.property(lrdn, "Temperature", 0.91)
  1442.  elements.property(lrdn, "Color", 0x688830)
  1443.  elements.property(lrdn, "Weight", 3)
  1444.  elements.property(lrdn, "MenuSection", 7)
  1445.  elements.property(lrdn, "Gravity", 0.04)
  1446.  elements.property(elem.RADM_PT_LRDN, "Update", --*1
  1447.  function(i,x,y,s,nt) --1
  1448.   superfluid(i,x,y,s,nt,0.675,4,3)
  1449.   end --1
  1450.  ) --*1
  1451.  
  1452. local radn = elements.allocate("RADM", "RADN")
  1453. elements.element(radn, elements.element(elements.DEFAULT_PT_HYGN))
  1454. elements.property(radn, "Name" , "RADN")
  1455. elements.property(radn, "Description" , "Radon, light gas.")
  1456. elements.property(radn, "Color", 0x789840)
  1457. elements.property(radn, "Temperature", 301.8)
  1458. elements.property(radn, "MenuSection", 6)
  1459. elements.property(radn, "LowTemperature", 211.45)
  1460. elements.property(radn, "LowTemperatureTransition", elements.RADM_PT_LRDN)
  1461. elements.property(radn, "Diffusion", 0.31)
  1462. elements.property(radn, "Falldown", 2)
  1463. elements.property(radn, "AirDrag", 0.005)
  1464. elements.property(radn, "Gravity", -0.11)
  1465.  
  1466.  elements.property(lrdn, "HighTemperature", 213.56)
  1467.  elements.property(lrdn, "HighTemperatureTransition", elements.RADM_PT_RADN)
  1468.  
  1469. local sulf = elements.allocate("RADM", "SULF")
  1470.  elements.element(sulf, elements.element(elements.DEFAULT_PT_DUST))
  1471.  elements.property(sulf, "Name" , "SULF")
  1472.  elements.property(sulf, "Description" , "Sulfur, very flammable.")
  1473.  elements.property(sulf, "Flammable", 40.12)
  1474.  elements.property(sulf, "Color", 0xA59314)
  1475.  elements.property(sulf, "Temperature", 310.2)
  1476.  elements.property(sulf, "MenuSection", 8)
  1477.  elements.property(sulf, "Gravity", 0.10)
  1478.  elements.property(sulf, "Weight", 30.23)
  1479.  elements.property(sulf, "Explosive", 1)
  1480.  
  1481. local torm = elements.allocate("RADM" , "TORM")
  1482.  elements.element(torm, elements.element(elements.DEFAULT_PT_PLUT))
  1483.  elements.property(torm, "Name" , "TORM")
  1484.  elements.property(torm, "Description" , "Thorium, slightly reactive.")
  1485.  elements.property(torm, "Color", 0xA9BBD8)
  1486.  elements.property(torm, "MenuSection", 10)
  1487.  function thorium(i,x,y,s,n) --*1
  1488.   if tpt.get_property("type", x + math.random(-3,3), y + math.random(-3,3)) == tpt.el.neut.id then --1
  1489.    if math.random(1,6) == 1 then --2/2
  1490.     tpt.parts[i].type = elements.DEFAULT_PT_BRMT
  1491.    elseif math.random(1,13) == 1 then --2/1
  1492.     tpt.parts[i].type = elements.RADM_PT_RADN
  1493.     end --2
  1494.    end --1
  1495.   if sim.pressure(x/4,y/4) > 2 then --3
  1496.    if math.random(1,250) == 10 then --4
  1497.     tpt.create(x + math.random(-2,2), y + math.random(-2,2), 'neut')
  1498.     tpt.set_property("temp", math.huge, x ,y)
  1499.     end --4
  1500.    end --3
  1501.   if math.random(1,10000) == 10 then --5
  1502.    sim.pressure(x/4,y/4,0.05)
  1503.    end --5
  1504.   end --*1
  1505.  tpt.element_func(thorium,torm)
  1506.   function neutron(i,x,y,s,n) --*2
  1507.    if tpt.get_property("type", x + math.random(-2,2), y + math.random(-2,2)) == torm then --1
  1508.     if math.random(1,32) == 10 then --2
  1509.      tpt.create(x + math.random(-2,2), y + math.random(-2,2), 'neut')
  1510.      end --2
  1511.     end --1
  1512.    end --*2
  1513.  tpt.element_func(neutron,tpt.el.neut.id)
  1514.  
  1515. local qgp = elements.allocate("RADM", "QGP")
  1516.  elements.element(qgp, elements.element(elements.RADM_PT_HLUM))
  1517.  elements.property(qgp, "Name" , "QGP")
  1518.  elements.property(qgp, "Description" , "Quark-Gluon Plasma, hot.")
  1519.  elements.property(qgp, "Color", 0x10FF88)
  1520.  elements.property(qgp, "Weight", -1)
  1521.  elements.property(qgp, "Collision", -0.99)
  1522.  elements.property(qgp, "Diffusion", 0.3)
  1523.  function qgpHeat(i,x,y,s,n) --*1
  1524.   if math.random(1,50) == 10 then --1
  1525.    sim.partProperty(i, "temp", 9725.85)
  1526.    end --1
  1527.   end --*1
  1528.  function qgpUpdate(i,x,y,s,n) --*2
  1529.   qgpHeat(i,x,y,s,n)
  1530.   end --*2
  1531.  elements.property(qgp,"Update",qgpUpdate)
  1532.  
  1533.  local function funcGraphics(i, colr, colg, colb) --*1
  1534.   return 1,ren.FIRE_ADD,255,colr,colg,colb,192,16,255,136
  1535.   end --*1
  1536.  elements.property(qgp, "Graphics", funcGraphics)
  1537.  
  1538. local fngi = elements.allocate("RADM", "FNGI")
  1539.  elements.element(fngi, elements.element(elements.DEFAULT_PT_SOAP))
  1540.  elements.property(fngi, "Name" , "FNGI")
  1541.  elements.property(fngi, "Description" , "Fungi, spreads with spores.")
  1542.  elements.property(fngi, "Color", 0x884400)
  1543.  elements.property(fngi, "Diffusion", 0.25)
  1544.  elements.property(fngi, "MenuSection", 11)
  1545.  elements.property(fngi, "Gravity", 0.05)
  1546.  elements.property(fngi, "Weight", 31)
  1547.  elements.property(elem.RADM_PT_FNGI, "Update", --*1
  1548.  function(i,x,y,s,nt) --1
  1549.   if s ~=8 and nt ~=0 and nt - s > 0 then --2
  1550.    for r in sim.neighbors(x,y,1,1) do --3
  1551.     if math.random(1,30) > 1 then --4
  1552.      sim.partProperty(i, "vy", 0)
  1553.      end --4
  1554.     if math.random(1,30) > 1 then --5
  1555.      sim.partProperty(i, "vx", 0)
  1556.      end --5
  1557.     if math.random(1,50) < 4 then --6
  1558.      sim.partCreate(-1, math.random(x-1,x+1),math.random(y-1,y+1),elements.RADM_PT_FNGI)
  1559.      end --6
  1560.     if math.random(1,80) < 2 then --7
  1561.      sim.partKill(i)
  1562.      end --7
  1563.     if sim.partProperty(r, "type") == elements.DEFAULT_PT_PLNT then --8
  1564.      if math.random(1,40) < 2 then --9
  1565.       sim.partKill(r)
  1566.       sim.partCreate(-1, math.random(x-1,x+1),math.random(y-1,y+1),elements.RADM_PT_FNGI)
  1567.       sim.partCreate(-1, math.random(x-1,x+1),math.random(y-1,y+1),elements.RADM_PT_FNGI)
  1568.       end --9
  1569.      end --8
  1570.     end --3
  1571.    end --2
  1572.   end --1
  1573.   ) --*1
  1574.  
  1575. local alge = elements.allocate("RADM", "ALGE")
  1576.  elements.element(alge, elements.element(elements.DEFAULT_PT_SOAP))
  1577.  elements.property(alge, "Name" , "ALGE")
  1578.  elements.property(alge, "Description" , "Algae, live on water.")
  1579.  elements.property(alge, "Color", 0x007700)
  1580.  elements.property(alge, "Diffusion", 0.15)
  1581.  elements.property(alge, "MenuSection", 11)
  1582.  elements.property(alge, "Gravity", 0.09)
  1583.  elements.property(alge, "Weight", 29)
  1584.  elements.property(elem.RADM_PT_ALGE, "Update", --*1
  1585.  function(i,x,y,s,nt) --1
  1586.   if s ~=8 and nt ~=0 and nt - s > 0 then --2
  1587.    for r in sim.neighbors(x,y,1,1) do --3
  1588.     if math.random(1,10) > 1 then --4
  1589.      sim.partProperty(i, "vy", 0)
  1590.      end --4
  1591.     if math.random(1,10) > 1 then --5
  1592.      sim.partProperty(i, "vx", 0)
  1593.      end --5
  1594.     if math.random(1,50) < 4 then --6
  1595.      sim.partCreate(-1, math.random(x-1,x+1),math.random(y-1,y+1),elements.RADM_PT_ALGE)
  1596.      end --6
  1597.     if math.random(1,80) < 2 then --7
  1598.      sim.partKill(i)
  1599.      end --7
  1600.     if sim.partProperty(r, "type") == elements.DEFAULT_PT_WATR then --8
  1601.      if math.random(1,40) < 2 then --9
  1602.       if math.random(1,50) < 2 then --10
  1603.        sim.partProperty(r, "type", elements.RADM_PT_ALGE)
  1604.        end --10
  1605.       sim.partCreate(-1, math.random(x-1,x+1),math.random(y-1,y+1),elements.RADM_PT_ALGE)
  1606.       end --9
  1607.      end --8
  1608.     if sim.partProperty(r, "type") == elements.DEFAULT_PT_WOOD then --11
  1609.      if math.random(1,40) < 2 then --12
  1610.       sim.partKill(r)
  1611.       if math.random(1,40) < 2 then --13
  1612.        sim.partCreate(-1, math.random(x-1,x+1),math.random(y-1,y+1),elements.DEFAULT_PT_CO2)
  1613.        end --13
  1614.       sim.partCreate(-1, math.random(x-1,x+1),math.random(y-1,y+1),elements.RADM_PT_ALGE)
  1615.       sim.partCreate(-1, math.random(x-1,x+1),math.random(y-1,y+1),elements.RADM_PT_ALGE)
  1616.       end --12
  1617.      end --11
  1618.     end --3
  1619.    end --2
  1620.   end --1
  1621.   ) --*1
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement