From cce0bf2e9df41ee923a8716af4091f952c7729be Mon Sep 17 00:00:00 2001 From: KorPhaeron Date: Tue, 22 Sep 2015 05:33:02 -0500 Subject: [PATCH] Meatspike --- code/game/objects/structures/kitchen_spike.dm | 74 +++++++++++++++++-- html/changelogs/Kor-PR-Profligates.yml | 37 ++++++++++ 2 files changed, 105 insertions(+), 6 deletions(-) create mode 100644 html/changelogs/Kor-PR-Profligates.yml diff --git a/code/game/objects/structures/kitchen_spike.dm b/code/game/objects/structures/kitchen_spike.dm index 2587f2db3f1..fec0e2c6e0b 100644 --- a/code/game/objects/structures/kitchen_spike.dm +++ b/code/game/objects/structures/kitchen_spike.dm @@ -38,6 +38,8 @@ desc = "A spike for collecting meat from animals" density = 1 anchored = 1 + buckle_lying = 0 + can_buckle = 1 var/meat = 0 var/occupied = 0 var/meattype = null @@ -112,16 +114,76 @@ user << "The spike already has something on it; finish collecting its meat first!" return if(istype(G.affecting, /mob/living/carbon/human)) - user.changeNext_move(CLICK_CD_MELEE) - playsound(src.loc, "sound/effects/splat.ogg", 25, 1) - var/mob/living/carbon/human/H = G.affecting - H.visible_message("[user] slams [G.affecting] into the meat spike!", "[user] slams you into the meat spike!", "You hear a squishy wet noise.") - H.adjustBruteLoss(20) - return + if(!occupied) + if(do_mob(user, src, 50)) + if(occupied) //to prevent spam/queing up attacks + return + if(G.affecting.buckled) + return + var/mob/living/carbon/human/H = G.affecting + playsound(src.loc, "sound/effects/splat.ogg", 25, 1) + H.visible_message("[user] slams [G.affecting] onto the meat spike!", "[user] slams you onto the meat spike!", "You hear a squishy wet noise.") + H.loc = src.loc + H.emote("scream") + var/turf/pos = get_turf(H) + pos.add_blood_floor(H) + H.adjustBruteLoss(30) + var/matrix/m120 = matrix(transform) + m120.Turn(180) + animate(H, transform = m120, time = 3) + H.pixel_y = H.get_standard_pixel_y_offset(180) + occupied = TRUE + H.buckled = src + H.dir = 2 + buckled_mob = H + return user << "You can't use that on the spike!" return ..() +/obj/structure/kitchenspike/user_buckle_mob(mob/living/M, mob/living/user) //Don't want them getting put on the rack other than by spiking + return + +/obj/structure/kitchenspike/user_unbuckle_mob(mob/living/carbon/human/user) + if(buckled_mob && buckled_mob.buckled == src) + var/mob/living/M = buckled_mob + if(M != user) + M.visible_message(\ + "[user.name] tries to pull [M.name] free of the [src]!",\ + "[user.name] is trying to pull you off the [src], opening up fresh wounds!",\ + "You hear a squishy wet noise.") + M.adjustBruteLoss(20) + if(!do_after(M, 300, target = src)) + if(M && M.buckled) + M.visible_message(\ + "[user.name] fails to free [M.name]!",\ + "[user.name] fails to pull you off of the [src].") + return + + else + M.visible_message(\ + "[M.name] struggles to break free from the [src]!",\ + "You struggle to break free from the [src], exacerbating your wounds! (Stay still for two minutes.)",\ + "You hear a wet squishing noise..") + M.adjustBruteLoss(30) + if(!do_after(M, 1200, target = src)) + if(M && M.buckled) + M << "You fail to free yourself!" + return + if(!M.buckled) + return + var/mob/living/carbon/human/L = buckled_mob + var/matrix/m120 = matrix(transform) + m120.Turn(360) + animate(L, transform = m120, time = 3) + L.pixel_y = L.get_standard_pixel_y_offset(360) + M.adjustBruteLoss(20) + src.visible_message(text("[M] falls free of the [src]!")) + unbuckle_mob() + L.emote("scream") + L.AdjustWeakened(10) + occupied = 0 + ///obj/structure/kitchenspike/MouseDrop_T(var/atom/movable/C, mob/user) // if(istype(C, /obj/mob/carbon/monkey) // else if(istype(C, /obj/mob/carbon/alien) && !istype(C, /mob/living/carbon/alien/larva/slime)) diff --git a/html/changelogs/Kor-PR-Profligates.yml b/html/changelogs/Kor-PR-Profligates.yml new file mode 100644 index 00000000000..c4acafd56fe --- /dev/null +++ b/html/changelogs/Kor-PR-Profligates.yml @@ -0,0 +1,37 @@ +################################ +# Example Changelog File +# +# Note: This file, and files beginning with ".", and files that don't end in ".yml" will not be read. If you change this file, you will look really dumb. +# +# Your changelog will be merged with a master changelog. (New stuff added only, and only on the date entry for the day it was merged.) +# When it is, any changes listed below will disappear. +# +# Valid Prefixes: +# bugfix +# wip (For works in progress) +# tweak +# soundadd +# sounddel +# rscadd (general adding of nice things) +# rscdel (general deleting of nice things) +# imageadd +# imagedel +# spellcheck (typo fixes) +# experiment +# tgs (TG-ported fixes?) +################################# + +# Your name. +author: Kor + +# Optional: Remove this file after generating master changelog. Useful for PR changelogs that won't get used again. +delete-after: True + +# Any changes you've made. See valid prefix list above. +# INDENT WITH TWO SPACES. NOT TABS. SPACES. +# SCREW THIS UP AND IT WON'T WORK. +# Also, this gets changed to [] after reading. Just remove the brackets when you add new shit. +# Please surround your changes in double quotes ("). It works without them, but if you use certain characters it screws up compiling. The quotes will not show up in the changelog. +changes: + - rscadd: "You can now hang human mobs (dead or alive) from meatspikes. Escaping the meatspike will further damage the victim." + - rscdel: "You can no longer slam humans into the meatspike as an attack."