Chrono Grenades (#13396)

* Hopefully this works.

* This is probably better.

* Makes timelessness a flag.
Adds an atom-level proc for toggling the TIMELESS flag.

* Cleaner TIMELESS toggle.

* Yet more conflict fixes.
This commit is contained in:
Shadowmech88
2017-01-13 17:46:25 -06:00
committed by Probe1
parent b8195cb71a
commit 465fb8b5b5
11 changed files with 127 additions and 75 deletions

View File

@@ -804,3 +804,7 @@ its easier to just keep the beam vertical.
//Called when loaded by the map loader
/atom/proc/spawned_by_map_element(datum/map_element/ME, list/objects)
return
/atom/proc/toggle_timeless()
flags ^= TIMELESS
return flags & TIMELESS

View File

@@ -0,0 +1,13 @@
/obj/item/weapon/grenade/chronogrenade
name = "chrono grenade"
desc = "This experimental weapon will halt the progression of time in the local area for ten seconds."
icon = 'icons/obj/grenade.dmi'
icon_state = "chrono_grenade"
item_state = "flashbang"
flags = FPRINT | TIMELESS
var/duration = 10 SECONDS
var/radius = 5 //in tiles
/obj/item/weapon/grenade/chronogrenade/prime()
timestop(src, duration, radius)
qdel(src)

View File

@@ -99,16 +99,16 @@
/obj/item/weapon/grenade/attackby(obj/item/weapon/W as obj, mob/user as mob)
if(isscrewdriver(W))
switch(det_time)
if ("1")
if (1)
det_time = 10
to_chat(user, "<span class='notice'>You set the [name] for 1 second detonation time.</span>")
if ("10")
if (10)
det_time = 30
to_chat(user, "<span class='notice'>You set the [name] for 3 second detonation time.</span>")
if ("30")
if (30)
det_time = 50
to_chat(user, "<span class='notice'>You set the [name] for 5 second detonation time.</span>")
if ("50")
if (50)
det_time = 1
to_chat(user, "<span class='notice'>You set the [name] for instant detonation.</span>")
add_fingerprint(user)

View File

@@ -712,3 +712,12 @@
var/randomsprite = pick("a","b")
icon_state = "wizbox-[randomsprite]"
/obj/item/weapon/storage/box/chrono_grenades
name = "box of chrono grenades"
desc = "A box of seven experimental chrono grenades."
icon_state = "chrono_grenade"
/obj/item/weapon/storage/box/chrono_grenades/New()
..()
for(var/i = 1 to 7)
new /obj/item/weapon/grenade/chronogrenade(src)