Advertisement
Guest User

1.4a (NOT TESTED CUZ I GOTTA BRB SRY)

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