Added lids for bottles and beakers.

Click on vessel in hand to put lid on / take it off.
Lids prevent use of syringes and spilling.
This commit is contained in:
Chinsky
2013-05-26 06:38:38 +04:00
parent 13e2d8d793
commit f9b0ba7a49
4 changed files with 33 additions and 0 deletions

View File

@@ -43,8 +43,23 @@
usr << "\blue [R.volume] units of [R.name]"
else
usr << "\blue Nothing."
if (!is_open_container())
usr << "\blue Airtight lid seals it completely."
attack_self()
..()
if (is_open_container())
usr << "<span class = 'notice'>You put the lid on \the [src]."
flags ^= OPENCONTAINER
else
usr << "<span class = 'notice'>You take the lid off \the [src]."
flags |= OPENCONTAINER
update_icon()
afterattack(obj/target, mob/user , flag)
if (!is_open_container())
return
for(var/type in src.can_be_placed_into)
if(istype(target, type))
return
@@ -149,6 +164,10 @@
filling.icon += mix_color_from_reagents(reagents.reagent_list)
overlays += filling
if (!is_open_container())
var/image/lid = image(icon, src, "lid_[initial(icon_state)]")
overlays += lid
/obj/item/weapon/reagent_containers/glass/beaker/large
name = "large beaker"
desc = "A large beaker. Can hold up to 100 units."

View File

@@ -17,6 +17,13 @@
if(!icon_state)
icon_state = "bottle[rand(1,20)]"
update_icon()
overlays.Cut()
if (!is_open_container())
var/image/lid = image(icon, src, "lid_bottle")
overlays += lid
/obj/item/weapon/reagent_containers/glass/bottle/inaprovaline
name = "inaprovaline bottle"
desc = "A small bottle. Contains inaprovaline - used to stabilize patients."