Advertisement
Kev_AKings

RAD - MOD 1.2.1B

Jul 8th, 2017
2,556
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 47.06 KB | None | 0 0
  1. print("RAD-MOD V 1.2.1b By Kev_AK ")
  2. print("Radioactive elements, particles and isotopes")
  3. print("----------------------------------------------")
  4.  
  5. -------------INERTS----------NOBLEGASES----------------------------
  6. local he = elem.allocate("KEV", "HE4")
  7. local rad = elem.allocate("KEV", "RN")
  8. elem.element(elem.KEV_PT_HE4, elem.element(elem.DEFAULT_PT_NBLE))
  9. elem.element(rad, elem.element(elem.DEFAULT_PT_NBLE))
  10. elem.property(elem.KEV_PT_HE4, "Name", "HE-4")
  11. elem.property(rad, "Name", "RN")
  12. elem.property(elem.KEV_PT_HE4, "Description", "Helium 4. Low Weight Gas Decays into HYGN.")
  13. elem.property(rad, "Description", "Radon. Inert Gas. Radioactive")
  14. elem.property(elem.KEV_PT_HE4, "Color", 0xFFF5EE)
  15. elem.property(rad, "Color", 0x3CB371)
  16. elem.property(elem.KEV_PT_HE4, "Flammable", 0)
  17. elem.property(rad, "Flammable", 0)
  18. elem.property(elem.KEV_PT_HE4, "Explosive", 0)
  19. elem.property(rad, "Explosive", 0)
  20. elem.property(elem.KEV_PT_HE4, "Properties", elem.TYPE_GAS+elem.PROP_LIFE_DEC+elem.PROP_CONDUCTS)
  21. elem.property(rad, "Properties", elem.TYPE_GAS+elem.PROP_LIFE_DEC+elem.PROP_CONDUCTS+elem.PROP_DEADLY)
  22. elem.property(elem.KEV_PT_HE4, "Weight", 0.01)
  23. elem.property(rad, "Weight", 5.88)
  24. elem.property(elem.KEV_PT_HE4, "Gravity", -1)
  25. elem.property(rad, "Gravity", 0.7)
  26. elem.property(elem.KEV_PT_HE4, "Diffusion", 4.99)
  27. elem.property(rad, "Diffusion", 1.0)
  28. elem.property(elem.KEV_PT_HE4, "AirLoss", 0.01)
  29. elem.property(rad, "AirLoss", 0.36)
  30. elem.property(elem.KEV_PT_HE4, "AirDrag", 0.02)
  31. elem.property(rad, "AirDrag", 0.35)
  32.  
  33.     local function hel4Update(i, x, y, s, nt)
  34.     r = sim.partID(x+math.random(-1,1),y+math.random(-1,1))
  35.      if r~= nil then
  36.              if math.random(1, 1000) == 1 then
  37.             local descompA = math.random(-20,20)
  38.             local descompB = math.random(-20,0)
  39.             tpt.create(x+math.random(-1,1), y+math.random(-1,1), "neut")
  40.             tpt.set_property("vx", math.random(-15,15), i)
  41.             tpt.set_property("vy", math.random(-15,15), i)
  42.             tpt.set_property("life", 25, i)
  43.         if math.abs(descompA) + math.abs(descompB) > 10 then
  44.         local r3 = math.random(1,2)
  45.             if descompC == 1 then
  46.             tpt.set_property("type", "neut", i)
  47.             end
  48.             if descompC == 2 then
  49.             tpt.set_property("type", "hygn", i)
  50.             end
  51.         end
  52.         end
  53.  
  54.             if sim.partProperty(r, "ctype") == elem.DEFAULT_PT_SPRK then
  55.                sim.partProperty(i, "type", elem.DEFAULT_PT_PLSM)
  56.                sim.partProperty(r, "type", elem.DEFAULT_PT_PLSM)
  57.                end
  58.             if sim.partProperty(r, "ctype") == elem.DEFAULT_PT_NEUT then
  59.                sim.partProperty(i, "type", elem.DEFAULT_PT_HYGN)
  60.                sim.partProperty(r, "type", elem.DEFAULT_PT_NEUT)
  61.                end
  62.      end
  63.     end    
  64.  
  65.     local function radonUpdate(i, x, y, s, nt)
  66.     r = sim.partID(x+math.random(-1,1),y+math.random(-1,1))
  67.      if r~= nil then
  68.             if math.random(1, 1000) == 1 then
  69.             local decayA = math.random(-20,20)
  70.             local decayB = math.random(-20,0)
  71.             tpt.create(x+math.random(-1,1), y+math.random(-1,1), "oxyg")
  72.             tpt.create(x+math.random(-1,1), y+math.random(-1,1), "hygn")
  73.             tpt.create(x+math.random(-1,1), y+math.random(-1,1), "neut")
  74.             tpt.set_property("vx", math.random(-35,35), i)
  75.             tpt.set_property("vy", math.random(-35,35), i)
  76.             tpt.set_property("life", 1000, i)
  77.         if math.abs(decayA) + math.abs(decayB) > 10 then
  78.         local decayC = math.random(1,4)
  79.             if decayC == 1 then
  80.             tpt.set_property("type", "hygn", i)
  81.             end
  82.             if decayC == 2 then
  83.             tpt.set_property("type", "phot", i)
  84.             end
  85.             if decayC == 3 then
  86.             tpt.set_property("type", "prot", i)
  87.             end
  88.             if decayC == 4 then
  89.             tpt.set_property("type", "neut", i)
  90.             end
  91.         end
  92.        end
  93.  
  94.             if sim.partProperty(r, "type") == elem.DEFAULT_PT_SPRK then
  95.                sim.partProperty(i, "type", elem.DEFAULT_PT_PLSM)
  96.                sim.partProperty(r, "type", elem.DEFAULT_PT_PLSM)
  97.                end
  98.             if sim.partProperty(r, "type") == elem.DEFAULT_PT_NEUT then
  99.                sim.partProperty(i, "type", hel)
  100.                sim.partProperty(r, "type", elem.DEFAULT_PT_HYGN)
  101.                end
  102.     end
  103.    end    
  104.  
  105. ------------------------------HALOGENS----------------------------------------------------------------------------------------------------
  106.  
  107. local fluor = elem.allocate("KEV", "F18")
  108. elem.element(elem.KEV_PT_F18, elem.element(elem.DEFAULT_PT_WTRV))
  109. elem.property(elem.KEV_PT_F18, "Name", "F-18")
  110. elem.property(elem.KEV_PT_F18, "Description", "Fluor 18. Explodes Easily, corrodes almost all. Burns in contact with HYGN.")
  111. elem.property(elem.KEV_PT_F18, "Color", 0xBCEE68)
  112. elem.property(elem.KEV_PT_F18, "Flammable", 1250)
  113. elem.property(elem.KEV_PT_F18, "Explosive", 3600)
  114. elem.property(elem.KEV_PT_F18, "Properties", elem.TYPE_GAS+elem.PROP_DEADLY)
  115. elem.property(elem.KEV_PT_F18, "Weight", 20)
  116. elem.property(elem.KEV_PT_F18, "HighTemperatureTransition", elem.DEFAULT_PT_PLSM)
  117. elem.property(elem.KEV_PT_F18, "HighTemperature", 673)
  118. elem.property(elem.KEV_PT_F18, "LowTemperatureTransition", elem.DEFAULT_PT_CFLM)
  119. elem.property(elem.KEV_PT_F18, "LowTemperature", 73)
  120.  
  121.     local function fUpdate(i, x, y, s, nt)
  122.     r = sim.partID(x+math.random(-1,1),y+math.random(-1,1))
  123.      if r~= nil then
  124.           if math.random(1, 1000) == 1 then
  125.             local decA = math.random(-20,20)
  126.             local decB = math.random(-20,0)
  127.             tpt.create(x+math.random(-1,1), y+math.random(-1,1), "neut")
  128.             tpt.create(x+math.random(-1,1), y+math.random(-1,1), "prot")
  129.             tpt.create(x+math.random(-1,1), y+math.random(-1,1), "neut")
  130.             tpt.set_property("vx", math.random(-25,25), i)
  131.             tpt.set_property("vy", math.random(-25,25), i)
  132.             tpt.set_property("life", 1000, i)
  133.                 tpt.set_property("life", 1, r)
  134.         if math.abs(decA) + math.abs(decB) > 10 then
  135.         local decC = math.random(1,4)
  136.             if decC == 1 then
  137.             tpt.set_property("type", "neut", i)
  138.             end
  139.             if decC == 2 then
  140.             tpt.set_property("type", "neut", i)
  141.             end
  142.             if decC == 3 then
  143.             tpt.set_property("type", "prot", i)
  144.             end
  145.             if decC == 4 then
  146.             tpt.set_property("type", "prot", i)
  147.             end
  148.         end
  149.        end
  150.             if sim.partProperty(r, "type") == elem.DEFAULT_PT_HYGN then
  151.                sim.partProperty(i, "type", elem.DEFAULT_PT_PLSM)
  152.                sim.partProperty(r, "type", elem.DEFAULT_PT_WTRV)
  153.                end
  154.             if sim.partProperty(r, "type") == elem.DEFAULT_PT_URAN then
  155.                sim.partProperty(i, "type", elem.KEV_PT_U235)
  156.                sim.partProperty(r, "type", elem.KEV_PT_U235)
  157.                end
  158.             if sim.partProperty(r, "type") == elem.DEFAULT_PT_OXYG then
  159.                sim.partProperty(i, "type", elem.DEFAULT_PT_PLSM)
  160.                sim.partProperty(r, "type", elem.DEFAULT_PT_CO2)
  161.                end
  162.             if sim.partProperty(r, "type") == elem.DEFAULT_PT_GLAS then
  163.                sim.partProperty(r, "type", elem.DEFAULT_PT_BGLA)
  164.                sim.partKill(i)
  165.                end
  166.             if sim.partProperty(r, "type") == elem.DEFAULT_PT_LCRY then
  167.                sim.partProperty(r, "type", elem.DEFAULT_PT_BGLA)
  168.                sim.partKill(i)
  169.                end
  170.             if sim.partProperty(r, "type") == elem.DEFAULT_PT_IRON then
  171.                sim.partProperty(r, "type", elem.DEFAULT_PT_BRMT)
  172.                sim.partKill(i)
  173.                end
  174.             if sim.partProperty(r, "type") == elem.DEFAULT_PT_COAL then
  175.                sim.partProperty(r, "type", elem.DEFAULT_PT_BCOL)
  176.                sim.partKill(i)
  177.                end
  178.             if sim.partProperty(r, "type") == elem.DEFAULT_PT_QRTZ then
  179.                sim.partProperty(r, "type", elem.DEFAULT_PT_BQRT)
  180.                sim.partKill(i)
  181.                end
  182.             if sim.partProperty(r, "type") == elem.DEFAULT_PT_BRCK then
  183.                sim.partProperty(r, "type", elem.DEFAULT_PT_STNE)
  184.                sim.partKill(i)
  185.                end
  186.             if sim.partProperty(r, "type") == elem.DEFAULT_PT_PSCN then
  187.                sim.partProperty(r, "type", elem.DEFAULT_PT_BREL)
  188.                sim.partKill(i)
  189.                end
  190.             if sim.partProperty(r, "type") == elem.DEFAULT_PT_NSCN then
  191.                sim.partProperty(r, "type", elem.DEFAULT_PT_BREL)
  192.                sim.partKill(i)
  193.                end
  194.      end
  195.     end    
  196.  
  197.  
  198. ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------
  199. ---------------------------------RADIOACTIVES-AND-EXPLOSIVES----------------------------------------------------------------------------------------------------------------------------------------
  200. local beryl = elem.allocate("KEV", "BRYL")
  201. local polon = elem.allocate("KEV", "PO84")
  202. local star = elem.allocate("KEV", "SLIT")
  203. local mox = elem.allocate("KEV", "MOX")
  204. local amer = elem.allocate("KEV", "AM")
  205. local thor = elem.allocate("KEV", "TH")
  206. local c137 = elem.allocate("KEV", "CS37")
  207. local radio = elem.allocate("KEV", "RA")
  208. local zircaloy= elem.allocate("KEV", "ZLOY")
  209. local uranoxid = elem.allocate("KEV", "UO2")
  210. local u235 = elem.allocate("KEV", "U235")
  211. elem.element(elem.KEV_PT_BRYL, elem.element(elem.DEFAULT_PT_PSCN))
  212. elem.element(elem.KEV_PT_PO84, elem.element(elem.DEFAULT_PT_PSCN))
  213. elem.element(elem.KEV_PT_SLIT, elem.element(elem.DEFAULT_PT_DMND))
  214. elem.element(elem.KEV_PT_MOX, elem.element(elem.DEFAULT_PT_PLUT))
  215. elem.element(amer, elem.element(elem.DEFAULT_PT_URAN))
  216. elem.element(elem.KEV_PT_TH, elem.element(elem.DEFAULT_PT_PLUT))
  217. elem.element(c137, elem.element(elem.DEFAULT_PT_VIBR))
  218. elem.element(radio, elem.element(elem.DEFAULT_PT_PLUT))
  219. elem.element(elem.KEV_PT_ZLOY, elem.element(elem.DEFAULT_PT_IRON))
  220. elem.element(elem.KEV_PT_UO2, elem.element(elem.DEFAULT_PT_URAN))
  221. elem.element(elem.KEV_PT_U235, elem.element(elem.DEFAULT_PT_PLUT))
  222. elem.property(elem.KEV_PT_BRYL, "Name", "BRYL")
  223. elem.property(elem.KEV_PT_PO84, "Name", "PO84")
  224. elem.property(elem.KEV_PT_SLIT, "Name", "SLIT")
  225. elem.property(elem.KEV_PT_MOX, "Name", "MOX")
  226. elem.property(amer, "Name", "AM")
  227. elem.property(elem.KEV_PT_TH, "Name", "TH")
  228. elem.property(c137, "Name", "CS37")
  229. elem.property(radio, "Name", "RA")
  230. elem.property(elem.KEV_PT_UO2, "Name", "UO2")
  231. elem.property(elem.KEV_PT_ZLOY, "Name", "ZLOY")
  232. elem.property(elem.KEV_PT_U235, "Name", "U235")
  233. elem.property(elem.KEV_PT_BRYL, "Description", "Beryllium. Transforms NEUT into PROT, releases air pressure when SPRK pass through.")
  234. elem.property(elem.KEV_PT_PO84, "Description", "Polonium. Emits NEUT when is mixed with BRYL and sparked.")
  235. elem.property(elem.KEV_PT_SLIT, "Description", "Starlite. Super Material. The best insulator ever made. Resists the maximum amount of heat possible.")
  236. elem.property(elem.KEV_PT_MOX, "Description", "Mixed Oxide Nuclear Combustible. A mix of PLUT and UO2. Fisible.")
  237. elem.property(amer, "Description", "Americium. Radioactive, Emits too much radiation. Fisible under pressure.")
  238. elem.property(elem.KEV_PT_TH, "Description", "Thorium. Radioactive, When Descomposes transforms in URAN, burns when PROT touch it.")
  239. elem.property(c137, "Description", "Caesium 137. Radioactive, when decays it produce Be and Xe.")
  240. elem.property(radio, "Description", "Radium. Radioactive, When Descomposes transforms in Rn, when touches Be emits neutrons.")
  241. elem.property(elem.KEV_PT_ZLOY, "Description", "Zircaloy 4. Absorbs neutrons, resists high temperatures and its used as a cladding of nuclear cells.")
  242. elem.property(elem.KEV_PT_UO2, "Description", "Uranium Oxide. Radioactive and fissible.")
  243. elem.property(elem.KEV_PT_U235, "Description", "Uranium 235. Fisible, used in Nuclear Reactors mixed with U238.")
  244. elem.property(elem.KEV_PT_BRYL, "Color", 0x8B7D7B)
  245. elem.property(elem.KEV_PT_PO84, "Color", 0xEEE0E5)
  246. elem.property(elem.KEV_PT_SLIT, "Color", 0xF5F5DC)
  247. elem.property(elem.KEV_PT_ZLOY, "Color", 0x4A708B)
  248. elem.property(elem.KEV_PT_MOX, "Color", 0x6B8E23)
  249. elem.property(amer, "Color", 0x636363)
  250. elem.property(elem.KEV_PT_TH, "Color", 0x8B7500)
  251. elem.property(c137, "Color", 0x6C7B8B)
  252. elem.property(radio, "Color", 0x33A1C9)
  253. elem.property(elem.KEV_PT_UO2, "Color", 0xFFFF00)
  254. elem.property(elem.KEV_PT_U235, "Color", 0xCDCD00)
  255. elem.property(elem.KEV_PT_MOX, "Flammable", 0)
  256. elem.property(amer, "Flammable", 0)
  257. elem.property(elem.KEV_PT_TH, "Flammable", 0)
  258. elem.property(c137, "Flammable", 0)
  259. elem.property(radio, "Flammable", 1.88)
  260. elem.property(elem.KEV_PT_UO2, "Flammable", 0)
  261. elem.property(elem.KEV_PT_MOX, "Explosive", 960)
  262. elem.property(amer, "Explosive", 0)
  263. elem.property(elem.KEV_PT_TH, "Explosive", 0)
  264. elem.property(c137, "Explosive", 0)
  265. elem.property(radio, "Explosive", 138)
  266. elem.property(elem.KEV_PT_UO2, "Explosive", 16)
  267. elem.property(elem.KEV_PT_BRYL, "Properties", elem.TYPE_SOLID+elem.PROP_DEADLY+elem.PROP_HOT_GLOW+elem.PROP_LIFE_DEC+elem.PROP_CONDUCTS)
  268. elem.property(elem.KEV_PT_PO84, "Properties", elem.TYPE_SOLID+elem.PROP_DEADLY+elem.PROP_HOT_GLOW+elem.PROP_LIFE_DEC+elem.PROP_CONDUCTS)
  269. elem.property(elem.KEV_PT_SLIT, "Properties", elem.TYPE_SOLID+elem.PROP_NEUTPASS)
  270. elem.property(elem.KEV_PT_MOX, "Properties", elem.TYPE_PART+elem.PROP_DEADLY+elem.PROP_RADIOACTIVE+elem.PROP_NEUTPASS+elem.PROP_NEUTPENETRATE)
  271. elem.property(amer, "Properties", elem.TYPE_PART+elem.PROP_DEADLY+elem.PROP_RADIOACTIVE+elem.PROP_NEUTPASS)
  272. elem.property(elem.KEV_PT_ZLOY, "Properties", elem.TYPE_SOLID+elem.PROP_NEUTABSORB+elem.PROP_HOT_GLOW+elem.PROP_LIFE_DEC+elem.PROP_CONDUCTS)
  273. elem.property(elem.KEV_PT_TH, "Properties", elem.TYPE_PART+elem.PROP_DEADLY+elem.PROP_NEUTPASS+elem.PROP_RADIOACTIVE+elem.PROP_HOT_GLOW+elem.PROP_LIFE_DEC+elem.PROP_CONDUCTS)
  274. elem.property(c137, "Properties", elem.TYPE_SOLID+elem.PROP_DEADLY+elem.PROP_RADIOACTIVE+elem.PROP_HOT_GLOW)
  275. elem.property(radio, "Properties", elem.TYPE_PART+elem.PROP_DEADLY+elem.PROP_RADIOACTIVE+elem.PROP_NEUTPASS)
  276. elem.property(elem.KEV_PT_UO2, "Properties", elem.TYPE_PART+elem.PROP_DEADLY+elem.PROP_RADIOACTIVE+elem.PROP_NEUTPASS)
  277. elem.property(elem.KEV_PT_U235, "Properties", elem.TYPE_PART+elem.PROP_DEADLY+elem.PROP_RADIOACTIVE+elem.PROP_NEUTPASS)
  278. elem.property(elem.KEV_PT_BRYL, "Weight", 125.07)
  279. elem.property(elem.KEV_PT_PO84  , "Weight", 185.07)
  280. elem.property(elem.KEV_PT_SLIT, "Weight", 98.65)
  281. elem.property(elem.KEV_PT_MOX, "Weight", 45.44)
  282. elem.property(amer, "Weight", 23.98)
  283. elem.property(elem.KEV_PT_TH, "Weight", 32.03)
  284. elem.property(c137, "Weight", 37.09)
  285. elem.property(radio, "Weight", 26.02)
  286. elem.property(elem.KEV_PT_UO2, "Weight", 38.02)
  287. elem.property(elem.KEV_PT_U235, "Weight", 58.02)
  288. elem.property(elem.KEV_PT_ZLOY, "MenuSection", SC_NUCLEAR)
  289. elem.property(elem.KEV_PT_BRYL, "MenuSection", SC_NUCLEAR)
  290. elem.property(elem.KEV_PT_MOX, "MenuSection", SC_NUCLEAR)
  291. elem.property(amer, "MenuSection", SC_NUCLEAR)
  292. elem.property(elem.KEV_PT_TH, "MenuSection", SC_NUCLEAR)
  293. elem.property(c137, "MenuSection", SC_NUCLEAR)
  294. elem.property(radio, "MenuSection", SC_NUCLEAR)
  295. elem.property(elem.KEV_PT_UO2, "MenuSection", SC_NUCLEAR)
  296. elem.property(elem.KEV_PT_TH, "HighTemperature", 1853.15)
  297. elem.property(elem.KEV_PT_TH, "HighTemperatureTransition", elem.DEFAULT_PT_URAN)
  298. elem.property(elem.KEV_PT_ZLOY, "HighTemperature", 6500.15)
  299. elem.property(elem.KEV_PT_ZLOY, "HighTemperatureTransition", elem.DEFAULT_PT_LAVA)
  300. elem.property(elem.KEV_PT_PO84, "HighTemperature", 1960.15)
  301. elem.property(elem.KEV_PT_PO84, "HighTemperatureTransition", elem.DEFAULT_PT_LAVA)
  302. elem.property(elem.KEV_PT_MOX, "Loss", 0.15)
  303. elem.property(amer, "Loss", 0.32)
  304. elem.property(elem.KEV_PT_TH, "Loss", 0.16)
  305. elem.property(c137, "Loss", 0.12)
  306. elem.property(radio, "Loss", 0.24)
  307. elem.property(elem.KEV_PT_U235, "Loss", 0.11)
  308. elem.property(elem.KEV_PT_UO2, "Loss", 0.12)
  309. elem.property(elem.KEV_PT_MOX, "AirLoss", 0.25)
  310. elem.property(amer, "AirLoss", 0.23)
  311. elem.property(elem.KEV_PT_TH, "AirLoss", 0.19)
  312. elem.property(c137, "AirLoss", 0.17)
  313. elem.property(radio, "AirLoss", 0.15)
  314. elem.property(elem.KEV_PT_UO2, "AirLoss", 0.19)
  315. elem.property(elem.KEV_PT_U235, "AirLoss", 0.09)
  316. elem.property(thor, "AirDrag", 0.12)
  317. elem.property(c137, "AirDrag", 0.02)
  318. elem.property(radio, "AirDrag", 0.22)
  319. elem.property(elem.KEV_PT_UO2, "AirDrag", 0.12)
  320. elem.property(elem.KEV_PT_U235, "AirDrag", 0.20)
  321. elem.property(thor, "Advection", 0.5)
  322. elem.property(c137, "Advection", 0.15)
  323. elem.property(radio, "Advection", 0.1)
  324. elem.property(elem.KEV_PT_UO2, "Advection", 1.5)
  325. elem.property(elem.KEV_PT_U235, "Advection", 1.3)
  326. elem.property(elem.KEV_PT_TH, "Hardness", 13.55)
  327. elem.property(c137, "Hardness", 16.78)
  328. elem.property(radio, "Hardness", 17.96)
  329. elem.property(elem.KEV_PT_SLIT, "Hardness", 155.00)
  330. elem.property(elem.KEV_PT_UO2, "Hardness", 18.5)
  331. elem.property(elem.KEV_PT_U235, "Hardness", 125.5)
  332. elem.property(elem.KEV_PT_ZLOY, "Hardness", 155.5)
  333. elem.property(elem.KEV_PT_PO84, "Hardness", 115.5)
  334. elem.property(elem.KEV_PT_SLIT, "HeatConduct", 0.1)
  335. elem.property(elem.KEV_PT_ZLOY, "HeatConduct", 54)
  336.    
  337. local function beUpdate(i, x, y, s, nt)
  338.     r = sim.partID(x+math.random(-1,1),y+math.random(-1,1))
  339.      if r~= nil then
  340.              if sim.partProperty(r, "type") == elem.DEFAULT_PT_NEUT then
  341.                 sim.partProperty(i, "type", elem.KEV_PT_BRYL)
  342.                 sim.partProperty(r, "type", elem.DEFAULT_PT_PROT)
  343.                 end
  344.              if sim.partProperty(r, "type") == elem.DEFAULT_PT_PHOT then
  345.                 sim.partProperty(i, "type", elem.KEV_PT_BRYL)
  346.                 sim.partProperty(r, "type", elem.DEFAULT_PT_HYGN)
  347.                 end              
  348.              if sim.partProperty(r, "type") == elem.DEFAULT_PT_SPRK then
  349.                 sim.pressure(x/4,y/4,15)
  350.                 sim.partProperty(i, "type", elem.KEV_PT_BRYL)
  351.                 end  
  352.              if sim.partProperty(r, "ctype") == elem.KEV_PT_PO84 and sim.partProperty(r, "type") == elem.DEFAULT_PT_SPRK then
  353.                 sim.pressure(x/4,y/4,45)
  354.                 sim.partProperty(i, "type", elem.KEV_PT_BRYL)
  355.                 end
  356.              if sim.partProperty(r, "ctype") == elem.KEV_PT_ZLOY and sim.partProperty(r, "type") == elem.DEFAULT_PT_SPRK then
  357.                 sim.pressure(x/4,y/4,85)
  358.                 sim.partProperty(i, "type", elem.KEV_PT_BRYL)
  359.                 end
  360.      end
  361.     end  
  362.  
  363. local function po84Update(i, x, y, s, nt)
  364.     r = sim.partID(x+math.random(-1,1),y+math.random(-1,1))
  365.      if r~= nil then
  366.              if sim.partProperty(r, "ctype") == elem.KEV_PT_BRYL and sim.partProperty(r, "type") == elem.DEFAULT_PT_SPRK then
  367.                 tpt.create(x+math.random(-1,1), y+math.random(-1,1), "neut")
  368.             tpt.create(x+math.random(-1,1), y+math.random(-1,1), "neut")
  369.             tpt.create(x+math.random(-1,1), y+math.random(-1,1), "neut")
  370.                 end
  371.              if math.random(1, 10000) == 1 then
  372.             tpt.create(x+math.random(-1,1), y+math.random(-1,1), "phot")
  373.             tpt.set_property("vx", math.random(-2,2), i)
  374.             tpt.set_property("vy", math.random(-2,2), i)
  375.             tpt.set_property("life", 60000, i)
  376.         end
  377.      end
  378.     end
  379.  
  380.  
  381.     local function uo2Update(i, x, y, s, nt)
  382.     r = sim.partID(x+math.random(-1,1),y+math.random(-1,1))
  383.      if r~= nil then
  384.              if math.random(1, 10000) == 1 then
  385.             tpt.create(x+math.random(-1,1), y+math.random(-1,1), "phot")
  386.             tpt.set_property("vx", math.random(-2,2), i)
  387.             tpt.set_property("vy", math.random(-2,2), i)
  388.             tpt.set_property("life", 60000, i)
  389.         end
  390.              if sim.partProperty(r, "type") == elem.DEFAULT_PT_NEUT and math.random(1,16) == 1 then
  391.                 sim.partProperty(i, "type", elem.DEFAULT_PT_NEUT)
  392.                 sim.partProperty(r, "type", elem.DEFAULT_PT_URAN)
  393.                 tpt.create(x+math.random(-1,1), y+math.random(-1,1), "neut")
  394.             tpt.create(x+math.random(-1,1), y+math.random(-1,1), "neut")
  395.                 tpt.create(x+math.random(-1,1), y+math.random(-1,1), "neut")
  396.                 tpt.create(x+math.random(-1,1), y+math.random(-1,1), "uran")
  397.             tpt.set_property("vx", math.random(-2,2), i)
  398.             tpt.set_property("vy", math.random(-2,2), i)
  399.                 tpt.set_property("life", 10, i)
  400.                 sim.pressure(x/4,y/4,15)
  401.                 tpt.set_property("temp", 4999, x, y)
  402.                 end
  403.  
  404.              if sim.partProperty(r, "type") == elem.KEV_PT_F18 then
  405.                 sim.partProperty(i, "type", elem.DEFAULT_PT_URAN)
  406.                 sim.partProperty(r, "type", elem.KEV_PT_U235)
  407.                 end
  408.              if sim.partProperty(r, "type") == elem.DEFAULT_PT_PLUT then
  409.                 sim.partProperty(i, "type", elem.KEV_PT_MOX)
  410.                 sim.partProperty(r, "type", elem.KEV_PT_MOX)
  411.                 end
  412.              if sim.partProperty(r, "type") == elem.DEFAULT_PT_NEUT and math.random(1,600) == 1 then
  413.                 sim.partProperty(i, "type", elem.KEV_PT_U235)
  414.                 sim.partProperty(r, "type", elem.KEV_PT_TH)
  415.                 end
  416.              if sim.partProperty(r, "type") == elem.KEV_PT_H2SO4 and math.random(1,3) == 1 then
  417.                 sim.partProperty(i, "type", elem.KEV_PT_U235)
  418.                 sim.partProperty(r, "type", elem.KEV_PT_TH)
  419.                 end
  420.      end
  421.     end
  422.  
  423.    
  424.    
  425.     local function thUpdate(i, x, y, s, nt)
  426.     r = sim.partID(x+math.random(-1,1),y+math.random(-1,1))
  427.      if r~= nil then
  428.              if math.random(1, 1000) == 1 then
  429.             local decA = math.random(-20,20)
  430.             local decB = math.random(-20,0)
  431.             tpt.create(x+math.random(-1,1), y+math.random(-1,1), "oxyg")
  432.             tpt.create(x+math.random(-1,1), y+math.random(-1,1), "hygn")
  433.             tpt.create(x+math.random(-1,1), y+math.random(-1,1), "plut")
  434.             tpt.set_property("vx", math.random(-25,25), i)
  435.             tpt.set_property("vy", math.random(-25,25), i)
  436.             tpt.set_property("life", 10000, i)
  437.         if math.abs(decA) + math.abs(decB) > 10 then
  438.         local decC = math.random(1,4)
  439.             if decC == 1 then
  440.             tpt.set_property("type", "phot", i)
  441.             end
  442.             if decC == 2 then
  443.             tpt.set_property("type", "phot", i)
  444.             end
  445.             if decC == 3 then
  446.             tpt.set_property("type", "prot", i)
  447.             end
  448.             if decC == 4 then
  449.             tpt.set_property("type", "prot", i)
  450.             end
  451.         end
  452.        end
  453.              if sim.partProperty(r, "type") == elem.DEFAULT_PT_NEUT then
  454.             tpt.create(x+math.random(-1,1), y+math.random(-1,1), "neut")
  455.             tpt.create(x+math.random(-1,1), y+math.random(-1,1), "neut")
  456.             tpt.create(x+math.random(-1,1), y+math.random(-1,1), "neut")
  457.                 tpt.create(x+math.random(-1,1), y+math.random(-1,1), "neut")
  458.                 tpt.create(x+math.random(-1,1), y+math.random(-1,1), "neut")
  459.                 tpt.set_property("life", 10000, i)
  460.                 sim.pressure(x/4,y/4,85)
  461.                 tpt.set_property("temp", math.huge, x, y)
  462.                 end
  463.              if sim.partProperty(r, "type") == elem.DEFAULT_PT_WATR then
  464.                 sim.partProperty(i, "type", elem.DEFAULT_PT_DEUT)
  465.                 sim.partProperty(r, "type", elem.DEFAULT_PT_URAN)
  466.                 end
  467.              if sim.partProperty(r, "type") == sulfacid then
  468.                 sim.partProperty(i, "type", sulfoxid)
  469.                 sim.partProperty(r, "type", elem.DEFAULT_PT_URAN)
  470.                 end
  471.              if sim.partProperty(r, "type") == elem.DEFAULT_PT_NEUT then
  472.                 sim.partProperty(i, "ctype", elem.DEFAULT_PT_NEUT)
  473.                 sim.partProperty(r, "ctype", elem.DEFAULT_PT_PROT)
  474.                 end  
  475.              if sim.partProperty(r, "type") == elem.DEFAULT_PT_THDR then
  476.                 sim.partProperty(i, "type", hel)
  477.                 sim.partProperty(r, "type", elem.DEFAULT_PT_URAN)
  478.                 end        
  479.              if sim.partProperty(r, "type") == elem.DEFAULT_PT_DEST then
  480.                 sim.partProperty(i, "type", elem.DEFAULT_PT_URAN)
  481.                 sim.partKill(i)
  482.                 end
  483.      end
  484.     end
  485.  
  486.     local function raUpdate(i, x, y, s, nt)
  487.     r = sim.partID(x+math.random(-1,1),y+math.random(-1,1))
  488.      if r~= nil then
  489.              if math.random(1, 10000) == 1 then
  490.             local descompA = math.random(-20,20)
  491.             local descompB = math.random(-20,0)
  492.             tpt.create(x+math.random(-1,1), y+math.random(-1,1), "oxyg")
  493.             tpt.create(x+math.random(-1,1), y+math.random(-1,1), "hygn")
  494.             tpt.create(x+math.random(-1,1), y+math.random(-1,1), "prot")
  495.             tpt.set_property("vx", math.random(-15,15), i)
  496.             tpt.set_property("vy", math.random(-15,15), i)
  497.             tpt.set_property("life", 100500, i)
  498.         if math.abs(descompA) + math.abs(descompB) > 10 then
  499.         local r3 = math.random(1,4)
  500.             if descompC == 1 then
  501.             tpt.set_property("type", "elec", i)
  502.             end
  503.             if descompC == 2 then
  504.             tpt.set_property("type", "phot", i)
  505.             end
  506.             if descompC == 3 then
  507.             tpt.set_property("type", "prot", i)
  508.             end
  509.             if descompC == 4 then
  510.             tpt.set_property("type", "neut", i)
  511.             end
  512.         end
  513.        end
  514.              
  515.              if sim.partProperty(r, "type") == elem.DEFAULT_PT_HYGN then
  516.                 sim.partProperty(i, "type", rad)
  517.                 sim.partProperty(r, "type", hel)
  518.                 end
  519.              if sim.partProperty(r, "type") == elem.DEFAULT_PT_WATR then
  520.                 sim.partProperty(i, "type", rad)
  521.                 sim.partProperty(r, "type", elem.DEFAULT_PT_WTRV)
  522.                 end
  523.              if sim.partProperty(r, "type") == elem.DEFAULT_PT_THDR then
  524.                 sim.partProperty(i, "type", hel)
  525.                 sim.partProperty(r, "type", rad)
  526.                 end        
  527.              if sim.partProperty(r, "type") == elem.DEFAULT_PT_DEST then
  528.                 sim.partProperty(i, "type", elem.DEFAULT_PT_URAN)
  529.                 sim.partKill(i)
  530.                 end
  531.              if sim.partProperty(r, "type") == elem.DEFAULT_PT_PLUT then
  532.                 sim.partProperty(r, "type", elem.DEFAULT_PT_URAN)
  533.                 sim.partKill(i)
  534.                 end
  535.              if sim.partProperty(r, "type") == elem.KEV_PT_BRYL and math.random(1,3600) == 1 then
  536.                 sim.partProperty(i, "type", elem.DEFAULT_PT_NEUT)
  537.                 sim.partProperty(r, "type", elem.KEV_PT_BEO)
  538.                 end
  539.              if sim.partProperty(r, "type") == elem.KEV_PT_BRYL then
  540.             tpt.create(x+math.random(-1,1), y+math.random(-1,1), "neut")
  541.             tpt.create(x+math.random(-1,1), y+math.random(-1,1), "hygn")
  542.             tpt.create(x+math.random(-1,1), y+math.random(-1,1), "neut")
  543.                 end
  544.      end
  545.     end
  546.  
  547.     local function cs137Update(i, x, y, s, nt)
  548.     r = sim.partID(x+math.random(-1,1),y+math.random(-1,1))
  549.      if r~= nil then
  550.              if math.random(1, 1000) == 1 then
  551.             local r = math.random(-60,60)
  552.             local r2 = math.random(-60,0)
  553.                 tpt.set_property("temp", 2273, r)
  554.             tpt.create(x+math.random(-1,1), y+math.random(-1,1), "elec")
  555.             tpt.create(x+math.random(-1,1), y+math.random(-1,1), "elec")
  556.             tpt.create(x+math.random(-1,1), y+math.random(-1,1), "prot")
  557.             tpt.set_property("vx", math.random(-15,15), i)
  558.             tpt.set_property("vy", math.random(-15,15), i)
  559.             tpt.set_property("life", 100000, i)
  560.         if math.abs(r) + math.abs(r2) > 10 then
  561.         local r3 = math.random(1,4)
  562.             if r3 == 1 then
  563.             tpt.set_property("type", "phot", i)
  564.             end
  565.             if r3 == 2 then
  566.             tpt.set_property("type", "bryl", i)
  567.             end
  568.                         if r3 == 4 then
  569.             tpt.set_property("type", "elec", i)
  570.             end
  571.             if r3 == 3 then
  572.             tpt.set_property("type", "prot", i)
  573.             end
  574.         end
  575.        end
  576.              
  577.              if sim.partProperty(r, "type") == elem.DEFAULT_PT_WATR then
  578.                 sim.pressure(x/4,y/4,90)
  579.                 tpt.create(x+math.random(-1,1), y+math.random(-1,1), "smke")
  580.             tpt.create(x+math.random(-1,1), y+math.random(-1,1), "smke")
  581.             tpt.create(x+math.random(-5,1), y+math.random(-1,5), "fire")
  582.                 tpt.create(x+math.random(-1,1), y+math.random(-1,1), "fire")
  583.             tpt.create(x+math.random(-1,1), y+math.random(-1,1), "fire")
  584.             tpt.create(x+math.random(-1,1), y+math.random(-1,1), "fire")
  585.                 tpt.set_property("temp", math.huge, x, y)
  586.                 sim.partProperty(i, "type", elem.DEFAULT_PT_EMBR)
  587.                 tpt.set_property("life", 100000, i)
  588.                 sim.partProperty(r, "type", elem.DEFAULT_PT_SMKE)
  589.                 end
  590.              if sim.partProperty(r, "type") == elem.DEFAULT_PT_SLTW then
  591.                 sim.pressure(x/4,y/4,90)
  592.                 tpt.create(x+math.random(-1,1), y+math.random(-1,1), "smke")
  593.             tpt.create(x+math.random(-1,1), y+math.random(-1,1), "smke")
  594.             tpt.create(x+math.random(-5,1), y+math.random(-1,5), "fire")
  595.                 tpt.create(x+math.random(-1,1), y+math.random(-1,1), "fire")
  596.             tpt.create(x+math.random(-1,1), y+math.random(-1,1), "fire")
  597.             tpt.create(x+math.random(-1,1), y+math.random(-1,1), "fire")
  598.                 tpt.set_property("temp", math.huge, x, y)
  599.                 sim.partProperty(i, "type", elem.DEFAULT_PT_EMBR)
  600.                 tpt.set_property("life", 100000, i)
  601.                 sim.partProperty(r, "type", elem.DEFAULT_PT_SMKE)
  602.                 end
  603.              if sim.partProperty(r, "type") == elem.DEFAULT_PT_DSTW then
  604.                 sim.pressure(x/4,y/4,95)
  605.                 sim.partProperty(i, "type", elem.DEFAULT_PT_EMBR)
  606.                 sim.partProperty(r, "type", elem.DEFAULT_PT_SMKE)
  607.                 end
  608.              if sim.partProperty(r, "type") == elem.DEFAULT_PT_NEUT then
  609.                 sim.partProperty(i, "type", xen)
  610.                 sim.partProperty(r, "ctype", elem.DEFAULT_PT_URAN)
  611.                 end  
  612.              if sim.partProperty(r, "type") == elem.DEFAULT_PT_THDR then
  613.                 sim.partProperty(i, "type", hel)
  614.                 sim.partProperty(r, "type", xen)
  615.                 end        
  616.              if sim.partProperty(r, "type") == elem.DEFAULT_PT_DEST then
  617.                 sim.partProperty(i, "type", elem.DEFAULT_PT_URAN)
  618.                 sim.partKill(i)
  619.                 end
  620.              if sim.partProperty(r, "type") == elem.DEFAULT_PT_PLUT then
  621.                 sim.partProperty(r, "type", elem.DEFAULT_PT_EXOT)
  622.                 sim.partKill(i)
  623.                 end
  624.              if sim.partProperty(r, "type") == elem.DEFAULT_PT_GOLD then
  625.                 sim.partProperty(r, "type", elem.DEFAULT_PT_PHOT)
  626.                 sim.partKill(i)
  627.                 end
  628.              if sim.partProperty(r, "type") == elem.DEFAULT_PT_PROT then
  629.                 sim.partProperty(i, "type", xen)
  630.                 sim.partKill(r)
  631.                 end  
  632.              if sim.partProperty(r, "type") == elem.DEFAULT_PT_EXOT then
  633.                 sim.partProperty(i, "type", elem.DEFAULT_PT_BVBR)
  634.                 sim.partProperty(r, "type", elem.DEFAULT_PT_BVBR)
  635.                 end
  636.      end
  637.     end
  638.  
  639.  
  640.     local function amUpdate(i, x, y, s, nt)
  641.     r = sim.partID(x+math.random(-1,1),y+math.random(-1,1))
  642.      if r~= nil then
  643.              if math.random(1, 1000) == 1 then
  644.             local descompA = math.random(-20,20)
  645.             local descompB = math.random(-20,0)
  646.                 local descompC = math.random(-25,25)
  647.             tpt.create(x+math.random(-1,1), y+math.random(-1,1), "plut")
  648.             tpt.create(x+math.random(-1,1), y+math.random(-1,1), "neut")
  649.             tpt.create(x+math.random(-1,1), y+math.random(-1,1), "neut")
  650.                 tpt.create(x+math.random(-1,1), y+math.random(-1,1), "neut")
  651.                 tpt.create(x+math.random(-1,1), y+math.random(-1,1), "hygn")
  652.                 tpt.create(x+math.random(-1,1), y+math.random(-1,1), "oxyg")
  653.                 tpt.create(x+math.random(-1,1), y+math.random(-1,1), "neut")
  654.                 tpt.create(x+math.random(-1,1), y+math.random(-1,1), "prot")
  655.                 tpt.create(x+math.random(-1,1), y+math.random(-1,1), "prot")
  656.                 tpt.create(x+math.random(-1,1), y+math.random(-1,1), "prot")
  657.                 tpt.create(x+math.random(-1,1), y+math.random(-1,1), "phot")
  658.                 tpt.create(x+math.random(-1,1), y+math.random(-1,1), "phot")
  659.                 tpt.create(x+math.random(-1,1), y+math.random(-1,1), "phot")
  660.             tpt.set_property("vx", math.random(-15,15), i)
  661.             tpt.set_property("vy", math.random(-15,15), i)
  662.             tpt.set_property("life", 100, i)
  663.         if math.abs(descompA) + math.abs(descompB) > 10 then
  664.         local r3 = math.random(1,4)
  665.             if descompC == 20 then
  666.             tpt.set_property("type", "elec", i)
  667.             end
  668.             if descompC == 21 then
  669.             tpt.set_property("type", "neut", i)
  670.             end
  671.             if descompC == 23 then
  672.             tpt.set_property("type", "neut", i)
  673.             end
  674.             if descompC == 24 then
  675.             tpt.set_property("type", "prot", i)
  676.             end
  677.         end
  678.        end
  679.              
  680.              if sim.pressure(x/4, y/4) >= 49.98 then
  681.                 sim.partProperty(i, "type", elem.DEFAULT_PT_NEUT)
  682.                 sim.partProperty(r, "type", elem.DEFAULT_PT_PLUT)
  683.                 tpt.create(x+math.random(-1,1), y+math.random(-1,1), "plut")
  684.             tpt.create(x+math.random(-1,1), y+math.random(-1,1), "neut")
  685.                 tpt.create(x+math.random(-1,1), y+math.random(-1,1), "plut")
  686.             tpt.set_property("vx", math.random(-2,2), i)
  687.             tpt.set_property("vy", math.random(-2,2), i)
  688.                 tpt.set_property("life", 10, i)
  689.                 sim.pressure(x/4,y/4,25)
  690.                 tpt.set_property("temp", math.huge, x, y)
  691.                 end
  692.    
  693.              if sim.partProperty(r, "type") == elem.DEFAULT_PT_WATR then
  694.                 sim.partProperty(i, "type", thor)
  695.                 sim.partProperty(r, "type", elem.DEFAULT_PT_CAUS)
  696.                 end
  697.              if sim.partProperty(r, "type") == elem.DEFAULT_PT_LN2 then
  698.                 sim.partProperty(i, "type", nitg)
  699.                 sim.partProperty(r, "type", elem.DEFAULT_PT_PLUT)
  700.                 end
  701.              if sim.partProperty(r, "type") == elem.DEFAULT_PT_NEUT then
  702.                 sim.partProperty(i, "type", hel)
  703.                 sim.partProperty(r, "type", rad)
  704.                 end  
  705.              if sim.partProperty(r, "type") == elem.DEFAULT_PT_THDR then
  706.                 sim.partProperty(i, "type", hel)
  707.                 sim.partProperty(r, "type", palad)
  708.                 end        
  709.              if sim.partProperty(r, "type") == elem.DEFAULT_PT_DEST then
  710.                 sim.partProperty(i, "type", elem.DEFAULT_PT_URAN)
  711.                 sim.partKill(i)
  712.                 end
  713.              if sim.partProperty(r, "type") == radio then
  714.                 sim.partProperty(r, "type", elem.DEFAULT_PT_URAN)
  715.                 sim.partKill(i)
  716.                 end  
  717.      end
  718.     end
  719.  
  720.     local function u235Update(i, x, y, s, nt)
  721.     r = sim.partID(x+math.random(-1,1),y+math.random(-1,1))
  722.      if r~= nil then
  723.               if math.random(1, 1000) == 1 then
  724.             tpt.create(x+math.random(-1,1), y+math.random(-1,1), "hygn")
  725.             tpt.set_property("vx", math.random(-2,2), i)
  726.             tpt.set_property("vy", math.random(-2,2), i)
  727.             tpt.set_property("life", 12000, i)
  728.         end
  729.  
  730.              if sim.partProperty(r, "type") == elem.DEFAULT_PT_NEUT and math.random(1,9) == 1 then
  731.                 sim.partProperty(i, "type", elem.DEFAULT_PT_NEUT)
  732.                 sim.partProperty(r, "type", elem.DEFAULT_PT_PLUT)
  733.                 tpt.create(x+math.random(-1,1), y+math.random(-1,1), "neut")
  734.             tpt.create(x+math.random(-1,1), y+math.random(-1,1), "neut")
  735.                 tpt.create(x+math.random(-1,1), y+math.random(-1,1), "neut")
  736.                 tpt.create(x+math.random(-1,1), y+math.random(-1,1), "plut")
  737.             tpt.set_property("vx", math.random(-2,2), i)
  738.             tpt.set_property("vy", math.random(-2,2), i)
  739.                 tpt.set_property("life", 10, i)
  740.                 sim.pressure(x/4,y/4,25)
  741.                 tpt.set_property("temp", 7999, x, y)
  742.                 end  
  743.  
  744.              if sim.pressure(x/4, y/4) >= 20.30 then
  745.                 sim.partProperty(i, "type", elem.DEFAULT_PT_NEUT)
  746.                 sim.partProperty(i, "type", elem.DEFAULT_PT_NEUT)
  747.                 sim.partProperty(r, "type", elem.DEFAULT_PT_PLUT)
  748.                 tpt.create(x+math.random(-1,1), y+math.random(-1,1), "neut")
  749.             tpt.create(x+math.random(-1,1), y+math.random(-1,1), "neut")
  750.                 tpt.create(x+math.random(-1,1), y+math.random(-1,1), "plut")
  751.             tpt.set_property("vx", math.random(-2,2), i)
  752.             tpt.set_property("vy", math.random(-2,2), i)
  753.                 tpt.set_property("life", 10, i)
  754.                 sim.pressure(x/4,y/4,25)
  755.                 tpt.set_property("temp", 7999, x, y)
  756.                 end  
  757.      end
  758.     end
  759.  
  760.     local function moxUpdate(i, x, y, s, nt)
  761.     r = sim.partID(x+math.random(-1,1),y+math.random(-1,1))
  762.      if r~= nil then
  763.              if math.random(1, 1000) == 1 then
  764.             tpt.create(x+math.random(-1,1), y+math.random(-1,1), "th")
  765.             tpt.create(x+math.random(-1,1), y+math.random(-1,1), "uran")
  766.             tpt.set_property("vx", math.random(-2,2), i)
  767.             tpt.set_property("vy", math.random(-2,2), i)
  768.             tpt.set_property("life", 300000, i)
  769.         end
  770.  
  771.              if sim.partProperty(r, "type") == elem.DEFAULT_PT_NEUT then
  772.                 sim.partProperty(i, "type", elem.DEFAULT_PT_NEUT)
  773.                 sim.partProperty(r, "type", amer)
  774.                 tpt.create(x+math.random(-1,1), y+math.random(-1,1), "neut")
  775.             tpt.create(x+math.random(-1,1), y+math.random(-1,1), "plut")
  776.                 tpt.create(x+math.random(-1,1), y+math.random(-1,1), "plut")
  777.             tpt.set_property("vx", math.random(-2,2), i)
  778.             tpt.set_property("vy", math.random(-2,2), i)
  779.                 tpt.set_property("life", 10, i)
  780.                 sim.pressure(x/4,y/4,25)
  781.                 tpt.set_property("temp", 7999, x, y)
  782.                 end  
  783.  
  784.              if sim.pressure(x/4, y/4) >= 10.10 then
  785.                 sim.partProperty(i, "type", elem.DEFAULT_PT_NEUT)
  786.                 sim.partProperty(r, "type", elem.DEFAULT_PT_PLUT)
  787.                 tpt.create(x+math.random(-1,1), y+math.random(-1,1), "plut")
  788.             tpt.create(x+math.random(-1,1), y+math.random(-1,1), "neut")
  789.                 tpt.create(x+math.random(-1,1), y+math.random(-1,1), "plut")
  790.             tpt.set_property("vx", math.random(-2,2), i)
  791.             tpt.set_property("vy", math.random(-2,2), i)
  792.                 tpt.set_property("life", 10, i)
  793.                 sim.pressure(x/4,y/4,25)
  794.                 tpt.set_property("temp", 7999, x, y)
  795.                 end
  796.      end
  797.     end
  798.  
  799. local promethium = elem.allocate("KEV", "PM147")
  800. local lanthanum = elem.allocate("KEV", "LA139")
  801. local cermetcombustible = elem.allocate("KEV", "CMET")
  802. elem.element(elem.KEV_PT_PM147, elem.element(elem.DEFAULT_PT_URAN))
  803. elem.element(elem.KEV_PT_LA139, elem.element(elem.DEFAULT_PT_PSCN))
  804. elem.element(elem.KEV_PT_CMET, elem.element(elem.DEFAULT_PT_VIBR))
  805. elem.property(elem.KEV_PT_PM147, "Name", "PM147")
  806. elem.property(elem.KEV_PT_LA139, "Name", "LA139")
  807. elem.property(elem.KEV_PT_CMET, "Name", "CMET")
  808. elem.property(elem.KEV_PT_PM147, "Description", "Promethium 147. Emits huge amounts of PHOT. Heats up with the time.")
  809. elem.property(elem.KEV_PT_LA139, "Description", "Lanthanum 139. Destabilizes when a NEUT touches it. Emits sparks under pressure. Absorbs HYGN under pressure.")
  810. elem.property(elem.KEV_PT_CMET, "Description", "Ceramic Uranium Oxide and Metallic Aleation combustible cell. Fisible.")
  811. elem.property(elem.KEV_PT_PM147, "Color", 0x00F5FF)
  812. elem.property(elem.KEV_PT_LA139, "Color", 0xEEEED1)
  813. elem.property(elem.KEV_PT_CMET, "Color", 0x6E8B3D)
  814. elem.property(elem.KEV_PT_PM147, "Flammable", 0)
  815. elem.property(elem.KEV_PT_LA139, "Flammable", 0)
  816. elem.property(elem.KEV_PT_CMET, "Flammable", 0)
  817. elem.property(elem.KEV_PT_PM147, "Explosive", 0)
  818. elem.property(elem.KEV_PT_LA139, "Explosive", 0)
  819. elem.property(elem.KEV_PT_CMET, "Explosive", 0)
  820. elem.property(elem.KEV_PT_PM147, "Properties", elem.TYPE_PART+elem.PROP_DEADLY+elem.PROP_RADIOACTIVE+elem.PROP_HOT_GLOW)
  821. elem.property(elem.KEV_PT_LA139, "Properties", elem.TYPE_SOLID+elem.PROP_HOT_GLOW+elem.PROP_LIFE_DEC+elem.PROP_CONDUCTS)
  822. elem.property(elem.KEV_PT_CMET, "Properties", elem.TYPE_SOLID+elem.PROP_HOT_GLOW+elem.PROP_LIFE_DEC+elem.PROP_CONDUCTS)
  823. elem.property(elem.KEV_PT_PM147, "Weight", 50)
  824. elem.property(elem.KEV_PT_LA139, "Weight", 135)
  825. elem.property(elem.KEV_PT_CMET, "Weight", 148)
  826. elem.property(elem.KEV_PT_PM147, "HighTemperatureTransition", elem.DEFAULT_PT_LAVA)
  827. elem.property(elem.KEV_PT_PM147, "HighTemperature", 2673)
  828. elem.property(elem.KEV_PT_LA139, "HighTemperatureTransition", elem.DEFAULT_PT_LAVA)
  829. elem.property(elem.KEV_PT_LA139, "HighTemperature", 1170)
  830. elem.property(elem.KEV_PT_CMET, "HighTemperatureTransition", elem.DEFAULT_PT_LAVA)
  831. elem.property(elem.KEV_PT_CMET, "HighTemperature", 6673)
  832. elem.property(elem.KEV_PT_PM147, "LowTemperatureTransition", elem.DEFAULT_PT_STNE)
  833. elem.property(elem.KEV_PT_PM147, "LowTemperature", 173)
  834.  
  835.  
  836.     local function pm147Update(i, x, y, s, nt)
  837.     r = sim.partID(x+math.random(-1,1),y+math.random(-1,1))
  838.      if r~= nil then
  839.              if math.random(1, 1000) == 1 then
  840.             tpt.create(x+math.random(-1,1), y+math.random(-1,1), "uran")
  841.             tpt.create(x+math.random(-1,1), y+math.random(-1,1), "uran")
  842.             tpt.create(x+math.random(-1,1), y+math.random(-1,1), "stne")
  843.             tpt.create(x+math.random(-1,1), y+math.random(-1,1), "phot")
  844.             tpt.create(x+math.random(-1,1), y+math.random(-1,1), "phot")
  845.             tpt.create(x+math.random(-1,1), y+math.random(-1,1), "phot")
  846.             tpt.create(x+math.random(-1,1), y+math.random(-1,1), "phot")
  847.             tpt.create(x+math.random(-1,1), y+math.random(-1,1), "phot")
  848.             tpt.create(x+math.random(-1,1), y+math.random(-1,1), "phot")
  849.             tpt.set_property("vx", math.random(-1,1), i)
  850.             tpt.set_property("vy", math.random(-1,1), i)
  851.             tpt.set_property("life", 10000, i)
  852.         end
  853.               if math.random(1, 10000) == 1 then
  854.              tpt.set_property("temp", 999, x, y)
  855.          end
  856.               if math.random(1, 10000) == 1 then
  857.              tpt.create(x+math.random(-1,1), y+math.random(-1,1), "phot")
  858.              tpt.create(x+math.random(-1,1), y+math.random(-1,1), "phot")
  859.              tpt.create(x+math.random(-1,1), y+math.random(-1,1), "phot")
  860.          end
  861.      end
  862.     end
  863.  
  864.  local function la139Update(i, x, y, s, nt)
  865.     r = sim.partID(x+math.random(-1,1),y+math.random(-1,1))
  866.      if r~= nil then
  867.              if sim.partProperty(r, "type") == elem.DEFAULT_PT_NEUT then
  868.             tpt.create(x+math.random(-1,1), y+math.random(-1,1), "uran")
  869.             tpt.create(x+math.random(-1,1), y+math.random(-1,1), "uran")
  870.             tpt.create(x+math.random(-1,1), y+math.random(-1,1), "stne")
  871.             tpt.create(x+math.random(-1,1), y+math.random(-1,1), "phot")
  872.             tpt.create(x+math.random(-1,1), y+math.random(-1,1), "phot")
  873.             tpt.create(x+math.random(-1,1), y+math.random(-1,1), "phot")
  874.             tpt.create(x+math.random(-1,1), y+math.random(-1,1), "phot")
  875.             tpt.create(x+math.random(-1,1), y+math.random(-1,1), "phot")
  876.             tpt.create(x+math.random(-1,1), y+math.random(-1,1), "phot")
  877.             tpt.set_property("vx", math.random(-1,1), i)
  878.             tpt.set_property("vy", math.random(-1,1), i)
  879.             tpt.set_property("life", 10000, i)
  880.         end
  881.               if sim.partProperty(r, "type") == elem.DEFAULT_PT_HYGN and sim.pressure(x/4, y/4) >= 5.10 then
  882.                  sim.partKill(r)
  883.              tpt.set_property("temp", 766, x, y)
  884.          end
  885.               if sim.pressure(x/4, y/4) >= 10.10 and math.random(1, 10) == 1 then
  886.              tpt.create(x+math.random(-1,1), y+math.random(-1,1), "embr")
  887.              tpt.create(x+math.random(-1,1), y+math.random(-1,1), "embr")
  888.              tpt.create(x+math.random(-1,1), y+math.random(-1,1), "embr")
  889.              tpt.set_property("vx", math.random(-1,1), i)
  890.              tpt.set_property("vy", math.random(-1,1), i)
  891.              tpt.set_property("life", 10000, i)
  892.          end
  893.               if sim.partProperty(r, "type") == elem.DEFAULT_PT_SPRK and sim.pressure(x/4, y/4) <= -5.10 then
  894.                  tpt.create(x+math.random(-1,1), y+math.random(-1,1), "hygn")
  895.              tpt.create(x+math.random(-1,1), y+math.random(-1,1), "hygn")
  896.                  tpt.create(x+math.random(-1,1), y+math.random(-1,1), "hygn")
  897.              tpt.set_property("temp", -690, x, y)
  898.          end
  899.      end
  900.     end
  901.     local function cermetUpdate(i, x, y, s, nt)
  902.     r = sim.partID(x+math.random(-1,1),y+math.random(-1,1))
  903.      if r~= nil then
  904.               if math.random(1, 1000) == 1 then
  905.             tpt.create(x+math.random(-1,1), y+math.random(-1,1), "phot")
  906.             tpt.set_property("vx", math.random(-1,1), i)
  907.             tpt.set_property("vy", math.random(-1,1), i)
  908.                 tpt.set_property('dcolor', gfx.getHexColor(r,g,b,145,170,127), r)
  909.             tpt.set_property("life", 19900, i)
  910.         end
  911.  
  912.              if sim.partProperty(r, "type") == elem.DEFAULT_PT_NEUT and math.random(1,12) == 1 then
  913.                 sim.partProperty(i, "type", elem.DEFAULT_PT_NEUT)
  914.                 sim.partProperty(r, "type", elem.DEFAULT_PT_URAN)
  915.                 tpt.create(x+math.random(-1,1), y+math.random(-1,1), "neut")
  916.             tpt.create(x+math.random(-1,1), y+math.random(-1,1), "neut")
  917.                 tpt.create(x+math.random(-1,1), y+math.random(-1,1), "uo2")
  918.                 tpt.create(x+math.random(-1,1), y+math.random(-1,1), "uran")
  919.             tpt.set_property("vx", math.random(-2,2), i)
  920.             tpt.set_property("vy", math.random(-2,2), i)
  921.                 tpt.set_property("life", 10, i)
  922.                 sim.pressure(x/4,y/4,25)
  923.                 tpt.set_property("temp", 7999, x, y)
  924.                 return 1
  925.                 end  
  926.  
  927.              if sim.pressure(x/4, y/4) >= 11.30 then
  928.                 sim.partProperty(i, "type", elem.DEFAULT_PT_NEUT)
  929.                 sim.partProperty(i, "type", elem.DEFAULT_PT_NEUT)
  930.                 sim.partProperty(r, "type", elem.KEV_PT_UO2)
  931.                 tpt.create(x+math.random(-1,1), y+math.random(-1,1), "neut")
  932.             tpt.create(x+math.random(-1,1), y+math.random(-1,1), "neut")
  933.                 tpt.create(x+math.random(-1,1), y+math.random(-1,1), "uo2")
  934.             tpt.set_property("vx", math.random(-2,2), i)
  935.             tpt.set_property("vy", math.random(-2,2), i)
  936.                 tpt.set_property("life", 10, i)
  937.                 sim.pressure(x/4,y/4,25)
  938.                 tpt.set_property('dcolor', gfx.getHexColor(r,g,b,145,170,127), r)
  939.                 tpt.set_property("temp", 7999, x, y)
  940.                 end  
  941.      end
  942.     end
  943.  
  944. elements.property(elements.DEFAULT_PT_URAN, "Description", "Uranium 238. Heavy particles. Generates Heat under Pressure.")
  945. elem.property(elem.KEV_PT_U235, "Update", u235Update)
  946. elem.property(elem.KEV_PT_HE4, "Update", hel4Update)
  947. elem.property(rad, "Update", radonUpdate)
  948. elem.property(elem.KEV_PT_F18, "Update", fUpdate)
  949. elem.property(elem.KEV_PT_MOX, "Update", moxUpdate)
  950. elem.property(amer, "Update",amUpdate)
  951. elem.property(c137, "Update",cs137Update)
  952. elem.property(radio, "Update",raUpdate)
  953. elem.property(elem.KEV_PT_TH, "Update",thUpdate)
  954. elem.property(elem.KEV_PT_UO2, "Update",uo2Update)
  955. elem.property(elem.KEV_PT_BRYL, "Update", beUpdate)
  956. elem.property(elem.KEV_PT_PO84, "Update", po84Update)
  957. elem.property(elem.KEV_PT_PM147, "Update", pm147Update)
  958. elem.property(elem.KEV_PT_LA139, "Update", la139Update)
  959. elem.property(elem.KEV_PT_CMET, "Update", cermetUpdate)
  960.  
  961. --------------------------------------------------------------------------------------
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement