Guest User

fuel mod lite 1.0

a guest
Sep 1st, 2014
319
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. elements.property(elements.DEFAULT_PT_ACID, "Flammable", 0)
  2. elements.property(elements.DEFAULT_PT_DMND, "MenuSection", 9)
  3. elements.property(elements.DEFAULT_PT_MORT, "MenuVisible", 1)
  4. elements.property(elements.DEFAULT_PT_MORT, "MenuSection", 8)
  5. elements.property(elements.DEFAULT_PT_INSL, "Hardness", 0)
  6. elements.property(elements.DEFAULT_PT_INSL, "Flammable", 0)
  7. elements.property(elements.DEFAULT_PT_LN2, "HighTemperature", 76)
  8.  
  9. local petrolgas = elements.allocate("JWARD", "PTLV")
  10. local petrol = elements.allocate("JWARD", "PTRL")
  11. elements.element(elements.JWARD_PT_PTRL, elements.element(elements.DEFAULT_PT_GEL))
  12. elements.property(elements.JWARD_PT_PTRL, "Name", "PTRL")
  13. elements.property(elements.JWARD_PT_PTRL, "Description", "Petrol. Highly flammable liquid.")
  14. elements.property(elements.JWARD_PT_PTRL, "Colour", 0x0A4A5C)
  15. elements.property(elements.JWARD_PT_PTRL, "MenuSection", SC_LIQUID)
  16. elements.property(elements.JWARD_PT_PTRL, "Gravity", 0.6)
  17. elements.property(elements.JWARD_PT_PTRL, "Flammable", 65)
  18. elements.property(elements.JWARD_PT_PTRL, "Explosive", 0)
  19. elements.property(elements.JWARD_PT_PTRL, "Loss", 0.8)
  20. elements.property(elements.JWARD_PT_PTRL, "AirLoss", 0.94)
  21. elements.property(elements.JWARD_PT_PTRL, "AirDrag", 0.02)
  22. elements.property(elements.JWARD_PT_PTRL, "Advection", 0.8)
  23. elements.property(elements.JWARD_PT_PTRL, "Weight", 12)
  24. elements.property(elements.JWARD_PT_PTRL, "Diffusion", 0)
  25. elements.property(elements.JWARD_PT_PTRL, "Meltable", 0)
  26. elements.property(elements.JWARD_PT_PTRL, "Hardness", 0)
  27. elements.property(elements.JWARD_PT_PTRL, "Falldown", 2)
  28. elements.property(elements.JWARD_PT_PTRL, "Properties", TYPE_LIQUID)
  29. elements.property(elements.JWARD_PT_PTRL, "State", ST_LIQUID)
  30. elements.property(elements.JWARD_PT_PTRL, "Temperature", 295.15)
  31. elements.property(elements.JWARD_PT_PTRL, "HeatConduct", 100)
  32. elements.property(elements.JWARD_PT_PTRL, "HighTemperature", 333.15)
  33. elements.property(elements.JWARD_PT_PTRL, "HighTemperatureTransition", elements.JWARD_PT_PTLV)
  34.  
  35. elements.element(elements.JWARD_PT_PTLV, elements.element(elements.DEFAULT_PT_HYGN))
  36. elements.property(elements.JWARD_PT_PTLV, "Name", "PTLV")
  37. elements.property(elements.JWARD_PT_PTLV, "Description", "petrol gas")
  38. elements.property(elements.JWARD_PT_PTLV, "Colour", 0x0A4A5C)
  39. elements.property(elements.JWARD_PT_PTLV, "MenuVisible", 0)
  40. elements.property(elements.JWARD_PT_PTLV, "Gravity", -0.02)
  41. elements.property(elements.JWARD_PT_PTLV, "Flammable", 100)
  42. elements.property(elements.JWARD_PT_PTLV, "Explosive", 1)
  43. elements.property(elements.JWARD_PT_PTLV, "Loss", 0.75)
  44. elements.property(elements.JWARD_PT_PTLV, "AirLoss", 0.97)
  45. elements.property(elements.JWARD_PT_PTLV, "AirDrag", 0.01)
  46. elements.property(elements.JWARD_PT_PTLV, "Advection", 1)
  47. elements.property(elements.JWARD_PT_PTLV, "Weight", 0)
  48. elements.property(elements.JWARD_PT_PTLV, "Diffusion", 0.7)
  49. elements.property(elements.JWARD_PT_PTLV, "Meltable", 0)
  50. elements.property(elements.JWARD_PT_PTLV, "Hardness", 0)
  51. elements.property(elements.JWARD_PT_PTLV, "Falldown", 0)
  52. elements.property(elements.JWARD_PT_PTLV, "Properties", TYPE_GAS)
  53. elements.property(elements.JWARD_PT_PTLV, "State", ST_GAS)
  54. elements.property(elements.JWARD_PT_PTLV, "Temperature", 343.15)
  55. elements.property(elements.JWARD_PT_PTLV, "HeatConduct", 195)
  56. elements.property(elements.JWARD_PT_PTLV, "LowTemperature", 333.14)
  57. elements.property(elements.JWARD_PT_PTLV, "LowTemperatureTransition", elements.JWARD_PT_PTRL)
  58.  
  59. local Dieselgas = elements.allocate("JWARD", "DSLV")
  60. elements.element(elements.JWARD_PT_DSLV, elements.element(elements.DEFAULT_PT_HYGN))
  61. elements.property(elements.JWARD_PT_DSLV, "Name", "DSLV")
  62. elements.property(elements.JWARD_PT_DSLV, "Description", "diesel gas")
  63. elements.property(elements.JWARD_PT_DSLV, "Colour", 0x440000)
  64. elements.property(elements.JWARD_PT_DSLV, "MenuVisible", 0)
  65. elements.property(elements.JWARD_PT_DSLV, "Gravity", -0.02)
  66. elements.property(elements.JWARD_PT_DSLV, "Flammable", 100)
  67. elements.property(elements.JWARD_PT_DSLV, "Explosive", 1)
  68. elements.property(elements.JWARD_PT_DSLV, "Loss", 0.75)
  69. elements.property(elements.JWARD_PT_DSLV, "AirLoss", 0.97)
  70. elements.property(elements.JWARD_PT_DSLV, "AirDrag", 0.01)
  71. elements.property(elements.JWARD_PT_DSLV, "Advection", 1)
  72. elements.property(elements.JWARD_PT_DSLV, "Weight", 0)
  73. elements.property(elements.JWARD_PT_DSLV, "Diffusion", 0.7)
  74. elements.property(elements.JWARD_PT_DSLV, "Meltable", 0)
  75. elements.property(elements.JWARD_PT_DSLV, "Hardness", 0)
  76. elements.property(elements.JWARD_PT_DSLV, "Falldown", 0)
  77. elements.property(elements.JWARD_PT_DSLV, "Properties", TYPE_GAS)
  78. elements.property(elements.JWARD_PT_DSLV, "State", ST_GAS)
  79. elements.property(elements.JWARD_PT_DSLV, "Temperature", 483.15)
  80. elements.property(elements.JWARD_PT_DSLV, "HeatConduct", 195)
  81. elements.property(elements.JWARD_PT_DSLV, "LowTemperature", 473.15)
  82. elements.property(elements.JWARD_PT_DSLV, "LowTemperatureTransition", elements.DEFAULT_PT_DESL)
  83.  
  84. local Diazane = elements.allocate("JWARD", "N2H4")
  85. local DinitrogenTetroxide = elements.allocate("JWARD", "N2O4")
  86. local nitrous = elements.allocate("JWARD", "N2O")
  87. local need4speed = elements.allocate("JWARD", "LN2O")
  88. elements.element(elements.JWARD_PT_LN2O, elements.element(elements.DEFAULT_PT_GEL))
  89. elements.property(elements.JWARD_PT_LN2O, "Name", "LN2O")
  90. elements.property(elements.JWARD_PT_LN2O, "Description", "Liquid Nitrous Oxide. Burns very quickly and very hot.")
  91. elements.property(elements.JWARD_PT_LN2O, "Colour", 0x33C1F5)
  92. elements.property(elements.JWARD_PT_LN2O, "MenuSection", 7)
  93. elements.property(elements.JWARD_PT_LN2O, "Gravity", 0.8)
  94. elements.property(elements.JWARD_PT_LN2O, "Flammable", 6000)
  95. elements.property(elements.JWARD_PT_LN2O, "Explosive", 0)
  96. elements.property(elements.JWARD_PT_LN2O, "Loss", 0.5)
  97. elements.property(elements.JWARD_PT_LN2O, "AirLoss", 0.94)
  98. elements.property(elements.JWARD_PT_LN2O, "AirDrag", 0.03)
  99. elements.property(elements.JWARD_PT_LN2O, "Advection", 0.7)
  100. elements.property(elements.JWARD_PT_LN2O, "Weight", 43)
  101. elements.property(elements.JWARD_PT_LN2O, "Diffusion", 0)
  102. elements.property(elements.JWARD_PT_LN2O, "Meltable", 0)
  103. elements.property(elements.JWARD_PT_LN2O, "Hardness", 0)
  104. elements.property(elements.JWARD_PT_LN2O, "Falldown", 2)
  105. elements.property(elements.JWARD_PT_LN2O, "Properties", TYPE_LIQUID)
  106. elements.property(elements.JWARD_PT_LN2O, "State", ST_LIQUID)
  107. elements.property(elements.JWARD_PT_LN2O, "Temperature", 174)
  108. elements.property(elements.JWARD_PT_LN2O, "HeatConduct", 100)
  109. elements.property(elements.JWARD_PT_LN2O, "HighTemperature", 184)
  110. elements.property(elements.JWARD_PT_LN2O, "HighTemperatureTransition", elements.JWARD_PT_N2O)
  111.  
  112. elements.element(elements.JWARD_PT_N2O, elements.element(elements.DEFAULT_PT_CO2))
  113. elements.property(elements.JWARD_PT_N2O, "Name", "N2O")
  114. elements.property(elements.JWARD_PT_N2O, "Description", "Nitrous Oxide. Highly flammable RACE CAR oxidizer!!!.")
  115. elements.property(elements.JWARD_PT_N2O, "Colour", 0x43DAFF)
  116. elements.property(elements.JWARD_PT_N2O, "MenuSection", 6)
  117. elements.property(elements.JWARD_PT_N2O, "Gravity", 0)
  118. elements.property(elements.JWARD_PT_N2O, "Flammable", 5500)
  119. elements.property(elements.JWARD_PT_N2O, "Explosive", 0)
  120. elements.property(elements.JWARD_PT_N2O, "Loss", 0.7)
  121. elements.property(elements.JWARD_PT_N2O, "AirLoss", 0.91)
  122. elements.property(elements.JWARD_PT_N2O, "AirDrag", 0.02)
  123. elements.property(elements.JWARD_PT_N2O, "Advection", 0.9)
  124. elements.property(elements.JWARD_PT_N2O, "Weight", 0)
  125. elements.property(elements.JWARD_PT_N2O, "Diffusion", 1.5)
  126. elements.property(elements.JWARD_PT_N2O, "Meltable", 0)
  127. elements.property(elements.JWARD_PT_N2O, "Hardness", 0)
  128. elements.property(elements.JWARD_PT_N2O, "Falldown", 0)
  129. elements.property(elements.JWARD_PT_N2O, "Properties", TYPE_GAS)
  130. elements.property(elements.JWARD_PT_N2O, "State", ST_GAS)
  131. elements.property(elements.JWARD_PT_N2O, "Temperature", 295.15)
  132. elements.property(elements.JWARD_PT_N2O, "HeatConduct", 100)
  133. elements.property(elements.JWARD_PT_N2O, "LowTemperature", 184.67)
  134. elements.property(elements.JWARD_PT_N2O, "LowTemperatureTransition", elements.JWARD_PT_LN2O)
  135. function N2O(i,x,y,s,n)
  136. reaction = tpt.get_property("type",x+math.random(-1,1),y+math.random(-1,1))
  137. if reaction == tpt.el.oxyg.id then
  138. tpt.parts[i].type = tpt.element('N2O4')
  139. reaction = nil
  140. end
  141. end
  142. tpt.element_func(N2O,nitrous)
  143.  
  144. elements.element(elements.JWARD_PT_N2O4, elements.element(elements.DEFAULT_PT_GEL))
  145. elements.property(elements.JWARD_PT_N2O4, "Name", "N2O4")
  146. elements.property(elements.JWARD_PT_N2O4, "Description", "Dinitrogen Tetroxide rocket oxidizer")
  147. elements.property(elements.JWARD_PT_N2O4, "Colour", 0x30CEC6)
  148. elements.property(elements.JWARD_PT_N2O4, "MenuSection", 5)
  149. elements.property(elements.JWARD_PT_N2O4, "Gravity", 0.8)
  150. elements.property(elements.JWARD_PT_N2O4, "Flammable", 7500)
  151. elements.property(elements.JWARD_PT_N2O4, "Explosive", 1)
  152. elements.property(elements.JWARD_PT_N2O4, "Loss", 0.7)
  153. elements.property(elements.JWARD_PT_N2O4, "AirLoss", 0.91)
  154. elements.property(elements.JWARD_PT_N2O4, "AirDrag", 0.03)
  155. elements.property(elements.JWARD_PT_N2O4, "Advection", 0.6)
  156. elements.property(elements.JWARD_PT_N2O4, "Weight", 46)
  157. elements.property(elements.JWARD_PT_N2O4, "Diffusion", 1.5)
  158. elements.property(elements.JWARD_PT_N2O4, "Meltable", 0)
  159. elements.property(elements.JWARD_PT_N2O4, "Hardness", 0)
  160. elements.property(elements.JWARD_PT_N2O4, "Falldown", 2)
  161. elements.property(elements.JWARD_PT_N2O4, "Properties", TYPE_LIQUID)
  162. elements.property(elements.JWARD_PT_N2O4, "State", ST_LIQUID)
  163. elements.property(elements.JWARD_PT_N2O4, "Temperature", 295.15)
  164. elements.property(elements.JWARD_PT_N2O4, "HeatConduct", 100)
  165. function N2O4(i,x,y,s,n)
  166. rocket = tpt.get_property("type",x+math.random(-1,1),y+math.random(-1,1))
  167. if rocket == Diazane then
  168. tpt.create(x+math.random(-1,1), y+math.random(-1,1), 'plsm')
  169. end
  170. end
  171. tpt.element_func(N2O4,DinitrogenTetroxide)
  172.  
  173. elements.element(elements.JWARD_PT_N2H4, elements.element(elements.DEFAULT_PT_GEL))
  174. elements.property(elements.JWARD_PT_N2H4, "Name", "N2H4")
  175. elements.property(elements.JWARD_PT_N2H4, "Description", "Hydrazine rocket fuel")
  176. elements.property(elements.JWARD_PT_N2H4, "Colour", 0xB6F064)
  177. elements.property(elements.JWARD_PT_N2H4, "MenuSection", 5)
  178. elements.property(elements.JWARD_PT_N2H4, "Gravity", 0.8)
  179. elements.property(elements.JWARD_PT_N2H4, "Flammable", 1)
  180. elements.property(elements.JWARD_PT_N2H4, "Explosive", 1)
  181. elements.property(elements.JWARD_PT_N2H4, "Loss", 0.7)
  182. elements.property(elements.JWARD_PT_N2H4, "AirLoss", 0.91)
  183. elements.property(elements.JWARD_PT_N2H4, "AirDrag", 0.03)
  184. elements.property(elements.JWARD_PT_N2H4, "Advection", 0.6)
  185. elements.property(elements.JWARD_PT_N2H4, "Weight", 46)
  186. elements.property(elements.JWARD_PT_N2H4, "Diffusion", 1.5)
  187. elements.property(elements.JWARD_PT_N2H4, "Meltable", 0)
  188. elements.property(elements.JWARD_PT_N2H4, "Hardness", 0)
  189. elements.property(elements.JWARD_PT_N2H4, "Falldown", 2)
  190. elements.property(elements.JWARD_PT_N2H4, "Properties", TYPE_LIQUID)
  191. elements.property(elements.JWARD_PT_N2H4, "State", ST_LIQUID)
  192. elements.property(elements.JWARD_PT_N2H4, "Temperature", 295.15)
  193. elements.property(elements.JWARD_PT_N2H4, "HeatConduct", 100)
  194. N2H4Update = function(i, x, y, s, n)
  195.  local clife = tpt.get_property('life', x, y)
  196.  if clife > 1 then
  197.  for cx = -1, 1, 2 do
  198.  for cy = -1, 1, 2 do
  199.  tpt.create(x + cx, y + cy, 'fire')
  200.  tpt.set_property('temp', 1700, x, y)
  201.  tpt.set_pressure(x, y, 2, 2, 200)
  202.  end
  203.  end
  204.  tpt.set_property('life', clife - 1, x, y)
  205.  elseif clife == 1 then
  206.  tpt.set_property('type', 0, x, y)
  207.  elseif s > 0 then
  208.  for cx = -1, 1, 2 do
  209.  for cy = -1, 1, 2 do
  210.  if tpt.get_property('type', x + cx, y + cy) == 4 or tpt.get_property('type', x + cx, y + cy) == 49 then
  211.  tpt.set_property('life', 500, x, y)
  212.  return true
  213.  end
  214.  end
  215.  end
  216.  end
  217. end
  218. tpt.element_func(N2H4Update, tpt.element('N2H4'))
  219.  
  220. local propane = elements.allocate("JWARD", "PROP")
  221. elements.element(elements.JWARD_PT_PROP, elements.element(elements.DEFAULT_PT_CO2))
  222. elements.property(elements.JWARD_PT_PROP, "Name", "PRPN")
  223. elements.property(elements.JWARD_PT_PROP, "Description", "Propane. Explodes very easily.")
  224. elements.property(elements.JWARD_PT_PROP, "Colour", 0xF4A26A)
  225. elements.property(elements.JWARD_PT_PROP, "MenuSection", 5)
  226. elements.property(elements.JWARD_PT_PROP, "Gravity", -0.02)
  227. elements.property(elements.JWARD_PT_PROP, "Flammable", 3000)
  228. elements.property(elements.JWARD_PT_PROP, "Explosive", 2.5)
  229. elements.property(elements.JWARD_PT_PROP, "Loss", 0.75)
  230. elements.property(elements.JWARD_PT_PROP, "AirLoss", 0.97)
  231. elements.property(elements.JWARD_PT_PROP, "AirDrag", 0.01)
  232. elements.property(elements.JWARD_PT_PROP, "Advection", 1)
  233. elements.property(elements.JWARD_PT_PROP, "Weight", 0)
  234. elements.property(elements.JWARD_PT_PROP, "Diffusion", 0.7)
  235. elements.property(elements.JWARD_PT_PROP, "Meltable", 0)
  236. elements.property(elements.JWARD_PT_PROP, "Hardness", 0)
  237. elements.property(elements.JWARD_PT_PROP, "Falldown", 0)
  238. elements.property(elements.JWARD_PT_PROP, "Properties", TYPE_GAS)
  239. elements.property(elements.JWARD_PT_PROP, "State", ST_GAS)
  240. elements.property(elements.JWARD_PT_PROP, "Temperature", 295.15)
  241. elements.property(elements.JWARD_PT_PROP, "HeatConduct", 195)
  242. elements.property(elements.JWARD_PT_PROP, "HighTemperature", 353.15)
  243. elements.property(elements.JWARD_PT_PROP, "HighTemperatureTransition", tpt.el.fire.id)
  244. elements.property(elements.JWARD_PT_PROP, "LowTemperatureTransition", NT)
  245.  
  246. local KEROSENEGAS = elements.allocate("JWARD", "KERV")
  247. local KEROSENE = elements.allocate("JWARD", "KERO")
  248. elements.element(elements.JWARD_PT_KERO, elements.element(elements.DEFAULT_PT_GEL))
  249. elements.property(elements.JWARD_PT_KERO, "Name", "KERO")
  250. elements.property(elements.JWARD_PT_KERO, "Description", "KERO BURNS HOT AND QUICK")
  251. elements.property(elements.JWARD_PT_KERO, "Colour", 0x01B3D7)
  252. elements.property(elements.JWARD_PT_KERO, "MenuSection", 5)
  253. elements.property(elements.JWARD_PT_KERO, "Gravity", .04)
  254. elements.property(elements.JWARD_PT_KERO, "Flammable", 500)
  255. elements.property(elements.JWARD_PT_KERO, "Explosive", 1)
  256. elements.property(elements.JWARD_PT_KERO, "Loss", 1)
  257. elements.property(elements.JWARD_PT_KERO, "AirLoss", .5)
  258. elements.property(elements.JWARD_PT_KERO, "AirDrag", .01)
  259. elements.property(elements.JWARD_PT_KERO, "Advection", .01)
  260. elements.property(elements.JWARD_PT_KERO, "Weight", 5)
  261. elements.property(elements.JWARD_PT_KERO, "State", ST_liquid)
  262. elements.property(elements.JWARD_PT_KERO, "Properties", elem.TYPE_LIQUID+elem.PROP_DEADLY)
  263. elements.property(elements.JWARD_PT_KERO, "HighTemperature", 393.15)
  264. elements.property(elements.JWARD_PT_KERO, "HighTemperatureTransition", elements.JWARD_PT_KERV)
  265. function KERO(i,x,y,s,n)
  266. reaction = tpt.get_property("type",x+math.random(-1,1),y+math.random(-1,1))
  267. if reaction == petrol then
  268. tpt.parts[i].type = tpt.element('JETB')
  269. reaction = nil
  270. end
  271. end
  272. tpt.element_func(KERO,KEROSENE)
  273.  
  274. elements.element(elements.JWARD_PT_KERV, elements.element(elements.DEFAULT_PT_HYGN))
  275. elements.property(elements.JWARD_PT_KERV, "Name", "KERV")
  276. elements.property(elements.JWARD_PT_KERV, "Description", "kerosene gas")
  277. elements.property(elements.JWARD_PT_KERV, "Colour", 0x01B3D7)
  278. elements.property(elements.JWARD_PT_KERV, "MenuVisible", 0)
  279. elements.property(elements.JWARD_PT_KERV, "Gravity", -0.02)
  280. elements.property(elements.JWARD_PT_KERV, "Flammable", 600)
  281. elements.property(elements.JWARD_PT_KERV, "Explosive", 1)
  282. elements.property(elements.JWARD_PT_KERV, "Loss", 0.75)
  283. elements.property(elements.JWARD_PT_KERV, "AirLoss", 0.97)
  284. elements.property(elements.JWARD_PT_KERV, "AirDrag", 0.01)
  285. elements.property(elements.JWARD_PT_KERV, "Advection", 1)
  286. elements.property(elements.JWARD_PT_KERV, "Weight", 0)
  287. elements.property(elements.JWARD_PT_KERV, "Diffusion", 0.7)
  288. elements.property(elements.JWARD_PT_KERV, "Meltable", 0)
  289. elements.property(elements.JWARD_PT_KERV, "Hardness", 0)
  290. elements.property(elements.JWARD_PT_KERV, "Falldown", 0)
  291. elements.property(elements.JWARD_PT_KERV, "Properties", TYPE_GAS)
  292. elements.property(elements.JWARD_PT_KERV, "State", ST_GAS)
  293. elements.property(elements.JWARD_PT_KERV, "Temperature", 403.15)
  294. elements.property(elements.JWARD_PT_KERV, "HeatConduct", 195)
  295. elements.property(elements.JWARD_PT_KERV, "LowTemperature", 393.15)
  296. elements.property(elements.JWARD_PT_KERV, "LowTemperatureTransition", elements.JWARD_PT_KERO)
  297.  
  298. local JETFUEL = elements.allocate("JWARD", "JETB")
  299. elements.element(elements.JWARD_PT_JETB, elements.element(elements.DEFAULT_PT_GEL))
  300. elements.property(elements.JWARD_PT_JETB, "Name", "JETB")
  301. elements.property(elements.JWARD_PT_JETB, "Description", "Jet b type fuel-blend of Kero and Ptrl for jet engines")
  302. elements.property(elements.JWARD_PT_JETB, "Colour", 0x676601)
  303. elements.property(elements.JWARD_PT_JETB, "MenuSection", 5)
  304. elements.property(elements.JWARD_PT_JETB, "Gravity", .04)
  305. elements.property(elements.JWARD_PT_JETB, "Flammable", 5000)
  306. elements.property(elements.JWARD_PT_JETB, "Explosive", 1)
  307. elements.property(elements.JWARD_PT_JETB, "Loss", 0.8)
  308. elements.property(elements.JWARD_PT_JETB, "AirLoss", 0.94)
  309. elements.property(elements.JWARD_PT_JETB, "AirDrag", 0.02)
  310. elements.property(elements.JWARD_PT_JETB, "Advection", 0.8)
  311. elements.property(elements.JWARD_PT_JETB, "HighTemperature", 353.15)
  312. elements.property(elements.JWARD_PT_JETB, "Weight", 13)
  313. elements.property(elements.JWARD_PT_JETB, "State", ST_liquid)
  314. elements.property(elements.JWARD_PT_JETB, "Properties", elem.TYPE_LIQUID+elem.PROP_DEADLY)
  315. elements.property(elements.JWARD_PT_JETB, "HighTemperatureTransition", elements.NOBODY_PT_KERV)
  316.  
  317. local TARGAS = elements.allocate("JWARD", "TARV")
  318. local TAR = elements.allocate("JWARD", "TAR")
  319. elements.element(elements.JWARD_PT_TAR, elements.element(elements.DEFAULT_PT_GEL))
  320. elements.property(elements.JWARD_PT_TAR, "Name", "TAR")
  321. elements.property(elements.JWARD_PT_TAR, "Description", "tar hard to burn")
  322. elements.property(elements.JWARD_PT_TAR, "Colour", 0x0D0D03)
  323. elements.property(elements.JWARD_PT_TAR, "MenuSection", 5)
  324. elements.property(elements.JWARD_PT_TAR, "Gravity", .1)
  325. elements.property(elements.JWARD_PT_TAR, "Flammable", 2)
  326. elements.property(elements.JWARD_PT_TAR, "Explosive", 0)
  327. elements.property(elements.JWARD_PT_TAR, "Loss", 1)
  328. elements.property(elements.JWARD_PT_TAR, "AirLoss", .5)
  329. elements.property(elements.JWARD_PT_TAR, "AirDrag", .01)
  330. elements.property(elements.JWARD_PT_TAR, "Advection", .01)
  331. elements.property(elements.JWARD_PT_TAR, "Diffusion", 0.01)
  332. elements.property(elements.JWARD_PT_TAR, "State", ST_liquid)
  333. elements.property(elements.JWARD_PT_TAR, "Weight", 50)
  334. elements.property(elements.JWARD_PT_TAR, "Properties", elem.TYPE_LIQUID+elem.PROP_DEADLY)
  335. elements.property(elements.JWARD_PT_TAR, "HighTemperature", 873.15)
  336. elements.property(elements.JWARD_PT_TAR, "HighTemperatureTransition", elements.JWARD_PT_TARV)
  337.  
  338. elements.element(elements.JWARD_PT_TARV, elements.element(elements.DEFAULT_PT_HYGN))
  339. elements.property(elements.JWARD_PT_TARV, "Name", "TARV")
  340. elements.property(elements.JWARD_PT_TARV, "Description", "tar gas")
  341. elements.property(elements.JWARD_PT_TARV, "Colour", 0x4C2D20)
  342. elements.property(elements.JWARD_PT_TARV, "MenuVisible", 0)
  343. elements.property(elements.JWARD_PT_TARV, "Gravity", -0.02)
  344. elements.property(elements.JWARD_PT_TARV, "Flammable", 10)
  345. elements.property(elements.JWARD_PT_TARV, "Explosive", 0)
  346. elements.property(elements.JWARD_PT_TARV, "Loss", 0.75)
  347. elements.property(elements.JWARD_PT_TARV, "AirLoss", 0.97)
  348. elements.property(elements.JWARD_PT_TARV, "AirDrag", 0.01)
  349. elements.property(elements.JWARD_PT_TARV, "Advection", 1)
  350. elements.property(elements.JWARD_PT_TARV, "Weight", 0)
  351. elements.property(elements.JWARD_PT_TARV, "Diffusion", 0.7)
  352. elements.property(elements.JWARD_PT_TARV, "Meltable", 0)
  353. elements.property(elements.JWARD_PT_TARV, "Hardness", 0)
  354. elements.property(elements.JWARD_PT_TARV, "Falldown", 0)
  355. elements.property(elements.JWARD_PT_TARV, "Properties", TYPE_GAS)
  356. elements.property(elements.JWARD_PT_TARV, "State", ST_GAS)
  357. elements.property(elements.JWARD_PT_TARV, "Temperature", 403.15)
  358. elements.property(elements.JWARD_PT_TARV, "HeatConduct", 195)
  359. elements.property(elements.JWARD_PT_TARV, "LowTemperature", 873.15)
  360. elements.property(elements.JWARD_PT_TARV, "LowTemperatureTransition", elements.JWARD_PT_TAR)
  361.  
  362. local WAXGAS = elements.allocate("JWARD", "WAXV")
  363. elements.element(elements.JWARD_PT_WAXV, elements.element(elements.DEFAULT_PT_HYGN))
  364. elements.property(elements.JWARD_PT_WAXV, "Name", "WAXV")
  365. elements.property(elements.JWARD_PT_WAXV, "Description", "wax gas")
  366. elements.property(elements.JWARD_PT_WAXV, "Colour", 0xF0F0BB)
  367. elements.property(elements.JWARD_PT_WAXV, "MenuSection", SC_GAS)
  368. elements.property(elements.JWARD_PT_WAXV, "Gravity", -0.02)
  369. elements.property(elements.JWARD_PT_WAXV, "Flammable", 500)
  370. elements.property(elements.JWARD_PT_WAXV, "Explosive", 0)
  371. elements.property(elements.JWARD_PT_WAXV, "Loss", 0.75)
  372. elements.property(elements.JWARD_PT_WAXV, "AirLoss", 0.97)
  373. elements.property(elements.JWARD_PT_WAXV, "AirDrag", 0.01)
  374. elements.property(elements.JWARD_PT_WAXV, "Advection", 1)
  375. elements.property(elements.JWARD_PT_WAXV, "Weight", 0)
  376. elements.property(elements.JWARD_PT_WAXV, "Diffusion", 0.7)
  377. elements.property(elements.JWARD_PT_WAXV, "Meltable", 0)
  378. elements.property(elements.JWARD_PT_WAXV, "Hardness", 0)
  379. elements.property(elements.JWARD_PT_WAXV, "Falldown", 0)
  380. elements.property(elements.JWARD_PT_WAXV, "Properties", TYPE_GAS)
  381. elements.property(elements.JWARD_PT_WAXV, "State", ST_GAS)
  382. elements.property(elements.JWARD_PT_WAXV, "Temperature", 833.15)
  383. elements.property(elements.JWARD_PT_WAXV, "HeatConduct", 195)
  384. elements.property(elements.JWARD_PT_WAXV, "LowTemperature", 823.15)
  385. elements.property(elements.JWARD_PT_WAXV, "LowTemperatureTransition", elements.DEFAULT_PT_WAX)
  386.  
  387. local CoalCoke = elements.allocate("JWARD", "COKE")
  388. elements.element(elements.JWARD_PT_COKE, elements.element(elements.DEFAULT_PT_BCOL))
  389. elements.property(elements.JWARD_PT_COKE, "Name", "COKE")
  390. elements.property(elements.JWARD_PT_COKE, "Description", "COAL COKE. Burns for a long time and hot.")
  391. elements.property(elements.JWARD_PT_COKE, "Colour", 0xAAAAAA)
  392. elements.property(elements.JWARD_PT_COKE, "MenuSection", 5)
  393. elements.property(elements.JWARD_PT_COKE, "Gravity", .35)
  394. elements.property(elements.JWARD_PT_COKE, "Flammable", 0)
  395. elements.property(elements.JWARD_PT_COKE, "Explosive", 0)
  396. elements.property(elements.JWARD_PT_COKE, "Loss", 0.15)
  397. elements.property(elements.JWARD_PT_COKE, "AirLoss", 0.96)
  398. elements.property(elements.JWARD_PT_COKE, "AirDrag", 0.03)
  399. elements.property(elements.JWARD_PT_COKE, "Advection", 0.4)
  400. elements.property(elements.JWARD_PT_COKE, "Weight", 78)
  401. elements.property(elements.JWARD_PT_COKE, "Diffusion", 0)
  402. elements.property(elements.JWARD_PT_COKE, "Falldown", 1)
  403. COKEUpdate = function(i, x, y, s, n)
  404.  local clife = tpt.get_property('life', x, y)
  405.  if clife > 1 then
  406.  for cx = -1, 1, 2 do
  407.  for cy = -1, 1, 2 do
  408.  tpt.create(x + cx, y + cy, 'fire')
  409.  tpt.set_property('temp', 1700, x, y)
  410.  end
  411.  end
  412.  tpt.set_property('life', clife - 1, x, y)
  413.  elseif clife == 1 then
  414.  tpt.set_property('type', 0, x, y)
  415.  elseif s > 0 then
  416.  for cx = -1, 1, 2 do
  417.  for cy = -1, 1, 2 do
  418.  if tpt.get_property('type', x + cx, y + cy) == 4 or tpt.get_property('type', x + cx, y + cy) == 49 then
  419.  tpt.set_property('life', 500, x, y)
  420.  return true
  421.  end
  422.  end
  423.  end
  424.  end
  425. end
  426. tpt.element_func(COKEUpdate, tpt.element('coke'))
  427.  
  428. local COKEGAS = elements.allocate("JWARD", "COKV")
  429. elements.element(elements.JWARD_PT_COKV, elements.element(elements.DEFAULT_PT_HYGN))
  430. elements.property(elements.JWARD_PT_COKV, "Name", "COKV")
  431. elements.property(elements.JWARD_PT_COKV, "Description", "coke gas")
  432. elements.property(elements.JWARD_PT_COKV, "Colour", 0xAAAAAA)
  433. elements.property(elements.JWARD_PT_COKV, "MenuVisible", 0)
  434. elements.property(elements.JWARD_PT_COKV, "Gravity", -0.02)
  435. elements.property(elements.JWARD_PT_COKV, "Flammable", 1000)
  436. elements.property(elements.JWARD_PT_COKV, "Explosive", 0)
  437. elements.property(elements.JWARD_PT_COKV, "Loss", 0.75)
  438. elements.property(elements.JWARD_PT_COKV, "AirLoss", 0.97)
  439. elements.property(elements.JWARD_PT_COKV, "AirDrag", 0.01)
  440. elements.property(elements.JWARD_PT_COKV, "Advection", 1)
  441. elements.property(elements.JWARD_PT_COKV, "Weight", 0)
  442. elements.property(elements.JWARD_PT_COKV, "Diffusion", 0.7)
  443. elements.property(elements.JWARD_PT_COKV, "Meltable", 0)
  444. elements.property(elements.JWARD_PT_COKV, "Hardness", 0)
  445. elements.property(elements.JWARD_PT_COKV, "Falldown", 0)
  446. elements.property(elements.JWARD_PT_COKV, "Properties", TYPE_GAS)
  447. elements.property(elements.JWARD_PT_COKV, "State", ST_GAS)
  448. elements.property(elements.JWARD_PT_COKV, "Temperature", 883.15)
  449. elements.property(elements.JWARD_PT_COKV, "HeatConduct", 195)
  450. elements.property(elements.JWARD_PT_COKV, "LowTemperature", 873.15)
  451. elements.property(elements.JWARD_PT_COKV, "LowTemperatureTransition", elements.JWARD_PT_COKE)
  452.  
  453. local nitrogen = elements.allocate("JWARD", "N2")
  454. elements.element(elements.JWARD_PT_N2, elements.element(elements.DEFAULT_PT_CO2))
  455. elements.property(elements.JWARD_PT_N2, "Name", "N2")
  456. elements.property(elements.JWARD_PT_N2, "Description", "Nitrogen Gas. Combines with WATR to make N2O + H2.")
  457. elements.property(elements.JWARD_PT_N2, "Colour", 0x5E52FF)
  458. elements.property(elements.JWARD_PT_N2, "MenuSection", SC_GAS)
  459. elements.property(elements.JWARD_PT_N2, "Gravity", 0)
  460. elements.property(elements.JWARD_PT_N2, "Flammable", 0)
  461. elements.property(elements.JWARD_PT_N2, "Explosive", 1)
  462. elements.property(elements.JWARD_PT_N2, "Loss", 0.3)
  463. elements.property(elements.JWARD_PT_N2, "AirLoss", 0.99)
  464. elements.property(elements.JWARD_PT_N2, "AirDrag", 0.01)
  465. elements.property(elements.JWARD_PT_N2, "Advection", 2.0)
  466. elements.property(elements.JWARD_PT_N2, "Weight", 0)
  467. elements.property(elements.JWARD_PT_N2, "Diffusion", 2.75)
  468. elements.property(elements.JWARD_PT_N2, "State", ST_GAS)
  469. elements.property(elements.JWARD_PT_N2, "Properties", elem.TYPE_GAS)
  470. elements.property(elements.JWARD_PT_N2, "LowTemperatureTransition", elements.DEFAULT_PT_LN2)
  471. elements.property(elements.JWARD_PT_N2, "LowTemperature", 76)
  472. function N2(i,x,y,s,n)
  473. water = tpt.get_property("type",x+math.random(-1,1),y+math.random(-1,1))
  474. if water == tpt.el.dstw.id then
  475. tpt.parts[i].type = tpt.element('N2O')
  476. water = nil
  477. end
  478. end
  479. tpt.element_func(N2,nitrogen)
  480. local OILCRUDE = elements.allocate("JWARD", "OILC")
  481. elements.element(elements.JWARD_PT_OILC, elements.element(elements.DEFAULT_PT_GEL))
  482. elements.property(elements.JWARD_PT_OILC, "Name", "OILC")
  483. elements.property(elements.JWARD_PT_OILC, "Description", "Crude oil can be distilled, didn't name it coil for a reason")
  484. elements.property(elements.JWARD_PT_OILC, "Colour", 0x35350D)
  485. elements.property(elements.JWARD_PT_OILC, "MenuSection", 7)
  486. elements.property(elements.JWARD_PT_OILC, "Gravity", .04)
  487. elements.property(elements.JWARD_PT_OILC, "Flammable", 50)
  488. elements.property(elements.JWARD_PT_OILC, "Explosive", 1)
  489. elements.property(elements.JWARD_PT_OILC, "Loss", 1)
  490. elements.property(elements.JWARD_PT_OILC, "AirLoss", .5)
  491. elements.property(elements.JWARD_PT_OILC, "AirDrag", .01)
  492. elements.property(elements.JWARD_PT_OILC, "Advection", .01)
  493. elements.property(elements.JWARD_PT_OILC, "Weight", 5)
  494. elements.property(elements.JWARD_PT_OILC, "State", ST_liquid)
  495. elements.property(elements.JWARD_PT_OILC, "Properties", elem.TYPE_LIQUID+elem.PROP_DEADLY)
  496. function OILC(i,x,y,s,n)
  497.  dis = tpt.get_property('temp', x, y)
  498.  if dis > 973.15 then
  499.  tpt.set_property('tmp', math.random(2,8), x, y)
  500. end
  501. oillife = tpt.get_property('tmp', x, y)
  502.   if oillife == 8 then
  503.   tpt.parts[i].type = tpt.element('gas')
  504.   oillife = nil
  505.   end
  506.   if oillife == 7 then
  507.   tpt.parts[i].type = tpt.element('kerv')
  508.   oillife = nil
  509.   end
  510.   if oillife == 6 then
  511.   tpt.parts[i].type = tpt.element('ptlv')
  512.   oillife = nil
  513.   end
  514.   if oillife == 5 then
  515.   tpt.parts[i].type = tpt.element('dslv')
  516.   oillife = nil
  517.   end
  518.   if oillife == 4 then
  519.   tpt.parts[i].type = tpt.element('waxv')
  520.   oillife = nil
  521.   end
  522.   if oillife == 3 then
  523.   tpt.parts[i].type = tpt.element('coke')
  524.   oillife = nil
  525.   end
  526.   if oillife == 2 then
  527.   tpt.parts[i].type = tpt.element('tarv')
  528.   oillife = nil
  529.   end
  530. end
  531. tpt.element_func(OILC,OILCRUDE)
  532.  
  533.  
  534. tpt.element_func(OILC,OILCRUDE)
  535. elements.property(elements.DEFAULT_PT_GAS, "HighPressureTransition", 256)
  536. elements.property(elements.DEFAULT_PT_GAS, "LowTemperature", 573.15)
  537. elements.property(elements.DEFAULT_PT_GAS, "HotAir", 0)
  538. elements.property(elements.DEFAULT_PT_GAS, "LowTemperatureTransition", elements.DEFAULT_PT_OIL)
  539. elements.property(elements.DEFAULT_PT_GAS, "Temperature", 583.15)
  540. elements.property(elements.DEFAULT_PT_GAS, "HighTemperature", 10000)
  541. elements.property(elements.DEFAULT_PT_COAL, "HighTemperatureTransition", elements.JWARD_PT_COKE)
  542. elements.property(elements.DEFAULT_PT_COAL, "HighTemperature", 773.15)
  543. elements.property(elements.DEFAULT_PT_LN2, "HighTemperatureTransition", elements.JWARD_PT_N2)
  544. elements.property(elements.DEFAULT_PT_OIL, "HighTemperature", 573.15)
  545. elements.property(elements.DEFAULT_PT_OIL, "HighTemperatureTransition", elements.DEFAULT_PT_GAS)
  546. elements.property(elements.DEFAULT_PT_DESL, "HighTemperatureTransition", elements.JWARD_PT_DSLV)
  547. elements.property(elements.DEFAULT_PT_DESL, "HighTemperature", 473.15)
  548. elements.property(elements.DEFAULT_PT_MWAX, "HighTemperatureTransition", elements.JWARD_PT_WAXV)
  549. elements.property(elements.DEFAULT_PT_MWAX, "HighTemperature", 823.15)
  550. elements.property(elements.DEFAULT_PT_WAX, "HeatConduct", 25)
RAW Paste Data