Advertisement
TPT_PL

EEC v5 Lite (v0.2)

Jul 14th, 2016
186
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 21.09 KB | None | 0 0
  1. -- EEC Lite v5 (v0.2), edited by TPT_PL ---
  2. --- Author of original EEC: ---------------
  3. -------- lapominator ----------------------
  4.  
  5. --+++++++++++++++++++++++++++++++++++++++--
  6.  
  7. -- Changes:
  8. -- New "radioactive" functions
  9. -- MOLD and RUMS re-added
  10. -- Hidden elements stay hidden
  11. -- SSTL in electronics menu
  12. -- DMND in special menu
  13.  
  14. tpt.el.wax.name="CISO"
  15. tpt.el.wax.flammable=0
  16. tpt.el.wax.heat=40
  17. tpt.el.wax.menusection=10
  18. tpt.el.wax.color=0xffaa55
  19. tpt.el.wax.description=" C Isotope, unstable radioactive, Crystaline Isotope, forms within Isotope Z upon light P Isotope bombardment."
  20. tpt.el.wax.hardness=2
  21. tpt.el.wax.weight=101.0
  22. tpt.el.mwax.hardness=2
  23. tpt.el.mwax.name="DISO"
  24. tpt.el.mwax.flammable=0
  25. tpt.el.mwax.heat=-255
  26. tpt.el.mwax.menusection=10
  27. tpt.el.mwax.color=0x1111AA11
  28. tpt.el.mwax.weight=85.5
  29. tpt.el.mwax.gravity=-0.7
  30. tpt.el.mwax.diffusion = 4.5
  31. tpt.el.mwax.description="Destabalized C Isotope, lightly radioactive and vaporus."
  32. math.randomseed(os.time())
  33. function isotope(i,x,y,s,n)
  34. if tpt.parts[i].life==0 then
  35. tpt.parts[i].life=8
  36. end
  37. ox=math.random(x-1,x+1)
  38. oy=math.random(y-1,y+1)
  39. if tpt.get_property("type",ox,oy)==tpt.el.anar.id then
  40. tpt.set_property("type",tpt.el.glow.id,ox,oy)
  41. tpt.set_property("temp",tpt.get_property("temp",ox,oy)+100,ox,oy)
  42. tpt.create(math.random(x-1,x+1),math.random(y-1,y+1),tpt.el.caus.id)
  43. tpt.parts[i].life=tpt.parts[i].life-1
  44. end
  45. end
  46. tpt.element_func(isotope, tpt.el.wax.id,1)
  47. tpt.element_func(isotope, tpt.el.mwax.id,1)
  48. function caus(i,x,y,s,n)
  49. for ex=x-1,x+1,1 do
  50. for ey=y-1,y+1,1 do
  51. if tpt.get_property("type",ex,ey)==tpt.el.acid.id then
  52. tpt.delete(ex,ey)
  53. tpt.parts[i].life=tpt.parts[i].life-1
  54. if tpt.parts[i].life==51 then
  55. tpt.delete(i)
  56. end
  57. end
  58. end
  59. end
  60. end
  61.  
  62. tpt.el.bran.name="HEMP"
  63. tpt.el.bran.enabled=1
  64. tpt.el.bran.color=0xBFFCFF
  65. tpt.el.bran.description=" Heavy Exotic Metallic Plasmoid, highly conductive, Isotopic decay of Destabalized CISO upon P Isotope bombardment.."
  66. tpt.el.bran.menu=1
  67. tpt.el.bran.weight=99
  68. tpt.el.bran.menusection=7
  69. tpt.el.bran.falldown=3
  70. tpt.el.bran.gravity=5
  71. tpt.el.bran.diffusion=2
  72. tpt.el.bran.heat=-255
  73. tpt.el.bran.advection=2
  74. tpt.eltransition.bran.tempHighValue = 1600
  75. tpt.eltransition.bran.tempHighType = tpt.element('exot')
  76. tpt.el.bran.explosive=1
  77.  
  78. function graphics(i, colr, colg, colb)
  79. if tpt.get_property("temp",i) < 5000
  80. and tpt.get_property("temp",i) > 273 then
  81. return 0,0x00FF0030,255,0,255,0,75,183,0,255
  82. elseif tpt.get_property("temp",i) > 5000 then
  83. return 0,0x00ff0020,255,255,255,0,75,255,0,0
  84. elseif tpt.get_property("temp",i) < 273 then
  85. return 0,0x00ff0020,255,0,255,255,75,0,0,255
  86. end
  87. end
  88. tpt.graphics_func(graphics,tpt.el.bran.id)
  89.  
  90. tpt.el.pste.name = 'EMV'
  91. tpt.el.pste.description = 'Exotic Metallic Vapor, conductive only once.'
  92. tpt.el.pste.color = 0xBFFBFF
  93. tpt.el.pste.menusection = 6
  94. tpt.el.pste.diffusion = 1.5
  95. tpt.el.pste.gravity = 0.5
  96. tpt.el.pste.weight = 1.0
  97. tpt.el.pste.heat = 10.0
  98. tpt.el.pste.hardness = 4.0
  99. tpt.el.pste.properties = 2600
  100. tpt.eltransition.pste.tempHighValue = 1800
  101. tpt.eltransition.pste.tempHighType = tpt.element('glow')
  102.  
  103. tpt.el.clst.name="Dirt"
  104. tpt.el.clst.description="Dirt, just add water."
  105. tpt.el.clst.color=0xC77400
  106. tpt.el.clst.weight=85.0
  107. tpt.el.clst.menusection=8
  108.  
  109. tpt.el.brmt.name="Rust"
  110. tpt.el.brmt.description="Oxidized iron."
  111.  
  112. tpt.el.metl.name = "SSTL"
  113. tpt.el.metl.description = "Stainless Steel, uncorrosive and conductive."
  114. tpt.el.metl.hardness = -1
  115. tpt.el.metl.menusection = 1
  116. tpt.el.metl.color=0xA1AAA1
  117. tpt.el.metl.weight = 102.0
  118.  
  119. tpt.el.psts.name = 'PEMV'
  120. tpt.el.psts.menu = 1
  121. tpt.el.psts.enabled=1
  122. tpt.el.psts.description =  'Pressurized Exotic Metallic Vapor.'
  123. tpt.el.psts.menusection = 10
  124. tpt.eltransition.psts.tempHighValue = 8888.0
  125. tpt.eltransition.psts.tempHighType = tpt.element('vibr')
  126.  
  127. tpt.el.isoz.menusection=7
  128. tpt.el.isoz.hardness=2
  129. tpt.el.isoz.description=" Isotope Z, condenced from noble gas upon light neturon bombardment"
  130. tpt.el.iszs.hardness=2
  131. tpt.el.iszs.description=" Isotope Z Stabalized, under goes light radioactive decay"
  132.  
  133. tpt.el.glow.name="EISO"
  134. tpt.el.glow.description="E Isotope, radioactive decay of D Isotope."
  135. tpt.el.glow.menusection=7
  136. tpt.el.glow.hardness=-1
  137. tpt.eltransition.glow.tempHighValue = 1400
  138. tpt.eltransition.glow.tempHighType = tpt.element('hemp')
  139.  
  140. tpt.el.anar.name="PISO"
  141. tpt.el.anar.description="P Isotopes, The untested radioactive emissions of Jupiter's red spot , effected by energy X."
  142. tpt.el.anar.flammable=0
  143. tpt.el.anar.weight=101.0
  144. tpt.el.anar.heat=-50
  145. tpt.el.anar.hardness=-1
  146. tpt.el.anar.color=0xff11ffff
  147. tpt.el.anar.gravity=0.0
  148. tpt.el.anar.diffusion=4.0
  149. tpt.el.anar.falldown=-1
  150. tpt.el.anar.menusection=10
  151. tpt.el.anar.airloss=1
  152. tpt.el.anar.airdrag=0
  153.  
  154. tpt.el.grav.name="IMEG"
  155. tpt.el.grav.description="Inert Metallic Exotic Gel, Very light and photo-voltaic. created within an exotic/micro-carbon based reaction."
  156. tpt.el.grav.menusection = 10
  157. tpt.el.grav.color = 0xBFBFFBFF
  158. tpt.el.grav.diffusion = 1.0
  159. tpt.el.grav.gravity = 0.5
  160. tpt.el.grav.weight = 2.0
  161. tpt.el.grav.heat = 1.0
  162. tpt.el.grav.flammable = 0.0
  163.  
  164. math.randomseed(os.time())
  165. function boom (i,x,y,s,n)
  166. a=math.random(-1,1)
  167. b=math.random(-1,1)
  168. c=tpt.get_property("temp",i)
  169. if c>140+273.15 then
  170. tpt.create(x+a,y+b,"EMV")
  171. end
  172. end
  173. tpt.element_func(boom,tpt.el.grav.id)
  174.  
  175. tpt.el.brel.name = 'CCOM'
  176. tpt.el.exot.description= "Exotic non conductive heavy Isotopic decay of HEMP, sensitive to energy particles."
  177. tpt.el.exot.color = 0xBFFBFB
  178. tpt.el.exot.menusection = 7
  179. tpt.el.exot.hardness=-1
  180. tpt.el.brel.menusection = 8
  181. tpt.el.brel.advection = 0.3
  182. tpt.el.brel.loss = 0.7
  183. tpt.el.brel.airdrag = 0.0
  184. tpt.el.brel.description= "Micro Carbon Compound, very conductive."
  185. tpt.el.brel.color = 0xA1AAA1
  186. tpt.el.brel.weight = 85.5
  187. tpt.el.brel.gravity = 0.5
  188. tpt.el.brel.hotair = 0.0
  189. tpt.el.brel.diffusion = 0.1
  190. tpt.el.brel.color = 0xB7B7A9
  191. tpt.eltransition.brel.tempHighValue = 9720
  192. tpt.eltransition.brel.tempHighType = tpt.element('dmnd')
  193. exot_react = 0
  194. math.randomseed(os.time())
  195. tpt.setfpscap(50)
  196. function exot_react(i,x,y,nt)
  197. local found_brel = false
  198. if tpt.get_property("type",x+1,y)==tpt.el.brel.id then
  199. found_brel = true
  200. end
  201. if tpt.get_property("type",x-1,y)==tpt.el.brel.id then
  202. found_brel = true
  203. end
  204. if tpt.get_property("type",x,y+1)==tpt.el.brel.id then
  205. found_brel = true
  206. end
  207. if tpt.get_property("type",x,y-1)==tpt.el.brel.id then
  208. found_brel = true
  209. end
  210. if found_brel then
  211. tpt.set_property("type","IMEG",x,y)
  212. exot_react = 100
  213. end
  214. end
  215. tpt.element_func(exot_react,tpt.el.exot.id,1)
  216.  
  217. function heat(key,blank,blank,event)
  218. if string.upper(key) == "X" and event == 1 then
  219. tpt.set_property("temp",400,"iszs")
  220. tpt.set_property("temp",0,"bizr")
  221. tpt.set_property("temp",400,"yest")
  222. tpt.set_property("temp",400,"rbdm")
  223. tpt.set_property("type","fire","cflm")
  224. tpt.set_property("type","elec","piso")
  225. tpt.set_property("type","co2","dric")
  226. tpt.set_property("type","neut","uran")
  227. end
  228. end
  229. tpt.register_keypress(heat)
  230.  
  231. function solidify(key,blank,blank,event)
  232. if string.upper(key) == "V" and event == 1 then
  233. tpt.set_property("type","brck","stne")
  234. tpt.set_property("type","qrtz","pqrt")
  235. tpt.set_property("type","glas","bgla")
  236. tpt.set_property("type","iron","rust")
  237. tpt.set_property("type","vibr","bvbr")
  238. tpt.set_property("type","spng","dyst")
  239. tpt.set_property("type","wood","yest")
  240. tpt.set_property("type","sstl","ccom")
  241. end
  242. end
  243. tpt.register_keypress(solidify)
  244.  
  245. function cool(key,blank,blank,event)
  246. if string.upper(key) == "C" and event == 1 then
  247. tpt.set_property("temp",1,"lava")
  248. tpt.set_property("temp",200,"bizr")
  249. tpt.set_property("temp",200,"bizg")
  250. tpt.set_property("temp",0,"isoz")
  251. tpt.set_property("temp",100,"yest")
  252. tpt.set_property("temp",0,"diso")
  253. tpt.set_property("temp",0,"lrbd")
  254. tpt.set_property("temp",0,"dric")
  255. tpt.set_property("type","cflm","fire")
  256. tpt.set_property("type","nice","acid")
  257. tpt.set_property("type","cflm","warp")
  258. tpt.set_property("type","hygn","uran")
  259. tpt.set_property("type","cflm","plsm")
  260. tpt.set_property("type","frzz","snow")
  261. tpt.set_property("type","dric","co2")
  262. tpt.set_property("type","ln2","piso")
  263. end
  264. end
  265. tpt.register_keypress(cool)
  266.  
  267. local Element1 = elements.allocate("MOD", "SNDM")
  268. elements.element(elements.MOD_PT_SNDM, elements.element(tpt.element("MERC")))
  269. elements.property(elements.MOD_PT_SNDM, "Name", "SNDM")
  270. elements.property(elements.MOD_PT_SNDM, "Color", 0xb1AAA1)
  271. elements.property(elements.MOD_PT_SNDM, "Gravity", 0)
  272. elements.property(elements.MOD_PT_SNDM, "Falldown", 0)
  273. elements.property(elements.MOD_PT_SNDM, "Weight", 100)
  274. elements.property(elements.MOD_PT_SNDM, "MenuVisible", 1)
  275. elements.property(elements.MOD_PT_SNDM, "MenuSection", 1)
  276. elements.property(elements.MOD_PT_SNDM, "Advection", 0.05)
  277. elements.property(elements.MOD_PT_SNDM, "AirDrag", 0.01)
  278. elements.property(elements.MOD_PT_SNDM, "Loss", 0.2)
  279. elements.property(elements.MOD_PT_SNDM, "Collision", -0.2)
  280. elements.property(elements.MOD_PT_SNDM, "Flammable", 0)
  281. elements.property(elements.MOD_PT_SNDM, "Hardness", 7)
  282. elements.property(elements.MOD_PT_SNDM, "Temperature", 250.0)
  283. elements.property(elements.MOD_PT_SNDM, "HeatConduct", 0)
  284. elements.property(elements.MOD_PT_SNDM, "Description", "Esendiem,:} strange & reactive.")
  285. local function Esendiem(i, x, y, s, n)
  286.  
  287. local element = tpt.get_property("type", x+math.random(-1, 1), y+math.random(-1, 1))
  288. if element == tpt.el.watr.id or element == tpt.el.dstw.id or element == tpt.el.bubw.id then
  289. tpt.parts[i].type = tpt.el.cnct.id
  290. tpt.set_property('life', math.random(100, 150), i)
  291. end
  292.  
  293. local element = tpt.get_property("type", x+math.random(-1, 1), y+math.random(-1, 1))
  294. if element == tpt.el.oxyg.id or element == tpt.el.loxy.id then
  295. tpt.parts[i].type = tpt.el.brmt.id
  296. end
  297.  
  298. local element = tpt.get_property("type", x+math.random(-1, 1), y+math.random(-1, 1))
  299. if element == tpt.el.caus.id then
  300. tpt.parts[i].type = tpt.el.nitr.id
  301. end
  302.  
  303. local element = tpt.get_property("type", x+math.random(-1, 1), y+math.random(-1, 1))
  304. if element == tpt.el.acid.id then
  305. tpt.parts[i].type = tpt.el.metl.id
  306. end
  307.  
  308. local element = tpt.get_property("type", x+math.random(-1, 1), y+math.random(-1, 1))
  309. if element == tpt.el.anar.id then
  310. tpt.parts[i].type = tpt.el.iron.id
  311. end
  312.  
  313. local element = tpt.get_property("type", x+math.random(-1, 1), y+math.random(-1, 1))
  314. if element == tpt.el.neut.id then
  315. tpt.parts[i].type = tpt.el.lrbd.id
  316. end
  317.  
  318. local element = tpt.get_property("type", x+math.random(-1, 1), y+math.random(-1, 1))
  319. if element == tpt.el.co2.id then
  320. tpt.parts[i].type = tpt.el.brel.id
  321. end
  322.  
  323. local element = tpt.get_property("type", x+math.random(-1, 1), y+math.random(-1, 1))
  324. if element == tpt.el.bran.id then
  325. tpt.parts[i].type = tpt.el.grav.id
  326. end
  327.  
  328. local element = tpt.get_property("type", x+math.random(-1, 1), y+math.random(-1, 1))
  329. if element == tpt.el.elec.id then
  330. tpt.parts[i].type = tpt.el.iszs.id
  331. end
  332.  
  333. local element = tpt.get_property("type", x+math.random(-1, 1), y+math.random(-1, 1))
  334. if element == tpt.el.glow.id then
  335. tpt.parts[i].type = tpt.el.mwax.id
  336. end
  337. end
  338. tpt.element_func(Esendiem, elements.MOD_PT_SNDM)
  339.  
  340.  
  341.  
  342.  
  343. local elTemporaryValue = tpt.eltransition.dust.presHighValue
  344. local elTemporaryType = tpt.eltransition.dust.presHighType
  345. tpt.eltransition.dust.presHighValue = 25
  346. tpt.eltransition.dust.presHighType = tpt.element("CCOM")
  347.  
  348. local elTemporaryValue = tpt.eltransition.brel.presHighValue
  349. local elTemporaryType = tpt.eltransition.brel.presHighType
  350. tpt.eltransition.brel.presHighValue = 115
  351. tpt.eltransition.brel.presHighType = tpt.element("dmnd")
  352.  
  353. local elTemporaryValue = tpt.eltransition.exot.presHighValue
  354. local elTemporaryType = tpt.eltransition.exot.presHighType
  355. tpt.eltransition.exot.presHighValue = 55
  356. tpt.eltransition.exot.presHighType = tpt.element("hygn")
  357.  
  358. local elTemporaryValue = tpt.eltransition.wood.presHighValue
  359. local elTemporaryType = tpt.eltransition.wood.presHighType
  360. tpt.eltransition.wood.presHighValue = 45
  361. tpt.eltransition.wood.presHighType = tpt.element("dust")
  362.  
  363. local elTemporaryValue = tpt.eltransition.shld.presHighValue
  364. local elTemporaryType = tpt.eltransition.shld.presHighType
  365. tpt.eltransition.shld.presHighValue = 50
  366. tpt.eltransition.shld.presHighType = tpt.element("neut")
  367.  
  368. local elTemporaryValue = tpt.eltransition.shd2.presHighValue
  369. local elTemporaryType = tpt.eltransition.shd2.presHighType
  370. tpt.eltransition.shd2.presHighValue = 120
  371. tpt.eltransition.shd2.presHighType = tpt.element("neut")
  372.  
  373. local elTemporaryValue = tpt.eltransition.shd3.presHighValue
  374. local elTemporaryType = tpt.eltransition.shd3.presHighType
  375. tpt.eltransition.shd3.presHighValue = 150
  376. tpt.eltransition.shd3.presHighType = tpt.element("neut")
  377.  
  378. local elTemporaryValue = tpt.eltransition.shd4.presHighValue
  379. local elTemporaryType = tpt.eltransition.shd4.presHighType
  380. tpt.eltransition.shd4.presHighValue = 200
  381. tpt.eltransition.shd4.presHighType = tpt.element("shd4")
  382.  
  383. local elTemporaryValue = tpt.eltransition.wax.presHighValue
  384. local elTemporaryType = tpt.eltransition.wax.presHighType
  385. tpt.eltransition.wax.presHighValue = 25
  386. tpt.eltransition.wax.presHighType = tpt.element("elec")
  387.  
  388. local elTemporaryValue = tpt.eltransition.metl.presHighValue
  389. local elTemporaryType = tpt.eltransition.metl.presHighType
  390. tpt.eltransition.metl.presHighValue = 100
  391. tpt.eltransition.metl.presHighType = tpt.element("iron")
  392.  
  393.  
  394.  
  395. function react(i,x,y)
  396. type=tpt.get_property("type",x+math.random(-1,1),y+math.random(-1,1))
  397. if type==tpt.el.wax.id then
  398. tpt.parts[i].type=tpt.el.deut.id
  399. end
  400. end    
  401. tpt.element_func(react,tpt.el.phot.id)
  402.  
  403. function react(i,x,y)
  404. type=tpt.get_property("type",x+math.random(-1,1),y+math.random(-1,1))
  405. if type==tpt.el.anar.id then
  406. tpt.parts[i].type=tpt.el.boyl.id
  407. end
  408. end  
  409. tpt.element_func(react,tpt.el.rbdm.id)
  410.  
  411. function react(i,x,y)
  412. type=tpt.get_property("type",x+math.random(-1,1),y+math.random(-1,1))
  413. if type==tpt.el.neut.id then
  414. tpt.parts[i].type=tpt.el.bvbr.id
  415. end
  416. end  
  417. tpt.element_func(react,tpt.el.psts.id)
  418.  
  419. function react(i,x,y)
  420. type=tpt.get_property("type",x+math.random(-1,1),y+math.random(-1,1))
  421. if type==tpt.el.anar.id then
  422. tpt.parts[i].type=tpt.el.wax.id
  423. end
  424. end
  425. tpt.element_func(react,tpt.el.iszs.id)
  426.  
  427. function react(i,x,y)
  428. type=tpt.get_property("type",x+math.random(-1,1),y+math.random(-1,1))
  429. if type==tpt.el.yest.id then
  430. tpt.parts[i].type=tpt.el.desl.id
  431. end
  432. end  
  433. tpt.element_func(react,tpt.el.oil.id)
  434.  
  435. function react(i,x,y)
  436. type=tpt.get_property("type",x+math.random(-1,1),y+math.random(-1,1))
  437. if type==tpt.el.neut.id then
  438. tpt.parts[i].type=tpt.el.isoz.id
  439. end
  440. end
  441. tpt.element_func(react,tpt.el.nble.id)
  442.  
  443. function react(i,x,y)
  444. typeel=tpt.get_property("type",x+math.random(-1,1),y+math.random(-1,1))
  445. if type==tpt.el.phot.id then
  446. tpt.parts[i].type=tpt.el.oxyg.id
  447. end
  448. end    
  449. tpt.element_func(react,tpt.el.hygn.id)
  450.  
  451. function react(i,x,y)
  452. type=tpt.get_property("type",x+math.random(-1,1),y+math.random(-1,1))
  453. if type==tpt.el.oxyg.id then
  454. tpt.parts[i].type=tpt.el.nble.id
  455. end
  456. end    
  457. tpt.element_func(react,tpt.el.elec.id)
  458.  
  459. function react(i,x,y)
  460. type=tpt.get_property("type",x+math.random(-1,1),y+math.random(-1,1))
  461. if type==tpt.el.anar.id then
  462. tpt.parts[i].type=tpt.el.ln2.id
  463. end
  464. end    
  465. tpt.element_func(react,tpt.el.brmt.id)
  466.  
  467. function react(i,x,y)
  468. type=tpt.get_property("type",x+math.random(-1,1),y+math.random(-1,1))
  469. if type==tpt.el.anar.id then
  470. tpt.parts[i].type=tpt.el.qrtz.id
  471. end
  472. end    
  473. tpt.element_func(react,tpt.el.co2.id)
  474.  
  475. function react(i,x,y)
  476. type=tpt.get_property("type",x+math.random(-1,1),y+math.random(-1,1))
  477. if type==tpt.el.elec.id then
  478. tpt.parts[i].type=tpt.el.plut.id
  479. end
  480. end    
  481. tpt.element_func(react,tpt.el.wax.id)
  482.  
  483. function react(i,x,y)
  484. type=tpt.get_property("type",x+math.random(-1,1),y+math.random(-1,1))
  485. if type==tpt.el.watr.id then
  486. tpt.parts[i].type=tpt.el.vine.id
  487. end
  488. end
  489. tpt.element_func(react,tpt.el.wood.id)
  490.  
  491. function react(i,x,y)
  492. type=tpt.get_property("type",x+math.random(-1,1),y+math.random(-1,1))
  493. if type==tpt.el.wax.id then
  494. tpt.parts[i].type=tpt.el.shld.id
  495. end
  496. end
  497. tpt.element_func(react,tpt.el.neut.id)
  498.  
  499. function react(i,x,y)
  500. type=tpt.get_property("type",x+math.random(-1,1),y+math.random(-1,1))
  501. if type==tpt.el.wood.id then
  502. tpt.parts[i].type=tpt.el.dyst.id
  503. end
  504. end
  505. tpt.element_func(react,tpt.el.anar.id)
  506.  
  507. function react(i,x,y)
  508. type=tpt.get_property("type",x+math.random(-1,1),y+math.random(-1,1))
  509. if type==tpt.el.sltw.id then
  510. tpt.parts[i].type=tpt.el.acid.id
  511. end
  512. end
  513. tpt.element_func(react,tpt.el.caus.id)
  514.  
  515. function react(i,x,y)
  516. type=tpt.get_property("type",x+math.random(-1,1),y+math.random(-1,1))
  517. if type==tpt.el.watr.id then
  518. tpt.parts[i].type=tpt.el.plnt.id
  519. end
  520. end
  521. tpt.element_func(react,tpt.el.clst.id)
  522.  
  523. function react(i,x,y)
  524. type=tpt.get_property("type",x+math.random(-1,1),y+math.random(-1,1))
  525. if type==tpt.el.soap.id then
  526. tpt.parts[i].type=tpt.el.merc.id
  527. end
  528. end
  529. tpt.element_func(react,tpt.el.boyl.id)
  530.  
  531. tpt.el.rbdm.menusection=5
  532. tpt.el.vibr.menusection=9
  533. tpt.el.bvbr.menusection=8
  534. tpt.el.qrtz.weight=101.0
  535. tpt.el.dmnd.weight = 200.5
  536. tpt.el.dmnd.menusection = 11
  537. tpt.el.iron.weight = 101.5
  538. tpt.el.ttan.weight = 102.5
  539.  
  540. tpt.el.acid.weight=25
  541. tpt.el.caus.weight=26
  542.  
  543. tpt.el.merc.menusection = 7
  544. tpt.el.lrbd.menusection = 7
  545.  
  546. tpt.el.watr.hardness=2
  547. tpt.el.dstw.hardness=2
  548. tpt.el.sltw.hardness=-1
  549.  
  550. tpt.el.soap.weight=25
  551. tpt.el.soap.hardness=0
  552.  
  553. tpt.el.gas.hardness=-1
  554. tpt.el.co2.hardness=-1
  555. tpt.el.smke.flammable=0
  556. tpt.el.wtrv.hardness=-1
  557.  
  558. local BPDR = elements.allocate("FEYNMAN", "BPDR")
  559. elements.element(elements.FEYNMAN_PT_BPDR, elements.element(elements.DEFAULT_PT_BCOL))
  560. elements.property(elements.FEYNMAN_PT_BPDR, "Name", "BPDR")
  561. elements.property(elements.FEYNMAN_PT_BPDR, "Description", "Black Powder. Very explosive.")
  562. elements.property(elements.FEYNMAN_PT_BPDR, "Colour", 0x353535)
  563. elements.property(elements.FEYNMAN_PT_BPDR, "MenuSection", 5)
  564. elements.property(elements.FEYNMAN_PT_BPDR, "Gravity", .5)
  565. elements.property(elements.FEYNMAN_PT_BPDR, "Flammable", 10000)
  566. elements.property(elements.FEYNMAN_PT_BPDR, "Explosive", 1)
  567. elements.property(elements.FEYNMAN_PT_BPDR, "Loss", 1)
  568. elements.property(elements.FEYNMAN_PT_BPDR, "AirLoss", .5)
  569. elements.property(elements.FEYNMAN_PT_BPDR, "AirDrag", .01)
  570. elements.property(elements.FEYNMAN_PT_BPDR, "Advection", .01)
  571. elements.property(elements.FEYNMAN_PT_BPDR, "Weight", 0)
  572. elements.property(elements.FEYNMAN_PT_BPDR, "Diffusion", 0)
  573.  
  574. local REXP = elements.allocate("FEYNMAN", "REXP")
  575. elements.element(elements.FEYNMAN_PT_REXP, elements.element(elements.DEFAULT_PT_BCOL))
  576. elements.property(elements.FEYNMAN_PT_REXP, "Name", "REXP")
  577. elements.property(elements.FEYNMAN_PT_REXP, "Description", "More realistic explosive. It explodes by burning rather than exploding and with lots of heat.")
  578. elements.property(elements.FEYNMAN_PT_REXP, "Colour", 0xFF5000)
  579. elements.property(elements.FEYNMAN_PT_REXP, "MenuSection", 5)
  580. elements.property(elements.FEYNMAN_PT_REXP, "Gravity", 0)
  581. elements.property(elements.FEYNMAN_PT_REXP, "Flammable", 10000)
  582. elements.property(elements.FEYNMAN_PT_REXP, "Explosive", 1)
  583. elements.property(elements.FEYNMAN_PT_REXP, "Loss", 0)
  584. elements.property(elements.FEYNMAN_PT_REXP, "AirLoss", 0)
  585. elements.property(elements.FEYNMAN_PT_REXP, "AirDrag", .0)
  586. elements.property(elements.FEYNMAN_PT_REXP, "Advection", 0)
  587. elements.property(elements.FEYNMAN_PT_REXP, "Diffusion", 0)
  588.  
  589. -- Radioactive function rebuild by DanielGalrito
  590.  
  591. function CisoGlow(i, r, g, b)
  592. Cisoglow = math.random(1,3)
  593. if Cisoglow == 1 then
  594.     return 1, 0x00000001, 255, 253, 222, 202, 0, 0, 0, 0
  595. end
  596. if Cisoglow == 2 then
  597.     return 1, 0x00000001, 255, 253, 222, 211, 0, 0, 0, 0
  598. end
  599. if Cisoglow == 3 then
  600.     return 1, 0x00000001, 255, 253, 222, 168, 0, 0, 0, 0
  601. end
  602. end
  603. tpt.graphics_func(CisoGlow, tpt.element('wax'))
  604.  
  605. function DisoGlow(i, r, g, b)
  606. Disoglowr = math.random(0,255)
  607. Disoglowg = math.random(0,255)
  608. Disoglowb = math.random(0,255)
  609.     return 1, 0x00000001, 255, Disoglowr, Disoglowg, Disoglowb, 0, 0, 0, 0
  610. end
  611. tpt.graphics_func(DisoGlow, tpt.element('mwax'))
  612.  
  613. function PemvGlow(i, r, g, b)
  614. PemvGlow = math.random(1,3)
  615. if PemvGlow == 1 then
  616.     return 1, 0x00000001, 255, 0, 38, 9, 0, 0, 0, 0
  617. end
  618. if PemvGlow == 2 then
  619.     return 1, 0x00000001, 255, 0, 37, 173, 0, 0, 0, 0
  620. end
  621. if PemvGlow == 3 then
  622.     return 1, 0x00000001, 255, 0, 37, 244, 0, 0, 0, 0
  623. end
  624. end
  625. tpt.graphics_func(PemvGlow, tpt.element('psts'))
  626.  
  627. function PisoGlow(i, r, g, b)
  628.  
  629. Pisoglowr = math.random(0,1)
  630. Pisoglowg = math.random(110,160)
  631. Pisoglowb = math.random(130,135)
  632.     return 1, 0x00000001, 255, Pisoglowr, Pisoglowg, Pisoglowb, 0, 0, 0, 0
  633. end
  634. tpt.graphics_func(PisoGlow, tpt.element('anar'))
  635.  
  636. function RumsGlow(i, r, g, b)
  637. RumsGlow = math.random(1,7)
  638. if RumsGlow == 1 then
  639.     return 1, 0x00022000, 255, 254, 205, 166, 100, 255, 205, 166
  640. end
  641. if RumsGlow == 2 then
  642.     return 1, 0x00022000, 255, 254, 42, 236, 100, 255, 42, 236
  643. end
  644. if RumsGlow == 3 then
  645.     return 1, 0x00022000, 255, 254, 140, 122, 100, 255, 140, 122
  646. end
  647. if RumsGlow == 4 then
  648.     return 1, 0x00022000, 255, 254, 243, 70, 100, 255, 243, 70
  649. end
  650. if RumsGlow == 5 then
  651.     return 1, 0x00022000, 255, 254, 46, 147, 100, 255, 46, 147
  652. end
  653. if RumsGlow == 6 then
  654.     return 1, 0x00022000, 255, 254, 167, 252, 100, 255, 167, 252
  655. end
  656. if RumsGlow == 7 then
  657.     return 1, 0x00022000, 255, 254, 178, 50, 100, 255, 178, 50
  658. end
  659. end
  660. tpt.graphics_func(RumsGlow, tpt.element('boyl'))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement