04-30-2016, 11:49 AM
Light grenades are kind of hacky.
The code for them is right here:
https://github.com/goonstation/goonstati...es.dm#L351
The part that actually kills you is this:
As you can see, it just creates a ghost and then transfers you to the ghost before deleting your old body.
This is ridiculously hacky and bypasses many things, including, but not limited to:
The code for them is right here:
https://github.com/goonstation/goonstati...es.dm#L351
The part that actually kills you is this:
Code:
spawn(2)
random_brute_damage(user, 200)
spawn(1)
logTheThing("combat", user, null, "was killed by touching a [src] at [log_loc(src)].")
var/mob/dead/observer/newmob
newmob = new/mob/dead/observer(user)
user.client.mob = newmob
user.mind.transfer_to(newmob)
qdel(user)
As you can see, it just creates a ghost and then transfers you to the ghost before deleting your old body.
This is ridiculously hacky and bypasses many things, including, but not limited to:
- A wizard's Soul Guard
- The Shield of Souls
- An admin setting a mob's nodamage var to 1