Advertisement
Guest User

Untitled

a guest
Sep 25th, 2017
52
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.83 KB | None | 0 0
  1. /obj/item/weapon/tank/plasmatank/proc/ignite()
  2.  
  3. var/strength = ((src.gas.plasma + src.gas.oxygen/2.0) / 1600000.0) * src.gas.temperature
  4. //if ((src.gas.plasma < 1600000.0 || src.gas.temperature < 773)) //500degC
  5. if (strength < 773.0)
  6. var/turf/T = get_turf(src.loc)
  7. T.poison += src.gas.plasma
  8. T.firelevel = T.poison
  9. T.res_vars()
  10.  
  11. if(src.master)
  12. src.master.loc = null
  13.  
  14. //if ((src.gas.temperature > (450+T0C) && src.gas.plasma == 1600000.0))
  15. if (strength > (450+T0C))
  16. var/turf/sw = locate(max(T.x - 4, 1), max(T.y - 4, 1), T.z)
  17. var/turf/ne = locate(min(T.x + 4, world.maxx), min(T.y + 4, world.maxy), T.z)
  18. defer_powernet_rebuild = 1
  19.  
  20. for(var/turf/U in block(sw, ne))
  21. var/zone = 4
  22. if ((U.y <= (T.y + 1) && U.y >= (T.y - 1) && U.x <= (T.x + 2) && U.x >= (T.x - 2)) )
  23. zone = 3
  24. if ((U.y <= (T.y + 1) && U.y >= (T.y - 1) && U.x <= (T.x + 1) && U.x >= (T.x - 1) ))
  25. zone = 2
  26. for(var/atom/A in U)
  27. A.ex_act(zone)
  28. //Foreach goto(342)
  29. U.ex_act(zone)
  30. U.buildlinks()
  31. //Foreach goto(170)
  32. defer_powernet_rebuild = 0
  33. makepowernets()
  34.  
  35. else
  36. //if ((src.gas.temperature > (300+T0C) && src.gas.plasma == 1600000.0))
  37. if (strength > (300+T0C))
  38. var/turf/sw = locate(max(T.x - 4, 1), max(T.y - 4, 1), T.z)
  39. var/turf/ne = locate(min(T.x + 4, world.maxx), min(T.y + 4, world.maxy), T.z)
  40. defer_powernet_rebuild = 1
  41.  
  42. for(var/turf/U in block(sw, ne))
  43. var/zone = 4
  44. if ((U.y <= (T.y + 2) && U.y >= (T.y - 2) && U.x <= (T.x + 2) && U.x >= (T.x - 2)) )
  45. zone = 3
  46. for(var/atom/A in U)
  47. A.ex_act(zone)
  48. //Foreach goto(598)
  49. U.ex_act(zone)
  50. U.buildlinks()
  51. //Foreach goto(498)
  52. defer_powernet_rebuild = 0
  53. makepowernets()
  54.  
  55. //src.master = null
  56. del(src.master)
  57. //SN src = null
  58. del(src)
  59. return
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement