Advertisement
Guest User

fuelmod 1.9

a guest
May 24th, 2016
214
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. colourRGB = {255,255,255}
  2. FuelMod = {["version"] = 1.9}
  3. local crack
  4. local ol
  5. local f
  6. if fs.exists("Saves/JWsetting.txt") == true then
  7.     f = io.open("Saves/JWsetting.txt", "r")
  8.     buttonable = f:read("*n")
  9. else
  10.     fs.makeDirectory("Saves")
  11.     f = io.open("Saves/JWsetting.txt", "w")
  12.     f:write("1")
  13.     buttonable = 1
  14. end
  15. f:close()
  16.  
  17. --petrol
  18. local antifrzz = elements.allocate("JWARD", "AFRZ")
  19. local petrolgas = elements.allocate("JWARD", "PTLV")
  20. local petrol = elements.allocate("JWARD", "PTRL")
  21. elements.element(elements.JWARD_PT_PTRL, elements.element(elements.DEFAULT_PT_GEL))
  22. elements.property(elements.JWARD_PT_PTRL, "Name", "PTRL")
  23. elements.property(elements.JWARD_PT_PTRL, "Description", "Petrol. Highly flammable liquid.")
  24. elements.property(elements.JWARD_PT_PTRL, "Colour", 0x0A4A5C)
  25. elements.property(elements.JWARD_PT_PTRL, "MenuSection", SC_LIQUID)
  26. elements.property(elements.JWARD_PT_PTRL, "Gravity", 0.6)
  27. elements.property(elements.JWARD_PT_PTRL, "Flammable", 0)
  28. elements.property(elements.JWARD_PT_PTRL, "Explosive", 0)
  29. elements.property(elements.JWARD_PT_PTRL, "Loss", 0.8)
  30. elements.property(elements.JWARD_PT_PTRL, "AirLoss", 0.94)
  31. elements.property(elements.JWARD_PT_PTRL, "AirDrag", 0.02)
  32. elements.property(elements.JWARD_PT_PTRL, "Advection", 0.8)
  33. elements.property(elements.JWARD_PT_PTRL, "Weight", 12)
  34. elements.property(elements.JWARD_PT_PTRL, "Diffusion", 0)
  35. elements.property(elements.JWARD_PT_PTRL, "Meltable", 0)
  36. elements.property(elements.JWARD_PT_PTRL, "Hardness", 0)
  37. elements.property(elements.JWARD_PT_PTRL, "Falldown", 2)
  38. elements.property(elements.JWARD_PT_PTRL, "Properties", TYPE_LIQUID)
  39. elements.property(elements.JWARD_PT_PTRL, "State", ST_LIQUID)
  40. elements.property(elements.JWARD_PT_PTRL, "Temperature", 295.15)
  41. elements.property(elements.JWARD_PT_PTRL, "HeatConduct", 78)
  42. elements.property(elements.JWARD_PT_PTRL, "HighTemperature", 333.15)
  43. elements.property(elements.JWARD_PT_PTRL, "HighTemperatureTransition", elements.JWARD_PT_PTLV)
  44. elements.property(elements.JWARD_PT_PTRL, "LowTemperature", 225.15)
  45. elements.property(elements.JWARD_PT_PTRL, "LowTemperatureTransition", elements.DEFAULT_PT_ICE)
  46. function PTRL(i,x,y,s,n)
  47.     local reaction = tpt.get_property("type",x+math.random(-1,1),y+math.random(-1,1))
  48.     local cal = tpt.get_property("type",x+math.random(-1,1),y+math.random(-1,1))
  49.     if cal == tpt.element('acel') and reaction == kerosene then
  50.         sim.partChangeType(i, tpt.element('JETB'))
  51.     end
  52. end
  53. tpt.element_func(PTRL,petrol)
  54.  
  55. elements.element(elements.JWARD_PT_PTLV, elements.element(elements.DEFAULT_PT_HYGN))
  56. elements.property(elements.JWARD_PT_PTLV, "Name", "PTLV")
  57. elements.property(elements.JWARD_PT_PTLV, "Description", "petrol gas")
  58. elements.property(elements.JWARD_PT_PTLV, "Colour", 0x0A4A5C)
  59. elements.property(elements.JWARD_PT_PTLV, "MenuVisible", 0)
  60. elements.property(elements.JWARD_PT_PTLV, "Gravity", -0.02)
  61. elements.property(elements.JWARD_PT_PTLV, "Flammable", 500)
  62. elements.property(elements.JWARD_PT_PTLV, "Explosive", 1)
  63. elements.property(elements.JWARD_PT_PTLV, "Loss", 0.75)
  64. elements.property(elements.JWARD_PT_PTLV, "AirLoss", 0.97)
  65. elements.property(elements.JWARD_PT_PTLV, "AirDrag", 0.01)
  66. elements.property(elements.JWARD_PT_PTLV, "Advection", 1)
  67. elements.property(elements.JWARD_PT_PTLV, "Weight", 0)
  68. elements.property(elements.JWARD_PT_PTLV, "Diffusion", 0.7)
  69. elements.property(elements.JWARD_PT_PTLV, "Meltable", 0)
  70. elements.property(elements.JWARD_PT_PTLV, "Hardness", 0)
  71. elements.property(elements.JWARD_PT_PTLV, "Falldown", 0)
  72. elements.property(elements.JWARD_PT_PTLV, "Properties", TYPE_GAS)
  73. elements.property(elements.JWARD_PT_PTLV, "State", ST_GAS)
  74. elements.property(elements.JWARD_PT_PTLV, "Temperature", 343.15)
  75. elements.property(elements.JWARD_PT_PTLV, "HeatConduct", 80)
  76. elements.property(elements.JWARD_PT_PTLV, "LowTemperature", 333.14)
  77. elements.property(elements.JWARD_PT_PTLV, "LowTemperatureTransition", elements.JWARD_PT_PTRL)
  78. function PTLV(i,x,y,s,n)
  79. end
  80. tpt.element_func(PTLV,petrolgas)
  81.  
  82. elements.element(elements.JWARD_PT_AFRZ, elements.element(elements.DEFAULT_PT_GEL))
  83. elements.property(elements.JWARD_PT_AFRZ, "Name", "AFRZ")
  84. elements.property(elements.JWARD_PT_AFRZ, "Description", "antifreeze, keeps your fuel nice and toasty. methnol")
  85. elements.property(elements.JWARD_PT_AFRZ, "Colour", 0x0C3F5B)
  86. elements.property(elements.JWARD_PT_AFRZ, "MenuSection", SC_LIQUID)
  87. elements.property(elements.JWARD_PT_AFRZ, "Gravity", 0.6)
  88. elements.property(elements.JWARD_PT_AFRZ, "Flammable", 65)
  89. elements.property(elements.JWARD_PT_AFRZ, "Explosive", 0)
  90. elements.property(elements.JWARD_PT_AFRZ, "Loss", 0.8)
  91. elements.property(elements.JWARD_PT_AFRZ, "AirLoss", 0.94)
  92. elements.property(elements.JWARD_PT_AFRZ, "AirDrag", 0.02)
  93. elements.property(elements.JWARD_PT_AFRZ, "Advection", 0.8)
  94. elements.property(elements.JWARD_PT_AFRZ, "Weight", 12)
  95. elements.property(elements.JWARD_PT_AFRZ, "Diffusion", 0)
  96. elements.property(elements.JWARD_PT_AFRZ, "Meltable", 0)
  97. elements.property(elements.JWARD_PT_AFRZ, "Hardness", 0)
  98. elements.property(elements.JWARD_PT_AFRZ, "Falldown", 2)
  99. elements.property(elements.JWARD_PT_AFRZ, "State", ST_LIQUID)
  100. elements.property(elements.JWARD_PT_AFRZ, "Temperature", 295.15)
  101. elements.property(elements.JWARD_PT_AFRZ, "HeatConduct", 78)
  102. elements.property(elements.JWARD_PT_AFRZ, "Properties", elem.TYPE_LIQUID+elem.PROP_DEADLY)
  103. function AFRZ(i,x,y,s,n)
  104.     local warm = tpt.get_property("type",x+math.random(-1,1),y+math.random(-1,1))
  105.     local warm2 = tpt.get_property("temp",x,y)
  106.     if warm == tpt.element('sprk') or warm == tpt.element('ligh') then
  107.         sim.partChangeType(i, tpt.element('fire'))
  108.     end
  109.     if warm2 < 276 then
  110.         if warm == petrol then
  111.             tpt.set_property('temp', 296 ,x, y)
  112.         end
  113.         if warm == tpt.el.desl.id then
  114.             tpt.set_property('temp', 296 ,x, y)
  115.         end
  116.         if warm == BioDiesel then
  117.             tpt.set_property('temp', 296 ,x, y)
  118.         end
  119.         if warm == jetfuel then
  120.             tpt.set_property('temp', 296 ,x, y)
  121.         end
  122.         if warm == tpt.el.ice.id then
  123.             tpt.set_property('temp', 296 ,x, y)
  124.         end
  125.     end
  126.     if warm == tpt.el.wtrv.id and warm2 > 1100 then
  127.             sim.partChangeType(i, tpt.element('coke'))
  128.     end
  129. end
  130. tpt.element_func(AFRZ, tpt.element('AFRZ'))
  131.  
  132. --diesel & bio diesel
  133. local Dieselgas = elements.allocate("JWARD", "DSLV")
  134. local potash_lye = elements.allocate("JWARD", "PLYE")
  135. local cooking_oil = elements.allocate("JWARD", "COIL")
  136. local BioDiesel = elements.allocate("JWARD", "BDSL")
  137.  
  138. elements.element(elements.JWARD_PT_DSLV, elements.element(elements.DEFAULT_PT_HYGN))
  139. elements.property(elements.JWARD_PT_DSLV, "Name", "DSLV")
  140. elements.property(elements.JWARD_PT_DSLV, "Description", "diesel gas")
  141. elements.property(elements.JWARD_PT_DSLV, "Colour", 0x440000)
  142. elements.property(elements.JWARD_PT_DSLV, "MenuVisible", 0)
  143. elements.property(elements.JWARD_PT_DSLV, "Gravity", -0.02)
  144. elements.property(elements.JWARD_PT_DSLV, "Flammable", 550)
  145. elements.property(elements.JWARD_PT_DSLV, "Explosive", 1)
  146. elements.property(elements.JWARD_PT_DSLV, "Loss", 0.75)
  147. elements.property(elements.JWARD_PT_DSLV, "AirLoss", 0.97)
  148. elements.property(elements.JWARD_PT_DSLV, "AirDrag", 0.01)
  149. elements.property(elements.JWARD_PT_DSLV, "Advection", 1)
  150. elements.property(elements.JWARD_PT_DSLV, "Weight", 0)
  151. elements.property(elements.JWARD_PT_DSLV, "Diffusion", 0.7)
  152. elements.property(elements.JWARD_PT_DSLV, "Meltable", 0)
  153. elements.property(elements.JWARD_PT_DSLV, "Hardness", 0)
  154. elements.property(elements.JWARD_PT_DSLV, "Falldown", 0)
  155. elements.property(elements.JWARD_PT_DSLV, "Properties", TYPE_GAS)
  156. elements.property(elements.JWARD_PT_DSLV, "State", ST_GAS)
  157. elements.property(elements.JWARD_PT_DSLV, "Temperature", 483.15)
  158. elements.property(elements.JWARD_PT_DSLV, "HeatConduct", 80)
  159. elements.property(elements.JWARD_PT_DSLV, "LowTemperature", 473.15)
  160. elements.property(elements.JWARD_PT_DSLV, "LowTemperatureTransition", elements.DEFAULT_PT_DESL)
  161. function DSLV(i,x,y,s,n)
  162. end
  163. tpt.element_func(DSLV,Dieselgas)
  164.  
  165.  
  166. elements.element(elements.JWARD_PT_COIL, elements.element(elements.DEFAULT_PT_GEL))
  167. elements.property(elements.JWARD_PT_COIL, "Name", "COIL")
  168. elements.property(elements.JWARD_PT_COIL, "Description", "Cooking oil, bubbles when heated.")
  169. elements.property(elements.JWARD_PT_COIL, "Colour", 0xA57214)
  170. elements.property(elements.JWARD_PT_COIL, "MenuSection", 7)
  171. elements.property(elements.JWARD_PT_COIL, "Gravity", 0.6)
  172. elements.property(elements.JWARD_PT_COIL, "Flammable", 1)
  173. elements.property(elements.JWARD_PT_COIL, "Explosive", 0)
  174. elements.property(elements.JWARD_PT_COIL, "Loss", 1)
  175. elements.property(elements.JWARD_PT_COIL, "AirLoss", 0.91)
  176. elements.property(elements.JWARD_PT_COIL, "AirDrag", 0.02)
  177. elements.property(elements.JWARD_PT_COIL, "Advection", 0.9)
  178. elements.property(elements.JWARD_PT_COIL, "Weight", 10)
  179. elements.property(elements.JWARD_PT_COIL, "Meltable", 0)
  180. elements.property(elements.JWARD_PT_COIL, "Hardness", 86)
  181. elements.property(elements.JWARD_PT_COIL, "Falldown", 2)
  182. elements.property(elements.JWARD_PT_COIL, "Properties", TYPE_LIQUID)
  183. elements.property(elements.JWARD_PT_COIL, "State", ST_LIQUID)
  184. elements.property(elements.JWARD_PT_COIL, "Temperature", 295.15)
  185. elements.property(elements.JWARD_PT_COIL, "HeatConduct", 100)
  186. function COIL(i,x,y,s,n)
  187.     local cx = math.random(-3,3)
  188.     local cy = math.random(-5,1)
  189.     local reaction = tpt.get_property("temp",x,y)
  190.     local bioo = tpt.get_property("type",x + math.random(-2,2), y + math.random(-2,2))
  191.     local biooo = tpt.get_property("type",x + cy, y + cx)
  192.     if cy == 1 then
  193.         if reaction > 363.15 then
  194.             tpt.set_property('vy', -1, x, y)
  195.         end
  196.     else
  197.         tpt.set_property('vy', 1, x, y)
  198.     end
  199.     if biooo == potash_lye and bioo == antifrzz then
  200.         if cy == 1 then
  201.             sim.partChangeType(i, tpt.element('GLCR'))
  202.         else
  203.             sim.partChangeType(i, tpt.element('BDSL'))
  204.         end
  205.     end
  206.     if biooo == potash_lye and bioo == tpt.el.watr.id and reaction > 290 and reaction < 330 then
  207.         sim.partChangeType(i, tpt.element('SOAP'))
  208.         tpt.delete(x + cx,y + cy)
  209.     end
  210. end
  211. tpt.element_func(COIL, tpt.element('COIL'))
  212.  
  213. elements.element(elements.JWARD_PT_BDSL, elements.element(elements.DEFAULT_PT_GEL))
  214. elements.property(elements.JWARD_PT_BDSL, "Name", "BDSL")
  215. elements.property(elements.JWARD_PT_BDSL, "Description", "Bio Diesel. Made from cooking oil.")
  216. elements.property(elements.JWARD_PT_BDSL, "Colour", 0x331000)
  217. elements.property(elements.JWARD_PT_BDSL, "MenuSection", SC_LIQUID)
  218. elements.property(elements.JWARD_PT_BDSL, "Gravity", 0.6)
  219. elements.property(elements.JWARD_PT_BDSL, "Flammable", 0)
  220. elements.property(elements.JWARD_PT_BDSL, "Explosive", 0)
  221. elements.property(elements.JWARD_PT_BDSL, "Loss", 0.8)
  222. elements.property(elements.JWARD_PT_BDSL, "AirLoss", 0.94)
  223. elements.property(elements.JWARD_PT_BDSL, "AirDrag", 0.02)
  224. elements.property(elements.JWARD_PT_BDSL, "Advection", 0.8)
  225. elements.property(elements.JWARD_PT_BDSL, "Weight", 12)
  226. elements.property(elements.JWARD_PT_BDSL, "Diffusion", 0)
  227. elements.property(elements.JWARD_PT_BDSL, "Meltable", 0)
  228. elements.property(elements.JWARD_PT_BDSL, "Hardness", 0)
  229. elements.property(elements.JWARD_PT_BDSL, "Falldown", 2)
  230. elements.property(elements.JWARD_PT_BDSL, "Properties", TYPE_LIQUID)
  231. elements.property(elements.JWARD_PT_BDSL, "State", ST_LIQUID)
  232. elements.property(elements.JWARD_PT_BDSL, "Temperature", 295.15)
  233. elements.property(elements.JWARD_PT_BDSL, "HeatConduct", 99)
  234. elements.property(elements.JWARD_PT_BDSL, "HighTemperature", 403.15)
  235. elements.property(elements.JWARD_PT_BDSL, "HighTemperatureTransition", elements.JWARD_PT_DSLV)
  236. function BDSL(i,x,y,s,n)
  237.     local findcoil = tpt.get_property("type",x+math.random(-1,1),y+math.random(-1,1))
  238.     local otherfind = tpt.get_property("type",x+math.random(-1,1),y+math.random(-1,1))
  239.     if findcoil == cooking_oil then
  240.         tpt.set_property('life', 2 ,x, y)
  241.     elseif findcoil == tpt.el.acel.id then
  242.         if otherfind == tpt.el.desl.id then
  243.             sim.partChangeType(i, tpt.element('desl'))
  244.         end
  245.     end
  246.     if otherfind == tpt.el.sprk.id or otherfind == tpt.el.ligh.id then
  247.         sim.partChangeType(i, tpt.element('fire'))
  248.     end
  249. end
  250. tpt.element_func(BDSL, tpt.element('BDSL'))
  251.  
  252. function desl(i,x,y,s,n)
  253.     if buttonable == 1 and tpt.get_property("type",x+math.random(-1,1),y+math.random(-1,1)) == tpt.el.brel.id then
  254.         if crack == 0 then
  255.             sim.partChangeType(i, petrol)
  256.         else
  257.             sim.partChangeType(i, tpt.element('PRPN'))
  258.         end
  259.     end
  260. end
  261. tpt.element_func(desl,tpt.el.desl.id)
  262.  
  263. elements.element(elements.JWARD_PT_PLYE, elements.element(elements.DEFAULT_PT_BCOL))
  264. elements.property(elements.JWARD_PT_PLYE, "Name", "PLYE")
  265. elements.property(elements.JWARD_PT_PLYE, "Description", "potash lye")
  266. elements.property(elements.JWARD_PT_PLYE, "Colour", 0xCCCCCC)
  267. elements.property(elements.JWARD_PT_PLYE, "MenuSection", 8)
  268. elements.property(elements.JWARD_PT_PLYE, "Gravity", .35)
  269. elements.property(elements.JWARD_PT_PLYE, "Flammable", 0)
  270. elements.property(elements.JWARD_PT_PLYE, "Explosive", 0)
  271. elements.property(elements.JWARD_PT_PLYE, "Loss", 0.15)
  272. elements.property(elements.JWARD_PT_PLYE, "AirLoss", 0.96)
  273. elements.property(elements.JWARD_PT_PLYE, "AirDrag", 0.03)
  274. elements.property(elements.JWARD_PT_PLYE, "Advection", 0.4)
  275. elements.property(elements.JWARD_PT_PLYE, "Weight", 60)
  276. elements.property(elements.JWARD_PT_PLYE, "Diffusion", 0)
  277. elements.property(elements.JWARD_PT_PLYE, "Falldown", 1)
  278. elements.property(elements.JWARD_PT_PLYE, "Hardness", 0)
  279. elements.property(elements.JWARD_PT_PLYE, "HeatConduct", 62)
  280. elements.property(elements.JWARD_PT_PLYE, "Properties", elem.PROP_DEADLY)
  281. elements.property(elements.JWARD_PT_PLYE, "HighTemperature", 679.15)
  282. elements.property(elements.JWARD_PT_PLYE, "HighTemperatureTransition", elements.DEFAULT_PT_LAVA)
  283. function PLYE(i,x,y,s,n)
  284.     local reaction = tpt.get_property("type",x+math.random(-1,1),y+math.random(-1,1))
  285.     if reaction == tpt.el.acid.id then
  286.         sim.partChangeType(i, tpt.element('SLTW'))
  287.     end
  288. end
  289. tpt.element_func(PLYE, tpt.element('PLYE'))
  290.  
  291. function ACIDBASE(i,x,y,s,n)
  292.     local reaction = tpt.get_property("type",x+math.random(-1,1),y+math.random(-1,1))
  293.     --add metals
  294.     if reaction == potash_lye then
  295.         sim.partChangeType(i, tpt.element('SLTW'))
  296.     end
  297.     if buttonable == 0 then
  298.         if reaction == tpt.element('C4') or reaction == tpt.element('NITR') or reaction == tpt.element('GUN') or reaction == tpt.element('RBDM') or reaction == tpt.element('LRBD') then
  299.             sim.partChangeType(i, tpt.element('fire'))
  300.         elseif reaction == tpt.el.wtrv.id then
  301.             sim.partChangeType(i, tpt.element('CAUS'))
  302.         end
  303.     else
  304.         if reaction == tpt.element('GLCR') then
  305.             sim.partChangeType(i, tpt.element('NITR'))
  306.         end
  307.     end
  308. end
  309. tpt.element_func(ACIDBASE, tpt.element('acid'), 1)
  310.  
  311. function TTAN(i,x,y,s,n)
  312.     if buttonable == 1 then
  313.         local reaction = tpt.get_property("type",x+math.random(-1,1),y+math.random(-1,1))
  314.         local randomval = math.random(0,100)
  315.         if reaction == tpt.el.acid.id then
  316.             if randomval == 1 then
  317.                 sim.partChangeType(i, tpt.element('SLTW'))
  318.             elseif randomval == 0 then
  319.                 sim.partChangeType(i, tpt.element('hygn'))
  320.             end
  321.         end
  322.     end
  323. end
  324. tpt.element_func(TTAN, tpt.element('ttan'))
  325.  
  326. function IRON(i,x,y,s,n)
  327.     if buttonable == 1 then
  328.         local reaction = tpt.get_property("type",x+math.random(-1,1),y+math.random(-1,1))
  329.         local randomval = math.random(0,20)
  330.         if reaction == tpt.el.acid.id then
  331.             if randomval == 1 then
  332.                 sim.partChangeType(i, tpt.element('SLTW'))
  333.             elseif randomval == 0 then
  334.                 sim.partChangeType(i, tpt.element('hygn'))
  335.             end
  336.         elseif reaction == tpt.el.gas.id then
  337.             sim.partChangeType(i, tpt.element('metl'))
  338.         end
  339.     end
  340. end
  341. tpt.element_func(IRON, tpt.element('iron'))
  342.  
  343. function BRMT(i,x,y,s,n)
  344.     if buttonable == 1 then
  345.         local reaction = tpt.get_property("type",x+math.random(-1,1),y+math.random(-1,1))
  346.         local randomval = math.random(0,10)
  347.         if reaction == tpt.el.acid.id then
  348.             if randomval == 1 then
  349.                 sim.partChangeType(i, tpt.element('SLTW'))
  350.             elseif randomval == 0 then
  351.                 sim.partChangeType(i, tpt.element('hygn'))
  352.             end
  353.         end
  354.     end
  355. end
  356. tpt.element_func(BRMT, tpt.element('brmt'))
  357.  
  358. function BMTL(i,x,y,s,n)
  359.     if buttonable == 1 then
  360.         local reaction = tpt.get_property("type",x+math.random(-1,1),y+math.random(-1,1))
  361.         local randomval = math.random(0,10)
  362.         if reaction == tpt.el.acid.id then
  363.             if randomval == 1 then
  364.                 sim.partChangeType(i, tpt.element('SLTW'))
  365.             elseif randomval == 0 then
  366.                 sim.partChangeType(i, tpt.element('hygn'))
  367.             end
  368.         end
  369.     end
  370. end
  371. tpt.element_func(BMTL, tpt.element('BMTL'))
  372.  
  373. function PLUT(i,x,y,s,n)
  374.     if buttonable == 1 then
  375.         local reaction = tpt.get_property("type",x+math.random(-1,1),y+math.random(-1,1))
  376.         local randomval = math.random(0,20)
  377.         if reaction == tpt.el.acid.id then
  378.             if randomval == 1 then
  379.                 sim.partChangeType(i, tpt.element('SLTW'))
  380.             elseif randomval == 0 then
  381.                 sim.partChangeType(i, tpt.element('hygn'))
  382.             end
  383.         end
  384.     end
  385. end
  386. tpt.element_func(PLUT, tpt.element('plut'))
  387.  
  388. function URAN(i,x,y,s,n)
  389.     if buttonable == 1 then
  390.         local reaction = tpt.get_property("type",x+math.random(-1,1),y+math.random(-1,1))
  391.         local randomval = math.random(0,20)
  392.         if reaction == tpt.el.acid.id then
  393.             if randomval == 1 then
  394.                 sim.partChangeType(i, tpt.element('SLTW'))
  395.             elseif randomval == 0 then
  396.                 sim.partChangeType(i, tpt.element('hygn'))
  397.             end
  398.         end
  399.     end
  400. end
  401. tpt.element_func(URAN, tpt.element('uran'))
  402.  
  403. function RBDM(i,x,y,s,n)
  404.     local reaction = tpt.get_property("type",x+math.random(-1,1),y+math.random(-1,1))
  405.     if reaction == tpt.el.acid.id then
  406.         sim.partChangeType(i, tpt.element('coal'))
  407.     end
  408. end
  409. tpt.element_func(RBDM, tpt.element('rbdm'))
  410.  
  411. function LRBD(i,x,y,s,n)
  412.     local reaction = tpt.get_property("type",x+math.random(-1,1),y+math.random(-1,1))
  413.     if reaction == tpt.el.acid.id then
  414.         sim.partChangeType(i, tpt.element('coal'))
  415.     end
  416. end
  417. tpt.element_func(LRBD, tpt.element('lrbd'))
  418.  
  419. --o0o NITROGEN o0o--
  420. local nitrogen = elements.allocate("JWARD", "N2")
  421. local Diazane = elements.allocate("JWARD", "N2H4")
  422. local DinitrogenTetroxide = elements.allocate("JWARD", "N2O4")
  423. local nitrous = elements.allocate("JWARD", "N2O")
  424. local LiquidNitrous = elements.allocate("JWARD", "LN2O")
  425. local anfoness = elements.allocate("JWARD", "ANFO")
  426. local liquidTNT = elements.allocate("JWARD", "LTNT")
  427.  
  428. elements.element(elements.JWARD_PT_LN2O, elements.element(elements.DEFAULT_PT_GEL))
  429. elements.property(elements.JWARD_PT_LN2O, "Name", "LN2O")
  430. elements.property(elements.JWARD_PT_LN2O, "Description", "Liquid Nitrous Oxide. Burns very quickly and very hot.")
  431. elements.property(elements.JWARD_PT_LN2O, "Colour", 0x33C1F5)
  432. elements.property(elements.JWARD_PT_LN2O, "MenuSection", 7)
  433. elements.property(elements.JWARD_PT_LN2O, "Gravity", 0.8)
  434. elements.property(elements.JWARD_PT_LN2O, "Flammable", 6000)
  435. elements.property(elements.JWARD_PT_LN2O, "Explosive", 0)
  436. elements.property(elements.JWARD_PT_LN2O, "Loss", 0.5)
  437. elements.property(elements.JWARD_PT_LN2O, "AirLoss", 0.94)
  438. elements.property(elements.JWARD_PT_LN2O, "AirDrag", 0.03)
  439. elements.property(elements.JWARD_PT_LN2O, "Advection", 0.7)
  440. elements.property(elements.JWARD_PT_LN2O, "Weight", 43)
  441. elements.property(elements.JWARD_PT_LN2O, "Diffusion", 0)
  442. elements.property(elements.JWARD_PT_LN2O, "Meltable", 0)
  443. elements.property(elements.JWARD_PT_LN2O, "Hardness", 0)
  444. elements.property(elements.JWARD_PT_LN2O, "Falldown", 2)
  445. elements.property(elements.JWARD_PT_LN2O, "Properties", TYPE_LIQUID)
  446. elements.property(elements.JWARD_PT_LN2O, "State", ST_LIQUID)
  447. elements.property(elements.JWARD_PT_LN2O, "Temperature", 174)
  448. elements.property(elements.JWARD_PT_LN2O, "HeatConduct", 58)
  449. elements.property(elements.JWARD_PT_LN2O, "HighTemperature", 185)
  450. elements.property(elements.JWARD_PT_LN2O, "HighTemperatureTransition", elements.JWARD_PT_N2O)
  451. elements.property(elements.JWARD_PT_LN2O, "LowTemperature", 160.15)
  452. elements.property(elements.JWARD_PT_LN2O, "LowTemperatureTransition", elements.DEFAULT_PT_ICE)
  453.  
  454. elements.element(elements.JWARD_PT_N2O, elements.element(elements.DEFAULT_PT_CO2))
  455. elements.property(elements.JWARD_PT_N2O, "Name", "N2O")
  456. elements.property(elements.JWARD_PT_N2O, "Description", "Nitrous Oxide. Highly flammable RACE CAR oxidizer!!!.")
  457. elements.property(elements.JWARD_PT_N2O, "Colour", 0x43DAFF)
  458. elements.property(elements.JWARD_PT_N2O, "MenuSection", 6)
  459. elements.property(elements.JWARD_PT_N2O, "Gravity", 0)
  460. elements.property(elements.JWARD_PT_N2O, "Flammable", 5000)
  461. elements.property(elements.JWARD_PT_N2O, "Explosive", 0)
  462. elements.property(elements.JWARD_PT_N2O, "Loss", 0.7)
  463. elements.property(elements.JWARD_PT_N2O, "AirLoss", 0.91)
  464. elements.property(elements.JWARD_PT_N2O, "AirDrag", 0.02)
  465. elements.property(elements.JWARD_PT_N2O, "Advection", 0.9)
  466. elements.property(elements.JWARD_PT_N2O, "Weight", 0)
  467. elements.property(elements.JWARD_PT_N2O, "Diffusion", 1.5)
  468. elements.property(elements.JWARD_PT_N2O, "Meltable", 0)
  469. elements.property(elements.JWARD_PT_N2O, "Hardness", 0)
  470. elements.property(elements.JWARD_PT_N2O, "Falldown", 0)
  471. elements.property(elements.JWARD_PT_N2O, "Properties", TYPE_GAS)
  472. elements.property(elements.JWARD_PT_N2O, "State", ST_GAS)
  473. elements.property(elements.JWARD_PT_N2O, "Temperature", 295.15)
  474. elements.property(elements.JWARD_PT_N2O, "HeatConduct", 80)
  475. elements.property(elements.JWARD_PT_N2O, "LowTemperature", 185.67)
  476. elements.property(elements.JWARD_PT_N2O, "LowTemperatureTransition", elements.JWARD_PT_LN2O)
  477. function N2O(i,x,y,s,n)
  478.     local reaction = tpt.get_property("type",x+math.random(-1,1),y+math.random(-1,1))
  479.     if reaction == tpt.el.fire.id or reaction == tpt.el.plsm.id then
  480.         if crack == 0 then
  481.             sim.partChangeType(i, tpt.element('N2'))
  482.             sim.pressure((x/4),(y/4), 100)
  483.         else
  484.             sim.partChangeType(i, tpt.element('plsm'))
  485.             sim.pressure((x/4),(y/4), 100)
  486.         end
  487.     end
  488. end
  489. tpt.element_func(N2O,nitrous)
  490.  
  491. elements.element(elements.JWARD_PT_N2O4, elements.element(elements.DEFAULT_PT_GEL))
  492. elements.property(elements.JWARD_PT_N2O4, "Name", "N2O4")
  493. elements.property(elements.JWARD_PT_N2O4, "Description", "Dinitrogen Tetroxide rocket oxidizer")
  494. elements.property(elements.JWARD_PT_N2O4, "Colour", 0x30CEC6)
  495. elements.property(elements.JWARD_PT_N2O4, "MenuSection", 5)
  496. elements.property(elements.JWARD_PT_N2O4, "Gravity", 0.8)
  497. elements.property(elements.JWARD_PT_N2O4, "Flammable", 30)
  498. elements.property(elements.JWARD_PT_N2O4, "Explosive", 1)
  499. elements.property(elements.JWARD_PT_N2O4, "Loss", 0.7)
  500. elements.property(elements.JWARD_PT_N2O4, "AirLoss", 0.91)
  501. elements.property(elements.JWARD_PT_N2O4, "AirDrag", 0.03)
  502. elements.property(elements.JWARD_PT_N2O4, "Advection", 0.6)
  503. elements.property(elements.JWARD_PT_N2O4, "Weight", 46)
  504. elements.property(elements.JWARD_PT_N2O4, "Diffusion", 1.5)
  505. elements.property(elements.JWARD_PT_N2O4, "Meltable", 0)
  506. elements.property(elements.JWARD_PT_N2O4, "Hardness", 0)
  507. elements.property(elements.JWARD_PT_N2O4, "Falldown", 2)
  508. elements.property(elements.JWARD_PT_N2O4, "Properties", TYPE_LIQUID)
  509. elements.property(elements.JWARD_PT_N2O4, "State", ST_LIQUID)
  510. elements.property(elements.JWARD_PT_N2O4, "Temperature", 295.15)
  511. elements.property(elements.JWARD_PT_N2O4, "HeatConduct", 78)
  512. elements.property(elements.JWARD_PT_N2O4, "LowTemperatureTransition", elements.DEFAULT_PT_ICE)
  513. elements.property(elements.JWARD_PT_N2O4, "LowTemperature", 261.9)
  514. function N2O4(i,x,y,s,n)
  515.     local rocket = tpt.get_property("type",x+math.random(-2,2),y+math.random(-2,2))
  516.     if rocket == Diazane or rocket == tpt.element('plsm') or rocket == tpt.element('fire') or rocket == tpt.element('thdr') then
  517.         if crack == 1 then
  518.             sim.partChangeType(i, tpt.element('plsm'))
  519.             sim.pressure((x/4),(y/4), 250)
  520.         else
  521.             sim.partChangeType(i, tpt.element('n2'))
  522.             sim.pressure((x/4),(y/4), 250)
  523.         end
  524.     end
  525. end
  526. tpt.element_func(N2O4,DinitrogenTetroxide)
  527.  
  528. elements.element(elements.JWARD_PT_LTNT, elements.element(elements.DEFAULT_PT_GEL))
  529. elements.property(elements.JWARD_PT_LTNT, "Name", "LTNT")
  530. elements.property(elements.JWARD_PT_LTNT, "Description", "liquid TNT")
  531. elements.property(elements.JWARD_PT_LTNT, "Colour", 0xBF605A)
  532. elements.property(elements.JWARD_PT_LTNT, "MenuSection", 5)
  533. elements.property(elements.JWARD_PT_LTNT, "Gravity", 1)
  534. elements.property(elements.JWARD_PT_LTNT, "Flammable", 20)
  535. elements.property(elements.JWARD_PT_LTNT, "Explosive", 1)
  536. elements.property(elements.JWARD_PT_LTNT, "Loss", 0.7)
  537. elements.property(elements.JWARD_PT_LTNT, "AirLoss", 0.91)
  538. elements.property(elements.JWARD_PT_LTNT, "AirDrag", 0.03)
  539. elements.property(elements.JWARD_PT_LTNT, "Advection", 0.8)
  540. elements.property(elements.JWARD_PT_LTNT, "Weight", 46)
  541. elements.property(elements.JWARD_PT_LTNT, "Diffusion", 0)
  542. elements.property(elements.JWARD_PT_LTNT, "Meltable", 0)
  543. elements.property(elements.JWARD_PT_LTNT, "Hardness", 0)
  544. elements.property(elements.JWARD_PT_LTNT, "Falldown", 2)
  545. elements.property(elements.JWARD_PT_LTNT, "Properties", TYPE_LIQUID)
  546. elements.property(elements.JWARD_PT_LTNT, "State", ST_LIQUID)
  547. elements.property(elements.JWARD_PT_LTNT, "Temperature", 363.25)
  548. elements.property(elements.JWARD_PT_LTNT, "HeatConduct", 83)
  549. elements.property(elements.JWARD_PT_LTNT, "LowTemperatureTransition", elements.DEFAULT_PT_TNT)
  550. elements.property(elements.JWARD_PT_LTNT, "LowTemperature", 353.25)
  551. function LTNT(i,x,y,s,n)
  552.     local reaction = tpt.get_property("type",x+math.random(-1,1),y+math.random(-1,1))
  553.     local atemp = tpt.get_property("temp",x,y)
  554.     if reaction == tpt.el.fire.id or reaction == tpt.el.embr.id or reaction == tpt.el.thdr.id or reaction == tpt.el.sprk.id then
  555.         sim.partChangeType(i, tpt.element('embr'))
  556.         sim.pressure((x/4),(y/4), 255)
  557.     end
  558.     if atemp > 513.15 then
  559.         sim.partChangeType(i, tpt.element('coal'))
  560.     end
  561. end
  562. tpt.element_func(LTNT, tpt.element('LTNT'))
  563.  
  564.  
  565. elements.element(elements.JWARD_PT_N2H4, elements.element(elements.DEFAULT_PT_GEL))
  566. elements.property(elements.JWARD_PT_N2H4, "Name", "N2H4")
  567. elements.property(elements.JWARD_PT_N2H4, "Description", "Hydrazine rocket fuel")
  568. elements.property(elements.JWARD_PT_N2H4, "Colour", 0xB6F064)
  569. elements.property(elements.JWARD_PT_N2H4, "MenuSection", 5)
  570. elements.property(elements.JWARD_PT_N2H4, "Gravity", 1)
  571. elements.property(elements.JWARD_PT_N2H4, "Flammable", 1)
  572. elements.property(elements.JWARD_PT_N2H4, "Explosive", 1)
  573. elements.property(elements.JWARD_PT_N2H4, "Loss", 0.7)
  574. elements.property(elements.JWARD_PT_N2H4, "AirLoss", 0.91)
  575. elements.property(elements.JWARD_PT_N2H4, "AirDrag", 0.03)
  576. elements.property(elements.JWARD_PT_N2H4, "Advection", 0.8)
  577. elements.property(elements.JWARD_PT_N2H4, "Weight", 46)
  578. elements.property(elements.JWARD_PT_N2H4, "Diffusion", 1.5)
  579. elements.property(elements.JWARD_PT_N2H4, "Meltable", 0)
  580. elements.property(elements.JWARD_PT_N2H4, "Hardness", 0)
  581. elements.property(elements.JWARD_PT_N2H4, "Falldown", 2)
  582. elements.property(elements.JWARD_PT_N2H4, "Properties", TYPE_LIQUID)
  583. elements.property(elements.JWARD_PT_N2H4, "State", ST_LIQUID)
  584. elements.property(elements.JWARD_PT_N2H4, "Temperature", 295.15)
  585. elements.property(elements.JWARD_PT_N2H4, "HeatConduct", 83)
  586. elements.property(elements.JWARD_PT_N2H4, "LowTemperatureTransition", elements.DEFAULT_PT_ICE)
  587. elements.property(elements.JWARD_PT_N2H4, "LowTemperature", 275.15)
  588. N2H4Update = function(i, x, y, s, n)
  589.     local clife = tpt.get_property('life', x, y)
  590.     if clife > 1 then
  591.         for cx = -1, 1, 2 do
  592.             for cy = -1, 1, 2 do
  593.                 if ol == 1 then
  594.                     tpt.create(x + cx, y + cy, 'fire')
  595.                 end
  596.                 if ol == 0 then
  597.                     tpt.create(x + cx, y + cy, 'N2')
  598.                 end
  599.                 if ol == -1 then
  600.                     tpt.create(x + cx, y + cy, 'HYGN')
  601.                 end
  602.                 tpt.set_property('temp', 3000, x, y)
  603.             end
  604.         end
  605.         tpt.set_property('life', clife - 1, x, y)
  606.     elseif clife == 1 then
  607.         tpt.set_property('type', 0, x, y)
  608.     elseif s > 0 then
  609.         for cx = -1, 1, 2 do
  610.             for cy = -1, 1, 2 do
  611.                 if tpt.get_property('type', x + cx, y + cy) == 4 or tpt.get_property('type', x + cx, y + cy) == 49 then
  612.                     tpt.set_property('life', 500, x, y)
  613.                     return true
  614.                 end
  615.             end
  616.         end
  617.     end
  618. end
  619. tpt.element_func(N2H4Update, tpt.element('N2H4'))
  620.  
  621. elements.element(elements.JWARD_PT_N2, elements.element(elements.DEFAULT_PT_CO2))
  622. elements.property(elements.JWARD_PT_N2, "Name", "N2")
  623. elements.property(elements.JWARD_PT_N2, "Description", "Nitrogen Gas.")
  624. elements.property(elements.JWARD_PT_N2, "Colour", 0x5E52FF)
  625. elements.property(elements.JWARD_PT_N2, "MenuSection", SC_GAS)
  626. elements.property(elements.JWARD_PT_N2, "Gravity", 0)
  627. elements.property(elements.JWARD_PT_N2, "Flammable", 0)
  628. elements.property(elements.JWARD_PT_N2, "Explosive", 1)
  629. elements.property(elements.JWARD_PT_N2, "Loss", 0.3)
  630. elements.property(elements.JWARD_PT_N2, "AirLoss", 0.99)
  631. elements.property(elements.JWARD_PT_N2, "AirDrag", 0.01)
  632. elements.property(elements.JWARD_PT_N2, "Advection", 2.0)
  633. elements.property(elements.JWARD_PT_N2, "Weight", 0)
  634. elements.property(elements.JWARD_PT_N2, "Diffusion", 2.75)
  635. elements.property(elements.JWARD_PT_N2, "State", ST_GAS)
  636. elements.property(elements.JWARD_PT_N2, "Properties", elem.TYPE_GAS)
  637. elements.property(elements.JWARD_PT_N2, "LowTemperatureTransition", elements.DEFAULT_PT_LN2)
  638. elements.property(elements.JWARD_PT_N2, "LowTemperature", 76)
  639. elements.property(elements.JWARD_PT_N2, "HeatConduct", 80)
  640. function N2(i,x,y,s,n)
  641.     if tpt.get_property("tmp", i) == 0 then
  642.         tpt.set_property("tmp", 1, i)
  643.     end
  644. end
  645. tpt.element_func(N2, tpt.element('N2'))
  646.  
  647. function LN2(i,x,y,s,nt)
  648.     if tpt.get_property("tmp", i) == 1 then
  649.         if tpt.get_property("temp", i) >= 77 then
  650.             tpt.set_property("type","N2",i)
  651.         end
  652.     end
  653.     if tpt.get_property("tmp", i) == 0 then
  654.         if tpt.get_property("temp", i) >= 77 then
  655.             tpt.set_property("type","none",i)
  656.         end
  657.     end
  658. end
  659. tpt.element_func(LN2, tpt.element('ln2'))
  660.  
  661. elements.element(elements.JWARD_PT_ANFO, elements.element(elements.DEFAULT_PT_BCOL))
  662. elements.property(elements.JWARD_PT_ANFO, "Name", "ANFO")
  663. elements.property(elements.JWARD_PT_ANFO, "Description", "anfo explosive")
  664. elements.property(elements.JWARD_PT_ANFO, "Colour", 0xFFCECA)
  665. elements.property(elements.JWARD_PT_ANFO, "MenuSection", 5)
  666. elements.property(elements.JWARD_PT_ANFO, "Gravity", 0.54)
  667. elements.property(elements.JWARD_PT_ANFO, "Flammable", 0)
  668. elements.property(elements.JWARD_PT_ANFO, "Explosive", 0)
  669. elements.property(elements.JWARD_PT_ANFO, "Loss", 0)
  670. elements.property(elements.JWARD_PT_ANFO, "AirLoss", 0.96)
  671. elements.property(elements.JWARD_PT_ANFO, "AirDrag", 0.03)
  672. elements.property(elements.JWARD_PT_ANFO, "Advection", 0)
  673. elements.property(elements.JWARD_PT_ANFO, "Weight", 75)
  674. elements.property(elements.JWARD_PT_ANFO, "Diffusion", 0)
  675. elements.property(elements.JWARD_PT_ANFO, "Falldown", 1)
  676. elements.property(elements.JWARD_PT_ANFO, "Hardness", 0)
  677. elements.property(elements.JWARD_PT_ANFO, "HeatConduct", 62)
  678. elements.property(elements.JWARD_PT_ANFO, "Properties", elem.TYPE_PART+elem.PROP_DEADLY)
  679. elements.property(elements.JWARD_PT_ANFO, "State", ST_SOLID)
  680. function ANFO(i,x,y,s,n)
  681.     local cx = math.random(-1,1)
  682.     local reaction = tpt.get_property("type",x+cx,y+math.random(-1,1))
  683.     local cal = tpt.get_property("type",x+math.random(-1,1),y+math.random(-1,1))
  684.     local atemp = tpt.get_property("temp",x,y)
  685.     if reaction == tpt.el.acid.id then
  686.         if crack == 1 then
  687.             sim.partChangeType(i, tpt.element('salt'))
  688.         else
  689.             sim.partChangeType(i, tpt.element('acid'))
  690.         end
  691.     end
  692.     if reaction == tpt.el.fire.id then
  693.         if cx == 1 then
  694.             sim.partChangeType(i, tpt.element('hygn'))
  695.             sim.pressure((x/4),(y/4), 250)
  696.         elseif cx == 0 then
  697.             sim.partChangeType(i, tpt.element('oxyg'))
  698.             sim.pressure((x/4),(y/4), 250)
  699.         elseif cx == -1 then
  700.             sim.partChangeType(i, tpt.element('N2O'))
  701.         end
  702.     end
  703.     if atemp > 483.15 then
  704.         if crack == 1 then
  705.             sim.partChangeType(i, tpt.element('wtrv'))
  706.         else
  707.             sim.partChangeType(i, tpt.element('N2O'))
  708.         end
  709.     end
  710.     if reaction == tpt.element('oxyg') then
  711.         if cal == catalyst then
  712.             sim.partChangeType(i, tpt.element('n2o4'))
  713.         end
  714.     end
  715. end
  716. tpt.element_func(ANFO, tpt.element('ANFO'))
  717.  
  718. --extra
  719. local solidhydrogen = elements.allocate("JWARD", "SHYG")
  720. local liquidhydrogen = elements.allocate("JWARD", "LHYG")
  721. local propane = elements.allocate("JWARD", "PRPN")
  722. local Glycerol = elements.allocate("JWARD", "GLCR")
  723.  
  724. elements.element(elements.JWARD_PT_SHYG, elements.element(elements.DEFAULT_PT_DMND))
  725. elements.property(elements.JWARD_PT_SHYG, "Colour", 0x7395FE)
  726. elements.property(elements.JWARD_PT_SHYG, "Name", "SHYG")
  727. elements.property(elements.JWARD_PT_SHYG, "Description", "solid hydrogen")
  728. elements.property(elements.JWARD_PT_SHYG, "HeatConduct", 83)
  729. elements.property(elements.JWARD_PT_SHYG, "Flammable", 0)
  730. elements.property(elements.JWARD_PT_SHYG, "Temperature", 10.15)
  731. elements.property(elements.JWARD_PT_SHYG, "HighTemperature", 13.15)
  732. elements.property(elements.JWARD_PT_SHYG, "HighTemperatureTransition", elements.JWARD_PT_LHYG)
  733. elements.property(elements.JWARD_PT_SHYG, "MenuSection", 9)
  734. function SHYG(i,x,y,s,n)
  735.     local dis = tpt.get_property('temp', x, y)
  736.     if dis > 20.15 then
  737.         sim.partChangeType(i, tpt.element('HYGN'))
  738.     elseif dis > 13.15 then
  739.         sim.partChangeType(i, tpt.element('LHYG')) 
  740.     end
  741.     if sim.pressure((x/4),(y/4)) > 255 then
  742.         sim.partChangeType(i, tpt.element('Metl'))
  743.         tpt.set_property("ctype",tpt.element('SHYG'),i)
  744.     end
  745. end
  746. tpt.element_func(SHYG,solidhydrogen)
  747.  
  748. elements.element(elements.JWARD_PT_LHYG, elements.element(elements.DEFAULT_PT_GEL))
  749. elements.property(elements.JWARD_PT_LHYG, "Colour", 0x5070FF)
  750. elements.property(elements.JWARD_PT_LHYG, "Name", "LHYG")
  751. elements.property(elements.JWARD_PT_LHYG, "Description", "liquid hydrogen")
  752. elements.property(elements.JWARD_PT_LHYG, "HeatConduct", 83)
  753. elements.property(elements.JWARD_PT_LHYG, "Flammable", 2)
  754. elements.property(elements.JWARD_PT_LHYG, "Temperature", 15.15)
  755. elements.property(elements.JWARD_PT_LHYG, "HighTemperature", 20.15)
  756. elements.property(elements.JWARD_PT_LHYG, "HighTemperatureTransition", elements.DEFAULT_PT_HYGN)
  757. elements.property(elements.JWARD_PT_LHYG, "LowTemperature", 13.15)
  758. elements.property(elements.JWARD_PT_LHYG, "LowTemperatureTransition", elements.JWARD_PT_SHYG)
  759.  
  760. elements.element(elements.JWARD_PT_GLCR, elements.element(elements.DEFAULT_PT_BCOL))
  761. elements.property(elements.JWARD_PT_GLCR, "Name", "GLCR")
  762. elements.property(elements.JWARD_PT_GLCR, "Description", "Glycerol, mix with acid to make nitr")
  763. elements.property(elements.JWARD_PT_GLCR, "Colour", 0xE1E1E1)
  764. elements.property(elements.JWARD_PT_GLCR, "MenuSection", 7)
  765. elements.property(elements.JWARD_PT_GLCR, "Gravity", 0.94)
  766. elements.property(elements.JWARD_PT_GLCR, "Flammable", 0)
  767. elements.property(elements.JWARD_PT_GLCR, "Explosive", 0)
  768. elements.property(elements.JWARD_PT_GLCR, "Loss", 0)
  769. elements.property(elements.JWARD_PT_GLCR, "AirLoss", 0.96)
  770. elements.property(elements.JWARD_PT_GLCR, "AirDrag", 0.04)
  771. elements.property(elements.JWARD_PT_GLCR, "Advection", 0)
  772. elements.property(elements.JWARD_PT_GLCR, "Weight", 75)
  773. elements.property(elements.JWARD_PT_GLCR, "Diffusion", 0)
  774. elements.property(elements.JWARD_PT_GLCR, "Falldown", 2)
  775. elements.property(elements.JWARD_PT_GLCR, "Hardness", 0)
  776. elements.property(elements.JWARD_PT_GLCR, "HeatConduct", 72)
  777. elements.property(elements.JWARD_PT_GLCR, "Properties", elem.TYPE_LIQUID)
  778. elements.property(elements.JWARD_PT_GLCR, "State", ST_LIQUID)
  779. function GLCR(i,x,y,s,n)
  780.     local reaction = tpt.get_property("type",x+math.random(-1,1),y+math.random(-1,1))
  781.     local dis = tpt.get_property('temp', x, y)
  782.     if reaction == tpt.element('fire') and dis > 373.15 then
  783.         sim.partChangeType(i, tpt.element('fire'))
  784.     end
  785.     if reaction == tpt.element('GLCR') then
  786.         tpt.set_property('vy', 0, x, y)
  787.         tpt.set_property('vx', math.random(-1,1), x, y)
  788.     elseif reaction == tpt.element('ACID') then
  789.         sim.partChangeType(i, tpt.element('NITR'))
  790.     end
  791. end
  792. tpt.element_func(GLCR,Glycerol)
  793.  
  794. elements.element(elements.JWARD_PT_PRPN, elements.element(elements.DEFAULT_PT_CO2))
  795. elements.property(elements.JWARD_PT_PRPN, "Name", "PRPN")
  796. elements.property(elements.JWARD_PT_PRPN, "Description", "Propane. Explodes very easily.")
  797. elements.property(elements.JWARD_PT_PRPN, "Colour", 0xF4A26A)
  798. elements.property(elements.JWARD_PT_PRPN, "MenuSection", 5)
  799. elements.property(elements.JWARD_PT_PRPN, "Gravity", -0.02)
  800. elements.property(elements.JWARD_PT_PRPN, "Flammable", 2500)
  801. elements.property(elements.JWARD_PT_PRPN, "Explosive", 1)
  802. elements.property(elements.JWARD_PT_PRPN, "Loss", 0.75)
  803. elements.property(elements.JWARD_PT_PRPN, "AirLoss", 0.97)
  804. elements.property(elements.JWARD_PT_PRPN, "AirDrag", 0.01)
  805. elements.property(elements.JWARD_PT_PRPN, "Advection", 1)
  806. elements.property(elements.JWARD_PT_PRPN, "Weight", 0)
  807. elements.property(elements.JWARD_PT_PRPN, "Diffusion", 0.7)
  808. elements.property(elements.JWARD_PT_PRPN, "Meltable", 0)
  809. elements.property(elements.JWARD_PT_PRPN, "Hardness", 0)
  810. elements.property(elements.JWARD_PT_PRPN, "Falldown", 0)
  811. elements.property(elements.JWARD_PT_PRPN, "Properties", TYPE_GAS)
  812. elements.property(elements.JWARD_PT_PRPN, "State", ST_GAS)
  813. elements.property(elements.JWARD_PT_PRPN, "Temperature", 295.15)
  814. elements.property(elements.JWARD_PT_PRPN, "HeatConduct", 95)
  815. elements.property(elements.JWARD_PT_PRPN, "HighTemperature", 2379.15)
  816. elements.property(elements.JWARD_PT_PRPN, "HighTemperatureTransition", tpt.el.fire.id)
  817. elements.property(elements.JWARD_PT_PRPN, "LowTemperatureTransition", NT)
  818. function PRPN(i,x,y,s,n)
  819.     local warm = tpt.get_property("type",x+math.random(-1,1),y+math.random(-1,1))
  820.     local warm2 = tpt.get_property("temp",x,y)
  821.     if warm == tpt.el.acid.id or warm == tpt.el.caus.id then
  822.         sim.partChangeType(i, tpt.element('ptrl'))
  823.         tpt.set_property('temp', (warm2 + 1), x, y)
  824.     end
  825.     if warm == tpt.el.wtrv.id and warm2 > 1100 then
  826.         sim.partChangeType(i, tpt.element('co2'))
  827.     end
  828. end
  829. tpt.element_func(PRPN,propane)
  830.  
  831. --kerosene
  832. local KEROSENEGAS = elements.allocate("JWARD", "KERV")
  833. local KEROSENE = elements.allocate("JWARD", "KERO")
  834. elements.element(elements.JWARD_PT_KERO, elements.element(elements.DEFAULT_PT_GEL))
  835. elements.property(elements.JWARD_PT_KERO, "Name", "KERO")
  836. elements.property(elements.JWARD_PT_KERO, "Description", "KERO BURNS HOT AND QUICK")
  837. elements.property(elements.JWARD_PT_KERO, "Colour", 0x01B3D7)
  838. elements.property(elements.JWARD_PT_KERO, "MenuSection", 5)
  839. elements.property(elements.JWARD_PT_KERO, "Gravity", .04)
  840. elements.property(elements.JWARD_PT_KERO, "Flammable", 0)
  841. elements.property(elements.JWARD_PT_KERO, "Explosive", 0)
  842. elements.property(elements.JWARD_PT_KERO, "Loss", 1)
  843. elements.property(elements.JWARD_PT_KERO, "AirLoss", .90)
  844. elements.property(elements.JWARD_PT_KERO, "AirDrag", .01)
  845. elements.property(elements.JWARD_PT_KERO, "Advection", .80)
  846. elements.property(elements.JWARD_PT_KERO, "Weight", 5)
  847. elements.property(elements.JWARD_PT_KERO, "State", ST_liquid)
  848. elements.property(elements.JWARD_PT_KERO, "Properties", elem.TYPE_LIQUID+elem.PROP_DEADLY)
  849. elements.property(elements.JWARD_PT_KERO, "HighTemperature", 393.15)
  850. elements.property(elements.JWARD_PT_KERO, "HighTemperatureTransition", elements.JWARD_PT_KERV)
  851. function KERO(i,x,y,s,n)
  852.     local reaction = tpt.get_property("type",x+math.random(-1,1),y+math.random(-1,1))
  853.     local cal = tpt.get_property("type",x+math.random(-1,1),y+math.random(-1,1))
  854.     if cal == tpt.element('acel') and reaction == petrol then
  855.         sim.partChangeType(i, tpt.element('JETB'))
  856.     end
  857. end
  858. tpt.element_func(KERO,KEROSENE)
  859.  
  860. elements.element(elements.JWARD_PT_KERV, elements.element(elements.DEFAULT_PT_HYGN))
  861. elements.property(elements.JWARD_PT_KERV, "Name", "KERV")
  862. elements.property(elements.JWARD_PT_KERV, "Description", "kerosene gas")
  863. elements.property(elements.JWARD_PT_KERV, "Colour", 0x01B3D7)
  864. elements.property(elements.JWARD_PT_KERV, "MenuVisible", 0)
  865. elements.property(elements.JWARD_PT_KERV, "Gravity", -0.02)
  866. elements.property(elements.JWARD_PT_KERV, "Flammable", 4500)
  867. elements.property(elements.JWARD_PT_KERV, "Explosive", 1)
  868. elements.property(elements.JWARD_PT_KERV, "Loss", 0.75)
  869. elements.property(elements.JWARD_PT_KERV, "AirLoss", 0.97)
  870. elements.property(elements.JWARD_PT_KERV, "AirDrag", 0.01)
  871. elements.property(elements.JWARD_PT_KERV, "Advection", 1)
  872. elements.property(elements.JWARD_PT_KERV, "Weight", 0)
  873. elements.property(elements.JWARD_PT_KERV, "Diffusion", 0.7)
  874. elements.property(elements.JWARD_PT_KERV, "Meltable", 0)
  875. elements.property(elements.JWARD_PT_KERV, "Hardness", 0)
  876. elements.property(elements.JWARD_PT_KERV, "Falldown", 0)
  877. elements.property(elements.JWARD_PT_KERV, "Properties", TYPE_GAS)
  878. elements.property(elements.JWARD_PT_KERV, "State", ST_GAS)
  879. elements.property(elements.JWARD_PT_KERV, "Temperature", 403.15)
  880. elements.property(elements.JWARD_PT_KERV, "HeatConduct", 195)
  881. elements.property(elements.JWARD_PT_KERV, "LowTemperature", 393.15)
  882. elements.property(elements.JWARD_PT_KERV, "LowTemperatureTransition", elements.JWARD_PT_KERO)
  883. function KERV(i,x,y,s,n)
  884. end
  885. tpt.element_func(KERV,KEROSENEGAS)
  886.  
  887. --jetfuel
  888. local JETFUEL = elements.allocate("JWARD", "JETB")
  889. elements.element(elements.JWARD_PT_JETB, elements.element(elements.DEFAULT_PT_GEL))
  890. elements.property(elements.JWARD_PT_JETB, "Name", "JETB")
  891. elements.property(elements.JWARD_PT_JETB, "Description", "Jet type b, fuel-blend of Kero and Ptrl for jet engines")
  892. elements.property(elements.JWARD_PT_JETB, "Colour", 0x676601)
  893. elements.property(elements.JWARD_PT_JETB, "MenuSection", 5)
  894. elements.property(elements.JWARD_PT_JETB, "Gravity", .04)
  895. elements.property(elements.JWARD_PT_JETB, "Flammable", 5000)
  896. elements.property(elements.JWARD_PT_JETB, "Explosive", 1)
  897. elements.property(elements.JWARD_PT_JETB, "Loss", 0.8)
  898. elements.property(elements.JWARD_PT_JETB, "AirLoss", 0.94)
  899. elements.property(elements.JWARD_PT_JETB, "AirDrag", 0.02)
  900. elements.property(elements.JWARD_PT_JETB, "Advection", 0.8)
  901. elements.property(elements.JWARD_PT_JETB, "HighTemperature", 353.15)
  902. elements.property(elements.JWARD_PT_JETB, "Weight", 13)
  903. elements.property(elements.JWARD_PT_JETB, "State", ST_liquid)
  904. elements.property(elements.JWARD_PT_JETB, "Properties", elem.TYPE_LIQUID+elem.PROP_DEADLY)
  905. elements.property(elements.JWARD_PT_JETB, "LowTemperature", 225.15)
  906. elements.property(elements.JWARD_PT_JETB, "LowTemperatureTransition", elements.DEFAULT_PT_ICE)
  907. function JETB(i,x,y,s,n)
  908. end
  909. tpt.element_func(JETB,JETFUEL)
  910.  
  911. --tar
  912. local TARGAS = elements.allocate("JWARD", "TARV")
  913. local TAR = elements.allocate("JWARD", "TAR")
  914. elements.element(elements.JWARD_PT_TAR, elements.element(elements.DEFAULT_PT_SOAP))
  915. elements.property(elements.JWARD_PT_TAR, "Name", "TAR")
  916. elements.property(elements.JWARD_PT_TAR, "Description", "tar hard to burn")
  917. elements.property(elements.JWARD_PT_TAR, "Colour", 0x0D0D03)
  918. elements.property(elements.JWARD_PT_TAR, "MenuSection", 5)
  919. elements.property(elements.JWARD_PT_TAR, "Gravity", .1)
  920. elements.property(elements.JWARD_PT_TAR, "Flammable", 1)
  921. elements.property(elements.JWARD_PT_TAR, "Explosive", 0)
  922. elements.property(elements.JWARD_PT_TAR, "Loss", 1)
  923. elements.property(elements.JWARD_PT_TAR, "AirLoss", .5)
  924. elements.property(elements.JWARD_PT_TAR, "AirDrag", .01)
  925. elements.property(elements.JWARD_PT_TAR, "Advection", .01)
  926. elements.property(elements.JWARD_PT_TAR, "Diffusion", 0.01)
  927. elements.property(elements.JWARD_PT_TAR, "State", ST_liquid)
  928. elements.property(elements.JWARD_PT_TAR, "Weight", 50)
  929. elements.property(elements.JWARD_PT_TAR, "Properties", elem.TYPE_LIQUID+elem.PROP_DEADLY)
  930. elements.property(elements.JWARD_PT_TAR, "HighTemperature", 873.15)
  931. elements.property(elements.JWARD_PT_TAR, "HighTemperatureTransition", elements.JWARD_PT_TARV)
  932. function TAR(i,x,y,s,n)
  933.     local otherfind = tpt.get_property("type",x+math.random(-1,1),y+math.random(-1,1))
  934.     if buttonable == 1 and otherfind == tpt.el.brel.id then
  935.         if ol == 0 then
  936.             sim.partChangeType(i, petrol)
  937.         elseif ol == 1 then
  938.             sim.partChangeType(i, tpt.element('PRPN'))
  939.         elseif ol == -1 then
  940.             sim.partChangeType(i, tpt.element('CRST'))
  941.         end
  942.     end
  943. end
  944. tpt.element_func(TAR,tpt.element('TAR'))
  945.  
  946. elements.element(elements.JWARD_PT_TARV, elements.element(elements.DEFAULT_PT_HYGN))
  947. elements.property(elements.JWARD_PT_TARV, "Name", "TARV")
  948. elements.property(elements.JWARD_PT_TARV, "Description", "tar gas")
  949. elements.property(elements.JWARD_PT_TARV, "Colour", 0x4C2D20)
  950. elements.property(elements.JWARD_PT_TARV, "MenuVisible", 0)
  951. elements.property(elements.JWARD_PT_TARV, "Gravity", -0.02)
  952. elements.property(elements.JWARD_PT_TARV, "Flammable", 100)
  953. elements.property(elements.JWARD_PT_TARV, "Explosive", 0)
  954. elements.property(elements.JWARD_PT_TARV, "Loss", 0.75)
  955. elements.property(elements.JWARD_PT_TARV, "AirLoss", 0.97)
  956. elements.property(elements.JWARD_PT_TARV, "AirDrag", 0.01)
  957. elements.property(elements.JWARD_PT_TARV, "Advection", 1)
  958. elements.property(elements.JWARD_PT_TARV, "Weight", 0)
  959. elements.property(elements.JWARD_PT_TARV, "Diffusion", 0.7)
  960. elements.property(elements.JWARD_PT_TARV, "Meltable", 0)
  961. elements.property(elements.JWARD_PT_TARV, "Hardness", 0)
  962. elements.property(elements.JWARD_PT_TARV, "Falldown", 0)
  963. elements.property(elements.JWARD_PT_TARV, "Properties", TYPE_GAS)
  964. elements.property(elements.JWARD_PT_TARV, "State", ST_GAS)
  965. elements.property(elements.JWARD_PT_TARV, "Temperature", 403.15)
  966. elements.property(elements.JWARD_PT_TARV, "HeatConduct", 195)
  967. elements.property(elements.JWARD_PT_TARV, "LowTemperature", 873.15)
  968. elements.property(elements.JWARD_PT_TARV, "LowTemperatureTransition", elements.JWARD_PT_TAR)
  969.  
  970. --wax
  971. local WAXGAS = elements.allocate("JWARD", "WAXV")
  972. elements.element(elements.JWARD_PT_WAXV, elements.element(elements.DEFAULT_PT_HYGN))
  973. elements.property(elements.JWARD_PT_WAXV, "Name", "WAXV")
  974. elements.property(elements.JWARD_PT_WAXV, "Description", "wax gas")
  975. elements.property(elements.JWARD_PT_WAXV, "Colour", 0xF0F0BB)
  976. elements.property(elements.JWARD_PT_WAXV, "MenuSection", SC_GAS)
  977. elements.property(elements.JWARD_PT_WAXV, "Gravity", -0.02)
  978. elements.property(elements.JWARD_PT_WAXV, "Flammable", 500)
  979. elements.property(elements.JWARD_PT_WAXV, "Explosive", 0)
  980. elements.property(elements.JWARD_PT_WAXV, "Loss", 0.75)
  981. elements.property(elements.JWARD_PT_WAXV, "AirLoss", 0.97)
  982. elements.property(elements.JWARD_PT_WAXV, "AirDrag", 0.01)
  983. elements.property(elements.JWARD_PT_WAXV, "Advection", 1)
  984. elements.property(elements.JWARD_PT_WAXV, "Weight", 0)
  985. elements.property(elements.JWARD_PT_WAXV, "Diffusion", 0.7)
  986. elements.property(elements.JWARD_PT_WAXV, "Meltable", 0)
  987. elements.property(elements.JWARD_PT_WAXV, "Hardness", 0)
  988. elements.property(elements.JWARD_PT_WAXV, "Falldown", 0)
  989. elements.property(elements.JWARD_PT_WAXV, "Properties", TYPE_GAS)
  990. elements.property(elements.JWARD_PT_WAXV, "State", ST_GAS)
  991. elements.property(elements.JWARD_PT_WAXV, "Temperature", 833.15)
  992. elements.property(elements.JWARD_PT_WAXV, "HeatConduct", 195)
  993. elements.property(elements.JWARD_PT_WAXV, "LowTemperature", 823.15)
  994. elements.property(elements.JWARD_PT_WAXV, "LowTemperatureTransition", elements.DEFAULT_PT_WAX)
  995.  
  996. --coke
  997. local CoalCoke = elements.allocate("JWARD", "COKE")
  998. elements.element(elements.JWARD_PT_COKE, elements.element(elements.DEFAULT_PT_BCOL))
  999. elements.property(elements.JWARD_PT_COKE, "Name", "COKE")
  1000. elements.property(elements.JWARD_PT_COKE, "Description", "COAL COKE. Burns for a long time and hot.")
  1001. elements.property(elements.JWARD_PT_COKE, "Colour", 0xAAAAAA)
  1002. elements.property(elements.JWARD_PT_COKE, "MenuSection", 5)
  1003. elements.property(elements.JWARD_PT_COKE, "Gravity", .35)
  1004. elements.property(elements.JWARD_PT_COKE, "Flammable", 0)
  1005. elements.property(elements.JWARD_PT_COKE, "Explosive", 0)
  1006. elements.property(elements.JWARD_PT_COKE, "Loss", 0.15)
  1007. elements.property(elements.JWARD_PT_COKE, "AirLoss", 0.96)
  1008. elements.property(elements.JWARD_PT_COKE, "AirDrag", 0.03)
  1009. elements.property(elements.JWARD_PT_COKE, "Advection", 0.4)
  1010. elements.property(elements.JWARD_PT_COKE, "Weight", 78)
  1011. elements.property(elements.JWARD_PT_COKE, "Falldown", 1)
  1012. COKEUpdate = function(i, x, y, s, n)
  1013.     local clife = tpt.get_property('life', x, y)
  1014.     local function ignore(i,x,y)
  1015.         if buttonable == 1 then
  1016.             local ry = math.random(-1,1)
  1017.             local reactionc = tpt.get_property("ctype",x+ol,y+ry)
  1018.             local reaction = tpt.get_property("type",x+ol,y+ry)
  1019.             if reaction == tpt.element('lava') and reactionc == tpt.element('iron') then
  1020.                 sim.partChangeType(i, tpt.element('metl'))
  1021.             end
  1022.         end
  1023.     end
  1024.     pcall(ignore, i, x, y)
  1025.     if clife > 1 then
  1026.         for cx = -1, 1, 2 do
  1027.             for cy = -1, 1, 2 do
  1028.                 tpt.create(x + cx, y + cy, 'fire')
  1029.                 tpt.set_property('temp', 1700, x, y)
  1030.             end
  1031.         end
  1032.         tpt.set_property('life', clife - 1, x, y)
  1033.     elseif clife == 1 then
  1034.         tpt.set_property('type', 0, x, y)
  1035.     elseif s > 0 then
  1036.         for cx = -1, 1, 2 do
  1037.             for cy = -1, 1, 2 do
  1038.                 if tpt.get_property('type', x + cx, y + cy) == 4 or tpt.get_property('type', x + cx, y + cy) == 49 then
  1039.                     tpt.set_property('life', 500, x, y)
  1040.                     return true
  1041.                 end
  1042.             end
  1043.         end
  1044.     end
  1045. end
  1046. tpt.element_func(COKEUpdate, tpt.element('coke'))
  1047.  
  1048. COALUpdate = function(i, x, y, s, n)
  1049.     local dis = tpt.get_property('temp', x, y)
  1050.     if dis > 1273.15 then
  1051.         if buttonable == 1 or buttonablest == 0 then
  1052.             sim.partChangeType(i, tpt.element('coke'))
  1053.             tpt.set_property('life', 0, x, y)
  1054.             tpt.create(x, y + 1, 'CRTV')
  1055.             tpt.create(x, y - 1, 'TARV')
  1056.         end
  1057.     end
  1058. end
  1059. tpt.element_func(COALUpdate, tpt.element('coal'))
  1060.  
  1061. BCOLUpdate = function(i, x, y, s, n)
  1062.     local dis = tpt.get_property('temp', x, y)
  1063.     if dis > 1273.15 then
  1064.         if buttonable == 1 or buttonablest == 0 then
  1065.             sim.partChangeType(i, tpt.element('coke'))
  1066.             tpt.set_property('life', 0, x, y)
  1067.             tpt.create(x, y + 1, 'CRTV')
  1068.             tpt.create(x, y - 1, 'TARV')
  1069.         end
  1070.     end
  1071. end
  1072. tpt.element_func(BCOLUpdate, tpt.element('bcol'))
  1073.  
  1074.  
  1075. local CreosoteGas = elements.allocate("JWARD", "CRTV")
  1076. elements.element(elements.JWARD_PT_CRTV, elements.element(elements.DEFAULT_PT_BOYL))
  1077. elements.property(elements.JWARD_PT_CRTV, "Name", "CRTV")
  1078. elements.property(elements.JWARD_PT_CRTV, "Description", "creosote gas")
  1079. elements.property(elements.JWARD_PT_CRTV, "Colour", 0x585117)
  1080. elements.property(elements.JWARD_PT_CRTV, "MenuVisible", 0)
  1081. elements.property(elements.JWARD_PT_CRTV, "Gravity", -0.02)
  1082. elements.property(elements.JWARD_PT_CRTV, "Explosive", 0)
  1083. elements.property(elements.JWARD_PT_CRTV, "Loss", 0.75)
  1084. elements.property(elements.JWARD_PT_CRTV, "Flammable", 100)
  1085. elements.property(elements.JWARD_PT_CRTV, "AirDrag", 0.01)
  1086. elements.property(elements.JWARD_PT_CRTV, "Advection", 1)
  1087. elements.property(elements.JWARD_PT_CRTV, "Weight", 0)
  1088. elements.property(elements.JWARD_PT_CRTV, "Diffusion", 0.7)
  1089. elements.property(elements.JWARD_PT_CRTV, "Hardness", 0)
  1090. elements.property(elements.JWARD_PT_CRTV, "Falldown", 0)
  1091. elements.property(elements.JWARD_PT_CRTV, "Properties", elem.TYPE_GAS)
  1092. elements.property(elements.JWARD_PT_CRTV, "State", ST_GAS)
  1093. elements.property(elements.JWARD_PT_CRTV, "Temperature", 883.15)
  1094. elements.property(elements.JWARD_PT_CRTV, "HeatConduct", 81)
  1095. function CRTV(i,x,y,s,n)
  1096.     dis = tpt.get_property('temp', x, y)
  1097.     if dis < 873.15 then
  1098.         sim.partChangeType(i, tpt.element('CRST'))
  1099.     end
  1100. end
  1101. tpt.element_func(CRTV,CreosoteGas)
  1102.  
  1103. local Creosote = elements.allocate("JWARD", "CRST")
  1104. elements.element(elements.JWARD_PT_CRST, elements.element(elements.DEFAULT_PT_SOAP))
  1105. elements.property(elements.JWARD_PT_CRST, "Name", "CRST")
  1106. elements.property(elements.JWARD_PT_CRST, "Description", "creosote ")
  1107. elements.property(elements.JWARD_PT_CRST, "Colour", 0x0F0E04)
  1108. elements.property(elements.JWARD_PT_CRST, "MenuSection", SC_LIQUID)
  1109. elements.property(elements.JWARD_PT_CRST, "Gravity", .04)
  1110. elements.property(elements.JWARD_PT_CRST, "Flammable", 0)
  1111. elements.property(elements.JWARD_PT_CRST, "Explosive", 0)
  1112. elements.property(elements.JWARD_PT_CRST, "Loss", 1)
  1113. elements.property(elements.JWARD_PT_CRST, "AirLoss", .5)
  1114. elements.property(elements.JWARD_PT_CRST, "AirDrag", .01)
  1115. elements.property(elements.JWARD_PT_CRST, "Advection", .01)
  1116. elements.property(elements.JWARD_PT_CRST, "Weight", 35)
  1117. elements.property(elements.JWARD_PT_CRST, "State", ST_liquid)
  1118. elements.property(elements.JWARD_PT_CRST, "Properties", elem.TYPE_LIQUID)
  1119. elements.property(elements.JWARD_PT_CRST, "HighTemperature", 873)
  1120. elements.property(elements.JWARD_PT_CRST, "HighTemperatureTransition", elements.JWARD_PT_CRTV)
  1121.  
  1122.  
  1123. --crude oil
  1124. function OIL(i,x,y,s,n)
  1125.     local otherfind = tpt.get_property("type",x+math.random(-1,1),y+math.random(-1,1))
  1126.     if buttonable == 1 and otherfind == tpt.el.brel.id then
  1127.         if crack == 0 then
  1128.             sim.partChangeType(i, petrol)
  1129.         else
  1130.             sim.partChangeType(i, tpt.element('PRPN'))
  1131.         end
  1132.     end
  1133. end
  1134. tpt.element_func(OIL,tpt.element('oil'))
  1135.  
  1136. local OILCRUDE = elements.allocate("JWARD", "OILC")
  1137. elements.element(elements.JWARD_PT_OILC, elements.element(elements.DEFAULT_PT_GEL))
  1138. elements.property(elements.JWARD_PT_OILC, "Name", "OILC")
  1139. elements.property(elements.JWARD_PT_OILC, "Description", "Crude oil can be distilled, didn't name it coil for a reason")
  1140. elements.property(elements.JWARD_PT_OILC, "Colour", 0x35350D)
  1141. elements.property(elements.JWARD_PT_OILC, "MenuSection", 7)
  1142. elements.property(elements.JWARD_PT_OILC, "Gravity", .04)
  1143. elements.property(elements.JWARD_PT_OILC, "Flammable", 50)
  1144. elements.property(elements.JWARD_PT_OILC, "Explosive", 0)
  1145. elements.property(elements.JWARD_PT_OILC, "Loss", 1)
  1146. elements.property(elements.JWARD_PT_OILC, "AirLoss", .5)
  1147. elements.property(elements.JWARD_PT_OILC, "AirDrag", .01)
  1148. elements.property(elements.JWARD_PT_OILC, "Advection", .01)
  1149. elements.property(elements.JWARD_PT_OILC, "Weight", 5)
  1150. elements.property(elements.JWARD_PT_OILC, "State", ST_liquid)
  1151. elements.property(elements.JWARD_PT_OILC, "Properties", elem.TYPE_LIQUID+elem.PROP_DEADLY)
  1152. function OILC(i,x,y,s,n)
  1153.     local dis = tpt.get_property('temp', x, y)
  1154.     if dis > 973.15 then
  1155.         tpt.set_property('tmp', math.random(1,9), x, y)
  1156.     end
  1157.     local oillife = tpt.get_property('tmp', x, y)
  1158.     if oillife == 9 then
  1159.         sim.partChangeType(i, tpt.element('crtv'))
  1160.         oillife = nil
  1161.     elseif oillife == 8 then
  1162.         sim.partChangeType(i, tpt.element('gas'))
  1163.         oillife = nil
  1164.     elseif oillife == 7 then
  1165.         sim.partChangeType(i, tpt.element('kerv'))
  1166.         oillife = nil
  1167.     elseif oillife == 6 then
  1168.         sim.partChangeType(i, tpt.element('ptlv'))
  1169.         oillife = nil
  1170.     elseif oillife == 5 then
  1171.         sim.partChangeType(i, tpt.element('dslv'))
  1172.         oillife = nil
  1173.     elseif oillife == 4 then
  1174.         sim.partChangeType(i, tpt.element('waxv'))
  1175.         oillife = nil
  1176.     elseif oillife == 3 then
  1177.         sim.partChangeType(i, tpt.element('coke'))
  1178.         oillife = nil
  1179.     elseif oillife == 2 then
  1180.         sim.partChangeType(i, tpt.element('tarv'))
  1181.         oillife = nil
  1182.     elseif oillife == 1 then
  1183.         sim.partChangeType(i, tpt.element('PRPN'))
  1184.         oillife = nil
  1185.     end
  1186. end
  1187. tpt.element_func(OILC,OILCRUDE)
  1188.  
  1189. --better states of matter
  1190. function BSM(i,x,y,s,n)
  1191.     local stctype = tpt.get_property('ctype', x, y)
  1192.     local sttemp = tpt.get_property('temp', x, y)
  1193.     if stctype == tpt.element('nble') and sttemp > 1 then
  1194.         sim.partChangeType(i, tpt.el.nble.id)
  1195.     end
  1196.     if sttemp > 255.15 then
  1197.         if stctype == tpt.element('desl') then
  1198.             sim.partChangeType(i, tpt.el.desl.id)
  1199.         elseif stctype == tpt.element('ptrl') then
  1200.             sim.partChangeType(i, tpt.element('ptrl'))
  1201.         end
  1202.     end
  1203. end
  1204. tpt.element_func(BSM,tpt.el.ice.id)
  1205.  
  1206. LAVAUpdate = function(i, x, y, s, n)
  1207.     if buttonable == 1 then
  1208.         local dis = tpt.get_property('ctype', x, y)
  1209.         local dis2 = tpt.get_property('type',x+math.random(-1,1),y+math.random(-1,1))
  1210.         if dis2 == tpt.element('coke') and dis == tpt.element('iron') then
  1211.             sim.partChangeType(i, tpt.el.metl.id)
  1212.         end
  1213.     end
  1214. end
  1215. tpt.element_func(LAVAUpdate, tpt.el.lava.id)
  1216.  
  1217. function BSMp(i,x,y,s,n)
  1218.     local stctype = tpt.get_property('ctype', x, y)
  1219.     local sttemp = tpt.get_property('temp', x, y)
  1220.     if stctype == tpt.element('nble') and sttemp > 1 then
  1221.         sim.partChangeType(i, tpt.el.nble.id)
  1222.     end
  1223.     if stctype == tpt.element('desl') and sttemp > 255.15 then
  1224.         sim.partChangeType(i, tpt.el.desl.id)
  1225.     end
  1226.     if stctype == tpt.element('ptrl') and sttemp > 225.15 then
  1227.         sim.partChangeType(i, tpt.element('ptrl'))
  1228.     end
  1229. end
  1230. tpt.element_func(BSMp,tpt.el.snow.id)
  1231.  
  1232. function BSMM(i,x,y,s,n)
  1233.     local stctype = tpt.get_property('ctype', x, y)
  1234.     local reaction = tpt.get_property("type",x+math.random(-1,1),y+math.random(-1,1))
  1235.     local randomval = math.random(0,20)
  1236.     if reaction == tpt.el.acid.id then
  1237.         if randomval == 1 then
  1238.             sim.partChangeType(i, tpt.element('SLTW'))
  1239.         elseif randomval == 0 then
  1240.             sim.partChangeType(i, tpt.element('hygn'))
  1241.         end
  1242.     end
  1243.     if stctype == tpt.element('merc') and tpt.get_property('temp', x, y) > 234 then
  1244.         sim.partChangeType(i, tpt.el.merc.id)
  1245.         tpt.set_property('tmp', 22, x, y)
  1246.     end
  1247.     if stctype == tpt.element('SHYG') and sim.pressure((x/4),(y/4)) < 255 then
  1248.         sim.partChangeType(i, tpt.element('SHYG'))
  1249.     end
  1250. end
  1251. tpt.element_func(BSMM,tpt.el.metl.id)
  1252.  
  1253. function BSMMY(i,x,y,s,n)
  1254.     local sttemp = tpt.get_property('temp', x, y)
  1255.     if buttonablest == 0 and sttemp < 234 then
  1256.         sim.partChangeType(i, tpt.el.metl.id)
  1257.         tpt.set_property('ctype', tpt.el.merc.id, x, y)
  1258.     end
  1259. end
  1260. tpt.element_func(BSMMY,tpt.el.merc.id)
  1261.  
  1262. function BSMWT(i,x,y,s,n)
  1263.     local stctype = tpt.get_property('ctype', x, y)
  1264.     local sttemp = tpt.get_property('temp', x, y)
  1265.     local reaction = tpt.get_property("type",x+math.random(-1,1),y+math.random(-1,1))
  1266.     local cy = math.random(1,3)
  1267.     if stctype == tpt.element('deut') and sttemp < 376 then
  1268.         sim.partChangeType(i, tpt.el.deut.id)
  1269.     end
  1270.     if sttemp > 1100 then
  1271.         if reaction == tpt.element('KERV') or reaction == tpt.element('WAXV') or reaction == tpt.element('DSLV') or reaction == tpt.element('PTLV') then
  1272.             if cy == 1 then
  1273.                 sim.partChangeType(i, tpt.element('HYGN'))
  1274.             else
  1275.                 sim.partChangeType(i, tpt.element('CO2'))
  1276.             end
  1277.         end
  1278.         if reaction == tpt.element('PRPN') or reaction == tpt.element('AFRZ') then
  1279.             sim.partChangeType(i, tpt.element('HYGN'))
  1280.         end
  1281.     end
  1282. end
  1283. tpt.element_func(BSMWT,tpt.el.wtrv.id)
  1284.  
  1285. function BSMDWT(i,x,y,s,n)
  1286.     local stctype = tpt.get_property('ctype', x, y)
  1287.     if stctype == tpt.element('deut') then
  1288.         sim.partChangeType(i, tpt.el.deut.id)
  1289.     end
  1290. end
  1291. tpt.element_func(BSMDWT,tpt.el.dstw.id)
  1292.  
  1293. function BSMDT(i,x,y,s,n)
  1294.     local function ignore(i,x,y)
  1295.         local sttemp = tpt.get_property('temp', x, y)
  1296.         if buttonablest == 0 and sttemp > 376 then
  1297.             sim.partChangeType(i, tpt.el.wtrv.id)
  1298.             tpt.set_property('ctype', tpt.el.deut.id, x, y)
  1299.         end
  1300.     end
  1301.     pcall(ignore, i, x, y)
  1302. end
  1303. tpt.element_func(BSMDT,tpt.el.deut.id)
  1304.  
  1305. function BSMP(i,x,y,s,n)
  1306.     local sttemp = tpt.get_property('temp', x, y)
  1307.     local BSMchance
  1308.     if buttonablest == 0 and sttemp < 260 then
  1309.         BSMchance = math.random(1,3)
  1310.     else
  1311.         BSMchance = 0
  1312.     end
  1313.     if BSMchance == 1 then
  1314.         sim.partChangeType(i, tpt.el.clst.id)
  1315.     elseif BSMchance == 2 then
  1316.         sim.partChangeType(i, tpt.el.ice.id)
  1317.         tpt.set_property('ctype', tpt.el.pste.id, x, y)
  1318.     elseif BSMchance == 3 then
  1319.         sim.partChangeType(i, tpt.el.ice.id)
  1320.         tpt.set_property('ctype', tpt.el.watr.id, x, y)
  1321.     end
  1322. end
  1323. tpt.element_func(BSMP,tpt.el.pste.id)
  1324.  
  1325. --button
  1326. --http://powdertoy.co.uk/Wiki/W/Lua.html
  1327. topress = 0
  1328. local thx = 0
  1329.  
  1330. function tick()
  1331.     crack = math.random(0,1)
  1332.     ol = math.random(-1,1)
  1333.     if nil == HL2Mod then
  1334.         --thanks message
  1335.         if thx == 1 then
  1336.             tpt.message_box("thanks "..tpt.get_name().." for your purchase, ","construction or theft of one or more of jward's mods")
  1337.             thx = 0
  1338.         end
  1339.         --check for other mods so JW icon can move to alt spot
  1340.         if tpt.version.jacob1s_mod or elem.DEFAULT_PT_IRNX == 181 or nil ~= TPTMP then 
  1341.             --JW button hide if HUD is off
  1342.             if  tpt.hud() == 1 then
  1343.                 --JW button hide to see info about powder effect
  1344.                 if  tpt.mousex >= 613 and tpt.mousey >= 1 and tpt.mousex <= 627 and tpt.mousey <= 14 then
  1345.                 else
  1346.                     --JW button in alt spot
  1347.                     tpt.drawrect(597, 1, 14, 14, 204, 204, 204)
  1348.                     tpt.fillrect(597, 1, 14, 14, 0, 0, 0, 255)
  1349.                     tpt.drawtext(598, 5, "JW", colourRGB[1], colourRGB[2], colourRGB[3], 255)
  1350.                     --green line to tell if antisave breaking is on in alt spot
  1351.                     if buttonable == 0 then
  1352.                         tpt.drawline(598, 13, 610, 13, 0, 255, 0)
  1353.                     else
  1354.                         tpt.drawline(598, 13, 610, 13, 255, 0, 0)
  1355.                     end
  1356.                     topress = 1
  1357.                     --JW icon in alt spot highlight on hover
  1358.                     if tpt.mousex >= 597 and tpt.mousey >= 1 and tpt.mousex <= 611 and tpt.mousey <= 14 then
  1359.                         tpt.drawrect(597, 1, 14, 14, 255, 255, 255)
  1360.                     else
  1361.                         --dull when lua script manager is open
  1362.                         if MANAGER ~= nil then
  1363.                             if MANAGER.hidden == true then
  1364.                                 tpt.fillrect(597, 1, 14, 14, 0, 0, 0, 0)
  1365.                             else
  1366.                                 tpt.fillrect(597, 1, 14, 14, 0, 0, 0, 90)
  1367.                                 tpt.drawrect(597, 1, 14, 14, 90, 90, 90)
  1368.                             end
  1369.                         end
  1370.                     end
  1371.                 end
  1372.             end
  1373.         else
  1374.             --JW icon in normal spot
  1375.             tpt.drawrect(613, 113, 14, 14, 204, 204, 204)
  1376.             tpt.fillrect(613, 113, 14, 14, 0, 0, 0, 255)
  1377.             tpt.drawtext(614, 117, "JW", colourRGB[1], colourRGB[2], colourRGB[3], 255)
  1378.             --green line to tell if antisave breaking is on in normal spot
  1379.             if buttonable == 0 then
  1380.                 tpt.drawline(614, 125, 626, 125, 0, 255, 0)
  1381.             else
  1382.                 tpt.drawline(614, 125, 626, 125, 255, 0, 0)
  1383.             end
  1384.             topress = 2
  1385.             --highlight when hover in normal spot
  1386.             if tpt.mousex >= 613 and tpt.mousey >= 113 and tpt.mousex <= 627 and tpt.mousey <= 124 then
  1387.                 tpt.drawrect(613, 113, 14, 14, 255, 255, 255)
  1388.                 tpt.drawtext(500, 117, "JWARD's Mod options", colourRGB[1], colourRGB[2], colourRGB[3], 255)
  1389.             else
  1390.                 --dull when lua script manager is open
  1391.                 if MANAGER ~= nil then
  1392.                     if MANAGER.hidden == true then
  1393.                         tpt.fillrect(613, 113, 14, 14, 0, 0, 0, 0)
  1394.                     else
  1395.                         tpt.fillrect(613, 113, 14, 14, 0, 0, 0, 90)
  1396.                         tpt.drawrect(613, 113, 14, 14, 90, 90, 90)
  1397.                     end
  1398.                 end
  1399.             end
  1400.         end
  1401.         if toopress == 1 then
  1402.             --invert shade when JW button is pressed, alt spot
  1403.             if topress == 1 then
  1404.                 tpt.fillrect(596, 0, 16, 16, 255, 255, 255, 255)
  1405.                 tpt.drawtext(598, 5, "JW", 0, 0, 0, 255)
  1406.             end
  1407.             --invert shade when JW button is pressed, normal spot
  1408.             if topress == 2 then
  1409.                 tpt.fillrect(612, 112, 16, 16, 255, 255, 255, 255)
  1410.                 tpt.drawtext(614, 117, "JW", 0, 0, 0, 255)
  1411.             end
  1412.             --elements menu
  1413.             if items == 1 then
  1414.                 tpt.fillrect(150, 174, 16, 15, 255, 255, 255, 255)
  1415.                 tpt.drawline(153, 176, 158, 181, 0, 0, 0)
  1416.                 tpt.drawline(163, 176, 158, 181, 0, 0, 0)
  1417.                 tpt.drawline(153, 181, 158, 186, 0, 0, 0)
  1418.                 tpt.drawline(163, 181, 158, 186, 0, 0, 0)
  1419.                 tpt.drawrect(0, 205, 600, 175, 255, 255, 255)
  1420.                 tpt.fillrect(0, 205, 600, 175, 0, 0, 0, 255)
  1421.                 tpt.drawtext(25, 210, "JWARD's Mods' elements", colourRGB[1], colourRGB[2], colourRGB[3], 255)
  1422.                 tpt.drawtext(6, 229, "Fuel mod:", 255, 255, 255, 255)
  1423.                 --close button in elements menu
  1424.                 tpt.drawrect(5, 208, 14, 14, 204, 204, 204)
  1425.                 tpt.drawline(17, 215, 12, 210, 255, 255, 255)
  1426.                 tpt.drawline(7, 215, 12, 210, 255, 255, 255)
  1427.                 tpt.drawline(17, 220, 12, 215, 255, 255, 255)
  1428.                 tpt.drawline(7, 220, 12, 215, 255, 255, 255)
  1429.                 if  tpt.mousex >= 5 and tpt.mousey >= 208 and tpt.mousex <= 19 and tpt.mousey <= 222 and items == 1 then
  1430.                     tpt.drawrect(5, 208, 14, 14, 255, 255, 255)
  1431.                 end
  1432.                 --anfo
  1433.                 tpt.fillrect(50, 225, 28, 15, 255, 206, 202, 255)
  1434.                 tpt.drawtext(51, 229, "ANFO", 0, 0, 0, 255)
  1435.                 if  tpt.mousex >= 50 and tpt.mousey >= 225 and tpt.mousex <= 78 and tpt.mousey <= 240 and items == 1 then
  1436.                     tpt.drawrect(49, 224, 30, 17, 255, 0, 0)
  1437.                 end
  1438.                 if redrect == 1 then
  1439.                     tpt.drawrect(49, 224, 30, 17, 255, 0, 0)
  1440.                 end
  1441.                 --PRPN
  1442.                 tpt.fillrect(83, 225, 28, 15, 244, 162, 106, 255)
  1443.                 tpt.drawtext(85, 229, "PRPN", 0, 0, 0, 255)
  1444.                 if  tpt.mousex >= 83 and tpt.mousey >= 225 and tpt.mousex <= 111 and tpt.mousey <= 240 and items == 1 then
  1445.                     tpt.drawrect(82, 224, 30, 17, 255, 0, 0)
  1446.                 end
  1447.                 if redrect == 2 then
  1448.                     tpt.drawrect(82, 224, 30, 17, 255, 0, 0)
  1449.                 end
  1450.                 --COKE
  1451.                 tpt.fillrect(116, 225, 28, 15, 170, 170, 170, 255)
  1452.                 tpt.drawtext(118, 229, "COKE", 0, 0, 0, 255)
  1453.                 if  tpt.mousex >= 116 and tpt.mousey >= 225 and tpt.mousex <= 144 and tpt.mousey <= 240 and items == 1 then
  1454.                     tpt.drawrect(115, 224, 30, 17, 255, 0, 0)
  1455.                 end
  1456.                 if redrect == 3 then
  1457.                     tpt.drawrect(115, 224, 30, 17, 255, 0, 0)
  1458.                 end
  1459.                 --OILC
  1460.                 tpt.fillrect(149, 225, 28, 15, 53, 53, 13, 255)
  1461.                 tpt.drawtext(153, 229, "OILC", 255, 255, 255, 255)
  1462.                 if  tpt.mousex >= 149 and tpt.mousey >= 225 and tpt.mousex <= 177 and tpt.mousey <= 240 and items == 1 then
  1463.                     tpt.drawrect(148, 224, 30, 17, 255, 0, 0)
  1464.                 end
  1465.                 if redrect == 4 then
  1466.                     tpt.drawrect(148, 224, 30, 17, 255, 0, 0)
  1467.                 end
  1468.                 --plye
  1469.                 tpt.fillrect(182, 225, 28, 15, 204, 204, 204, 255)
  1470.                 tpt.drawtext(186, 229, "PLYE", 0, 0, 0, 255)
  1471.                 if  tpt.mousex >= 182 and tpt.mousey >= 225 and tpt.mousex <= 210 and tpt.mousey <= 240 and items == 1 then
  1472.                     tpt.drawrect(181, 224, 30, 17, 255, 0, 0)
  1473.                 end
  1474.                 if redrect == 5 then
  1475.                     tpt.drawrect(181, 224, 30, 17, 255, 0, 0)
  1476.                 end
  1477.                 --JETB 
  1478.                 tpt.fillrect(215, 225, 28, 15, 103, 102, 1, 255)
  1479.                 tpt.drawtext(217, 229, "JETB", 255, 255, 255, 255)
  1480.                 if  tpt.mousex >= 215 and tpt.mousey >= 225 and tpt.mousex <= 243 and tpt.mousey <= 240 and items == 1 then
  1481.                     tpt.drawrect(214, 224, 30, 17, 255, 0, 0)
  1482.                 end
  1483.                 if redrect == 6 then
  1484.                     tpt.drawrect(214, 224, 30, 17, 255, 0, 0)
  1485.                 end
  1486.                 --kerosene
  1487.                 tpt.fillrect(248, 225, 28, 15, 1, 179, 255, 255)
  1488.                 tpt.drawtext(250, 229, "KERO", 0, 0, 0, 255)
  1489.                 if  tpt.mousex >= 248 and tpt.mousey >= 225 and tpt.mousex <= 276 and tpt.mousey <= 240 and items == 1 then
  1490.                     tpt.drawrect(247, 224, 30, 17, 255, 0, 0)
  1491.                 end
  1492.                 if redrect == 7 then
  1493.                     tpt.drawrect(247, 224, 30, 17, 255, 0, 0)
  1494.                 end
  1495.                 --N2H4 
  1496.                 tpt.fillrect(281, 225, 28, 15, 182, 240, 100, 255)
  1497.                 tpt.drawtext(283, 229, "N2H4", 0, 0, 0, 255)
  1498.                 if  tpt.mousex >= 281 and tpt.mousey >= 225 and tpt.mousex <= 309 and tpt.mousey <= 240 and items == 1 then
  1499.                     tpt.drawrect(280, 224, 30, 17, 255, 0, 0)
  1500.                 end
  1501.                 if redrect == 8 then
  1502.                     tpt.drawrect(280, 224, 30, 17, 255, 0, 0)
  1503.                 end
  1504.                 --N2O4
  1505.                 tpt.fillrect(314, 225, 28, 15, 48, 206, 198, 255)
  1506.                 tpt.drawtext(316, 229, "N2O4", 0, 0, 0, 255)
  1507.                 if  tpt.mousex >= 314 and tpt.mousey >= 225 and tpt.mousex <= 342 and tpt.mousey <= 240 and items == 1 then
  1508.                     tpt.drawrect(313, 224, 30, 17, 255, 0, 0)
  1509.                 end
  1510.                 if redrect == 9 then
  1511.                     tpt.drawrect(313, 224, 30, 17, 255, 0, 0)
  1512.                 end
  1513.                 --TAR
  1514.                 tpt.fillrect(347, 225, 28, 15, 13, 13, 3, 255) 
  1515.                 tpt.drawtext(352, 229, "TAR", 255, 255, 255, 255)
  1516.                 if  tpt.mousex >= 347 and tpt.mousey >= 225 and tpt.mousex <= 375 and tpt.mousey <= 240 and items == 1 then
  1517.                     tpt.drawrect(346, 224, 30, 17, 255, 0, 0)
  1518.                 end
  1519.                 if redrect == 10 then
  1520.                     tpt.drawrect(346, 224, 30, 17, 255, 0, 0)
  1521.                 end
  1522.                 --AFRZ
  1523.                 tpt.fillrect(380, 225, 28, 15, 12, 63, 91, 255)
  1524.                 tpt.drawtext(382, 229, "AFRZ", 255, 255, 255, 255)
  1525.                 if  tpt.mousex >= 380 and tpt.mousey >= 225 and tpt.mousex <= 408 and tpt.mousey <= 240 and items == 1 then
  1526.                     tpt.drawrect(379, 224, 30, 17, 255, 0, 0)
  1527.                 end
  1528.                 if redrect == 11 then
  1529.                     tpt.drawrect(379, 224, 30, 17, 255, 0, 0)
  1530.                 end
  1531.                 --N2O
  1532.                 tpt.fillrect(413, 225, 28, 15, 67, 218, 255, 255)
  1533.                 tpt.drawtext(418, 229, "N2O", 0, 0, 0, 255)
  1534.                 if  tpt.mousex >= 413 and tpt.mousey >= 225 and tpt.mousex <= 441 and tpt.mousey <= 240 and items == 1 then
  1535.                     tpt.drawrect(412, 224, 30, 17, 255, 0, 0)
  1536.                 end
  1537.                 if redrect == 12 then
  1538.                     tpt.drawrect(412, 224, 30, 17, 255, 0, 0)
  1539.                 end
  1540.                 --N2   
  1541.                 tpt.fillrect(446, 225, 28, 15, 94, 82, 255, 255)
  1542.                 tpt.drawtext(454, 229, "N2", 0, 0, 0, 255)
  1543.                 if  tpt.mousex >= 446 and tpt.mousey >= 225 and tpt.mousex <= 474 and tpt.mousey <= 240 and items == 1 then
  1544.                     tpt.drawrect(445, 224, 30, 17, 255, 0, 0)
  1545.                 end
  1546.                 if redrect == 13 then
  1547.                     tpt.drawrect(445, 224, 30, 17, 255, 0, 0)
  1548.                 end
  1549.                 --PTRL 
  1550.                 tpt.fillrect(479, 225, 28, 15, 10, 74, 92, 255)
  1551.                 tpt.drawtext(482, 229, "PTRL", 255, 255, 255, 255)
  1552.                 if  tpt.mousex >= 479 and tpt.mousey >= 225 and tpt.mousex <= 507 and tpt.mousey <= 240 and items == 1 then
  1553.                     tpt.drawrect(478, 224, 30, 17, 255, 0, 0)
  1554.                 end
  1555.                 if redrect == 14 then
  1556.                     tpt.drawrect(478, 224, 30, 17, 255, 0, 0)
  1557.                 end
  1558.                 --COIL
  1559.                 tpt.fillrect(512, 225, 28, 15, 165, 114, 20, 255)
  1560.                 tpt.drawtext(515, 229, "COIL", 0, 0, 0, 255)
  1561.                 if  tpt.mousex >= 512 and tpt.mousey >= 225 and tpt.mousex <= 540 and tpt.mousey <= 240 and items == 1 then
  1562.                     tpt.drawrect(511, 224, 30, 17, 255, 0, 0)
  1563.                 end
  1564.                 if redrect == 15 then
  1565.                     tpt.drawrect(511, 224, 30, 17, 255, 0, 0)
  1566.                 end
  1567.                 --GLCR
  1568.                 tpt.fillrect(545, 225, 28, 15, 225, 225, 225, 255)
  1569.                 tpt.drawtext(548, 229, "GLCR", 0, 0, 0, 255)
  1570.                 if  tpt.mousex >= 545 and tpt.mousey >= 225 and tpt.mousex <= 573 and tpt.mousey <= 240 and items == 1 then
  1571.                     tpt.drawrect(544, 224, 30, 17, 255, 0, 0)
  1572.                 end
  1573.                 if redrect == 16 then
  1574.                     tpt.drawrect(544, 224, 30, 17, 255, 0, 0)
  1575.                 end
  1576.                 --BDSL
  1577.                 tpt.fillrect(6, 245, 28, 15, 51, 16, 0, 255)
  1578.                 tpt.drawtext(8, 249, "BDSL", 255, 255, 255, 255)
  1579.                 if  tpt.mousex >= 6 and tpt.mousey >= 245 and tpt.mousex <= 34 and tpt.mousey <= 260 and items == 1 then
  1580.                     tpt.drawrect(5, 244, 30, 17, 255, 0, 0)
  1581.                 end
  1582.                 if redrect == 17 then
  1583.                     tpt.drawrect(5, 244, 30, 17, 255, 0, 0)
  1584.                 end
  1585.                 --LN2O
  1586.                 tpt.fillrect(39, 245, 28, 15, 51, 193, 245, 255)
  1587.                 tpt.drawtext(41, 249, "LN2O", 0, 0, 0, 255)
  1588.                 if  tpt.mousex >= 39 and tpt.mousey >= 245 and tpt.mousex <= 67 and tpt.mousey <= 260 and items == 1 then
  1589.                     tpt.drawrect(38, 244, 30, 17, 255, 0, 0)
  1590.                 end
  1591.                 if redrect == 18 then
  1592.                     tpt.drawrect(38, 244, 30, 17, 255, 0, 0)
  1593.                 end
  1594.                 --CRST
  1595.                 tpt.fillrect(72, 245, 28, 15, 15, 14, 4, 255)
  1596.                 tpt.drawtext(74, 249, "CRST", 255, 255, 255, 255)
  1597.                 if  tpt.mousex >= 72 and tpt.mousey >= 245 and tpt.mousex <= 100 and tpt.mousey <= 260 and items == 1 then
  1598.                     tpt.drawrect(71, 244, 30, 17, 255, 0, 0)
  1599.                 end
  1600.                 if redrect == 19 then
  1601.                     tpt.drawrect(71, 244, 30, 17, 255, 0, 0)
  1602.                 end
  1603.             end
  1604.             --mod options menu
  1605.             tpt.drawrect(0, 0, 200, 200, 255, 255, 255)
  1606.             tpt.fillrect(0, 0, 200, 200, 0, 0, 0, 255)
  1607.             tpt.drawtext(10, 5, "JWARD's Mod options "..FuelMod.version, colourRGB[1], colourRGB[2], colourRGB[3], 255)
  1608.             --close
  1609.             tpt.drawrect(10, 174, 60, 16, 204, 204, 204)
  1610.             tpt.drawtext(25, 178, "Close", colourRGB[1], colourRGB[2], colourRGB[3], 255)
  1611.             if  tpt.mousex >= 10 and tpt.mousey >= 174 and tpt.mousex <= 70 and tpt.mousey <= 190 then
  1612.                 tpt.drawrect(10, 174, 60, 16, 255, 255, 255)
  1613.             end
  1614.             --antisave breaking
  1615.             if buttonable == 1 then
  1616.                 tpt.drawrect(10, 150, 15, 15, 204, 204, 204)
  1617.                 tpt.drawrect(35, 150, 15, 15, 255, 255, 255)
  1618.             else
  1619.                 tpt.drawrect(35, 150, 15, 15, 204, 204, 204)
  1620.                 tpt.drawrect(10, 150, 15, 15, 255, 255, 255)
  1621.             end
  1622.             tpt.drawtext(13, 154, "on", colourRGB[1], colourRGB[2], colourRGB[3], 255)
  1623.             tpt.drawtext(37, 154, "off", colourRGB[1], colourRGB[2], colourRGB[3], 255)
  1624.             tpt.drawtext(10, 140, "antisave breaking", colourRGB[1], colourRGB[2], colourRGB[3], 255)
  1625.             if  tpt.mousex >= 10 and tpt.mousey >= 150 and tpt.mousex <= 25 and tpt.mousey <= 165 then
  1626.                 tpt.drawrect(10, 150, 15, 15, 255, 255, 255)
  1627.             end
  1628.             if  tpt.mousex >= 35 and tpt.mousey >= 150 and tpt.mousex <= 50 and tpt.mousey <= 165 then
  1629.                 tpt.drawrect(35, 150, 15, 15, 255, 255, 255)
  1630.             end
  1631.             --THanKs
  1632.             tpt.drawrect(80, 174, 60, 16, 204, 204, 204)
  1633.             tpt.drawtext(88, 178, ">THanKs<", colourRGB[1], colourRGB[2], colourRGB[3], 255)
  1634.             if  tpt.mousex >= 80 and tpt.mousey >= 174 and tpt.mousex <= 140 and tpt.mousey <= 190 then
  1635.                 tpt.drawrect(80, 174, 60, 16, 255, 255, 255)
  1636.             end
  1637.             --better states of matter
  1638.             tpt.drawtext(13, 127, "on", colourRGB[1], colourRGB[2], colourRGB[3], 255)
  1639.             tpt.drawtext(37, 127, "off", colourRGB[1], colourRGB[2], colourRGB[3], 255)
  1640.             if buttonablest == 1 then
  1641.                 tpt.drawrect(10, 123, 15, 15, 204, 204, 204)
  1642.                 tpt.drawrect(35, 123, 15, 15, 255, 255, 255)
  1643.             else
  1644.                 tpt.drawrect(35, 123, 15, 15, 204, 204, 204)
  1645.                 tpt.drawrect(10, 123, 15, 15, 255, 255, 255)
  1646.             end
  1647.             tpt.drawtext(10, 114, "better states of matter", colourRGB[1], colourRGB[2], colourRGB[3], 255)
  1648.             if  tpt.mousex >= 10 and tpt.mousey >= 123 and tpt.mousex <= 25 and tpt.mousey <= 138 then
  1649.                 tpt.drawrect(10, 123, 15, 15, 255, 255, 255)
  1650.             end
  1651.             if  tpt.mousex >= 35 and tpt.mousey >= 123 and tpt.mousex <= 50 and tpt.mousey <= 138 then
  1652.                 tpt.drawrect(35, 123, 15, 15, 255, 255, 255)
  1653.             end
  1654.             --elements
  1655.             tpt.drawrect(150, 174, 16, 15, 204, 204, 204)
  1656.             tpt.drawline(153, 176, 158, 181, 255, 255, 255)
  1657.             tpt.drawline(163, 176, 158, 181, 255, 255, 255)
  1658.             tpt.drawline(153, 181, 158, 186, 255, 255, 255)
  1659.             tpt.drawline(163, 181, 158, 186, 255, 255, 255)
  1660.             if  tpt.mousex >= 150 and tpt.mousey >= 174 and tpt.mousex <= 166 and tpt.mousey <= 189 then
  1661.                 tpt.drawrect(150, 174, 16, 15, 255, 255, 255)
  1662.             end
  1663.         end
  1664.     end
  1665. end
  1666. function pressthingy()
  1667.     if HL2Mod == nil then
  1668.         if topress == 1 then
  1669.              if tpt.mousex >= 597 and tpt.mousey >= 1 and tpt.mousex <= 611 and tpt.mousey <= 14 and tpt.hud() == 1 then
  1670.                  open = 1
  1671.                  windowclick = 1
  1672.              end
  1673.          end
  1674.          if topress == 2 then
  1675.              if tpt.mousex >= 613 and tpt.mousey >= 113 and tpt.mousex <= 627 and tpt.mousey <= 124 then
  1676.                 open = 1
  1677.                 windowclick = 1
  1678.              end
  1679.          end
  1680.          if  tpt.mousex >= 0 and tpt.mousey >= 0 and tpt.mousex <= 200 and tpt.mousey <= 200 and windowclick == 1 then
  1681.             open = 1
  1682.          end
  1683.          if open == 1 then
  1684.              if  tpt.mousex >= 10 and tpt.mousey >= 174 and tpt.mousex <= 70 and tpt.mousey <= 190 then
  1685.                 open = 0
  1686.                 toopress = 0
  1687.                 windowclick = 0
  1688.              end
  1689.              if  tpt.mousex >= 80 and tpt.mousey >= 174 and tpt.mousex <= 140 and tpt.mousey <= 190 then
  1690.                 thx = 1
  1691.              end
  1692.              if  tpt.mousex >= 150 and tpt.mousey >= 174 and tpt.mousex <= 166 and tpt.mousey <= 189 then
  1693.                 items = 1
  1694.              end
  1695.              if  tpt.mousex >= 5 and tpt.mousey >= 208 and tpt.mousex <= 19 and tpt.mousey <= 222 and items == 1 then
  1696.                 items = 0
  1697.              end
  1698.              if  tpt.mousex >= 50 and tpt.mousey >= 225 and tpt.mousex <= 78 and tpt.mousey <= 240 and items == 1 then
  1699.                 tpt.selectedl="JWARD_PT_ANFO"
  1700.                 redrect = 1
  1701.              end
  1702.              if  tpt.mousex >= 83 and tpt.mousey >= 225 and tpt.mousex <= 111 and tpt.mousey <= 240 and items == 1 then
  1703.                 tpt.selectedl="JWARD_PT_PRPN"
  1704.                 redrect = 2
  1705.              end
  1706.              if  tpt.mousex >= 116 and tpt.mousey >= 225 and tpt.mousex <= 144 and tpt.mousey <= 240 and items == 1 then
  1707.                 tpt.selectedl="JWARD_PT_COKE"
  1708.                 redrect = 3
  1709.              end
  1710.              if  tpt.mousex >= 149 and tpt.mousey >= 225 and tpt.mousex <= 177 and tpt.mousey <= 240 and items == 1 then
  1711.                 tpt.selectedl="JWARD_PT_OILC"
  1712.                 redrect = 4
  1713.              end
  1714.              if  tpt.mousex >= 182 and tpt.mousey >= 225 and tpt.mousex <= 210 and tpt.mousey <= 240 and items == 1 then
  1715.                 tpt.selectedl="JWARD_PT_PLYE"
  1716.                 redrect = 5
  1717.              end
  1718.              if  tpt.mousex >= 215 and tpt.mousey >= 225 and tpt.mousex <= 243 and tpt.mousey <= 240 and items == 1 then
  1719.                 tpt.selectedl="JWARD_PT_JETB"
  1720.                 redrect = 6
  1721.              end
  1722.              if  tpt.mousex >= 248 and tpt.mousey >= 225 and tpt.mousex <= 276 and tpt.mousey <= 240 and items == 1 then
  1723.                 tpt.selectedl="JWARD_PT_KERO"
  1724.                 redrect = 7
  1725.              end
  1726.              if  tpt.mousex >= 281 and tpt.mousey >= 225 and tpt.mousex <= 309 and tpt.mousey <= 240 and items == 1 then
  1727.                 tpt.selectedl="JWARD_PT_N2H4"
  1728.                 redrect = 8
  1729.              end
  1730.              if  tpt.mousex >= 314 and tpt.mousey >= 225 and tpt.mousex <= 342 and tpt.mousey <= 240 and items == 1 then
  1731.                 tpt.selectedl="JWARD_PT_N2O4"
  1732.                 redrect = 9
  1733.              end
  1734.              if  tpt.mousex >= 347 and tpt.mousey >= 225 and tpt.mousex <= 375 and tpt.mousey <= 240 and items == 1 then
  1735.                 tpt.selectedl="JWARD_PT_TAR"
  1736.                 redrect = 10
  1737.              end
  1738.              if  tpt.mousex >= 380 and tpt.mousey >= 225 and tpt.mousex <= 408 and tpt.mousey <= 240 and items == 1 then
  1739.                 tpt.selectedl="JWARD_PT_AFRZ"
  1740.                 redrect = 11
  1741.              end
  1742.              if  tpt.mousex >= 413 and tpt.mousey >= 225 and tpt.mousex <= 441 and tpt.mousey <= 240 and items == 1 then
  1743.                 tpt.selectedl="JWARD_PT_N2O"
  1744.                 redrect = 12
  1745.              end
  1746.              if  tpt.mousex >= 446 and tpt.mousey >= 225 and tpt.mousex <= 474 and tpt.mousey <= 240 and items == 1 then
  1747.                 tpt.selectedl="JWARD_PT_N2"
  1748.                 redrect = 13
  1749.              end
  1750.              if  tpt.mousex >= 479 and tpt.mousey >= 225 and tpt.mousex <= 507 and tpt.mousey <= 240 and items == 1 then
  1751.                 tpt.selectedl="JWARD_PT_PTRL"
  1752.                 redrect = 14
  1753.              end
  1754.              if  tpt.mousex >= 512 and tpt.mousey >= 225 and tpt.mousex <= 540 and tpt.mousey <= 240 and items == 1 then
  1755.                 tpt.selectedl="JWARD_PT_COIL"
  1756.                 redrect = 15
  1757.              end
  1758.              if  tpt.mousex >= 545 and tpt.mousey >= 225 and tpt.mousex <= 573 and tpt.mousey <= 240 and items == 1 then
  1759.                 tpt.selectedl="JWARD_PT_GLCR"
  1760.                 redrect = 16
  1761.              end
  1762.              if  tpt.mousex >= 6 and tpt.mousey >= 245 and tpt.mousex <= 34 and tpt.mousey <= 260 and items == 1 then
  1763.                 tpt.selectedl="JWARD_PT_BDSL"
  1764.                 redrect = 17
  1765.              end
  1766.              if  tpt.mousex >= 39 and tpt.mousey >= 245 and tpt.mousex <= 67 and tpt.mousey <= 260 and items == 1 then
  1767.                 tpt.selectedl="JWARD_PT_LN2O"
  1768.                 redrect = 18
  1769.              end
  1770.              if  tpt.mousex >= 72 and tpt.mousey >= 245 and tpt.mousex <= 100 and tpt.mousey <= 260 and items == 1 then
  1771.                 tpt.selectedl="JWARD_PT_CRST"
  1772.                 redrect = 19
  1773.             end
  1774.             if  tpt.mousex >= 35 and tpt.mousey >= 123 and tpt.mousex <= 50 and tpt.mousey <= 138 then
  1775.                 buttonablest = 1
  1776.             end
  1777.             if  tpt.mousex >= 10 and tpt.mousey >= 123 and tpt.mousex <= 25 and tpt.mousey <= 138 then
  1778.                 buttonablest = 0
  1779.             end
  1780.             if  tpt.mousex >= 10 and tpt.mousey >= 150 and tpt.mousex <= 25 and tpt.mousey <= 165 then
  1781.                 buttonable = 0
  1782.                 f = io.open("Saves/JWsetting.txt", "w")
  1783.                 f:write("0")
  1784.                 f:close()
  1785.             end
  1786.             if  tpt.mousex >= 35 and tpt.mousey >= 150 and tpt.mousex <= 50 and tpt.mousey <= 165 then
  1787.                 buttonable = 1
  1788.                 f = io.open("Saves/JWsetting.txt", "w")
  1789.                 f:write("1")
  1790.                 f:close()
  1791.              end
  1792.             --off
  1793.             if buttonable == 0 then
  1794.                 elements.property(elements.DEFAULT_PT_ACID, "Flammable", 40)
  1795.                 elements.property(elements.DEFAULT_PT_ACID, "Diffusion", 0)
  1796.                 elements.property(elements.DEFAULT_PT_ACID, "Gravity", 0.1)
  1797.                 elements.property(elements.DEFAULT_PT_ACID, "Description", "Dissolves almost everything.")
  1798.                 elements.property(elements.DEFAULT_PT_LO2, "Flammable", 5000)
  1799.                 elements.property(elements.DEFAULT_PT_INSL, "Hardness", 10)
  1800.                 elements.property(elements.DEFAULT_PT_INSL, "Flammable", 7)
  1801.                 elements.property(elements.DEFAULT_PT_LN2, "HighTemperature", 77)
  1802.                 elements.property(elements.DEFAULT_PT_LN2, "HighTemperatureTransition", elements.DEFAULT_PT_NONE)
  1803.                 elements.property(elements.DEFAULT_PT_WATR, "Hardness", 20)
  1804.                 elements.property(elements.DEFAULT_PT_WATR, "Weight", 30)
  1805.                 elements.property(elements.DEFAULT_PT_DSTW, "Hardness", 20)
  1806.                 elements.property(elements.DEFAULT_PT_DSTW, "Weight", 30)
  1807.                 elements.property(elements.DEFAULT_PT_SLTW, "Hardness", 20)
  1808.                 elements.property(elements.DEFAULT_PT_SLTW, "Weight", 35)
  1809.                 elements.property(elements.DEFAULT_PT_BUBW, "Hardness", 20)
  1810.                 elements.property(elements.DEFAULT_PT_BUBW, "Weight", 30)
  1811.                 elements.property(elements.DEFAULT_PT_GAS, "HighPressureTransition", elements.DEFAULT_PT_OIL)
  1812.                 elements.property(elements.DEFAULT_PT_GAS, "LowTemperature", 0)
  1813.                 elements.property(elements.DEFAULT_PT_GAS, "HotAir", 0.001)
  1814.                 elements.property(elements.DEFAULT_PT_GAS, "LowTemperatureTransition", DEFAULT_PT_GAS)
  1815.                 elements.property(elements.DEFAULT_PT_GAS, "HighTemperatureTransition", elements.DEFAULT_PT_FIRE)
  1816.                 elements.property(elements.DEFAULT_PT_GAS, "Temperature", 273.15)
  1817.                 elements.property(elements.DEFAULT_PT_GAS, "HighTemperature", 573)
  1818.                 elements.property(elements.DEFAULT_PT_GAS, "HighPressure", 6)
  1819.                 elements.property(elements.DEFAULT_PT_OIL, "HighTemperature", 333)
  1820.                 elements.property(elements.DEFAULT_PT_OIL, "HighTemperatureTransition", elements.DEFAULT_PT_GAS)
  1821.                 elements.property(elements.DEFAULT_PT_DESL, "LowTemperature", NT)
  1822.                 elements.property(elements.DEFAULT_PT_DESL, "LowTemperatureTransition", ITL)
  1823.                 elements.property(elements.DEFAULT_PT_DESL, "Weight", 15)
  1824.                 elements.property(elements.DEFAULT_PT_DESL, "HighPressure", 2)
  1825.                 elements.property(elements.DEFAULT_PT_NITR, "Hardness", 3)
  1826.                 elements.property(elements.DEFAULT_PT_HYGN, "LowTemperature", NT)
  1827.                 elements.property(elements.DEFAULT_PT_HYGN, "LowTemperatureTransition", ITL)
  1828.                 elements.property(elements.DEFAULT_PT_MWAX, "HighTemperatureTransition", elements.DEFAULT_PT_FIRE)
  1829.             end
  1830.             --on
  1831.             if buttonable == 1 then
  1832.                 elements.property(elements.DEFAULT_PT_ACID, "Flammable", 0)
  1833.                 elements.property(elements.DEFAULT_PT_LO2, "Flammable", 0)
  1834.                 elements.property(elements.DEFAULT_PT_LN2, "HighTemperature", 76)
  1835.                 elements.property(elements.DEFAULT_PT_LN2, "HighTemperatureTransition", elements.JWARD_PT_N2)
  1836.                 elements.property(elements.DEFAULT_PT_WATR, "Hardness", 0.25)
  1837.                 elements.property(elements.DEFAULT_PT_WATR, "Weight", 32)
  1838.                 elements.property(elements.DEFAULT_PT_DSTW, "Hardness", 0)
  1839.                 elements.property(elements.DEFAULT_PT_DSTW, "Weight", 32)
  1840.                 elements.property(elements.DEFAULT_PT_SLTW, "Hardness", 0)
  1841.                 elements.property(elements.DEFAULT_PT_SLTW, "Weight", 32)
  1842.                 elements.property(elements.DEFAULT_PT_BUBW, "Hardness", 0)
  1843.                 elements.property(elements.DEFAULT_PT_BUBW, "Weight", 32)
  1844.                 elements.property(elements.DEFAULT_PT_GAS, "HighTemperatureTransition", NT)
  1845.                 elements.property(elements.DEFAULT_PT_DESL, "HighTemperatureTransition", elements.JWARD_PT_DSLV)
  1846.                 elements.property(elements.DEFAULT_PT_DESL, "HighTemperature", 473.15)
  1847.                 elements.property(elements.DEFAULT_PT_DESL, "LowTemperature", 255.15)
  1848.                 elements.property(elements.DEFAULT_PT_DESL, "LowTemperatureTransition", elements.DEFAULT_PT_ICE)
  1849.                 elements.property(elements.DEFAULT_PT_DESL, "Weight", 12)
  1850.                 elements.property(elements.DEFAULT_PT_DESL, "HighPressure", 256)
  1851.                 elements.property(elements.DEFAULT_PT_HYGN, "LowTemperature", 20.15)
  1852.                 elements.property(elements.DEFAULT_PT_HYGN, "LowTemperatureTransition", elements.JWARD_PT_LHYG)
  1853.                 elements.property(elements.DEFAULT_PT_TNT, "HighTemperatureTransition", elements.JWARD_PT_LTNT)
  1854.                 elements.property(elements.DEFAULT_PT_TNT, "HighTemperature", 353.25)
  1855.                 elements.property(elements.DEFAULT_PT_DMND, "MenuSection", 9)
  1856.                 elements.property(elements.DEFAULT_PT_MORT, "MenuVisible", 1)
  1857.                 elements.property(elements.DEFAULT_PT_MORT, "MenuSection", 8)
  1858.                 elements.property(elements.DEFAULT_PT_INSL, "Hardness", 0)
  1859.                 elements.property(elements.DEFAULT_PT_NITR, "Hardness", 0)
  1860.                 elements.property(elements.DEFAULT_PT_INSL, "Flammable", 0)
  1861.                 elements.property(elements.DEFAULT_PT_ACID, "Weight", 32)
  1862.                 elements.property(elements.DEFAULT_PT_ACID, "Diffusion", 1.2)
  1863.                 elements.property(elements.DEFAULT_PT_ACID, "Description", "Bubbling caustic liquid.")
  1864.                 elements.property(elements.DEFAULT_PT_ACID, "Gravity", 0.62)
  1865.                 elements.property(elements.DEFAULT_PT_GAS, "HighPressureTransition", 256)
  1866.                 elements.property(elements.DEFAULT_PT_GAS, "LowTemperature", 573.15)
  1867.                 elements.property(elements.DEFAULT_PT_GAS, "HotAir", 0)
  1868.                 elements.property(elements.DEFAULT_PT_GAS, "LowTemperatureTransition", elements.DEFAULT_PT_OIL)
  1869.                 elements.property(elements.DEFAULT_PT_GAS, "Temperature", 583.15)
  1870.                 elements.property(elements.DEFAULT_PT_GAS, "HighTemperature", 10000)
  1871.                 elements.property(elements.DEFAULT_PT_OIL, "HighTemperature", 573.15)
  1872.                 elements.property(elements.DEFAULT_PT_OIL, "HighTemperatureTransition", elements.DEFAULT_PT_GAS)
  1873.                 elements.property(elements.DEFAULT_PT_MWAX, "HighTemperatureTransition", elements.JWARD_PT_WAXV)
  1874.                 elements.property(elements.DEFAULT_PT_MWAX, "HighTemperature", 643.15)
  1875.                 elements.property(elements.DEFAULT_PT_WAX, "HeatConduct", 25)
  1876.             end
  1877.             --on
  1878.             if buttonablest == 0 then
  1879.                 elements.property(elements.DEFAULT_PT_LN2, "HighTemperature", 76)
  1880.                 elements.property(elements.DEFAULT_PT_LN2, "HighTemperatureTransition", elements.JWARD_PT_N2)
  1881.                 elements.property(elements.DEFAULT_PT_GAS, "HighPressureTransition", 256)
  1882.                 elements.property(elements.DEFAULT_PT_GAS, "LowTemperature", 573.15)
  1883.                 elements.property(elements.DEFAULT_PT_GAS, "HotAir", 0)
  1884.                 elements.property(elements.DEFAULT_PT_GAS, "LowTemperatureTransition", elements.DEFAULT_PT_OIL)
  1885.                 elements.property(elements.DEFAULT_PT_GAS, "HighTemperatureTransition", NT)
  1886.                 elements.property(elements.DEFAULT_PT_GAS, "Temperature", 583.15)
  1887.                 elements.property(elements.DEFAULT_PT_GAS, "HighTemperature", 10000)
  1888.                 elements.property(elements.DEFAULT_PT_OIL, "HighTemperature", 573.15)
  1889.                 elements.property(elements.DEFAULT_PT_OIL, "HighTemperatureTransition", elements.DEFAULT_PT_GAS)
  1890.                 elements.property(elements.DEFAULT_PT_DESL, "HighTemperatureTransition", elements.JWARD_PT_DSLV)
  1891.                 elements.property(elements.DEFAULT_PT_DESL, "HighTemperature", 473.15)
  1892.                 elements.property(elements.DEFAULT_PT_DESL, "LowTemperature", 255.15)
  1893.                 elements.property(elements.DEFAULT_PT_DESL, "LowTemperatureTransition", elements.DEFAULT_PT_ICE)
  1894.                 elements.property(elements.DEFAULT_PT_HYGN, "LowTemperature", 20.15)
  1895.                 elements.property(elements.DEFAULT_PT_HYGN, "LowTemperatureTransition", elements.JWARD_PT_LHYG)
  1896.                 elements.property(elements.DEFAULT_PT_NBLE, "LowTemperature", 1)
  1897.                 elements.property(elements.DEFAULT_PT_NBLE, "LowTemperatureTransition", elements.DEFAULT_PT_ICE)
  1898.                 elements.property(elements.DEFAULT_PT_COAL, "HighPressure", 122)
  1899.                 elements.property(elements.DEFAULT_PT_COAL, "HighPressureTransition", elements.DEFAULT_PT_DMND)
  1900.                 elements.property(elements.DEFAULT_PT_BCOL, "HighPressure", 122)
  1901.                 elements.property(elements.DEFAULT_PT_BCOL, "HighPressureTransition", elements.DEFAULT_PT_DMND)
  1902.                 elements.property(elements.JWARD_PT_COKE, "HighPressure", 122)
  1903.                 elements.property(elements.JWARD_PT_COKE, "HighPressureTransition", elements.DEFAULT_PT_DMND)
  1904.                 elements.property(elements.JWARD_PT_COKE, "HighTemperature", 4373.15)
  1905.                 elements.property(elements.JWARD_PT_COKE, "HighTemperatureTransition", elements.DEFAULT_PT_CO2)
  1906.                 elements.property(elements.DEFAULT_PT_URAN, "HighTemperature", 1405)
  1907.                 elements.property(elements.DEFAULT_PT_URAN, "HighTemperatureTransition", elements.DEFAULT_PT_LAVA)
  1908.                 elements.property(elements.DEFAULT_PT_PLUT, "HighTemperature", 912)
  1909.                 elements.property(elements.DEFAULT_PT_PLUT, "HighTemperatureTransition", elements.DEFAULT_PT_LAVA)
  1910.                 elements.property(elements.DEFAULT_PT_DEUT, "LowTemperature", 276)
  1911.                 elements.property(elements.DEFAULT_PT_DEUT, "LowTemperatureTransition", elements.DEFAULT_PT_ICE)
  1912.                 elements.property(elements.DEFAULT_PT_TNT, "HighTemperatureTransition", elements.JWARD_PT_LTNT)
  1913.                 elements.property(elements.DEFAULT_PT_TNT, "HighTemperature", 353.25)
  1914.             end
  1915.             --off
  1916.             if buttonablest == 1 then
  1917.                 elements.property(elements.DEFAULT_PT_LN2, "HighTemperature", 77)
  1918.                 elements.property(elements.DEFAULT_PT_LN2, "HighTemperatureTransition", elements.DEFAULT_PT_NONE)
  1919.                 elements.property(elements.DEFAULT_PT_GAS, "HighPressureTransition", elements.DEFAULT_PT_OIL)
  1920.                 elements.property(elements.DEFAULT_PT_GAS, "LowTemperature", 0)
  1921.                 elements.property(elements.DEFAULT_PT_GAS, "HotAir", 0.001)
  1922.                 elements.property(elements.DEFAULT_PT_GAS, "LowTemperatureTransition", DEFAULT_PT_GAS)
  1923.                 elements.property(elements.DEFAULT_PT_GAS, "HighTemperatureTransition", elements.DEFAULT_PT_FIRE)
  1924.                 elements.property(elements.DEFAULT_PT_GAS, "Temperature", 273.15)
  1925.                 elements.property(elements.DEFAULT_PT_GAS, "HighTemperature", 573)
  1926.                 elements.property(elements.DEFAULT_PT_GAS, "HighPressure", 6)
  1927.                 elements.property(elements.DEFAULT_PT_OIL, "HighTemperature", 333)
  1928.                 elements.property(elements.DEFAULT_PT_OIL, "HighTemperatureTransition", elements.DEFAULT_PT_GAS)
  1929.                 elements.property(elements.DEFAULT_PT_DESL, "LowTemperature", NT)
  1930.                 elements.property(elements.DEFAULT_PT_DESL, "LowTemperatureTransition", ITL)
  1931.                 elements.property(elements.DEFAULT_PT_HYGN, "LowTemperature", NT)
  1932.                 elements.property(elements.DEFAULT_PT_HYGN, "LowTemperatureTransition", ITL)
  1933.                 elements.property(elements.DEFAULT_PT_NBLE, "LowTemperature", NT)
  1934.                 elements.property(elements.DEFAULT_PT_NBLE, "LowTemperatureTransition", ITL)
  1935.                 elements.property(elements.DEFAULT_PT_COAL, "HighPressure", 256)
  1936.                 elements.property(elements.DEFAULT_PT_COAL, "HighPressureTransition", elements.DEFAULT_PT_COAL)
  1937.                 elements.property(elements.DEFAULT_PT_BCOL, "HighPressure", 256)
  1938.                 elements.property(elements.DEFAULT_PT_BCOL, "HighPressureTransition", elements.DEFAULT_PT_BCOL)
  1939.                 elements.property(elements.JWARD_PT_COKE, "HighPressure", 256)
  1940.                 elements.property(elements.JWARD_PT_COKE, "HighPressureTransition", elements.JWARD_PT_COKE)
  1941.                 elements.property(elements.JWARD_PT_COKE, "HighTemperature", 10000)
  1942.                 elements.property(elements.JWARD_PT_COKE, "HighTemperatureTransition", elements.JWARD_PT_COKE)
  1943.                 elements.property(elements.DEFAULT_PT_URAN, "HighTemperature", NT)
  1944.                 elements.property(elements.DEFAULT_PT_URAN, "HighTemperatureTransition", NT)
  1945.                 elements.property(elements.DEFAULT_PT_PLUT, "HighTemperature", NT)
  1946.                 elements.property(elements.DEFAULT_PT_PLUT, "HighTemperatureTransition", NT)
  1947.                 elements.property(elements.DEFAULT_PT_DEUT, "LowTemperature", NT)
  1948.                 elements.property(elements.DEFAULT_PT_DEUT, "LowTemperatureTransition", NT)
  1949.             end
  1950.             tpt.set_pause(1)
  1951.             toopress = 1
  1952.             return false
  1953.         else
  1954.             toopress = 0
  1955.             return true
  1956.         end
  1957.     end
  1958. end
  1959.  
  1960. tpt.register_mouseclick(pressthingy)
  1961. tpt.register_mouseclick(tick)
  1962. tpt.register_step(tick)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement