From 6c121d232b527d351930c7a63ee1f7721872ff2d Mon Sep 17 00:00:00 2001 From: Yoshax Date: Sat, 9 May 2015 19:57:01 +0100 Subject: [PATCH] Makes bear traps do damage when stepped on --- code/defines/obj/weapon.dm | 14 ++++++++--- html/changelogs/Yoshax - trapping.YML | 36 +++++++++++++++++++++++++++ 2 files changed, 47 insertions(+), 3 deletions(-) create mode 100644 html/changelogs/Yoshax - trapping.YML diff --git a/code/defines/obj/weapon.dm b/code/defines/obj/weapon.dm index 5b0ae96726..c1fc0566e2 100644 --- a/code/defines/obj/weapon.dm +++ b/code/defines/obj/weapon.dm @@ -198,18 +198,26 @@ if(armed) if(ishuman(AM)) if(isturf(src.loc)) - var/mob/living/carbon/H = AM + var/mob/living/carbon/human/H = AM if(H.m_intent == "run") armed = 0 H.legcuffed = src src.loc = H H.update_inv_legcuffed() - H << "\red You step on \the [src]!" + H << "You step on \the [src]!" + + var/obj/item/organ/external/affecting = H.get_organ(pick("l_leg", "r_leg")) feedback_add_details("handcuffs","B") //Yes, I know they're legcuffs. Don't change this, no need for an extra variable. The "B" is used to tell them apart. for(var/mob/O in viewers(H, null)) if(O == H) continue - O.show_message("\red [H] steps on \the [src].", 1) + O.show_message("[H] steps on \the [src].", 1) + + affecting.take_damage(35, 0) + H.UpdateDamageIcon() + H.updatehealth() + + if(isanimal(AM) && !istype(AM, /mob/living/simple_animal/parrot) && !istype(AM, /mob/living/simple_animal/construct) && !istype(AM, /mob/living/simple_animal/shade) && !istype(AM, /mob/living/simple_animal/hostile/viscerator)) armed = 0 var/mob/living/simple_animal/SA = AM diff --git a/html/changelogs/Yoshax - trapping.YML b/html/changelogs/Yoshax - trapping.YML new file mode 100644 index 0000000000..140afce721 --- /dev/null +++ b/html/changelogs/Yoshax - trapping.YML @@ -0,0 +1,36 @@ +################################ +# 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 +# maptweak +# spellcheck (typo fixes) +# experiment +################################# + +# Your name. +author: Yoshax + +# 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, all entries are changed into a single [] after a master changelog generation. Just remove the brackets when you add new entries. +# Please surround your changes in double quotes ("), as certain characters otherwise screws up compiling. The quotes will not show up in the changelog. +changes: + - rscadd: "Bear traps now do damage when stood on, enough to break bones!"