Advertisement
EditorRUS

Bluespace crystal

Mar 10th, 2015
342
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.46 KB | None | 0 0
  1. /datum/stopped_time
  2. var/no_garbage = null
  3. New(atom/victim)
  4. ..()
  5. no_garbage = src //Prevents GC from deleting the datum
  6. var/const/minute = 60
  7. var/time = 0
  8. for (var/i=0,i<10,i++)
  9. time += rand()*minute
  10. time = round(2 * time)
  11. if (prob(2))
  12. time = 0
  13. if (victim)
  14. if (isobj(victim) && victim in processing_objects)
  15. processing_objects.Remove(victim)
  16. if (time)
  17. spawn(time)
  18. processing_objects.Add(victim)
  19. victim:process()
  20. del(src)
  21. if (ismob(victim) && victim in mob_list)
  22. mob_list.Remove(victim)
  23. if (time)
  24. spawn(time)
  25. mob_list.Add(victim)
  26. victim:Life()
  27. del(src)
  28. if (istype(victim, /obj/machinery) && victim in machines)
  29. machines.Remove(victim)
  30. if (time)
  31. spawn(time)
  32. machines.Add(victim)
  33. victim:process()
  34. del(src)
  35.  
  36. /obj/item/weapon/time_space_crystal
  37. name = "Bluespace crystal with holes and cracks"
  38. desc = {"
  39. This crystal is a bluespace crystal with anomalous properties. It will \"stop\" time for whatever it bumped into upon hit.
  40. The target won't have any continuous processes working but will be able to \"record\" received changes. When time start going again those changes will be received at once.
  41. Time will be \"stopped\" usually for about a minute, however it's proved to be random ranging from seconds to infinity in some cases.
  42. Use it carefully as it is quite fragile.
  43. These things have been banned for distortion of space-time continuum and therefore are illegal and known to belong to Syndicate."}
  44. icon = 'icons/obj/telescience.dmi'
  45. icon_state = "bluespace_crystal"
  46. origin_tech = "bluespace=7;materials=5;syndicate=2"
  47.  
  48. /obj/item/weapon/time_space_crystal/New()
  49. ..()
  50. pixel_x = rand(-15, 15)
  51. pixel_y = rand(-15, 15)
  52.  
  53. /obj/item/weapon/time_space_crystal/afterattack(atom/victim)
  54. viewers(5, src) << "\red [src] is crushed against [victim] by [usr]"
  55. new /datum/stopped_time(victim)
  56. victim << "\red \bold You feel yourself weird"
  57. ..()
  58. del(src)
  59.  
  60.  
  61. /obj/item/weapon/time_space_crystal/throw_impact(atom/victim)
  62. viewers(5, src) << "\red [src.name] hits the [victim] and shatters!"
  63. new /datum/stopped_time(victim)
  64. victim << "\red \bold You feel yourself weird"
  65. ..()
  66. del(src)
  67.  
  68. /obj/item/weapon/time_space_crystal/attack_self(mob/user)
  69. user << "\blue You crush the [src]"
  70. viewers(2, src) << "\red [user] crushed the [src]"
  71. new /datum/stopped_time(user)
  72. user << "\red \bold You feel yourself weird"
  73. ..()
  74. del(src)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement