mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-12 11:13:16 +00:00
48 lines
1.3 KiB
Plaintext
48 lines
1.3 KiB
Plaintext
/obj/item/weapon/reagent_containers/blood
|
|
name = "BloodPack"
|
|
desc = "Contains blood used for transfusion."
|
|
icon = 'icons/obj/bloodpack.dmi'
|
|
icon_state = "empty"
|
|
volume = 200
|
|
|
|
var/blood_type = null
|
|
|
|
New()
|
|
..()
|
|
if(blood_type != null)
|
|
name = "BloodPack [blood_type]"
|
|
reagents.add_reagent("blood", 200, list("donor"=null,"viruses"=null,"blood_DNA"=null,"blood_type"=blood_type,"resistances"=null,"trace_chem"=null))
|
|
update_icon()
|
|
|
|
on_reagent_change()
|
|
update_icon()
|
|
|
|
update_icon()
|
|
var/percent = round((reagents.total_volume / volume) * 100)
|
|
switch(percent)
|
|
if(0 to 9) icon_state = "empty"
|
|
if(10 to 50) icon_state = "half"
|
|
if(51 to INFINITY) icon_state = "full"
|
|
|
|
/obj/item/weapon/reagent_containers/blood/APlus
|
|
blood_type = "A+"
|
|
|
|
/obj/item/weapon/reagent_containers/blood/AMinus
|
|
blood_type = "A-"
|
|
|
|
/obj/item/weapon/reagent_containers/blood/BPlus
|
|
blood_type = "B+"
|
|
|
|
/obj/item/weapon/reagent_containers/blood/BMinus
|
|
blood_type = "B-"
|
|
|
|
/obj/item/weapon/reagent_containers/blood/OPlus
|
|
blood_type = "O+"
|
|
|
|
/obj/item/weapon/reagent_containers/blood/OMinus
|
|
blood_type = "O-"
|
|
|
|
/obj/item/weapon/reagent_containers/blood/empty
|
|
name = "Empty BloodPack"
|
|
desc = "Seems pretty useless... Maybe if there were a way to fill it?"
|
|
icon_state = "empty" |