Files
Polaris/code/game/objects/items/contraband.dm
Novacat 5b18382ca6 Grey scale pills and colored pillbottles (#6199)
* Grey scale pills and colored pillbottles

Baystation ports of PR #19714 and PR #21578

Known issue: The Chem master's pill selection does not properly show the grey scale pills, unfortunately. There is a 'close enough' approximation, however.

* Minor oversights

* Another oversight

* Programming language confusion

* Corrects some code
2019-06-16 20:28:02 -05:00

42 lines
1.4 KiB
Plaintext

//Let's get some REAL contraband stuff in here. Because come on, getting brigged for LIPSTICK is no fun.
//Illicit drugs~
/obj/item/weapon/storage/pill_bottle/happy
name = "bottle of Happy pills"
desc = "Highly illegal drug. When you want to see the rainbow."
wrapper_color = COLOR_PINK
starts_with = list(/obj/item/weapon/reagent_containers/pill/happy = 7)
/obj/item/weapon/storage/pill_bottle/zoom
name = "bottle of Zoom pills"
desc = "Highly illegal drug. Trade brain for speed."
wrapper_color = COLOR_BLUE
starts_with = list(/obj/item/weapon/reagent_containers/pill/zoom = 7)
/obj/item/weapon/reagent_containers/glass/beaker/vial/random
flags = 0
var/list/random_reagent_list = list(list("water" = 15) = 1, list("cleaner" = 15) = 1)
/obj/item/weapon/reagent_containers/glass/beaker/vial/random/toxin
random_reagent_list = list(
list("mindbreaker" = 10, "space_drugs" = 20) = 3,
list("carpotoxin" = 15) = 2,
list("impedrezene" = 15) = 2,
list("zombiepowder" = 10) = 1)
/obj/item/weapon/reagent_containers/glass/beaker/vial/random/Initialize()
. = ..()
if(is_open_container())
flags ^= OPENCONTAINER
var/list/picked_reagents = pickweight(random_reagent_list)
for(var/reagent in picked_reagents)
reagents.add_reagent(reagent, picked_reagents[reagent])
var/list/names = new
for(var/datum/reagent/R in reagents.reagent_list)
names += R.name
desc = "Contains [english_list(names)]."
update_icon()