diff --git a/code/game/objects/items/weapons/handcuffs.dm b/code/game/objects/items/weapons/handcuffs.dm index b43652f4c5b..a76c5c31a97 100644 --- a/code/game/objects/items/weapons/handcuffs.dm +++ b/code/game/objects/items/weapons/handcuffs.dm @@ -52,7 +52,7 @@ return //check for an aggressive grab (or robutts) - if(can_place(C, user)) + if(C.has_danger_grab(user)) place_handcuffs(C, user) else to_chat(user, "You need to have a firm grip on [C] before you can put \the [src] on!") @@ -61,15 +61,6 @@ else ..() -/obj/item/handcuffs/proc/can_place(var/mob/target, var/mob/user) - if(user == target || istype(user, /mob/living/silicon/robot) || istype(user, /mob/living/bot)) - return 1 - else - for (var/obj/item/grab/G in target.grabbed_by) - if (G.force_danger()) - return 1 - return 0 - /obj/item/handcuffs/proc/place_handcuffs(var/mob/living/carbon/target, var/mob/user) playsound(src.loc, cuff_sound, 30, 1, -2) @@ -90,7 +81,7 @@ if(!do_after(user,30, target)) return 0 - if(!can_place(target, user)) // victim may have resisted out of the grab in the meantime + if(!target.has_danger_grab(user)) // victim may have resisted out of the grab in the meantime return 0 var/obj/item/handcuffs/cuffs = src @@ -178,4 +169,4 @@ var/last_chew = 0 icon = 'icons/obj/bureaucracy.dmi' breakouttime = 200 cuff_type = "duct tape" - health = 50 \ No newline at end of file + health = 50 diff --git a/code/modules/detectivework/tools/rag.dm b/code/modules/detectivework/tools/rag.dm index 15947f1954a..a1a5faa1761 100644 --- a/code/modules/detectivework/tools/rag.dm +++ b/code/modules/detectivework/tools/rag.dm @@ -116,21 +116,40 @@ if(isliving(target)) var/mob/living/M = target if(on_fire) - user.visible_message("\The [user] hits [target] with [src]!",) + user.visible_message( + SPAN_DANGER("\The [user] hits \the [target] with \the [src]!"), + SPAN_DANGER("You hit \the [target] with \the [src]!") + ) user.do_attack_animation(target) + admin_attack_log(user, M, "used \the [src] (ignited) to attack", "was attacked using \the [src] (ignited)", "attacked with \the [src] (ignited)") M.IgniteMob() else if(reagents.total_volume) if(user.zone_sel.selecting == BP_MOUTH) - user.do_attack_animation(target) + if (!M.has_danger_grab(user)) + to_chat(user, SPAN_WARNING("You need to have a firm grip on \the [target] before you can use \the [src] on them!")) + return + + user.do_attack_animation(src) user.visible_message( - "\The [user] smothers [target] with [src]!", - "You smother [target] with [src]!", - "You hear some struggling and muffled cries of surprise" + SPAN_DANGER("\The [user] brings \the [src] up to \the [target]'s mouth!"), + SPAN_DANGER("You bring \the [src] up to \the [target]'s mouth!"), + SPAN_WARNING("You hear some struggling and muffled cries of surprise") + ) + + var/grab_time = 6 SECONDS + if (user.skill_check(SKILL_COMBAT, SKILL_ADEPT)) + grab_time = 3 SECONDS + + if (do_after(user, grab_time, target)) + user.visible_message( + SPAN_DANGER("\The [user] smothers \the [target] with \the [src]!"), + SPAN_DANGER("You smother \the [target] with \the [src]!") ) - - //it's inhaled, so... maybe CHEM_INJECT doesn't make a whole lot of sense but it's the best we can do for now - reagents.trans_to_mob(target, amount_per_transfer_from_this, CHEM_INJECT) - update_name() + //it's inhaled, so... maybe CHEM_INJECT doesn't make a whole lot of sense but it's the best we can do for now + var/trans_amt = reagents.trans_to_mob(target, amount_per_transfer_from_this, CHEM_INJECT) + var/contained_reagents = reagents.get_reagents() + admin_inject_log(user, M, src, contained_reagents, trans_amt) + update_name() else wipe_down(target, user) return diff --git a/code/modules/mob/mob_helpers.dm b/code/modules/mob/mob_helpers.dm index 21bff16b2d8..1fbb25ed557 100644 --- a/code/modules/mob/mob_helpers.dm +++ b/code/modules/mob/mob_helpers.dm @@ -35,6 +35,19 @@ /mob/living/carbon/human/isMonkey() return istype(species, /datum/species/monkey) + +/** + * Checks if the target has a grab from the user + */ +/mob/proc/has_danger_grab(mob/user) + if (user == src || istype(user, /mob/living/silicon/robot) || istype(user, /mob/living/bot)) + return TRUE + + for (var/obj/item/grab/G in grabbed_by) + if (G.force_danger()) + return TRUE + + proc/isdeaf(A) if(isliving(A)) var/mob/living/M = A diff --git a/html/changelogs/sierrakomodo-rag-tweaks.yml b/html/changelogs/sierrakomodo-rag-tweaks.yml new file mode 100644 index 00000000000..efb6f09934b --- /dev/null +++ b/html/changelogs/sierrakomodo-rag-tweaks.yml @@ -0,0 +1,39 @@ +################################ +# 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 +# admin +################################# + +# Your name. +author: SierraKomodo + +# 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: + - admin: "Smothering people with a rag and hitting people with an ignited rag now generates attack logs." + - tweak: "You now require a grab to smother people with a rag." + - tweak: "Smothering people with a rag now has a timed progress bar - 3 seconds if your CQC skill is trained or above, 6 seconds for everyone else."