Syringe guns now embed syringes (#14192)

* Squashed commit of the following:

commit 8ec2fca541
Author: nmajask <nmajask@gmail.com>
Date:   Thu May 19 15:26:09 2022 -0400

    Converts embedding into a proc

    also adds a embed tic proc that is called whenever the embedde has a life tick

* Syringe gun rework

Syringe gun now embeds syringes and slowly transfers the reagents

* Squashed commit of the following:

commit c6d04d476b
Author: nmajask <nmajask@gmail.com>
Date:   Sat May 21 16:12:51 2022 -0400

    b

commit da83fdc5a0
Author: nmajask <nmajask@gmail.com>
Date:   Sat May 21 15:47:52 2022 -0400

    a

commit 8ec2fca541
Author: nmajask <nmajask@gmail.com>
Date:   Thu May 19 15:26:09 2022 -0400

    Converts embedding into a proc

    also adds a embed tic proc that is called whenever the embedde has a life tick

* a

* Pain

* Fixes and Buff

* buff

Co-authored-by: Jamie D <993128+JamieD1@users.noreply.github.com>
This commit is contained in:
nmajask
2022-06-11 09:54:43 -04:00
committed by GitHub
parent 87648fb3d6
commit efb926aa46
6 changed files with 81 additions and 33 deletions

View File

@@ -15,6 +15,7 @@
materials = list(/datum/material/iron=10, /datum/material/glass=20)
reagent_flags = TRANSPARENT
sharpness = SHARP_POINTY
embedding = list("embedded_pain_chance" = 0, "embedded_pain_multiplier" = 0, "embedded_unsafe_removal_time" = 0.25 SECONDS, "embedded_unsafe_removal_pain_multiplier" = 0, "embed_chance" = 15, "embedded_fall_chance" = 5)
/obj/item/reagent_containers/syringe/Initialize()
. = ..()
@@ -193,6 +194,12 @@
injoverlay = "inject"
add_overlay(injoverlay)
M.update_inv_hands()
/obj/item/reagent_containers/syringe/on_embed(mob/living/carbon/human/embedde, obj/item/bodypart/part)
reagents.trans_to(embedde, amount_per_transfer_from_this)
/obj/item/reagent_containers/syringe/embed_tick(embedde, part)
reagents.trans_to(embedde, amount_per_transfer_from_this * 0.2)
/obj/item/reagent_containers/syringe/epinephrine
name = "syringe (epinephrine)"
@@ -286,7 +293,6 @@
desc = "A diamond-tipped syringe that pierces armor when launched at high velocity. It can hold up to 10 units."
volume = 10
proj_piercing = 1
/obj/item/reagent_containers/syringe/crude
name = "crude syringe"
desc = "A crudely made syringe. The flimsy wooden construction makes it hold up minimal amounts of reagents."
@@ -296,3 +302,15 @@
name = "spider extract syringe"
desc = "Contains crikey juice - makes any gold core create the most deadly companions in the world."
list_reagents = list(/datum/reagent/spider_extract = 1)
/obj/item/reagent_containers/syringe/dart
name = "reagent dart"
amount_per_transfer_from_this = 10
embedding = list("embed_chance" = 15, "embedded_fall_chance" = 0)
/obj/item/reagent_containers/syringe/dart/temp
item_flags = DROPDEL
/obj/item/reagent_containers/syringe/dart/temp/on_embed_removal(mob/living/carbon/human/embedde)
qdel(src)