Advertisement
Guest User

fuel mod heavy 1.6

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