Skip to content

Commit

Permalink
[MIRROR] Improves parapen feedback
Browse files Browse the repository at this point in the history
  • Loading branch information
emmanuelbassil authored and SuhEugene committed Sep 22, 2023
1 parent d20f195 commit 7c563ed
Showing 1 changed file with 26 additions and 16 deletions.
42 changes: 26 additions & 16 deletions code/modules/paperwork/pen/reagent_pen.dm
Original file line number Diff line number Diff line change
Expand Up @@ -7,27 +7,37 @@
create_reagents(30)

/obj/item/pen/reagent/attack(mob/living/M, mob/user)
. = FALSE
if (!istype(M))
return FALSE
if (!reagents.total_volume)
return FALSE

var/target_zone = user.zone_sel.selecting
var/allow = M.can_inject(user, target_zone)
if (allow)
if (allow == INJECTION_PORT)
if (M != user)
to_chat(user, SPAN_WARNING("You begin hunting for an injection port on \the [M]'s suit!"))
else
to_chat(user, SPAN_NOTICE("You begin hunting for an injection port on your suit."))
if (!user.do_skilled(INJECTION_PORT_DELAY, SKILL_MEDICAL, M, do_flags = DO_MEDICAL))
return TRUE
if (reagents.total_volume)
if (M.reagents)
var/should_admin_log = reagents.should_admin_log()
var/contained_reagents = reagents.get_reagents()
var/trans = reagents.trans_to_mob(M, 30, CHEM_BLOOD)
if (should_admin_log)
admin_inject_log(user, M, src, contained_reagents, trans)
if (!allow)
return TRUE

if (allow == INJECTION_PORT)
if (M != user)
to_chat(user, SPAN_WARNING("You begin hunting for an injection port on \the [M]'s suit!"))
else
to_chat(user, SPAN_NOTICE("You begin hunting for an injection port on your suit."))

if (!user.do_skilled(INJECTION_PORT_DELAY, SKILL_MEDICAL, M, do_flags = DO_MEDICAL))
return TRUE

if (M.reagents)
var/should_admin_log = reagents.should_admin_log()
var/contained_reagents = reagents.get_reagents()
var/trans = reagents.trans_to_mob(M, 30, CHEM_BLOOD)
if (should_admin_log)
admin_inject_log(user, M, src, contained_reagents, trans)

if (user.a_intent == I_HURT && allow != INJECTION_PORT)
return M.use_weapon(src, user)
else
to_chat(user, SPAN_WARNING("You prick \the [M] with \the [src]."))
to_chat(M, SPAN_NOTICE("You feel a tiny prick."))
return TRUE

/*
Expand Down

0 comments on commit 7c563ed

Please sign in to comment.