Replaced codersprite for bloodpack with new ones.

Also now sprite changes depending on how filed bag is.
This commit is contained in:
Chinsky
2013-01-03 03:40:36 +04:00
parent 5e24bc8f34
commit 73cdecd81d
2 changed files with 12 additions and 0 deletions

View File

@@ -2,6 +2,7 @@
name = "BloodPack"
desc = "Contains blood used for transfusion."
icon = 'icons/obj/bloodpack.dmi'
icon_state = "empty"
volume = 200
var/blood_type = null
@@ -11,6 +12,17 @@
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+"