Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local function attract(i,x,y,a) --*1
- sim.gravMap(x/4,y/4,a)
- end --*1
- local nept = elements.allocate("TPT" , "NEPT")
- elements.element(nept, elements.element(elements.DEFAULT_PT_PLUT))
- elements.property(nept, "Name" , "NEPT")
- elements.property(nept, "Description" , "Neptunium, radioactive. Heats up when bombarded with neutrons.")
- 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,2) == 1 then --2
- tpt.parts[i].type = elements.DEFAULT_PT_URAN
- 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,35) == 10 then --2
- tpt.create(x, y, 'neut')
- tpt.set_property("temp", math.huge, x ,y)
- end --2
- end --1
- end --*2
- tpt.element_func(neutron,tpt.el.neut.id)
- local vsns = elements.allocate("TPT" , "VSNS")
- elements.element(vsns, elements.element(elements.DEFAULT_PT_DMND))
- elements.property(vsns, "Name" , "VSNS")
- elements.property(vsns, "Description" , "Velocity sensor, creates a spark when something's velocity is higher than its temperature.")
- elements.property(vsns, "Color", 0x3D3125)
- elements.property(vsns, "MenuSection", 3)
- elements.property(vsns, "HeatConduct", 0)
- elements.property(elem.TPT_PT_VSNS, "Update",
- function(i,x,y,s,nt) --1
- for r in sim.neighbors(x,y,1,1) do --2
- if math.sqrt(math.pow(sim.partProperty(r, "vx"),2)+math.pow(sim.partProperty(r, "vy"),2)) > sim.partProperty(i, "temp")-273.15 then --3
- sim.partCreate(-1, x, y+1, elements.DEFAULT_PT_SPRK)
- sim.partCreate(-1, x+1, y+1, elements.DEFAULT_PT_SPRK)
- sim.partCreate(-1, x-1, y+1, elements.DEFAULT_PT_SPRK)
- sim.partCreate(-1, x, y-1, elements.DEFAULT_PT_SPRK)
- sim.partCreate(-1, x+1, y-1, elements.DEFAULT_PT_SPRK)
- sim.partCreate(-1, x-1, y-1, elements.DEFAULT_PT_SPRK)
- sim.partCreate(-1, x+1, y, elements.DEFAULT_PT_SPRK)
- sim.partCreate(-1, x-1, y, elements.DEFAULT_PT_SPRK)
- end --3
- end --2
- end --1
- ) --*1
- local mrcv = elements.allocate("TPT", "MRCV")
- elements.element(mrcv,elem.element(elem.DEFAULT_PT_WTRV))
- elements.property(mrcv, "Name" , "MRCV")
- elements.property(mrcv, "Description" , "Mercury Vapor.")
- elements.property(mrcv, "Color", 0x6D6567)
- elements.property(mrcv, "Temperature", 637.85)
- elements.property(mrcv, "LowTemperature", 618.32)
- elements.property(mrcv, "LowTemperatureTransition", elements.DEFAULT_PT_MERC)
- elements.property(elements.DEFAULT_PT_MERC, "Update", --*1
- function(i,x,y) --1
- if sim.partProperty(i, "temp") > 628.91 then --2
- if math.random(1,450) == 1 then --3
- sim.partChangeType(i, elements.TPT_PT_MRCV)
- end --3
- end --2
- end --1
- ) --*1
- local anti = elements.allocate("TPT" , "ANTI")
- elements.element(anti, elements.element(elements.DEFAULT_PT_SING))
- elements.property(anti, "Name" , "ANTI")
- elements.property(anti, "Description" , "Anti Singularity, emits antigravity. Slowly increases in size")
- elements.property(anti, "Color", 0xDBDBDB)
- elements.property(anti, "HotAir", 0.015)
- elements.property(anti, "MenuSection", 16)
- elements.property(elements.TPT_PT_ANTI, "Update", --*1
- function(i,x,y) --1
- attract(i,x,y,-0.75)
- if math.random(1,30) == 1 then --2
- sim.partCreate(-1, x+math.random(-1,1),y+math.random(-1,1),elements.RADM_PT_ANTI)
- sim.partProperty(i, "temp", sim.partProperty(i, "temp")-20)
- end --2
- end --1
- ) --*1
- local ash = elements.allocate("TPT", "ASH")
- elements.element(ash, elements.element(elements.DEFAULT_PT_DUST))
- elements.property(ash, "Name" , "ASH")
- elements.property(ash, "Description" , "Ash, very light powder. Flammable.")
- elements.property(ash, "Color", 0x393224)
- elements.property(ash, "Gravity", 0.056)
- elements.property(ash, "Advection", 0.2)
- elements.property(ash, "Weight", 2)
- elements.property(ash, "AirDrag", 0.05)
- elements.property(ash, "Flammable", 25.56)
- local lhyg = elements.allocate("TPT", "LHYG")
- elements.element(lhyg, elements.element(elements.DEFAULT_PT_LOXY))
- elements.property(lhyg, "Name" , "LHYG")
- elements.property(lhyg, "Description" , "Liquid Hydrogen, very cold. Incredibly flammable")
- elements.property(lhyg, "Flammable", 5000.65)
- elements.property(lhyg, "Explosive", 1)
- elements.property(lhyg, "Color", 0x87CEFA)
- 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(elements.DEFAULT_PT_HYGN, "LowTemperature", 15.24)
- elements.property(elements.DEFAULT_PT_HYGN, "LowTemperatureTransition", elements.TPT_PT_LHYG)
- local pb = elements.allocate("TPT" , "LEAD")
- elements.element(pb, elements.element(elements.DEFAULT_PT_IRON))
- elements.property(pb, "Name" , "LEAD")
- elements.property(pb, "Description" , "Lead, absorbs neutrons. Conducts electricity.")
- elements.property(pb, "Color", 0x686868)
- elements.property(pb, "HighTemperature", 601.25)
- elements.property(pb, "Properties", elements.PROP_NEUTABSORB+elements.PROP_CONDUCTS+elements.PROP_LIFE_DEC+elements.TYPE_SOLID+elements.PROP_DEADLY)
- local mnpr = elements.allocate("TPT", "MNPR")
- elements.element(mnpr, elements.element(elements.DEFAULT_PT_NBLE))
- elements.property(mnpr, "Name" , "MONO")
- elements.property(mnpr, "Description" , "Monopropellant. Disperses quickly.")
- elements.property(mnpr, "Color", 0xB0B0B0)
- elements.property(mnpr, "Advection", 0.2)
- elements.property(mnpr, "AirDrag", 0.05)
- elements.property(mnpr, "HotAir", 0.01)
- elements.property(mnpr, "MenuSection", 16)
- elements.property(elements.TPT_PT_MNPR, "Update", --*1
- function(i,x,y) --1
- if math.random(1,30) == 1 then --2
- sim.partKill(i)
- end --2
- end --1
- ) --*1
- local mnpl = elements.allocate("TPT", "MNPL")
- elements.element(mnpl, elements.element(elements.DEFAULT_PT_LOXY))
- elements.property(mnpl, "Name" , "MNPL")
- elements.property(mnpl, "Description" , "Liquid Monopropellant. Releases lots of pressure and heat when boiled")
- elements.property(mnpl, "Flammable", 0)
- elements.property(mnpl, "Color", 0xA0A0A0)
- elements.property(mnpl, "Temperature", 180.15)
- elements.property(mnpl, "MenuSection", 5)
- elements.property(mnpl, "Diffusion", 0.1)
- elements.property(mnpl, "HighTemperature", 200.15)
- elements.property(mnpl, "HighTemperatureTransition", elements.TPT_PT_MNPR)
- elements.property(elements.TPT_PT_MNPL, "Update", --*1
- function(i,x,y,s,nt) --1
- for r in sim.neighbors(x,y,1,1) do --2
- if sim.partProperty(r, "type") == elements.TPT_PT_MNPR then --3
- if math.random(1,45) == 1 then --4
- sim.partProperty(i, "temp", sim.partProperty(i, "temp")+50)
- sim.pressure(x/4,y/4,8)
- end --4
- end --3
- end --2
- end --1
- ) --*1
- elements.property(mnpr, "LowTemperature", 190.15)
- elements.property(mnpr, "LowTemperatureTransition", elements.TPT_PT_MNPL)
- local tchn = elements.allocate("TPT" , "TCHN")
- elements.element(tchn, elements.element(elements.DEFAULT_PT_STNE))
- elements.property(tchn, "Name" , "TCHN")
- elements.property(tchn, "Description" , "Technetium, decays over time and leaves heat.")
- elements.property(tchn, "Color", 0x205570)
- elements.property(tchn, "MenuSection", 11)
- elements.property(elements.TPT_PT_TCHN, "Update", --*1
- function(i,x,y) --1
- if math.random(1,11520) == 1 then --2
- sim.partProperty(i, "temp", sim.partProperty(i, "temp")+400)
- sim.pressure(x/4,y/4,8)
- sim.partProperty(i, "type", elements.DEFAULT_PT_STNE)
- end --2
- end --1
- ) --*1
- elements.property(tchn, "HighTemperatureTransition", elements.TPT_PT_TCHN)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement