From 9ba7aa454b00d4a039fcc1d5d3f5eccdd7528dc9 Mon Sep 17 00:00:00 2001 From: TheDreamweaver Date: Tue, 8 May 2018 18:07:29 -0700 Subject: [PATCH] [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 --- code/game/objects/items/teleportation.dm | 14 ++++++++++++++ config/admins.txt | 1 + 2 files changed, 15 insertions(+) diff --git a/code/game/objects/items/teleportation.dm b/code/game/objects/items/teleportation.dm index cc7e3249d4d..dc6fbfe25b5 100644 --- a/code/game/objects/items/teleportation.dm +++ b/code/game/objects/items/teleportation.dm @@ -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("[user] is creating a weak portal and sticking [user.p_their()] head through! It looks like [user.p_theyre()] trying to commit suicide!") + 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("The portal snaps closed taking [user]'s head with it!") + else + itemUser.visible_message("[user] looks even further depressed as they realize they do not have a head...and suddenly dies of shame!") + return (BRUTELOSS) diff --git a/config/admins.txt b/config/admins.txt index d5f669f77c2..ce94aec9cb1 100644 --- a/config/admins.txt +++ b/config/admins.txt @@ -133,3 +133,4 @@ Plizzard = Game Master octareenroon91 = Game Master Serpentarium = Game Master Averagejoe82 = Game Master +The Dreamweaver = Game Master \ No newline at end of file