diff --git a/code/game/objects/items/weapons/tape.dm b/code/game/objects/items/weapons/tape.dm index 98d53bb586..e41edf47de 100644 --- a/code/game/objects/items/weapons/tape.dm +++ b/code/game/objects/items/weapons/tape.dm @@ -7,68 +7,95 @@ /obj/item/weapon/tape_roll/attack(var/mob/living/carbon/human/H, var/mob/user) if(istype(H)) - if(user.zone_sel.selecting == O_EYES) - - if(!H.organs_by_name[BP_HEAD]) - user << "\The [H] doesn't have a head." - return - if(!H.has_eyes()) - user << "\The [H] doesn't have any eyes." - return - if(H.glasses) - user << "\The [H] is already wearing somethign on their eyes." - return - if(H.head && (H.head.body_parts_covered & FACE)) - user << "Remove their [H.head] first." - return - user.visible_message("\The [user] begins taping over \the [H]'s eyes!") - - if(!do_after(user, 30)) - return - - // Repeat failure checks. - if(!H || !src || !H.organs_by_name[BP_HEAD] || !H.has_eyes() || H.glasses || (H.head && (H.head.body_parts_covered & FACE))) - return - - user.visible_message("\The [user] has taped up \the [H]'s eyes!") - H.equip_to_slot_or_del(new /obj/item/clothing/glasses/sunglasses/blindfold/tape(H), slot_glasses) - H.update_inv_glasses() - - else if(user.zone_sel.selecting == O_MOUTH || user.zone_sel.selecting == BP_HEAD) - if(!H.organs_by_name[BP_HEAD]) - user << "\The [H] doesn't have a head." - return - if(!H.check_has_mouth()) - user << "\The [H] doesn't have a mouth." - return - if(H.wear_mask) - user << "\The [H] is already wearing a mask." - return - if(H.head && (H.head.body_parts_covered & FACE)) - user << "Remove their [H.head] first." - return - user.visible_message("\The [user] begins taping up \the [H]'s mouth!") - - if(!do_after(user, 30)) - return - - // Repeat failure checks. - if(!H || !src || !H.organs_by_name[BP_HEAD] || !H.check_has_mouth() || H.wear_mask || (H.head && (H.head.body_parts_covered & FACE))) - return - - user.visible_message("\The [user] has taped up \the [H]'s mouth!") - - H.equip_to_slot_or_del(new /obj/item/clothing/mask/muzzle/tape(H), slot_wear_mask) - H.update_inv_wear_mask() - - else if(user.zone_sel.selecting == "r_hand" || user.zone_sel.selecting == "l_hand") - var/obj/item/weapon/handcuffs/cable/tape/T = new(user) - if(!T.place_handcuffs(H, user)) - user.unEquip(T) - qdel(T) + var/can_place + if(istype(user, /mob/living/silicon/robot)) + can_place = 1 else - return ..() - return 1 + for (var/obj/item/weapon/grab/G in H.grabbed_by) + if (G.loc == user && G.state >= GRAB_AGGRESSIVE) + can_place = 1 + break + if(!can_place) + user << "You need to have a firm grip on [H] before you can use \the [src]!" + else + if(user.zone_sel.selecting == O_EYES) + + if(!H.organs_by_name[BP_HEAD]) + user << "\The [H] doesn't have a head." + return + if(!H.has_eyes()) + user << "\The [H] doesn't have any eyes." + return + if(H.glasses) + user << "\The [H] is already wearing somethign on their eyes." + return + if(H.head && (H.head.body_parts_covered & FACE)) + user << "Remove their [H.head] first." + return + user.visible_message("\The [user] begins taping over \the [H]'s eyes!") + + if(!do_after(user, 30)) + return + + // Repeat failure checks. + if(istype(user, /mob/living/silicon/robot)) + can_place = 1 + else + for (var/obj/item/weapon/grab/G in H.grabbed_by) + if (G.loc == user && G.state >= GRAB_AGGRESSIVE) + can_place = 1 + + if(!can_place) + if(!H || !src || !H.organs_by_name[BP_HEAD] || !H.has_eyes() || H.glasses || (H.head && (H.head.body_parts_covered & FACE))) + return + + user.visible_message("\The [user] has taped up \the [H]'s eyes!") + H.equip_to_slot_or_del(new /obj/item/clothing/glasses/sunglasses/blindfold/tape(H), slot_glasses) + H.update_inv_glasses() + + else if(user.zone_sel.selecting == O_MOUTH || user.zone_sel.selecting == BP_HEAD) + if(!H.organs_by_name[BP_HEAD]) + user << "\The [H] doesn't have a head." + return + if(!H.check_has_mouth()) + user << "\The [H] doesn't have a mouth." + return + if(H.wear_mask) + user << "\The [H] is already wearing a mask." + return + if(H.head && (H.head.body_parts_covered & FACE)) + user << "Remove their [H.head] first." + return + user.visible_message("\The [user] begins taping up \the [H]'s mouth!") + + if(!do_after(user, 30)) + return + + // Repeat failure checks. + if(istype(user, /mob/living/silicon/robot)) + can_place = 1 + else + for (var/obj/item/weapon/grab/G in H.grabbed_by) + if (G.loc == user && G.state >= GRAB_AGGRESSIVE) + can_place = 1 + + if(!can_place) + if(!H || !src || !H.organs_by_name[BP_HEAD] || !H.check_has_mouth() || H.wear_mask || (H.head && (H.head.body_parts_covered & FACE))) + return + + user.visible_message("\The [user] has taped up \the [H]'s mouth!") + + H.equip_to_slot_or_del(new /obj/item/clothing/mask/muzzle/tape(H), slot_wear_mask) + H.update_inv_wear_mask() + + else if(user.zone_sel.selecting == "r_hand" || user.zone_sel.selecting == "l_hand") + var/obj/item/weapon/handcuffs/cable/tape/T = new(user) + if(!T.place_handcuffs(H, user)) + user.unEquip(T) + qdel(T) + else + return ..() + return 1 /obj/item/weapon/tape_roll/proc/stick(var/obj/item/weapon/W, mob/user) if(!istype(W, /obj/item/weapon/paper)) diff --git a/html/changelogs/Anewbe - Tape Roll.yml b/html/changelogs/Anewbe - Tape Roll.yml new file mode 100644 index 0000000000..d523dfaf54 --- /dev/null +++ b/html/changelogs/Anewbe - Tape Roll.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: Anewbe + +# 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: + - tweak: "Using a roll of tape on a person requires the same level of grip as handcuffs."