From 4d75eca582faccd0d2e1f0f201f8dd458237cdc8 Mon Sep 17 00:00:00 2001 From: Useroth Date: Fri, 17 May 2019 16:22:17 +0200 Subject: [PATCH] Well, that was surely an interesting thing to code. --- code/modules/surgery/nutcracker.dm | 74 ++++++++++++++++++++++------- code/modules/uplink/uplink_items.dm | 8 +++- 2 files changed, 64 insertions(+), 18 deletions(-) diff --git a/code/modules/surgery/nutcracker.dm b/code/modules/surgery/nutcracker.dm index 6b7b6ee261..580a1f4872 100644 --- a/code/modules/surgery/nutcracker.dm +++ b/code/modules/surgery/nutcracker.dm @@ -1,6 +1,6 @@ /obj/item/nutcracker name = "nutcracker" - desc = "It seems oversized... quite much... you could fit a head in it." + desc = "It seems quite oversized. You could probably even crush a watermelon with it." icon = 'icons/obj/surgery.dmi' icon_state = "nutcracker" force = 10 @@ -8,22 +8,62 @@ w_class = WEIGHT_CLASS_NORMAL attack_verb = list("smashed", "beaten", "crushed") -/obj/item/nutcracker/attack(mob/living/carbon/M, mob/user) +/obj/item/nutcracker/proc/gib_head(mob/living/carbon/M) + var/obj/item/bodypart/head = M.get_bodypart("head") + if(!head) + return + + var/turf/T = get_turf(M) + var/list/organs = M.getorganszone("head") + M.getorganszone("eyes") + M.getorganszone("mouth") + for(var/internal_organ in organs) + var/obj/item/organ/I = internal_organ + I.Remove(M) + I.forceMove(T) + head.drop_limb() + qdel(head) + new M.gib_type(T,1,M.get_static_viruses()) + M.add_splatter_floor(T) + playsound(M, 'sound/effects/splat.ogg', 50, 1) + +//It's a bit of a clusterfuck, but if someone wants, it can be easily repurposed to work on other limbs too. +/obj/item/nutcracker/attack(mob/living/carbon/M, mob/living/carbon/user) + . = ..() + if(!get_turf(M)) + return if(!istype(M)) return - if(user && imp) - if(M != user) - M.visible_message("[user] is attempting to implant [M].") + if(M == user) //just use the suicide verb instead + return + if(user.zone_selected != "head") + return + if(!target_limb) + to_chat(user, "[M] has no [parse_zone(target_zone)]!") + return + if(!get_location_accessible(M, target_zone)) + to_chat(user, "Expose [M]\s head before trying to crush it!") + return - var/turf/T = get_turf(M) - if(T && (M == user || do_mob(user, M, 50))) - if(src && imp) - if(imp.implant(M, user)) - if (M == user) - to_chat(user, "You implant yourself.") - else - M.visible_message("[user] has implanted [M].", "[user] implants you.") - imp = null - update_icon() - else - to_chat(user, "[src] fails to implant [M].") + var/target_zone = "head" + var/obj/item/bodypart/target_limb = M.get_bodypart(target_zone) + var/crush_time = max(0, 400 - target_limb.brute_dam*2) + + M.visible_message("[user] is trying to crush [M]\s head with \the [src]!") + + + if(do_mob(user, M, crush_time)) + if(get_location_accessible(M, target_zone) && target_limb) //Yes, two checks, before and after the timer. What if someone puts a helmet on the guy while you're crushing his head? + M.visible_message("[M]\s head cracks like a watermelon, spilling everything inside, as it becomes an unrecognizable mess!") + gib_head(M) + else + to_chat(user, "Expose [M]\s head before trying to crush it!") + + +/obj/item/nutcracker/suicide_act(mob/living/carbon/user) + var/obj/item/bodypart/target_limb = user.get_bodypart("head") + if(target_limb) //I mean like... for example lings can be still alive without heads. + user.visible_message("[user] is crushing [user.p_their()] own head with \the [src]! It looks like [user.p_theyre()] trying to commit suicide!") + if(do_after(user, 30)) + gib_head(user) + else + return + return (BRUTELOSS) diff --git a/code/modules/uplink/uplink_items.dm b/code/modules/uplink/uplink_items.dm index 702ddb71a3..798b495cfd 100644 --- a/code/modules/uplink/uplink_items.dm +++ b/code/modules/uplink/uplink_items.dm @@ -988,6 +988,12 @@ GLOBAL_LIST_INIT(uplink_items, subtypesof(/datum/uplink_item)) item = /obj/item/storage/backpack/duffelbag/syndie/surgery cost = 3 +/datum/uplink_item/device_tools/nutcracker + name = "Nutcracker" + desc = "An oversized version of what you'd initially expect here. Big enough to crush skulls." + item = /obj/item/nutcracker + cost = 1 + /datum/uplink_item/device_tools/surgerybag_adv name = "Syndicate Surgery Duffel Bag" desc = "The Syndicate surgery duffel bag is a toolkit containing all newest surgery tools, surgical drapes, \ @@ -1511,7 +1517,7 @@ GLOBAL_LIST_INIT(uplink_items, subtypesof(/datum/uplink_item)) cost = 15 restricted_roles = list("Clown") -/datum/uplink_item/device_tools/honkpins //Idealy so they can place it into their own guns without needing cargo +/datum/uplink_item/device_tools/honkpins //Idealy so they can place it into their own guns without needing cargo name = "Hilarious firing pin" desc = "A single firing pin made for Clown agents, this firing pin makes any gun honk when fired if not a true clown! \ This firing pin also helps you fire the gun correctly. May the HonkMother HONK you agent."