From f90f2ec08a95280ebee050fb8f1ae4b41e7d4828 Mon Sep 17 00:00:00 2001 From: Yoshax Date: Tue, 26 Jul 2016 03:10:54 +0100 Subject: [PATCH] Fixes some items on working on people on tables --- .../clothing/under/accessories/accessory.dm | 6 ++++ .../mob/living/silicon/robot/analyzer.dm | 11 ++++++ .../reagents/reagent_containers/pill.dm | 9 +++-- html/changelogs/Yoshax - ItemFixes.yml | 36 +++++++++++++++++++ 4 files changed, 60 insertions(+), 2 deletions(-) create mode 100644 html/changelogs/Yoshax - ItemFixes.yml diff --git a/code/modules/clothing/under/accessories/accessory.dm b/code/modules/clothing/under/accessories/accessory.dm index d3e539bad2..1d6c610cea 100644 --- a/code/modules/clothing/under/accessories/accessory.dm +++ b/code/modules/clothing/under/accessories/accessory.dm @@ -124,6 +124,12 @@ desc = "An outdated medical apparatus for listening to the sounds of the human body. It also makes you look like you know what you're doing." icon_state = "stethoscope" +/obj/item/clothing/accessory/stethoscope/do_surgery(mob/living/carbon/human/M, mob/living/user) + if(user.a_intent != I_HELP) //in case it is ever used as a surgery tool + return ..() + attack(M, user) //default surgery behaviour is just to scan as usual + return 1 + /obj/item/clothing/accessory/stethoscope/attack(mob/living/carbon/human/M, mob/living/user) if(ishuman(M) && isliving(user)) if(user.a_intent == I_HELP) diff --git a/code/modules/mob/living/silicon/robot/analyzer.dm b/code/modules/mob/living/silicon/robot/analyzer.dm index 19c44d2e53..9881948b1b 100644 --- a/code/modules/mob/living/silicon/robot/analyzer.dm +++ b/code/modules/mob/living/silicon/robot/analyzer.dm @@ -16,7 +16,18 @@ matter = list(DEFAULT_WALL_MATERIAL = 500, "glass" = 200) var/mode = 1; + +/obj/item/device/robotanalyzer/do_surgery(mob/living/M, mob/living/user) + if(user.a_intent != I_HELP) //in case it is ever used as a surgery tool + return ..() + do_scan(M, user) //default surgery behaviour is just to scan as usual + return 1 + + /obj/item/device/robotanalyzer/attack(mob/living/M as mob, mob/living/user as mob) + do_scan(M, user) + +/obj/item/device/robotanalyzer/proc/do_scan(mob/living/M as mob, mob/living/user as mob) if((CLUMSY in user.mutations) && prob(50)) user << text("\red You try to analyze the floor's vitals!") for(var/mob/O in viewers(M, null)) diff --git a/code/modules/reagents/reagent_containers/pill.dm b/code/modules/reagents/reagent_containers/pill.dm index def1ac7f81..150a774309 100644 --- a/code/modules/reagents/reagent_containers/pill.dm +++ b/code/modules/reagents/reagent_containers/pill.dm @@ -19,10 +19,15 @@ if(!icon_state) icon_state = "pill[rand(1, 20)]" -/obj/item/weapon/reagent_containers/pill/attack(mob/M as mob, mob/user as mob, def_zone) +/obj/item/weapon/reagent_containers/pill/do_surgery(mob/M, mob/user) + if(user.a_intent != I_HELP) //in case it is ever used as a surgery tool + return ..() + attack(M, user) //default surgery behaviour is just to scan as usual + return 1 + +/obj/item/weapon/reagent_containers/pill/attack(mob/M as mob, mob/user as mob) if(M == user) - if(istype(M, /mob/living/carbon/human)) var/mob/living/carbon/human/H = M if(!H.check_has_mouth()) diff --git a/html/changelogs/Yoshax - ItemFixes.yml b/html/changelogs/Yoshax - ItemFixes.yml new file mode 100644 index 0000000000..6022263c44 --- /dev/null +++ b/html/changelogs/Yoshax - ItemFixes.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: + - bugfix: "Certain items such as pills and suchlike will once again be usable on someone who is on a surgical table/table."