mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-27 05:57:24 +01:00
Using medicine on yourself on activate (#21955)
* now you can use patches, pills, injectors * more supported meds * apply proc
This commit is contained in:
@@ -62,7 +62,7 @@
|
||||
applicator_bar.icon_state = "app_e"
|
||||
. += applicator_bar
|
||||
|
||||
/obj/item/reagent_containers/applicator/attack(mob/living/M, mob/user)
|
||||
/obj/item/reagent_containers/applicator/proc/apply(mob/living/M, mob/user)
|
||||
if(!reagents.total_volume)
|
||||
to_chat(user, "<span class='warning'>[src] is empty!</span>")
|
||||
return
|
||||
@@ -93,6 +93,11 @@
|
||||
update_icon()
|
||||
user.changeNext_move(CLICK_CD_MELEE)
|
||||
|
||||
/obj/item/reagent_containers/applicator/attack(mob/living/M, mob/user)
|
||||
return apply(M, user)
|
||||
|
||||
/obj/item/reagent_containers/applicator/attack_self(mob/user)
|
||||
return apply(user, user)
|
||||
|
||||
/obj/item/reagent_containers/applicator/proc/apply_to(mob/living/carbon/M, mob/user, multiplier = 1, show_message = TRUE)
|
||||
var/total_applied_amount = applied_amount * multiplier
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
var/ignore_flags = FALSE
|
||||
var/safety_hypo = FALSE
|
||||
|
||||
/obj/item/reagent_containers/hypospray/attack(mob/living/M, mob/user)
|
||||
/obj/item/reagent_containers/hypospray/proc/apply(mob/living/M, mob/user)
|
||||
if(!reagents.total_volume)
|
||||
to_chat(user, "<span class='warning'>[src] is empty!</span>")
|
||||
return
|
||||
@@ -52,6 +52,12 @@
|
||||
reagents.reaction(M, REAGENT_INGEST, 0.1)
|
||||
return TRUE
|
||||
|
||||
/obj/item/reagent_containers/hypospray/attack(mob/living/M, mob/user)
|
||||
return apply(M, user)
|
||||
|
||||
/obj/item/reagent_containers/hypospray/attack_self(mob/user)
|
||||
return apply(user, user)
|
||||
|
||||
/obj/item/reagent_containers/hypospray/on_reagent_change()
|
||||
if(safety_hypo && !emagged)
|
||||
var/found_forbidden_reagent = FALSE
|
||||
@@ -129,6 +135,11 @@
|
||||
update_icon(UPDATE_ICON_STATE)
|
||||
return TRUE
|
||||
|
||||
/obj/item/reagent_containers/hypospray/autoinjector/attack_self(mob/user)
|
||||
..()
|
||||
update_icon(UPDATE_ICON_STATE)
|
||||
return TRUE
|
||||
|
||||
/obj/item/reagent_containers/hypospray/autoinjector/update_icon_state()
|
||||
if(reagents.total_volume > 0)
|
||||
icon_state = initial(icon_state)
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
if(!icon_state)
|
||||
icon_state = "pill[rand(1, 20)]"
|
||||
|
||||
/obj/item/reagent_containers/food/pill/attack(mob/living/carbon/M, mob/user, def_zone)
|
||||
/obj/item/reagent_containers/food/pill/proc/apply(mob/living/carbon/M, mob/user, def_zone)
|
||||
if(!istype(M))
|
||||
return FALSE
|
||||
bitesize = reagents.total_volume
|
||||
@@ -31,6 +31,12 @@
|
||||
return TRUE
|
||||
return FALSE
|
||||
|
||||
/obj/item/reagent_containers/food/pill/attack(mob/living/carbon/M, mob/user, def_zone)
|
||||
return apply(M, user)
|
||||
|
||||
/obj/item/reagent_containers/food/pill/attack_self(mob/user)
|
||||
return apply(user, user)
|
||||
|
||||
/obj/item/reagent_containers/food/pill/afterattack(obj/target, mob/user, proximity)
|
||||
if(!proximity || !target.is_refillable())
|
||||
return
|
||||
|
||||
Reference in New Issue
Block a user