Advertisement
Guest User

fuel mod 1.4

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