Colored pillbottles

This commit is contained in:
Arkatos1
2019-04-30 19:34:22 +02:00
parent 3ce39ba6ea
commit e6dca3ffa1
4 changed files with 20 additions and 4 deletions
+1
View File
@@ -4,6 +4,7 @@
icon = 'icons/obj/dice.dmi'
icon_state = "dicebag"
can_hold = list(/obj/item/dice)
allow_wrap = FALSE
/obj/item/storage/pill_bottle/dice/New()
..()
@@ -254,10 +254,24 @@
var/applying_meds = FALSE //To Prevent spam clicking and generating runtimes from apply a deleting pill multiple times.
var/rapid_intake_message = "unscrews the cap on the pill bottle and begins dumping the entire contents down their throat!"
var/rapid_post_instake_message = "downs the entire bottle of pills in one go!"
var/allow_wrap = TRUE
var/wrapper_color = null
/obj/item/storage/pill_bottle/New()
..()
base_name = name
if(allow_wrap)
apply_wrap()
/obj/item/storage/pill_bottle/proc/apply_wrap()
if(wrapper_color)
overlays.Cut()
var/image/I = image(icon, "pillbottle_wrap")
I.color = wrapper_color
overlays += I
else
wrapper_color = pick(COLOR_RED, COLOR_BLUE, COLOR_CYAN, COLOR_GRAY, COLOR_GREEN, COLOR_ORANGE, COLOR_PINK, COLOR_RED, COLOR_YELLOW)
apply_wrap()
/obj/item/storage/pill_bottle/attack(mob/M, mob/user)
if(iscarbon(M) && contents.len)
@@ -324,10 +338,12 @@
cant_hold = list()
rapid_intake_message = "flips the lid of the Patch Pack open and begins rapidly stamping patches on themselves!"
rapid_post_instake_message = "stamps the entire contents of the Patch Pack all over their entire body!"
allow_wrap = FALSE
/obj/item/storage/pill_bottle/charcoal
name = "Pill bottle (Charcoal)"
desc = "Contains pills used to counter toxins."
wrapper_color = COLOR_GREEN
New()
..()
@@ -342,6 +358,7 @@
/obj/item/storage/pill_bottle/painkillers
name = "Pill Bottle (Salicylic Acid)"
desc = "Contains various pills for minor pain relief."
wrapper_color = COLOR_RED
/obj/item/storage/pill_bottle/painkillers/New()
..()