mirror of
https://github.com/KabKebab/GS13.git
synced 2026-07-13 08:57:01 +01:00
@@ -13,7 +13,8 @@
|
||||
var/obj/item/reagent_containers/beaker = null
|
||||
var/static/list/drip_containers = typecacheof(list(/obj/item/reagent_containers/blood,
|
||||
/obj/item/reagent_containers/food,
|
||||
/obj/item/reagent_containers/glass))
|
||||
/obj/item/reagent_containers/glass,
|
||||
/obj/item/reagent_containers/chem_pack))
|
||||
|
||||
/obj/machinery/iv_drip/Initialize()
|
||||
. = ..()
|
||||
@@ -129,9 +130,7 @@
|
||||
if(istype(beaker, /obj/item/reagent_containers/blood))
|
||||
// speed up transfer on blood packs
|
||||
transfer_amount = 10
|
||||
var/fraction = min(transfer_amount/beaker.reagents.total_volume, 1) //the fraction that is transfered of the total volume
|
||||
beaker.reagents.reaction(attached, INJECT, fraction, FALSE) //make reagents reacts, but don't spam messages
|
||||
beaker.reagents.trans_to(attached, transfer_amount)
|
||||
beaker.reagents.trans_to(attached, transfer_amount, method = INJECT, show_message = FALSE) //make reagents reacts, but don't spam messages
|
||||
update_icon()
|
||||
|
||||
// Take blood
|
||||
|
||||
@@ -364,7 +364,7 @@
|
||||
STR.max_combined_w_class = 200
|
||||
STR.max_items = 50
|
||||
STR.insert_preposition = "in"
|
||||
STR.can_hold = typecacheof(list(/obj/item/reagent_containers/pill, /obj/item/reagent_containers/glass/beaker, /obj/item/reagent_containers/glass/bottle))
|
||||
STR.can_hold = typecacheof(list(/obj/item/reagent_containers/pill, /obj/item/reagent_containers/glass/beaker, /obj/item/reagent_containers/glass/bottle, /obj/item/reagent_containers/chem_pack))
|
||||
|
||||
/*
|
||||
* Biowaste bag (mostly for xenobiologists)
|
||||
|
||||
@@ -141,8 +141,7 @@ All foods are distributed among various categories. Use common sense.
|
||||
if(reagents.total_volume)
|
||||
SEND_SIGNAL(src, COMSIG_FOOD_EATEN, M, user)
|
||||
var/fraction = min(bitesize / reagents.total_volume, 1)
|
||||
reagents.reaction(M, INGEST, fraction)
|
||||
reagents.trans_to(M, bitesize)
|
||||
reagents.trans_to(M, bitesize, transfered_by = user, method = INGEST)
|
||||
bitecount++
|
||||
On_Consume(M)
|
||||
checkLiked(fraction, M)
|
||||
|
||||
@@ -161,3 +161,5 @@
|
||||
new /obj/item/reagent_containers/food/snacks/salad/ricebowl(location)
|
||||
if(holder && holder.my_atom)
|
||||
qdel(holder.my_atom)
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,49 @@
|
||||
/obj/item/reagent_containers/chem_pack
|
||||
name = "intravenous medicine bag"
|
||||
desc = "A plastic pressure bag, or 'chem pack', for IV administration of drugs. It is fitted with a thermosealing strip."
|
||||
icon = 'icons/obj/blood_pack.dmi'
|
||||
icon_state = "chempack"
|
||||
volume = 100
|
||||
reagent_flags = OPENCONTAINER
|
||||
spillable = TRUE
|
||||
obj_flags = UNIQUE_RENAME
|
||||
resistance_flags = ACID_PROOF
|
||||
var/sealed = FALSE
|
||||
|
||||
/obj/item/reagent_containers/chem_pack/on_reagent_change(changetype)
|
||||
update_icon()
|
||||
|
||||
/obj/item/reagent_containers/chem_pack/update_icon()
|
||||
cut_overlays()
|
||||
|
||||
var/v = min(round(reagents.total_volume / volume * 10), 10)
|
||||
if(v > 0)
|
||||
var/mutable_appearance/filling = mutable_appearance('icons/obj/reagentfillings.dmi', "chempack1")
|
||||
filling.icon_state = "chempack[v]"
|
||||
filling.color = mix_color_from_reagents(reagents.reagent_list)
|
||||
add_overlay(filling)
|
||||
|
||||
/obj/item/reagent_containers/chem_pack/AltClick(mob/living/user)
|
||||
if(user.canUseTopic(src, BE_CLOSE, NO_DEXTERY) && !sealed)
|
||||
if(iscarbon(user) && (HAS_TRAIT(user, TRAIT_CLUMSY) && prob(50)))
|
||||
to_chat(user, "<span class='warning'>Uh... whoops! You accidentally spill the content of the bag onto yourself.</span>")
|
||||
SplashReagents(user)
|
||||
return
|
||||
|
||||
reagent_flags = DRAWABLE | INJECTABLE //To allow for sabotage or ghetto use.
|
||||
spillable = FALSE
|
||||
sealed = TRUE
|
||||
to_chat(user, "<span class='notice'>You seal the bag.</span>")
|
||||
|
||||
/obj/item/reagent_containers/chem_pack/examine()
|
||||
. = ..()
|
||||
if(sealed)
|
||||
. += "<span class='notice'>The bag is sealed shut.</span>"
|
||||
else
|
||||
. += "<span class='notice'>Alt-click to seal it.</span>"
|
||||
|
||||
|
||||
obj/item/reagent_containers/chem_pack/attack_self(mob/user)
|
||||
if(sealed)
|
||||
return
|
||||
..()
|
||||
@@ -182,6 +182,17 @@
|
||||
category = list("Medical Designs")
|
||||
departmental_flags = DEPARTMENTAL_FLAG_MEDICAL | DEPARTMENTAL_FLAG_SCIENCE
|
||||
|
||||
|
||||
/datum/design/chem_pack
|
||||
name = "Intravenous Medicine Bag"
|
||||
desc = "A plastic pressure bag for IV administration of drugs."
|
||||
id = "chem_pack"
|
||||
build_type = PROTOLATHE
|
||||
departmental_flags = DEPARTMENTAL_FLAG_MEDICAL
|
||||
materials = list(MAT_PLASTIC = 2000)
|
||||
build_path = /obj/item/reagent_containers/chem_pack
|
||||
category = list("Medical Designs")
|
||||
|
||||
/datum/design/blood_bag
|
||||
name = "Empty Blood Bag"
|
||||
desc = "A small sterilized plastic bag for blood."
|
||||
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 1.2 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 950 B After Width: | Height: | Size: 1.2 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 3.8 KiB After Width: | Height: | Size: 4.2 KiB |
Reference in New Issue
Block a user