[READY] Properly Adds a suicide action to the hand tele (#37438)

* Properly adds a hand tele suicide with the proper checks and properly add my name to the admin config with the proper newlines. Right proper.

* Woops

* Fixed Z level listing

* cleaner code is cleaner
This commit is contained in:
TheDreamweaver
2018-05-08 21:07:29 -04:00
committed by Jordan Brown
parent d95c220c37
commit 9ba7aa454b
2 changed files with 15 additions and 0 deletions
+14
View File
@@ -219,3 +219,17 @@
if(active_portal_pairs[i] == P)
return DESTINATION_PORTAL
return FALSE
/obj/item/hand_tele/suicide_act(mob/user)
if(iscarbon(user))
user.visible_message("<span class='suicide'>[user] is creating a weak portal and sticking [user.p_their()] head through! It looks like [user.p_theyre()] trying to commit suicide!</span>")
var/mob/living/carbon/itemUser = user
var/obj/item/bodypart/head/head = itemUser.get_bodypart(BODY_ZONE_HEAD)
if(head)
head.drop_limb()
var/list/safeLevels = SSmapping.levels_by_any_trait(list(ZTRAIT_SPACE_RUINS, ZTRAIT_LAVA_RUINS, ZTRAIT_STATION, ZTRAIT_MINING))
head.forceMove(locate(rand(1, world.maxx), rand(1, world.maxy), pick(safeLevels)))
itemUser.visible_message("<span class='suicide'>The portal snaps closed taking [user]'s head with it!</span>")
else
itemUser.visible_message("<span class='suicide'>[user] looks even further depressed as they realize they do not have a head...and suddenly dies of shame!</span>")
return (BRUTELOSS)
+1
View File
@@ -133,3 +133,4 @@ Plizzard = Game Master
octareenroon91 = Game Master
Serpentarium = Game Master
Averagejoe82 = Game Master
The Dreamweaver = Game Master