Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --Gamma updates after this
- --To be used colors: 5700C5 (Brugel), A9BBD8 (Gloeu)
- local function velocity(i,v,n) --*1
- if tpt.get_property("tmp", i) == 0 then --1
- local angle = math.random(1,n)*(2*math.pi/n)
- tpt.set_property("vx", v*math.cos(angle), i)
- tpt.set_property("vy", v*math.sin(angle), i)
- tpt.set_property("tmp", 1, i)
- end --1
- end --*1
- local function superfluid(i,x,y,s,nt,p,h,u) --*1
- if s ~=8 and nt ~=0 and nt - s > 0 then --1
- for r in sim.neighbors(x,y,1,1) do --2
- if math.random(1,u) == 1 then --3
- if sim.partProperty(i, "vy") > 0.5 then --4/2
- sim.partProperty(i, "vy", p+0.5)
- elseif sim.partProperty(i, "vy") < 0.5 then --4/1
- sim.partProperty(i, "vy", p*-1)
- end --4
- end --3
- if math.random(1,h) > 1 then --5
- sim.partProperty(i, "vx", 0)
- end --5
- end --2
- end --1
- end --*1
- --Before this, is some important stuff that I have to use here, like extra color list, etc.
- local trit = elements.allocate("RADM" , "TRIT")
- elements.element(trit, elements.element(elements.DEFAULT_PT_HYGN))
- elements.property(trit, "Name" , "TRIT")
- elements.property(trit, "Description" , "Tritium, reacts with neutrons and creates fusion.")
- elements.property(trit, "Color", 0xA2A0BF)
- elements.property(trit, "MenuSection", 10)
- function tritDecay(i,x,y,s,n) --*1
- if tpt.get_property("type", x + math.random(-2,2), y + math.random(-2,2)) == tpt.el.neut.id then --1
- if math.random(1,3) == 1 then --2/3
- tpt.parts[i].type = tpt.el.neut.id
- sim.pressure(x/4,y/4,75)
- tpt.set_property("temp", math.huge, x, y)
- elseif math.random(1,6) == 3 then --2/2
- tpt.parts[i].type = tpt.el.deut.id
- sim.pressure(x/4,y/4,75)
- tpt.set_property("temp", math.huge, x, y)
- elseif math.random(1,3) == 3 then --2/1
- tpt.parts[i].type = tpt.el.hygn.id
- sim.pressure(x/4,y/4,75)
- tpt.set_property("temp", math.huge, x ,y)
- end --1
- end
- if sim.pressure(x/4,y/4) > 1 then
- if math.random(1,250) == 10 then
- tpt.create(x + math.random(-2,2), y + math.random(-2,2), 'neut')
- end
- end
- end
- tpt.element_func(tritDecay,trit)
- function neutron(i,x,y,s,n) --*2
- if tpt.get_property("type", x + math.random(-2,2), y + math.random(-2,2)) == trit then
- if math.random(1,30) == 10 then
- tpt.create(x + math.random(-2,2), y + math.random(-1,1), 'neut')
- end
- end
- end
- tpt.element_func(neutron,tpt.el.neut.id)
- local qudr = elements.allocate("RADM" , "QUDR")
- elements.element(qudr, elements.element(elements.DEFAULT_PT_HYGN))
- elements.property(qudr, "Name" , "QUDR")
- elements.property(qudr, "Description" , "Quadrium, reacts with electrons and creates deuterium.")
- elements.property(qudr, "Color", 0x968999)
- elements.property(qudr, "MenuSection", 10)
- function plutonium(i,x,y,s,n)
- if tpt.get_property("type", x + math.random(-2,2), y + math.random(-2,2)) == tpt.el.elec.id then --1
- if math.random(1,3) == 1 then --2/3
- tpt.parts[i].type = tpt.el.elec.id
- sim.pressure(x/4,y/4,75)
- tpt.set_property("temp", math.huge, x, y)
- elseif math.random(1,6) == 3 then --2/2
- tpt.parts[i].type = tpt.el.neut.id
- sim.pressure(x/4,y/4,75)
- tpt.set_property("temp", math.huge, x, y)
- elseif math.random(1,3) == 3 then --2/1
- tpt.parts[i].type = tpt.el.deut.id
- sim.pressure(x/4,y/4,75)
- tpt.set_property("temp", math.huge, x ,y)
- end --2
- end --1
- if sim.pressure(x/4,y/4) > 1 then --3
- if math.random(1,250) == 10 then --4
- tpt.create(x + math.random(-2,2), y + math.random(-2,2), 'elec')
- end --4
- end --3
- end --*1
- tpt.element_func(quadDecay,qudr)
- function neutron(i,x,y,s,n) --*2
- if tpt.get_property("type", x + math.random(-2,2), y + math.random(-2,2)) == qudr then --1
- if math.random(1,30) == 10 then --2
- tpt.create(x + math.random(-2,2), y + math.random(-2,2), 'elec')
- end --2
- end --1
- end --*2
- tpt.element_func(neutron,tpt.el.elec.id)
- local pent = elements.allocate("RADM" , "PENT")
- elements.element(pent, elements.element(elements.DEFAULT_PT_HYGN))
- elements.property(pent, "Name" , "PENT")
- elements.property(pent, "Description" , "Pentium, reacts with protons.")
- elements.property(pent, "Color", 0x8BC2C4)
- elements.property(pent, "MenuSection", 10)
- function pentium(i,x,y,s,n) --*1
- if tpt.get_property("type", x + math.random(-2,2), y + math.random(-2,2)) == tpt.el.prot.id then --1
- if math.random(1,3) == 1 then --2/3
- tpt.parts[i].type = tpt.el.prot.id
- sim.pressure(x/4,y/4,75)
- tpt.set_property("temp", math.huge, x, y)
- elseif math.random(1,6) == 3 then --2/2
- tpt.parts[i].type = tpt.el.grvt.id
- sim.pressure(x/4,y/4,75)
- tpt.set_property("temp", math.huge, x, y)
- elseif math.random(1,3) == 3 then --2/1
- tpt.parts[i].type = tpt.el.brmt.id
- sim.pressure(x/4,y/4,75)
- tpt.set_property("temp", math.huge, x ,y)
- end --2
- end --1
- if sim.pressure(x/4,y/4) > 1 then --3
- if math.random(1,250) == 10 then --4
- tpt.create(x + math.random(-2,2), y + math.random(-2,2), 'prot')
- end --3
- end --4
- end --*1
- tpt.element_func(pentium,pent)
- function neutron(i,x,y,s,n) --*2
- if tpt.get_property("type", x + math.random(-2,2), y + math.random(-2,2)) == pent then --1
- if math.random(1,30) == 10 then --2
- tpt.create(x + math.random(-2,2), y + math.random(-2,2), 'prot')
- end --2
- end --1
- end --*2
- tpt.element_func(neutron,tpt.el.prot.id)
- local phcl = elements.allocate("RADM" , "PHCL")
- elements.element(phcl, elements.element(elements.DEFAULT_PT_BOYL))
- elements.property(phcl, "Name" , "PHCL")
- elements.property(phcl, "Description" , "Photon cloud. reacts with Phot and expands.")
- elements.property(phcl, "Color", 0xFFF6F6)
- elements.property(phcl, "MenuSection", 10)
- function photcl(i,x,y,s,n) --*1
- if tpt.get_property("type", x + math.random(-2,2), y + math.random(-2,2)) == tpt.el.phot.id then --1
- if math.random(1,3) == 1 then --2/3
- tpt.parts[i].type = tpt.el.phot.id
- sim.pressure(x/4,y/4,75)
- tpt.set_property("temp", math.huge, x, y)
- elseif math.random(1,6) == 3 then --2/2
- tpt.parts[i].type = tpt.el.phot.id
- sim.pressure(x/4,y/4,75)
- tpt.set_property("temp", math.huge, x, y)
- elseif math.random(1,3) == 3 then --2/1
- tpt.parts[i].type = tpt.el.phot.id
- sim.pressure(x/4,y/4,75)
- tpt.set_property("temp", math.huge, x ,y)
- end --2
- end --1
- if sim.pressure(x/4,y/4) > 0.4 then --3
- if math.random(1,250) == 10 then --4
- tpt.create(x + math.random(-2,2), y + math.random(-2,2), 'phot')
- end --4
- end --3
- end --*1
- tpt.element_func(photcl,phcl)
- function neutron(i,x,y,s,n)
- if tpt.get_property("type", x + math.random(-2,2), y + math.random(-2,2)) == phcl then --1
- if math.random(1,30) == 10 then --2
- tpt.create(x + math.random(-2,2), y + math.random(-1,1), 'phot')
- end --2
- end --1
- end --*1
- tpt.element_func(neutron,tpt.el.phot.id)
- local ogan = elements.allocate("RADM" , "OGAN")
- elements.element(ogan, elements.element(elements.DEFAULT_PT_URAN))
- elements.property(ogan, "Name" , "OGAN")
- elements.property(ogan, "Description" , "Oganesson, very heavy and reactive.")
- elements.property(ogan, "Color", 0x063521)
- elements.property(ogan, "MenuSection", 10)
- function oganesson(i,x,y,s,n)
- if tpt.get_property("type", x + math.random(-2,2), y + math.random(-2,2)) == tpt.el.neut.id then --1
- if math.random(1,3) == 1 then --2/3
- tpt.parts[i].type = tpt.el.neut.id
- sim.pressure(x/4,y/4,75)
- tpt.set_property("temp", math.huge, x, y)
- elseif math.random(1,6) == 3 then --2/2
- tpt.parts[i].type = tpt.el.plut.id
- sim.pressure(x/4,y/4,75)
- tpt.set_property("temp", math.huge, x, y)
- elseif math.random(1,3) == 3 then --2/1
- tpt.parts[i].type = tpt.el.uran.id
- sim.pressure(x/4,y/4,75)
- tpt.set_property("temp", math.huge, x ,y)
- end --2
- end --1
- if sim.pressure(x/4,y/4) > 1 then --3
- if math.random(1,250) == 10 then --4
- tpt.create(x + math.random(-2,2), y + math.random(-2,2), 'neut')
- end --4
- end --3
- if math.random(1,10000) == 10 then --5
- tpt.set_property("temp", math.huge, x ,y)
- tpt.create(x + math.random(-2,2), y + math.random(-2,2), 'uran') --4
- tpt.create(x + math.random(-2,2), y + math.random(-2,2), 'stne') --4
- tpt.create(x + math.random(-2,2), y + math.random(-2,2), 'plut') --4
- sim.pressure(x/4,y/4,0.1)
- end --5
- end --*1
- tpt.element_func(oganesson,ogan)
- function neutron(i,x,y,s,n) --*2
- if tpt.get_property("type", x + math.random(-2,2), y + math.random(-2,2)) == ogan then --1
- if math.random(1,30) == 10 then --2
- tpt.create(x + math.random(-2,2), y + math.random(-2,2), 'neut')
- end --2
- end --1
- end --*2
- tpt.element_func(neutron,tpt.el.neut.id)
- local fral = elements.allocate("RADM" , "FRAL")
- elements.element(fral, elements.element(elements.DEFAULT_PT_IRON))
- elements.property(fral, "Name" , "FRAL")
- elements.property(fral, "Description" , "Fralium, reactive to electricity.")
- elements.property(fral, "Color", 0x9EAFA0)
- function fralium(i,x,y,s,n)
- if tpt.get_property("type", x + math.random(-2,2), y + math.random(-2,2)) == tpt.el.sprk.id then
- if math.random(1,3) == 1 then
- tpt.parts[i].type = tpt.el.elec.id
- sim.pressure(x/4,y/4,0.01)
- elseif math.random(1,6) == 3 then
- tpt.parts[i].type = tpt.el.brmt.id
- sim.pressure(x/4,y/4,0.01)
- elseif math.random(1,3) == 3 then
- tpt.parts[i].type = tpt.el.pscn.id
- tpt.create(x + math.random(-2,2), y + math.random(-2,2), 'elec')
- end
- end
- end
- tpt.element_func(fralium,fral)
- function emit(i,x,y,s,n)
- if tpt.get_property("type", x + math.random(-2,2), y + math.random(-2,2)) == fral then
- if math.random(1,30) == 10 then
- tpt.create(x + math.random(-2,2), y + math.random(-2,2), 'elec')
- end
- end
- end
- tpt.element_func(emit,tpt.el.elec.id)
- local rcfl = elements.allocate("RADM" , "RCFL")
- elements.element(rcfl, elements.element(elements.DEFAULT_PT_GEL))
- elements.property(rcfl, "Name" , "RCFL")
- elements.property(rcfl, "Description" , "Reactor Fluid, used for reactors, reactive.")
- elements.property(rcfl, "Color", 0xD289FF)
- elements.property(rcfl, "MenuSection", 10)
- function plutonium(i,x,y,s,n)
- if tpt.get_property("type", x + math.random(-2,2), y + math.random(-2,2)) == tpt.el.neut.id then --1
- if math.random(1,3) == 1 then --2/3
- tpt.parts[i].type = tpt.el.neut.id
- sim.pressure(x/4,y/4,75)
- tpt.set_property("temp", math.huge, x, y)
- elseif math.random(1,6) == 3 then --2/2
- tpt.parts[i].type = tpt.el.neut.id
- sim.pressure(x/4,y/4,75)
- tpt.set_property("temp", math.huge, x, y)
- elseif math.random(1,3) == 3 then --2/1
- tpt.parts[i].type = tpt.el.grvt.id
- sim.pressure(x/4,y/4,-2)
- tpt.set_property("temp", math.huge, x ,y)
- end
- end
- if sim.pressure(x/4,y/4) > 1 then
- if math.random(1,250) == 10 then
- tpt.create(x + math.random(-2,2), y + math.random(-2,2), 'neut')
- end
- end
- end
- tpt.element_func(plutonium,rcfl)
- function neutron(i,x,y,s,n)
- if tpt.get_property("type", x + math.random(-2,2), y + math.random(-2,2)) == rcfl then
- if math.random(1,30) == 10 then
- tpt.create(x + math.random(-2,2), y + math.random(-2,2), 'neut')
- end
- end
- end
- tpt.element_func(neutron,tpt.el.neut.id)
- local niho = elements.allocate("RADM" , "NIHO")
- elements.element(niho, elements.element(elements.DEFAULT_PT_GOLD))
- elements.property(niho, "Name" , "NIHO")
- elements.property(niho, "Description" , "Nihonium, very explosive and reactive.")
- elements.property(niho, "Color", 0x2B4D9B)
- elements.property(niho, "MenuSection", 10)
- function nihonium(i,x,y,s,n) --*1
- if tpt.get_property("type", x + math.random(-2,2), y + math.random(-2,2)) == tpt.el.neut.id then --1
- if math.random(1,3) == 1 then --2/3
- tpt.parts[i].type = tpt.el.neut.id
- sim.pressure(x/4,y/4,75)
- tpt.set_property("temp", math.huge, x, y)
- elseif math.random(1,6) == 3 then --2/2
- tpt.parts[i].type = tpt.el.plut.id
- sim.pressure(x/4,y/4,75)
- tpt.set_property("temp", math.huge, x, y)
- elseif math.random(1,3) == 3 then --2/1
- tpt.parts[i].type = tpt.el.uran.id
- sim.pressure(x/4,y/4,75)
- tpt.set_property("temp", math.huge, x ,y)
- end --2
- end --1
- if sim.pressure(x/4,y/4) > 1 then --3
- if math.random(1,250) == 10 then --4
- tpt.create(x + math.random(-2,2), y + math.random(-2,2), 'neut')
- end --4
- end --3
- end --*1
- tpt.element_func(nihonium,niho)
- function neutron(i,x,y,s,n) --*2
- if tpt.get_property("type", x + math.random(-2,2), y + math.random(-2,2)) == niho then --1
- if math.random(1,30) == 10 then --2
- tpt.create(x + math.random(-2,2), y + math.random(-2,2), 'neut')
- end --2
- end --1
- end--*2
- tpt.element_func(neutron,tpt.el.neut.id)
- local rope = elements.allocate("RADM", "ROPE")
- elements.element(rope, elements.element(elements.DEFAULT_PT_COAL))
- elements.property(rope, "Name" , "ROPE")
- elements.property(rope, "Description" , "Rope, flammable.")
- elements.property(rope, "Flammable", 16)
- elements.property(rope, "Color", 0xA58A66)
- local mthn = elements.allocate("RADM", "MTHN")
- elements.element(mthn, elements.element(elements.DEFAULT_PT_CO2))
- elements.property(mthn, "Name" , "MTHN")
- elements.property(mthn, "Description" , "Methane, flammable.")
- elements.property(mthn, "Flammable", 2.55)
- elements.property(mthn, "Color", 0x000A23)
- elements.property(mthn, "Temperature", 366.8)
- elements.property(mthn, "MenuSection", 5)
- elements.property(mthn, "HighPressure", 1.32)
- elements.property(mthn, "HighPressureTransition", elements.RADM_PT_PRPN)
- local al26 = elements.allocate("RADM" , "AL26")
- elements.element(al26, elements.element(elements.DEFAULT_PT_PLUT))
- elements.property(al26, "Name" , "AL26")
- elements.property(al26, "Description" , "Aluminium 26, very reactive.")
- elements.property(al26, "Color", 0x727272)
- elements.property(al26, "MenuSection", 10)
- function aluminium(i,x,y,s,n) --*1
- if tpt.get_property("type", x + math.random(-2,2), y + math.random(-2,2)) == tpt.el.neut.id then --1
- if math.random(1,3) == 1 then --2/3
- tpt.parts[i].type = tpt.el.brmt.id
- sim.pressure(x/4,y/4,75)
- tpt.set_property("temp", math.huge, x, y)
- elseif math.random(1,6) == 3 then --2/2
- tpt.parts[i].type = tpt.el.grvt.id
- sim.pressure(x/4,y/4,75)
- tpt.set_property("temp", math.huge, x, y)
- elseif math.random(1,3) == 3 then --2/1
- tpt.parts[i].type = tpt.el.phot.id
- sim.pressure(x/4,y/4,75)
- tpt.set_property("temp", math.huge, x ,y)
- end
- end
- if sim.pressure(x/4,y/4) > 1 then --3
- if math.random(1,250) == 10 then --4
- tpt.create(x + math.random(-2,2), y + math.random(-2,2), 'neut')
- end --4
- end --3
- end --*1
- tpt.element_func(aluminium,al26)
- function neutron(i,x,y,s,n) --*2
- if tpt.get_property("type", x + math.random(-2,2), y + math.random(-2,2)) == al26 then --1
- if math.random(1,30) == 10 then --2
- tpt.create(x + math.random(-2,2), y + math.random(-2,2), 'neut')
- end --2
- end --1
- end --*2
- tpt.element_func(neutron,tpt.el.neut.id)
- local ptol = elements.allocate("RADM", "PTOL")
- elements.element(ptol, elements.element(elements.DEFAULT_PT_SOAP))
- elements.property(ptol, "Name" , "PTOL")
- elements.property(ptol, "Description" , "Petrol, flammable, burns slow.")
- elements.property(ptol, "Flammable", 18.55)
- elements.property(ptol, "Color", 0x1A3000)
- elements.property(ptol, "Temperature", 293.4)
- elements.property(ptol, "MenuSection", 5)
- elements.property(ptol, "LowPressure", -1.45)
- elements.property(ptol, "LowPressureTransition", elements.RADM_PT_MTHN)
- local blpd = elements.allocate("RADM" , "BLPD")
- elements.element(blpd, elements.element(elements.DEFAULT_PT_GUN))
- elements.property(blpd, "Name" , "BLPD")
- elements.property(blpd, "Description" , "Black Powder, flammable, burns fast.")
- elements.property(blpd, "Color", 0x2D2B33)
- elements.property(blpd, "MenuSection", 5)
- function burn(i,x,y,s,n)
- if tpt.get_property("type", x + math.random(-2,2), y + math.random(-2,2)) == tpt.el.fire.id then
- if math.random(1,3) == 1 then --2/3
- tpt.parts[i].type = tpt.el.embr.id
- sim.pressure(x/4,y/4,75)
- tpt.set_property("temp", math.huge, x, y)
- elseif math.random(1,6) == 3 then --2/2
- tpt.parts[i].type = tpt.el.fire.id
- sim.pressure(x/4,y/4,75)
- tpt.set_property("temp", math.huge, x, y)
- elseif math.random(1,3) == 3 then --2/1
- tpt.parts[i].type = tpt.el.smke.id
- sim.pressure(x/4,y/4,0.01)
- tpt.set_property("temp", math.huge, x ,y)
- end --2
- end --1
- end --*1
- tpt.element_func(burn,blpd)
- function sparkle(i,x,y,s,n)
- if tpt.get_property("type", x + math.random(-2,2), y + math.random(-2,2)) == blpd then --1
- if math.random(1,30) == 10 then --2
- tpt.create(x + math.random(-2,2), y + math.random(-1,1), 'embr')
- end --2
- end --1
- end --*2
- tpt.element_func(sparkle,tpt.el.fire.id)
- local gsol = elements.allocate("RADM", "GSOL")
- elements.element(gsol, elements.element(elements.DEFAULT_PT_SOAP))
- elements.property(gsol, "Name" , "GSOL")
- elements.property(gsol, "Description" , "Gasoline, flammable, burns fast.")
- elements.property(gsol, "Flammable", 68.73)
- elements.property(gsol, "Color", 0xFF8F2D)
- elements.property(gsol, "Temperature", 314.65)
- elements.property(gsol, "MenuSection", 5)
- elements.property(gsol, "LowPressure", -0.43)
- elements.property(gsol, "LowPressureTransition", elements.RADM_PT_PTOL)
- local prpn = elements.allocate("RADM", "PRPN")
- elements.element(prpn, elements.element(elements.DEFAULT_PT_HYGN))
- elements.property(prpn, "Name" , "PRPN")
- elements.property(prpn, "Description" , "Propane, highly flammable gas.")
- elements.property(prpn, "Flammable", 5.55)
- elements.property(prpn, "Color", 0x820000)
- elements.property(prpn, "Temperature", 366.8)
- elements.property(prpn, "MenuSection", 5)
- elements.property(prpn, "HighPressure", 1.32)
- elements.property(prpn, "HighPressureTransition", elements.RADM_PT_GSOL)
- elements.property(prpn, "Diffusion", 1.03)
- local lhyg = elements.allocate("RADM", "LHYG")
- elements.element(lhyg, elements.element(elements.DEFAULT_PT_LOXY))
- elements.property(lhyg, "Name" , "LHYG")
- elements.property(lhyg, "Description" , "Liquid Hydrogen, very cold, makes water with liquid oxygen when burnt. Superfluid.")
- elements.property(lhyg, "Flammable", 23.65)
- elements.property(lhyg, "Color", 0x75ABE5)
- elements.property(lhyg, "Temperature", 14.15)
- elements.property(lhyg, "MenuSection", 7)
- elements.property(lhyg, "Diffusion", 0.1)
- elements.property(lhyg, "HighTemperature", 18.15)
- elements.property(lhyg, "HighTemperatureTransition", elements.DEFAULT_PT_HYGN)
- elements.property(elem.RADM_PT_LHYG, "Update", --*1
- function(i,x,y,s,nt) --1
- superfluid(i,x,y,s,nt,0.5,4,3)
- end --1
- ) --*1
- local shxf = elements.allocate("RADM", "SHXF")
- elements.element(shxf, elem.element(elem.DEFAULT_PT_HYGN))
- elements.property(shxf, "Name", "SHXF")
- elements.property(shxf, "Description", "Sulfur Hexaflouride, extremely heavy gas")
- elements.property(shxf, "Color", 0xC6B02F)
- elements.property(shxf, "Weight", 140.99)
- elements.property(shxf, "Gravity", 0.9)
- elements.property(shxf, "Diffusion", 0.45)
- elements.property(shxf, "Falldown", 2)
- local detr = elements.allocate("RADM" , "DETR")
- elements.element(detr, elements.element(elements.DEFAULT_PT_HYGN))
- elements.property(detr, "Name" , "DETR")
- elements.property(detr, "Description" , "Deuterium, reacts with neutrons. Rarely decays.")
- elements.property(detr, "Color", 0xB2FFB6)
- elements.property(detr, "MenuSection", 10)
- function detrDecay(i,x,y,s,n)
- if tpt.get_property("type", x + math.random(-1,1), y + math.random(-1,1)) == tpt.el.neut.id then --1
- if math.random(1,3) == 1 then --2/3
- tpt.parts[i].type = tpt.el.neut.id
- sim.pressure(x/4,y/4,75)
- tpt.set_property("temp", math.huge, x, y)
- elseif math.random(1,6) == 3 then --2/2
- tpt.parts[i].type = tpt.el.neut.id
- sim.pressure(x/4,y/4,75)
- tpt.set_property("temp", math.huge, x, y)
- elseif math.random(1,3) == 3 then --2/3
- tpt.parts[i].type = tpt.el.trit
- sim.pressure(x/4,y/4,35)
- tpt.set_property("temp", math.huge, x ,y)
- end --2
- end --1
- if math.random(1,64000) == 10 then --3
- tpt.create(x + math.random(-2,2), y + math.random(-2,2), 'hygn')
- end --3
- if math.random(1,65990) == 100 then --4
- tpt.create(x + math.random(-2,2), y + math.random(-2,2), 'neut')
- end --4
- end --*1
- function neutron(i,x,y,s,n) --*2
- if tpt.get_property("type", x + math.random(-2,2), y + math.random(-2,2)) == detr then --1
- if math.random(1,30) == 10 then --2
- tpt.create(x + math.random(-2,2), y + math.random(-1,1), 'neut')
- end --2
- end --1
- end --*2
- tpt.element_func(neutron,tpt.el.neut.id)
- function oxidize(i,x,y,s,n) --*3
- if tpt.get_property("type", x + math.random(-1,1), y + math.random(-1,1)) == tpt.el.oxyg.id then --1
- tpt.parts[i].type = tpt.el.deut.id
- end --1
- end --*3
- function detrUpdate(i,x,y,s,n) --*4
- detrDecay(i,x,y,s,n)
- oxidize(i,x,y,s,n)
- end --*4
- tpt.element_func(detrUpdate,detr)
- local emrp = elements.allocate("RADM" , "EMRP")
- elements.element(emrp, elements.element(elements.DEFAULT_PT_PLUT))
- elements.property(emrp, "Name" , "EMRP")
- elements.property(emrp, "Description" , "Emerald powder, lets neut pass.")
- elements.property(emrp, "Color", 0xFAFAFA)
- elements.property(emrp, "MenuSection", 8)
- local emer = elements.allocate("RADM" , "EMER")
- elements.element(emer, elements.element(elements.DEFAULT_PT_GOLD))
- elements.property(emer, "Name" , "EMER")
- elements.property(emer, "Description" , "Emerald, turns into emerald powder at high temperatures")
- elements.property(emer, "Color", 0xFAFAFA)
- elements.property(emer, "MenuSection", 9)
- elements.property(emer, "HighTemperature", 1900)
- elements.property(emer, "HighTemperatureTransition", elements.RADM_PT_EMRP)
- local ethn = elements.allocate("RADM", "ETHN")
- elements.element(ethn, elements.element(elements.DEFAULT_PT_HYGN))
- elements.property(ethn, "Name" , "ETHN")
- elements.property(ethn, "Description" , "Ethane, flammable gas.")
- elements.property(ethn, "Flammable", 157.55)
- elements.property(ethn, "Color", 0x89FFE3)
- elements.property(ethn, "Temperature", 366.8)
- elements.property(ethn, "MenuSection", 5)
- elements.property(ethn, "LowPressure", -1.07)
- elements.property(ethn, "LowPressureTransition", elements.RADM_PT_PRPN)
- elements.property(ethn, "Diffusion", 1.03)
- local btan = elements.allocate("RADM", "BTAN")
- elements.element(btan, elements.element(elements.DEFAULT_PT_HYGN))
- elements.property(btan, "Name" , "BTAN")
- elements.property(btan, "Description" , "Butane, flammable gas.")
- elements.property(btan, "Flammable", 89.55)
- elements.property(btan, "Color", 0xD3A50C)
- elements.property(btan, "Temperature", 366.8)
- elements.property(btan, "MenuSection", 5)
- elements.property(btan, "HighPressure", 1.07)
- elements.property(btan, "HighPressureTransition", elements.RADM_PT_ETHN)
- elements.property(btan, "Diffusion", 1.50)
- local lith = elements.allocate("RADM", "LITH")
- elements.element(lith, elements.element(elements.DEFAULT_PT_METL))
- elements.property(lith, "Name" , "LITH")
- elements.property(lith, "Description" , "Lithium, alkali metal. Reactive to water.")
- elements.property(lith, "Flammable", 0.95)
- elements.property(lith, "Color", 0xC4C0E5)
- elements.property(lith, "Temperature", 337.8)
- elements.property(lith, "MenuSection", 1)
- elements.property(lith, "HighPressure", 1.07)
- elements.property(lith, "HighPressureTransition", elements.RADM_PT_FIRE)
- elements.property(elem.RADM_PT_LITH, "Update", --*1
- function(i,x,y,s,nt) --1
- if s ~=8 and nt ~= 0 and nt - s > 0 then --2
- for r in sim.neighbors(x,y,1,1) do --3
- if sim.partProperty(r, "type") == elements.DEFAULT_PT_WATR then --4
- if math.random(1,64) == 4 then --5
- sim.partProperty(r, "type", elements.DEFAULT_PT_FIRE)
- if math.random(1,6) == 3 then --6
- sim.pressure(x/4,y/4,1)
- sim.partProperty(i, "temp", 956.42)
- if math.random(1,2) == 2 then --7
- tpt.delete(i)
- end --7
- end --6
- end --5
- end --4
- end --3
- end --2
- end --1
- ) --*1
- local lhlm = elements.allocate("RADM", "LHLM")
- elements.element(lhlm, elements.element(elements.DEFAULT_PT_SOAP))
- elements.property(lhlm, "Name" , "LHLM")
- elements.property(lhlm, "Description" , "Liquid helium, extremely cold, superfluid.")
- elements.property(lhlm, "Color", 0xDCCCE8)
- elements.property(lhlm, "Temperature", 1.10)
- elements.property(lhlm, "MenuSection", 7)
- elements.property(lhlm, "Diffusion", 0.1)
- elements.property(lhlm, "Falldown", 2)
- elements.property(lhlm, "AirDrag", 0.01)
- elements.property(lhlm, "Gravity", 0.027)
- elements.property(elem.RADM_PT_LHLM, "Update", --*1
- function(i,x,y,s,nt) --1
- superfluid(i,x,y,s,nt,1,2,2)
- end --1
- ) --*1
- local hlum = elements.allocate("RADM", "HLUM")
- elements.element(hlum, elements.element(elements.DEFAULT_PT_HYGN))
- elements.property(hlum, "Name" , "HLUM")
- elements.property(hlum, "Description" , "Helium, very light. Turns into liquid helium at low temperatures.")
- elements.property(hlum, "Color", 0xFFE0F7)
- elements.property(hlum, "Temperature", 90.8)
- elements.property(hlum, "MenuSection", 6)
- elements.property(hlum, "LowTemperature", 4.13)
- elements.property(hlum, "LowTemperatureTransition", elements.RADM_PT_LHLM)
- elements.property(hlum, "Diffusion", 0.06)
- elements.property(hlum, "Falldown", 2)
- elements.property(hlum, "AirDrag", 0.01)
- elements.property(hlum, "Gravity", -0.028)
- elements.property(lhlm, "HighTemperature", 4.16)
- elements.property(lhlm, "HighTemperatureTransition", elements.RADM_PT_HLUM)
- local hexn = elements.allocate("RADM", "HEXN")
- elements.element(hexn, elements.element(elements.DEFAULT_PT_SOAP))
- elements.property(hexn, "Name" , "HEXN")
- elements.property(hexn, "Description" , "Hexane, very flammable.")
- elements.property(hexn, "Color", 0xE3F2AB)
- elements.property(hexn, "Temperature", 134.8)
- elements.property(hexn, "MenuSection", 5)
- elements.property(hexn, "Flammable", 20.55)
- elements.property(hexn, "LowPressure", -2.43)
- elements.property(hexn, "LowPressureTransition", elements.RADM_PT_BTAN)
- local muon = elements.allocate("RADM", "MUON")
- elements.element(muon, elements.element(elements.DEFAULT_PT_ELEC))
- elements.property(muon, "Name" , "MUON")
- elements.property(muon, "Description" , "Muons, decay into electrons.")
- elements.property(muon, "Color", 0xE1FF00)
- function muonDecay(i,x,y,s,n)
- if math.random(1,64000) == 10 then
- tpt.create(x + math.random(-2,2), y + math.random(-2,2), 'elec')
- tpt.delete(i)
- end
- end
- function muonUpdate(i,x,y,s,n)
- velocity(i,2,6)
- muonDecay(i,x,y,s,n)
- end
- elements.property(muon,"Update",muonUpdate)
- local function funcGraphics(i, colr, colg, colb)
- return 1,ren.FIRE_ADD,255,colr,colg,colb,128,250,255,0
- end
- elements.property(muon, "Graphics", funcGraphics)
- local tauo = elements.allocate("RADM", "TAUO")
- elements.element(tauo, elements.element(elements.DEFAULT_PT_ELEC))
- elements.property(tauo, "Name" , "TAUO")
- elements.property(tauo, "Description" , "Tauons, decay into muons.")
- elements.property(tauo, "Color", 0x8D4CFF)
- function tauonDecay(i,x,y,s,n)
- if math.random(1,6400) == 10 then
- tpt.create(x + math.random(-2,2), y + math.random(-2,2), 'muon')
- tpt.delete(i)
- end
- end
- function tauonUpdate(i,x,y,s,n)
- velocity(i,2,3)
- tauonDecay(i,x,y,s,n)
- end
- elements.property(tauo,"Update",tauonUpdate)
- local function funcGraphics(i, colr, colg, colb)
- return 1,ren.FIRE_ADD,255,colr,colg,colb,128,141,76,255
- end
- elements.property(tauo, "Graphics", funcGraphics)
- local mlhg = elements.allocate("RADM", "MLHG")
- elements.element(mlhg,elem.element(elem.DEFAULT_PT_GOLD))
- elements.property(mlhg, "Description" , "Metallic hydrogen, explosive. Melts into liquid hydrogen, conductive.")
- elements.property(mlhg,"Name","MLHG")
- elements.property(mlhg, "Temperature", 2.8)
- elements.property(mlhg, "Color", 0x42D7F4)
- elements.property(mlhg, "HighTemperature", 4.13)
- elements.property(mlhg, "HighTemperatureTransition", elements.RADM_PT_LHYG)
- function burn(i,x,y,s,n)
- if tpt.get_property("type", x + math.random(-2,2), y + math.random(-2,2)) == tpt.el.fire.id then
- if math.random(1,3) == 1 then --2/3
- tpt.parts[i].type = tpt.el.embr.id
- sim.pressure(x/4,y/4,75)
- tpt.set_property("temp", math.huge, x, y)
- elseif math.random(1,6) == 3 then --2/2
- tpt.parts[i].type = tpt.el.fire.id
- sim.pressure(x/4,y/4,75)
- tpt.set_property("temp", math.huge, x, y)
- elseif math.random(1,3) == 3 then --2/1
- tpt.parts[i].type = tpt.el.smke.id
- sim.pressure(x/4,y/4,0.01)
- tpt.set_property("temp", math.huge, x ,y)
- end --2
- end --1
- end --*1
- tpt.element_func(burn,mlhg)
- elements.property(lhyg, "LowTemperature", 4.00)
- elements.property(lhyg, "LowTemperatureTransition", elements.RADM_PT_MLHG)
- elements.property(elements.DEFAULT_PT_HYGN, "LowTemperature", 15.24)
- elements.property(elements.DEFAULT_PT_HYGN, "LowTemperatureTransition", elements.RADM_PT_LHYG)
- --Beta updates after this
- local hprx = elements.allocate("RADM", "HPRX")
- elements.element(hprx,elem.element(elem.DEFAULT_PT_SOAP))
- elements.property(hprx, "Name" , "HPRX")
- elements.property(hprx, "Description" , "Hydrogen Peroxide, turns into water and oxygen over time.")
- elements.property(hprx, "Color", 0x54F7E9)
- elements.property(hprx, "Temperature", 334.8)
- elements.property(hprx, "MenuSection", 7)
- elements.property(hprx, "MenuVisible", 1)
- elements.property(hprx, "Diffusion", 0.1)
- elements.property(hprx, "Weight", 15.34)
- elements.property(hprx, "AirDrag", 0.005)
- elements.property(hprx, "AirLoss", 0.99)
- elements.property(hprx, "Falldown", 2)
- elements.property(hprx, "Gravity", 0.10)
- elements.property(elem.RADM_PT_HPRX, "Update",
- function(i,x,y,s,n) --*1
- if math.random(1,64000) == 10 then --1
- sim.partChangeType(i, elements.DEFAULT_PT_WATR)
- end --1
- if math.random(1,64000) == 10 then --2
- sim.partChangeType(i, elements.DEFAULT_PT_OXYG)
- end --2
- end --*1
- )
- local tst = elements.allocate("RADM" , "LFAL")
- elements.property(tst, "Name" , "LFAL")
- elements.property(tst, "Description" , "Useless liquid.")
- elements.property(tst, "Color", 0xFFFFFF)
- elements.property(tst, "MenuVisible", 0)
- elements.property(tst, "Advection", 1)
- elements.property(tst, "Weight", 1)
- elements.property(tst, "AirDrag", 0.01)
- elements.property(tst, "AirLoss", 0.99)
- elements.property(tst, "Hardness", 0)
- elements.property(tst, "Falldown", 2)
- elements.property(tst, "Gravity", 0.07)
- local test = elements.allocate("RADM" , "DFAL")
- elements.property(test, "Name" , "DFAL")
- elements.property(test, "Description" , "Useless dequantate.")
- elements.property(test, "Color", 0xFFFFFF)
- elements.property(test, "MenuVisible", 0)
- elements.property(test, "Advection", 1)
- elements.property(test, "Diffusion", 1)
- elements.property(test, "Falldown", 0)
- elements.property(test, "Hardness", 0)
- local fsac = elements.allocate("RADM" , "FSAC")
- elements.element(fsac,elem.element(elem.DEFAULT_PT_SOAP))
- elements.property(fsac, "Name" , "FSAC")
- elements.property(fsac, "Description" , "Fluoro-Sulfuric acid, much more powerful than sulfuric acid.")
- elements.property(fsac, "Color", 0xB6F442)
- elements.property(fsac, "MenuVisible", 1)
- elements.property(fsac, "Gravity", 0.07)
- elements.property(fsac, "Advection", 0.1)
- elements.property(fsac, "Diffusion", 0.1)
- elements.property(fsac, "Hardness", 0)
- elements.property(fsac, "AirDrag", 0.01)
- elements.property(fsac, "AirLoss", 0.99)
- elements.property(fsac, "Falldown", 2)
- elements.property(elem.RADM_PT_FSAC, "Update", --*1
- function(i,x,y,s,nt) --1
- if s ~=8 and nt ~= 0 and nt - s > 0 then --2
- for r in sim.neighbors(x,y,3,3) do --3
- if sim.partProperty(r, "type") ~= elements.DEFAULT_PT_DMND then --4
- if sim.partProperty(r, "type") ~= elements.DEFAULT_PT_ACID then --5
- if math.random(1,128) == 4 then --6
- sim.partKill(r)
- if math.random(1,256) == 1 then --7
- tpt.delete(i)
- end --7
- end --6
- end --5
- end --4
- end --3
- end --2
- end --1
- ) --*1
- local ntrg = elements.allocate("RADM", "NTRG")
- elements.element(ntrg,elem.element(elem.DEFAULT_PT_HYGN))
- elements.property(ntrg, "Name" , "NTRG")
- elements.property(ntrg, "Description" , "Nitrogen, condenses into liquid nitrogen, heavy.")
- elements.property(ntrg, "Color", 0x6156D8)
- elements.property(ntrg, "Temperature", 234.8)
- elements.property(ntrg, "MenuSection", 6)
- elements.property(ntrg, "MenuVisible", 1)
- elements.property(ntrg, "Diffusion", 2.80)
- elements.property(ntrg, "Falldown", 2)
- elements.property(ntrg, "LowTemperature", 68.03)
- elements.property(ntrg, "LowTemperatureTransition", elements.DEFAULT_PT_LN2)
- elements.property(elements.DEFAULT_PT_LN2, "Color", 0x616FDF)
- elements.property(elements.DEFAULT_PT_LN2, "Name", "LNTG")
- elements.property(elements.DEFAULT_PT_LN2, "HighTemperature", 71.26)
- elements.property(elements.DEFAULT_PT_LN2, "HighTemperatureTransition", elements.RADM_PT_NTRG)
- elements.property(elements.DEFAULT_PT_NICE, "Color", 0x7F7FEF)
- elements.property(elements.DEFAULT_PT_NICE, "Name", "FNTG")
- elements.property(elements.DEFAULT_PT_NICE, "Description", "Frozen nitrogen, Very cold, will melt into liquid nitrogen when heated only slightly")
- local drsn = elements.allocate("RADM", "DRSN")
- elements.element(drsn,elem.element(elem.DEFAULT_PT_DUST))
- elements.property(drsn, "Name" , "DRSN")
- elements.property(drsn, "Description" , "Dry snow, formed when dry ice is pressurized.")
- elements.property(drsn, "Color", 0xCCDDEE)
- elements.property(drsn, "Temperature", 173.15)
- elements.property(drsn, "MenuSection", 8)
- elements.property(drsn, "MenuVisible", 1)
- elements.property(drsn, "Weight", 1)
- elements.property(drsn, "AirDrag", 0.006)
- elements.property(drsn, "AirLoss", 0.99)
- elements.property(drsn, "Falldown", 1)
- elements.property(drsn, "Gravity", 0.07)
- elements.property(drsn, "HighTemperature", 195.15)
- elements.property(drsn, "HighTemperatureTransition", elements.DEFAULT_PT_CO2)
- local ntsn = elements.allocate("RADM", "NTSN")
- elements.element(ntsn,elem.element(elem.DEFAULT_PT_DUST))
- elements.property(ntsn, "Name" , "NTSN")
- elements.property(ntsn, "Description" , "Nitrogen snow, formed when frozen nitrogen is pressurized.")
- elements.property(ntsn, "Color", 0xB989CC)
- elements.property(ntsn, "Temperature", 51.12)
- elements.property(ntsn, "MenuSection", 8)
- elements.property(ntsn, "MenuVisible", 1)
- elements.property(ntsn, "Weight", 1)
- elements.property(ntsn, "AirDrag", 0.006)
- elements.property(ntsn, "AirLoss", 0.99)
- elements.property(ntsn, "Falldown", 1)
- elements.property(ntsn, "Gravity", 0.07)
- elements.property(ntsn, "HighTemperature", 63.10)
- elements.property(ntsn, "HighTemperatureTransition", elements.DEFAULT_PT_LNTG)
- elements.property(elements.DEFAULT_PT_DRIC, "Description", "Dry Ice, formed when carbon dioxide is cooled")
- elements.property(elements.DEFAULT_PT_DRIC, "HighPressure", 1.43)
- elements.property(elements.DEFAULT_PT_DRIC, "HighPressureTransition", elements.RADM_PT_DRSN)
- elements.property(elements.DEFAULT_PT_NICE, "HighPressure", 1.43)
- elements.property(elements.DEFAULT_PT_NICE, "HighPressureTransition", elements.RADM_PT_NTSN)
- local hgsn = elements.allocate("RADM", "HGSN")
- elements.element(hgsn,elem.element(elem.DEFAULT_PT_DUST))
- elements.property(hgsn, "Name" , "HGSN")
- elements.property(hgsn, "Description" , "Hydrogen snow, formed when metallic hydrogen is pressurized.")
- elements.property(hgsn, "Color", 0x4FDFFF)
- elements.property(hgsn, "Temperature", 2.8)
- elements.property(hgsn, "MenuSection", 8)
- elements.property(hgsn, "MenuVisible", 1)
- elements.property(hgsn, "Weight", 1)
- elements.property(hgsn, "AirDrag", 0.006)
- elements.property(hgsn, "AirLoss", 0.99)
- elements.property(hgsn, "Falldown", 1)
- elements.property(hgsn, "Gravity", 0.07)
- elements.property(hgsn, "HighTemperature", 4.13)
- elements.property(hgsn, "HighTemperatureTransition", elements.RADM_PT_LHYG)
- elements.property(mlhg, "HighPressure", 1.43)
- elements.property(mlhg, "HighPressureTransition", elements.RADM_PT_HGSN)
- --Alpha updates after this
- local irfl = elements.allocate("RADM", "IRFL")
- elements.element(irfl,elem.element(elem.DEFAULT_PT_BRMT))
- elements.property(irfl, "Name" , "IRFL")
- elements.property(irfl, "Description" , "Iron filings, heavy & light.")
- elements.property(irfl, "Color", 0x1F1F2A)
- elements.property(irfl, "Temperature", 340.8)
- elements.property(irfl, "MenuSection", 8)
- elements.property(irfl, "MenuVisible", 1)
- elements.property(irfl, "Weight", 99)
- elements.property(irfl, "AirDrag", 0.001)
- elements.property(irfl, "AirLoss", 0.99)
- elements.property(irfl, "Falldown", 1)
- elements.property(irfl, "Gravity", 0.09)
- elements.property(irfl, "Advection", 3.99)
- elements.property(irfl, "HighTemperature", 3954.12)
- elements.property(irfl, "HighTemperatureTransition", elements.DEFAULT_PT_IRON)
- local grph = elements.allocate("RADM", "GRPH")
- elements.element(grph,elem.element(elem.DEFAULT_PT_METL))
- elements.property(grph, "Name" , "GRPH")
- elements.property(grph, "Description" , "Graphene, extremely durable and heat conductive. Slightly flammable.")
- elements.property(grph, "Color", 0x303036)
- elements.property(grph, "Temperature", 340.8)
- elements.property(grph, "MenuSection", 9)
- elements.property(grph, "MenuVisible", 1)
- elements.property(grph, "Weight", 100)
- elements.property(grph, "HeatConduct", 255)
- elements.property(grph, "Flammable", 0.34)
- local derg = elements.allocate("RADM", "DERG")
- elements.property(derg, "Name" , "DERG")
- elements.property(derg, "Description" , "Dark energy, expands quickly.")
- elements.property(derg, "Color", 0x1F0C1F)
- elements.property(derg, "Temperature", 340.8)
- elements.property(derg, "MenuSection", 11)
- elements.property(derg, "MenuVisible", 1)
- elements.property(derg, "Advection", 0.31)
- elements.property(derg, "Collision", -0.99)
- elements.property(derg, "HotAir", 0.005)
- local oxsn = elements.allocate("RADM", "OXSN")
- elements.element(oxsn,elem.element(elem.DEFAULT_PT_DUST))
- elements.property(oxsn, "Name" , "OXSN")
- elements.property(oxsn, "Description" , "Oxygen snow, forms when solid oxygen is pressurized.")
- elements.property(oxsn, "Color", 0x90B0FF)
- elements.property(oxsn, "Temperature", 24.31)
- elements.property(oxsn, "MenuSection", 8)
- elements.property(oxsn, "MenuVisible", 1)
- elements.property(oxsn, "Weight", 1)
- elements.property(oxsn, "AirDrag", 0.006)
- elements.property(oxsn, "AirLoss", 0.99)
- elements.property(oxsn, "Falldown", 1)
- elements.property(oxsn, "Gravity", 0.07)
- elements.property(oxsn, "HighTemperature", 30.15)
- elements.property(oxsn, "HighTemperatureTransition", elements.DEFAULT_PT_LOXY)
- local soxg = elements.allocate("RADM", "SOXG")
- elements.element(soxg,elem.element(elem.DEFAULT_PT_FILT))
- elements.property(soxg, "Name" , "SOXG")
- elements.property(soxg, "Description" , "Solid oxygen.")
- elements.property(soxg, "HighTemperature", 32.15)
- elements.property(soxg, "Temperature", 19.42)
- elements.property(soxg, "HighTemperatureTransition", elements.DEFAULT_PT_LOXY)
- elements.property(soxg, "Color", 0x9FBFFF)
- elements.property(soxg, "HighPressure", 0.76)
- elements.property(soxg, "HighPressureTransition", elements.RADM_PT_OXSN)
- elements.property(elements.DEFAULT_PT_LOXY, "LowTemperature", 31.78)
- elements.property(elements.DEFAULT_PT_LOXY, "LowTemperatureTransition", elements.RADM_PT_SOXG)
- elements.property(elements.DEFAULT_PT_LOXY, "Color", 0x7080DF)
- local lgli = elements.allocate("RADM", "LGLI")
- elements.element(lgli,elem.element(elem.DEFAULT_PT_MERC))
- elements.property(lgli, "Name" , "LGLI")
- elements.property(lgli, "Description" , "Liquid gallium.")
- elements.property(lgli, "Temperature", 324.51)
- elements.property(lgli, "Color", 0x8F8F8F)
- elements.property(lgli, "Weight", 40)
- elements.property(elem.RADM_PT_LGLI, "Update", --*1
- function(i,x,y,s,nt) --1
- if s ~=8 and nt ~=0 and nt - s > 0 then --2
- for r in sim.neighbors(x,y,1,1) do --3
- if math.random(1,10) > 1 then --4
- sim.partProperty(i, "vy", 0)
- end --4
- if math.random(1,10) > 3 then --5
- sim.partProperty(i, "vx", 0)
- end --5
- end --3
- end --2
- end --1
- ) --*1
- local gali = elements.allocate("RADM", "GALI")
- elements.element(gali,elem.element(elem.DEFAULT_PT_NSCN))
- elements.property(gali, "Name" , "GALI")
- elements.property(gali, "Description" , "Gallium, melts easily.")
- elements.property(gali, "Temperature", 295.73)
- elements.property(gali, "Color", 0x9F9F9F)
- elements.property(gali, "HighTemperature", 324.51)
- elements.property(gali, "HighTemperatureTransition", elements.RADM_PT_LGLI)
- elements.property(lgli, "LowTemperature", 310.52)
- elements.property(lgli, "LowTemperatureTransition", elements.RADM_PT_GALI)
- elements.property(elements.DEFAULT_PT_NBLE, "Description", "Neon, turns into plasma when electrified")
- elements.property(elements.DEFAULT_PT_NBLE, "Name", "NEON")
- elements.property(elements.DEFAULT_PT_NBLE, "Color", 0x7FFF00)
- elements.property(elements.DEFAULT_PT_NBLE, "Diffusion", 2.14)
- elements.property(elements.DEFAULT_PT_NBLE, "HotAir", 0.0004)
- elements.property(elements.DEFAULT_PT_NBLE, "Gravity", -0.1)
- local lneo = elements.allocate("RADM", "LNEO")
- elements.element(lneo,elem.element(elem.DEFAULT_PT_MERC))
- elements.property(lneo, "Name" , "LNEO")
- elements.property(lneo, "Description" , "Liquid neon, cold and conductive.")
- elements.property(lneo, "Temperature", 85.47)
- elements.property(lneo, "Color", 0x70F040)
- elements.property(lneo, "Weight", 3)
- elements.property(lneo, "HighTemperature", 132.45)
- elements.property(lneo, "HighTemperatureTransition", elements.DEFAULT_PT_NBLE)
- elements.property(elem.RADM_PT_LNEO, "Update", --*1
- function(i,x,y,s,nt) --1
- superfluid(i,x,y,s,nt,0.45,3,3)
- end --1
- ) --*1
- elements.property(elements.DEFAULT_PT_NBLE, "LowTemperature", 103.26)
- elements.property(elements.DEFAULT_PT_NBLE, "LowTemperatureTransition", elements.RADM_PT_LNEO)
- local ozon = elements.allocate("RADM", "OZON")
- elements.element(ozon,elem.element(elem.DEFAULT_PT_HYGN))
- elements.property(ozon, "Description", "Ozone, turns into oxygen when heated by an object.")
- elements.property(ozon, "Name", "OZON")
- elements.property(ozon, "Color", 0x3242CD)
- elements.property(ozon, "Diffusion", 2.14)
- elements.property(ozon, "HotAir", 0.001)
- elements.property(ozon, "Gravity", -0.01)
- elements.property(elem.RADM_PT_OZON, "Update", --*1
- function(i,x,y,s,nt) --1
- if s ~=8 and nt ~= 0 and nt - s > 0 then --2
- for r in sim.neighbors(x,y,1,1) do --3
- if sim.partProperty(i, "temp") > 900 then --4
- if math.random(1,128) == 4 then --5
- sim.partChangeType(i, elements.DEFAULT_PT_OXYG)
- end --5
- end --4
- end --3
- end --2
- end --1
- ) --*1
- local lozn = elements.allocate("RADM", "LOZN")
- elements.element(lozn,elem.element(elem.DEFAULT_PT_SOAP))
- elements.property(lozn, "Name" , "LOZN")
- elements.property(lozn, "Description" , "Liquid ozone, cold.")
- elements.property(lozn, "Temperature", 152.34)
- elements.property(lozn, "Color", 0x0510AB)
- elements.property(lozn, "Weight", 3)
- elements.property(lozn, "HighTemperature", 164.52)
- elements.property(lozn, "HighTemperatureTransition", elements.RADM_PT_OZON)
- elements.property(elem.RADM_PT_LOZN, "Update", --*1
- function(i,x,y,s,nt) --1
- superfluid(i,x,y,s,nt,0.333,3,2)
- end --1
- ) --*1
- elements.property(ozon, "LowTemperature", 150.34)
- elements.property(ozon, "LowTemperatureTransition", elements.RADM_PT_LOZN)
- elements.property(elements.DEFAULT_PT_PLSM, "Diffusion", 1)
- local bsei = elements.allocate("RADM", "BSEI")
- elements.element(bsei, elements.element(elements.DEFAULT_PT_ELEC))
- elements.property(bsei, "Name" , "BSEI")
- elements.property(bsei, "Description" , "Bose einstein condensates, cold.")
- elements.property(bsei, "Color", 0xCC7CC0)
- elements.property(bsei, "Diffusion", 0.3)
- function boseinDecay(i,x,y,s,n) --*1
- if math.random(1,10) == 10 then --1
- sim.partProperty(i, "temp", 0)
- end --1
- end --*1
- function boseinUpdate(i,x,y,s,n) --*2
- velocity(i,2,360)
- boseinDecay(i,x,y,s,n)
- end --*2
- elements.property(bsei,"Update",boseinUpdate)
- local function funcGraphics(i, colr, colg, colb) --*1
- return 1,ren.FIRE_ADD,255,colr,colg,colb,192,204,124,192
- end --*1
- elements.property(bsei, "Graphics", funcGraphics)
- local cprn = elements.allocate("RADM" , "CPRN")
- elements.element(cprn, elements.element(elements.DEFAULT_PT_PLUT))
- elements.property(cprn, "Name" , "CPRN")
- elements.property(cprn, "Description" , "Copernicium, extremely reactive.")
- elements.property(cprn, "Color", 0x073140)
- elements.property(cprn, "Diffusion", 0.25)
- elements.property(cprn, "MenuSection", 10)
- function copernicium(i,x,y,s,n)
- if tpt.get_property("type", x + math.random(-2,2), y + math.random(-2,2)) == tpt.el.neut.id then --1
- tpt.create(x + math.random(-2,2), y + math.random(-2,2), 'al26')
- tpt.create(x + math.random(-2,2), y + math.random(-2,2), 'uran')
- tpt.create(x + math.random(-2,2), y + math.random(-2,2), 'plut')
- tpt.create(x + math.random(-2,2), y + math.random(-2,2), 'ogan')
- sim.pressure(x/4,y/4,0.01)
- tpt.set_property("temp", math.huge, x, y)
- tpt.parts[i].type = tpt.el.neut.id
- end --1
- if sim.pressure(x/4,y/4) > 1 then --3
- if math.random(1,250) == 10 then --4
- tpt.create(x + math.random(-2,2), y + math.random(-2,2), 'neut')
- end --4
- end --3
- if math.random(1,10000) == 10 then --5
- tpt.set_property("temp", math.huge, x ,y)
- end --5
- end --*1
- tpt.element_func(copernicium,cprn)
- function neutron(i,x,y,s,n) --*2
- if tpt.get_property("type", x + math.random(-2,2), y + math.random(-2,2)) == neut then --1
- if math.random(1,30) == 10 then --2
- tpt.create(x + math.random(-2,2), y + math.random(-2,2), 'neut')
- end --2
- end --1
- end --*2
- tpt.element_func(neutron,tpt.el.neut.id)
- local ptsi = elements.allocate("RADM", "PTSI")
- elements.element(ptsi, elements.element(elements.DEFAULT_PT_BRMT))
- elements.property(ptsi, "Name" , "PTSI")
- elements.property(ptsi, "Description" , "Potassium, alkali metal. Incredibly reactive to water.")
- elements.property(ptsi, "Flammable", 10.95)
- elements.property(ptsi, "Color", 0x09084D)
- elements.property(ptsi, "Temperature", 337.8)
- elements.property(ptsi, "MenuSection", 8)
- elements.property(ptsi, "HighPressure", 1.07)
- elements.property(ptsi, "HighPressureTransition", elements.RADM_PT_FIRE)
- elements.property(ptsi, "Gravity", 0.20)
- elements.property(ptsi, "Weight", 5.13)
- elements.property(elem.RADM_PT_PTSI, "Update", --*1
- function(i,x,y,s,nt) --1
- if s ~=8 and nt ~= 0 and nt - s > 0 then --2
- for r in sim.neighbors(x,y,1,1) do --3
- if sim.partProperty(r, "type") == elements.DEFAULT_PT_WATR then --4
- if math.random(1,16) == 4 then --5
- sim.partProperty(r, "type", elements.DEFAULT_PT_FIRE)
- if math.random(1,3) == 3 then --6
- sim.pressure(x/4,y/4,0.2)
- sim.partProperty(i, "temp", 978.56)
- tpt.delete(i)
- end --6
- end --5
- end --4
- end --3
- end --2
- end --1
- ) --*1
- local bctr = elements.allocate("RADM", "BCTR")
- elements.element(bctr, elements.element(elements.DEFAULT_PT_SOAP))
- elements.property(bctr, "Name" , "BCTR")
- elements.property(bctr, "Description" , "Bacteria, spreads and sticks.")
- elements.property(bctr, "Color", 0xE0FAA1)
- elements.property(bctr, "Diffusion", 0.3)
- elements.property(bctr, "Weight", 30)
- elements.property(elem.RADM_PT_BCTR, "Update", --*1
- function(i,x,y,s,nt) --1
- if s ~=8 and nt ~=0 and nt - s > 0 then --2
- for r in sim.neighbors(x,y,1,1) do --3
- if math.random(1,10) > 1 then --4
- sim.partProperty(i, "vy", 0)
- end --4
- if math.random(1,10) > 1 then --5
- sim.partProperty(i, "vx", 0)
- end --5
- if math.random(1,20) < 4 then --6
- sim.partCreate(-1, math.random(x-1,x+1),math.random(y-1,y+1),elements.RADM_PT_BCTR)
- end --6
- if math.random(1,40) < 2 then --7
- sim.partKill(i)
- end --7
- if sim.partProperty(r, "type") == elements.DEFAULT_PT_WOOD then --8
- if math.random(1,20) < 2 then --9
- sim.partKill(r)
- sim.partCreate(-1, math.random(x-1,x+1),math.random(y-1,y+1),elements.RADM_PT_BCTR)
- sim.partCreate(-1, math.random(x-1,x+1),math.random(y-1,y+1),elements.RADM_PT_BCTR)
- end --9
- end --8
- if sim.partProperty(r, "type") == elements.DEFAULT_PT_PLNT then --10
- if math.random(1,20) < 2 then --11
- sim.partKill(r)
- sim.partCreate(-1, math.random(x-1,x+1),math.random(y-1,y+1),elements.RADM_PT_BCTR)
- sim.partCreate(-1, math.random(x-1,x+1),math.random(y-1,y+1),elements.RADM_PT_BCTR)
- end --11
- end --10
- end --3
- end --2
- end --1
- ) --*1
- local naoh = elements.allocate("RADM", "NAOH")
- elements.element(naoh, elements.element(elements.DEFAULT_PT_SOAP))
- elements.property(naoh, "Name" , "NAOH")
- elements.property(naoh, "Description", "NaOH aq, makes salt and water with acid.")
- elements.property(naoh, "Color", 0x2140DF)
- elements.property(naoh, "Temperature", 337.8)
- elements.property(naoh, "MenuSection", 7)
- elements.property(naoh, "HighPressure", 1.07)
- elements.property(naoh, "HighPressureTransition", elements.RADM_PT_FIRE)
- elements.property(naoh, "Gravity", 0.20)
- elements.property(naoh, "Weight", 5.13)
- elements.property(elem.RADM_PT_NAOH, "Update", --*1
- function(i,x,y,s,nt) --1
- if s ~=8 and nt ~= 0 and nt - s > 0 then --2
- for r in sim.neighbors(x,y,1,1) do --3
- if sim.partProperty(r, "type") == elements.DEFAULT_PT_ACID then --4
- if math.random(1,16) == 4 then --5
- sim.partProperty(r, "type", elements.DEFAULT_PT_SLTW)
- if math.random(1,4) == 3 then --6
- tpt.delete(i)
- end --6
- end --5
- end --4
- end --3
- end --2
- end --1
- ) --*1
- local sdim = elements.allocate("RADM", "SDIM")
- elements.element(sdim, elements.element(elements.DEFAULT_PT_METL))
- elements.property(sdim, "Name" , "SDIM")
- elements.property(sdim, "Description", "Sodium, alkali metal. Very reactive to water.")
- elements.property(sdim, "Flammable", 3.95)
- elements.property(sdim, "Color", 0xDFEFDF)
- elements.property(sdim, "Temperature", 337.8)
- elements.property(sdim, "MenuSection", 1)
- elements.property(sdim, "HighPressure", 1.07)
- elements.property(sdim, "HighPressureTransition", elements.RADM_PT_FIRE)
- elements.property(elem.RADM_PT_SDIM, "Update", --*1
- function(i,x,y,s,nt) --1
- if s ~=8 and nt ~= 0 and nt - s > 0 then --2
- for r in sim.neighbors(x,y,1,1) do --3
- if sim.partProperty(r, "type") == elements.DEFAULT_PT_WATR then --4
- if math.random(1,32) == 4 then --5
- sim.partProperty(r, "type", elements.DEFAULT_PT_FIRE)
- sim.partProperty(i, "type", elements.RADM_PT_NAOH)
- if math.random(1,3) == 3 then --6
- sim.pressure(x/4,y/4,0.8)
- sim.partProperty(i, "temp", 956.42)
- if math.random(1,2) == 2 then --7
- tpt.delete(i)
- end --7
- end --6
- end --5
- end --4
- end --3
- end --2
- end --1
- ) --*1
- local frnc = elements.allocate("RADM", "FRNC")
- elements.element(frnc, elements.element(elements.DEFAULT_PT_METL))
- elements.property(frnc, "Name" , "FRNC")
- elements.property(frnc, "Description", "Francium, alkali metal. Very reactive to water.")
- elements.property(frnc, "Flammable", 42.95)
- elements.property(frnc, "Color", 0xD1842E)
- elements.property(frnc, "Temperature", 337.8)
- elements.property(frnc, "MenuSection", 1)
- elements.property(frnc, "HighPressure", 0.107)
- elements.property(frnc, "HighPressureTransition", elements.RADM_PT_FIRE)
- elements.property(elem.RADM_PT_FRNC, "Update", --*1
- function(i,x,y,s,nt) --1
- if s ~=8 and nt ~= 0 and nt - s > 0 then --2
- for r in sim.neighbors(x,y,1,1) do --3
- if sim.partProperty(r, "type") == elements.DEFAULT_PT_WATR then --4
- if math.random(1,16) == 4 then --5
- sim.partProperty(r, "type", elements.DEFAULT_PT_FIRE)
- if math.random(1,2) == 2 then --6
- sim.pressure(x/4,y/4,0.8)
- sim.partProperty(i, "temp", 2956.42)
- if math.random(1,2) == 2 then --7
- tpt.delete(i)
- end --7
- end --6
- end --5
- end --4
- end --3
- end --2
- end --1
- ) --*1
- local ltrt = elements.allocate("RADM", "LTRT")
- elements.element(ltrt,elem.element(elem.DEFAULT_PT_DEUT))
- elements.property(ltrt, "Name" , "LTRT")
- elements.property(ltrt, "Description" , "Liquid tritium, neutrons can pass through it. Superfluid.")
- elements.property(ltrt, "Temperature", 23.14)
- elements.property(ltrt, "Color", 0xB3B1CF)
- elements.property(ltrt, "Weight", 3)
- elements.property(ltrt, "HighTemperature", 25.43)
- elements.property(ltrt, "HighTemperatureTransition", elements.RADM_PT_TRIT)
- elements.property(ltrt, "MenuSection", 7)
- elements.property(elem.RADM_PT_LTRT, "Update", --*1
- function(i,x,y,s,nt) --1
- superfluid(i,x,y,s,nt,0.75,2,3)
- end --1
- ) --*1
- elements.property(trit, "LowTemperature", 21.54)
- elements.property(trit, "LowTemperatureTransition", elements.RADM_PT_LTRT)
- local glgs = elements.allocate("RADM", "GLGS")
- elements.element(glgs,elem.element(elem.DEFAULT_PT_HYGN))
- elements.property(glgs, "Name" , "GLGS")
- elements.property(glgs, "Description" , "Glow gas, very heat conductive")
- elements.property(glgs, "HeatConduct", 255)
- elements.property(glgs, "Diffusion", 2.45)
- elements.property(glgs, "Color", 0x00FF00)
- local function funcGraphics(i, colr, colg, colb) --*1
- return 1,ren.FIRE_ADD,255,colr,colg,colb,192,0,255,0
- end --*1
- elements.property(glgs, "Graphics", funcGraphics)
- local lmun = elements.allocate("RADM", "LMUN")
- elements.element(lmun,elem.element(elem.DEFAULT_PT_SOAP))
- elements.property(lmun, "Name" , "LMUN")
- elements.property(lmun, "Description", "Liquid muonium, extremely light. Superfluid.")
- elements.property(lmun, "Temperature", 0.91)
- elements.property(lmun, "Color", 0xCDCD43)
- elements.property(lmun, "Weight", 3)
- elements.property(lmun, "MenuSection", 7)
- elements.property(lmun, "Gravity", 0.04)
- elements.property(elem.RADM_PT_LMUN, "Update", --*1
- function(i,x,y,s,nt) --1
- superfluid(i,x,y,s,nt,1.5,2,3)
- end --1
- ) --*1
- local munm = elements.allocate("RADM", "MUNM")
- elements.element(munm, elements.element(elements.DEFAULT_PT_HYGN))
- elements.property(munm, "Name" , "MUNM")
- elements.property(munm, "Description" , "Muonium, extremely light. Turns into liquid muonium at very low temperatures.")
- elements.property(munm, "Color", 0xBCBC32)
- elements.property(munm, "Temperature", 90.8)
- elements.property(munm, "MenuSection", 6)
- elements.property(munm, "LowTemperature", 1.03)
- elements.property(munm, "LowTemperatureTransition", elements.RADM_PT_LMUN)
- elements.property(munm, "Diffusion", 0.12)
- elements.property(munm, "Falldown", 2)
- elements.property(munm, "AirDrag", 0.015)
- elements.property(munm, "Gravity", -0.189)
- elements.property(lmun, "HighTemperature", 1.43)
- elements.property(lmun, "HighTemperatureTransition", elements.RADM_PT_MUNM)
- local caes = elements.allocate("RADM", "CAES")
- elements.element(caes, elements.element(elements.DEFAULT_PT_METL))
- elements.property(caes, "Name" , "CAES")
- elements.property(caes, "Description", "Caesium, alkali metal. Extremely reactive to water.")
- elements.property(caes, "Flammable", 3.95)
- elements.property(caes, "Color", 0xACAC8A)
- elements.property(caes, "Temperature", 337.8)
- elements.property(caes, "MenuSection", 1)
- elements.property(caes, "Explosive", 2)
- elements.property(caes, "HighPressure", 1.07)
- elements.property(caes, "HighPressureTransition", elements.RADM_PT_FIRE)
- elements.property(elem.RADM_PT_CAES, "Update", --*1
- function(i,x,y,s,nt) --1
- if s ~=8 and nt ~= 0 and nt - s > 0 then --2
- for r in sim.neighbors(x,y,1,1) do --3
- if sim.partProperty(r, "type") == elements.DEFAULT_PT_WATR then --4
- if math.random(1,32) == 4 then --5
- sim.partProperty(r, "type", elements.DEFAULT_PT_PLSM)
- if math.random(1,3) == 3 then --6
- sim.pressure(x/4,y/4,0.8)
- sim.partProperty(i, "temp", 9956.42)
- if math.random(1,2) == 2 then --7
- tpt.delete(i)
- end --7
- end --6
- end --5
- end --4
- end --3
- end --2
- end --1
- ) --*1
- elements.property(elem.DEFAULT_PT_LOXY, "Description", "Liquid Oxygen. Very cold, slightly superfluid. Reacts with fire")
- elements.property(elem.DEFAULT_PT_LOXY, "Update", --*1
- function(i,x,y,s,nt) --1
- superfluid(i,x,y,s,nt,0.25,8,5)
- end --1
- ) --*1
- local slvr = elements.allocate("RADM", "SLVR")
- elements.element(slvr, elements.element(elements.DEFAULT_PT_METL))
- elements.property(slvr, "Name" , "SLVR")
- elements.property(slvr, "Description", "Silver, resists sulfuric acid. Very heat conductive.")
- elements.property(slvr, "Hardness", 0)
- elements.property(slvr, "Color", 0xA8A8A8)
- elements.property(slvr, "Temperature", 337.8)
- elements.property(slvr, "MenuSection", 1)
- elements.property(slvr, "HeatConduct", 255)
- local nept = elements.allocate("RADM" , "NEPT")
- elements.element(nept, elements.element(elements.DEFAULT_PT_PLUT))
- elements.property(nept, "Name" , "NEPT")
- elements.property(nept, "Description" , "Neptunium, very reactive.")
- elements.property(nept, "Color", 0x557020)
- elements.property(nept, "MenuSection", 10)
- function neptunium(i,x,y,s,n)
- if tpt.get_property("type", x + math.random(-2,2), y + math.random(-2,2)) == tpt.el.neut.id then --1
- if math.random(1,4) == 1 then --2/2
- tpt.parts[i].type = elements.DEFAULT_PT_URAN
- elseif math.random(1,10) == 1 then --2/1
- tpt.parts[i].type = elements.RADM_PT_HLUM
- end --2
- end --1
- if sim.pressure(x/4,y/4) > 1 then --3
- if math.random(1,250) == 10 then --4
- tpt.create(x + math.random(-2,2), y + math.random(-2,2), 'neut')
- tpt.set_property("temp", math.huge, x ,y)
- end --4
- end --3
- if math.random(1,10000) == 10 then --5
- sim.pressure(x/4,y/4,0.1)
- end --5
- end --*1
- tpt.element_func(neptunium,nept)
- function neutron(i,x,y,s,n) --*2
- if tpt.get_property("type", x + math.random(-2,2), y + math.random(-2,2)) == nept then --1
- if math.random(1,30) == 10 then --2
- tpt.create(x + math.random(-2,2), y + math.random(-2,2), 'neut')
- end --2
- end --1
- end --*2
- tpt.element_func(neutron,tpt.el.neut.id)
- elements.property(elements.DEFAULT_PT_URAN, "Color", 0x385808)
- elements.property(elements.DEFAULT_PT_PLUT, "Color", 0xA87018)
- local lrdn = elements.allocate("RADM", "LRDN")
- elements.element(lrdn,elem.element(elem.DEFAULT_PT_SOAP))
- elements.property(lrdn, "Name" , "LRDN")
- elements.property(lrdn, "Description", "Liquid radon. Superfluid.")
- elements.property(lrdn, "Temperature", 0.91)
- elements.property(lrdn, "Color", 0x688830)
- elements.property(lrdn, "Weight", 3)
- elements.property(lrdn, "MenuSection", 7)
- elements.property(lrdn, "Gravity", 0.04)
- elements.property(elem.RADM_PT_LRDN, "Update", --*1
- function(i,x,y,s,nt) --1
- superfluid(i,x,y,s,nt,0.675,4,3)
- end --1
- ) --*1
- local radn = elements.allocate("RADM", "RADN")
- elements.element(radn, elements.element(elements.DEFAULT_PT_HYGN))
- elements.property(radn, "Name" , "RADN")
- elements.property(radn, "Description" , "Radon, light gas.")
- elements.property(radn, "Color", 0x789840)
- elements.property(radn, "Temperature", 301.8)
- elements.property(radn, "MenuSection", 6)
- elements.property(radn, "LowTemperature", 211.45)
- elements.property(radn, "LowTemperatureTransition", elements.RADM_PT_LRDN)
- elements.property(radn, "Diffusion", 0.31)
- elements.property(radn, "Falldown", 2)
- elements.property(radn, "AirDrag", 0.005)
- elements.property(radn, "Gravity", -0.11)
- elements.property(lrdn, "HighTemperature", 213.56)
- elements.property(lrdn, "HighTemperatureTransition", elements.RADM_PT_RADN)
- local sulf = elements.allocate("RADM", "SULF")
- elements.element(sulf, elements.element(elements.DEFAULT_PT_DUST))
- elements.property(sulf, "Name" , "SULF")
- elements.property(sulf, "Description" , "Sulfur, very flammable.")
- elements.property(sulf, "Flammable", 40.12)
- elements.property(sulf, "Color", 0xA59314)
- elements.property(sulf, "Temperature", 310.2)
- elements.property(sulf, "MenuSection", 8)
- elements.property(sulf, "Gravity", 0.10)
- elements.property(sulf, "Weight", 30.23)
- elements.property(sulf, "Explosive", 1)
- local torm = elements.allocate("RADM" , "TORM")
- elements.element(torm, elements.element(elements.DEFAULT_PT_PLUT))
- elements.property(torm, "Name" , "TORM")
- elements.property(torm, "Description" , "Thorium, slightly reactive.")
- elements.property(torm, "Color", 0xA9BBD8)
- elements.property(torm, "MenuSection", 10)
- function thorium(i,x,y,s,n) --*1
- if tpt.get_property("type", x + math.random(-3,3), y + math.random(-3,3)) == tpt.el.neut.id then --1
- if math.random(1,6) == 1 then --2/2
- tpt.parts[i].type = elements.DEFAULT_PT_BRMT
- elseif math.random(1,13) == 1 then --2/1
- tpt.parts[i].type = elements.RADM_PT_RADN
- end --2
- end --1
- if sim.pressure(x/4,y/4) > 2 then --3
- if math.random(1,250) == 10 then --4
- tpt.create(x + math.random(-2,2), y + math.random(-2,2), 'neut')
- tpt.set_property("temp", math.huge, x ,y)
- end --4
- end --3
- if math.random(1,10000) == 10 then --5
- sim.pressure(x/4,y/4,0.05)
- end --5
- end --*1
- tpt.element_func(thorium,torm)
- function neutron(i,x,y,s,n) --*2
- if tpt.get_property("type", x + math.random(-2,2), y + math.random(-2,2)) == torm then --1
- if math.random(1,32) == 10 then --2
- tpt.create(x + math.random(-2,2), y + math.random(-2,2), 'neut')
- end --2
- end --1
- end --*2
- tpt.element_func(neutron,tpt.el.neut.id)
- local qgp = elements.allocate("RADM", "QGP")
- elements.element(qgp, elements.element(elements.RADM_PT_HLUM))
- elements.property(qgp, "Name" , "QGP")
- elements.property(qgp, "Description" , "Quark-Gluon Plasma, hot.")
- elements.property(qgp, "Color", 0x10FF88)
- elements.property(qgp, "Weight", -1)
- elements.property(qgp, "Collision", -0.99)
- elements.property(qgp, "Diffusion", 0.3)
- function qgpHeat(i,x,y,s,n) --*1
- if math.random(1,50) == 10 then --1
- sim.partProperty(i, "temp", 9725.85)
- end --1
- end --*1
- function qgpUpdate(i,x,y,s,n) --*2
- qgpHeat(i,x,y,s,n)
- end --*2
- elements.property(qgp,"Update",qgpUpdate)
- local function funcGraphics(i, colr, colg, colb) --*1
- return 1,ren.FIRE_ADD,255,colr,colg,colb,192,16,255,136
- end --*1
- elements.property(qgp, "Graphics", funcGraphics)
- local fngi = elements.allocate("RADM", "FNGI")
- elements.element(fngi, elements.element(elements.DEFAULT_PT_SOAP))
- elements.property(fngi, "Name" , "FNGI")
- elements.property(fngi, "Description" , "Fungi, spreads with spores.")
- elements.property(fngi, "Color", 0x884400)
- elements.property(fngi, "Diffusion", 0.25)
- elements.property(fngi, "MenuSection", 11)
- elements.property(fngi, "Gravity", 0.05)
- elements.property(fngi, "Weight", 31)
- elements.property(elem.RADM_PT_FNGI, "Update", --*1
- function(i,x,y,s,nt) --1
- if s ~=8 and nt ~=0 and nt - s > 0 then --2
- for r in sim.neighbors(x,y,1,1) do --3
- if math.random(1,30) > 1 then --4
- sim.partProperty(i, "vy", 0)
- end --4
- if math.random(1,30) > 1 then --5
- sim.partProperty(i, "vx", 0)
- end --5
- if math.random(1,50) < 4 then --6
- sim.partCreate(-1, math.random(x-1,x+1),math.random(y-1,y+1),elements.RADM_PT_FNGI)
- end --6
- if math.random(1,80) < 2 then --7
- sim.partKill(i)
- end --7
- if sim.partProperty(r, "type") == elements.DEFAULT_PT_PLNT then --8
- if math.random(1,40) < 2 then --9
- sim.partKill(r)
- sim.partCreate(-1, math.random(x-1,x+1),math.random(y-1,y+1),elements.RADM_PT_FNGI)
- sim.partCreate(-1, math.random(x-1,x+1),math.random(y-1,y+1),elements.RADM_PT_FNGI)
- end --9
- end --8
- end --3
- end --2
- end --1
- ) --*1
- local alge = elements.allocate("RADM", "ALGE")
- elements.element(alge, elements.element(elements.DEFAULT_PT_SOAP))
- elements.property(alge, "Name" , "ALGE")
- elements.property(alge, "Description" , "Algae, live on water.")
- elements.property(alge, "Color", 0x007700)
- elements.property(alge, "Diffusion", 0.15)
- elements.property(alge, "MenuSection", 11)
- elements.property(alge, "Gravity", 0.09)
- elements.property(alge, "Weight", 29)
- elements.property(elem.RADM_PT_ALGE, "Update", --*1
- function(i,x,y,s,nt) --1
- if s ~=8 and nt ~=0 and nt - s > 0 then --2
- for r in sim.neighbors(x,y,1,1) do --3
- if math.random(1,10) > 1 then --4
- sim.partProperty(i, "vy", 0)
- end --4
- if math.random(1,10) > 1 then --5
- sim.partProperty(i, "vx", 0)
- end --5
- if math.random(1,50) < 4 then --6
- sim.partCreate(-1, math.random(x-1,x+1),math.random(y-1,y+1),elements.RADM_PT_ALGE)
- end --6
- if math.random(1,80) < 2 then --7
- sim.partKill(i)
- end --7
- if sim.partProperty(r, "type") == elements.DEFAULT_PT_WATR then --8
- if math.random(1,40) < 2 then --9
- if math.random(1,50) < 2 then --10
- sim.partProperty(r, "type", elements.RADM_PT_ALGE)
- end --10
- sim.partCreate(-1, math.random(x-1,x+1),math.random(y-1,y+1),elements.RADM_PT_ALGE)
- end --9
- end --8
- if sim.partProperty(r, "type") == elements.DEFAULT_PT_WOOD then --11
- if math.random(1,40) < 2 then --12
- sim.partKill(r)
- if math.random(1,40) < 2 then --13
- sim.partCreate(-1, math.random(x-1,x+1),math.random(y-1,y+1),elements.DEFAULT_PT_CO2)
- end --13
- sim.partCreate(-1, math.random(x-1,x+1),math.random(y-1,y+1),elements.RADM_PT_ALGE)
- sim.partCreate(-1, math.random(x-1,x+1),math.random(y-1,y+1),elements.RADM_PT_ALGE)
- end --12
- end --11
- end --3
- end --2
- end --1
- ) --*1
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement