From 6b72a889e6e3fee0aea9a3d10553901cc5e11ca7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mieszko=20J=C4=99drzejczak?= Date: Thu, 14 Apr 2016 20:53:47 +0200 Subject: [PATCH] Shot glasses --- .../food/drinks/shotglass.dm | 23 +++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 code/modules/reagents/reagent_containers/food/drinks/shotglass.dm diff --git a/code/modules/reagents/reagent_containers/food/drinks/shotglass.dm b/code/modules/reagents/reagent_containers/food/drinks/shotglass.dm new file mode 100644 index 00000000000..a690b1400d4 --- /dev/null +++ b/code/modules/reagents/reagent_containers/food/drinks/shotglass.dm @@ -0,0 +1,23 @@ +/obj/item/weapon/reagent_containers/food/drinks/drinkingglass/shotglass + name = "shot glass" + desc = "A smaller glass for bigger beverages." + icon_state = "shotglass" + amount_per_transfer_from_this = 10 + volume = 15 + materials = list(MAT_GLASS=100) + +/obj/item/weapon/reagent_containers/food/drinks/drinkingglass/shotglass/on_reagent_change() + overlays.Cut() + + if(reagents.total_volume) + var/image/filling = image('icons/obj/reagentfillings.dmi', src, "[icon_state]1") + switch(reagents.total_volume) + if(0 to 4) filling.icon_state = "[icon_state]1" + if(5 to 11) filling.icon_state = "[icon_state]5" + if(12 to INFINITY) filling.icon_state = "[icon_state]12" + + filling.icon += mix_color_from_reagents(reagents.reagent_list) + overlays += filling + name = "shot glass of " + reagents.get_master_reagent_name() + else + name = "shot glass"