mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-07-18 18:44:48 +01:00
Merge pull request #11767 from Arkatos1/pillbottle
New Medical Directive - Colored Pillbottles!
This commit is contained in:
@@ -57,6 +57,89 @@
|
||||
#define MAX_STACK_AMOUNT_GLASS 50
|
||||
#define MAX_STACK_AMOUNT_RODS 60
|
||||
|
||||
//Colors
|
||||
#define COLOR_RED "#FF0000"
|
||||
#define COLOR_GREEN "#00FF00"
|
||||
#define COLOR_BLUE "#0000FF"
|
||||
#define COLOR_CYAN "#00FFFF"
|
||||
#define COLOR_PINK "#FF00FF"
|
||||
#define COLOR_YELLOW "#FFFF00"
|
||||
#define COLOR_ORANGE "#FF9900"
|
||||
#define COLOR_WHITE "#FFFFFF"
|
||||
#define COLOR_GRAY "#808080"
|
||||
#define COLOR_BLACK "#000000"
|
||||
#define COLOR_NAVY_BLUE "#000080"
|
||||
#define COLOR_LIGHT_GREEN "#008000"
|
||||
#define COLOR_DARK_GRAY "#404040"
|
||||
#define COLOR_MAROON "#800000"
|
||||
#define COLOR_PURPLE "#800080"
|
||||
#define COLOR_VIOLET "#9933ff"
|
||||
#define COLOR_OLIVE "#808000"
|
||||
#define COLOR_BROWN_ORANGE "#824b28"
|
||||
#define COLOR_DARK_ORANGE "#b95a00"
|
||||
#define COLOR_GRAY40 "#666666"
|
||||
#define COLOR_GRAY20 "#333333"
|
||||
#define COLOR_GRAY15 "#151515"
|
||||
#define COLOR_SEDONA "#cc6600"
|
||||
#define COLOR_DARK_BROWN "#917448"
|
||||
#define COLOR_DEEP_SKY_BLUE "#00e1ff"
|
||||
#define COLOR_LIME "#00ff00"
|
||||
#define COLOR_TEAL "#33cccc"
|
||||
#define COLOR_PALE_PINK "#bf89ba"
|
||||
#define COLOR_YELLOW_GRAY "#c9a344"
|
||||
#define COLOR_PALE_YELLOW "#c1bb7a"
|
||||
#define COLOR_WARM_YELLOW "#b3863c"
|
||||
#define COLOR_RED_GRAY "#aa5f61"
|
||||
#define COLOR_BROWN "#b19664"
|
||||
#define COLOR_GREEN_GRAY "#8daf6a"
|
||||
#define COLOR_DARK_GREEN_GRAY "#54654c"
|
||||
#define COLOR_BLUE_GRAY "#6a97b0"
|
||||
#define COLOR_DARK_BLUE_GRAY "#3e4855"
|
||||
#define COLOR_SUN "#ec8b2f"
|
||||
#define COLOR_PURPLE_GRAY "#a2819e"
|
||||
#define COLOR_BLUE_LIGHT "#33ccff"
|
||||
#define COLOR_RED_LIGHT "#ff3333"
|
||||
#define COLOR_BEIGE "#ceb689"
|
||||
#define COLOR_BABY_BLUE "#89cff0"
|
||||
#define COLOR_PALE_GREEN_GRAY "#aed18b"
|
||||
#define COLOR_PALE_RED_GRAY "#cc9090"
|
||||
#define COLOR_PALE_PURPLE_GRAY "#bda2ba"
|
||||
#define COLOR_PALE_BLUE_GRAY "#8bbbd5"
|
||||
#define COLOR_LUMINOL "#66ffff"
|
||||
#define COLOR_SILVER "#c0c0c0"
|
||||
#define COLOR_GRAY80 "#cccccc"
|
||||
#define COLOR_OFF_WHITE "#eeeeee"
|
||||
#define COLOR_GOLD "#6d6133"
|
||||
#define COLOR_NT_RED "#9d2300"
|
||||
#define COLOR_BOTTLE_GREEN "#1f6b4f"
|
||||
#define COLOR_PALE_BTL_GREEN "#57967f"
|
||||
#define COLOR_GUNMETAL "#545c68"
|
||||
#define COLOR_WALL_GUNMETAL "#353a42"
|
||||
#define COLOR_STEEL "#a8b0b2"
|
||||
#define COLOR_MUZZLE_FLASH "#ffffb2"
|
||||
#define COLOR_CHESTNUT "#996633"
|
||||
#define COLOR_BEASTY_BROWN "#663300"
|
||||
#define COLOR_WHEAT "#ffff99"
|
||||
#define COLOR_CYAN_BLUE "#3366cc"
|
||||
#define COLOR_LIGHT_CYAN "#66ccff"
|
||||
#define COLOR_PAKISTAN_GREEN "#006600"
|
||||
#define COLOR_HULL "#436b8e"
|
||||
#define COLOR_AMBER "#ffbf00"
|
||||
#define COLOR_COMMAND_BLUE "#46698c"
|
||||
#define COLOR_SKY_BLUE "#5ca1cc"
|
||||
#define COLOR_PALE_ORANGE "#b88a3b"
|
||||
#define COLOR_CIVIE_GREEN "#b7f27d"
|
||||
#define COLOR_TITANIUM "#d1e6e3"
|
||||
#define COLOR_DARK_GUNMETAL "#4c535b"
|
||||
#define COLOR_BRONZE "#8c7853"
|
||||
#define COLOR_BRASS "#b99d71"
|
||||
#define COLOR_INDIGO "#4b0082"
|
||||
#define COLOR_ALUMINIUM "#bbbbbb"
|
||||
#define COLOR_CRYSTAL "#00c8a5"
|
||||
#define COLOR_ASTEROID_ROCK "#735555"
|
||||
#define COLOR_NULLGLASS "#ff6088"
|
||||
#define COLOR_DIAMOND "#d8d4ea"
|
||||
|
||||
//FONTS:
|
||||
// Used by Paper and PhotoCopier (and PaperBin once a year).
|
||||
// Used by PDA's Notekeeper.
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
/obj/item/storage/pill_bottle/happy
|
||||
name = "Happy pills"
|
||||
desc = "Highly illegal drug. When you want to see the rainbow."
|
||||
wrapper_color = COLOR_PINK
|
||||
|
||||
/obj/item/storage/pill_bottle/happy/New()
|
||||
..()
|
||||
@@ -18,6 +19,7 @@
|
||||
/obj/item/storage/pill_bottle/zoom
|
||||
name = "Zoom pills"
|
||||
desc = "Highly illegal drug. Trade brain for speed."
|
||||
wrapper_color = COLOR_BLUE
|
||||
|
||||
/obj/item/storage/pill_bottle/zoom/New()
|
||||
..()
|
||||
@@ -49,15 +51,12 @@
|
||||
adulterants--
|
||||
reagents.add_reagent(pick_list("chemistry_tools.json", "CYBERPUNK_drug_adulterants"), 3)
|
||||
|
||||
|
||||
|
||||
/obj/item/storage/pill_bottle/random_drug_bottle
|
||||
name = "pill bottle (???)"
|
||||
desc = "Huh."
|
||||
allow_wrap = FALSE
|
||||
|
||||
/obj/item/storage/pill_bottle/random_drug_bottle/New()
|
||||
..()
|
||||
for(var/i in 1 to 5)
|
||||
new /obj/item/reagent_containers/food/pill/random_drugs(src)
|
||||
|
||||
|
||||
|
||||
@@ -123,6 +123,7 @@
|
||||
/obj/item/storage/pill_bottle/random_meds
|
||||
name = "unlabelled pillbottle"
|
||||
desc = "The sheer recklessness of this bottle's existence astounds you."
|
||||
allow_wrap = FALSE
|
||||
var/labelled = FALSE
|
||||
|
||||
/obj/item/storage/pill_bottle/random_meds/New()
|
||||
|
||||
@@ -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,21 @@
|
||||
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
|
||||
|
||||
/obj/item/storage/pill_bottle/attack(mob/M, mob/user)
|
||||
if(iscarbon(M) && contents.len)
|
||||
@@ -274,6 +285,9 @@
|
||||
else
|
||||
return ..()
|
||||
|
||||
/obj/item/storage/pill_bottle/ert
|
||||
wrapper_color = COLOR_MAROON
|
||||
|
||||
/obj/item/storage/pill_bottle/ert/New()
|
||||
..()
|
||||
new /obj/item/reagent_containers/food/pill/salicylic(src)
|
||||
@@ -319,15 +333,18 @@
|
||||
|
||||
/obj/item/storage/pill_bottle/patch_pack
|
||||
name = "Patch Pack"
|
||||
desc = "It's a container for storing medical patches."
|
||||
icon_state = "patch_pack"
|
||||
can_hold = list(/obj/item/reagent_containers/food/pill/patch)
|
||||
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 +359,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()
|
||||
..()
|
||||
@@ -354,8 +372,11 @@
|
||||
new /obj/item/reagent_containers/food/pill/salicylic(src)
|
||||
new /obj/item/reagent_containers/food/pill/salicylic(src)
|
||||
|
||||
/obj/item/storage/pill_bottle/fakedeath
|
||||
allow_wrap = FALSE
|
||||
|
||||
/obj/item/storage/pill_bottle/fakedeath/New()
|
||||
..()
|
||||
new /obj/item/reagent_containers/food/pill/fakedeath(src)
|
||||
new /obj/item/reagent_containers/food/pill/fakedeath(src)
|
||||
new /obj/item/reagent_containers/food/pill/fakedeath(src)
|
||||
new /obj/item/reagent_containers/food/pill/fakedeath(src)
|
||||
|
||||
@@ -110,6 +110,7 @@
|
||||
/obj/item/storage/pill_bottle/psychiatrist
|
||||
name = "psychiatrist's pill bottle"
|
||||
desc = "Contains various pills to calm or sedate patients."
|
||||
wrapper_color = COLOR_PALE_BTL_GREEN
|
||||
|
||||
/obj/item/storage/pill_bottle/psychiatrist/New()
|
||||
..()
|
||||
|
||||
@@ -133,6 +133,39 @@
|
||||
if(loaded_pill_bottle)
|
||||
loaded_pill_bottle.forceMove(loc)
|
||||
loaded_pill_bottle = null
|
||||
else if(href_list["change_pillbottle"])
|
||||
if(loaded_pill_bottle)
|
||||
var/list/wrappers = list("Default wrapper", "Red wrapper", "Green wrapper", "Pale green wrapper", "Blue wrapper", "Light blue wrapper", "Teal wrapper", "Yellow wrapper", "Orange wrapper", "Pink wrapper", "Brown wrapper")
|
||||
var/chosen = input(usr, "Select a pillbottle wrapper", "Pillbottle wrapper", wrappers[1]) as null|anything in wrappers
|
||||
if(!chosen)
|
||||
return
|
||||
var/color
|
||||
switch(chosen)
|
||||
if("Default wrapper")
|
||||
loaded_pill_bottle.cut_overlays()
|
||||
return
|
||||
if("Red wrapper")
|
||||
color = COLOR_RED
|
||||
if("Green wrapper")
|
||||
color = COLOR_GREEN
|
||||
if("Pink wrapper")
|
||||
color = COLOR_PINK
|
||||
if("Teal wrapper")
|
||||
color = COLOR_TEAL
|
||||
if("Blue wrapper")
|
||||
color = COLOR_BLUE
|
||||
if("Brown wrapper")
|
||||
color = COLOR_MAROON
|
||||
if("Light blue wrapper")
|
||||
color = COLOR_CYAN_BLUE
|
||||
if("Yellow wrapper")
|
||||
color = COLOR_YELLOW
|
||||
if("Pale green wrapper")
|
||||
color = COLOR_PALE_BTL_GREEN
|
||||
if("Orange wrapper")
|
||||
color = COLOR_ORANGE
|
||||
loaded_pill_bottle.wrapper_color = color;
|
||||
loaded_pill_bottle.apply_wrap();
|
||||
else if(href_list["close"])
|
||||
usr << browse(null, "window=chem_master")
|
||||
onclose(usr, "chem_master")
|
||||
@@ -185,7 +218,7 @@
|
||||
dat += "<A href='?src=[UID()];main=1'>(Back)</A>"
|
||||
else
|
||||
dat += "<TITLE>Condimaster 3000</TITLE>Condiment infos:<BR><BR>Name:<BR>[href_list["name"]]<BR><BR>Description:<BR>[href_list["desc"]]<BR><BR><BR><A href='?src=[UID()];main=1'>(Back)</A>"
|
||||
usr << browse(dat, "window=chem_master;size=575x400")
|
||||
usr << browse(dat, "window=chem_master;size=575x500")
|
||||
return
|
||||
|
||||
else if(href_list["add"])
|
||||
@@ -388,7 +421,7 @@
|
||||
|
||||
ui = SSnanoui.try_update_ui(user, src, ui_key, ui, force_open)
|
||||
if(!ui)
|
||||
ui = new(user, src, ui_key, "chem_master.tmpl", name, 575, 400)
|
||||
ui = new(user, src, ui_key, "chem_master.tmpl", name, 575, 500)
|
||||
ui.open()
|
||||
|
||||
/obj/machinery/chem_master/ui_data(mob/user, ui_key = "main", datum/topic_state/state = default_state)
|
||||
|
||||
Reference in New Issue
Block a user