Advertisement
Guest User

QGP

a guest
Mar 19th, 2020
134
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 1.45 KB | None | 0 0
  1. local function attract(i,x,y,a) --*1
  2.  sim.gravMap(x/4,y/4,a)
  3. end --*1
  4.  
  5. local qgp = elements.allocate("TPT" , "QGP")
  6.  elements.element(qgp, elements.element(elements.DEFAULT_PT_WTRV))
  7.  elements.property(qgp, "Name" , "QGP")
  8.  elements.property(qgp, "Description" , "Quark-Gluon Plasma,")
  9.  elements.property(qgp, "Color", 0x06FF18)
  10.  elements.property(qgp, "PhotonReflectWavelengths", 0x00008000)
  11.  elements.property(qgp, "MenuSection", 10)
  12.  elements.property(qgp, "Diffusion", 0.035)
  13.  elements.property(qgp, "Flammable", 0)
  14.  elements.property(qgp, "Loss", -1.0175)
  15.  elements.property(qgp, "LowTemperature", -256)
  16. elements.property(elements.TPT_PT_QGP, "Update", --*1
  17.  function(i,x,y,s,nt) --1
  18.   if sim.partProperty(i, "life") == 0 then --2
  19.    sim.partProperty(i, "life", 1000)
  20.    end --2
  21.   if sim.partProperty(i, "life") > 0 then --3
  22.    sim.partProperty(i, "life", sim.partProperty(i, "life")-1)
  23.    end --3
  24.   attract(i,x,y,math.random(-0.1,0.1))
  25.   sim.partProperty(i, "temp", sim.partProperty(i, "temp")*1.025)
  26.   if sim.partProperty(i, "life") == 1 and math.random(0,63) == 0 then --4
  27.    sim.partKill(i)
  28.    end --4
  29.   if math.random(0,50000) == 0 then --5
  30.    sim.partCreate(-1, math.random(x-1,x+1),math.random(y-1,y+1),elements.DEFAULT_PT_PROT)
  31.    sim.partKill(i)
  32.    end --5
  33.   if math.random(0,5000) == 0 then --6
  34.    sim.partCreate(-1, math.random(x-1,x+1),math.random(y-1,y+1),elements.DEFAULT_PT_NEUT)
  35.    sim.partKill(i)
  36.    end --6
  37.   end --1
  38. ) --*1
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement