Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[MIRROR] Rag tweaks #306

Open
wants to merge 2 commits into
base: dev
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 3 additions & 12 deletions code/game/objects/items/weapons/handcuffs.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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, "<span class='danger'>You need to have a firm grip on [C] before you can put \the [src] on!</span>")
Expand All @@ -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)

Expand All @@ -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
Expand Down Expand Up @@ -178,4 +169,4 @@ var/last_chew = 0
icon = 'icons/obj/bureaucracy.dmi'
breakouttime = 200
cuff_type = "duct tape"
health = 50
health = 50
37 changes: 28 additions & 9 deletions code/modules/detectivework/tools/rag.dm
Original file line number Diff line number Diff line change
Expand Up @@ -116,21 +116,40 @@
if(isliving(target))
var/mob/living/M = target
if(on_fire)
user.visible_message("<span class='danger'>\The [user] hits [target] with [src]!</span>",)
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(
"<span class='danger'>\The [user] smothers [target] with [src]!</span>",
"<span class='warning'>You smother [target] with [src]!</span>",
"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
Expand Down
13 changes: 13 additions & 0 deletions code/modules/mob/mob_helpers.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
39 changes: 39 additions & 0 deletions html/changelogs/sierrakomodo-rag-tweaks.yml
Original file line number Diff line number Diff line change
@@ -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."