From 240c2fc79914a4c27c2ccbcf8268b005e860abd8 Mon Sep 17 00:00:00 2001 From: Ron Date: Wed, 4 Oct 2017 13:23:10 -0400 Subject: [PATCH] Gives the crusher a chance to crush hands (#3538) Adds a chance for the crusher to crush hands if used while in operation --- code/game/machinery/crusher_piston.dm | 8 +++++++- html/changelogs/printer16-crusherdamage.yml | 4 ++++ 2 files changed, 11 insertions(+), 1 deletion(-) create mode 100644 html/changelogs/printer16-crusherdamage.yml diff --git a/code/game/machinery/crusher_piston.dm b/code/game/machinery/crusher_piston.dm index ecdbce10fa8..95b9cc43068 100644 --- a/code/game/machinery/crusher_piston.dm +++ b/code/game/machinery/crusher_piston.dm @@ -87,9 +87,15 @@ return ..() /obj/machinery/crusher_base/attackby(var/obj/item/O as obj, var/mob/user as mob) + if(status != "idle" && prob(40) && ishuman(user)) + var/mob/living/carbon/human/M = user + M.apply_damage(45, BRUTE, user.get_active_hand()) + M.apply_damage(45, HALLOSS) + M.visible_message("[user]'s hand catches in the [src]!", "Your hand gets caught in the [src]!") + M.say("*scream") + return if(default_deconstruction_screwdriver(user, O)) return - //TODO: Add a chance to catch their hand in the mechanic if they do something while the crusher is in operation if(default_deconstruction_crowbar(user, O)) return if(default_part_replacement(user, O)) diff --git a/html/changelogs/printer16-crusherdamage.yml b/html/changelogs/printer16-crusherdamage.yml new file mode 100644 index 00000000000..717a885d0ed --- /dev/null +++ b/html/changelogs/printer16-crusherdamage.yml @@ -0,0 +1,4 @@ +author: Printer16 +delete-after: True +changes: + - rscadd: "The crusher is no longer safe to use while operational."