Goonstation Forums
Light Grenade and an Ai shell - Printable Version

+- Goonstation Forums (https://forum.ss13.co)
+-- Forum: Discussion (https://forum.ss13.co/forumdisplay.php?fid=6)
+--- Forum: Bug Reports (https://forum.ss13.co/forumdisplay.php?fid=9)
+---- Forum: Resolved (https://forum.ss13.co/forumdisplay.php?fid=16)
+---- Thread: Light Grenade and an Ai shell (/showthread.php?tid=6320)



Light Grenade and an Ai shell - frod - 04-30-2016

As an AI shell robot with a light grenade nearby. Left clicking the grenade does nothing, but right clicking and dragging instakills the robot. This does not force you back to your ai shell, it ghosts you.


RE: Light Grenade and an Ai shell - Noah Buttes - 04-30-2016

Light grenades are kind of hacky.
The code for them is right here:
https://github.com/goonstation/goonstation-2016/blob/d8a2d60915fd3b74653a1b7d4b8a0910c6fc2f19/code/obj/item/grenades.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
Of course, it might be intentionally hacky, but it might also just be so goddamn old that deaths weren't handled properly yet.


RE: Light Grenade and an Ai shell - ZeWaka - 02-18-2017

should be fix