Advertisement
-Amy-

TPTs Mod Version 3 Update 0

Jun 9th, 2014
521
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 75.63 KB | None | 0 0
  1.  
  2. --TPT's Mod
  3. --Please use cracker64's script manager
  4. --VER 3 UPDATE http://pastebin.com/raw.php?i=jQZ58x68
  5.  
  6. --Version 3
  7.  
  8. function DrawHUD()
  9.    
  10. function mouseclicky(mousex, mousey, button, event)
  11.         if (event == 1) then
  12.             var5 = 1
  13.             end
  14.         if (event == 2) then
  15.             var5 = 2
  16.             end
  17.         end
  18.    
  19. function keyclicky(key, nkey, modifier, event)
  20.         if (key == "." and event == 1) then
  21.             var6 = 1
  22.             else
  23.             var6 = 2
  24.             end
  25.         if (key == "," and event == 1) then
  26.             var7 = 1
  27.             else
  28.             var7 = 2
  29.             end
  30.         if (key == "z" and event == 1) then
  31.             var8 = 1
  32.             else
  33.             var8 = 2
  34.             end
  35.         if (key == "=" and event == 1) then
  36.             var10 = 1
  37.             end
  38.         if (key == "-" and event == 1) then
  39.             var10 = 2
  40.             end
  41.         end
  42.    
  43.     tpt.register_keypress(keyclicky)
  44.     tpt.register_mouseclick(mouseclicky)
  45.        
  46.     if var7 == 1 then
  47.         var9 =  1
  48.         end
  49.     if var6 == 1 then
  50.         var9 = 2
  51.         end
  52.    
  53.     if var9 == 1 then
  54.         vis1 = 0
  55.         var10 = 2
  56.         var8 = 1
  57.         else
  58.         vis1 = 200
  59.         end
  60.    
  61.     if var10 == 1 then
  62.         vis2 = 200
  63.         else
  64.         vis2 = 0
  65.         end
  66.    
  67.     if var8 ~= 1 then
  68.         vis3 = 150
  69.         else
  70.         vis3 = 0
  71.         end
  72.    
  73.    
  74.     if tpt.mousex >= 611 then
  75.         x2 = 611
  76.         else
  77.         x2 = tpt.mousex
  78.         end
  79.    
  80.     if tpt.mousey >= 383 then
  81.         y2 = 383
  82.         else
  83.         y2 = tpt.mousey
  84.         end
  85.    
  86.     local x, y = sim.adjustCoords(x2, y2)
  87.    
  88.     if tpt.get_property("type", x, y) >= 1 then
  89.         ptype = tpt.element(tpt.get_property("type", x, y))
  90.         else
  91.         ptype = "Empty,"
  92.         end
  93.    
  94.     if tpt.get_property("type", x, y) >= 1 then
  95.         var1 = tpt.get_property("temp", x, y)-273.15
  96.         else
  97.         var1 = 293.15
  98.         end
  99.    
  100.     local var2 = var1*100
  101.     local var3 = math.floor(var2)/100
  102.    
  103.     if tpt.get_property("type", x, y) >= 1 then
  104.         temp = var3
  105.         else
  106.         temp = "()"
  107.         end
  108.    
  109.     if tpt.get_property("type", x, y) >= 1 then
  110.         temp2 = math.floor(tpt.get_property("temp", x, y)*10)/10
  111.         else
  112.         temp2 = "()"
  113.         end
  114.    
  115.     if tpt.get_property("type", x, y) >= 1 then
  116.         var12312389 = tpt.get_property("ctype", x, y)
  117.         end
  118.    
  119.     if tpt.get_property("type", x, y) >= 1 and var12312389 >= 0 and var12312389 < sim.PT_NUM then
  120.         ctype = tpt.element(tpt.get_property("ctype", x, y))
  121.         end
  122.    
  123.     if tpt.get_property("type", x, y) == 0 or tpt.get_property("ctype", x, y) < 1 then
  124.         ctype = "()"
  125.         end
  126.    
  127.     if x >= 609 then
  128.         x1 = 609/4
  129.         else
  130.         x1 = x/4
  131.         end
  132.    
  133.     if y >= 381 then
  134.         y1 = 381/4
  135.         else
  136.         y1 = y/4
  137.         end
  138.    
  139.     local var4 = sim.pressure(x1, y1)*100
  140.     local var14 = math.floor(var4)/100
  141.    
  142.     if var14 == "nan" then
  143.         pressure = "Infinite"
  144.         else
  145.         pressure = var14
  146.         end
  147.  
  148.     local parts = tpt.get_numOfParts()
  149.     if tpt.get_property("type", x, y) >= 1 then
  150.         tmp = tpt.get_property("tmp", x, y)
  151.         else
  152.         tmp = "0"
  153.         end
  154.    
  155.     if tpt.get_property("type", x, y) >= 1 then
  156.         life = tpt.get_property("life", x, y)
  157.         else
  158.         life = "0"
  159.         end
  160.    
  161.     if tpt.get_property("type", x, y) >= 1 then
  162.         tmp = tpt.get_property("tmp2", x, y)
  163.         else
  164.         tmp2 = "0"
  165.         end
  166.    
  167.     if tpt.get_property("type", x, y) >= 1 then
  168.         var11 = tpt.get_property("vy", x, y)*1000
  169.         else
  170.         var11 = 0
  171.         end
  172.     if var11 <= 9999 or var11 <= -9999 then
  173.         vy = math.floor(var11)/1000
  174.         else
  175.         vy = "Err(2)"
  176.         end
  177.    
  178.     if tpt.get_property("type", x, y) >= 1 then
  179.         var12 = tpt.get_property("vx", x, y)*1000
  180.         else
  181.         var12 = 0
  182.         end
  183.     if var12 <= 9999 or var12 <= -9999 then
  184.         vx = math.floor(var12)/1000
  185.         else
  186.         vx = "Err(1)"
  187.         end
  188.    
  189.     local draw = graphics.drawText
  190.     local rect = graphics.fillRect
  191.  
  192. rect(398, 13, 187, 12, 55, 55, 55, vis1)
  193. rect(398, 27, 200, 12, 55, 55, 55, vis1)
  194. rect(14, 13, 210, 12, 55, 55, 55, vis1)
  195. rect(398, 41, 180, 12, 55, 55, 55, vis2)
  196.  
  197.     --{MAY BE USEFUL LATER???}graphics.drawText(6, 6, os.date("%a %b %d, %l:%M:%S %p"), 0, 255, 165, 200)
  198.     draw(16, 15, os.date(), 0, 255, 165, vis1)
  199.  
  200.     draw(250, 6, "</> Turn HUD On/Off", 0, 255, 165, vis3)
  201.     draw(250, 16, "-/+ Extra On/Off", 0, 255, 165, vis3)
  202.     draw(550, 30, x, 0, 255, 165, vis1)
  203.     draw(578, 30, y, 0, 255, 165, vis1)
  204.     draw(541, 30, "X:", 0, 255, 165, vis1)
  205.     draw(570, 30, "Y:", 0, 255, 165, vis1)
  206.     draw(435, 15, ctype, 0, 255, 165, vis1)
  207.     draw(400, 15, ptype, 0, 255, 165, vis1)
  208.     draw(558, 15, pressure, 0, 255, 165, vis1)
  209.     draw(465, 15, "Temp:", 0, 255, 165, vis1)
  210.     draw(465, 30, "Tmp:", 0, 255, 165, vis1)
  211.     draw(400, 30, "Life:", 0, 255, 165, vis1)
  212.     draw(535, 15, "Pres:", 0, 255, 165, vis1)
  213.     draw(160, 15, "Parts:", 0, 255, 165, vis1)
  214.     draw(490, 15, temp, 0, 255, 165, vis1)
  215.     draw(485, 30, tmp, 0, 255, 165, vis1)
  216.     draw(422, 30, life, 0, 255, 165, vis1)
  217.     draw(187, 15, parts, 0, 255, 165, vis1)
  218.    
  219.     draw(400, 44, "Temp2:", 0, 255, 165, vis2)
  220.     draw(431, 44, temp2, 0, 255, 165, vis2)
  221.     draw(465, 44, "VX:", 0, 255, 165, vis2)
  222.     draw(535, 44, "VY:", 0, 255, 165, vis2)
  223.     draw(480, 44, vx, 0, 255, 165, vis2)
  224.     draw(550, 44, vy, 0, 255, 165, vis2)
  225.  
  226. end
  227.  
  228. tpt.hud(0)
  229.  
  230. tpt.register_step(DrawHUD)
  231.  
  232. --Draws starting texts
  233.  
  234. print("TPT's Mod")
  235. print("Version 3")
  236. print("Update 0")
  237. print("Created by Amy. All elements were reprogrammed and compiled into a single file.")
  238. print("Contact via email or http://powdertoy.co.uk")
  239. print("New programming by RCAProduction")
  240.  
  241. --TUNG Mod :D
  242.  
  243. function moo(i, x, y, surround_space, nt)
  244.    if sim.pressure(x/4, y/4)<-7 and sim.partProperty(i, sim.FIELD_LIFE)~=0 and surround_space~=0 then
  245.        sim.partCreate(-1, x+math.random(-3,3), y+math.random(-3,3), elem.DEFAULT_PT_ELEC) end
  246.    end
  247.    tpt.element_func(moo, tpt.el.tung.id, 0)
  248.  
  249.    tpt.el.tung.description="Tungsten. Brittle metal with a very high melting point. When sparked under a pressure of -7, emits electrons."
  250.  
  251.  
  252. --METR Element
  253.  
  254. local METR = elements.allocate("ELEMENT", "METR")
  255. elements.element(elements.ELEMENT_PT_METR, elements.element(elements.DEFAULT_PT_ELEC))
  256. elements.property(elements.ELEMENT_PT_METR, "Name", "METR")
  257. elements.property(elements.ELEMENT_PT_METR, "Description", "Meteors, Explode on impact. Use sparingly.")
  258. elements.property(elements.ELEMENT_PT_METR, "Colour", 0xFF7A0002)
  259. elements.property(elements.ELEMENT_PT_METR, "MenuSection", elem.SC_EXPLOSIVE)
  260. elements.property(elements.ELEMENT_PT_METR, "MenuVisible", 1)
  261. elements.property(elements.ELEMENT_PT_METR, "Weight", 100)
  262. elements.property(elements.ELEMENT_PT_METR, "Temperature", 9999)
  263. local function graphics1(i, colr, colg, colb)
  264.     return 1,0x00010000,255,225,0,210,255,255,255,255
  265. end
  266. tpt.graphics_func(graphics1,METR)
  267.  
  268. local function get_property(prop, x, y)
  269.     if x >= 0 and x < sim.XRES and y >=0 and y < sim.YRES then
  270.         return tpt.get_property(prop, x, y)
  271.     end
  272.     return 0
  273. end
  274.  
  275. math.randomseed(os.time())
  276. function metr_update(i, x, y, s, n)
  277.     if tpt.get_property("tmp",i)==0 then
  278.         tpt.parts[i].tmp=1
  279.         randvel=math.random(-20,20)/10
  280.         tpt.parts[i].vx=randvel
  281.         tpt.parts[i].vy=math.sqrt(8-(randvel^2))
  282.     end
  283.  
  284.     xvel=tpt.get_property("vx",i)/2
  285.     yvel=tpt.get_property("vy",i)/2
  286.     if yvel <= 0 or math.abs(xvel) > 1 then
  287.         tpt.delete(i)
  288.     end
  289.  
  290.     xpos=x-xvel
  291.     ypos=y-yvel
  292.     elemtype=get_property("type",xpos,ypos)
  293.  
  294.     if elemtype == 0 then
  295.         tpt.create(xpos,ypos,"bray")
  296.         tpt.set_property("temp",5000,xpos,ypos)
  297.     end
  298.     tpt.parts[i].temp=9999
  299.  
  300.     elemtype25=get_property("type",x+xvel*5,y+yvel*5)
  301.     elemtype24=get_property("type",x+xvel*4,y+yvel*4)
  302.     elemtype23=get_property("type",x+xvel*3,y+yvel*3)
  303.     elemtype22=get_property("type",x+xvel*2,y+yvel*2)
  304.     elemtype21=get_property("type",x+xvel,y+yvel)
  305.     if elemtype25 ~= 0 and elemtype25 ~= elements.ELEMENT_PT_METR and elemtype25 ~= tpt.el.bray.id and elemtype25 ~= tpt.el.dmnd.id and elemtype25 ~= tpt.el.void.id then
  306.         tpt.set_property("type","bomb",i)
  307.         tpt.set_property("life",0,i)
  308.         tpt.set_property("tmp",0,i)
  309.         elseif elemtype24 ~= 0 and elemtype24 ~= elements.ELEMENT_PT_METR and elemtype24 ~= tpt.el.bray.id and elemtype24 ~= tpt.el.dmnd.id and elemtype24 ~= tpt.el.void.id then
  310.             tpt.set_property("type","bomb",i)
  311.             tpt.set_property("life",0,i)
  312.             tpt.set_property("tmp",0,i)
  313.             elseif elemtype23 ~= 0 and elemtype23 ~= elements.ELEMENT_PT_METR and elemtype23 ~= tpt.el.bray.id and elemtype23 ~= tpt.el.dmnd.id and elemtype23 ~= tpt.el.void.id then
  314.                 tpt.set_property("type","bomb",i)
  315.                 tpt.set_property("life",0,i)
  316.                 tpt.set_property("tmp",0,i)
  317.                 elseif elemtype22 ~= 0 and elemtype22 ~= elements.ELEMENT_PT_METR and elemtype22 ~= tpt.el.bray.id and elemtype22 ~= tpt.el.dmnd.id and elemtype22 ~= tpt.el.void.id then
  318.                     tpt.set_property("type","bomb",i)
  319.                     tpt.set_property("life",0,i)
  320.                     tpt.set_property("tmp",0,i)
  321.                     elseif elemtype21 ~= 0 and elemtype21 ~= elements.ELEMENT_PT_METR and elemtype21 ~= tpt.el.bray.id and elemtype21 ~= tpt.el.dmnd.id and elemtype21 ~= tpt.el.void.id then
  322.                         tpt.set_property("type","bomb",i)
  323.                         tpt.set_property("life",0,i)
  324.                         tpt.set_property("tmp",0,i)
  325.                     end
  326.                 end
  327.  
  328.                 tpt.element_func(metr_update, elements.ELEMENT_PT_METR,1)
  329.  
  330. --BMBR Element {Amy}
  331.  
  332. local BMBR = elements.allocate("ELEMENT", "BMBR")
  333. elements.element(elements.ELEMENT_PT_BMBR, elements.element(elements.DEFAULT_PT_ELEC))
  334. elements.property(elements.ELEMENT_PT_BMBR, "Name", "BMBR")
  335. elements.property(elements.ELEMENT_PT_BMBR, "Description", "Right Shooting Bomb.")
  336. elements.property(elements.ELEMENT_PT_BMBR, "Colour", 0xFF31CBD9)
  337. elements.property(elements.ELEMENT_PT_BMBR, "MenuSection", elem.SC_EXPLOSIVE)
  338. elements.property(elements.ELEMENT_PT_BMBR, "MenuVisible", 1)
  339. elements.property(elements.ELEMENT_PT_BMBR, "Weight", 100)
  340. elements.property(elements.ELEMENT_PT_BMBR, "Temperature", 9999)
  341. local function graphics1(i, colr, colg, colb)
  342.     return 1,0x00010000,255,225,0,210,255,255,255,255
  343. end
  344. tpt.graphics_func(graphics1,BMBR)
  345.  
  346. local function get_property(prop, x, y)
  347.     if x >= 0 and x < sim.XRES and y >=0 and y < sim.YRES then
  348.         return tpt.get_property(prop, x, y)
  349.     end
  350.     return 0
  351. end
  352.  
  353. math.randomseed(os.time())
  354. function BMBR_update(i, x, y, s, n)
  355.     if tpt.get_property("tmp",i)==0 then
  356.         tpt.parts[i].tmp=1
  357.                 --randvel=math.random(-20,20)/10
  358.                 tpt.parts[i].vx=3
  359.                 tpt.parts[i].vy=0
  360.             end
  361.  
  362.             xvel=3
  363.             yvel=0
  364.             if math.abs(xvel) < 1 then
  365.                 tpt.delete(i)
  366.             end
  367.  
  368.             xpos=x-xvel
  369.             ypos=y-yvel
  370.             elemtype=get_property("type",xpos,ypos)
  371.  
  372.             if elemtype == 0 then
  373.                 tpt.create(xpos,ypos,"bray")
  374.                 tpt.set_property("temp",5000,xpos,ypos)
  375.             end
  376.             tpt.parts[i].temp=9999
  377.  
  378.             elemtype25=get_property("type",x+xvel*5,y+yvel*5)
  379.             elemtype24=get_property("type",x+xvel*4,y+yvel*4)
  380.             elemtype23=get_property("type",x+xvel*3,y+yvel*3)
  381.             elemtype22=get_property("type",x+xvel*2,y+yvel*2)
  382.             elemtype21=get_property("type",x+xvel,y+yvel)
  383.             if elemtype25 ~= 0 and elemtype25 ~= elements.ELEMENT_PT_BMBR and elemtype25 ~= tpt.el.bray.id and elemtype25 ~= tpt.el.dmnd.id and elemtype25 ~= tpt.el.void.id then
  384.                 tpt.set_property("type","bomb",i)
  385.                 tpt.set_property("life",0,i)
  386.                 tpt.set_property("tmp",0,i)
  387.                 elseif elemtype24 ~= 0 and elemtype24 ~= elements.ELEMENT_PT_BMBR and elemtype24 ~= tpt.el.bray.id and elemtype24 ~= tpt.el.dmnd.id and elemtype24 ~= tpt.el.void.id then
  388.                     tpt.set_property("type","bomb",i)
  389.                     tpt.set_property("life",0,i)
  390.                     tpt.set_property("tmp",0,i)
  391.                     elseif elemtype23 ~= 0 and elemtype23 ~= elements.ELEMENT_PT_BMBR and elemtype23 ~= tpt.el.bray.id and elemtype23 ~= tpt.el.dmnd.id and elemtype23 ~= tpt.el.void.id then
  392.                         tpt.set_property("type","bomb",i)
  393.                         tpt.set_property("life",0,i)
  394.                         tpt.set_property("tmp",0,i)
  395.                         elseif elemtype22 ~= 0 and elemtype22 ~= elements.ELEMENT_PT_BMBR and elemtype22 ~= tpt.el.bray.id and elemtype22 ~= tpt.el.dmnd.id and elemtype22 ~= tpt.el.void.id then
  396.                             tpt.set_property("type","bomb",i)
  397.                             tpt.set_property("life",0,i)
  398.                             tpt.set_property("tmp",0,i)
  399.                             elseif elemtype21 ~= 0 and elemtype21 ~= elements.ELEMENT_PT_BMBR and elemtype21 ~= tpt.el.bray.id and elemtype21 ~= tpt.el.dmnd.id and elemtype21 ~= tpt.el.void.id then
  400.                                 tpt.set_property("type","bomb",i)
  401.                                 tpt.set_property("life",0,i)
  402.                                 tpt.set_property("tmp",0,i)
  403.                             end
  404.                         end
  405.  
  406.                         tpt.element_func(BMBR_update, elements.ELEMENT_PT_BMBR,1)
  407.  
  408. --BMBL Element {Amy}
  409.  
  410. local BMBL = elements.allocate("ELEMENT", "BMBL")
  411. elements.element(elements.ELEMENT_PT_BMBL, elements.element(elements.DEFAULT_PT_ELEC))
  412. elements.property(elements.ELEMENT_PT_BMBL, "Name", "BMBL")
  413. elements.property(elements.ELEMENT_PT_BMBL, "Description", "Left Shooting Bomb.")
  414. elements.property(elements.ELEMENT_PT_BMBL, "Colour", 0xFF20878E)
  415. elements.property(elements.ELEMENT_PT_BMBL, "MenuSection", elem.SC_EXPLOSIVE)
  416. elements.property(elements.ELEMENT_PT_BMBL, "MenuVisible", 1)
  417. elements.property(elements.ELEMENT_PT_BMBL, "Weight", 100)
  418. elements.property(elements.ELEMENT_PT_BMBL, "Temperature", 9999)
  419. local function graphics1(i, colr, colg, colb)
  420.     return 1,0x00010000,255,225,0,210,255,255,255,255
  421. end
  422. tpt.graphics_func(graphics1,BMBL)
  423.  
  424. local function get_property(prop, x, y)
  425.     if x >= 0 and x < sim.XRES and y >=0 and y < sim.YRES then
  426.         return tpt.get_property(prop, x, y)
  427.     end
  428.     return 0
  429. end
  430.  
  431. math.randomseed(os.time())
  432. function BMBL_update(i, x, y, s, n)
  433.     if tpt.get_property("tmp",i)==0 then
  434.         tpt.parts[i].tmp=1
  435.                 --randvel=math.random(-20,20)/10
  436.                 tpt.parts[i].vx=-3
  437.                 tpt.parts[i].vy=0
  438.             end
  439.  
  440.             xvel=-3
  441.             yvel=0
  442.             if math.abs(xvel) < 1 then
  443.                 tpt.delete(i)
  444.             end
  445.  
  446.             xpos=x-xvel
  447.             ypos=y-yvel
  448.             elemtype=get_property("type",xpos,ypos)
  449.  
  450.             if elemtype == 0 then
  451.                 tpt.create(xpos,ypos,"bray")
  452.                 tpt.set_property("temp",5000,xpos,ypos)
  453.             end
  454.             tpt.parts[i].temp=9999
  455.  
  456.             elemtype25=get_property("type",x+xvel*5,y+yvel*5)
  457.             elemtype24=get_property("type",x+xvel*4,y+yvel*4)
  458.             elemtype23=get_property("type",x+xvel*3,y+yvel*3)
  459.             elemtype22=get_property("type",x+xvel*2,y+yvel*2)
  460.             elemtype21=get_property("type",x+xvel,y+yvel)
  461.             if elemtype25 ~= 0 and elemtype25 ~= elements.ELEMENT_PT_BMBL and elemtype25 ~= tpt.el.bray.id and elemtype25 ~= tpt.el.dmnd.id and elemtype25 ~= tpt.el.void.id then
  462.                 tpt.set_property("type","bomb",i)
  463.                 tpt.set_property("life",0,i)
  464.                 tpt.set_property("tmp",0,i)
  465.                 elseif elemtype24 ~= 0 and elemtype24 ~= elements.ELEMENT_PT_BMBL and elemtype24 ~= tpt.el.bray.id and elemtype24 ~= tpt.el.dmnd.id and elemtype24 ~= tpt.el.void.id then
  466.                     tpt.set_property("type","bomb",i)
  467.                     tpt.set_property("life",0,i)
  468.                     tpt.set_property("tmp",0,i)
  469.                     elseif elemtype23 ~= 0 and elemtype23 ~= elements.ELEMENT_PT_BMBL and elemtype23 ~= tpt.el.bray.id and elemtype23 ~= tpt.el.dmnd.id and elemtype23 ~= tpt.el.void.id then
  470.                         tpt.set_property("type","bomb",i)
  471.                         tpt.set_property("life",0,i)
  472.                         tpt.set_property("tmp",0,i)
  473.                         elseif elemtype22 ~= 0 and elemtype22 ~= elements.ELEMENT_PT_BMBL and elemtype22 ~= tpt.el.bray.id and elemtype22 ~= tpt.el.dmnd.id and elemtype22 ~= tpt.el.void.id then
  474.                             tpt.set_property("type","bomb",i)
  475.                             tpt.set_property("life",0,i)
  476.                             tpt.set_property("tmp",0,i)
  477.                             elseif elemtype21 ~= 0 and elemtype21 ~= elements.ELEMENT_PT_BMBL and elemtype21 ~= tpt.el.bray.id and elemtype21 ~= tpt.el.dmnd.id and elemtype21 ~= tpt.el.void.id then
  478.                                 tpt.set_property("type","bomb",i)
  479.                                 tpt.set_property("life",0,i)
  480.                                 tpt.set_property("tmp",0,i)
  481.                             end
  482.                         end
  483.  
  484.                         tpt.element_func(BMBL_update, elements.ELEMENT_PT_BMBL,1)
  485.  
  486. --MRTR {Amy}
  487.  
  488. local MRTR = elements.allocate("ELEMENT", "MRTR")
  489. elements.element(elements.ELEMENT_PT_MRTR, elements.element(elements.DEFAULT_PT_ELEC))
  490. elements.property(elements.ELEMENT_PT_MRTR, "Name", "MRTR")
  491. elements.property(elements.ELEMENT_PT_MRTR, "Description", "Mortar Right.")
  492. elements.property(elements.ELEMENT_PT_MRTR, "Colour", 0xFF2E01E3)
  493. elements.property(elements.ELEMENT_PT_MRTR, "MenuSection", elem.SC_EXPLOSIVE)
  494. elements.property(elements.ELEMENT_PT_MRTR, "MenuVisible", 1)
  495. elements.property(elements.ELEMENT_PT_MRTR, "Weight", 100)
  496. elements.property(elements.ELEMENT_PT_MRTR, "Temperature", 9999)
  497. local function graphics1(i, colr, colg, colb)
  498.     return 1,0x00010000,255,225,0,210,255,255,255,255
  499. end
  500. tpt.graphics_func(graphics1,MRTR)
  501.  
  502. local function get_property(prop, x, y)
  503.     if x >= 0 and x < sim.XRES and y >=0 and y < sim.YRES then
  504.         return tpt.get_property(prop, x, y)
  505.     end
  506.     return 0
  507. end
  508.  
  509. math.randomseed(os.time())
  510. function MRTR_update(i, x, y, s, n)
  511.     if tpt.get_property("tmp",i)==0 then
  512.         tpt.parts[i].tmp=1
  513.                 --randvel=math.random(-20,20)/10
  514.                 tpt.parts[i].vx=3
  515.                 tpt.parts[i].vy=3
  516.             end
  517.  
  518.             xvel=3
  519.             yvel=3
  520.             if math.abs(xvel) < 1 then
  521.                 tpt.delete(i)
  522.             end
  523.  
  524.             xpos=x-xvel
  525.             ypos=y-yvel
  526.             elemtype=get_property("type",xpos,ypos)
  527.  
  528.             if elemtype == 0 then
  529.                 tpt.create(xpos,ypos,"bray")
  530.                 tpt.set_property("temp",5000,xpos,ypos)
  531.             end
  532.             tpt.parts[i].temp=9999
  533.  
  534.             elemtype25=get_property("type",x+xvel*5,y+yvel*5)
  535.             elemtype24=get_property("type",x+xvel*4,y+yvel*4)
  536.             elemtype23=get_property("type",x+xvel*3,y+yvel*3)
  537.             elemtype22=get_property("type",x+xvel*2,y+yvel*2)
  538.             elemtype21=get_property("type",x+xvel,y+yvel)
  539.             if elemtype25 ~= 0 and elemtype25 ~= elements.ELEMENT_PT_MRTR and elemtype25 ~= tpt.el.bray.id and elemtype25 ~= tpt.el.dmnd.id and elemtype25 ~= tpt.el.void.id then
  540.                 tpt.set_property("type","bomb",i)
  541.                 tpt.set_property("life",0,i)
  542.                 tpt.set_property("tmp",0,i)
  543.                 elseif elemtype24 ~= 0 and elemtype24 ~= elements.ELEMENT_PT_MRTR and elemtype24 ~= tpt.el.bray.id and elemtype24 ~= tpt.el.dmnd.id and elemtype24 ~= tpt.el.void.id then
  544.                     tpt.set_property("type","bomb",i)
  545.                     tpt.set_property("life",0,i)
  546.                     tpt.set_property("tmp",0,i)
  547.                     elseif elemtype23 ~= 0 and elemtype23 ~= elements.ELEMENT_PT_MRTR and elemtype23 ~= tpt.el.bray.id and elemtype23 ~= tpt.el.dmnd.id and elemtype23 ~= tpt.el.void.id then
  548.                         tpt.set_property("type","bomb",i)
  549.                         tpt.set_property("life",0,i)
  550.                         tpt.set_property("tmp",0,i)
  551.                         elseif elemtype22 ~= 0 and elemtype22 ~= elements.ELEMENT_PT_MRTR and elemtype22 ~= tpt.el.bray.id and elemtype22 ~= tpt.el.dmnd.id and elemtype22 ~= tpt.el.void.id then
  552.                             tpt.set_property("type","bomb",i)
  553.                             tpt.set_property("life",0,i)
  554.                             tpt.set_property("tmp",0,i)
  555.                             elseif elemtype21 ~= 0 and elemtype21 ~= elements.ELEMENT_PT_MRTR and elemtype21 ~= tpt.el.bray.id and elemtype21 ~= tpt.el.dmnd.id and elemtype21 ~= tpt.el.void.id then
  556.                                 tpt.set_property("type","bomb",i)
  557.                                 tpt.set_property("life",0,i)
  558.                                 tpt.set_property("tmp",0,i)
  559.                             end
  560.                         end
  561.  
  562.                         tpt.element_func(MRTR_update, elements.ELEMENT_PT_MRTR,1)
  563.  
  564. --MRTL {Amy}
  565.  
  566. local MRTL = elements.allocate("ELEMENT", "MRTL")
  567. elements.element(elements.ELEMENT_PT_MRTL, elements.element(elements.DEFAULT_PT_ELEC))
  568. elements.property(elements.ELEMENT_PT_MRTL, "Name", "MRTL")
  569. elements.property(elements.ELEMENT_PT_MRTL, "Description", "Motar Left.")
  570. elements.property(elements.ELEMENT_PT_MRTL, "Colour", 0xFF5068E4)
  571. elements.property(elements.ELEMENT_PT_MRTL, "MenuSection", elem.SC_EXPLOSIVE)
  572. elements.property(elements.ELEMENT_PT_MRTL, "MenuVisible", 1)
  573. elements.property(elements.ELEMENT_PT_MRTL, "Weight", 100)
  574. elements.property(elements.ELEMENT_PT_MRTL, "Temperature", 9999)
  575. local function graphics1(i, colr, colg, colb)
  576.     return 1,0x00010000,255,225,0,210,255,255,255,255
  577. end
  578. tpt.graphics_func(graphics1,MRTL)
  579.  
  580. local function get_property(prop, x, y)
  581.     if x >= 0 and x < sim.XRES and y >=0 and y < sim.YRES then
  582.         return tpt.get_property(prop, x, y)
  583.     end
  584.     return 0
  585. end
  586.  
  587. math.randomseed(os.time())
  588. function MRTL_update(i, x, y, s, n)
  589.     if tpt.get_property("tmp",i)==0 then
  590.         tpt.parts[i].tmp=1
  591.                 --randvel=math.random(-20,20)/10
  592.                 tpt.parts[i].vx=-3
  593.                 tpt.parts[i].vy=3
  594.             end
  595.  
  596.             xvel=-3
  597.             yvel=3
  598.             if math.abs(xvel) < 1 then
  599.                 tpt.delete(i)
  600.             end
  601.  
  602.             xpos=x-xvel
  603.             ypos=y-yvel
  604.             elemtype=get_property("type",xpos,ypos)
  605.  
  606.             if elemtype == 0 then
  607.                 tpt.create(xpos,ypos,"bray")
  608.                 tpt.set_property("temp",5000,xpos,ypos)
  609.             end
  610.             tpt.parts[i].temp=9999
  611.  
  612.             elemtype25=get_property("type",x+xvel*5,y+yvel*5)
  613.             elemtype24=get_property("type",x+xvel*4,y+yvel*4)
  614.             elemtype23=get_property("type",x+xvel*3,y+yvel*3)
  615.             elemtype22=get_property("type",x+xvel*2,y+yvel*2)
  616.             elemtype21=get_property("type",x+xvel,y+yvel)
  617.             if elemtype25 ~= 0 and elemtype25 ~= elements.ELEMENT_PT_MRTL and elemtype25 ~= tpt.el.bray.id and elemtype25 ~= tpt.el.dmnd.id and elemtype25 ~= tpt.el.void.id then
  618.                 tpt.set_property("type","bomb",i)
  619.                 tpt.set_property("life",0,i)
  620.                 tpt.set_property("tmp",0,i)
  621.                 elseif elemtype24 ~= 0 and elemtype24 ~= elements.ELEMENT_PT_MRTL and elemtype24 ~= tpt.el.bray.id and elemtype24 ~= tpt.el.dmnd.id and elemtype24 ~= tpt.el.void.id then
  622.                     tpt.set_property("type","bomb",i)
  623.                     tpt.set_property("life",0,i)
  624.                     tpt.set_property("tmp",0,i)
  625.                     elseif elemtype23 ~= 0 and elemtype23 ~= elements.ELEMENT_PT_MRTL and elemtype23 ~= tpt.el.bray.id and elemtype23 ~= tpt.el.dmnd.id and elemtype23 ~= tpt.el.void.id then
  626.                         tpt.set_property("type","bomb",i)
  627.                         tpt.set_property("life",0,i)
  628.                         tpt.set_property("tmp",0,i)
  629.                         elseif elemtype22 ~= 0 and elemtype22 ~= elements.ELEMENT_PT_MRTL and elemtype22 ~= tpt.el.bray.id and elemtype22 ~= tpt.el.dmnd.id and elemtype22 ~= tpt.el.void.id then
  630.                             tpt.set_property("type","bomb",i)
  631.                             tpt.set_property("life",0,i)
  632.                             tpt.set_property("tmp",0,i)
  633.                             elseif elemtype21 ~= 0 and elemtype21 ~= elements.ELEMENT_PT_MRTL and elemtype21 ~= tpt.el.bray.id and elemtype21 ~= tpt.el.dmnd.id and elemtype21 ~= tpt.el.void.id then
  634.                                 tpt.set_property("type","bomb",i)
  635.                                 tpt.set_property("life",0,i)
  636.                                 tpt.set_property("tmp",0,i)
  637.                             end
  638.                         end
  639.  
  640.                         tpt.element_func(MRTL_update, elements.ELEMENT_PT_MRTL,1)
  641.  
  642. --PLSM Copy For Explosives {Amy}
  643.  
  644. local amy1 = elements.allocate("AMY", "IGNT")
  645. elements.element(elements.AMY_PT_IGNT, elements.element(elements.DEFAULT_PT_GAS))
  646. elements.property(elements.AMY_PT_IGNT, "Name", "IGNT")
  647. elements.property(elements.AMY_PT_IGNT, "Description", "Igniter. Use to ignite explosives, hotter than fire.")
  648. elements.property(elements.AMY_PT_IGNT, "Colour", 0xFFE52961)
  649. elements.property(elements.AMY_PT_IGNT, "MenuSection", 5)
  650. elements.property(elements.AMY_PT_IGNT, "MenuVisible", 1)
  651. elements.property(elements.AMY_PT_IGNT, "Temperature", 5000)
  652. elements.property(elements.AMY_PT_IGNT, "Weight", 0)
  653. elements.property(elements.AMY_PT_IGNT, "Flammable", 1)
  654. elements.property(elements.AMY_PT_IGNT, "Explosive", 0)
  655.  
  656. --Strong Metal {Amy}
  657.  
  658. local STEL = elements.allocate("AMY", "STEL")
  659. elements.element(elements.AMY_PT_STEL, elements.element(elements.DEFAULT_PT_TTAN))
  660. elements.property(elements.AMY_PT_STEL, "Name", "STEL")
  661. elements.property(elements.AMY_PT_STEL, "Description", "Special Steel. Resists heat transfer, and is nearly impossible to destroy.")
  662. elements.property(elements.AMY_PT_STEL, "Colour", 0x474747)
  663. elements.property(elements.AMY_PT_STEL, "MenuSection", elem.SC_SOLID)
  664. elements.property(elements.AMY_PT_STEL, "MenuVisible", 1)
  665. elements.property(elements.AMY_PT_STEL, "Weight", 1000)
  666. elements.property(elements.AMY_PT_STEL, "Temperature", 293)
  667. elements.property(elements.AMY_PT_STEL, "HeatConduct", 1)
  668. elements.property(elements.AMY_PT_STEL, "HighTemperature", 7000)
  669.  
  670. --Strong Brick [Non Conductive] {Amy}
  671.  
  672. local SNGB = elements.allocate("AMY", "SNGB")
  673. elements.element(elements.AMY_PT_SNGB, elements.element(elements.DEFAULT_PT_BRCK))
  674. elements.property(elements.AMY_PT_SNGB, "Name", "SNGB")
  675. elements.property(elements.AMY_PT_SNGB, "Description", "Extremely Strong Brick. Resists heat transfer.")
  676. elements.property(elements.AMY_PT_SNGB, "Colour", 0x989898)
  677. elements.property(elements.AMY_PT_SNGB, "MenuSection", elem.SC_SOLID)
  678. elements.property(elements.AMY_PT_SNGB, "MenuVisible", 1)
  679. elements.property(elements.AMY_PT_SNGB, "Weight", 1000)
  680. elements.property(elements.AMY_PT_SNGB, "Temperature", 293)
  681. elements.property(elements.AMY_PT_SNGB, "HeatConduct", 1)
  682. elements.property(elements.AMY_PT_SNGB, "HighTemperature", 7000)
  683. elements.property(elements.AMY_PT_SNGB, "HighPressure", 37)
  684.  
  685. --Strong Glass [No Shatter] {Amy}
  686.  
  687. local SNGL = elements.allocate("AMY", "SUGL")
  688. elements.element(elements.AMY_PT_SUGL, elements.element(elements.DEFAULT_PT_GLAS))
  689. elements.property(elements.AMY_PT_SUGL, "Name", "SUGL")
  690. elements.property(elements.AMY_PT_SUGL, "Description", "Super Glass. Hard to shatter.")
  691. elements.property(elements.AMY_PT_SUGL, "Colour", 0x007475)
  692. elements.property(elements.AMY_PT_SUGL, "MenuSection", elem.SC_SOLID)
  693. elements.property(elements.AMY_PT_SUGL, "MenuVisible", 1)
  694. elements.property(elements.AMY_PT_SUGL, "Weight", 750)
  695. elements.property(elements.AMY_PT_SUGL, "Temperature", 293)
  696. elements.property(elements.AMY_PT_SUGL, "HeatConduct", 3)
  697. elements.property(elements.AMY_PT_SUGL, "HighTemperature", 6750)
  698. elements.property(elements.AMY_PT_SUGL, "HighPressure", 37)
  699. elements.property(elements.AMY_PT_SUGL, "HighPressureTransition", elem.DEFAULT_PT_BGLA)
  700.  
  701. --Copper {Amy}
  702.  
  703. --[[{UNFINISHED}local COPR = elements.allocate("AMY", "COPR")
  704. elements.element(elements.AMY_PT_COPR, elements.element(elements.DEFAULT_PT_GOLD))
  705. elements.property(elements.AMY_PT_COPR, "Name", "COPR")
  706. elements.property(elements.AMY_PT_COPR, "Description", "Copper. Very conductive, with a low melting point.")
  707. elements.property(elements.AMY_PT_COPR, "Colour", 0xB36500)
  708. elements.property(elements.AMY_PT_COPR, "MenuSection", elem.SC_ELEC)
  709. elements.property(elements.AMY_PT_COPR, "MenuVisible", 1)
  710. elements.property(elements.AMY_PT_COPR, "Temperature", 293)
  711. elements.property(elements.AMY_PT_COPR, "HeatConduct", 100)
  712. elements.property(elements.AMY_PT_COPR, "HighTemperature", 1500)
  713.  
  714. {DISREGARD THESE FUNCTIONS}
  715.  
  716. --local function get_property(prop, x, y)
  717.     --if sim.partNeighbours(x, y, 4, AMY_PT_COPR) == elem.DEFAULT_PT_SPRK then print("SPRKED")
  718.     --end
  719.     --if sim.partProperty(AMY_PT_COPR, FIELD_TYPE) == "sprk" then sim.partProperty(AMY_PT_COPR, object field, object value)
  720.  
  721.  --   end
  722.  function sprk(i,x,y,s,n)
  723.     if sim.partNeighbours(i, x, y, 4, AMY_PT_COPR) == elem.DEFAULT_PT_SPRK then print("SPRKED")
  724.     end
  725. end
  726. ]]
  727.  
  728.  
  729.  
  730. --Liquid Hydrogen {Extensively Edited by Amy}
  731.  
  732. local LHYG = elements.allocate('AMY', 'LHYG')
  733. elements.element(LHYG, elements.element(elements.DEFAULT_PT_GLOW))
  734. elements.property(elements.AMY_PT_LHYG, "Name", "LHYG")
  735. elements.property(elements.AMY_PT_LHYG, "Description", "Liquid Hydrogen.")
  736. elements.property(elements.AMY_PT_LHYG, "Color", 0x99FFFF)
  737. elements.property(elements.AMY_PT_LHYG, "MenuSection", elem.SC_LIQUID)
  738. elements.property(elements.AMY_PT_LHYG, "Gravity", 0.4)
  739. elements.property(elements.AMY_PT_LHYG, "Falldown", 2)
  740. elements.property(elements.AMY_PT_LHYG, "Flammable", 16384)
  741. elements.property(elements.AMY_PT_LHYG, "Explosive", 1)
  742. elements.property(elements.AMY_PT_LHYG, "Temperature", 0)
  743. elements.property(elements.AMY_PT_LHYG, "HighTemperature", 60)
  744. elements.property(elements.AMY_PT_LHYG, "HighTemperatureTransition", elem.DEFAULT_PT_HYGN)
  745. local function Lflare(i, colr, colg, colb)
  746.     return 1, 0x00000004, 255, 153, 255, 255, 255, 153, 255, 255
  747. end
  748. tpt.graphics_func(Lflare, elements.AMY_PT_LHYG)
  749.  
  750. --Change HYGN so it changes states with LHYG
  751.  
  752. elements.property(elements.DEFAULT_PT_HYGN, "LowTemperature", 60)
  753. elements.property(elements.DEFAULT_PT_HYGN, "LowTemperatureTransition", elements.AMY_PT_LHYG)
  754.  
  755. --BPDR Element
  756.  
  757. local element1 = elements.allocate("FEYNMAN", "BPDR")
  758. elements.element(elements.FEYNMAN_PT_BPDR, elements.element(elements.DEFAULT_PT_BCOL))
  759. elements.property(elements.FEYNMAN_PT_BPDR, "Name", "BPDR")
  760. elements.property(elements.FEYNMAN_PT_BPDR, "Description", "Black Powder, Very explosive.")
  761. elements.property(elements.FEYNMAN_PT_BPDR, "Colour", 0x353535)
  762. elements.property(elements.FEYNMAN_PT_BPDR, "MenuSection", 5)
  763. elements.property(elements.FEYNMAN_PT_BPDR, "Gravity", .5)
  764. elements.property(elements.FEYNMAN_PT_BPDR, "Flammable", 10000)
  765. elements.property(elements.FEYNMAN_PT_BPDR, "Explosive", 1)
  766. elements.property(elements.FEYNMAN_PT_BPDR, "Loss", 1)
  767. elements.property(elements.FEYNMAN_PT_BPDR, "AirLoss", .5)
  768. elements.property(elements.FEYNMAN_PT_BPDR, "AirDrag", .01)
  769. elements.property(elements.FEYNMAN_PT_BPDR, "Advection", .01)
  770. elements.property(elements.FEYNMAN_PT_BPDR, "Weight", 0)
  771. elements.property(elements.FEYNMAN_PT_BPDR, "Diffusion", 0)
  772.  
  773. --Clouds Mod
  774.  
  775. local a = elements.allocate("MOD", "UCLD")
  776. elements.element(elements.MOD_PT_UCLD, elements.element(elements.DEFAULT_PT_HYGN))
  777. elements.property(elements.MOD_PT_UCLD, "Name", "UCLD")
  778. elements.property(elements.MOD_PT_UCLD, "Description", "Uranium Cloud. First type of radioactive cloud.")
  779. elements.property(elements.MOD_PT_UCLD, "Colour", 0xAAAAFF)
  780. elements.property(elements.MOD_PT_UCLD, "MenuSection", 10)
  781. elements.property(elements.MOD_PT_UCLD, "Gravity", 0)
  782. elements.property(elements.MOD_PT_UCLD, "Explosive", 0)
  783. elements.property(elements.MOD_PT_UCLD, "Weight", 0)
  784. elements.property(elements.MOD_PT_UCLD, "Diffusion", 1)
  785. elements.property(elements.MOD_PT_UCLD, "Hardness", 0)
  786. elements.property(elements.MOD_PT_UCLD, "Flammable", 0)
  787. elements.property(elements.MOD_PT_UCLD, "AirDrag", 0.01)
  788. function rain(i,x,y,s,n)
  789.     if math.random(1,500) < 5 then
  790.         tpt.create(x + math.random(-1,1), y + math.random(-1,1), 'uran')
  791.     end
  792.     if math.random(1,500) == 20 then
  793.         tpt.create(x + math.random(-1,1), y + math.random(-1,1), 'boyl')
  794.     end
  795. end
  796. tpt.element_func(rain,a)
  797.  
  798. local b = elements.allocate("MOD2", "RACD")
  799. elements.element(elements.MOD2_PT_RACD, elements.element(elements.DEFAULT_PT_HYGN))
  800. elements.property(elements.MOD2_PT_RACD, "Name", "RACD")
  801. elements.property(elements.MOD2_PT_RACD, "Description", "Rain Cloud.")
  802. elements.property(elements.MOD2_PT_RACD, "Colour", 0xA9ACB6)
  803. elements.property(elements.MOD2_PT_RACD, "MenuSection", 6)
  804. elements.property(elements.MOD2_PT_RACD, "Gravity", 0)
  805. elements.property(elements.MOD2_PT_RACD, "Explosive", 0)
  806. elements.property(elements.MOD2_PT_RACD, "Weight", 0)
  807. elements.property(elements.MOD2_PT_RACD, "Diffusion", 1)
  808. elements.property(elements.MOD2_PT_RACD, "Hardness", 0)
  809. elements.property(elements.MOD2_PT_RACD, "Flammable", 0)
  810. elements.property(elements.MOD2_PT_RACD, "AirDrag", 0.01)
  811. elements.property(elements.MOD2_PT_RACD, "LowTemperature", 273.15)
  812. elements.property(elements.MOD2_PT_RACD, "LowTemperatureTransition", "MOD_PT_SCLD")
  813. elements.property(elements.MOD2_PT_RACD, "Temperature", 295.15)
  814.  
  815. function rain(i,x,y,s,n)
  816.     if math.random(1,500) == 20 then
  817.         tpt.create(x + math.random(-1,1), y + math.random(-1,1), 'watr')
  818.  
  819.     end    
  820. end
  821. tpt.element_func(rain,b)
  822.  
  823. local c = elements.allocate("MOD3", "SCLD")
  824. elements.element(elements.MOD3_PT_SCLD, elements.element(elements.DEFAULT_PT_HYGN))
  825. elements.property(elements.MOD3_PT_SCLD, "Name", "SCLD")
  826. elements.property(elements.MOD3_PT_SCLD, "Description", "Snow Cloud.")
  827. elements.property(elements.MOD3_PT_SCLD, "Colour", 0x8F8FBC)
  828. elements.property(elements.MOD3_PT_SCLD, "MenuSection", 6)
  829. elements.property(elements.MOD3_PT_SCLD, "Gravity", 0)
  830. elements.property(elements.MOD3_PT_SCLD, "Explosive", 0)
  831. elements.property(elements.MOD3_PT_SCLD, "Weight", 0)
  832. elements.property(elements.MOD3_PT_SCLD, "Diffusion", 1)
  833. elements.property(elements.MOD3_PT_SCLD, "Hardness", 0)
  834. elements.property(elements.MOD3_PT_SCLD, "Flammable", 0)
  835. elements.property(elements.MOD3_PT_SCLD, "AirDrag", 0.01)
  836. elements.property(elements.MOD3_PT_SCLD, "HighTemperature", 273.15)
  837. elements.property(elements.MOD3_PT_SCLD, "HighTemperatureTransition", "MOD_PT_RACD")
  838. elements.property(elements.MOD3_PT_SCLD, "Temperature", 263.15 )
  839. elements.property(elements.MOD3_PT_SCLD, "LowTemperature", 245.15)
  840. elements.property(elements.MOD3_PT_SCLD, "LowTemperatureTransition", "MOD_PT_ICE")
  841.  
  842. function rain(i,x,y,s,n)
  843.     if math.random(1,500) == 20 then
  844.         tpt.create(x + math.random(-1,1), y + math.random(-1,1), 'snow')
  845.     end
  846. end    
  847. tpt.element_func(rain,c)
  848.  
  849. local d = elements.allocate("MOD4", "DRCD")
  850. elements.element(elements.MOD4_PT_DRCD, elements.element(elements.DEFAULT_PT_HYGN))
  851. elements.property(elements.MOD4_PT_DRCD, "Name", "DRCD")
  852. elements.property(elements.MOD4_PT_DRCD, "Description", "Distilled Rain Cloud.")
  853. elements.property(elements.MOD4_PT_DRCD, "Colour", 0x506987)
  854. elements.property(elements.MOD4_PT_DRCD, "MenuSection", 6)
  855. elements.property(elements.MOD4_PT_DRCD, "Gravity", 0)
  856. elements.property(elements.MOD4_PT_DRCD, "Explosive", 0)
  857. elements.property(elements.MOD4_PT_DRCD, "Weight", 0)
  858. elements.property(elements.MOD4_PT_DRCD, "Diffusion", 1)
  859. elements.property(elements.MOD4_PT_DRCD, "Hardness", 0)
  860. elements.property(elements.MOD4_PT_DRCD, "Flammable", 0)
  861. elements.property(elements.MOD4_PT_DRCD, "AirDrag", 0.01)
  862. elements.property(elements.MOD4_PT_DRCD, "LowTemperature", 273.15)
  863. elements.property(elements.MOD4_PT_DRCD, "LowTemperatureTransition", "MOD_PT_SCLD")
  864. elements.property(elements.MOD4_PT_DRCD, "Temperature", 295.15)
  865.  
  866. function rain(i,x,y,s,n)
  867.     if math.random(1,500) == 20 then
  868.         tpt.create(x + math.random(-1,1), y + math.random(-1,1), 'dstw')  
  869.     end    
  870. end
  871. tpt.element_func(rain,d)
  872.  
  873. local e = elements.allocate("MOD5", "SRCD")
  874. elements.element(elements.MOD5_PT_SRCD, elements.element(elements.DEFAULT_PT_HYGN))
  875. elements.property(elements.MOD5_PT_SRCD, "Name", "SRCD")
  876. elements.property(elements.MOD5_PT_SRCD, "Description", "Saltwater Rain Cloud.")
  877. elements.property(elements.MOD5_PT_SRCD, "Colour", 0x380474)
  878. elements.property(elements.MOD5_PT_SRCD, "MenuSection", 6)
  879. elements.property(elements.MOD5_PT_SRCD, "MenuVisible", 0)
  880. elements.property(elements.MOD5_PT_SRCD, "Gravity", 0)
  881. elements.property(elements.MOD5_PT_SRCD, "Explosive", 0)
  882. elements.property(elements.MOD5_PT_SRCD, "Weight", 0)
  883. elements.property(elements.MOD5_PT_SRCD, "Diffusion", 1)
  884. elements.property(elements.MOD5_PT_SRCD, "Hardness", 0)
  885. elements.property(elements.MOD5_PT_SRCD, "Flammable", 0)
  886. elements.property(elements.MOD5_PT_SRCD, "AirDrag", 0.01)
  887. elements.property(elements.MOD5_PT_SRCD, "LowTemperature", 273.15)
  888. elements.property(elements.MOD5_PT_SRCD, "LowTemperatureTransition", "MOD_PT_SCLD")
  889. elements.property(elements.MOD5_PT_SRCD, "Temperature", 295.15)
  890.  
  891. function rain(i,x,y,s,n)
  892.     if math.random(1,500) == 20 then
  893.         tpt.create(x + math.random(-1,1), y + math.random(-1,1), 'sltw')
  894.     end    
  895. end
  896. tpt.element_func(rain,e)
  897.  
  898. local f = elements.allocate("MOD6", "TSCD")
  899. elements.element(elements.MOD6_PT_TSCD, elements.element(elements.DEFAULT_PT_HYGN))
  900. elements.property(elements.MOD6_PT_TSCD, "Name", "TSCD")
  901. elements.property(elements.MOD6_PT_TSCD, "Description", "Thunderstorm Cloud.")
  902. elements.property(elements.MOD6_PT_TSCD, "Colour", 0x302B54)
  903. elements.property(elements.MOD6_PT_TSCD, "MenuSection", 6)
  904. elements.property(elements.MOD6_PT_TSCD, "MenuVisible", 0)
  905. elements.property(elements.MOD6_PT_TSCD, "Gravity", 0)
  906. elements.property(elements.MOD6_PT_TSCD, "Explosive", 0)
  907. elements.property(elements.MOD6_PT_TSCD, "Weight", 0)
  908. elements.property(elements.MOD6_PT_TSCD, "Diffusion", 1)
  909. elements.property(elements.MOD6_PT_TSCD, "Hardness", 0)
  910. elements.property(elements.MOD6_PT_TSCD, "Flammable", 0)
  911. elements.property(elements.MOD6_PT_TSCD, "AirDrag", 0.01)
  912. elements.property(elements.MOD6_PT_TSCD, "LowTemperature", 273.15)
  913. elements.property(elements.MOD6_PT_TSCD, "LowTemperatureTransition", "MOD_PT_SCLD")
  914. elements.property(elements.MOD6_PT_TSCD, "Temperature", 303.15)
  915.  
  916. function rain(i,x,y,s,n)
  917.     if math.random(1,500) == 20 then
  918.         tpt.create(x + math.random(-1,1), y + math.random(-1,1), 'ligh')
  919.     end    
  920. end
  921. tpt.element_func(rain,f)
  922.  
  923. --Explosives
  924.  
  925. --The Highly Explosive mod for Powder Toy
  926.  
  927. local function explosion(x, y, s)
  928.     for px = -1, 1 do
  929.         for py = -1, 1 do
  930.             tpt.create(x + px, y - py, "PLSM")
  931.             local pressure = sim.pressure((x + px) / 4.0, (y + py) / 4.0)
  932.             sim.pressure((x + px) / 4.0, (y + py) / 4.0, pressure + s * 10)
  933.             sim.velocityX((x + px) / 4.0, y / 4.0, px * s)
  934.             sim.velocityY((x + px) / 4.0, (y - py) / 4.0, -py * s)
  935.  
  936.         end
  937.     end
  938. end
  939.  
  940. local WBOMB = elements.allocate("MEXPL", "HELD")
  941. elements.element(elements.MEXPL_PT_HELD, elements.element(elements.DEFAULT_PT_GLOW))
  942. elements.property(elements.MEXPL_PT_HELD, "Color", "0xFFFEAF27")
  943. elements.property(elements.MEXPL_PT_HELD, "Name", "HELD")
  944. elements.property(elements.MEXPL_PT_HELD, "Description", "Highly Explosive Liquid.")
  945. elements.property(elements.MEXPL_PT_HELD, "MenuVisible", 1)
  946. elements.property(elements.MEXPL_PT_HELD, "MenuSection", 5)
  947. elements.property(elements.MEXPL_PT_HELD, "Advection", 0.1)
  948. elements.property(elements.MEXPL_PT_HELD, "AirDrag", 0.1)
  949. elements.property(elements.MEXPL_PT_HELD, "AirLoss", 0.9)
  950. elements.property(elements.MEXPL_PT_HELD, "Loss", 0.9)
  951. elements.property(elements.MEXPL_PT_HELD, "Falldown", 2)
  952. elements.property(elements.MEXPL_PT_HELD, "Hardness", 0.8)
  953. elements.property(elements.MEXPL_PT_HELD, "Weight", 12)
  954. elements.property(elements.MEXPL_PT_HELD, "Temperature", 340)
  955. elements.property(elements.MEXPL_PT_HELD, "HeatConduct", 100)
  956. elements.property(elements.MEXPL_PT_HELD, "State", 2)
  957. elements.property(elements.MEXPL_PT_HELD, "Properties", 2)
  958. elements.property(elements.MEXPL_PT_HELD, "Explosive", 1)
  959.  
  960. local function HELD_update(i, x, y, s, n)
  961.     local r = 1
  962.     if sim.pressure(x / 4.0, y / 4.0) >= 7.5 then
  963.  
  964.         explosion(x, y, 1)
  965.         tpt.delete(i)
  966.         elseif tpt.get_property("temp", i) >= 450 then
  967.             explosion(x, y, 1)
  968.             tpt.delete(i)
  969.         end
  970.     end
  971.  
  972.     tpt.element_func(HELD_update, elements.MEXPL_PT_HELD)
  973.  
  974.     local SBOMB = elements.allocate("MEXPL", "HESD")
  975.     elements.element(elements.MEXPL_PT_HESD, elements.element(elements.DEFAULT_PT_BANG))
  976.     elements.property(elements.MEXPL_PT_HESD, "Color", "0xFFFF5000")
  977.     elements.property(elements.MEXPL_PT_HESD, "Name", "HESD")
  978.     elements.property(elements.MEXPL_PT_HESD, "Description", "Highly Explosive Solid.")
  979.     elements.property(elements.MEXPL_PT_HESD, "MenuVisible", 1)
  980.     elements.property(elements.MEXPL_PT_HESD, "MenuSection", 5)
  981.     elements.property(elements.MEXPL_PT_HESD, "Hardness", 0.8)
  982.     elements.property(elements.MEXPL_PT_HESD, "Temperature", 293)
  983.     elements.property(elements.MEXPL_PT_HESD, "HeatConduct", 100)
  984.     elements.property(elements.MEXPL_PT_HESD, "Falldown", 0)
  985.     elements.property(elements.MEXPL_PT_HESD, "State", 1)
  986.     elements.property(elements.MEXPL_PT_HESD, "Properties", 4)
  987.     elements.property(elements.MEXPL_PT_HESD, "Explosive", 1)
  988.  
  989.     local function HESD_update(i, x, y, s, n)
  990.         local r = 1
  991.         if sim.pressure(x / 4.0, y / 4.0) >= 7.5 then
  992.  
  993.             explosion(x, y, 1)
  994.             tpt.delete(i)
  995.             elseif tpt.get_property("temp", i) >= 450 then
  996.                 explosion(x, y, 1)
  997.                 tpt.delete(i)
  998.             end
  999.         end
  1000.  
  1001.         tpt.element_func(HESD_update, elements.MEXPL_PT_HESD)
  1002.  
  1003.         local GBOMB = elements.allocate("MEXPL", "HEGS")
  1004.         elements.element(elements.MEXPL_PT_HEGS, elements.element(elements.DEFAULT_PT_GAS))
  1005.         elements.property(elements.MEXPL_PT_HEGS, "Color", "0xFFEBFE5D")
  1006.         elements.property(elements.MEXPL_PT_HEGS, "Name", "HEGS")
  1007.         elements.property(elements.MEXPL_PT_HEGS, "Description", "Highly Explosive Gas.")
  1008.         elements.property(elements.MEXPL_PT_HEGS, "MenuVisible", 1)
  1009.         elements.property(elements.MEXPL_PT_HEGS, "MenuSection", 5)
  1010.         elements.property(elements.MEXPL_PT_HEGS, "Hardness", 0.8)
  1011.         elements.property(elements.MEXPL_PT_HEGS, "Temperature", 390)
  1012.         elements.property(elements.MEXPL_PT_HEGS, "HeatConduct", 100)
  1013.         elements.property(elements.MEXPL_PT_HEGS, "Falldown", 0)
  1014.         elements.property(elements.MEXPL_PT_HEGS, "Diffusion", 0.5)
  1015.         elements.property(elements.MEXPL_PT_HEGS, "State", 3)
  1016.         elements.property(elements.MEXPL_PT_HEGS, "Explosive", 1)
  1017.  
  1018.         local function HEGS_update(i, x, y, s, n)
  1019.             local r = 1
  1020.             if sim.pressure(x / 4.0, y / 4.0) >= 7.5 then
  1021.  
  1022.                 explosion(x, y, 1)
  1023.                 tpt.delete(i)
  1024.                 elseif tpt.get_property("temp", i) >= 450 then
  1025.                     explosion(x, y, 1)
  1026.                     tpt.delete(i)
  1027.                 end
  1028.             end
  1029.  
  1030.             tpt.element_func(HEGS_update, elements.MEXPL_PT_HEGS)
  1031.  
  1032.             local PBOMB = elements.allocate("MEXPL", "HEPR")
  1033.             elements.element(elements.MEXPL_PT_HEPR, elements.element(elements.DEFAULT_PT_DUST))
  1034.             elements.property(elements.MEXPL_PT_HEPR, "Color", "0xFFFFFF00")
  1035.             elements.property(elements.MEXPL_PT_HEPR, "Name", "HEPR")
  1036.             elements.property(elements.MEXPL_PT_HEPR, "Description", "Highly Explosive Powder.")
  1037.             elements.property(elements.MEXPL_PT_HEPR, "MenuVisible", 1)
  1038.             elements.property(elements.MEXPL_PT_HEPR, "MenuSection", 5)
  1039.             elements.property(elements.MEXPL_PT_HEPR, "Hardness", 0.8)
  1040.             elements.property(elements.MEXPL_PT_HEPR, "Temperature", 293)
  1041.             elements.property(elements.MEXPL_PT_HEPR, "HeatConduct", 100)
  1042.             elements.property(elements.MEXPL_PT_HEPR, "Falldown", 1)
  1043.             elements.property(elements.MEXPL_PT_HEPR, "Explosive", 1)
  1044.             elements.property(elements.MEXPL_PT_HELD, "Advection", 0.1)
  1045.             elements.property(elements.MEXPL_PT_HELD, "AirDrag", 0.1)
  1046.             elements.property(elements.MEXPL_PT_HELD, "AirLoss", 0.9)
  1047.             elements.property(elements.MEXPL_PT_HELD, "Loss", 0.9)
  1048.             elements.property(elements.MEXPL_PT_HELD, "Hardness", 0.8)
  1049.             elements.property(elements.MEXPL_PT_HELD, "Weight", 12)
  1050.             elements.property(elements.MEXPL_PT_HEPR, "State", 1)
  1051.             elements.property(elements.MEXPL_PT_HEPR, "Properties", 4)
  1052.  
  1053.             local function HEPR_update(i, x, y, s, n)
  1054.                 local r = 1
  1055.                 if sim.pressure(x / 4.0, y / 4.0) >= 7.5 then
  1056.  
  1057.                     explosion(x, y, 1)
  1058.                     tpt.delete(i)
  1059.                     elseif tpt.get_property("temp", i) >= 450 then
  1060.                         explosion(x, y, 1)
  1061.                         tpt.delete(i)
  1062.                     end
  1063.                 end
  1064.  
  1065.                 tpt.element_func(HEPR_update, elements.MEXPL_PT_HEPR)
  1066.  
  1067.                 elements.property(elements.MEXPL_PT_HESD, "HighTemperature", 327)
  1068.                 elements.property(elements.MEXPL_PT_HESD, "HighTemperatureTransition", elements.MEXPL_PT_HELD)
  1069.                 elements.property(elements.MEXPL_PT_HESD, "HighPressure", 2)
  1070.                 elements.property(elements.MEXPL_PT_HESD, "HighPressureTransition", elements.MEXPL_PT_HEPR)
  1071.                 elements.property(elements.MEXPL_PT_HEPR, "HighTemperature", 326)
  1072.                 elements.property(elements.MEXPL_PT_HEPR, "HighTemperatureTransition", elements.MEXPL_PT_HELD)
  1073.                 elements.property(elements.MEXPL_PT_HEGS, "LowTemperature", 365)
  1074.                 elements.property(elements.MEXPL_PT_HEGS, "LowTemperatureTransition", elements.MEXPL_PT_HELD)
  1075.                 elements.property(elements.MEXPL_PT_HELD, "HighTemperature", 365)
  1076.                 elements.property(elements.MEXPL_PT_HELD, "HighTemperatureTransition", elements.MEXPL_PT_HEGS)
  1077.                 elements.property(elements.MEXPL_PT_HELD, "LowTemperature", 327)
  1078.                 elements.property(elements.MEXPL_PT_HELD, "LowTemperatureTransition", elements.MEXPL_PT_HESD)
  1079.  
  1080. --"New Elements"
  1081.  
  1082. local function heat()
  1083.     tpt.set_property("temp", 9999, "HETR")
  1084.     tpt.set_property("temp", 0, "COLR")
  1085. end
  1086. tpt.register_step(heat)
  1087.  
  1088. elements.allocate('YOSHI', 'HETR')
  1089. elements.element(elements.YOSHI_PT_HETR, elements.element(elements.DEFAULT_PT_DMND))
  1090. elements.property(elements.YOSHI_PT_HETR, 'Name', 'HETR')
  1091. elements.property(elements.YOSHI_PT_HETR, 'Description', 'Heats Elements.')
  1092. elements.property(elements.YOSHI_PT_HETR, 'Color', '0xFF1111')
  1093. elements.property(elements.YOSHI_PT_HETR, 'MenuSection', '2')
  1094. elements.property(elements.YOSHI_PT_HETR, 'HeatConduct', '65535')
  1095. local g = function(i, x, y, s, n)
  1096. --Update Function
  1097. end
  1098. tpt.element_func(g, tpt.element('HETR'))
  1099.  
  1100. local function heat()
  1101. end
  1102. tpt.register_step(heat)
  1103.  
  1104. elements.allocate('YOSHI', 'COLR')
  1105. elements.element(elements.YOSHI_PT_COLR, elements.element(elements.DEFAULT_PT_DMND))
  1106. elements.property(elements.YOSHI_PT_COLR, 'Name', 'COLR')
  1107. elements.property(elements.YOSHI_PT_COLR, 'Description', 'Cools Elements.')
  1108. elements.property(elements.YOSHI_PT_COLR, 'Color', '0x1111FF')
  1109. elements.property(elements.YOSHI_PT_COLR, 'MenuSection', '2')
  1110. elements.property(elements.YOSHI_PT_COLR, 'HeatConduct', '65535')
  1111. local g = function(i, x, y, s, n)
  1112. --Update Function
  1113. end
  1114. tpt.element_func(g, tpt.element('COLR'))
  1115.  
  1116. elements.allocate('YOSHI', 'HCTD')
  1117. elements.element(elements.YOSHI_PT_HCTD, elements.element(elements.DEFAULT_PT_DMND))
  1118. elements.property(elements.YOSHI_PT_HCTD, 'Name', 'HCTD')
  1119. elements.property(elements.YOSHI_PT_HCTD, 'Description', 'Heat conductor.')
  1120. elements.property(elements.YOSHI_PT_HCTD, 'Color', '0x11FF11')
  1121. elements.property(elements.YOSHI_PT_HCTD, 'MenuSection', '2')
  1122. elements.property(elements.YOSHI_PT_HCTD, 'HeatConduct', '65535')
  1123. local g = function(i, x, y, s, n)
  1124. --Update Function
  1125. end
  1126. tpt.element_func(g, tpt.element('HCTD'))
  1127.  
  1128. local a = elements.allocate("YOSHI", "RCLD")
  1129. elements.element(elements.YOSHI_PT_RCLD, elements.element(elements.DEFAULT_PT_HYGN))
  1130. elements.property(elements.YOSHI_PT_RCLD, "Name", "RCLD")
  1131. elements.property(elements.YOSHI_PT_RCLD, "Description", "Radioactive cloud, Second type.")
  1132. elements.property(elements.YOSHI_PT_RCLD, "Colour", 0x11FF22)
  1133. elements.property(elements.YOSHI_PT_RCLD, "MenuSection", 10)
  1134. elements.property(elements.YOSHI_PT_RCLD, "Gravity", 0)
  1135. elements.property(elements.YOSHI_PT_RCLD, "Explosive", 0)
  1136. elements.property(elements.YOSHI_PT_RCLD, "Weight", 0)
  1137. elements.property(elements.YOSHI_PT_RCLD, "Diffusion", 1)
  1138. elements.property(elements.YOSHI_PT_RCLD, "Hardness", 0)
  1139. elements.property(elements.YOSHI_PT_RCLD, "Flammable", 100000)
  1140. elements.property(elements.YOSHI_PT_RCLD, "AirDrag", 0.01)
  1141. function rain(i,x,y,s,n)
  1142.     if math.random(1,500) < 5 then
  1143.         tpt.create(x + math.random(-1,1), y + math.random(-1,1), 'plut')
  1144.     end
  1145.     if math.random(1,500) == 20 then
  1146.         tpt.create(x + math.random(-1,1), y + math.random(-1,1), 'uran')
  1147.     end
  1148.     if math.random(1,500) == 30 then
  1149.         tpt.create(x + math.random(-1,1), y + math.random(-1,1), 'isoz')
  1150.     end
  1151.     if math.random(1,500) == 40 then
  1152.         tpt.create(x + math.random(-1,1), y + math.random(-1,1), 'deut')
  1153.     end
  1154.     if math.random(1,500) == 50 then
  1155.         tpt.create(x + math.random(-1,1), y + math.random(-1,1), 'bvbr')
  1156.     end
  1157. end
  1158. tpt.element_func(rain,a)
  1159.  
  1160. --[[  {NOT USEFUL ATM}  local a = elements.allocate("YOSHI", "SULF")
  1161. elements.element(elements.YOSHI_PT_SULF, elements.element(elements.DEFAULT_PT_COAL))
  1162. elements.property(elements.YOSHI_PT_SULF, "Name", "SULF")
  1163. elements.property(elements.YOSHI_PT_SULF, "Description", "Basic Sulphur.")
  1164. elements.property(elements.YOSHI_PT_SULF, "Colour", 0xFFFF11)
  1165. elements.property(elements.YOSHI_PT_SULF, "MenuSection", 9)
  1166. elements.property(elements.YOSHI_PT_SULF, "Gravity", 0)
  1167. elements.property(elements.YOSHI_PT_SULF, "Explosive", 0)
  1168. elements.property(elements.YOSHI_PT_SULF, "Weight", 10)
  1169. elements.property(elements.YOSHI_PT_SULF, "Diffusion", 0)
  1170. elements.property(elements.YOSHI_PT_SULF, "Hardness", 0)
  1171. elements.property(elements.YOSHI_PT_SULF, "Flammable", 10)]]
  1172.  
  1173. --[[    {MAY BE USEFUL LATER?}local a = elements.allocate("YOSHI", "SACD")
  1174. elements.element(elements.YOSHI_PT_SACD, elements.element(elements.DEFAULT_PT_ACID))
  1175. elements.property(elements.YOSHI_PT_SACD, "Name", "SACD")
  1176. elements.property(elements.YOSHI_PT_SACD, "Description", "Sulphuric acid, does nothing yet.")
  1177. elements.property(elements.YOSHI_PT_SACD, "Colour", 0xEEEE11)
  1178. elements.property(elements.YOSHI_PT_SACD, "MenuSection", 7)
  1179. elements.property(elements.YOSHI_PT_SACD, "Gravity", 1)
  1180. elements.property(elements.YOSHI_PT_SACD, "Explosive", 0)
  1181. elements.property(elements.YOSHI_PT_SACD, "Weight", 10)
  1182. elements.property(elements.YOSHI_PT_SACD, "Diffusion", 0.1)
  1183. elements.property(elements.YOSHI_PT_SACD, "Hardness", 0)
  1184. elements.property(elements.YOSHI_PT_SACD, "Flammable", 0)]]--
  1185.  
  1186. local a = elements.allocate("YOSHI", "RMTL")
  1187. elements.element(elements.YOSHI_PT_RMTL, elements.element(elements.DEFAULT_PT_TTAN))
  1188. elements.property(elements.YOSHI_PT_RMTL, "Name", "RMTL")
  1189. elements.property(elements.YOSHI_PT_RMTL, "Description", "Realistic metal.")
  1190. elements.property(elements.YOSHI_PT_RMTL, "Colour", 0x666666)
  1191. elements.property(elements.YOSHI_PT_RMTL, "MenuSection", 9)
  1192. elements.property(elements.YOSHI_PT_RMTL, "Gravity", 0)
  1193. elements.property(elements.YOSHI_PT_RMTL, "Explosive", 0)
  1194. elements.property(elements.YOSHI_PT_RMTL, "Weight", 100)
  1195. elements.property(elements.YOSHI_PT_RMTL, "Diffusion", 0)
  1196. elements.property(elements.YOSHI_PT_RMTL, "Hardness", 0)
  1197. elements.property(elements.YOSHI_PT_RMTL, "Flammable", 0)
  1198. elements.property(elements.YOSHI_PT_RMTL, "AirLoss", 0)
  1199. elements.property(elements.YOSHI_PT_RMTL, "Temperature", 273.15 + 22)
  1200. elements.property(elements.YOSHI_PT_RMTL, "HighTemperature", 1798)
  1201. elements.property(elements.YOSHI_PT_RMTL, "HighTemperatureTransition", elements.YOSHI_PT_MRMT)
  1202.  
  1203. local a = elements.allocate("YOSHI", "MRMT")
  1204. elements.element(elements.YOSHI_PT_MRMT, elements.element(elements.DEFAULT_PT_MERC))
  1205. elements.property(elements.YOSHI_PT_MRMT, "Name", "MRMT")
  1206. elements.property(elements.YOSHI_PT_MRMT, "Description", "Molten realistic metal.")
  1207. elements.property(elements.YOSHI_PT_MRMT, "Colour", 0xFEDCBA)
  1208. elements.property(elements.YOSHI_PT_MRMT, "MenuSection", 4)
  1209. elements.property(elements.YOSHI_PT_MRMT, "MenuVisible", 0)
  1210. elements.property(elements.YOSHI_PT_MRMT, "Gravity", 1)
  1211. elements.property(elements.YOSHI_PT_MRMT, "Explosive", 0)
  1212. elements.property(elements.YOSHI_PT_MRMT, "Weight", 100)
  1213. elements.property(elements.YOSHI_PT_MRMT, "Diffusion", 0)
  1214. elements.property(elements.YOSHI_PT_MRMT, "Hardness", 0)
  1215. elements.property(elements.YOSHI_PT_MRMT, "Flammable", 0)
  1216. elements.property(elements.YOSHI_PT_MRMT, "Temperature", 1799)
  1217. elements.property(elements.YOSHI_PT_MRMT, "LowTemperature", 1798)
  1218. elements.property(elements.YOSHI_PT_MRMT, "LowTemperatureTransition", elements.YOSHI_PT_RMTL)
  1219.  
  1220. local a = elements.allocate("YOSHI", "THNL")
  1221. elements.element(elements.YOSHI_PT_THNL, elements.element(elements.DEFAULT_PT_NITR))
  1222. elements.property(elements.YOSHI_PT_THNL, "Name", "THNL")
  1223. elements.property(elements.YOSHI_PT_THNL, "Description", "Thermonucleum, Extremely explosive.")
  1224. elements.property(elements.YOSHI_PT_THNL, "Colour", 0x3F94EC)
  1225. elements.property(elements.YOSHI_PT_THNL, "MenuSection", 10)
  1226. elements.property(elements.YOSHI_PT_THNL, "Gravity", 1)
  1227. elements.property(elements.YOSHI_PT_THNL, "Explosive", 50)
  1228. elements.property(elements.YOSHI_PT_THNL, "Weight", 10)
  1229. elements.property(elements.YOSHI_PT_THNL, "Diffusion", 0)
  1230. elements.property(elements.YOSHI_PT_THNL, "Hardness", 0)
  1231. elements.property(elements.YOSHI_PT_THNL, "Flammable", 100000)
  1232. elements.property(elements.YOSHI_PT_THNL, "Temperature", 295.15)
  1233. elements.property(elements.YOSHI_PT_THNL, "AirDrag", 0.5)
  1234.  
  1235. elements.allocate('AU3FGEN', 'GNTM')
  1236. elements.element(elements.AU3FGEN_PT_GNTM, elements.element(elements.DEFAULT_PT_DMND))
  1237. elements.property(elements.AU3FGEN_PT_GNTM, 'Name', 'GNTM')
  1238. elements.property(elements.AU3FGEN_PT_GNTM, 'Description', 'Gentium, Strange and laggy.')
  1239. elements.property(elements.AU3FGEN_PT_GNTM, 'Color', '0x1F7F3F')
  1240. elements.property(elements.AU3FGEN_PT_GNTM, 'MenuSection', '10')
  1241. elements.property(elements.AU3FGEN_PT_GNTM, 'Gravity', '0')
  1242. elements.property(elements.AU3FGEN_PT_GNTM, 'Flammable', '65535')
  1243. elements.property(elements.AU3FGEN_PT_GNTM, 'Explosive', '1')
  1244. elements.property(elements.AU3FGEN_PT_GNTM, 'Loss', '0')
  1245. elements.property(elements.AU3FGEN_PT_GNTM, 'AirLoss', '1')
  1246. elements.property(elements.AU3FGEN_PT_GNTM, 'AirDrag', '0')
  1247. elements.property(elements.AU3FGEN_PT_GNTM, 'Advection', '1')
  1248. elements.property(elements.AU3FGEN_PT_GNTM, 'Weight', '1024')
  1249. elements.property(elements.AU3FGEN_PT_GNTM, 'Diffusion', '0')
  1250. elements.property(elements.AU3FGEN_PT_GNTM, 'Falldown', '0')
  1251. local g = function(i, x, y, s, n)
  1252. --Update Function
  1253. end
  1254. tpt.element_func(g, tpt.element('GNTM'))
  1255. local g = function(i, r, g, b)
  1256. local function gfunc(i, r, g, b)
  1257.     return 1, 0x0003007F, math.random(0,255), math.random(0,255), math.random(0,255), math.random(0,255), math.random(0,255), math.random(0,255), math.random(0,255), math.random(0,255)
  1258. end
  1259. tpt.graphics_func(gfunc, tpt.element('GNTM'))
  1260. end
  1261. tpt.graphics_func(g, tpt.element('GNTM'))
  1262.  
  1263. --Radioactive Mod
  1264.  
  1265. --Changes
  1266. -- You can change this from on/off.
  1267.  
  1268. on=40
  1269. off=0
  1270.  
  1271.  
  1272. elements.property(elements.DEFAULT_PT_ACID, "Flammable", off)
  1273. -- Added Elements.
  1274.  
  1275. local a = elements.allocate("X", "C")
  1276. elements.element(elements.X_PT_C, elements.element(elements.DEFAULT_PT_WOOD))
  1277. elements.property(elements.X_PT_C, "Name", "SAWD")
  1278. elements.property(elements.X_PT_C, "Description", "Saw Dust, Flammable.")
  1279. elements.property(elements.X_PT_C, "Colour", 0xFFFF66)
  1280. elements.property(elements.X_PT_C, "MenuSection", 8)
  1281. elements.property(elements.X_PT_C, "Gravity", 1)
  1282. elements.property(elements.X_PT_C, "Flammable", 30)
  1283. elements.property(elements.X_PT_C, "Explosive", 0)
  1284. elements.property(elements.X_PT_C, "Weight", 20)
  1285. elements.property(elements.X_PT_C, "Diffusion", 0.5)
  1286. elements.property(elements.X_PT_C, "Falldown", 1)
  1287.  
  1288. local a = elements.allocate("C", "Q")
  1289. elements.element(elements.C_PT_Q, elements.element(elements.DEFAULT_PT_HYGN))
  1290. elements.property(elements.C_PT_Q, "Name", "????")
  1291. elements.property(elements.C_PT_Q, "Description", "????")
  1292. elements.property(elements.C_PT_Q, "Colour", 0xFFFF0080)
  1293. elements.property(elements.C_PT_Q, "MenuSection", 10)
  1294. elements.property(elements.C_PT_Q, "Gravity", 0.3)
  1295. elements.property(elements.C_PT_Q, "Explosive", 1)
  1296. elements.property(elements.C_PT_Q, "Weight", 66)
  1297. elements.property(elements.C_PT_Q, "Diffusion", 0)
  1298. elements.property(elements.C_PT_Q, "HotAir", -0.1)
  1299. elements.property(elements.C_PT_Q, "Hardness", 0)
  1300.  
  1301. local q={0x99FFFF,0x9999FF,0xCCFF00,0x00FFCC,0x00CC00,0x330099}
  1302. local z=q[math.random(1,6)]
  1303.  
  1304. elements.property(elements.C_PT_Q, "Colour", z)
  1305.  
  1306. function light(i,x,y,s,n)
  1307.     if math.random(1,300000) == 10 then
  1308.         tpt.create(x + math.random(-1,1), y + math.random(-1,1), 'ligh')
  1309.     end
  1310. end
  1311. tpt.element_func(light,a)
  1312.  
  1313. local a = elements.allocate("B", "Q")
  1314. elements.element(elements.B_PT_Q, elements.element(elements.DEFAULT_PT_HYGN))
  1315. elements.property(elements.B_PT_Q, "Name", "LCLD")
  1316. elements.property(elements.B_PT_Q, "Description", "Lava Clouds.")
  1317. elements.property(elements.B_PT_Q, "Colour", 0xCC0000)
  1318. elements.property(elements.B_PT_Q, "MenuSection", 6)
  1319. elements.property(elements.B_PT_Q, "Gravity", 0.1)
  1320. elements.property(elements.B_PT_Q, "Explosive", 0)
  1321. elements.property(elements.B_PT_Q, "Weight", 66)
  1322. elements.property(elements.B_PT_Q, "Temperature", math.huge)
  1323. elements.property(elements.B_PT_Q, "Diffusion", 0.1)
  1324. elements.property(elements.B_PT_Q, "Hardness", 0)
  1325.  
  1326. function fire(i,x,y,s,n)
  1327.     if math.random(1,750) == 10 then
  1328.         tpt.create(x + math.random(-1,1), y + math.random(-1,1), 'lava')
  1329.     end
  1330. end
  1331. tpt.element_func(fire,a)
  1332.  
  1333. --[[
  1334.  
  1335. local a = elements.allocate("V", "X")
  1336. elements.element(elements.V_PT_X, elements.element(elements.DEFAULT_PT_HYGN))
  1337. elements.property(elements.V_PT_X, "Name", "CLDS")
  1338. elements.property(elements.V_PT_X, "Description", "Clouds. Produce Water.")
  1339. elements.property(elements.V_PT_X, "Colour", 0x3366CC)
  1340. elements.property(elements.V_PT_X, "MenuSection", 6)
  1341. elements.property(elements.V_PT_X, "Gravity", 0.3)
  1342. elements.property(elements.V_PT_X, "Explosive", 0)
  1343. elements.property(elements.V_PT_X, "Weight", 88)
  1344. elements.property(elements.V_PT_X, "Diffusion", 0.2)
  1345. elements.property(elements.V_PT_X, "Hardness", 0)
  1346.  
  1347. function rain(i,x,y,s,n)
  1348.         if math.random(1,750) == 10 then
  1349.                 tpt.create(x + math.random(-1,1), y + math.random(-1,1), 'watr')
  1350.         end
  1351. end
  1352. tpt.element_func(rain,a)]]--
  1353.  
  1354. local a = elements.allocate("V", "W")
  1355. elements.element(elements.V_PT_W, elements.element(elements.DEFAULT_PT_HYGN))
  1356. elements.property(elements.V_PT_W, "Name", "ACLD")
  1357. elements.property(elements.V_PT_W, "Description", "Acid Cloud.")
  1358. elements.property(elements.V_PT_W, "Colour", 0xFF0066)
  1359. elements.property(elements.V_PT_W, "MenuSection", 6)
  1360. elements.property(elements.V_PT_W, "Gravity", 0.1)
  1361. elements.property(elements.V_PT_W, "Explosive", 0)
  1362. elements.property(elements.V_PT_W, "Weight", -400)
  1363. elements.property(elements.V_PT_W, "Diffusion", 0.1)
  1364. elements.property(elements.V_PT_W, "Hardness", 0)
  1365.  
  1366. function acid(i,x,y,s,n)
  1367.    if math.random(1,750) == 10 then
  1368.     tpt.create(x + math.random(-1,1), y + math.random(-1,1), 'acid')
  1369. end
  1370. end
  1371. tpt.element_func(acid,a)
  1372.  
  1373. local a = elements.allocate("T", "N")
  1374. elements.element(elements.T_PT_N, elements.element(elements.DEFAULT_PT_LAVA))
  1375. elements.property(elements.T_PT_N, "Name", "NBLI")
  1376. elements.property(elements.T_PT_N, "Description", "A liquid that releases NBLE. Very Hot.")
  1377. elements.property(elements.T_PT_N, "Colour", 0xFF3300)
  1378. elements.property(elements.T_PT_N, "Temperature", math.huge)
  1379. elements.property(elements.T_PT_N, "Gravity", 3)
  1380. elements.property(elements.T_PT_N, "Diffusion", 0.2)
  1381.  
  1382. function RLS(i,x,y,s,n)
  1383.    if math.random(1,550) == 10 then
  1384.     tpt.create(x + math.random(-1,1), y + math.random(-1,1), 'nble')
  1385.     if math.random(1,1300) == 10 then
  1386.         tpt.create(x + math.random(-1,1), y + math.random(-1,1), 'plsm')
  1387.     end
  1388. end
  1389. end
  1390. tpt.element_func(RLS,a)
  1391. l="IFOUNDIT"
  1392. local a = elements.allocate("R","D")
  1393. elements.element(elements.R_PT_D, elements.element(elements.DEFAULT_PT_PHOT))
  1394. elements.property(elements.R_PT_D, "Name", "SPRB")
  1395. elements.property(elements.R_PT_D, "Color", 0xFF0099)
  1396. elements.property(elements.R_PT_D, "MenuSection", elem.SC_SPECIAL)
  1397. elements.property(elements.R_PT_D, "Advection", 0.2)
  1398. elements.property(elements.R_PT_D, "Collision", 1.0)
  1399. elements.property(elements.R_PT_D, "Gravity", 3.0)
  1400. elements.property(elements.R_PT_D, "Diffusion", 0.3)
  1401. elements.property(elements.R_PT_D, "Weight", 40.45)
  1402. elements.property(elements.R_PT_D, "Temperature", 100000.0)
  1403. elements.property(elements.R_PT_D, "HeatConduct", 100000.0)
  1404. elements.property(elements.R_PT_D, "Description", "Super Ball. Very Hot. Bounces.")
  1405. elements.property(elements.R_PT_D, "Properties", PROP_DEADLY)
  1406.  
  1407.  
  1408. local a = elements.allocate("V1", "X1")
  1409. elements.element(elements.V1_PT_X1, elements.element(elements.DEFAULT_PT_HYGN))
  1410. elements.property(elements.V1_PT_X1, "Name", "STRM")
  1411. elements.property(elements.V1_PT_X1, "Description", "Storm Clouds. Produces More Water Than RCLD, and Lightning.")
  1412. elements.property(elements.V1_PT_X1, "Colour", 0x999999)
  1413. elements.property(elements.V1_PT_X1, "MenuSection", 6)
  1414. elements.property(elements.V1_PT_X1, "Gravity", 0.1)
  1415. elements.property(elements.V1_PT_X1, "Explosive", 0)
  1416. elements.property(elements.V1_PT_X1, "Weight", 30)
  1417. elements.property(elements.V1_PT_X1, "Diffusion", 0.1)
  1418. elements.property(elements.V1_PT_X1, "Hardness", 0)
  1419.  
  1420. function rain2(i,x,y,s,n)
  1421.     if math.random(1,350) == 10 then
  1422.         tpt.create(x + math.random(-1,1), y + math.random(-1,1), 'watr')
  1423.         if math.random(1,750) == 10 then
  1424.             tpt.create(x + math.random(-1,1), y + math.random(-1,1), 'ligh')
  1425.         end
  1426.     end
  1427. end
  1428. tpt.element_func(rain2,a)
  1429.  
  1430. local a = elements.allocate("N", "H")
  1431. elements.element(elements.N_PT_H, elements.element(elements.DEFAULT_PT_WOOD))
  1432. elements.property(elements.N_PT_H, "Name", "TR0N")
  1433. elements.property(elements.N_PT_H, "Description", "Produces TRON. A Solid. A Home.")
  1434. elements.property(elements.N_PT_H, "Colour", 0x66FFFF)
  1435. elements.property(elements.N_PT_H, "Flammable", 0)
  1436. elements.property(elements.N_PT_H, "MenuSection", elem.SC_SPECIAL)
  1437.  
  1438. function tron(i,x,y,s,n)
  1439.     if math.random(1,100) == 10 then
  1440.         tpt.create(x + math.random(-1,1), y + math.random(-1,1), 'tron')
  1441.     end
  1442. end
  1443. tpt.element_func(tron,a)
  1444.  
  1445. local a = elements.allocate("E", "O")
  1446. elements.element(elements.E_PT_O, elements.element(elements.DEFAULT_PT_GUN))
  1447. elements.property(elements.E_PT_O, "Name", "PC-4")
  1448. elements.property(elements.E_PT_O, "Description", "Powder C4.  Explosive.")
  1449. elements.property(elements.E_PT_O, "Colour", 0xFF33FF)
  1450. elements.property(elements.E_PT_O, "Gravity", 2.0)
  1451. elements.property(elements.E_PT_O, "Diffusion", 0.2)
  1452. elements.property(elements.E_PT_O, "Weight", 30.20)
  1453. elements.property(elements.E_PT_O, "Flammable", 3000.34)
  1454.  
  1455. local a = elements.allocate("J", "O")
  1456. elements.element(elements.J_PT_O, elements.element(elements.DEFAULT_PT_DUST))
  1457. elements.property(elements.J_PT_O, "Name", "FLY")
  1458. elements.property(elements.J_PT_O, "Description", "Fly. Annoying Pestering Bug.")
  1459. elements.property(elements.J_PT_O, "Colour", 0x333333)
  1460. elements.property(elements.J_PT_O, "MenuSection", 11)
  1461. elements.property(elements.J_PT_O, "Gravity", 0.1)
  1462. elements.property(elements.J_PT_O, "Flammable", 1)
  1463. elements.property(elements.J_PT_O, "Explosive", 0)
  1464. elements.property(elements.J_PT_O, "Weight", -3000)
  1465. elements.property(elements.J_PT_O, "Diffusion", 0.9)
  1466. elements.property(elements.J_PT_O, "Falldown", 0.8)
  1467.  
  1468. local a = elements.allocate("C", "T")
  1469. elements.element(elements.C_PT_T, elements.element(elements.DEFAULT_PT_GLOW))
  1470. elements.property(elements.C_PT_T, "Name", "NPLM")
  1471. elements.property(elements.C_PT_T, "Description", "Napalm. Very explosive.")
  1472. elements.property(elements.C_PT_T, "Colour", 0x380520)
  1473. elements.property(elements.C_PT_T, "MenuSection", 5)
  1474. elements.property(elements.C_PT_T, "Gravity", 0.5)
  1475. elements.property(elements.C_PT_T, "Flammable", 1000)
  1476. elements.property(elements.C_PT_T, "Explosive", 1)
  1477. elements.property(elements.C_PT_T, "Loss", 0)
  1478. elements.property(elements.C_PT_T, "Weight", 20)
  1479.  
  1480. local a = elements.allocate("G", "H")
  1481. elements.element(elements.G_PT_H, elements.element(elements.DEFAULT_PT_WOOD))
  1482. elements.property(elements.G_PT_H, "Name", "BHIV")
  1483. elements.property(elements.G_PT_H, "Description", "BEE Hive. Produces BEEs. Obviously.")
  1484. elements.property(elements.G_PT_H, "Colour", 0x999966)
  1485. elements.property(elements.G_PT_H, "Flammable", 10)
  1486. elements.property(elements.G_PT_H, "MenuSection", elem.SC_SPECIAL)
  1487.  
  1488. function bee(i,x,y,s,n)
  1489.     if math.random(1,330) == 10 then
  1490.         tpt.create(x + math.random(-1,1), y + math.random(-1,1), 'bee')
  1491.     end
  1492. end
  1493. tpt.element_func(bee,a)
  1494.  
  1495. local a = elements.allocate("B", "O")
  1496. elements.element(elements.B_PT_O, elements.element(elements.DEFAULT_PT_DUST))
  1497. elements.property(elements.B_PT_O, "Name", "BEE")
  1498. elements.property(elements.B_PT_O, "Description", "BEE. Pestering Demons. Move Faster Then FLY.")
  1499. elements.property(elements.B_PT_O, "Colour", 0xFFFF00)
  1500. elements.property(elements.B_PT_O, "MenuSection", 11)
  1501. elements.property(elements.B_PT_O, "Gravity", 0.1)
  1502. elements.property(elements.B_PT_O, "Flammable", 10)
  1503. elements.property(elements.B_PT_O, "Explosive", 0)
  1504. elements.property(elements.B_PT_O, "Weight", -6000)
  1505. elements.property(elements.B_PT_O, "Diffusion", 2)
  1506. elements.property(elements.B_PT_O, "Falldown", 0.2)
  1507. function beeh(i,x,y,s,n)
  1508.     if math.random(1,9000) == 10 then
  1509.         tpt.create(x + math.random(-1,1), y + math.random(-1,1), 'bhiv')
  1510.     end
  1511. end
  1512. tpt.element_func(beeh,a)
  1513.  
  1514. local a = elements.allocate("T", "X")
  1515. elements.element(elements.T_PT_X, elements.element(elements.DEFAULT_PT_HYGN))
  1516. elements.property(elements.T_PT_X, "Name", "TORN")
  1517. elements.property(elements.T_PT_X, "Description", "Tornado. Work in progress.")
  1518. elements.property(elements.T_PT_X, "Colour", 0x333333)
  1519. elements.property(elements.T_PT_X, "MenuSection", 11)
  1520. elements.property(elements.T_PT_X, "Gravity", 0.5)
  1521. elements.property(elements.T_PT_X, "Explosive", 0)
  1522. elements.property(elements.T_PT_X, "HotAir", -0.5)
  1523. elements.property(elements.T_PT_X, "Weight", 99)
  1524. elements.property(elements.T_PT_X, "Diffusion", 0.2)
  1525. elements.property(elements.T_PT_X, "Hardness", 0)
  1526.  
  1527. function rt(i,x,y,s,n)
  1528.     if math.random(1,550) == 10 then
  1529.         tpt.create(x + math.random(-1,1), y + math.random(-1,1), 'watr')
  1530.     end
  1531. end
  1532. tpt.element_func(rt,a)
  1533.  
  1534. local a = elements.allocate("A","G")
  1535. elements.element(elements.A_PT_G, elements.element(elements.DEFAULT_PT_HYGN))
  1536. elements.property(elements.A_PT_G, "Name", "LAG")
  1537. elements.property(elements.A_PT_G, "Description", "Worlds Worst Creation.")
  1538. elements.property(elements.A_PT_G, "Colour", 0x578985)
  1539. elements.property(elements.A_PT_G, "MenuSection", 10)
  1540. elements.property(elements.A_PT_G, "HotAir", 0.1)
  1541. function acid(i,x,y,s,n)
  1542.    if math.random(1,100) == 50 then
  1543.     tpt.create(x + math.random(-1,1), y + math.random(-1,1), 'lag')
  1544. end
  1545. if math.random(1,100) == 50 then
  1546.     tpt.create(x + math.random(-1,1), y + math.random(-3,3), 'hygn')
  1547. end
  1548. if math.random(1,100) == 50 then
  1549.     tpt.create(x + math.random(-4,4), y + math.random(-6, 6), 'neut')
  1550. end
  1551. if math.random(1,100) == 50 then
  1552.     tpt.create(x + math.random(-4,4), y + math.random(-6, 6), 'prot')
  1553. end
  1554. if math.random(1,100) == 50 then
  1555.     tpt.create(x + math.random(-4,4), y + math.random(-6, 6), 'elec')
  1556.     if math.random(1,100) == 50 then
  1557.         tpt.create(x + math.random(-4,4), y + math.random(-6, 6), 'phot')
  1558.     end
  1559.     if math.random(1,100) == 50 then
  1560.         tpt.create(x + math.random(-4,4), y + math.random(-6, 6), 'neut')
  1561.     end
  1562.     if math.random(1,100) == 50 then
  1563.         tpt.create(x + math.random(-4,4), y + math.random(-6, 6), 'tron')
  1564.  
  1565.         if math.random(1,100) == 50 then
  1566.             tpt.create(x + math.random(-4,4), y + math.random(-6, 6), 'nble')
  1567.             if math.random(1,100) == 50 then
  1568.                 tpt.create(x + math.random(-4,4), y + math.random(-6, 6), 'boyl')
  1569.                 if math.random(1,100) == 50 then
  1570.                     tpt.create(x + math.random(-4,4), y + math.random(-6, 6), 'watr')
  1571.                     if math.random(1,100) == 50 then
  1572.                         tpt.create(x + math.random(-4,4), y + math.random(-6, 6), 'dstw')
  1573.                         if math.random(1,100) == 50 then
  1574.                             tpt.create(x + math.random(-4,4), y + math.random(-6, 6), 'sltw')
  1575.                             if math.random(1,100) == 50 then
  1576.                                 tpt.create(x + math.random(-4,4), y + math.random(-6, 6), 'glow')
  1577.                                 if math.random(1,100) == 50 then
  1578.                                     tpt.create(x + math.random(-4,4), y + math.random(-6, 6), 'soap')
  1579.                                 end
  1580.                             end
  1581.                         end
  1582.                     end
  1583.                 end
  1584.             end
  1585.         end
  1586.     end
  1587. end
  1588. end
  1589. tpt.element_func(acid,a)
  1590.  
  1591. --WTF
  1592.  
  1593. local WTF = elements.allocate('CJB', 'WTF')
  1594. elements.element(elements.CJB_PT_WTF, elements.element(elements.DEFAULT_PT_BCOL))
  1595. elements.property(elements.CJB_PT_WTF, 'Name', 'WTF')
  1596. elements.property(elements.CJB_PT_WTF, 'Description', 'Derpy, volatile gas/solid/I have no bloody idea.')
  1597. elements.property(elements.CJB_PT_WTF, 'Color', '0xB87503')
  1598. elements.property(elements.CJB_PT_WTF, 'MenuSection', '11')
  1599. elements.property(elements.CJB_PT_WTF, 'Gravity', '0.4')
  1600. elements.property(elements.CJB_PT_WTF, 'Flammable', '16384')
  1601. elements.property(elements.CJB_PT_WTF, 'Explosive', '1')
  1602. elements.property(elements.CJB_PT_WTF, 'Loss', '1')
  1603. elements.property(elements.CJB_PT_WTF, 'AirLoss', '20')
  1604. elements.property(elements.CJB_PT_WTF, 'AirDrag', '0.02')
  1605. elements.property(elements.CJB_PT_WTF, 'Advection', '1')
  1606. elements.property(elements.CJB_PT_WTF, 'Weight', '20')
  1607. elements.property(elements.CJB_PT_WTF, 'Diffusion', '16384')
  1608. elements.property(elements.CJB_PT_WTF, 'Temperature', '16384')
  1609. elements.property(elements.CJB_PT_WTF, 'HotAir', '900')
  1610. local function Lflare(i, colr, colg, colb)
  1611.     return 1, 0x00000004, 255, 184, 117, 3, 255, 184, 117, 3
  1612. end
  1613. tpt.graphics_func(Lflare, WTF)
  1614.  
  1615. --Quarks
  1616.  
  1617. local QURK = elements.allocate("AMY", "QURK")
  1618. elements.element(elements.AMY_PT_QURK, elements.element(elements.DEFAULT_PT_NEUT))
  1619. elements.property(elements.AMY_PT_QURK, "Name", "QURK")
  1620. elements.property(elements.AMY_PT_QURK, "Description", "Quarks. Make up all particles in existance.")
  1621. elements.property(elements.AMY_PT_QURK, "Colour", 0x1E1E1E)
  1622. elements.property(elements.AMY_PT_QURK, "MenuSection", elem.SC_NUCLEAR)
  1623. elements.property(elements.AMY_PT_QURK, "MenuVisible", 1)
  1624. elements.property(elements.AMY_PT_QURK, "Temperature",10000)
  1625. elements.property(elements.AMY_PT_QURK, "Weight", -1)
  1626. elements.property(elements.AMY_PT_QURK, "HeatConduct", 0)
  1627.  
  1628. math.randomseed(os.time())
  1629. function QURK_update(i, x, y, s, n)
  1630.     if tpt.get_property("tmp",i)==0 then
  1631.         tpt.parts[i].tmp=1
  1632.                 randvel=math.random(-20,20)
  1633.                 randvel2=math.random(-20,20)
  1634.                 tpt.parts[i].vx=randvel
  1635.                 tpt.parts[i].vy=randvel2
  1636.             end
  1637.  
  1638.             xvel=tpt.parts[i].vx
  1639.             yvel=tpt.parts[i].vy
  1640.  
  1641.             xpos=x+xvel
  1642.             ypos=y+yvel
  1643.    
  1644.     if xpos >= 608 then
  1645.         tpt.delete(i)
  1646.         end
  1647.     if ypos >= 380 then
  1648.         tpt.delete(i)
  1649.         end
  1650.    
  1651.             tpt.parts[i].temp=10000
  1652. end
  1653.  
  1654.  
  1655.     for i = 1,255 do
  1656.         sim.can_move(elem.AMY_PT_QURK, i, 2)
  1657.     end
  1658.  
  1659. local function graphics1(i, colr, colg, colb)
  1660.     return 1,0x00010010,255,25,25,25,255,25,25,25
  1661. end
  1662. tpt.graphics_func(graphics1,QURK)
  1663.  
  1664.  tpt.element_func(QURK_update, elements.AMY_PT_QURK,1)
  1665.  
  1666.  
  1667. --Neutrinos
  1668.  
  1669. local NEUR = elements.allocate("AMY", "NEUR")
  1670. elements.element(elements.AMY_PT_NEUR, elements.element(elements.DEFAULT_PT_NEUT))
  1671. elements.property(elements.AMY_PT_NEUR, "Name", "NEUR")
  1672. elements.property(elements.AMY_PT_NEUR, "Description", "Neutrinos. Pass through everything.")
  1673. elements.property(elements.AMY_PT_NEUR, "Colour", 0x27FE99)
  1674. elements.property(elements.AMY_PT_NEUR, "MenuSection", elem.SC_NUCLEAR)
  1675. elements.property(elements.AMY_PT_NEUR, "MenuVisible", 1)
  1676. elements.property(elements.AMY_PT_NEUR, "Temperature", 0)
  1677. elements.property(elements.AMY_PT_NEUR, "Weight", -10)
  1678. elements.property(elements.AMY_PT_NEUR, "Diffusion", 1)
  1679. elements.property(elements.AMY_PT_NEUR, "HeatConduct", 0)
  1680.  
  1681. math.randomseed(os.time())
  1682. function NEUR_update(i, x, y, s, n)
  1683.     if tpt.get_property("tmp",i)==0 then
  1684.         tpt.parts[i].tmp=1
  1685.                 randvel=math.random(-20,20)/5
  1686.                 randvel2=math.random(-20,20)/5
  1687.                 tpt.parts[i].vx=randvel
  1688.                 tpt.parts[i].vy=randvel2
  1689.             end
  1690.  
  1691.             xvel=tpt.parts[i].vx
  1692.             yvel=tpt.parts[i].vy
  1693.  
  1694.             xpos=x+xvel
  1695.             ypos=y+yvel
  1696.    
  1697.     if xpos >= 608 then
  1698.         tpt.delete(i)
  1699.         end
  1700.     if ypos >= 380 then
  1701.         tpt.delete(i)
  1702.         end
  1703.    
  1704.             tpt.parts[i].temp=300
  1705.    
  1706. end
  1707.  
  1708.    
  1709.     for i = 1,255 do
  1710.         sim.can_move(elem.AMY_PT_NEUR, i, 2)
  1711.     end
  1712.  
  1713. local function graphics1(i, colr, colg, colb)
  1714.     return 1,0x00010000,255,39,254,153,255,39,254,153
  1715. end
  1716. tpt.graphics_func(graphics1,NEUR)
  1717.  
  1718. --Credits Window
  1719.  
  1720. local a = "1"
  1721. local b = Window:new(-1,-1,200,200)
  1722. local c = Label:new(10,5,140,16, "TPT's Mod")
  1723. local d = Label:new(10,25,121,16, "Compiled by Amy")
  1724. local e =       Label:new(10,85,170,16, "Credit to: jacob1, FeynmanLogomaker,")
  1725. local f =       Label:new(135,5,88,16, ("RCA"))
  1726. local g = Label:new(10,95,180,16, "timpfeifer, CeeJayBee, Videogamer555,")
  1727. local h = Label:new(10,105,170,16,"00yoshi, and RadioActiveLua.")
  1728. local i = Label:new(10,125,180,16,"Report Bugs/Suggest for Next Version:")
  1729. local j = Label:new(10,135,160,16,"[email protected]")
  1730.  
  1731. local Close = Button:new(10, 174, 60, 16, "Close")
  1732.  
  1733. Close:action(function() interface.closeWindow(b) end)
  1734. b:onTryExit(function() interface.closeWindow(b) end)
  1735.  
  1736. b:addComponent(Close);
  1737.  
  1738. local Button1 = Button:new(613, 97, 15, 15, "CR", "Open Info and Credits.")
  1739.  
  1740. Button1:action(function() interface.showWindow(b) end)
  1741.  
  1742. bb = Label:new(10,45,138,16, "Special Thanks To jacob1")
  1743. cc = Label:new(10,55,60,16, "Version 3")
  1744. dd = Label:new(10,65,57,16, "Update 0")
  1745.  
  1746. b:addComponent(bb)
  1747. b:addComponent(dd)
  1748. b:addComponent(cc)
  1749. b:addComponent(c)
  1750. b:addComponent(d)
  1751. b:addComponent(e)
  1752. b:addComponent(f)
  1753. b:addComponent(g)
  1754. b:addComponent(h)
  1755. b:addComponent(i)
  1756. b:addComponent(j)
  1757.  
  1758. interface.addComponent(Button1)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement