Well, that was surely an interesting thing to code.
This commit is contained in:
@@ -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("<span class='warning'>[user] is attempting to implant [M].</span>")
|
||||
if(M == user) //just use the suicide verb instead
|
||||
return
|
||||
if(user.zone_selected != "head")
|
||||
return
|
||||
if(!target_limb)
|
||||
to_chat(user, "<span class='notice'>[M] has no [parse_zone(target_zone)]!</span>")
|
||||
return
|
||||
if(!get_location_accessible(M, target_zone))
|
||||
to_chat(user, "<span class='notice'>Expose [M]\s head before trying to crush it!</span>")
|
||||
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, "<span class='notice'>You implant yourself.</span>")
|
||||
else
|
||||
M.visible_message("[user] has implanted [M].", "<span class='notice'>[user] implants you.</span>")
|
||||
imp = null
|
||||
update_icon()
|
||||
else
|
||||
to_chat(user, "<span class='warning'>[src] fails to implant [M].</span>")
|
||||
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("<span class='warning'>[user] is trying to crush [M]\s head with \the [src]!</span>")
|
||||
|
||||
|
||||
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("<span class='warning'>[M]\s head cracks like a watermelon, spilling everything inside, as it becomes an unrecognizable mess!</span>")
|
||||
gib_head(M)
|
||||
else
|
||||
to_chat(user, "<span class='notice'>Expose [M]\s head before trying to crush it!</span>")
|
||||
|
||||
|
||||
/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("<span class='suicide'>[user] is crushing [user.p_their()] own head with \the [src]! It looks like [user.p_theyre()] trying to commit suicide!</span>")
|
||||
if(do_after(user, 30))
|
||||
gib_head(user)
|
||||
else
|
||||
return
|
||||
return (BRUTELOSS)
|
||||
|
||||
@@ -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."
|
||||
|
||||
Reference in New Issue
Block a user