diff --git a/code/game/mecha/equipment/tools/medical_tools.dm b/code/game/mecha/equipment/tools/medical_tools.dm index 23271355206..d95570cf88f 100644 --- a/code/game/mecha/equipment/tools/medical_tools.dm +++ b/code/game/mecha/equipment/tools/medical_tools.dm @@ -481,7 +481,7 @@ return 0 occupant_message("Analyzing reagents...") for(var/datum/reagent/R in A.reagents.reagent_list) - if(R.reagent_state == 2 && add_known_reagent(R.id,R.name)) + if(R.can_synth && add_known_reagent(R.id, R.name)) occupant_message("Reagent analyzed, identified as [R.name] and added to database.") send_byjax(chassis.occupant,"msyringegun.browser","reagents_form",get_reagents_form()) occupant_message("Analyzis complete.") diff --git a/code/game/objects/items/devices/scanners.dm b/code/game/objects/items/devices/scanners.dm index 4b3a656c02e..9a9edbb62ad 100644 --- a/code/game/objects/items/devices/scanners.dm +++ b/code/game/objects/items/devices/scanners.dm @@ -381,9 +381,7 @@ REAGENT SCANNER /obj/item/device/mass_spectrometer/New() ..() - var/datum/reagents/R = new/datum/reagents(5) - reagents = R - R.my_atom = src + create_reagents(5) /obj/item/device/mass_spectrometer/on_reagent_change() if(reagents.total_volume) diff --git a/code/game/objects/items/toys.dm b/code/game/objects/items/toys.dm index 295a1538a65..01891d4c77a 100644 --- a/code/game/objects/items/toys.dm +++ b/code/game/objects/items/toys.dm @@ -38,9 +38,7 @@ item_state = "balloon-empty" /obj/item/toy/balloon/New() - var/datum/reagents/R = new/datum/reagents(10) - reagents = R - R.my_atom = src + create_reagents(10) /obj/item/toy/balloon/attack(mob/living/carbon/human/M as mob, mob/user as mob) return diff --git a/code/game/objects/structures/mop_bucket.dm b/code/game/objects/structures/mop_bucket.dm index 68589112080..49175dfa9e3 100644 --- a/code/game/objects/structures/mop_bucket.dm +++ b/code/game/objects/structures/mop_bucket.dm @@ -8,9 +8,7 @@ var/amount_per_transfer_from_this = 5 //shit I dunno, adding this so syringes stop runtime erroring. --NeoFite /obj/structure/mopbucket/New() - var/datum/reagents/R = new/datum/reagents(100) - reagents = R - R.my_atom = src + create_reagents(100) janitorial_equipment += src /obj/structure/mopbucket/full/New() diff --git a/code/modules/food_and_drinks/drinks/drinks/bottle.dm b/code/modules/food_and_drinks/drinks/drinks/bottle.dm index 7ee7509d8f1..53130d972f4 100644 --- a/code/modules/food_and_drinks/drinks/drinks/bottle.dm +++ b/code/modules/food_and_drinks/drinks/drinks/bottle.dm @@ -284,7 +284,7 @@ desc = "A throwing weapon used to ignite things, typically filled with an accelerant. Recommended highly by rioters and revolutionaries. Light and toss." icon_state = "vodkabottle" list_reagents = list() - var/list/accelerants = list(/datum/reagent/ethanol,/datum/reagent/fuel,/datum/reagent/clf3,/datum/reagent/phlogiston, + var/list/accelerants = list(/datum/reagent/consumable/ethanol,/datum/reagent/fuel,/datum/reagent/clf3,/datum/reagent/phlogiston, /datum/reagent/napalm,/datum/reagent/hellwater,/datum/reagent/plasma,/datum/reagent/plasma_dust) var/active = 0 diff --git a/code/modules/food_and_drinks/drinks/drinks/drinkingglass.dm b/code/modules/food_and_drinks/drinks/drinks/drinkingglass.dm index bc1442038e9..0412c93626b 100644 --- a/code/modules/food_and_drinks/drinks/drinks/drinkingglass.dm +++ b/code/modules/food_and_drinks/drinks/drinks/drinkingglass.dm @@ -36,523 +36,12 @@ reagents.clear_reagents() extinguish() -/obj/item/weapon/reagent_containers/food/drinks/drinkingglass/on_reagent_change() // *scream - if(reagents.reagent_list.len > 0) - switch(reagents.get_master_reagent_id()) - if("beer") - icon_state = "beerglass" - name = "Beer glass" - desc = "A freezing pint of beer" - if("cider") - icon_state = "rewriter" - name = "Cider" - desc = "a refreshing glass of traditional cider" - if("beer2") - icon_state = "beerglass" - name = "Beer glass" - desc = "A freezing pint of beer" - if("ale") - icon_state = "aleglass" - name = "Ale glass" - desc = "A freezing pint of delicious Ale" - if("milk") - icon_state = "glass_white" - name = "Glass of milk" - desc = "White and nutritious goodness!" - if("cream") - icon_state = "glass_white" - name = "Glass of cream" - desc = "Ewwww..." - if("chocolate") - icon_state = "chocolateglass" - name = "Glass of chocolate" - desc = "Tasty" - if("hot_coco") - icon_state = "hot_coco" - name = "Glass of hot coco" - desc = "Delicious and cozy" - if("lemonjuice") - icon_state = "lemonglass" - name = "Glass of lemonjuice" - desc = "Sour..." - if("cola") - icon_state = "glass_brown" - name = "Glass of Space Cola" - desc = "A glass of refreshing Space Cola" - if("nuka_cola") - icon_state = "nuka_colaglass" - name = "Nuka Cola" - desc = "Don't cry, Don't raise your eye, It's only nuclear wasteland" - if("orangejuice") - icon_state = "glass_orange" - name = "Glass of Orange juice" - desc = "Vitamins! Yay!" - if("tomatojuice") - icon_state = "glass_red" - name = "Glass of Tomato juice" - desc = "Are you sure this is tomato juice?" - if("blood") - icon_state = "glass_red" - name = "Glass of Tomato juice" - desc = "Are you sure this is tomato juice?" - if("limejuice") - icon_state = "glass_green" - name = "Glass of Lime juice" - desc = "A glass of sweet-sour lime juice." - if("whiskey") - icon_state = "whiskeyglass" - name = "Glass of whiskey" - desc = "The silky, smokey whiskey goodness inside the glass makes the drink look very classy." - if("gin") - icon_state = "ginvodkaglass" - name = "Glass of gin" - desc = "A crystal clear glass of Griffeater gin." - if("vodka") - icon_state = "ginvodkaglass" - name = "Glass of vodka" - desc = "The glass contain wodka. Xynta." - if("sake") - icon_state = "ginvodkaglass" - name = "Glass of Sake" - desc = "A glass of Sake." - if("goldschlager") - icon_state = "ginvodkaglass" - name = "Glass of goldschlager" - desc = "100 proof that teen girls will drink anything with gold in it." - if("wine") - icon_state = "wineglass" - name = "Glass of wine" - desc = "A very classy looking drink." - if("cognac") - icon_state = "cognacglass" - name = "Glass of cognac" - desc = "Damn, you feel like some kind of French aristocrat just by holding this." - if("kahlua") - icon_state = "kahluaglass" - name = "Glass of RR coffee Liquor" - desc = "DAMN, THIS THING LOOKS ROBUST" - if("vermouth") - icon_state = "vermouthglass" - name = "Glass of Vermouth" - desc = "You wonder why you're even drinking this straight." - if("triple_citrus") - icon_state = "triplecitrus" - name = "Glass of Triplecitrus Juice" - desc = "As colorful and healthy as it is delicious." - if("mojito") - icon_state = "mojito" - name = "Glass of Mojito" - desc = "Fresh from Spesscuba." - if("tequila") - icon_state = "tequilaglass" - name = "Glass of Tequila" - desc = "Now all that's missing is the weird colored shades!" - if("patron") - icon_state = "patronglass" - name = "Glass of Patron" - desc = "Drinking patron in the bar, with all the subpar ladies." - if("rum") - icon_state = "rumglass" - name = "Glass of Rum" - desc = "Now you want to Pray for a pirate suit, don't you?" - if("absinthe") - icon_state = "absinthebottle" - name = "Glass of Absinthe" - desc = "The green fairy is going to get you now!" - if("gintonic") - icon_state = "gintonicglass" - name = "Gin and Tonic" - desc = "A mild but still great cocktail. Drink up, like a true Englishman." - if("ginsonic") - icon_state = "ginsonic" - name = "Gin and Sonic" - desc = "An extremely high amperage drink. Absolutely not for the true Englishman." - if("whiskeycola") - icon_state = "whiskeycolaglass" - name = "Whiskey Cola" - desc = "An innocent-looking mixture of cola and Whiskey. Delicious." - if("whiterussian") - icon_state = "whiterussianglass" - name = "White Russian" - desc = "A very nice looking drink. But that's just, like, your opinion, man." - if("screwdrivercocktail") - icon_state = "screwdriverglass" - name = "Screwdriver" - desc = "A simple, yet superb mixture of Vodka and orange juice. Just the thing for the tired engineer." - if("bloodymary") - icon_state = "bloodymaryglass" - name = "Bloody Mary" - desc = "Tomato juice, mixed with Vodka and a lil' bit of lime. Tastes like liquid murder." - if("martini") - icon_state = "martiniglass" - name = "Classic Martini" - desc = "Damn, the bartender even stirred it, not shook it." - if("vodkamartini") - icon_state = "martiniglass" - name = "Vodka martini" - desc ="A bastardisation of the classic martini. Still great." - if("gargleblaster") - icon_state = "gargleblasterglass" - name = "Pan-Galactic Gargle Blaster" - desc = "Does... does this mean that Arthur and Ford are on the station? Oh joy." - if("bravebull") - icon_state = "bravebullglass" - name = "Brave Bull" - desc = "Tequila and Coffee liquor, brought together in a mouthwatering mixture. Drink up." - if("tequilasunrise") - icon_state = "tequilasunriseglass" - name = "Tequila Sunrise" - desc = "Oh great, now you feel nostalgic about sunrises back on Terra..." - if("toxinsspecial") - icon_state = "toxinsspecialglass" - name = "Toxins Special" - desc = "Whoah, this thing is on FIRE" - if("beepskysmash") - icon_state = "beepskysmashglass" - name = "Beepsky Smash" - desc = "Heavy, hot and strong. Just like the Iron fist of the LAW." - if("doctorsdelight") - icon_state = "doctorsdelightglass" - name = "Doctor's Delight" - desc = "A healthy mixture of juices, guaranteed to keep you healthy until the next toolboxing takes place." - if("manlydorf") - icon_state = "manlydorfglass" - name = "The Manly Dorf" - desc = "A manly concotion made from Ale and Beer. Intended for true men only." - if("irishcream") - icon_state = "irishcreamglass" - name = "Irish Cream" - desc = "It's cream, mixed with whiskey. What else would you expect from the Irish?" - if("cubalibre") - icon_state = "cubalibreglass" - name = "Cuba Libre" - desc = "A classic mix of rum and cola." - if("b52") - icon_state = "b52glass" - name = "B-52" - desc = "Kahlua, Irish Cream, and congac. You will get bombed." - if("atomicbomb") - icon_state = "atomicbombglass" - name = "Atomic Bomb" - desc = "Nanotrasen cannot take legal responsibility for your actions after imbibing." - if("longislandicedtea") - icon_state = "longislandicedteaglass" - name = "Long Island Iced Tea" - desc = "The liquor cabinet, brought together in a delicious mix. Intended for middle-aged alcoholic women only." - if("threemileisland") - icon_state = "threemileislandglass" - name = "Three Mile Island Ice Tea" - desc = "A glass of this is sure to prevent a meltdown." - if("margarita") - icon_state = "margaritaglass" - name = "Margarita" - desc = "On the rocks with salt on the rim. Arriba~!" - if("blackrussian") - icon_state = "blackrussianglass" - name = "Black Russian" - desc = "For the lactose-intolerant. Still as classy as a White Russian." - if("vodkatonic") - icon_state = "vodkatonicglass" - name = "Vodka and Tonic" - desc = "For when a gin and tonic isn't russian enough." - if("manhattan") - icon_state = "manhattanglass" - name = "Manhattan" - desc = "The Detective's undercover drink of choice. He never could stomach gin..." - if("manhattan_proj") - icon_state = "proj_manhattanglass" - name = "Manhattan Project" - desc = "A scienitst drink of choice, for thinking how to blow up the station." - if("ginfizz") - icon_state = "ginfizzglass" - name = "Gin Fizz" - desc = "Refreshingly lemony, deliciously dry." - if("irishcoffee") - icon_state = "irishcoffeeglass" - name = "Irish Coffee" - desc = "Coffee and alcohol. More fun than a Mimosa to drink in the morning." - if("suicider") - icon_state = "suicider" - name = "Suicider" - desc = "You've really hit rock bottom now... your liver packed its bags and left last night." - if("whiskeysoda") - icon_state = "whiskeysodaglass2" - name = "Whiskey Soda" - desc = "Ultimate refreshment." - if("tonic") - icon_state = "glass_clear" - name = "Glass of Tonic Water" - desc = "Quinine tastes funny, but at least it'll keep that Space Malaria away." - if("sodawater") - icon_state = "glass_clear" - name = "Glass of Soda Water" - desc = "Soda water. Why not make a scotch and soda?" - if("water") - icon_state = "glass_clear" - name = "Glass of Water" - desc = "The father of all refreshments." - if("spacemountainwind") - icon_state = "Space_mountain_wind_glass" - name = "Glass of Space Mountain Wind" - desc = "Space Mountain Wind. As you know, there are no mountains in space, only wind." - if("thirteenloko") - icon_state = "thirteen_loko_glass" - name = "Glass of Thirteen Loko" - desc = "This is a glass of Thirteen Loko, it appears to be of the highest quality. The drink, not the glass" - if("dr_gibb") - icon_state = "dr_gibb_glass" - name = "Glass of Dr. Gibb" - desc = "Dr. Gibb. Not as dangerous as the name might imply." - if("space_up") - icon_state = "space-up_glass" - name = "Glass of Space-up" - desc = "Space-up. It helps keep your cool." - if("moonshine") - icon_state = "glass_clear" - name = "Moonshine" - desc = "You've really hit rock bottom now... your liver packed its bags and left last night." - if("soymilk") - icon_state = "glass_white" - name = "Glass of soy milk" - desc = "White and nutritious soy goodness!" - if("berryjuice") - icon_state = "berryjuice" - name = "Glass of berry juice" - desc = "Berry juice. Or maybe its jam. Who cares?" - if("poisonberryjuice") - icon_state = "poisonberryjuice" - name = "Glass of poison berry juice" - desc = "A glass of deadly juice." - if("carrotjuice") - icon_state = "carrotjuice" - name = "Glass of carrot juice" - desc = "It is just like a carrot but without crunching." - if("potato") - icon_state = "glass_brown" - name = "Glass of potato juice" - desc = "Who in the hell requests this? Gross!" - if("banana") - icon_state = "banana" - name = "Glass of banana juice" - desc = "The raw essence of a banana. HONK" - if("bahama_mama") - icon_state = "bahama_mama" - name = "Bahama Mama" - desc = "Tropic cocktail" - if("singulo") - icon_state = "singulo" - name = "Singulo" - desc = "A blue-space beverage." - if("alliescocktail") - icon_state = "alliescocktail" - name = "Allies cocktail" - desc = "A drink made from your allies." - if("antifreeze") - icon_state = "antifreeze" - name = "Anti-freeze" - desc = "The ultimate refreshment." - if("barefoot") - icon_state = "b&p" - name = "Barefoot" - desc = "Barefoot and pregnant" - if("demonsblood") - icon_state = "demonsblood" - name = "Demons Blood" - desc = "Just looking at this thing makes the hair at the back of your neck stand up." - if("booger") - icon_state = "booger" - name = "Booger" - desc = "Ewww..." - if("snowwhite") - icon_state = "snowwhite" - name = "Snow White" - desc = "A cold refreshment." - if("aloe") - icon_state = "aloe" - name = "Aloe" - desc = "Very, very, very good." - if("andalusia") - icon_state = "andalusia" - name = "Andalusia" - desc = "A nice, strange named drink." - if("sbiten") - icon_state = "sbitenglass" - name = "Sbiten" - desc = "A spicy mix of Vodka and Spice. Very hot." - if("red_mead") - icon_state = "red_meadglass" - name = "Red Mead" - desc = "A True Vikings Beverage, though its color is strange." - if("mead") - icon_state = "meadglass" - name = "Mead" - desc = "A Vikings Beverage, though a cheap one." - if("iced_beer") - icon_state = "iced_beerglass" - name = "Iced Beer" - desc = "A beer so frosty, the air around it freezes." - if("grog") - icon_state = "grogglass" - name = "Grog" - desc = "A fine and cepa drink for Space." - if("soy_latte") - icon_state = "soy_latte" - name = "Soy Latte" - desc = "A nice and refrshing beverage while you are reading." - if("cafe_latte") - icon_state = "cafe_latte" - name = "Cafe Latte" - desc = "A nice, strong and refreshing beverage while you are reading." - if("cafe_mocha") - icon_state = "cafe_latte" - name = "Cafe Mocha" - desc = "The perfect blend of coffe, milk, and chocolate." - if("acidspit") - icon_state = "acidspitglass" - name = "Acid Spit" - desc = "A drink from Nanotrasen. Made from live aliens." - if("amasec") - icon_state = "amasecglass" - name = "Amasec" - desc = "Always handy before COMBAT!!!" - if("neurotoxin") - icon_state = "neurotoxinglass" - name = "Neurotoxin" - desc = "A drink that is guaranteed to knock you silly." - if("hippiesdelight") - icon_state = "hippiesdelightglass" - name = "Hippie's Delight" - desc = "A drink enjoyed by people during the 1960's." - if("bananahonk") - icon_state = "bananahonkglass" - name = "Banana Honk" - desc = "A drink from Banana Heaven." - if("silencer") - icon_state = "silencerglass" - name = "Silencer" - desc = "A drink from mime Heaven." - if("nothing") - icon_state = "nothing" - name = "Nothing" - desc = "Absolutely nothing." - if("devilskiss") - icon_state = "devilskiss" - name = "Devils Kiss" - desc = "Creepy time!" - if("changelingsting") - icon_state = "changelingsting" - name = "Changeling Sting" - desc = "A stingy drink." - if("irishcarbomb") - icon_state = "irishcarbomb" - name = "Irish Car Bomb" - desc = "An irish car bomb." - if("syndicatebomb") - icon_state = "syndicatebomb" - name = "Syndicate Bomb" - desc = "A syndicate bomb." - if("erikasurprise") - icon_state = "erikasurprise" - name = "Erika Surprise" - desc = "The surprise is, it's green!" - if("driestmartini") - icon_state = "driestmartiniglass" - name = "Driest Martini" - desc = "Only for the experienced. You think you see sand floating in the glass." - if("ice") - icon_state = "iceglass" - name = "Glass of ice" - desc = "Generally, you're supposed to put something else in there too..." - if("icecoffee") - icon_state = "icedcoffeeglass" - name = "Iced Coffee" - desc = "A drink to perk you up and refresh you!" - if("coffee") - icon_state = "glass_brown" - name = "Glass of coffee" - desc = "Don't drop it, or you'll send scalding liquid and glass shards everywhere." - if("bilk") - icon_state = "glass_brown" - name = "Glass of bilk" - desc = "A brew of milk and beer. For those alcoholics who fear osteoporosis." - if("fuel") - icon_state = "dr_gibb_glass" - name = "Glass of welder fuel" - desc = "Unless you are an industrial tool, this is probably not safe for consumption." - if("brownstar") - icon_state = "brownstar" - name = "Brown Star" - desc = "Its not what it sounds like..." - if("tea") - icon_state = "glass_brown" - name = "Glass of Tea" - desc = "A glass of hot tea. Perhaps a cup with a handle would have been smarter?" - if("icetea") - icon_state = "icetea" - name = "Iced Tea" - desc = "No relation to a certain rap artist/ actor." - if("milkshake") - icon_state = "milkshake" - name = "Milkshake" - desc = "Glorious brainfreezing mixture." - if("lemonade") - icon_state = "lemonade" - name = "Lemonade" - desc = "Oh the nostalgia..." - if("kiraspecial") - icon_state = "kiraspecial" - name = "Kira Special" - desc = "Long live the guy who everyone had mistaken for a girl. Baka!" - if("rewriter") - icon_state = "rewriter" - name = "Rewriter" - desc = "The secert of the sanctuary of the Libarian..." - if("applejack") - icon_state = "cognacglass" - name = "Glass of applejack" - desc = "When cider isn't strong enough, you gotta jack it." - if("jackrose") - icon_state = "patronglass" - name = "Jack Rose" - desc = "Drinking this makes you feel like you belong in a luxury hotel bar during the 1920s." - if("synthanol") - icon_state = "synthanolglass" - name = "Glass of Synthanol" - desc = "The equivalent of alcohol for synthetic crewmembers. They'd find it awful if they had tastebuds too." - if("robottears") - icon_state = "robottearsglass" - name = "Glass of Robot Tears" - desc = "No robots were hurt in the making of this drink." - if("trinary") - icon_state = "trinaryglass" - name = "Glass of Trinary" - desc = "Colorful drink made for synthetic crewmembers. It doesn't seem like it would taste well." - if("servo") - icon_state = "servoglass" - name = "Glass of Servo" - desc = "Chocolate - based drink made for IPCs. Not sure if anyone's actually tried out the recipe." - if("synthnsoda") - icon_state = "synthnsodaglass" - name = "Glass of Synth 'n Soda" - desc = "Classic drink altered to fit the tastes of a robot. Bad idea to drink if you're made of carbon." - if("synthignon") - icon_state = "synthignonglass" - name = "Glass of Synthignon" - desc = "Someone mixed good wine and robot booze. Romantic, but atrocious." - if("uplink") - icon_state = "uplinkglass" - name = "Glass of Uplink" - desc = "An exquisite mix of the finest liquoirs and synthanol. Meant only for synthetics." - if("holywater") - icon_state = "glass_clear" - name = "Glass of Water" - desc = "The father of all refreshments." - - - else - icon_state ="glass_brown" - name = "Glass of ..what?" - desc = "You can't really tell what this is." +/obj/item/weapon/reagent_containers/food/drinks/drinkingglass/on_reagent_change() + if(reagents.reagent_list.len) + var/datum/reagent/R = reagents.get_master_reagent() + icon_state = R.drink_icon + name = R.drink_name + desc = R.drink_desc else icon_state = "glass_empty" name = "glass" diff --git a/code/modules/food_and_drinks/kitchen_machinery/icecream_vat.dm b/code/modules/food_and_drinks/kitchen_machinery/icecream_vat.dm index 5fbd65deddc..59f9ec60d12 100644 --- a/code/modules/food_and_drinks/kitchen_machinery/icecream_vat.dm +++ b/code/modules/food_and_drinks/kitchen_machinery/icecream_vat.dm @@ -24,10 +24,7 @@ /obj/machinery/icemachine/New() - var/datum/reagents/R = new/datum/reagents(500) - reagents = R - R.my_atom = src - + create_reagents(500) /obj/machinery/icemachine/attackby(obj/item/I, mob/user, params) if(istype(I, /obj/item/weapon/reagent_containers/glass)) diff --git a/code/modules/food_and_drinks/kitchen_machinery/kitchen_machine.dm b/code/modules/food_and_drinks/kitchen_machinery/kitchen_machine.dm index 15458648513..ef7591e3955 100644 --- a/code/modules/food_and_drinks/kitchen_machinery/kitchen_machine.dm +++ b/code/modules/food_and_drinks/kitchen_machinery/kitchen_machine.dm @@ -32,8 +32,7 @@ ********************/ /obj/machinery/kitchen_machine/New() - reagents = new/datum/reagents(100) - reagents.my_atom = src + create_reagents(100) if(!available_recipes) available_recipes = new acceptable_items = new diff --git a/code/modules/food_and_drinks/recipes/tablecraft/recipes_table.dm b/code/modules/food_and_drinks/recipes/tablecraft/recipes_table.dm index 005be6c1f7e..b6c943dbdab 100644 --- a/code/modules/food_and_drinks/recipes/tablecraft/recipes_table.dm +++ b/code/modules/food_and_drinks/recipes/tablecraft/recipes_table.dm @@ -31,7 +31,7 @@ /datum/crafting_recipe/cherrysandwich name = "Cherry Jelly Sandwich" reqs = list( - /datum/reagent/cherryjelly = 5, + /datum/reagent/consumable/cherryjelly = 5, /obj/item/weapon/reagent_containers/food/snacks/breadslice = 2, ) result = /obj/item/weapon/reagent_containers/food/snacks/jellysandwich/cherry @@ -49,7 +49,7 @@ /datum/crafting_recipe/jellyburger name = "Cherry Jelly Burger" reqs = list( - /datum/reagent/cherryjelly = 5, + /datum/reagent/consumable/cherryjelly = 5, /obj/item/weapon/reagent_containers/food/snacks/bun = 1, ) result = /obj/item/weapon/reagent_containers/food/snacks/jellyburger/cherry diff --git a/code/modules/hydroponics/grown_inedible.dm b/code/modules/hydroponics/grown_inedible.dm index 0e557ea1d31..712f368a078 100644 --- a/code/modules/hydroponics/grown_inedible.dm +++ b/code/modules/hydroponics/grown_inedible.dm @@ -13,9 +13,7 @@ ..() - var/datum/reagents/R = new/datum/reagents(50) - reagents = R - R.my_atom = src + create_reagents(50) //Handle some post-spawn var stuff. if(planttype) diff --git a/code/modules/mob/living/carbon/alien/humanoid/caste/drone.dm b/code/modules/mob/living/carbon/alien/humanoid/caste/drone.dm index 958742b3e61..1249c0f462c 100644 --- a/code/modules/mob/living/carbon/alien/humanoid/caste/drone.dm +++ b/code/modules/mob/living/carbon/alien/humanoid/caste/drone.dm @@ -6,9 +6,7 @@ icon_state = "aliend_s" /mob/living/carbon/alien/humanoid/drone/New() - var/datum/reagents/R = new/datum/reagents(100) - reagents = R - R.my_atom = src + create_reagents(100) if(src.name == "alien drone") src.name = text("alien drone ([rand(1, 1000)])") src.real_name = src.name diff --git a/code/modules/mob/living/carbon/alien/humanoid/caste/hunter.dm b/code/modules/mob/living/carbon/alien/humanoid/caste/hunter.dm index afbac7f8c49..bc1e1e4f56d 100644 --- a/code/modules/mob/living/carbon/alien/humanoid/caste/hunter.dm +++ b/code/modules/mob/living/carbon/alien/humanoid/caste/hunter.dm @@ -6,9 +6,7 @@ icon_state = "alienh_s" /mob/living/carbon/alien/humanoid/hunter/New() - var/datum/reagents/R = new/datum/reagents(100) - reagents = R - R.my_atom = src + create_reagents(100) if(name == "alien hunter") name = text("alien hunter ([rand(1, 1000)])") real_name = name diff --git a/code/modules/mob/living/carbon/alien/humanoid/caste/sentinel.dm b/code/modules/mob/living/carbon/alien/humanoid/caste/sentinel.dm index 186577a1908..2644ef8a306 100644 --- a/code/modules/mob/living/carbon/alien/humanoid/caste/sentinel.dm +++ b/code/modules/mob/living/carbon/alien/humanoid/caste/sentinel.dm @@ -35,9 +35,7 @@ overlays += I /mob/living/carbon/alien/humanoid/sentinel/New() - var/datum/reagents/R = new/datum/reagents(100) - reagents = R - R.my_atom = src + create_reagents(100) if(name == "alien sentinel") name = text("alien sentinel ([rand(1, 1000)])") real_name = name diff --git a/code/modules/mob/living/carbon/alien/humanoid/empress.dm b/code/modules/mob/living/carbon/alien/humanoid/empress.dm index 346247c8e10..d50befa47f0 100644 --- a/code/modules/mob/living/carbon/alien/humanoid/empress.dm +++ b/code/modules/mob/living/carbon/alien/humanoid/empress.dm @@ -31,9 +31,7 @@ overlays += I /mob/living/carbon/alien/humanoid/empress/New() - var/datum/reagents/R = new/datum/reagents(100) - reagents = R - R.my_atom = src + create_reagents(100) //there should only be one queen for(var/mob/living/carbon/alien/humanoid/empress/E in living_mob_list) diff --git a/code/modules/mob/living/carbon/alien/humanoid/humanoid.dm b/code/modules/mob/living/carbon/alien/humanoid/humanoid.dm index c5cee9d3db4..b99cde337d6 100644 --- a/code/modules/mob/living/carbon/alien/humanoid/humanoid.dm +++ b/code/modules/mob/living/carbon/alien/humanoid/humanoid.dm @@ -16,9 +16,7 @@ //This is fine right now, if we're adding organ specific damage this needs to be updated /mob/living/carbon/alien/humanoid/New() - var/datum/reagents/R = new/datum/reagents(1000) - reagents = R - R.my_atom = src + create_reagents(1000) if(name == "alien") name = text("alien ([rand(1, 1000)])") real_name = name diff --git a/code/modules/mob/living/carbon/alien/humanoid/queen.dm b/code/modules/mob/living/carbon/alien/humanoid/queen.dm index 0fcec18e8ad..11914d3c0ee 100644 --- a/code/modules/mob/living/carbon/alien/humanoid/queen.dm +++ b/code/modules/mob/living/carbon/alien/humanoid/queen.dm @@ -10,9 +10,7 @@ ventcrawler = 0 /mob/living/carbon/alien/humanoid/queen/New() - var/datum/reagents/R = new/datum/reagents(100) - reagents = R - R.my_atom = src + create_reagents(100) //there should only be one queen for(var/mob/living/carbon/alien/humanoid/queen/Q in living_mob_list) diff --git a/code/modules/mob/living/carbon/alien/larva/larva.dm b/code/modules/mob/living/carbon/alien/larva/larva.dm index 04a460ec710..c7c8c1cefa8 100644 --- a/code/modules/mob/living/carbon/alien/larva/larva.dm +++ b/code/modules/mob/living/carbon/alien/larva/larva.dm @@ -15,9 +15,7 @@ //This is fine right now, if we're adding organ specific damage this needs to be updated /mob/living/carbon/alien/larva/New() - var/datum/reagents/R = new/datum/reagents(100) - reagents = R - R.my_atom = src + create_reagents(100) if(name == "alien larva") name = "alien larva ([rand(1, 1000)])" real_name = name diff --git a/code/modules/mob/living/carbon/brain/brain.dm b/code/modules/mob/living/carbon/brain/brain.dm index 7809e1fb947..555fcff29da 100644 --- a/code/modules/mob/living/carbon/brain/brain.dm +++ b/code/modules/mob/living/carbon/brain/brain.dm @@ -8,45 +8,43 @@ icon = 'icons/obj/surgery.dmi' icon_state = "brain1" - New() - var/datum/reagents/R = new/datum/reagents(330) - reagents = R - R.my_atom = src - ..() +/mob/living/carbon/brain/New() + create_reagents(330) + ..() - Destroy() - if(key) //If there is a mob connected to this thing. Have to check key twice to avoid false death reporting. - if(stat!=DEAD) //If not dead. - death(1) //Brains can die again. AND THEY SHOULD AHA HA HA HA HA HA - ghostize() //Ghostize checks for key so nothing else is necessary. - return ..() +/mob/living/carbon/brain/Destroy() + if(key) //If there is a mob connected to this thing. Have to check key twice to avoid false death reporting. + if(stat!=DEAD) //If not dead. + death(1) //Brains can die again. AND THEY SHOULD AHA HA HA HA HA HA + ghostize() //Ghostize checks for key so nothing else is necessary. + return ..() - say_understands(var/other)//Goddamn is this hackish, but this say code is so odd - if(istype(other, /mob/living/silicon/ai)) - if(!(container && istype(container, /obj/item/device/mmi))) - return 0 - else - return 1 - if(istype(other, /mob/living/silicon/decoy)) - if(!(container && istype(container, /obj/item/device/mmi))) - return 0 - else - return 1 - if(istype(other, /mob/living/silicon/pai)) - if(!(container && istype(container, /obj/item/device/mmi))) - return 0 - else - return 1 - if(istype(other, /mob/living/silicon/robot)) - if(!(container && istype(container, /obj/item/device/mmi))) - return 0 - else - return 1 - if(istype(other, /mob/living/carbon/human)) +/mob/living/carbon/brain/say_understands(other)//Goddamn is this hackish, but this say code is so odd + if(istype(other, /mob/living/silicon/ai)) + if(!(container && istype(container, /obj/item/device/mmi))) + return 0 + else return 1 - if(istype(other, /mob/living/carbon/slime)) + if(istype(other, /mob/living/silicon/decoy)) + if(!(container && istype(container, /obj/item/device/mmi))) + return 0 + else return 1 - return ..() + if(istype(other, /mob/living/silicon/pai)) + if(!(container && istype(container, /obj/item/device/mmi))) + return 0 + else + return 1 + if(istype(other, /mob/living/silicon/robot)) + if(!(container && istype(container, /obj/item/device/mmi))) + return 0 + else + return 1 + if(istype(other, /mob/living/carbon/human)) + return 1 + if(istype(other, /mob/living/carbon/slime)) + return 1 + return ..() /mob/living/carbon/brain/update_canmove(delay_action_updates = 0) diff --git a/code/modules/mob/living/carbon/human/human.dm b/code/modules/mob/living/carbon/human/human.dm index 0bf23e3cae6..170673d2395 100644 --- a/code/modules/mob/living/carbon/human/human.dm +++ b/code/modules/mob/living/carbon/human/human.dm @@ -31,9 +31,7 @@ if(mind) mind.name = real_name - var/datum/reagents/R = new/datum/reagents(330) - reagents = R - R.my_atom = src + create_reagents(330) prev_gender = gender // Debug for plural genders make_blood() @@ -716,12 +714,12 @@ var/obj/item/device/pda/pda = wear_id if(istype(pda) && pda.id) id = pda.id - + if(check_hands) if(istype(get_active_hand(), /obj/item/weapon/card/id)) id = get_active_hand() else if(istype(get_inactive_hand(), /obj/item/weapon/card/id)) - id = get_inactive_hand() + id = get_inactive_hand() if(istype(id)) return id @@ -1994,7 +1992,7 @@ if(istype(pda)) var/obj/item/weapon/card/id/id = pda.id if(istype(id) && id.is_untrackable()) - return 0 + return 0 if(istype(head, /obj/item/clothing/head)) var/obj/item/clothing/head/hat = head if(hat.blockTracking) diff --git a/code/modules/mob/living/carbon/human/life.dm b/code/modules/mob/living/carbon/human/life.dm index 828337c14aa..cfeb6e88faa 100644 --- a/code/modules/mob/living/carbon/human/life.dm +++ b/code/modules/mob/living/carbon/human/life.dm @@ -787,7 +787,7 @@ /mob/living/carbon/human/proc/has_booze() //checks if the human has ethanol or its subtypes inside for(var/A in reagents.reagent_list) var/datum/reagent/R = A - if(istype(R, /datum/reagent/ethanol)) + if(istype(R, /datum/reagent/consumable/ethanol)) return 1 return 0 diff --git a/code/modules/projectiles/guns/dartgun.dm b/code/modules/projectiles/guns/dartgun.dm index 0307755f3c7..b8f659eb09f 100644 --- a/code/modules/projectiles/guns/dartgun.dm +++ b/code/modules/projectiles/guns/dartgun.dm @@ -302,6 +302,4 @@ density = 0 /obj/effect/syringe_gun_dummy/New() - var/datum/reagents/R = new/datum/reagents(15) - reagents = R - R.my_atom = src + create_reagents(15) diff --git a/code/modules/projectiles/projectile/bullets.dm b/code/modules/projectiles/projectile/bullets.dm index 275e2ec94e5..9c3475d2141 100644 --- a/code/modules/projectiles/projectile/bullets.dm +++ b/code/modules/projectiles/projectile/bullets.dm @@ -28,7 +28,7 @@ M.AdjustConfused(20) M.AdjustEyeBlurry(20) M.AdjustDrowsy(20) - for(var/datum/reagent/ethanol/A in M.reagents.reagent_list) + for(var/datum/reagent/consumable/ethanol/A in M.reagents.reagent_list) M.AdjustParalysis(2) M.AdjustDizzy(10) M.AdjustSlur(10) diff --git a/code/modules/reagents/Chemistry-Machinery.dm b/code/modules/reagents/Chemistry-Machinery.dm deleted file mode 100644 index ddd53d98fdf..00000000000 --- a/code/modules/reagents/Chemistry-Machinery.dm +++ /dev/null @@ -1,1215 +0,0 @@ -#define SOLID 1 -#define LIQUID 2 -#define GAS 3 - -/obj/machinery/chem_dispenser - name = "chem dispenser" - density = 1 - anchored = 1 - icon = 'icons/obj/chemical.dmi' - icon_state = "dispenser" - use_power = 0 - idle_power_usage = 40 - var/ui_title = "Chem Dispenser 5000" - var/energy = 100 - var/max_energy = 100 - var/amount = 30 - var/obj/item/weapon/reagent_containers/beaker = null - var/recharged = 0 - var/hackedcheck = 0 - var/list/dispensable_reagents = list("hydrogen", "lithium", "carbon", "nitrogen", "oxygen", "fluorine", - "sodium", "aluminum", "silicon", "phosphorus", "sulfur", "chlorine", "potassium", "iron", - "copper", "mercury", "plasma", "radium", "water", "ethanol", "sugar", "iodine", "bromine", "silver") - var/list/hacked_reagents = list("toxin") - var/hack_message = "You disable the safety safeguards, enabling the \"Mad Scientist\" mode." - var/unhack_message = "You re-enable the safety safeguards, enabling the \"NT Standard\" mode." - var/list/broken_requirements = list() - var/broken_on_spawn = 0 - var/recharge_delay = 5 - var/image/icon_beaker = null //cached overlay - - -/obj/machinery/chem_dispenser/proc/recharge() - if(stat & (BROKEN|NOPOWER)) return - var/addenergy = 1 - var/oldenergy = energy - energy = min(energy + addenergy, max_energy) - if(energy != oldenergy) - use_power(1500) // This thing uses up alot of power (this is still low as shit for creating reagents from thin air) - nanomanager.update_uis(src) // update all UIs attached to src - -/obj/machinery/chem_dispenser/power_change() - if(powered()) - stat &= ~NOPOWER - else - spawn(rand(0, 15)) - stat |= NOPOWER - nanomanager.update_uis(src) // update all UIs attached to src - -/obj/machinery/chem_dispenser/process() - - if(recharged < 0) - recharge() - recharged = recharge_delay - else - recharged -= 1 - -/obj/machinery/chem_dispenser/New() - ..() - recharge() - dispensable_reagents = sortList(dispensable_reagents) - - if(broken_on_spawn) - overlays.Cut() - var/amount = pick(3,3,4) - var/list/options = list() - options[/obj/item/weapon/stock_parts/capacitor/adv] = "Add an advanced capacitor to fix it." - options[/obj/item/weapon/stock_parts/console_screen] = "Replace the console screen to fix it." - options[/obj/item/weapon/stock_parts/manipulator/pico] = "Upgrade to a pico manipulator to fix it." - options[/obj/item/weapon/stock_parts/matter_bin/super] = "Give it a super matter bin to fix it." - options[/obj/item/weapon/stock_parts/cell/super] = "Replace the reagent synthesizer with a super capacity cell to fix it." - options[/obj/item/device/mass_spectrometer/adv] = "Replace the reagent scanner with an advanced mass spectrometer to fix it" - options[/obj/item/weapon/stock_parts/micro_laser/high] = "Repair the reagent synthesizer with an high-power micro-laser to fix it" - options[/obj/item/device/reagent_scanner/adv] = "Replace the reagent scanner with an advanced reagent scanner to fix it" - options[/obj/item/stack/nanopaste] = "Apply some nanopaste to the broken nozzles to fix it." - options[/obj/item/stack/sheet/plasteel] = "Surround the outside with a plasteel cover to fix it." - options[/obj/item/stack/sheet/rglass] = "Insert a pane of reinforced glass to fix it." - - while(amount > 0) - amount -= 1 - - var/index = pick(options) - broken_requirements[index] = options[index] - options -= index - - -/obj/machinery/chem_dispenser/ex_act(severity) - switch(severity) - if(1.0) - qdel(src) - return - if(2.0) - if(prob(50)) - qdel(src) - return - -/obj/machinery/chem_dispenser/blob_act() - if(prob(50)) - qdel(src) - - /** - * The ui_interact proc is used to open and update Nano UIs - * If ui_interact is not used then the UI will not update correctly - * ui_interact is currently defined for /atom/movable - * - * @param user /mob The mob who is interacting with this ui - * @param ui_key string A string key to use for this ui. Allows for multiple unique uis on one obj/mob (defaut value "main") - * - * @return nothing - */ - -/obj/machinery/chem_dispenser/ui_interact(mob/user, ui_key = "main", datum/nanoui/ui = null, force_open = 1) - if(broken_requirements.len) - to_chat(user, "[src] is broken. [broken_requirements[broken_requirements[1]]]") - return - - - // this is the data which will be sent to the ui - var/data[0] - data["amount"] = amount - data["energy"] = round(energy) - data["maxEnergy"] = round(max_energy) - data["isBeakerLoaded"] = beaker ? 1 : 0 - - var beakerContents[0] - var beakerCurrentVolume = 0 - if(beaker && beaker.reagents && beaker.reagents.reagent_list.len) - for(var/datum/reagent/R in beaker.reagents.reagent_list) - beakerContents.Add(list(list("name" = R.name, "id"=R.id, "volume" = R.volume))) // list in a list because Byond merges the first list... - beakerCurrentVolume += R.volume - data["beakerContents"] = beakerContents - - if(beaker) - data["beakerCurrentVolume"] = beakerCurrentVolume - data["beakerMaxVolume"] = beaker.volume - else - data["beakerCurrentVolume"] = null - data["beakerMaxVolume"] = null - - var chemicals[0] - for(var/re in dispensable_reagents) - var/datum/reagent/temp = chemical_reagents_list[re] - if(temp) - chemicals.Add(list(list("title" = temp.name, "id" = temp.id, "commands" = list("dispense" = temp.id)))) // list in a list because Byond merges the first list... - data["chemicals"] = chemicals - - // update the ui if it exists, returns null if no ui is passed/found - ui = nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open) - if(!ui) - // the ui does not exist, so we'll create a new() one - // for a list of parameters and their descriptions see the code docs in \code\modules\nano\nanoui.dm - ui = new(user, src, ui_key, "chem_dispenser.tmpl", ui_title, 390, 655) - // when the ui is first opened this is the data it will use - ui.set_initial_data(data) - // open the new ui window - ui.open() - -/obj/machinery/chem_dispenser/Topic(href, href_list) - if(..()) - return 1 - - if(href_list["amount"]) - amount = round(text2num(href_list["amount"]), 5) // round to nearest 5 - if(amount < 0) // Since the user can actually type the commands himself, some sanity checking - amount = 0 - if(amount > 100) - amount = 100 - - if(href_list["dispense"]) - if(dispensable_reagents.Find(href_list["dispense"]) && beaker != null) - var/obj/item/weapon/reagent_containers/glass/B = beaker - var/datum/reagents/R = B.reagents - var/space = R.maximum_volume - R.total_volume - - R.add_reagent(href_list["dispense"], min(amount, energy * 10, space)) - energy = max(energy - min(amount, energy * 10, space) / 10, 0) - overlays.Cut() - icon_beaker = image('icons/obj/chemical.dmi', src, "disp_beaker") //randomize beaker overlay position. - icon_beaker.pixel_x = rand(-10,5) - overlays += icon_beaker - - if(href_list["remove"]) - if(beaker) - if(href_list["removeamount"]) - var/amount = text2num(href_list["removeamount"]) - if(isnum(amount) && (amount > 0)) - var/obj/item/weapon/reagent_containers/glass/B = beaker - var/datum/reagents/R = B.reagents - var/id = href_list["remove"] - R.remove_reagent(id, amount) - - if(href_list["ejectBeaker"]) - if(beaker) - var/obj/item/weapon/reagent_containers/glass/B = beaker - B.forceMove(loc) - beaker = null - overlays.Cut() - add_fingerprint(usr) - return 1 // update UIs attached to this object - -/obj/machinery/chem_dispenser/attackby(obj/item/weapon/reagent_containers/B, mob/user, params) - if(isrobot(user)) - return - - if(broken_requirements.len && B.type == broken_requirements[1]) - if(istype(B,/obj/item/stack)) - var/obj/item/stack/S = B - S.use(1) - else - if(!user.drop_item()) - to_chat(user, "[B] is stuck to you!") - return - qdel(B) - broken_requirements -= broken_requirements[1] - to_chat(user, "You fix [src].") - return - - if(beaker) - to_chat(user, "Something is already loaded into the machine.") - return - - if(istype(B, /obj/item/weapon/reagent_containers/glass) || istype(B, /obj/item/weapon/reagent_containers/food/drinks)) - beaker = B - if(!user.drop_item()) - to_chat(user, "[B] is stuck to you!") - return - B.forceMove(src) - to_chat(user, "You set [B] on the machine.") - nanomanager.update_uis(src) // update all UIs attached to src - if(!icon_beaker) - icon_beaker = image('icons/obj/chemical.dmi', src, "disp_beaker") //randomize beaker overlay position. - icon_beaker.pixel_x = rand(-10,5) - overlays += icon_beaker - return - -/obj/machinery/chem_dispenser/attackby(obj/item/weapon/B, mob/user, params) - ..() - if(istype(B, /obj/item/device/multitool)) - if(hackedcheck == 0) - to_chat(user, hack_message) - dispensable_reagents += hacked_reagents - hackedcheck = 1 - return - - else - to_chat(user, unhack_message) - dispensable_reagents -= hacked_reagents - hackedcheck = 0 - return - -/obj/machinery/chem_dispenser/attack_ai(mob/user) - return attack_hand(user) - -/obj/machinery/chem_dispenser/attack_ghost(mob/user) - return attack_hand(user) - -/obj/machinery/chem_dispenser/attack_hand(mob/user) - if(stat & BROKEN) - return - - ui_interact(user) - -/obj/machinery/chem_dispenser/soda - icon_state = "soda_dispenser" - name = "soda fountain" - desc = "A drink fabricating machine, capable of producing many sugary drinks with just one touch." - ui_title = "Soda Dispens-o-matic" - energy = 100 - max_energy = 100 - dispensable_reagents = list("water", "ice", "milk", "soymilk", "coffee", "tea", "hot_coco", "cola", "spacemountainwind", "dr_gibb", "space_up", - "tonic", "sodawater", "lemon_lime", "grapejuice", "sugar", "orangejuice", "lemonjuice", "limejuice", "tomatojuice", "banana", - "watermelonjuice", "carrotjuice", "potato", "berryjuice") - hack_message = "You change the mode from 'McNano' to 'Pizza King'." - unhack_message = "You change the mode from 'Pizza King' to 'McNano'." - hacked_reagents = list("thirteenloko") - -/obj/machinery/chem_dispenser/beer - icon_state = "booze_dispenser" - name = "booze dispenser" - ui_title = "Booze Portal 9001" - energy = 100 - max_energy = 100 - desc = "A technological marvel, supposedly able to mix just the mixture you'd like to drink the moment you ask for one." - dispensable_reagents = list("ice", "cream", "cider", "beer", "kahlua", "whiskey", "wine", "vodka", "gin", "rum", "tequila", "vermouth", "cognac", "ale", "mead", "synthanol") - hack_message = "You disable the 'nanotrasen-are-cheap-bastards' lock, enabling hidden and very expensive boozes." - unhack_message = "You re-enable the 'nanotrasen-are-cheap-bastards' lock, disabling hidden and very expensive boozes." - hacked_reagents = list("goldschlager", "patron", "absinthe", "ethanol", "nothing") - -////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - -/obj/machinery/chem_dispenser/constructable - name = "portable chem dispenser" - icon = 'icons/obj/chemical.dmi' - icon_state = "minidispenser" - energy = 5 - max_energy = 5 - amount = 5 - recharge_delay = 10 - dispensable_reagents = list() - var/list/special_reagents = list(list("hydrogen", "oxygen", "silicon", "phosphorus", "sulfur", "carbon", "nitrogen", "water"), - list("lithium", "sugar", "copper", "mercury", "sodium","iodine","bromine"), - list("ethanol", "chlorine", "potassium", "aluminum","plasma", "radium", "fluorine", "iron", "silver"), - list("oil", "ash", "acetone", "saltpetre", "ammonia", "diethylamine", "fuel")) - -/obj/machinery/chem_dispenser/constructable/New() - ..() - component_parts = list() - component_parts += new /obj/item/weapon/circuitboard/chem_dispenser(null) - component_parts += new /obj/item/weapon/stock_parts/matter_bin(null) - component_parts += new /obj/item/weapon/stock_parts/matter_bin(null) - component_parts += new /obj/item/weapon/stock_parts/manipulator(null) - component_parts += new /obj/item/weapon/stock_parts/capacitor(null) - component_parts += new /obj/item/weapon/stock_parts/console_screen(null) - component_parts += new /obj/item/weapon/stock_parts/cell/super(null) - RefreshParts() - -/obj/machinery/chem_dispenser/constructable/upgraded/New() - ..() - component_parts = list() - component_parts += new /obj/item/weapon/circuitboard/chem_dispenser(null) - component_parts += new /obj/item/weapon/stock_parts/matter_bin/super(null) - component_parts += new /obj/item/weapon/stock_parts/matter_bin/super(null) - component_parts += new /obj/item/weapon/stock_parts/manipulator/pico(null) - component_parts += new /obj/item/weapon/stock_parts/capacitor/super(null) - component_parts += new /obj/item/weapon/stock_parts/console_screen(null) - component_parts += new /obj/item/weapon/stock_parts/cell/hyper(null) - RefreshParts() - -/obj/machinery/chem_dispenser/constructable/RefreshParts() - var/time = 0 - var/temp_energy = 0 - var/i - for(var/obj/item/weapon/stock_parts/matter_bin/M in component_parts) - temp_energy += M.rating - temp_energy-- - max_energy = temp_energy * 5 //max energy = (bin1.rating + bin2.rating - 1) * 5, 5 on lowest 25 on highest - for(var/obj/item/weapon/stock_parts/capacitor/C in component_parts) - time += C.rating - for(var/obj/item/weapon/stock_parts/cell/P in component_parts) - time += round(P.maxcharge, 10000) / 10000 - recharge_delay = 10 / (time/2) //delay between recharges, double the usual time on lowest 33% less than usual on highest - for(var/obj/item/weapon/stock_parts/manipulator/M in component_parts) - for(i=1, i<=M.rating, i++) - dispensable_reagents = sortList(dispensable_reagents | special_reagents[i]) - -/obj/machinery/chem_dispenser/constructable/attackby(obj/item/I, mob/user, params) - if(istype(I, /obj/item/weapon/reagent_containers/glass)) - if(panel_open) - to_chat(user, "Close the maintenance panel first.") - return - ..() - else - ..() - - if(default_deconstruction_screwdriver(user, "minidispenser-o", "minidispenser", I)) - return - - if(exchange_parts(user, I)) - return - - if(istype(I, /obj/item/weapon/wrench)) - playsound(src, 'sound/items/Ratchet.ogg', 50, 1) - if(anchored) - anchored = 0 - to_chat(user, "[src] can now be moved.") - else if(!anchored) - anchored = 1 - to_chat(user, "[src] is now secured.") - - if(panel_open) - if(istype(I, /obj/item/weapon/crowbar)) - if(beaker) - var/obj/item/weapon/reagent_containers/glass/B = beaker - B.forceMove(loc) - beaker = null - default_deconstruction_crowbar(I) - return 1 - -////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - -/obj/machinery/chem_master - name = "\improper ChemMaster 3000" - density = 1 - anchored = 1 - icon = 'icons/obj/chemical.dmi' - icon_state = "mixer0" - use_power = 1 - idle_power_usage = 20 - var/obj/item/weapon/reagent_containers/beaker = null - var/obj/item/weapon/storage/pill_bottle/loaded_pill_bottle = null - var/mode = 0 - var/condi = 0 - var/useramount = 30 // Last used amount - var/pillamount = 10 - var/patchamount = 10 - var/bottlesprite = "bottle" - var/pillsprite = "1" - var/client/has_sprites = list() - var/printing = null - -/obj/machinery/chem_master/New() - var/datum/reagents/R = new/datum/reagents(100) - reagents = R - R.my_atom = src - overlays += "waitlight" - -/obj/machinery/chem_master/ex_act(severity) - switch(severity) - if(1.0) - qdel(src) - return - if(2.0) - if(prob(50)) - qdel(src) - return - -/obj/machinery/chem_master/blob_act() - if(prob(50)) - qdel(src) - -/obj/machinery/chem_master/power_change() - if(powered()) - stat &= ~NOPOWER - else - spawn(rand(0, 15)) - stat |= NOPOWER - -/obj/machinery/chem_master/attackby(obj/item/weapon/B, mob/user, params) - - if(istype(B, /obj/item/weapon/reagent_containers/glass) || istype(B, /obj/item/weapon/reagent_containers/food/drinks/drinkingglass)) - - if(beaker) - to_chat(user, "A beaker is already loaded into the machine.") - return - if(!user.drop_item()) - to_chat(user, "[B] is stuck to you!") - return - beaker = B - B.forceMove(src) - to_chat(user, "You add the beaker to the machine!") - nanomanager.update_uis(src) - icon_state = "mixer1" - - else if(istype(B, /obj/item/weapon/storage/pill_bottle)) - - if(loaded_pill_bottle) - to_chat(user, "A pill bottle is already loaded into the machine.") - return - - if(!user.drop_item()) - to_chat(user, "[B] is stuck to you!") - return - loaded_pill_bottle = B - B.forceMove(src) - to_chat(user, "You add the pill bottle into the dispenser slot!") - nanomanager.update_uis(src) - return - -/obj/machinery/chem_master/Topic(href, href_list) - if(..()) - return 1 - - add_fingerprint(usr) - usr.set_machine(src) - - - if(href_list["ejectp"]) - if(loaded_pill_bottle) - loaded_pill_bottle.forceMove(loc) - loaded_pill_bottle = null - else if(href_list["close"]) - usr << browse(null, "window=chem_master") - onclose(usr, "chem_master") - usr.unset_machine() - return - - if(href_list["print_p"]) - if(!(printing)) - printing = 1 - visible_message("[src] rattles and prints out a sheet of paper.") - playsound(loc, "sound/goonstation/machines/printer_dotmatrix.ogg", 50, 1) - var/obj/item/weapon/paper/P = new /obj/item/weapon/paper(loc) - P.info = "
Chemical Analysis

" - P.info += "Time of analysis: [worldtime2text(world.time)]

" - P.info += "Chemical name: [href_list["name"]]
" - if(href_list["name"] == "Blood") - var/datum/reagents/R = beaker.reagents - var/datum/reagent/blood/G - for(var/datum/reagent/F in R.reagent_list) - if(F.name == href_list["name"]) - G = F - break - var/B = G.data["blood_type"] - var/C = G.data["blood_DNA"] - P.info += "Description:
Blood Type: [B]
DNA: [C]" - else - P.info += "Description: [href_list["desc"]]" - P.info += "

Notes:
" - P.name = "Chemical Analysis - [href_list["name"]]" - printing = null - - if(beaker) - var/datum/reagents/R = beaker.reagents - if(href_list["analyze"]) - var/dat = "" - if(!condi) - if(href_list["name"] == "Blood") - var/datum/reagent/blood/G - for(var/datum/reagent/F in R.reagent_list) - if(F.name == href_list["name"]) - G = F - break - var/A = G.name - var/B = G.data["blood_type"] - var/C = G.data["blood_DNA"] - dat += "Chemmaster 3000Chemical infos:

Name:
[A]

Description:
Blood Type: [B]
DNA: [C]" - else - dat += "Chemmaster 3000Chemical infos:

Name:
[href_list["name"]]

Description:
[href_list["desc"]]" - dat += "

(Print Analysis)
" - dat += "(Back)" - else - dat += "Condimaster 3000Condiment infos:

Name:
[href_list["name"]]

Description:
[href_list["desc"]]


(Back)" - usr << browse(dat, "window=chem_master;size=575x400") - return - - else if(href_list["add"]) - - if(href_list["amount"]) - var/id = href_list["add"] - var/amount = text2num(href_list["amount"]) - R.trans_id_to(src, id, amount) - - else if(href_list["addcustom"]) - - var/id = href_list["addcustom"] - useramount = input("Select the amount to transfer.", 30, useramount) as num - useramount = isgoodnumber(useramount) - Topic(null, list("amount" = "[useramount]", "add" = "[id]")) - - else if(href_list["remove"]) - - if(href_list["amount"]) - var/id = href_list["remove"] - var/amount = text2num(href_list["amount"]) - if(mode) - reagents.trans_id_to(beaker, id, amount) - else - reagents.remove_reagent(id, amount) - - - else if(href_list["removecustom"]) - - var/id = href_list["removecustom"] - useramount = input("Select the amount to transfer.", 30, useramount) as num - useramount = isgoodnumber(useramount) - Topic(null, list("amount" = "[useramount]", "remove" = "[id]")) - - else if(href_list["toggle"]) - mode = !mode - - else if(href_list["main"]) - attack_hand(usr) - return - else if(href_list["eject"]) - if(beaker) - beaker.forceMove(get_turf(src)) - beaker = null - reagents.clear_reagents() - icon_state = "mixer0" - else if(href_list["createpill"] || href_list["createpill_multiple"]) - if(!condi) - var/count = 1 - if(href_list["createpill_multiple"]) - count = input("Select the number of pills to make.", 10, pillamount) as num|null - if(count == null) - return - count = isgoodnumber(count) - if(count > 20) count = 20 //Pevent people from creating huge stacks of pills easily. Maybe move the number to defines? - if(count <= 0) return - var/amount_per_pill = reagents.total_volume/count - if(amount_per_pill > 50) amount_per_pill = 50 - var/name = input(usr,"Name:","Name your pill!","[reagents.get_master_reagent_name()] ([amount_per_pill]u)") as text|null - if(!name) - return - name = reject_bad_text(name) - while(count--) - var/obj/item/weapon/reagent_containers/food/pill/P = new/obj/item/weapon/reagent_containers/food/pill(loc) - if(!name) name = reagents.get_master_reagent_name() - P.name = "[name] pill" - P.pixel_x = rand(-7, 7) //random position - P.pixel_y = rand(-7, 7) - P.icon_state = "pill"+pillsprite - reagents.trans_to(P,amount_per_pill) - if(loaded_pill_bottle) - if(loaded_pill_bottle.contents.len < loaded_pill_bottle.storage_slots) - P.forceMove(loaded_pill_bottle) - updateUsrDialog() - else - var/name = input(usr,"Name:","Name your bag!",reagents.get_master_reagent_name()) as text|null - if(!name) - return - name = reject_bad_text(name) - var/obj/item/weapon/reagent_containers/food/condiment/pack/P = new/obj/item/weapon/reagent_containers/food/condiment/pack(loc) - if(!name) name = reagents.get_master_reagent_name() - P.originalname = name - P.name = "[name] pack" - P.desc = "A small condiment pack. The label says it contains [name]." - reagents.trans_to(P,10) - else if(href_list["createpatch"] || href_list["createpatch_multiple"]) - if(!condi) - var/count = 1 - if(href_list["createpatch_multiple"]) - count = input("Select the number of patches to make.", 10, patchamount) as num|null - if(count == null) - return - count = isgoodnumber(count) - if(!count || count <= 0) - return - if(count > 20) count = 20 //Pevent people from creating huge stacks of patches easily. Maybe move the number to defines? - var/amount_per_patch = reagents.total_volume/count - if(amount_per_patch > 40) amount_per_patch = 40 - var/name = input(usr,"Name:","Name your patch!","[reagents.get_master_reagent_name()] ([amount_per_patch]u)") as text|null - if(!name) - return - name = reject_bad_text(name) - var/is_medical_patch = chemical_safety_check(reagents) - while(count--) - var/obj/item/weapon/reagent_containers/food/pill/patch/P = new/obj/item/weapon/reagent_containers/food/pill/patch(loc) - if(!name) name = reagents.get_master_reagent_name() - P.name = "[name] patch" - P.pixel_x = rand(-7, 7) //random position - P.pixel_y = rand(-7, 7) - reagents.trans_to(P,amount_per_patch) - if(is_medical_patch) - P.instant_application = 1 - P.icon_state = "bandaid_med" - else if(href_list["createbottle"]) - if(!condi) - var/name = input(usr,"Name:","Name your bottle!",reagents.get_master_reagent_name()) as text|null - if(!name) - return - name = reject_bad_text(name) - var/obj/item/weapon/reagent_containers/glass/bottle/P = new/obj/item/weapon/reagent_containers/glass/bottle(loc) - if(!name) name = reagents.get_master_reagent_name() - P.name = "[name] bottle" - P.pixel_x = rand(-7, 7) //random position - P.pixel_y = rand(-7, 7) - P.icon_state = bottlesprite - reagents.trans_to(P,30) - else - var/obj/item/weapon/reagent_containers/food/condiment/P = new/obj/item/weapon/reagent_containers/food/condiment(loc) - reagents.trans_to(P,50) - else if(href_list["change_pill"]) - #define MAX_PILL_SPRITE 20 //max icon state of the pill sprites - var/dat = "" - var/j = 0 - for(var/i = 1 to MAX_PILL_SPRITE) - j++ - if(j == 1) - dat += "" - dat += "" - if(j == 5) - dat += "" - j = 0 - dat += "
" - usr << browse(dat, "window=chem_master_iconsel;size=225x193") - return - else if(href_list["change_bottle"]) - var/dat = "" - var/j = 0 - for(var/i in list("bottle", "small_bottle", "wide_bottle", "round_bottle")) - j++ - if(j == 1) - dat += "" - dat += "" - if(j == 5) - dat += "" - j = 0 - dat += "
" - usr << browse(dat, "window=chem_master_iconsel;size=225x193") - return - else if(href_list["pill_sprite"]) - pillsprite = href_list["pill_sprite"] - usr << browse(null, "window=chem_master_iconsel") - else if(href_list["bottle_sprite"]) - bottlesprite = href_list["bottle_sprite"] - usr << browse(null, "window=chem_master_iconsel") - - nanomanager.update_uis(src) - return - -/obj/machinery/chem_master/attack_ai(mob/user) - return attack_hand(user) - -/obj/machinery/chem_master/attack_ghost(mob/user) - return attack_hand(user) - -/obj/machinery/chem_master/attack_hand(mob/user) - if(..()) - return 1 - ui_interact(user) - return - -/obj/machinery/chem_master/ui_interact(mob/user, ui_key="main", datum/nanoui/ui = null, force_open = 1) - - var/datum/asset/chem_master/assets = get_asset_datum(/datum/asset/chem_master) - assets.send(user) - - var/data = list() - - data["condi"] = condi - data["loaded_pill_bottle"] = (loaded_pill_bottle ? 1 : 0) - if(loaded_pill_bottle) - data["loaded_pill_bottle_contents_len"] = loaded_pill_bottle.contents.len - data["loaded_pill_bottle_storage_slots"] = loaded_pill_bottle.storage_slots - - data["beaker"] = (beaker ? 1 : 0) - if(beaker) - var/list/beaker_reagents_list = list() - data["beaker_reagents"] = beaker_reagents_list - for(var/datum/reagent/R in beaker.reagents.reagent_list) - beaker_reagents_list[++beaker_reagents_list.len] = list("name" = R.name, "volume" = R.volume, "id" = R.id, "description" = R.description) - var/list/buffer_reagents_list = list() - data["buffer_reagents"] = buffer_reagents_list - for(var/datum/reagent/R in reagents.reagent_list) - buffer_reagents_list[++buffer_reagents_list.len] = list("name" = R.name, "volume" = R.volume, "id" = R.id, "description" = R.description) - - data["pillsprite"] = pillsprite - data["bottlesprite"] = bottlesprite - data["mode"] = mode - - ui = nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open) - if(!ui) - ui = new(user, src, ui_key, "chem_master.tmpl", name, 575, 400) - ui.set_initial_data(data) - ui.open() - -/obj/machinery/chem_master/proc/isgoodnumber(num) - if(isnum(num)) - if(num > 200) - num = 200 - else if(num < 0) - num = 1 - else - num = round(num) - return num - else - return 0 - -/obj/machinery/chem_master/proc/chemical_safety_check(datum/reagents/R) - var/all_safe = 1 - for(var/datum/reagent/A in R.reagent_list) - if(!safe_chem_list.Find(A.id)) - all_safe = 0 - return all_safe - -/obj/machinery/chem_master/condimaster - name = "\improper CondiMaster 3000" - condi = 1 - -/obj/machinery/chem_master/constructable - name = "ChemMaster 2999" - desc = "Used to seperate chemicals and distribute them in a variety of forms." - -/obj/machinery/chem_master/constructable/New() - ..() - component_parts = list() - component_parts += new /obj/item/weapon/circuitboard/chem_master(null) - component_parts += new /obj/item/weapon/stock_parts/manipulator(null) - component_parts += new /obj/item/weapon/stock_parts/console_screen(null) - component_parts += new /obj/item/weapon/reagent_containers/glass/beaker(null) - component_parts += new /obj/item/weapon/reagent_containers/glass/beaker(null) - -/obj/machinery/chem_master/constructable/attackby(obj/item/B, mob/user, params) - - if(default_deconstruction_screwdriver(user, "mixer0_nopower", "mixer0", B)) - if(beaker) - beaker.forceMove(get_turf(src)) - beaker = null - reagents.clear_reagents() - if(loaded_pill_bottle) - loaded_pill_bottle.forceMove(get_turf(src)) - loaded_pill_bottle = null - return - - if(exchange_parts(user, B)) - return - - if(panel_open) - if(istype(B, /obj/item/weapon/crowbar)) - default_deconstruction_crowbar(B) - return 1 - else - to_chat(user, "You can't use the [name] while it's panel is opened!") - return 1 - else - ..() - -/obj/machinery/reagentgrinder - - name = "\improper All-In-One Grinder" - icon = 'icons/obj/kitchen.dmi' - icon_state = "juicer1" - layer = 2.9 - density = 1 - anchored = 1 - use_power = 1 - idle_power_usage = 5 - active_power_usage = 100 - var/inuse = 0 - var/obj/item/weapon/reagent_containers/beaker = null - var/limit = 10 - - //IMPORTANT NOTE! A negative number is a multiplier, a positive number is a flat amount to add. 0 means equal to the amount of the original reagent - var/list/blend_items = list ( - - //Sheets - /obj/item/stack/sheet/mineral/plasma = list("plasma_dust" = 20), - /obj/item/stack/sheet/mineral/uranium = list("uranium" = 20), - /obj/item/stack/sheet/mineral/bananium = list("banana" = 20), - /obj/item/stack/sheet/mineral/tranquillite = list("nothing" = 20), - /obj/item/stack/sheet/mineral/silver = list("silver" = 20), - /obj/item/stack/sheet/mineral/gold = list("gold" = 20), - /obj/item/weapon/grown/novaflower = list("capsaicin" = 0), - - //archaeology! - ///obj/item/weapon/rocksliver = list("ground_rock" = 50), - - - //All types that you can put into the grinder to transfer the reagents to the beaker. !Put all recipes above this.! - /obj/item/weapon/reagent_containers/food = list(), - /obj/item/weapon/reagent_containers/honeycomb = list() - ) - - var/list/blend_tags = list ( - "nettle" = list("sacid" = 0), - "deathnettle" = list("facid" = 0), - "soybeans" = list("soymilk" = 0), - "tomato" = list("ketchup" = 0), - "wheat" = list("flour" = -5), - "rice" = list("rice" = -5), - "cherries" = list("cherryjelly" = 0), - ) - - var/list/juice_items = list ( - /obj/item/weapon/reagent_containers/food/snacks/watermelonslice = list("watermelonjuice" = 0), - ) - - var/list/juice_tags = list ( - "tomato" = list("tomatojuice" = 0), - "carrot" = list("carrotjuice" = 0), - "berries" = list("berryjuice" = 0), - "banana" = list("banana" = 0), - "potato" = list("potato" = 0), - "lemon" = list("lemonjuice" = 0), - "orange" = list("orangejuice" = 0), - "lime" = list("limejuice" = 0), - "poisonberries" = list("poisonberryjuice" = 0), - "grapes" = list("grapejuice" = 0), - "corn" = list("cornoil" = 0), - ) - - var/list/holdingitems = list() - -/obj/machinery/reagentgrinder/New() - ..() - beaker = new /obj/item/weapon/reagent_containers/glass/beaker/large(src) - return - -/obj/machinery/reagentgrinder/update_icon() - icon_state = "juicer"+num2text(!isnull(beaker)) - return - -/obj/machinery/reagentgrinder/attackby(obj/item/O, mob/user, params) - - if(istype(O,/obj/item/weapon/reagent_containers/glass) || \ - istype(O,/obj/item/weapon/reagent_containers/food/drinks/drinkingglass) || \ - istype(O,/obj/item/weapon/reagent_containers/food/drinks/shaker)) - - if(beaker) - return 1 - else - if(!user.drop_item()) - to_chat(user, "[O] is stuck to you!") - return - beaker = O - O.forceMove(src) - update_icon() - updateUsrDialog() - return 0 - - if(holdingitems && holdingitems.len >= limit) - to_chat(usr, "The machine cannot hold anymore items.") - return 1 - - //Fill machine with a plantbag! - if(istype(O, /obj/item/weapon/storage/bag/plants)) - var/obj/item/weapon/storage/bag/plants/PB = O - for(var/obj/item/weapon/reagent_containers/food/snacks/grown/G in PB.contents) - PB.remove_from_storage(G, src) - holdingitems += G - if(holdingitems && holdingitems.len >= limit) //Sanity checking so the blender doesn't overfill - to_chat(user, "You empty [PB] into the All-In-One grinder.") - - updateUsrDialog() - return 0 - - - if(!is_type_in_list(O, blend_items) && !is_type_in_list(O, juice_items)) - to_chat(user, "Cannot refine into a reagent.") - return 1 - - user.unEquip(O) - O.forceMove(src) - holdingitems += O - updateUsrDialog() - return 0 - -/obj/machinery/reagentgrinder/attack_ai(mob/user) - return 0 - -/obj/machinery/reagentgrinder/attack_hand(mob/user) - user.set_machine(src) - interact(user) - -/obj/machinery/reagentgrinder/interact(mob/user) // The microwave Menu - var/is_chamber_empty = 0 - var/is_beaker_ready = 0 - var/processing_chamber = "" - var/beaker_contents = "" - var/dat = "" - - if(!inuse) - for(var/obj/item/O in holdingitems) - processing_chamber += "\A [O.name]
" - - if(!processing_chamber) - is_chamber_empty = 1 - processing_chamber = "Nothing." - if(!beaker) - beaker_contents = "No beaker attached.
" - else - is_beaker_ready = 1 - beaker_contents = "The beaker contains:
" - var/anything = 0 - for(var/datum/reagent/R in beaker.reagents.reagent_list) - anything = 1 - beaker_contents += "[R.volume] - [R.name]
" - if(!anything) - beaker_contents += "Nothing
" - - - dat = {" - Processing chamber contains:
- [processing_chamber]
- [beaker_contents]
- "} - if(is_beaker_ready && !is_chamber_empty && !(stat & (NOPOWER|BROKEN))) - dat += "Grind the reagents
" - dat += "Juice the reagents

" - if(holdingitems && holdingitems.len > 0) - dat += "Eject the reagents
" - if(beaker) - dat += "Detach the beaker
" - else - dat += "Please wait..." - user << browse("All-In-One Grinder[dat]", "window=reagentgrinder") - onclose(user, "reagentgrinder") - return - -/obj/machinery/reagentgrinder/Topic(href, href_list) - if(..()) - return - usr.set_machine(src) - switch(href_list["action"]) - if("grind") - grind() - if("juice") - juice() - if("eject") - eject() - if("detach") - detach() - updateUsrDialog() - return - -/obj/machinery/reagentgrinder/proc/detach() - - if(usr.stat != 0) - return - if(!beaker) - return - beaker.forceMove(loc) - beaker = null - update_icon() - -/obj/machinery/reagentgrinder/proc/eject() - - if(usr.stat != 0) - return - if(holdingitems && holdingitems.len == 0) - return - - for(var/obj/item/O in holdingitems) - O.forceMove(loc) - holdingitems -= O - holdingitems = list() - -/obj/machinery/reagentgrinder/proc/is_allowed(obj/item/weapon/reagent_containers/O) - for(var/i in blend_items) - if(istype(O, i)) - return 1 - return 0 - -/obj/machinery/reagentgrinder/proc/get_allowed_by_id(obj/item/weapon/grown/O) - for(var/i in blend_items) - if(istype(O, i)) - return blend_items[i] - -/obj/machinery/reagentgrinder/proc/get_allowed_snack_by_id(obj/item/weapon/reagent_containers/food/snacks/O) - for(var/i in blend_items) - if(istype(O, i)) - return blend_items[i] - -/obj/machinery/reagentgrinder/proc/get_allowed_juice_by_id(obj/item/weapon/reagent_containers/food/snacks/O) - for(var/i in juice_items) - if(istype(O, i)) - return juice_items[i] - -/obj/machinery/reagentgrinder/proc/get_allowed_snack_by_tag(obj/item/weapon/reagent_containers/food/snacks/grown/O) - for(var/i in blend_tags) - if(O.seed.kitchen_tag == i) - return blend_tags[i] - -/obj/machinery/reagentgrinder/proc/get_allowed_juice_by_tag(obj/item/weapon/reagent_containers/food/snacks/grown/O) - for(var/i in juice_tags) - if(O.seed.kitchen_tag == i) - return juice_tags[i] - -/obj/machinery/reagentgrinder/proc/get_grownweapon_amount(obj/item/weapon/grown/O) - if(!istype(O)) - return 5 - else if(O.potency == -1) - return 5 - else - return round(O.potency) - -/obj/machinery/reagentgrinder/proc/get_juice_amount(obj/item/weapon/reagent_containers/food/snacks/grown/O) - if(!istype(O)) - return 5 - else if(O.potency == -1) - return 5 - else - return round(5*sqrt(O.potency)) - -/obj/machinery/reagentgrinder/proc/remove_object(obj/item/O) - holdingitems -= O - qdel(O) - -/obj/machinery/reagentgrinder/proc/juice() - power_change() - if(stat & (NOPOWER|BROKEN)) - return - if(!beaker || (beaker && beaker.reagents.total_volume >= beaker.reagents.maximum_volume)) - return - playsound(loc, 'sound/machines/juicer.ogg', 20, 1) - var/offset = prob(50) ? -2 : 2 - animate(src, pixel_x = pixel_x + offset, time = 0.2, loop = 200) //start shaking - inuse = 1 - spawn(50) - pixel_x = initial(pixel_x) //return to its spot after shaking - inuse = 0 - interact(usr) - //Snacks - for(var/obj/item/weapon/reagent_containers/food/snacks/O in holdingitems) - if(beaker.reagents.total_volume >= beaker.reagents.maximum_volume) - break - - var/allowed = null - if(istype(O, /obj/item/weapon/reagent_containers/food/snacks/grown)) - allowed = get_allowed_juice_by_tag(O) - else - allowed = get_allowed_juice_by_id(O) - if(isnull(allowed)) - break - - for(var/r_id in allowed) - - var/space = beaker.reagents.maximum_volume - beaker.reagents.total_volume - var/amount = get_juice_amount(O) - - beaker.reagents.add_reagent(r_id, min(amount, space)) - - if(beaker.reagents.total_volume >= beaker.reagents.maximum_volume) - break - - remove_object(O) - -/obj/machinery/reagentgrinder/proc/grind() - - power_change() - if(stat & (NOPOWER|BROKEN)) - return - if(!beaker || (beaker && beaker.reagents.total_volume >= beaker.reagents.maximum_volume)) - return - playsound(loc, 'sound/machines/blender.ogg', 50, 1) - var/offset = prob(50) ? -2 : 2 - animate(src, pixel_x = pixel_x + offset, time = 0.2, loop = 200) //start shaking - inuse = 1 - spawn(60) - pixel_x = initial(pixel_x) //return to its spot after shaking - inuse = 0 - interact(usr) - //Snacks and Plants - for(var/obj/item/weapon/reagent_containers/food/snacks/O in holdingitems) - if(beaker.reagents.total_volume >= beaker.reagents.maximum_volume) - break - - var/allowed = null - if(istype(O, /obj/item/weapon/reagent_containers/food/snacks/grown)) - allowed = get_allowed_snack_by_tag(O) - else - allowed = get_allowed_snack_by_id(O) - if(isnull(allowed)) - break - - for(var/r_id in allowed) - - var/space = beaker.reagents.maximum_volume - beaker.reagents.total_volume - var/amount = allowed[r_id] - if(amount <= 0) //Negative amounts are multipliers for the reagent amount (Example: "amount = -5" means "reagent_amount * 5") - if(amount == 0) - if(O.reagents != null && O.reagents.has_reagent("nutriment")) - beaker.reagents.add_reagent(r_id, min(O.reagents.get_reagent_amount("nutriment"), space)) - O.reagents.remove_reagent("nutriment", min(O.reagents.get_reagent_amount("nutriment"), space)) - if(O.reagents != null && O.reagents.has_reagent("plantmatter")) - beaker.reagents.add_reagent(r_id, min(O.reagents.get_reagent_amount("plantmatter"), space)) - O.reagents.remove_reagent("plantmatter", min(O.reagents.get_reagent_amount("plantmatter"), space)) - else - if(O.reagents != null && O.reagents.has_reagent("nutriment")) - beaker.reagents.add_reagent(r_id, min(round(O.reagents.get_reagent_amount("nutriment")*abs(amount)), space)) - O.reagents.remove_reagent("nutriment", min(O.reagents.get_reagent_amount("nutriment"), space)) - if(O.reagents != null && O.reagents.has_reagent("plantmatter")) - beaker.reagents.add_reagent(r_id, min(round(O.reagents.get_reagent_amount("plantmatter")*abs(amount)), space)) - O.reagents.remove_reagent("plantmatter", min(O.reagents.get_reagent_amount("plantmatter"), space)) - - else - O.reagents.trans_id_to(beaker, r_id, min(amount, space)) - - if(beaker.reagents.total_volume >= beaker.reagents.maximum_volume) - break - - if(O.reagents.reagent_list.len == 0) - remove_object(O) - - //Sheets - for(var/obj/item/stack/sheet/O in holdingitems) - var/allowed = get_allowed_by_id(O) - if(beaker.reagents.total_volume >= beaker.reagents.maximum_volume) - break - for(var/i = 1; i <= round(O.amount, 1); i++) - for(var/r_id in allowed) - var/space = beaker.reagents.maximum_volume - beaker.reagents.total_volume - var/amount = allowed[r_id] - beaker.reagents.add_reagent(r_id,min(amount, space)) - if(space < amount) - break - if(i == round(O.amount, 1)) - remove_object(O) - break - //Plants - for(var/obj/item/weapon/grown/O in holdingitems) - if(beaker.reagents.total_volume >= beaker.reagents.maximum_volume) - break - var/allowed = get_allowed_by_id(O) - for(var/r_id in allowed) - var/space = beaker.reagents.maximum_volume - beaker.reagents.total_volume - var/amount = allowed[r_id] - if(amount == 0) - if(O.reagents != null && O.reagents.has_reagent(r_id)) - beaker.reagents.add_reagent(r_id,min(O.reagents.get_reagent_amount(r_id), space)) - else - beaker.reagents.add_reagent(r_id,min(amount, space)) - - if(beaker.reagents.total_volume >= beaker.reagents.maximum_volume) - break - remove_object(O) - - //xenoarch - /*for(var/obj/item/weapon/rocksliver/O in holdingitems) - if(beaker.reagents.total_volume >= beaker.reagents.maximum_volume) - break - var/allowed = get_allowed_by_id(O) - for(var/r_id in allowed) - var/space = beaker.reagents.maximum_volume - beaker.reagents.total_volume - var/amount = allowed[r_id] - beaker.reagents.add_reagent(r_id,min(amount, space), O.geological_data) - - if(beaker.reagents.total_volume >= beaker.reagents.maximum_volume) - break - remove_object(O)*/ - - //Everything else - Transfers reagents from it into beaker - for(var/obj/item/weapon/reagent_containers/O in holdingitems) - if(beaker.reagents.total_volume >= beaker.reagents.maximum_volume) - break - var/amount = O.reagents.total_volume - O.reagents.trans_to(beaker, amount) - if(!O.reagents.total_volume) - remove_object(O) \ No newline at end of file diff --git a/code/modules/reagents/Chemistry-Colours.dm b/code/modules/reagents/chemistry/colors.dm similarity index 80% rename from code/modules/reagents/Chemistry-Colours.dm rename to code/modules/reagents/chemistry/colors.dm index 176ec99c4d4..3d4ab41fe9c 100644 --- a/code/modules/reagents/Chemistry-Colours.dm +++ b/code/modules/reagents/chemistry/colors.dm @@ -1,31 +1,31 @@ -/* - * Returns: - * #RRGGBB(AA) on success, null on failure - */ -/proc/mix_color_from_reagents(const/list/reagent_list) - if(!istype(reagent_list)) - return - - var/color - var/reagent_color - var/vol_counter = 0 - var/vol_temp - // see libs/IconProcs/IconProcs.dm - for(var/datum/reagent/reagent in reagent_list) - if(reagent.id == "blood" && reagent.data && reagent.data["blood_colour"]) - reagent_color = reagent.data["blood_colour"] - else - reagent_color = reagent.color - - vol_temp = reagent.volume - vol_counter += vol_temp - - if(isnull(color)) - color = reagent.color - else if(length(color) >= length(reagent_color)) - color = BlendRGB(color, reagent_color, vol_temp/vol_counter) - else - color = BlendRGB(reagent_color, color, vol_temp/vol_counter) - return color - - +/* + * Returns: + * #RRGGBB(AA) on success, null on failure + */ +var/list/random_color_list = list("#00aedb","#a200ff","#f47835","#d41243","#d11141","#00b159","#00aedb","#f37735","#ffc425","#008744","#0057e7","#d62d20","#ffa700") + +/proc/mix_color_from_reagents(const/list/reagent_list) + if(!istype(reagent_list)) + return + + var/color + var/reagent_color + var/vol_counter = 0 + var/vol_temp + // see libs/IconProcs/IconProcs.dm + for(var/datum/reagent/reagent in reagent_list) + if(reagent.id == "blood" && reagent.data && reagent.data["blood_colour"]) + reagent_color = reagent.data["blood_colour"] + else + reagent_color = reagent.color + + vol_temp = reagent.volume + vol_counter += vol_temp + + if(isnull(color)) + color = reagent.color + else if(length(color) >= length(reagent_color)) + color = BlendRGB(color, reagent_color, vol_temp/vol_counter) + else + color = BlendRGB(reagent_color, color, vol_temp/vol_counter) + return color \ No newline at end of file diff --git a/code/modules/reagents/Chemistry-Holder.dm b/code/modules/reagents/chemistry/holder.dm similarity index 80% rename from code/modules/reagents/Chemistry-Holder.dm rename to code/modules/reagents/chemistry/holder.dm index ecc9c9ddc18..9c0c14014e4 100644 --- a/code/modules/reagents/Chemistry-Holder.dm +++ b/code/modules/reagents/chemistry/holder.dm @@ -1,601 +1,730 @@ -//This file was auto-corrected by findeclaration.exe on 25.5.2012 20:42:32 - -var/const/TOUCH = 1 -var/const/INGEST = 2 - -/////////////////////////////////////////////////////////////////////////////////// - -/datum/reagents - var/list/datum/reagent/reagent_list = new/list() - var/total_volume = 0 - var/maximum_volume = 100 - var/atom/my_atom = null - var/chem_temp = 300 - var/list/datum/reagent/addiction_list = new/list() - -/datum/reagents/New(maximum=100) - maximum_volume = maximum - - //I dislike having these here but map-objects are initialised before world/New() is called. >_> - if(!chemical_reagents_list) - //Chemical Reagents - Initialises all /datum/reagent into a list indexed by reagent id - var/paths = subtypesof(/datum/reagent) - chemical_reagents_list = list() - for(var/path in paths) - var/datum/reagent/D = new path() - chemical_reagents_list[D.id] = D - if(!D.can_grow_in_plants) - plant_blocked_chems.Add(D.id) - if(!chemical_reactions_list) - //Chemical Reactions - Initialises all /datum/chemical_reaction into a list - // It is filtered into multiple lists within a list. - // For example: - // chemical_reaction_list["plasma"] is a list of all reactions relating to plasma - - var/paths = subtypesof(/datum/chemical_reaction) - chemical_reactions_list = list() - - for(var/path in paths) - - var/datum/chemical_reaction/D = new path() - var/list/reaction_ids = list() - - if(D && D.required_reagents && D.required_reagents.len) - for(var/reaction in D.required_reagents) - reaction_ids += reaction - - // Create filters based on each reagent id in the required reagents list - for(var/id in reaction_ids) - if(!chemical_reactions_list[id]) - chemical_reactions_list[id] = list() - chemical_reactions_list[id] += D - break // Don't bother adding ourselves to other reagent ids, it is redundant. - -/datum/reagents/proc/remove_any(amount=1) - var/total_transfered = 0 - var/current_list_element = 1 - - current_list_element = rand(1,reagent_list.len) - - while(total_transfered != amount) - if(total_transfered >= amount) - break - if(total_volume <= 0 || !reagent_list.len) - break - - if(current_list_element > reagent_list.len) current_list_element = 1 - var/datum/reagent/current_reagent = reagent_list[current_list_element] - - remove_reagent(current_reagent.id, min(1, amount - total_transfered)) - - current_list_element++ - total_transfered++ - update_total() - - handle_reactions() - return total_transfered - -/datum/reagents/proc/get_master_reagent_name() - var/the_name = null - var/the_volume = 0 - for(var/datum/reagent/A in reagent_list) - if(A.volume > the_volume) - the_volume = A.volume - the_name = A.name - - return the_name - -/datum/reagents/proc/get_master_reagent_id() - var/the_id = null - var/the_volume = 0 - for(var/datum/reagent/A in reagent_list) - if(A.volume > the_volume) - the_volume = A.volume - the_id = A.id - - return the_id - -/datum/reagents/proc/trans_to(target, amount=1, multiplier=1, preserve_data=1)//if preserve_data=0, the reagents data will be lost. Usefull if you use data for some strange stuff and don't want it to be transferred. - if(!target) - return - if(total_volume <= 0) - return - var/datum/reagents/R - if(istype(target, /obj)) - var/obj/O = target - if(!O.reagents ) - return - R = O.reagents - else if(isliving(target)) - var/mob/living/M = target - if(!M.reagents) - return - R = M.reagents - else if(istype(target, /datum/reagents)) - R = target - else - return - - amount = min(min(amount, total_volume), R.maximum_volume-R.total_volume) - var/part = amount / total_volume - var/trans_data = null - for(var/datum/reagent/current_reagent in reagent_list) - if(!current_reagent) - continue - if(current_reagent.id == "blood" && ishuman(target)) - var/mob/living/carbon/human/H = target - H.inject_blood(my_atom, amount) - continue - var/current_reagent_transfer = current_reagent.volume * part - if(preserve_data) - trans_data = copy_data(current_reagent) - - R.add_reagent(current_reagent.id, (current_reagent_transfer * multiplier), trans_data, chem_temp) - remove_reagent(current_reagent.id, current_reagent_transfer) - - update_total() - R.update_total() - R.handle_reactions() - handle_reactions() - return amount - -/datum/reagents/proc/copy_to(obj/target, amount=1, multiplier=1, preserve_data=1, safety = 0) - if(!target) - return - if(!target.reagents || total_volume<=0) - return - var/datum/reagents/R = target.reagents - amount = min(min(amount, total_volume), R.maximum_volume-R.total_volume) - var/part = amount / total_volume - var/trans_data = null - for(var/datum/reagent/current_reagent in reagent_list) - var/current_reagent_transfer = current_reagent.volume * part - if(preserve_data) - trans_data = copy_data(current_reagent) - R.add_reagent(current_reagent.id, (current_reagent_transfer * multiplier), trans_data) - - update_total() - R.update_total() - R.handle_reactions() - handle_reactions() - return amount - -/datum/reagents/proc/trans_id_to(obj/target, reagent, amount=1, preserve_data=1)//Not sure why this proc didn't exist before. It does now! /N - if(!target) - return - if(!target.reagents || total_volume<=0 || !get_reagent_amount(reagent)) - return - - var/datum/reagents/R = target.reagents - if(get_reagent_amount(reagent) R.maximum_volume) return 0 - - current_list_element = rand(1,reagent_list.len) //Eh, bandaid fix. - - while(total_transfered != amount) - if(total_transfered >= amount) break //Better safe than sorry. - if(total_volume <= 0 || !reagent_list.len) break - if(R.total_volume >= R.maximum_volume) break - - if(current_list_element > reagent_list.len) current_list_element = 1 - var/datum/reagent/current_reagent = reagent_list[current_list_element] - if(preserve_data) - trans_data = current_reagent.data - R.add_reagent(current_reagent.id, (1 * multiplier), trans_data) - remove_reagent(current_reagent.id, 1) - - current_list_element++ - total_transfered++ - update_total() - R.update_total() - R.handle_reactions() - handle_reactions() - - return total_transfered -*/ - - -/datum/reagents/proc/conditional_update_move(atom/A, Running = 0) - for(var/datum/reagent/R in reagent_list) - R.on_move (A, Running) - update_total() - -/datum/reagents/proc/conditional_update(atom/A, ) - for(var/datum/reagent/R in reagent_list) - R.on_update (A) - update_total() - -/datum/reagents/proc/handle_reactions() - if(my_atom.flags & NOREACT) - return //Yup, no reactions here. No siree. - - var/reaction_occured = 0 - do - reaction_occured = 0 - for(var/datum/reagent/R in reagent_list) // Usually a small list - for(var/reaction in chemical_reactions_list[R.id]) // Was a big list but now it should be smaller since we filtered it with our reagent id - if(!reaction) - continue - - var/datum/chemical_reaction/C = reaction - var/total_required_reagents = C.required_reagents.len - var/total_matching_reagents = 0 - var/total_required_catalysts = C.required_catalysts.len - var/total_matching_catalysts= 0 - var/matching_container = 0 - var/matching_other = 0 - var/list/multipliers = new/list() - var/min_temp = C.min_temp //Minimum temperature required for the reaction to occur (heat to/above this) - var/max_temp = C.max_temp //Maximum temperature allowed for the reaction to occur (cool to/below this) - for(var/B in C.required_reagents) - if(!has_reagent(B, C.required_reagents[B])) - break - total_matching_reagents++ - multipliers += round(get_reagent_amount(B) / C.required_reagents[B]) - for(var/B in C.required_catalysts) - if(!has_reagent(B, C.required_catalysts[B])) - break - total_matching_catalysts++ - - if(!C.required_container) - matching_container = 1 - - else - if(my_atom.type == C.required_container) - matching_container = 1 - - if(!C.required_other) - matching_other = 1 - - else if(istype(my_atom, /obj/item/slime_extract)) - var/obj/item/slime_extract/M = my_atom - - if(M.Uses > 0) // added a limit to slime cores -- Muskets requested this - matching_other = 1 - - if(min_temp == 0) - min_temp = chem_temp - - if(total_matching_reagents == total_required_reagents && total_matching_catalysts == total_required_catalysts && matching_container && matching_other && chem_temp <= max_temp && chem_temp >= min_temp) - var/multiplier = min(multipliers) - var/preserved_data = null - for(var/B in C.required_reagents) - if(!preserved_data) - preserved_data = get_data(B) - remove_reagent(B, (multiplier * C.required_reagents[B]), safety = 1) - - var/created_volume = C.result_amount*multiplier - if(C.result) - feedback_add_details("chemical_reaction","[C.result]|[C.result_amount*multiplier]") - multiplier = max(multiplier, 1) //this shouldnt happen ... - add_reagent(C.result, C.result_amount*multiplier) - set_data(C.result, preserved_data) - - //add secondary products - for(var/S in C.secondary_results) - add_reagent(S, C.result_amount * C.secondary_results[S] * multiplier) - - var/list/seen = viewers(4, get_turf(my_atom)) - for(var/mob/M in seen) - if(!C.no_message) - to_chat(M, "[bicon(my_atom)] [C.mix_message]") - - if(istype(my_atom, /obj/item/slime_extract)) - var/obj/item/slime_extract/ME2 = my_atom - ME2.Uses-- - if(ME2.Uses <= 0) // give the notification that the slime core is dead - for(var/mob/M in seen) - to_chat(M, "[bicon(my_atom)] The [my_atom]'s power is consumed in the reaction.") - ME2.name = "used slime extract" - ME2.desc = "This extract has been used up." - - playsound(get_turf(my_atom), C.mix_sound, 80, 1) - - C.on_reaction(src, created_volume) - reaction_occured = 1 - break - - while(reaction_occured) - update_total() - return 0 - -/datum/reagents/proc/isolate_reagent(reagent) - for(var/A in reagent_list) - var/datum/reagent/R = A - if(R.id != reagent) - del_reagent(R.id) - update_total() - -/datum/reagents/proc/del_reagent(reagent) - for(var/A in reagent_list) - var/datum/reagent/R = A - if(R.id == reagent) - if(isliving(my_atom)) - var/mob/living/M = my_atom - R.reagent_deleted(M) - reagent_list -= A - qdel(A) - update_total() - my_atom.on_reagent_change() - return 0 - - - return 1 - -/datum/reagents/proc/update_total() - total_volume = 0 - for(var/datum/reagent/R in reagent_list) - if(R.volume < 0.1) - del_reagent(R.id) - else - total_volume += R.volume - - return 0 - -/datum/reagents/proc/clear_reagents() - for(var/datum/reagent/R in reagent_list) - del_reagent(R.id) - return 0 - -/datum/reagents/proc/reaction_check(mob/living/M, datum/reagent/R) - var/can_process = 0 - if(ishuman(M)) - var/mob/living/carbon/human/H = M - //Check if this mob's species is set and can process this type of reagent - if(H.species && H.species.reagent_tag) - if((R.process_flags & SYNTHETIC) && (H.species.reagent_tag & PROCESS_SYN)) //SYNTHETIC-oriented reagents require PROCESS_SYN - can_process = 1 - if((R.process_flags & ORGANIC) && (H.species.reagent_tag & PROCESS_ORG)) //ORGANIC-oriented reagents require PROCESS_ORG - can_process = 1 - //Species with PROCESS_DUO are only affected by reagents that affect both organics and synthetics, like acid and hellwater - if((R.process_flags & ORGANIC) && (R.process_flags & SYNTHETIC) && (H.species.reagent_tag & PROCESS_DUO)) - can_process = 1 - if(H.species && H.species.exotic_blood) - if(R.id == H.species.exotic_blood) - can_process = 0 - //We'll assume that non-human mobs lack the ability to process synthetic-oriented reagents (adjust this if we need to change that assumption) - else - if(R.process_flags != SYNTHETIC) - can_process = 1 - return can_process - -/datum/reagents/proc/reaction(atom/A, method=TOUCH, volume_modifier = 1) - switch(method) - if(TOUCH) - for(var/datum/reagent/R in reagent_list) - if(isliving(A)) - var/check = reaction_check(A, R) - if(!check) - continue - else - R.reaction_mob(A, TOUCH, R.volume*volume_modifier) - if(isturf(A)) - R.reaction_turf(A, R.volume*volume_modifier) - if(isobj(A)) - R.reaction_obj(A, R.volume*volume_modifier) - if(INGEST) - for(var/datum/reagent/R in reagent_list) - if(isliving(A)) - var/check = reaction_check(A, R) - if(!check) - continue - else - R.reaction_mob(A, INGEST, R.volume*volume_modifier) - if(isturf(A)) - R.reaction_turf(A, R.volume*volume_modifier) - if(isobj(A)) - R.reaction_obj(A, R.volume*volume_modifier) - -/datum/reagents/proc/add_reagent_list(list/list_reagents, list/data=null) // Like add_reagent but you can enter a list. Format it like this: list("toxin" = 10, "beer" = 15) - for(var/r_id in list_reagents) - var/amt = list_reagents[r_id] - add_reagent(r_id, amt, data) - -/datum/reagents/proc/add_reagent(reagent, amount, list/data=null, reagtemp = 300) - if(!isnum(amount)) - return 1 - update_total() - if(total_volume + amount > maximum_volume) amount = (maximum_volume - total_volume) //Doesnt fit in. Make it disappear. Shouldnt happen. Will happen. - if(amount <= 0) - return 0 - chem_temp = round(((amount * reagtemp) + (total_volume * chem_temp)) / (total_volume + amount)) //equalize with new chems - - for(var/A in reagent_list) - - var/datum/reagent/R = A - if(R.id == reagent) - R.volume += amount - update_total() - my_atom.on_reagent_change() - R.on_merge(data) - handle_reactions() - return 0 - - var/datum/reagent/D = chemical_reagents_list[reagent] - if(D) - - var/datum/reagent/R = new D.type() - reagent_list += R - R.holder = src - R.volume = amount - if(data) - R.data = data - R.on_new(data) - - update_total() - my_atom.on_reagent_change() - handle_reactions() - return 0 - else - warning("[my_atom] attempted to add a reagent called '[reagent]' which doesn't exist. ([usr])") - - handle_reactions() - - return 1 - -/datum/reagents/proc/remove_reagent(reagent, amount, safety)//Added a safety check for the trans_id_to - - if(!isnum(amount)) - return 1 - - for(var/A in reagent_list) - var/datum/reagent/R = A - if(R.id == reagent) - R.volume -= amount - update_total() - if(!safety)//So it does not handle reactions when it need not to - handle_reactions() - my_atom.on_reagent_change() - return 0 - - return 1 - -/datum/reagents/proc/has_reagent(reagent, amount = -1) - - for(var/A in reagent_list) - var/datum/reagent/R = A - if(R.id == reagent) - if(!amount) - return R - else - if(R.volume >= amount) - return R - else - return 0 - - return 0 - -/datum/reagents/proc/get_reagent_amount(reagent) - for(var/A in reagent_list) - var/datum/reagent/R = A - if(R.id == reagent) - return R.volume - - return 0 - -/datum/reagents/proc/get_reagents() - var/res = "" - for(var/datum/reagent/A in reagent_list) - if(res != "") res += "," - res += A.name - - return res - -/datum/reagents/proc/get_reagent(type) - . = locate(type) in reagent_list - -/datum/reagents/proc/remove_all_type(reagent_type, amount, strict = 0, safety = 1) // Removes all reagent of X type. @strict set to 1 determines whether the childs of the type are included. - if(!isnum(amount)) - return 1 - - var/has_removed_reagent = 0 - - for(var/datum/reagent/R in reagent_list) - var/matches = 0 - // Switch between how we check the reagent type - if(strict) - if(R.type == reagent_type) - matches = 1 - else - if(istype(R, reagent_type)) - matches = 1 - // We found a match, proceed to remove the reagent. Keep looping, we might find other reagents of the same type. - if(matches) - // Have our other proc handle removement - has_removed_reagent = remove_reagent(R.id, amount, safety) - - return has_removed_reagent - -// Admin logging. -/datum/reagents/proc/get_reagent_ids(and_amount=0) - var/list/stuff = list() - for(var/datum/reagent/A in reagent_list) - if(and_amount) - stuff += "[get_reagent_amount(A.id)]U of [A.id]" - else - stuff += A.id - return english_list(stuff) - -//two helper functions to preserve data across reactions (needed for xenoarch) -/datum/reagents/proc/get_data(reagent_id) - for(var/datum/reagent/D in reagent_list) - if(D.id == reagent_id) -// to_chat(world, "proffering a data-carrying reagent ([reagent_id])") - return D.data - -/datum/reagents/proc/set_data(reagent_id, new_data) - for(var/datum/reagent/D in reagent_list) - if(D.id == reagent_id) -// to_chat(world, "reagent data set ([reagent_id])") - D.data = new_data - -/datum/reagents/proc/copy_data(datum/reagent/current_reagent) - if(!current_reagent || !current_reagent.data) - return null - if(!istype(current_reagent.data, /list)) - return current_reagent.data - - var/list/trans_data = current_reagent.data.Copy() - - // We do this so that introducing a virus to a blood sample - // doesn't automagically infect all other blood samples from - // the same donor. - // - // Technically we should probably copy all data lists, but - // that could possibly eat up a lot of memory needlessly - // if most data lists are read-only. - if(trans_data["viruses"]) - var/list/v = trans_data["viruses"] - trans_data["viruses"] = v.Copy() - - return trans_data - -/////////////////////////////////////////////////////////////////////////////////// - - -// Convenience proc to create a reagents holder for an atom -// Max vol is maximum volume of holder -atom/proc/create_reagents(max_vol) - reagents = new/datum/reagents(max_vol) - reagents.my_atom = src - -/datum/reagents/proc/get_reagent_from_id(id) - var/datum/reagent/result = null - for(var/datum/reagent/R in reagent_list) - if(R.id == id) - result = R - break - return result - -/datum/reagents/Destroy() - . = ..() - processing_objects.Remove(src) - for(var/datum/reagent/R in reagent_list) - qdel(R) - reagent_list.Cut() - reagent_list = null - if(my_atom && my_atom.reagents == src) - my_atom.reagents = null +//This file was auto-corrected by findeclaration.exe on 25.5.2012 20:42:32 + +var/const/TOUCH = 1 +var/const/INGEST = 2 +#define ADDICTION_TIME 4800 //8 minutes + +/////////////////////////////////////////////////////////////////////////////////// + +/datum/reagents + var/list/datum/reagent/reagent_list = new/list() + var/total_volume = 0 + var/maximum_volume = 100 + var/atom/my_atom = null + var/chem_temp = 300 + var/list/datum/reagent/addiction_list = new/list() + +/datum/reagents/New(maximum=100) + maximum_volume = maximum + + //I dislike having these here but map-objects are initialised before world/New() is called. >_> + if(!chemical_reagents_list) + //Chemical Reagents - Initialises all /datum/reagent into a list indexed by reagent id + var/paths = subtypesof(/datum/reagent) + chemical_reagents_list = list() + for(var/path in paths) + var/datum/reagent/D = new path() + chemical_reagents_list[D.id] = D + if(!D.can_grow_in_plants) + plant_blocked_chems.Add(D.id) + if(!chemical_reactions_list) + //Chemical Reactions - Initialises all /datum/chemical_reaction into a list + // It is filtered into multiple lists within a list. + // For example: + // chemical_reaction_list["plasma"] is a list of all reactions relating to plasma + + var/paths = subtypesof(/datum/chemical_reaction) + chemical_reactions_list = list() + + for(var/path in paths) + + var/datum/chemical_reaction/D = new path() + var/list/reaction_ids = list() + + if(D && D.required_reagents && D.required_reagents.len) + for(var/reaction in D.required_reagents) + reaction_ids += reaction + + // Create filters based on each reagent id in the required reagents list + for(var/id in reaction_ids) + if(!chemical_reactions_list[id]) + chemical_reactions_list[id] = list() + chemical_reactions_list[id] += D + break // Don't bother adding ourselves to other reagent ids, it is redundant. + +/datum/reagents/proc/remove_any(amount=1) + var/total_transfered = 0 + var/current_list_element = 1 + + current_list_element = rand(1,reagent_list.len) + + while(total_transfered != amount) + if(total_transfered >= amount) + break + if(total_volume <= 0 || !reagent_list.len) + break + + if(current_list_element > reagent_list.len) current_list_element = 1 + var/datum/reagent/current_reagent = reagent_list[current_list_element] + + remove_reagent(current_reagent.id, min(1, amount - total_transfered)) + + current_list_element++ + total_transfered++ + update_total() + + handle_reactions() + return total_transfered + +/datum/reagents/proc/get_master_reagent() + var/the_reagent = null + var/the_volume = 0 + for(var/datum/reagent/A in reagent_list) + if(A.volume > the_volume) + the_volume = A.volume + the_reagent = A + + return the_reagent + +/datum/reagents/proc/get_master_reagent_name() + var/the_name = null + var/the_volume = 0 + for(var/datum/reagent/A in reagent_list) + if(A.volume > the_volume) + the_volume = A.volume + the_name = A.name + + return the_name + +/datum/reagents/proc/get_master_reagent_id() + var/the_id = null + var/the_volume = 0 + for(var/datum/reagent/A in reagent_list) + if(A.volume > the_volume) + the_volume = A.volume + the_id = A.id + + return the_id + +/datum/reagents/proc/trans_to(target, amount=1, multiplier=1, preserve_data=1)//if preserve_data=0, the reagents data will be lost. Usefull if you use data for some strange stuff and don't want it to be transferred. + if(!target) + return + if(total_volume <= 0) + return + var/datum/reagents/R + if(istype(target, /obj)) + var/obj/O = target + if(!O.reagents ) + return + R = O.reagents + else if(isliving(target)) + var/mob/living/M = target + if(!M.reagents) + return + R = M.reagents + else if(istype(target, /datum/reagents)) + R = target + else + return + + amount = min(min(amount, total_volume), R.maximum_volume-R.total_volume) + var/part = amount / total_volume + var/trans_data = null + for(var/datum/reagent/current_reagent in reagent_list) + if(!current_reagent) + continue + if(current_reagent.id == "blood" && ishuman(target)) + var/mob/living/carbon/human/H = target + H.inject_blood(my_atom, amount) + continue + var/current_reagent_transfer = current_reagent.volume * part + if(preserve_data) + trans_data = copy_data(current_reagent) + + R.add_reagent(current_reagent.id, (current_reagent_transfer * multiplier), trans_data, chem_temp) + remove_reagent(current_reagent.id, current_reagent_transfer) + + update_total() + R.update_total() + R.handle_reactions() + handle_reactions() + return amount + +/datum/reagents/proc/copy_to(obj/target, amount=1, multiplier=1, preserve_data=1, safety = 0) + if(!target) + return + if(!target.reagents || total_volume<=0) + return + var/datum/reagents/R = target.reagents + amount = min(min(amount, total_volume), R.maximum_volume-R.total_volume) + var/part = amount / total_volume + var/trans_data = null + for(var/datum/reagent/current_reagent in reagent_list) + var/current_reagent_transfer = current_reagent.volume * part + if(preserve_data) + trans_data = copy_data(current_reagent) + R.add_reagent(current_reagent.id, (current_reagent_transfer * multiplier), trans_data) + + update_total() + R.update_total() + R.handle_reactions() + handle_reactions() + return amount + +/datum/reagents/proc/trans_id_to(obj/target, reagent, amount=1, preserve_data=1)//Not sure why this proc didn't exist before. It does now! /N + if(!target) + return + if(!target.reagents || total_volume<=0 || !get_reagent_amount(reagent)) + return + + var/datum/reagents/R = target.reagents + if(get_reagent_amount(reagent)= R.overdose_threshold && !R.overdosed && R.overdose_threshold > 0) + R.overdosed = 1 + R.overdose_start(M) + if(R.volume < R.overdose_threshold && R.overdosed) + R.overdosed = 0 + if(R.overdosed) + R.overdose_process(M, R.volume >= R.overdose_threshold*2 ? 2 : 1) + + for(var/A in addiction_list) + var/datum/reagent/R = A + if(M && R) + if(R.addiction_stage < 5) + if(prob(5)) + R.addiction_stage++ + switch(R.addiction_stage) + if(1) + R.addiction_act_stage1(M) + if(2) + R.addiction_act_stage2(M) + if(3) + R.addiction_act_stage3(M) + if(4) + R.addiction_act_stage4(M) + if(5) + R.addiction_act_stage5(M) + if(prob(20) && (world.timeofday > (R.last_addiction_dose + ADDICTION_TIME))) //Each addiction lasts 8 minutes before it can end + to_chat(M, "You no longer feel reliant on [R.name]!") + addiction_list.Remove(R) + update_total() + +/datum/reagents/proc/death_metabolize(mob/living/M) + if(!M) + return + if(M.stat != DEAD) //what part of DEATH_metabolize don't you get? + return + for(var/A in reagent_list) + var/datum/reagent/R = A + if(!istype(R)) + continue + if(M && R) + R.on_mob_death(M) + +/datum/reagents/proc/overdose_list() + var/od_chems[0] + for(var/datum/reagent/R in reagent_list) + if(R.overdosed) + od_chems.Add(R.id) + return od_chems + + +/datum/reagents/proc/reagent_on_tick() + for(var/datum/reagent/R in reagent_list) + R.on_tick() + return +/* + if(!target) return + var/total_transfered = 0 + var/current_list_element = 1 + var/datum/reagents/R = target.reagents + var/trans_data = null + //if(R.total_volume + amount > R.maximum_volume) return 0 + + current_list_element = rand(1,reagent_list.len) //Eh, bandaid fix. + + while(total_transfered != amount) + if(total_transfered >= amount) break //Better safe than sorry. + if(total_volume <= 0 || !reagent_list.len) break + if(R.total_volume >= R.maximum_volume) break + + if(current_list_element > reagent_list.len) current_list_element = 1 + var/datum/reagent/current_reagent = reagent_list[current_list_element] + if(preserve_data) + trans_data = current_reagent.data + R.add_reagent(current_reagent.id, (1 * multiplier), trans_data) + remove_reagent(current_reagent.id, 1) + + current_list_element++ + total_transfered++ + update_total() + R.update_total() + R.handle_reactions() + handle_reactions() + + return total_transfered +*/ + + +/datum/reagents/proc/conditional_update_move(atom/A, Running = 0) + for(var/datum/reagent/R in reagent_list) + R.on_move (A, Running) + update_total() + +/datum/reagents/proc/conditional_update(atom/A, ) + for(var/datum/reagent/R in reagent_list) + R.on_update (A) + update_total() + +/datum/reagents/proc/handle_reactions() + if(my_atom.flags & NOREACT) + return //Yup, no reactions here. No siree. + + var/reaction_occured = 0 + do + reaction_occured = 0 + for(var/datum/reagent/R in reagent_list) // Usually a small list + for(var/reaction in chemical_reactions_list[R.id]) // Was a big list but now it should be smaller since we filtered it with our reagent id + if(!reaction) + continue + + var/datum/chemical_reaction/C = reaction + var/total_required_reagents = C.required_reagents.len + var/total_matching_reagents = 0 + var/total_required_catalysts = C.required_catalysts.len + var/total_matching_catalysts= 0 + var/matching_container = 0 + var/matching_other = 0 + var/list/multipliers = new/list() + var/min_temp = C.min_temp //Minimum temperature required for the reaction to occur (heat to/above this) + var/max_temp = C.max_temp //Maximum temperature allowed for the reaction to occur (cool to/below this) + for(var/B in C.required_reagents) + if(!has_reagent(B, C.required_reagents[B])) + break + total_matching_reagents++ + multipliers += round(get_reagent_amount(B) / C.required_reagents[B]) + for(var/B in C.required_catalysts) + if(!has_reagent(B, C.required_catalysts[B])) + break + total_matching_catalysts++ + + if(!C.required_container) + matching_container = 1 + + else + if(my_atom.type == C.required_container) + matching_container = 1 + + if(!C.required_other) + matching_other = 1 + + else if(istype(my_atom, /obj/item/slime_extract)) + var/obj/item/slime_extract/M = my_atom + + if(M.Uses > 0) // added a limit to slime cores -- Muskets requested this + matching_other = 1 + + if(min_temp == 0) + min_temp = chem_temp + + if(total_matching_reagents == total_required_reagents && total_matching_catalysts == total_required_catalysts && matching_container && matching_other && chem_temp <= max_temp && chem_temp >= min_temp) + var/multiplier = min(multipliers) + var/preserved_data = null + for(var/B in C.required_reagents) + if(!preserved_data) + preserved_data = get_data(B) + remove_reagent(B, (multiplier * C.required_reagents[B]), safety = 1) + + var/created_volume = C.result_amount*multiplier + if(C.result) + feedback_add_details("chemical_reaction","[C.result]|[C.result_amount*multiplier]") + multiplier = max(multiplier, 1) //this shouldnt happen ... + add_reagent(C.result, C.result_amount*multiplier) + set_data(C.result, preserved_data) + + //add secondary products + for(var/S in C.secondary_results) + add_reagent(S, C.result_amount * C.secondary_results[S] * multiplier) + + var/list/seen = viewers(4, get_turf(my_atom)) + for(var/mob/M in seen) + if(!C.no_message) + to_chat(M, "[bicon(my_atom)] [C.mix_message]") + + if(istype(my_atom, /obj/item/slime_extract)) + var/obj/item/slime_extract/ME2 = my_atom + ME2.Uses-- + if(ME2.Uses <= 0) // give the notification that the slime core is dead + for(var/mob/M in seen) + to_chat(M, "[bicon(my_atom)] The [my_atom]'s power is consumed in the reaction.") + ME2.name = "used slime extract" + ME2.desc = "This extract has been used up." + + playsound(get_turf(my_atom), C.mix_sound, 80, 1) + + C.on_reaction(src, created_volume) + reaction_occured = 1 + break + + while(reaction_occured) + update_total() + return 0 + +/datum/reagents/proc/isolate_reagent(reagent) + for(var/A in reagent_list) + var/datum/reagent/R = A + if(R.id != reagent) + del_reagent(R.id) + update_total() + +/datum/reagents/proc/del_reagent(reagent) + for(var/A in reagent_list) + var/datum/reagent/R = A + if(R.id == reagent) + if(isliving(my_atom)) + var/mob/living/M = my_atom + R.on_mob_delete(M) + reagent_list -= A + qdel(A) + update_total() + my_atom.on_reagent_change() + return 0 + + + return 1 + +/datum/reagents/proc/update_total() + total_volume = 0 + for(var/datum/reagent/R in reagent_list) + if(R.volume < 0.1) + del_reagent(R.id) + else + total_volume += R.volume + + return 0 + +/datum/reagents/proc/clear_reagents() + for(var/datum/reagent/R in reagent_list) + del_reagent(R.id) + return 0 + +/datum/reagents/proc/reaction_check(mob/living/M, datum/reagent/R) + var/can_process = 0 + if(ishuman(M)) + var/mob/living/carbon/human/H = M + //Check if this mob's species is set and can process this type of reagent + if(H.species && H.species.reagent_tag) + if((R.process_flags & SYNTHETIC) && (H.species.reagent_tag & PROCESS_SYN)) //SYNTHETIC-oriented reagents require PROCESS_SYN + can_process = 1 + if((R.process_flags & ORGANIC) && (H.species.reagent_tag & PROCESS_ORG)) //ORGANIC-oriented reagents require PROCESS_ORG + can_process = 1 + //Species with PROCESS_DUO are only affected by reagents that affect both organics and synthetics, like acid and hellwater + if((R.process_flags & ORGANIC) && (R.process_flags & SYNTHETIC) && (H.species.reagent_tag & PROCESS_DUO)) + can_process = 1 + if(H.species && H.species.exotic_blood) + if(R.id == H.species.exotic_blood) + can_process = 0 + //We'll assume that non-human mobs lack the ability to process synthetic-oriented reagents (adjust this if we need to change that assumption) + else + if(R.process_flags != SYNTHETIC) + can_process = 1 + return can_process + +/datum/reagents/proc/reaction(atom/A, method=TOUCH, volume_modifier = 1) + switch(method) + if(TOUCH) + for(var/datum/reagent/R in reagent_list) + if(isliving(A)) + var/check = reaction_check(A, R) + if(!check) + continue + else + R.reaction_mob(A, TOUCH, R.volume*volume_modifier) + if(isturf(A)) + R.reaction_turf(A, R.volume*volume_modifier) + if(isobj(A)) + R.reaction_obj(A, R.volume*volume_modifier) + if(INGEST) + for(var/datum/reagent/R in reagent_list) + if(isliving(A)) + var/check = reaction_check(A, R) + if(!check) + continue + else + R.reaction_mob(A, INGEST, R.volume*volume_modifier) + if(isturf(A)) + R.reaction_turf(A, R.volume*volume_modifier) + if(isobj(A)) + R.reaction_obj(A, R.volume*volume_modifier) + +/datum/reagents/proc/add_reagent_list(list/list_reagents, list/data=null) // Like add_reagent but you can enter a list. Format it like this: list("toxin" = 10, "beer" = 15) + for(var/r_id in list_reagents) + var/amt = list_reagents[r_id] + add_reagent(r_id, amt, data) + +/datum/reagents/proc/add_reagent(reagent, amount, list/data=null, reagtemp = 300) + if(!isnum(amount)) + return 1 + update_total() + if(total_volume + amount > maximum_volume) amount = (maximum_volume - total_volume) //Doesnt fit in. Make it disappear. Shouldnt happen. Will happen. + if(amount <= 0) + return 0 + chem_temp = round(((amount * reagtemp) + (total_volume * chem_temp)) / (total_volume + amount)) //equalize with new chems + + for(var/A in reagent_list) + + var/datum/reagent/R = A + if(R.id == reagent) + R.volume += amount + update_total() + my_atom.on_reagent_change() + R.on_merge(data) + handle_reactions() + return 0 + + var/datum/reagent/D = chemical_reagents_list[reagent] + if(D) + + var/datum/reagent/R = new D.type() + reagent_list += R + R.holder = src + R.volume = amount + if(data) + R.data = data + R.on_new(data) + + update_total() + my_atom.on_reagent_change() + handle_reactions() + return 0 + else + warning("[my_atom] attempted to add a reagent called '[reagent]' which doesn't exist. ([usr])") + + handle_reactions() + + return 1 + +/datum/reagents/proc/remove_reagent(reagent, amount, safety)//Added a safety check for the trans_id_to + + if(!isnum(amount)) + return 1 + + for(var/A in reagent_list) + var/datum/reagent/R = A + if(R.id == reagent) + R.volume -= amount + update_total() + if(!safety)//So it does not handle reactions when it need not to + handle_reactions() + my_atom.on_reagent_change() + return 0 + + return 1 + +/datum/reagents/proc/has_reagent(reagent, amount = -1) + + for(var/A in reagent_list) + var/datum/reagent/R = A + if(R.id == reagent) + if(!amount) + return R + else + if(R.volume >= amount) + return R + else + return 0 + + return 0 + +/datum/reagents/proc/get_reagent_amount(reagent) + for(var/A in reagent_list) + var/datum/reagent/R = A + if(R.id == reagent) + return R.volume + + return 0 + +/datum/reagents/proc/get_reagents() + var/res = "" + for(var/datum/reagent/A in reagent_list) + if(res != "") res += "," + res += A.name + + return res + +/datum/reagents/proc/get_reagent(type) + . = locate(type) in reagent_list + +/datum/reagents/proc/remove_all_type(reagent_type, amount, strict = 0, safety = 1) // Removes all reagent of X type. @strict set to 1 determines whether the childs of the type are included. + if(!isnum(amount)) + return 1 + + var/has_removed_reagent = 0 + + for(var/datum/reagent/R in reagent_list) + var/matches = 0 + // Switch between how we check the reagent type + if(strict) + if(R.type == reagent_type) + matches = 1 + else + if(istype(R, reagent_type)) + matches = 1 + // We found a match, proceed to remove the reagent. Keep looping, we might find other reagents of the same type. + if(matches) + // Have our other proc handle removement + has_removed_reagent = remove_reagent(R.id, amount, safety) + + return has_removed_reagent + +// Admin logging. +/datum/reagents/proc/get_reagent_ids(and_amount=0) + var/list/stuff = list() + for(var/datum/reagent/A in reagent_list) + if(and_amount) + stuff += "[get_reagent_amount(A.id)]U of [A.id]" + else + stuff += A.id + return english_list(stuff) + +//two helper functions to preserve data across reactions (needed for xenoarch) +/datum/reagents/proc/get_data(reagent_id) + for(var/datum/reagent/D in reagent_list) + if(D.id == reagent_id) +// to_chat(world, "proffering a data-carrying reagent ([reagent_id])") + return D.data + +/datum/reagents/proc/set_data(reagent_id, new_data) + for(var/datum/reagent/D in reagent_list) + if(D.id == reagent_id) +// to_chat(world, "reagent data set ([reagent_id])") + D.data = new_data + +/datum/reagents/proc/copy_data(datum/reagent/current_reagent) + if(!current_reagent || !current_reagent.data) + return null + if(!istype(current_reagent.data, /list)) + return current_reagent.data + + var/list/trans_data = current_reagent.data.Copy() + + // We do this so that introducing a virus to a blood sample + // doesn't automagically infect all other blood samples from + // the same donor. + // + // Technically we should probably copy all data lists, but + // that could possibly eat up a lot of memory needlessly + // if most data lists are read-only. + if(trans_data["viruses"]) + var/list/v = trans_data["viruses"] + trans_data["viruses"] = v.Copy() + + return trans_data + +// For random item spawning. Takes a list of paths, and returns the same list without anything that contains admin only reagents +/proc/adminReagentCheck(list/incoming) + var/list/outgoing[0] + for(var/tocheck in incoming) + if(ispath(tocheck)) + var/check = new tocheck + if(istype(check, /atom)) + var/atom/reagentCheck = check + var/datum/reagents/reagents = reagentCheck.reagents + var/admin = 0 + for(var/reag in reagents.reagent_list) + var/datum/reagent/reagent = reag + if(reagent.admin_only) + admin = 1 + break + if(!(admin)) + outgoing += tocheck + else + outgoing += tocheck + return outgoing + +/////////////////////////////////////////////////////////////////////////////////// + + +// Convenience proc to create a reagents holder for an atom +// Max vol is maximum volume of holder +atom/proc/create_reagents(max_vol) + reagents = new/datum/reagents(max_vol) + reagents.my_atom = src + +/datum/reagents/proc/get_reagent_from_id(id) + var/datum/reagent/result = null + for(var/datum/reagent/R in reagent_list) + if(R.id == id) + result = R + break + return result + +/datum/reagents/Destroy() + . = ..() + processing_objects.Remove(src) + for(var/datum/reagent/R in reagent_list) + qdel(R) + reagent_list.Cut() + reagent_list = null + if(my_atom && my_atom.reagents == src) + my_atom.reagents = null \ No newline at end of file diff --git a/code/modules/reagents/chemistry/machinery/chem_dispenser.dm b/code/modules/reagents/chemistry/machinery/chem_dispenser.dm new file mode 100644 index 00000000000..5103f246a27 --- /dev/null +++ b/code/modules/reagents/chemistry/machinery/chem_dispenser.dm @@ -0,0 +1,377 @@ +#define SOLID 1 +#define LIQUID 2 +#define GAS 3 + +/obj/machinery/chem_dispenser + name = "chem dispenser" + density = 1 + anchored = 1 + icon = 'icons/obj/chemical.dmi' + icon_state = "dispenser" + use_power = 0 + idle_power_usage = 40 + var/ui_title = "Chem Dispenser 5000" + var/energy = 100 + var/max_energy = 100 + var/amount = 30 + var/obj/item/weapon/reagent_containers/beaker = null + var/recharged = 0 + var/hackedcheck = 0 + var/list/dispensable_reagents = list("hydrogen", "lithium", "carbon", "nitrogen", "oxygen", "fluorine", + "sodium", "aluminum", "silicon", "phosphorus", "sulfur", "chlorine", "potassium", "iron", + "copper", "mercury", "plasma", "radium", "water", "ethanol", "sugar", "iodine", "bromine", "silver") + var/list/hacked_reagents = list("toxin") + var/hack_message = "You disable the safety safeguards, enabling the \"Mad Scientist\" mode." + var/unhack_message = "You re-enable the safety safeguards, enabling the \"NT Standard\" mode." + var/list/broken_requirements = list() + var/broken_on_spawn = 0 + var/recharge_delay = 5 + var/image/icon_beaker = null //cached overlay + + +/obj/machinery/chem_dispenser/proc/recharge() + if(stat & (BROKEN|NOPOWER)) return + var/addenergy = 1 + var/oldenergy = energy + energy = min(energy + addenergy, max_energy) + if(energy != oldenergy) + use_power(1500) // This thing uses up alot of power (this is still low as shit for creating reagents from thin air) + nanomanager.update_uis(src) // update all UIs attached to src + +/obj/machinery/chem_dispenser/power_change() + if(powered()) + stat &= ~NOPOWER + else + spawn(rand(0, 15)) + stat |= NOPOWER + nanomanager.update_uis(src) // update all UIs attached to src + +/obj/machinery/chem_dispenser/process() + + if(recharged < 0) + recharge() + recharged = recharge_delay + else + recharged -= 1 + +/obj/machinery/chem_dispenser/New() + ..() + recharge() + dispensable_reagents = sortList(dispensable_reagents) + + if(broken_on_spawn) + overlays.Cut() + var/amount = pick(3,3,4) + var/list/options = list() + options[/obj/item/weapon/stock_parts/capacitor/adv] = "Add an advanced capacitor to fix it." + options[/obj/item/weapon/stock_parts/console_screen] = "Replace the console screen to fix it." + options[/obj/item/weapon/stock_parts/manipulator/pico] = "Upgrade to a pico manipulator to fix it." + options[/obj/item/weapon/stock_parts/matter_bin/super] = "Give it a super matter bin to fix it." + options[/obj/item/weapon/stock_parts/cell/super] = "Replace the reagent synthesizer with a super capacity cell to fix it." + options[/obj/item/device/mass_spectrometer/adv] = "Replace the reagent scanner with an advanced mass spectrometer to fix it" + options[/obj/item/weapon/stock_parts/micro_laser/high] = "Repair the reagent synthesizer with an high-power micro-laser to fix it" + options[/obj/item/device/reagent_scanner/adv] = "Replace the reagent scanner with an advanced reagent scanner to fix it" + options[/obj/item/stack/nanopaste] = "Apply some nanopaste to the broken nozzles to fix it." + options[/obj/item/stack/sheet/plasteel] = "Surround the outside with a plasteel cover to fix it." + options[/obj/item/stack/sheet/rglass] = "Insert a pane of reinforced glass to fix it." + + while(amount > 0) + amount -= 1 + + var/index = pick(options) + broken_requirements[index] = options[index] + options -= index + + +/obj/machinery/chem_dispenser/ex_act(severity) + switch(severity) + if(1.0) + qdel(src) + return + if(2.0) + if(prob(50)) + qdel(src) + return + +/obj/machinery/chem_dispenser/blob_act() + if(prob(50)) + qdel(src) + + /** + * The ui_interact proc is used to open and update Nano UIs + * If ui_interact is not used then the UI will not update correctly + * ui_interact is currently defined for /atom/movable + * + * @param user /mob The mob who is interacting with this ui + * @param ui_key string A string key to use for this ui. Allows for multiple unique uis on one obj/mob (defaut value "main") + * + * @return nothing + */ + +/obj/machinery/chem_dispenser/ui_interact(mob/user, ui_key = "main", datum/nanoui/ui = null, force_open = 1) + if(broken_requirements.len) + to_chat(user, "[src] is broken. [broken_requirements[broken_requirements[1]]]") + return + + + // this is the data which will be sent to the ui + var/data[0] + data["amount"] = amount + data["energy"] = round(energy) + data["maxEnergy"] = round(max_energy) + data["isBeakerLoaded"] = beaker ? 1 : 0 + + var beakerContents[0] + var beakerCurrentVolume = 0 + if(beaker && beaker.reagents && beaker.reagents.reagent_list.len) + for(var/datum/reagent/R in beaker.reagents.reagent_list) + beakerContents.Add(list(list("name" = R.name, "id"=R.id, "volume" = R.volume))) // list in a list because Byond merges the first list... + beakerCurrentVolume += R.volume + data["beakerContents"] = beakerContents + + if(beaker) + data["beakerCurrentVolume"] = beakerCurrentVolume + data["beakerMaxVolume"] = beaker.volume + else + data["beakerCurrentVolume"] = null + data["beakerMaxVolume"] = null + + var chemicals[0] + for(var/re in dispensable_reagents) + var/datum/reagent/temp = chemical_reagents_list[re] + if(temp) + chemicals.Add(list(list("title" = temp.name, "id" = temp.id, "commands" = list("dispense" = temp.id)))) // list in a list because Byond merges the first list... + data["chemicals"] = chemicals + + // update the ui if it exists, returns null if no ui is passed/found + ui = nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open) + if(!ui) + // the ui does not exist, so we'll create a new() one + // for a list of parameters and their descriptions see the code docs in \code\modules\nano\nanoui.dm + ui = new(user, src, ui_key, "chem_dispenser.tmpl", ui_title, 390, 655) + // when the ui is first opened this is the data it will use + ui.set_initial_data(data) + // open the new ui window + ui.open() + +/obj/machinery/chem_dispenser/Topic(href, href_list) + if(..()) + return 1 + + if(href_list["amount"]) + amount = round(text2num(href_list["amount"]), 5) // round to nearest 5 + if(amount < 0) // Since the user can actually type the commands himself, some sanity checking + amount = 0 + if(amount > 100) + amount = 100 + + if(href_list["dispense"]) + if(dispensable_reagents.Find(href_list["dispense"]) && beaker != null) + var/obj/item/weapon/reagent_containers/glass/B = beaker + var/datum/reagents/R = B.reagents + var/space = R.maximum_volume - R.total_volume + + R.add_reagent(href_list["dispense"], min(amount, energy * 10, space)) + energy = max(energy - min(amount, energy * 10, space) / 10, 0) + overlays.Cut() + icon_beaker = image('icons/obj/chemical.dmi', src, "disp_beaker") //randomize beaker overlay position. + icon_beaker.pixel_x = rand(-10,5) + overlays += icon_beaker + + if(href_list["remove"]) + if(beaker) + if(href_list["removeamount"]) + var/amount = text2num(href_list["removeamount"]) + if(isnum(amount) && (amount > 0)) + var/obj/item/weapon/reagent_containers/glass/B = beaker + var/datum/reagents/R = B.reagents + var/id = href_list["remove"] + R.remove_reagent(id, amount) + + if(href_list["ejectBeaker"]) + if(beaker) + var/obj/item/weapon/reagent_containers/glass/B = beaker + B.forceMove(loc) + beaker = null + overlays.Cut() + add_fingerprint(usr) + return 1 // update UIs attached to this object + +/obj/machinery/chem_dispenser/attackby(obj/item/weapon/reagent_containers/B, mob/user, params) + if(isrobot(user)) + return + + if(broken_requirements.len && B.type == broken_requirements[1]) + if(istype(B,/obj/item/stack)) + var/obj/item/stack/S = B + S.use(1) + else + if(!user.drop_item()) + to_chat(user, "[B] is stuck to you!") + return + qdel(B) + broken_requirements -= broken_requirements[1] + to_chat(user, "You fix [src].") + return + + if(beaker) + to_chat(user, "Something is already loaded into the machine.") + return + + if(istype(B, /obj/item/weapon/reagent_containers/glass) || istype(B, /obj/item/weapon/reagent_containers/food/drinks)) + beaker = B + if(!user.drop_item()) + to_chat(user, "[B] is stuck to you!") + return + B.forceMove(src) + to_chat(user, "You set [B] on the machine.") + nanomanager.update_uis(src) // update all UIs attached to src + if(!icon_beaker) + icon_beaker = image('icons/obj/chemical.dmi', src, "disp_beaker") //randomize beaker overlay position. + icon_beaker.pixel_x = rand(-10,5) + overlays += icon_beaker + return + +/obj/machinery/chem_dispenser/attackby(obj/item/weapon/B, mob/user, params) + ..() + if(istype(B, /obj/item/device/multitool)) + if(hackedcheck == 0) + to_chat(user, hack_message) + dispensable_reagents += hacked_reagents + hackedcheck = 1 + return + + else + to_chat(user, unhack_message) + dispensable_reagents -= hacked_reagents + hackedcheck = 0 + return + +/obj/machinery/chem_dispenser/attack_ai(mob/user) + return attack_hand(user) + +/obj/machinery/chem_dispenser/attack_ghost(mob/user) + return attack_hand(user) + +/obj/machinery/chem_dispenser/attack_hand(mob/user) + if(stat & BROKEN) + return + + ui_interact(user) + +/obj/machinery/chem_dispenser/soda + icon_state = "soda_dispenser" + name = "soda fountain" + desc = "A drink fabricating machine, capable of producing many sugary drinks with just one touch." + ui_title = "Soda Dispens-o-matic" + energy = 100 + max_energy = 100 + dispensable_reagents = list("water", "ice", "milk", "soymilk", "coffee", "tea", "hot_coco", "cola", "spacemountainwind", "dr_gibb", "space_up", + "tonic", "sodawater", "lemon_lime", "grapejuice", "sugar", "orangejuice", "lemonjuice", "limejuice", "tomatojuice", "banana", + "watermelonjuice", "carrotjuice", "potato", "berryjuice") + hack_message = "You change the mode from 'McNano' to 'Pizza King'." + unhack_message = "You change the mode from 'Pizza King' to 'McNano'." + hacked_reagents = list("thirteenloko") + +/obj/machinery/chem_dispenser/beer + icon_state = "booze_dispenser" + name = "booze dispenser" + ui_title = "Booze Portal 9001" + energy = 100 + max_energy = 100 + desc = "A technological marvel, supposedly able to mix just the mixture you'd like to drink the moment you ask for one." + dispensable_reagents = list("ice", "cream", "cider", "beer", "kahlua", "whiskey", "wine", "vodka", "gin", "rum", "tequila", "vermouth", "cognac", "ale", "mead", "synthanol") + hack_message = "You disable the 'nanotrasen-are-cheap-bastards' lock, enabling hidden and very expensive boozes." + unhack_message = "You re-enable the 'nanotrasen-are-cheap-bastards' lock, disabling hidden and very expensive boozes." + hacked_reagents = list("goldschlager", "patron", "absinthe", "ethanol", "nothing") + +////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + +/obj/machinery/chem_dispenser/constructable + name = "portable chem dispenser" + icon = 'icons/obj/chemical.dmi' + icon_state = "minidispenser" + energy = 5 + max_energy = 5 + amount = 5 + recharge_delay = 10 + dispensable_reagents = list() + var/list/special_reagents = list(list("hydrogen", "oxygen", "silicon", "phosphorus", "sulfur", "carbon", "nitrogen", "water"), + list("lithium", "sugar", "copper", "mercury", "sodium","iodine","bromine"), + list("ethanol", "chlorine", "potassium", "aluminum","plasma", "radium", "fluorine", "iron", "silver"), + list("oil", "ash", "acetone", "saltpetre", "ammonia", "diethylamine", "fuel")) + +/obj/machinery/chem_dispenser/constructable/New() + ..() + component_parts = list() + component_parts += new /obj/item/weapon/circuitboard/chem_dispenser(null) + component_parts += new /obj/item/weapon/stock_parts/matter_bin(null) + component_parts += new /obj/item/weapon/stock_parts/matter_bin(null) + component_parts += new /obj/item/weapon/stock_parts/manipulator(null) + component_parts += new /obj/item/weapon/stock_parts/capacitor(null) + component_parts += new /obj/item/weapon/stock_parts/console_screen(null) + component_parts += new /obj/item/weapon/stock_parts/cell/super(null) + RefreshParts() + +/obj/machinery/chem_dispenser/constructable/upgraded/New() + ..() + component_parts = list() + component_parts += new /obj/item/weapon/circuitboard/chem_dispenser(null) + component_parts += new /obj/item/weapon/stock_parts/matter_bin/super(null) + component_parts += new /obj/item/weapon/stock_parts/matter_bin/super(null) + component_parts += new /obj/item/weapon/stock_parts/manipulator/pico(null) + component_parts += new /obj/item/weapon/stock_parts/capacitor/super(null) + component_parts += new /obj/item/weapon/stock_parts/console_screen(null) + component_parts += new /obj/item/weapon/stock_parts/cell/hyper(null) + RefreshParts() + +/obj/machinery/chem_dispenser/constructable/RefreshParts() + var/time = 0 + var/temp_energy = 0 + var/i + for(var/obj/item/weapon/stock_parts/matter_bin/M in component_parts) + temp_energy += M.rating + temp_energy-- + max_energy = temp_energy * 5 //max energy = (bin1.rating + bin2.rating - 1) * 5, 5 on lowest 25 on highest + for(var/obj/item/weapon/stock_parts/capacitor/C in component_parts) + time += C.rating + for(var/obj/item/weapon/stock_parts/cell/P in component_parts) + time += round(P.maxcharge, 10000) / 10000 + recharge_delay = 10 / (time/2) //delay between recharges, double the usual time on lowest 33% less than usual on highest + for(var/obj/item/weapon/stock_parts/manipulator/M in component_parts) + for(i=1, i<=M.rating, i++) + dispensable_reagents = sortList(dispensable_reagents | special_reagents[i]) + +/obj/machinery/chem_dispenser/constructable/attackby(obj/item/I, mob/user, params) + if(istype(I, /obj/item/weapon/reagent_containers/glass)) + if(panel_open) + to_chat(user, "Close the maintenance panel first.") + return + ..() + else + ..() + + if(default_deconstruction_screwdriver(user, "minidispenser-o", "minidispenser", I)) + return + + if(exchange_parts(user, I)) + return + + if(istype(I, /obj/item/weapon/wrench)) + playsound(src, 'sound/items/Ratchet.ogg', 50, 1) + if(anchored) + anchored = 0 + to_chat(user, "[src] can now be moved.") + else if(!anchored) + anchored = 1 + to_chat(user, "[src] is now secured.") + + if(panel_open) + if(istype(I, /obj/item/weapon/crowbar)) + if(beaker) + var/obj/item/weapon/reagent_containers/glass/B = beaker + B.forceMove(loc) + beaker = null + default_deconstruction_crowbar(I) + return 1 \ No newline at end of file diff --git a/code/modules/reagents/newchem/chem_heater.dm b/code/modules/reagents/chemistry/machinery/chem_heater.dm similarity index 100% rename from code/modules/reagents/newchem/chem_heater.dm rename to code/modules/reagents/chemistry/machinery/chem_heater.dm diff --git a/code/modules/reagents/chemistry/machinery/chem_master.dm b/code/modules/reagents/chemistry/machinery/chem_master.dm new file mode 100644 index 00000000000..b6b0de6e0a0 --- /dev/null +++ b/code/modules/reagents/chemistry/machinery/chem_master.dm @@ -0,0 +1,415 @@ +/obj/machinery/chem_master + name = "\improper ChemMaster 3000" + density = 1 + anchored = 1 + icon = 'icons/obj/chemical.dmi' + icon_state = "mixer0" + use_power = 1 + idle_power_usage = 20 + var/obj/item/weapon/reagent_containers/beaker = null + var/obj/item/weapon/storage/pill_bottle/loaded_pill_bottle = null + var/mode = 0 + var/condi = 0 + var/useramount = 30 // Last used amount + var/pillamount = 10 + var/patchamount = 10 + var/bottlesprite = "bottle" + var/pillsprite = "1" + var/client/has_sprites = list() + var/printing = null + +/obj/machinery/chem_master/New() + create_reagents(100) + overlays += "waitlight" + +/obj/machinery/chem_master/ex_act(severity) + switch(severity) + if(1.0) + qdel(src) + return + if(2.0) + if(prob(50)) + qdel(src) + return + +/obj/machinery/chem_master/blob_act() + if(prob(50)) + qdel(src) + +/obj/machinery/chem_master/power_change() + if(powered()) + stat &= ~NOPOWER + else + spawn(rand(0, 15)) + stat |= NOPOWER + +/obj/machinery/chem_master/attackby(obj/item/weapon/B, mob/user, params) + + if(istype(B, /obj/item/weapon/reagent_containers/glass) || istype(B, /obj/item/weapon/reagent_containers/food/drinks/drinkingglass)) + + if(beaker) + to_chat(user, "A beaker is already loaded into the machine.") + return + if(!user.drop_item()) + to_chat(user, "[B] is stuck to you!") + return + beaker = B + B.forceMove(src) + to_chat(user, "You add the beaker to the machine!") + nanomanager.update_uis(src) + icon_state = "mixer1" + + else if(istype(B, /obj/item/weapon/storage/pill_bottle)) + + if(loaded_pill_bottle) + to_chat(user, "A pill bottle is already loaded into the machine.") + return + + if(!user.drop_item()) + to_chat(user, "[B] is stuck to you!") + return + loaded_pill_bottle = B + B.forceMove(src) + to_chat(user, "You add the pill bottle into the dispenser slot!") + nanomanager.update_uis(src) + return + +/obj/machinery/chem_master/Topic(href, href_list) + if(..()) + return 1 + + add_fingerprint(usr) + usr.set_machine(src) + + + if(href_list["ejectp"]) + if(loaded_pill_bottle) + loaded_pill_bottle.forceMove(loc) + loaded_pill_bottle = null + else if(href_list["close"]) + usr << browse(null, "window=chem_master") + onclose(usr, "chem_master") + usr.unset_machine() + return + + if(href_list["print_p"]) + if(!(printing)) + printing = 1 + visible_message("[src] rattles and prints out a sheet of paper.") + playsound(loc, "sound/goonstation/machines/printer_dotmatrix.ogg", 50, 1) + var/obj/item/weapon/paper/P = new /obj/item/weapon/paper(loc) + P.info = "
Chemical Analysis

" + P.info += "Time of analysis: [worldtime2text(world.time)]

" + P.info += "Chemical name: [href_list["name"]]
" + if(href_list["name"] == "Blood") + var/datum/reagents/R = beaker.reagents + var/datum/reagent/blood/G + for(var/datum/reagent/F in R.reagent_list) + if(F.name == href_list["name"]) + G = F + break + var/B = G.data["blood_type"] + var/C = G.data["blood_DNA"] + P.info += "Description:
Blood Type: [B]
DNA: [C]" + else + P.info += "Description: [href_list["desc"]]" + P.info += "

Notes:
" + P.name = "Chemical Analysis - [href_list["name"]]" + printing = null + + if(beaker) + var/datum/reagents/R = beaker.reagents + if(href_list["analyze"]) + var/dat = "" + if(!condi) + if(href_list["name"] == "Blood") + var/datum/reagent/blood/G + for(var/datum/reagent/F in R.reagent_list) + if(F.name == href_list["name"]) + G = F + break + var/A = G.name + var/B = G.data["blood_type"] + var/C = G.data["blood_DNA"] + dat += "Chemmaster 3000Chemical infos:

Name:
[A]

Description:
Blood Type: [B]
DNA: [C]" + else + dat += "Chemmaster 3000Chemical infos:

Name:
[href_list["name"]]

Description:
[href_list["desc"]]" + dat += "

(Print Analysis)
" + dat += "(Back)" + else + dat += "Condimaster 3000Condiment infos:

Name:
[href_list["name"]]

Description:
[href_list["desc"]]


(Back)" + usr << browse(dat, "window=chem_master;size=575x400") + return + + else if(href_list["add"]) + + if(href_list["amount"]) + var/id = href_list["add"] + var/amount = text2num(href_list["amount"]) + R.trans_id_to(src, id, amount) + + else if(href_list["addcustom"]) + + var/id = href_list["addcustom"] + useramount = input("Select the amount to transfer.", 30, useramount) as num + useramount = isgoodnumber(useramount) + Topic(null, list("amount" = "[useramount]", "add" = "[id]")) + + else if(href_list["remove"]) + + if(href_list["amount"]) + var/id = href_list["remove"] + var/amount = text2num(href_list["amount"]) + if(mode) + reagents.trans_id_to(beaker, id, amount) + else + reagents.remove_reagent(id, amount) + + + else if(href_list["removecustom"]) + + var/id = href_list["removecustom"] + useramount = input("Select the amount to transfer.", 30, useramount) as num + useramount = isgoodnumber(useramount) + Topic(null, list("amount" = "[useramount]", "remove" = "[id]")) + + else if(href_list["toggle"]) + mode = !mode + + else if(href_list["main"]) + attack_hand(usr) + return + else if(href_list["eject"]) + if(beaker) + beaker.forceMove(get_turf(src)) + beaker = null + reagents.clear_reagents() + icon_state = "mixer0" + else if(href_list["createpill"] || href_list["createpill_multiple"]) + if(!condi) + var/count = 1 + if(href_list["createpill_multiple"]) + count = input("Select the number of pills to make.", 10, pillamount) as num|null + if(count == null) + return + count = isgoodnumber(count) + if(count > 20) count = 20 //Pevent people from creating huge stacks of pills easily. Maybe move the number to defines? + if(count <= 0) return + var/amount_per_pill = reagents.total_volume/count + if(amount_per_pill > 50) amount_per_pill = 50 + var/name = input(usr,"Name:","Name your pill!","[reagents.get_master_reagent_name()] ([amount_per_pill]u)") as text|null + if(!name) + return + name = reject_bad_text(name) + while(count--) + var/obj/item/weapon/reagent_containers/food/pill/P = new/obj/item/weapon/reagent_containers/food/pill(loc) + if(!name) name = reagents.get_master_reagent_name() + P.name = "[name] pill" + P.pixel_x = rand(-7, 7) //random position + P.pixel_y = rand(-7, 7) + P.icon_state = "pill"+pillsprite + reagents.trans_to(P,amount_per_pill) + if(loaded_pill_bottle) + if(loaded_pill_bottle.contents.len < loaded_pill_bottle.storage_slots) + P.forceMove(loaded_pill_bottle) + updateUsrDialog() + else + var/name = input(usr,"Name:","Name your bag!",reagents.get_master_reagent_name()) as text|null + if(!name) + return + name = reject_bad_text(name) + var/obj/item/weapon/reagent_containers/food/condiment/pack/P = new/obj/item/weapon/reagent_containers/food/condiment/pack(loc) + if(!name) name = reagents.get_master_reagent_name() + P.originalname = name + P.name = "[name] pack" + P.desc = "A small condiment pack. The label says it contains [name]." + reagents.trans_to(P,10) + else if(href_list["createpatch"] || href_list["createpatch_multiple"]) + if(!condi) + var/count = 1 + if(href_list["createpatch_multiple"]) + count = input("Select the number of patches to make.", 10, patchamount) as num|null + if(count == null) + return + count = isgoodnumber(count) + if(!count || count <= 0) + return + if(count > 20) count = 20 //Pevent people from creating huge stacks of patches easily. Maybe move the number to defines? + var/amount_per_patch = reagents.total_volume/count + if(amount_per_patch > 40) amount_per_patch = 40 + var/name = input(usr,"Name:","Name your patch!","[reagents.get_master_reagent_name()] ([amount_per_patch]u)") as text|null + if(!name) + return + name = reject_bad_text(name) + var/is_medical_patch = chemical_safety_check(reagents) + while(count--) + var/obj/item/weapon/reagent_containers/food/pill/patch/P = new/obj/item/weapon/reagent_containers/food/pill/patch(loc) + if(!name) name = reagents.get_master_reagent_name() + P.name = "[name] patch" + P.pixel_x = rand(-7, 7) //random position + P.pixel_y = rand(-7, 7) + reagents.trans_to(P,amount_per_patch) + if(is_medical_patch) + P.instant_application = 1 + P.icon_state = "bandaid_med" + else if(href_list["createbottle"]) + if(!condi) + var/name = input(usr,"Name:","Name your bottle!",reagents.get_master_reagent_name()) as text|null + if(!name) + return + name = reject_bad_text(name) + var/obj/item/weapon/reagent_containers/glass/bottle/P = new/obj/item/weapon/reagent_containers/glass/bottle(loc) + if(!name) name = reagents.get_master_reagent_name() + P.name = "[name] bottle" + P.pixel_x = rand(-7, 7) //random position + P.pixel_y = rand(-7, 7) + P.icon_state = bottlesprite + reagents.trans_to(P,30) + else + var/obj/item/weapon/reagent_containers/food/condiment/P = new/obj/item/weapon/reagent_containers/food/condiment(loc) + reagents.trans_to(P,50) + else if(href_list["change_pill"]) + #define MAX_PILL_SPRITE 20 //max icon state of the pill sprites + var/dat = "" + var/j = 0 + for(var/i = 1 to MAX_PILL_SPRITE) + j++ + if(j == 1) + dat += "" + dat += "" + if(j == 5) + dat += "" + j = 0 + dat += "
" + usr << browse(dat, "window=chem_master_iconsel;size=225x193") + return + else if(href_list["change_bottle"]) + var/dat = "" + var/j = 0 + for(var/i in list("bottle", "small_bottle", "wide_bottle", "round_bottle")) + j++ + if(j == 1) + dat += "" + dat += "" + if(j == 5) + dat += "" + j = 0 + dat += "
" + usr << browse(dat, "window=chem_master_iconsel;size=225x193") + return + else if(href_list["pill_sprite"]) + pillsprite = href_list["pill_sprite"] + usr << browse(null, "window=chem_master_iconsel") + else if(href_list["bottle_sprite"]) + bottlesprite = href_list["bottle_sprite"] + usr << browse(null, "window=chem_master_iconsel") + + nanomanager.update_uis(src) + return + +/obj/machinery/chem_master/attack_ai(mob/user) + return attack_hand(user) + +/obj/machinery/chem_master/attack_ghost(mob/user) + return attack_hand(user) + +/obj/machinery/chem_master/attack_hand(mob/user) + if(..()) + return 1 + ui_interact(user) + return + +/obj/machinery/chem_master/ui_interact(mob/user, ui_key="main", datum/nanoui/ui = null, force_open = 1) + + var/datum/asset/chem_master/assets = get_asset_datum(/datum/asset/chem_master) + assets.send(user) + + var/data = list() + + data["condi"] = condi + data["loaded_pill_bottle"] = (loaded_pill_bottle ? 1 : 0) + if(loaded_pill_bottle) + data["loaded_pill_bottle_contents_len"] = loaded_pill_bottle.contents.len + data["loaded_pill_bottle_storage_slots"] = loaded_pill_bottle.storage_slots + + data["beaker"] = (beaker ? 1 : 0) + if(beaker) + var/list/beaker_reagents_list = list() + data["beaker_reagents"] = beaker_reagents_list + for(var/datum/reagent/R in beaker.reagents.reagent_list) + beaker_reagents_list[++beaker_reagents_list.len] = list("name" = R.name, "volume" = R.volume, "id" = R.id, "description" = R.description) + var/list/buffer_reagents_list = list() + data["buffer_reagents"] = buffer_reagents_list + for(var/datum/reagent/R in reagents.reagent_list) + buffer_reagents_list[++buffer_reagents_list.len] = list("name" = R.name, "volume" = R.volume, "id" = R.id, "description" = R.description) + + data["pillsprite"] = pillsprite + data["bottlesprite"] = bottlesprite + data["mode"] = mode + + ui = nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open) + if(!ui) + ui = new(user, src, ui_key, "chem_master.tmpl", name, 575, 400) + ui.set_initial_data(data) + ui.open() + +/obj/machinery/chem_master/proc/isgoodnumber(num) + if(isnum(num)) + if(num > 200) + num = 200 + else if(num < 0) + num = 1 + else + num = round(num) + return num + else + return 0 + +/obj/machinery/chem_master/proc/chemical_safety_check(datum/reagents/R) + var/all_safe = 1 + for(var/datum/reagent/A in R.reagent_list) + if(!safe_chem_list.Find(A.id)) + all_safe = 0 + return all_safe + +/obj/machinery/chem_master/condimaster + name = "\improper CondiMaster 3000" + condi = 1 + +/obj/machinery/chem_master/constructable + name = "ChemMaster 2999" + desc = "Used to seperate chemicals and distribute them in a variety of forms." + +/obj/machinery/chem_master/constructable/New() + ..() + component_parts = list() + component_parts += new /obj/item/weapon/circuitboard/chem_master(null) + component_parts += new /obj/item/weapon/stock_parts/manipulator(null) + component_parts += new /obj/item/weapon/stock_parts/console_screen(null) + component_parts += new /obj/item/weapon/reagent_containers/glass/beaker(null) + component_parts += new /obj/item/weapon/reagent_containers/glass/beaker(null) + +/obj/machinery/chem_master/constructable/attackby(obj/item/B, mob/user, params) + + if(default_deconstruction_screwdriver(user, "mixer0_nopower", "mixer0", B)) + if(beaker) + beaker.forceMove(get_turf(src)) + beaker = null + reagents.clear_reagents() + if(loaded_pill_bottle) + loaded_pill_bottle.forceMove(get_turf(src)) + loaded_pill_bottle = null + return + + if(exchange_parts(user, B)) + return + + if(panel_open) + if(istype(B, /obj/item/weapon/crowbar)) + default_deconstruction_crowbar(B) + return 1 + else + to_chat(user, "You can't use the [name] while it's panel is opened!") + return 1 + else + ..() \ No newline at end of file diff --git a/code/modules/reagents/pandemic.dm b/code/modules/reagents/chemistry/machinery/pandemic.dm similarity index 99% rename from code/modules/reagents/pandemic.dm rename to code/modules/reagents/chemistry/machinery/pandemic.dm index 1f801d0ace5..1aa72ac0918 100644 --- a/code/modules/reagents/pandemic.dm +++ b/code/modules/reagents/chemistry/machinery/pandemic.dm @@ -293,5 +293,4 @@ ..() return else - ..() - return + ..() \ No newline at end of file diff --git a/code/modules/reagents/chemistry/machinery/reagentgrinder.dm b/code/modules/reagents/chemistry/machinery/reagentgrinder.dm new file mode 100644 index 00000000000..38cfdf4b0ae --- /dev/null +++ b/code/modules/reagents/chemistry/machinery/reagentgrinder.dm @@ -0,0 +1,415 @@ +/obj/machinery/reagentgrinder + name = "\improper All-In-One Grinder" + icon = 'icons/obj/kitchen.dmi' + icon_state = "juicer1" + layer = 2.9 + density = 1 + anchored = 1 + use_power = 1 + idle_power_usage = 5 + active_power_usage = 100 + var/inuse = 0 + var/obj/item/weapon/reagent_containers/beaker = null + var/limit = 10 + + //IMPORTANT NOTE! A negative number is a multiplier, a positive number is a flat amount to add. 0 means equal to the amount of the original reagent + var/list/blend_items = list ( + + //Sheets + /obj/item/stack/sheet/mineral/plasma = list("plasma_dust" = 20), + /obj/item/stack/sheet/mineral/uranium = list("uranium" = 20), + /obj/item/stack/sheet/mineral/bananium = list("banana" = 20), + /obj/item/stack/sheet/mineral/tranquillite = list("nothing" = 20), + /obj/item/stack/sheet/mineral/silver = list("silver" = 20), + /obj/item/stack/sheet/mineral/gold = list("gold" = 20), + /obj/item/weapon/grown/novaflower = list("capsaicin" = 0), + + //archaeology! + ///obj/item/weapon/rocksliver = list("ground_rock" = 50), + + + //All types that you can put into the grinder to transfer the reagents to the beaker. !Put all recipes above this.! + /obj/item/weapon/reagent_containers/food = list(), + /obj/item/weapon/reagent_containers/honeycomb = list() + ) + + var/list/blend_tags = list ( + "nettle" = list("sacid" = 0), + "deathnettle" = list("facid" = 0), + "soybeans" = list("soymilk" = 0), + "tomato" = list("ketchup" = 0), + "wheat" = list("flour" = -5), + "rice" = list("rice" = -5), + "cherries" = list("cherryjelly" = 0), + ) + + var/list/juice_items = list ( + /obj/item/weapon/reagent_containers/food/snacks/watermelonslice = list("watermelonjuice" = 0), + ) + + var/list/juice_tags = list ( + "tomato" = list("tomatojuice" = 0), + "carrot" = list("carrotjuice" = 0), + "berries" = list("berryjuice" = 0), + "banana" = list("banana" = 0), + "potato" = list("potato" = 0), + "lemon" = list("lemonjuice" = 0), + "orange" = list("orangejuice" = 0), + "lime" = list("limejuice" = 0), + "poisonberries" = list("poisonberryjuice" = 0), + "grapes" = list("grapejuice" = 0), + "corn" = list("cornoil" = 0), + ) + + var/list/holdingitems = list() + +/obj/machinery/reagentgrinder/New() + ..() + beaker = new /obj/item/weapon/reagent_containers/glass/beaker/large(src) + return + +/obj/machinery/reagentgrinder/update_icon() + icon_state = "juicer"+num2text(!isnull(beaker)) + return + +/obj/machinery/reagentgrinder/attackby(obj/item/O, mob/user, params) + + if(istype(O,/obj/item/weapon/reagent_containers/glass) || \ + istype(O,/obj/item/weapon/reagent_containers/food/drinks/drinkingglass) || \ + istype(O,/obj/item/weapon/reagent_containers/food/drinks/shaker)) + + if(beaker) + return 1 + else + if(!user.drop_item()) + to_chat(user, "[O] is stuck to you!") + return + beaker = O + O.forceMove(src) + update_icon() + updateUsrDialog() + return 0 + + if(holdingitems && holdingitems.len >= limit) + to_chat(usr, "The machine cannot hold anymore items.") + return 1 + + //Fill machine with a plantbag! + if(istype(O, /obj/item/weapon/storage/bag/plants)) + var/obj/item/weapon/storage/bag/plants/PB = O + for(var/obj/item/weapon/reagent_containers/food/snacks/grown/G in PB.contents) + PB.remove_from_storage(G, src) + holdingitems += G + if(holdingitems && holdingitems.len >= limit) //Sanity checking so the blender doesn't overfill + to_chat(user, "You empty [PB] into the All-In-One grinder.") + + updateUsrDialog() + return 0 + + + if(!is_type_in_list(O, blend_items) && !is_type_in_list(O, juice_items)) + to_chat(user, "Cannot refine into a reagent.") + return 1 + + user.unEquip(O) + O.forceMove(src) + holdingitems += O + updateUsrDialog() + return 0 + +/obj/machinery/reagentgrinder/attack_ai(mob/user) + return 0 + +/obj/machinery/reagentgrinder/attack_hand(mob/user) + user.set_machine(src) + interact(user) + +/obj/machinery/reagentgrinder/interact(mob/user) // The microwave Menu + var/is_chamber_empty = 0 + var/is_beaker_ready = 0 + var/processing_chamber = "" + var/beaker_contents = "" + var/dat = "" + + if(!inuse) + for(var/obj/item/O in holdingitems) + processing_chamber += "\A [O.name]
" + + if(!processing_chamber) + is_chamber_empty = 1 + processing_chamber = "Nothing." + if(!beaker) + beaker_contents = "No beaker attached.
" + else + is_beaker_ready = 1 + beaker_contents = "The beaker contains:
" + var/anything = 0 + for(var/datum/reagent/R in beaker.reagents.reagent_list) + anything = 1 + beaker_contents += "[R.volume] - [R.name]
" + if(!anything) + beaker_contents += "Nothing
" + + + dat = {" + Processing chamber contains:
+ [processing_chamber]
+ [beaker_contents]
+ "} + if(is_beaker_ready && !is_chamber_empty && !(stat & (NOPOWER|BROKEN))) + dat += "Grind the reagents
" + dat += "Juice the reagents

" + if(holdingitems && holdingitems.len > 0) + dat += "Eject the reagents
" + if(beaker) + dat += "Detach the beaker
" + else + dat += "Please wait..." + user << browse("All-In-One Grinder[dat]", "window=reagentgrinder") + onclose(user, "reagentgrinder") + return + +/obj/machinery/reagentgrinder/Topic(href, href_list) + if(..()) + return + usr.set_machine(src) + switch(href_list["action"]) + if("grind") + grind() + if("juice") + juice() + if("eject") + eject() + if("detach") + detach() + updateUsrDialog() + return + +/obj/machinery/reagentgrinder/proc/detach() + + if(usr.stat != 0) + return + if(!beaker) + return + beaker.forceMove(loc) + beaker = null + update_icon() + +/obj/machinery/reagentgrinder/proc/eject() + + if(usr.stat != 0) + return + if(holdingitems && holdingitems.len == 0) + return + + for(var/obj/item/O in holdingitems) + O.forceMove(loc) + holdingitems -= O + holdingitems = list() + +/obj/machinery/reagentgrinder/proc/is_allowed(obj/item/weapon/reagent_containers/O) + for(var/i in blend_items) + if(istype(O, i)) + return 1 + return 0 + +/obj/machinery/reagentgrinder/proc/get_allowed_by_id(obj/item/weapon/grown/O) + for(var/i in blend_items) + if(istype(O, i)) + return blend_items[i] + +/obj/machinery/reagentgrinder/proc/get_allowed_snack_by_id(obj/item/weapon/reagent_containers/food/snacks/O) + for(var/i in blend_items) + if(istype(O, i)) + return blend_items[i] + +/obj/machinery/reagentgrinder/proc/get_allowed_juice_by_id(obj/item/weapon/reagent_containers/food/snacks/O) + for(var/i in juice_items) + if(istype(O, i)) + return juice_items[i] + +/obj/machinery/reagentgrinder/proc/get_allowed_snack_by_tag(obj/item/weapon/reagent_containers/food/snacks/grown/O) + for(var/i in blend_tags) + if(O.seed.kitchen_tag == i) + return blend_tags[i] + +/obj/machinery/reagentgrinder/proc/get_allowed_juice_by_tag(obj/item/weapon/reagent_containers/food/snacks/grown/O) + for(var/i in juice_tags) + if(O.seed.kitchen_tag == i) + return juice_tags[i] + +/obj/machinery/reagentgrinder/proc/get_grownweapon_amount(obj/item/weapon/grown/O) + if(!istype(O)) + return 5 + else if(O.potency == -1) + return 5 + else + return round(O.potency) + +/obj/machinery/reagentgrinder/proc/get_juice_amount(obj/item/weapon/reagent_containers/food/snacks/grown/O) + if(!istype(O)) + return 5 + else if(O.potency == -1) + return 5 + else + return round(5*sqrt(O.potency)) + +/obj/machinery/reagentgrinder/proc/remove_object(obj/item/O) + holdingitems -= O + qdel(O) + +/obj/machinery/reagentgrinder/proc/juice() + power_change() + if(stat & (NOPOWER|BROKEN)) + return + if(!beaker || (beaker && beaker.reagents.total_volume >= beaker.reagents.maximum_volume)) + return + playsound(loc, 'sound/machines/juicer.ogg', 20, 1) + var/offset = prob(50) ? -2 : 2 + animate(src, pixel_x = pixel_x + offset, time = 0.2, loop = 200) //start shaking + inuse = 1 + spawn(50) + pixel_x = initial(pixel_x) //return to its spot after shaking + inuse = 0 + interact(usr) + //Snacks + for(var/obj/item/weapon/reagent_containers/food/snacks/O in holdingitems) + if(beaker.reagents.total_volume >= beaker.reagents.maximum_volume) + break + + var/allowed = null + if(istype(O, /obj/item/weapon/reagent_containers/food/snacks/grown)) + allowed = get_allowed_juice_by_tag(O) + else + allowed = get_allowed_juice_by_id(O) + if(isnull(allowed)) + break + + for(var/r_id in allowed) + + var/space = beaker.reagents.maximum_volume - beaker.reagents.total_volume + var/amount = get_juice_amount(O) + + beaker.reagents.add_reagent(r_id, min(amount, space)) + + if(beaker.reagents.total_volume >= beaker.reagents.maximum_volume) + break + + remove_object(O) + +/obj/machinery/reagentgrinder/proc/grind() + + power_change() + if(stat & (NOPOWER|BROKEN)) + return + if(!beaker || (beaker && beaker.reagents.total_volume >= beaker.reagents.maximum_volume)) + return + playsound(loc, 'sound/machines/blender.ogg', 50, 1) + var/offset = prob(50) ? -2 : 2 + animate(src, pixel_x = pixel_x + offset, time = 0.2, loop = 200) //start shaking + inuse = 1 + spawn(60) + pixel_x = initial(pixel_x) //return to its spot after shaking + inuse = 0 + interact(usr) + //Snacks and Plants + for(var/obj/item/weapon/reagent_containers/food/snacks/O in holdingitems) + if(beaker.reagents.total_volume >= beaker.reagents.maximum_volume) + break + + var/allowed = null + if(istype(O, /obj/item/weapon/reagent_containers/food/snacks/grown)) + allowed = get_allowed_snack_by_tag(O) + else + allowed = get_allowed_snack_by_id(O) + if(isnull(allowed)) + break + + for(var/r_id in allowed) + + var/space = beaker.reagents.maximum_volume - beaker.reagents.total_volume + var/amount = allowed[r_id] + if(amount <= 0) //Negative amounts are multipliers for the reagent amount (Example: "amount = -5" means "reagent_amount * 5") + if(amount == 0) + if(O.reagents != null && O.reagents.has_reagent("nutriment")) + beaker.reagents.add_reagent(r_id, min(O.reagents.get_reagent_amount("nutriment"), space)) + O.reagents.remove_reagent("nutriment", min(O.reagents.get_reagent_amount("nutriment"), space)) + if(O.reagents != null && O.reagents.has_reagent("plantmatter")) + beaker.reagents.add_reagent(r_id, min(O.reagents.get_reagent_amount("plantmatter"), space)) + O.reagents.remove_reagent("plantmatter", min(O.reagents.get_reagent_amount("plantmatter"), space)) + else + if(O.reagents != null && O.reagents.has_reagent("nutriment")) + beaker.reagents.add_reagent(r_id, min(round(O.reagents.get_reagent_amount("nutriment")*abs(amount)), space)) + O.reagents.remove_reagent("nutriment", min(O.reagents.get_reagent_amount("nutriment"), space)) + if(O.reagents != null && O.reagents.has_reagent("plantmatter")) + beaker.reagents.add_reagent(r_id, min(round(O.reagents.get_reagent_amount("plantmatter")*abs(amount)), space)) + O.reagents.remove_reagent("plantmatter", min(O.reagents.get_reagent_amount("plantmatter"), space)) + + else + O.reagents.trans_id_to(beaker, r_id, min(amount, space)) + + if(beaker.reagents.total_volume >= beaker.reagents.maximum_volume) + break + + if(O.reagents.reagent_list.len == 0) + remove_object(O) + + //Sheets + for(var/obj/item/stack/sheet/O in holdingitems) + var/allowed = get_allowed_by_id(O) + if(beaker.reagents.total_volume >= beaker.reagents.maximum_volume) + break + for(var/i = 1; i <= round(O.amount, 1); i++) + for(var/r_id in allowed) + var/space = beaker.reagents.maximum_volume - beaker.reagents.total_volume + var/amount = allowed[r_id] + beaker.reagents.add_reagent(r_id,min(amount, space)) + if(space < amount) + break + if(i == round(O.amount, 1)) + remove_object(O) + break + //Plants + for(var/obj/item/weapon/grown/O in holdingitems) + if(beaker.reagents.total_volume >= beaker.reagents.maximum_volume) + break + var/allowed = get_allowed_by_id(O) + for(var/r_id in allowed) + var/space = beaker.reagents.maximum_volume - beaker.reagents.total_volume + var/amount = allowed[r_id] + if(amount == 0) + if(O.reagents != null && O.reagents.has_reagent(r_id)) + beaker.reagents.add_reagent(r_id,min(O.reagents.get_reagent_amount(r_id), space)) + else + beaker.reagents.add_reagent(r_id,min(amount, space)) + + if(beaker.reagents.total_volume >= beaker.reagents.maximum_volume) + break + remove_object(O) + + //xenoarch + /*for(var/obj/item/weapon/rocksliver/O in holdingitems) + if(beaker.reagents.total_volume >= beaker.reagents.maximum_volume) + break + var/allowed = get_allowed_by_id(O) + for(var/r_id in allowed) + var/space = beaker.reagents.maximum_volume - beaker.reagents.total_volume + var/amount = allowed[r_id] + beaker.reagents.add_reagent(r_id,min(amount, space), O.geological_data) + + if(beaker.reagents.total_volume >= beaker.reagents.maximum_volume) + break + remove_object(O)*/ + + //Everything else - Transfers reagents from it into beaker + for(var/obj/item/weapon/reagent_containers/O in holdingitems) + if(beaker.reagents.total_volume >= beaker.reagents.maximum_volume) + break + var/amount = O.reagents.total_volume + O.reagents.trans_to(beaker, amount) + if(!O.reagents.total_volume) + remove_object(O) \ No newline at end of file diff --git a/code/modules/reagents/Chemistry-Readme.dm b/code/modules/reagents/chemistry/readme.dm similarity index 97% rename from code/modules/reagents/Chemistry-Readme.dm rename to code/modules/reagents/chemistry/readme.dm index cae0c31162c..1fe946a10d1 100644 --- a/code/modules/reagents/Chemistry-Readme.dm +++ b/code/modules/reagents/chemistry/readme.dm @@ -1,249 +1,249 @@ -/* -NOTE: IF YOU UPDATE THE REAGENT-SYSTEM, ALSO UPDATE THIS README. - -Structure: /////////////////// ////////////////////////// - // Mob or object // -------> // Reagents var (datum) // Is a reference to the datum that holds the reagents. - /////////////////// ////////////////////////// - | | - The object that holds everything. V - reagent_list var (list) A List of datums, each datum is a reagent. - - | | | - V V V - - reagents (datums) Reagents. I.e. Water , antitoxins or mercury. - - -Random important notes: - - An objects on_reagent_change will be called every time the objects reagents change. - Useful if you want to update the objects icon etc. - -About the Holder: - - The holder (reagents datum) is the datum that holds a list of all reagents - currently in the object.It also has all the procs needed to manipulate reagents - - remove_any(amount) - This proc removes reagents from the holder until the passed amount - is matched. It'll try to remove some of ALL reagents contained. - - trans_to(obj/target, amount) - This proc equally transfers the contents of the holder to another - objects holder. You need to pass it the object (not the holder) you want - to transfer to and the amount you want to transfer. Its return value is the - actual amount transfered (if one of the objects is full/empty) - - trans_id_to(obj/target, reagent, amount) - Same as above but only for a specific reagent in the reagent list. - If the specified amount is greater than what is available, it will use - the amount of the reagent that is available. If no reagent exists, returns null. - - metabolize(mob/living/M) - This proc is called by the mobs life proc. It simply calls on_mob_life for - all contained reagents. You shouldnt have to use this one directly. - - handle_reactions() - This proc check all recipes and, on a match, uses them. - It will also call the recipe's on_reaction proc (for explosions or w/e). - Currently, this proc is automatically called by trans_to. - - Modified from the original to preserve reagent data across reactions (originally for xenoarchaeology) - - isolate_reagent(reagent) - Pass it a reagent id and it will remove all reagents but that one. - It's that simple. - - del_reagent(reagent) - Completely remove the reagent with the matching id. - - update_total() - This one simply updates the total volume of the holder. - (the volume of all reagents added together) - - clear_reagents() - This proc removes ALL reagents from the holder. - - reaction(atom/A, method=TOUCH, volume_modifier=0) - This proc calls the appropriate reaction procs of the reagents. - I.e. if A is an object, it will call the reagents reaction_obj - proc. The method var is used for reaction on mobs. It simply tells - us if the mob TOUCHed the reagent or if it INGESTed the reagent. - Since the volume can be checked in a reagents proc, you might want to - use the volume_modifier var to modifiy the passed value without actually - changing the volume of the reagents. - If you're not sure if you need to use this the answer is very most likely 'No'. - You'll want to use this proc whenever an atom first comes in - contact with the reagents of a holder. (in the 'splash' part of a beaker i.e.) - More on the reaction in the reagent part of this readme. - - add_reagent(reagent, amount, data) - Attempts to add X of the matching reagent to the holder. - You wont use this much. Mostly in new procs for pre-filled - objects. - - remove_reagent(reagent, amount) - The exact opposite of the add_reagent proc. - - Modified from original to return the reagent's data, in order to preserve reagent data across reactions (originally for xenoarchaeology) - - has_reagent(reagent, amount) - Returns 1 if the holder contains this reagent. - Or 0 if not. - If you pass it an amount it will additionally check - if the amount is matched. This is optional. - - get_reagent_amount(reagent) - Returns the amount of the matching reagent inside the - holder. Returns 0 if the reagent is missing. - - overdose_list() - Returns a list of all the chemical IDs in the reagent holder that are overdosing - - Important variables: - - total_volume - This variable contains the total volume of all reagents in this holder. - - reagent_list - This is a list of all contained reagents. More specifically, references - to the reagent datums. - - maximum_volume - This is the maximum volume of the holder. - - my_atom - This is the atom the holder is 'in'. Useful if you need to find the location. - (i.e. for explosions) - - -About Reagents: - - Reagents are all the things you can mix and fille in bottles etc. This can be anything from - rejuvs over water to ... iron. Each reagent also has a few procs - i'll explain those below. - - reaction_mob(mob/living/M, method=TOUCH) - This is called by the holder's reation proc. - This version is only called when the reagent - reacts with a mob. The method var can be either - TOUCH or INGEST. You'll want to put stuff like - acid-facemelting in here. Should only ever be - called, directly, on living mobs. - - reaction_obj(obj/O) - This is called by the holder's reation proc. - This version is called when the reagents reacts - with an object. You'll want to put stuff like - object melting in here ... or something. i dunno. - - reaction_turf(turf/T) - This is called by the holder's reation proc. - This version is called when the reagents reacts - with a turf. You'll want to put stuff like extra - slippery floors for lube or something in here. - - on_mob_life(mob/living/M) - This proc is called everytime the mobs life proc executes. - This is the place where you put damage for toxins , - drowsyness for sleep toxins etc etc. - You'll want to call the parents proc by using ..() . - If you dont, the chemical will stay in the mob forever - - unless you write your own piece of code to slowly remove it. - (Should be pretty easy, 1 line of code) - - Important variables: - - holder - This variable contains a reference to the holder the chemical is 'in' - - volume - This is the volume of the reagent. - - id - The id of the reagent - - name - The name of the reagent. - - data - This var can be used for whatever the fuck you want.You could use this - for DNA in a blood reagent or ... well whatever you want. - - color - This is a hexadecimal color that represents the reagent outside of containers, - you define it as "#RRGGBB", or, red green blue. You can also define it using the - rgb() proc, which returns a hexadecimal value too. The color is black by default. - - A good website for color calculations: http://www.psyclops.com/tools/rgb/ - - - - -About Recipes: - - Recipes are simple datums that contain a list of required reagents and a result. - They also have a proc that is called when the recipe is matched. - - on_reaction(datum/reagents/holder, created_volume) - This proc is called when the recipe is matched. - You'll want to add explosions etc here. - To find the location you'll have to do something - like get_turf(holder.my_atom) - - name & id - Should be pretty obvious. - - result - This var contains the id of the resulting reagent. - - required_reagents - This is a list of ids of the required reagents. - Each id also needs an associated value that gives us the minimum required amount - of that reagent. The handle_reaction proc can detect mutiples of the same recipes - so for most cases you want to set the required amount to 1. - - required_catalysts (Added May 2011) - This is a list of the ids of the required catalysts. - Functionally similar to required_reagents, it is a list of reagents that are required - for the reaction. However, unlike required_reagents, catalysts are NOT consumed. - They mearly have to be present in the container. - - result_amount - This is the amount of the resulting reagent this recipe will produce. - I recommend you set this to the total volume of all required reagent. - - required_container - The container the recipe has to take place in in order to happen. Leave this blank/null - if you want the reaction to happen anywhere. - - required_other - Basically like a reagent's data variable. You can set extra requirements for a - reaction with this. - - -About the Tools: - - By default, all atom have a reagents var - but its empty. if you want to use an object for the chem. - system you'll need to add something like this in its new proc: - - var/datum/reagents/R = new/datum/reagents(100), <<< create a new datum, 100 is the maximum_volume of the new holder datum. - reagents = R, <<< assign the new datum to the objects reagents var - R.my_atom = src, <<< set the holders my_atom to src so that we know where we are. - - This can also be done by calling a convenience proc: - atom/proc/create_reagents(max_volume) - - Other important stuff: - - amount_per_transfer_from_this var - This var is mostly used by beakers and bottles. - It simply tells us how much to transfer when - 'pouring' our reagents into something else. - - atom/proc/is_open_container() - Checks atom/var/flags & OPENCONTAINER. - If this returns 1 , you can use syringes, beakers etc - to manipulate the contents of this object. - If it's 0, you'll need to write your own custom reagent - transfer code since you will not be able to use the standard - tools to manipulate it. - +/* +NOTE: IF YOU UPDATE THE REAGENT-SYSTEM, ALSO UPDATE THIS README. + +Structure: /////////////////// ////////////////////////// + // Mob or object // -------> // Reagents var (datum) // Is a reference to the datum that holds the reagents. + /////////////////// ////////////////////////// + | | + The object that holds everything. V + reagent_list var (list) A List of datums, each datum is a reagent. + + | | | + V V V + + reagents (datums) Reagents. I.e. Water , antitoxins or mercury. + + +Random important notes: + + An objects on_reagent_change will be called every time the objects reagents change. + Useful if you want to update the objects icon etc. + +About the Holder: + + The holder (reagents datum) is the datum that holds a list of all reagents + currently in the object.It also has all the procs needed to manipulate reagents + + remove_any(amount) + This proc removes reagents from the holder until the passed amount + is matched. It'll try to remove some of ALL reagents contained. + + trans_to(obj/target, amount) + This proc equally transfers the contents of the holder to another + objects holder. You need to pass it the object (not the holder) you want + to transfer to and the amount you want to transfer. Its return value is the + actual amount transfered (if one of the objects is full/empty) + + trans_id_to(obj/target, reagent, amount) + Same as above but only for a specific reagent in the reagent list. + If the specified amount is greater than what is available, it will use + the amount of the reagent that is available. If no reagent exists, returns null. + + metabolize(mob/living/M) + This proc is called by the mobs life proc. It simply calls on_mob_life for + all contained reagents. You shouldnt have to use this one directly. + + handle_reactions() + This proc check all recipes and, on a match, uses them. + It will also call the recipe's on_reaction proc (for explosions or w/e). + Currently, this proc is automatically called by trans_to. + - Modified from the original to preserve reagent data across reactions (originally for xenoarchaeology) + + isolate_reagent(reagent) + Pass it a reagent id and it will remove all reagents but that one. + It's that simple. + + del_reagent(reagent) + Completely remove the reagent with the matching id. + + update_total() + This one simply updates the total volume of the holder. + (the volume of all reagents added together) + + clear_reagents() + This proc removes ALL reagents from the holder. + + reaction(atom/A, method=TOUCH, volume_modifier=0) + This proc calls the appropriate reaction procs of the reagents. + I.e. if A is an object, it will call the reagents reaction_obj + proc. The method var is used for reaction on mobs. It simply tells + us if the mob TOUCHed the reagent or if it INGESTed the reagent. + Since the volume can be checked in a reagents proc, you might want to + use the volume_modifier var to modifiy the passed value without actually + changing the volume of the reagents. + If you're not sure if you need to use this the answer is very most likely 'No'. + You'll want to use this proc whenever an atom first comes in + contact with the reagents of a holder. (in the 'splash' part of a beaker i.e.) + More on the reaction in the reagent part of this readme. + + add_reagent(reagent, amount, data) + Attempts to add X of the matching reagent to the holder. + You wont use this much. Mostly in new procs for pre-filled + objects. + + remove_reagent(reagent, amount) + The exact opposite of the add_reagent proc. + - Modified from original to return the reagent's data, in order to preserve reagent data across reactions (originally for xenoarchaeology) + + has_reagent(reagent, amount) + Returns 1 if the holder contains this reagent. + Or 0 if not. + If you pass it an amount it will additionally check + if the amount is matched. This is optional. + + get_reagent_amount(reagent) + Returns the amount of the matching reagent inside the + holder. Returns 0 if the reagent is missing. + + overdose_list() + Returns a list of all the chemical IDs in the reagent holder that are overdosing + + Important variables: + + total_volume + This variable contains the total volume of all reagents in this holder. + + reagent_list + This is a list of all contained reagents. More specifically, references + to the reagent datums. + + maximum_volume + This is the maximum volume of the holder. + + my_atom + This is the atom the holder is 'in'. Useful if you need to find the location. + (i.e. for explosions) + + +About Reagents: + + Reagents are all the things you can mix and fille in bottles etc. This can be anything from + rejuvs over water to ... iron. Each reagent also has a few procs - i'll explain those below. + + reaction_mob(mob/living/M, method=TOUCH) + This is called by the holder's reation proc. + This version is only called when the reagent + reacts with a mob. The method var can be either + TOUCH or INGEST. You'll want to put stuff like + acid-facemelting in here. Should only ever be + called, directly, on living mobs. + + reaction_obj(obj/O) + This is called by the holder's reation proc. + This version is called when the reagents reacts + with an object. You'll want to put stuff like + object melting in here ... or something. i dunno. + + reaction_turf(turf/T) + This is called by the holder's reation proc. + This version is called when the reagents reacts + with a turf. You'll want to put stuff like extra + slippery floors for lube or something in here. + + on_mob_life(mob/living/M) + This proc is called everytime the mobs life proc executes. + This is the place where you put damage for toxins , + drowsyness for sleep toxins etc etc. + You'll want to call the parents proc by using ..() . + If you dont, the chemical will stay in the mob forever - + unless you write your own piece of code to slowly remove it. + (Should be pretty easy, 1 line of code) + + Important variables: + + holder + This variable contains a reference to the holder the chemical is 'in' + + volume + This is the volume of the reagent. + + id + The id of the reagent + + name + The name of the reagent. + + data + This var can be used for whatever the fuck you want.You could use this + for DNA in a blood reagent or ... well whatever you want. + + color + This is a hexadecimal color that represents the reagent outside of containers, + you define it as "#RRGGBB", or, red green blue. You can also define it using the + rgb() proc, which returns a hexadecimal value too. The color is black by default. + + A good website for color calculations: http://www.psyclops.com/tools/rgb/ + + + + +About Recipes: + + Recipes are simple datums that contain a list of required reagents and a result. + They also have a proc that is called when the recipe is matched. + + on_reaction(datum/reagents/holder, created_volume) + This proc is called when the recipe is matched. + You'll want to add explosions etc here. + To find the location you'll have to do something + like get_turf(holder.my_atom) + + name & id + Should be pretty obvious. + + result + This var contains the id of the resulting reagent. + + required_reagents + This is a list of ids of the required reagents. + Each id also needs an associated value that gives us the minimum required amount + of that reagent. The handle_reaction proc can detect mutiples of the same recipes + so for most cases you want to set the required amount to 1. + + required_catalysts (Added May 2011) + This is a list of the ids of the required catalysts. + Functionally similar to required_reagents, it is a list of reagents that are required + for the reaction. However, unlike required_reagents, catalysts are NOT consumed. + They mearly have to be present in the container. + + result_amount + This is the amount of the resulting reagent this recipe will produce. + I recommend you set this to the total volume of all required reagent. + + required_container + The container the recipe has to take place in in order to happen. Leave this blank/null + if you want the reaction to happen anywhere. + + required_other + Basically like a reagent's data variable. You can set extra requirements for a + reaction with this. + + +About the Tools: + + By default, all atom have a reagents var - but its empty. if you want to use an object for the chem. + system you'll need to add something like this in its new proc: + + var/datum/reagents/R = new/datum/reagents(100), <<< create a new datum, 100 is the maximum_volume of the new holder datum. + reagents = R, <<< assign the new datum to the objects reagents var + R.my_atom = src, <<< set the holders my_atom to src so that we know where we are. + + This can also be done by calling a convenience proc: + atom/proc/create_reagents(max_volume) + + Other important stuff: + + amount_per_transfer_from_this var + This var is mostly used by beakers and bottles. + It simply tells us how much to transfer when + 'pouring' our reagents into something else. + + atom/proc/is_open_container() + Checks atom/var/flags & OPENCONTAINER. + If this returns 1 , you can use syringes, beakers etc + to manipulate the contents of this object. + If it's 0, you'll need to write your own custom reagent + transfer code since you will not be able to use the standard + tools to manipulate it. + */ \ No newline at end of file diff --git a/code/modules/reagents/oldchem/reagents/_reagent_base.dm b/code/modules/reagents/chemistry/reagents.dm similarity index 53% rename from code/modules/reagents/oldchem/reagents/_reagent_base.dm rename to code/modules/reagents/chemistry/reagents.dm index fbf1398decb..367c747c4e0 100644 --- a/code/modules/reagents/oldchem/reagents/_reagent_base.dm +++ b/code/modules/reagents/chemistry/reagents.dm @@ -1,3 +1,7 @@ +#define SOLID 1 +#define LIQUID 2 +#define GAS 3 + /datum/reagent var/name = "Reagent" var/id = "reagent" @@ -6,7 +10,6 @@ var/reagent_state = SOLID var/list/data = null var/volume = 0 - var/nutriment_factor = 0 var/metabolization_rate = REAGENTS_METABOLISM //var/list/viruses = list() var/color = "#000000" // rgb: 0, 0, 0 (does not support alpha channels - yet!) @@ -20,6 +23,20 @@ //By default, all reagents will ONLY affect organics, not synthetics. Re-define in the reagent's definition if the reagent is meant to affect synths var/process_flags = ORGANIC var/admin_only = 0 + var/can_synth = 1 //whether or not a mech syringe gun and synthesize this reagent + var/overdose_threshold = 0 + var/addiction_chance = 0 + var/addiction_stage = 1 + var/last_addiction_dose = 0 + var/overdosed = 0 // You fucked up and this is now triggering it's overdose effects, purge that shit quick. + var/current_cycle = 1 + var/drink_icon = "glass_brown" // what icon state/name/description a drinking glass will use if this is the master reagent. + var/drink_name = "Glass of ..what?" + var/drink_desc = "You can't really tell what this is." + +/datum/reagent/Destroy() + . = ..() + holder = null /datum/reagent/proc/reaction_mob(mob/living/M, method=TOUCH, volume) //Some reagents transfer on touch, others don't; dependent on if they penetrate the skin or not. if(holder) //for catching rare runtimes @@ -61,20 +78,78 @@ /datum/reagent/proc/on_mob_death(mob/living/M) //use this to have chems have a "death-triggered" effect return -// Called when two reagents of the same are mixing. -/datum/reagent/proc/on_merge(data) +// Called when this reagent is removed while inside a mob +/datum/reagent/proc/on_mob_delete(mob/living/M) return /datum/reagent/proc/on_move(mob/M) return -/datum/reagent/proc/on_update(atom/A) - return - // Called after add_reagents creates a new reagent. /datum/reagent/proc/on_new(data) return -/datum/reagent/Destroy() - . = ..() - holder = null \ No newline at end of file +// Called when two reagents of the same are mixing. +/datum/reagent/proc/on_merge(data) + return + +/datum/reagent/proc/on_update(atom/A) + return + +// Called every time reagent containers process. +/datum/reagent/proc/on_tick(data) + return + +// Called when the reagent container is hit by an explosion +/datum/reagent/proc/on_ex_act(severity) + return + +// Called if the reagent has passed the overdose threshold and is set to be triggering overdose effects +/datum/reagent/proc/overdose_process(mob/living/M, severity) + var/effect = rand(1, 100) - severity + if(effect <= 8) + M.adjustToxLoss(severity) + return effect + +/datum/reagent/proc/overdose_start(mob/living/M) + return + +/datum/reagent/proc/addiction_act_stage1(mob/living/M) + return + +/datum/reagent/proc/addiction_act_stage2(mob/living/M) + if(prob(8)) + M.emote("shiver") + if(prob(8)) + M.emote("sneeze") + if(prob(4)) + to_chat(M, "You feel a dull headache.") + +/datum/reagent/proc/addiction_act_stage3(mob/living/M) + if(prob(8)) + M.emote("twitch_s") + if(prob(8)) + M.emote("shiver") + if(prob(4)) + to_chat(M, "You begin craving [name]!") + +/datum/reagent/proc/addiction_act_stage4(mob/living/M) + if(prob(8)) + M.emote("twitch") + if(prob(4)) + to_chat(M, "You have the strong urge for some [name]!") + if(prob(4)) + to_chat(M, "You REALLY crave some [name]!") + +/datum/reagent/proc/addiction_act_stage5(mob/living/M) + if(prob(8)) + M.emote("twitch") + if(prob(6)) + to_chat(M, "Your stomach lurches painfully!") + M.visible_message("[M] gags and retches!") + M.Stun(rand(2,4)) + M.Weaken(rand(2,4)) + if(prob(5)) + to_chat(M, "You feel like you can't live without [name]!") + if(prob(5)) + to_chat(M, "You would DIE for some [name] right now!") \ No newline at end of file diff --git a/code/modules/reagents/oldchem/reagents/reagents_admin.dm b/code/modules/reagents/chemistry/reagents/admin.dm similarity index 61% rename from code/modules/reagents/oldchem/reagents/reagents_admin.dm rename to code/modules/reagents/chemistry/reagents/admin.dm index 09636bd111f..a915ef8cd57 100644 --- a/code/modules/reagents/oldchem/reagents/reagents_admin.dm +++ b/code/modules/reagents/chemistry/reagents/admin.dm @@ -1,4 +1,4 @@ -/datum/reagent/adminordrazine //An OP chemical for admins +/datum/reagent/medicine/adminordrazine //An OP chemical for admins name = "Adminordrazine" id = "adminordrazine" description = "It's magic. We don't have to explain it." @@ -6,8 +6,9 @@ color = "#C8A5DC" // rgb: 200, 165, 220 process_flags = ORGANIC | SYNTHETIC //Adminbuse knows no bounds! admin_only = 1 + can_synth = 0 -/datum/reagent/adminordrazine/on_mob_life(mob/living/carbon/M) +/datum/reagent/medicine/adminordrazine/on_mob_life(mob/living/carbon/M) M.setCloneLoss(0) M.setOxyLoss(0) M.radiation = 0 @@ -54,30 +55,7 @@ D.cure() ..() -/datum/reagent/adminordrazine/nanites +/datum/reagent/medicine/adminordrazine/nanites name = "Nanites" id = "nanites" - description = "Nanomachines that aid in rapid cellular regeneration." - - -// For random item spawning. Takes a list of paths, and returns the same list without anything that contains admin only reagents - -/proc/adminReagentCheck(var/list/incoming) - var/list/outgoing[0] - for(var/tocheck in incoming) - if(ispath(tocheck)) - var/check = new tocheck - if(istype(check, /atom)) - var/atom/reagentCheck = check - var/datum/reagents/reagents = reagentCheck.reagents - var/admin = 0 - for(var/reag in reagents.reagent_list) - var/datum/reagent/reagent = reag - if(reagent.admin_only) - admin = 1 - break - if(!(admin)) - outgoing += tocheck - else - outgoing += tocheck - return outgoing + description = "Nanomachines that aid in rapid cellular regeneration." \ No newline at end of file diff --git a/code/modules/reagents/chemistry/reagents/alcohol.dm b/code/modules/reagents/chemistry/reagents/alcohol.dm new file mode 100644 index 00000000000..536385d7614 --- /dev/null +++ b/code/modules/reagents/chemistry/reagents/alcohol.dm @@ -0,0 +1,1116 @@ +//ALCOHOL WOO +/datum/reagent/consumable/ethanol + name = "Ethanol" //Parent class for all alcoholic reagents. + id = "ethanol" + description = "A well-known alcohol with a variety of applications." + reagent_state = LIQUID + nutriment_factor = 0 //So alcohol can fill you up! If they want to. + color = "#404030" // rgb: 64, 64, 48 + can_grow_in_plants = 0 //Alcoholic drinks won't be grown in plants (would "water down" random seed chems too much) + var/dizzy_adj = 3 + var/alcohol_perc = 1 //percentage of ethanol in a beverage 0.0 - 1.0 + +/datum/reagent/consumable/ethanol/on_mob_life(mob/living/M) + M.AdjustDrunk(alcohol_perc) + M.AdjustDizzy(dizzy_adj) + ..() + +/datum/reagent/consumable/ethanol/reaction_obj(obj/O, volume) + if(istype(O,/obj/item/weapon/paper)) + var/obj/item/weapon/paper/paperaffected = O + paperaffected.clearpaper() + to_chat(usr, "The solution melts away the ink on the paper.") + if(istype(O,/obj/item/weapon/book)) + if(volume >= 5) + var/obj/item/weapon/book/affectedbook = O + affectedbook.dat = null + to_chat(usr, "The solution melts away the ink on the book.") + else + to_chat(usr, "It wasn't enough...") + +/datum/reagent/consumable/ethanol/reaction_mob(mob/living/M, method=TOUCH, volume)//Splashing people with ethanol isn't quite as good as fuel. + if(method == TOUCH) + M.adjust_fire_stacks(volume / 15) + + +/datum/reagent/consumable/ethanol/beer + name = "Beer" + id = "beer" + description = "An alcoholic beverage made from malted grains, hops, yeast, and water." + nutriment_factor = 2 * REAGENTS_METABOLISM + color = "#664300" // rgb: 102, 67, 0 + alcohol_perc = 0.2 + drink_icon ="beerglass" + drink_name = "Beer glass" + drink_desc = "A freezing pint of beer" + +/datum/reagent/consumable/ethanol/cider + name = "Cider" + id = "cider" + description = "An alcoholic beverage derived from apples." + color = "#174116" + alcohol_perc = 0.2 + drink_icon = "rewriter" + drink_name = "Cider" + drink_desc = "a refreshing glass of traditional cider" + +/datum/reagent/consumable/ethanol/whiskey + name = "Whiskey" + id = "whiskey" + description = "A superb and well-aged single-malt whiskey. Damn." + color = "#664300" // rgb: 102, 67, 0 + dizzy_adj = 4 + alcohol_perc = 0.4 + drink_icon = "whiskeyglass" + drink_name = "Glass of whiskey" + drink_desc = "The silky, smokey whiskey goodness inside the glass makes the drink look very classy." + +/datum/reagent/consumable/ethanol/specialwhiskey + name = "Special Blend Whiskey" + id = "specialwhiskey" + description = "Just when you thought regular station whiskey was good... This silky, amber goodness has to come along and ruin everything." + color = "#664300" // rgb: 102, 67, 0 + alcohol_perc = 0.5 + +/datum/reagent/consumable/ethanol/gin + name = "Gin" + id = "gin" + description = "It's gin. In space. I say, good sir." + color = "#664300" // rgb: 102, 67, 0 + dizzy_adj = 3 + alcohol_perc = 0.5 + drink_icon = "ginvodkaglass" + drink_name = "Glass of gin" + drink_desc = "A crystal clear glass of Griffeater gin." + +/datum/reagent/consumable/ethanol/absinthe + name = "Absinthe" + id = "absinthe" + description = "Watch out that the Green Fairy doesn't come for you!" + color = "#33EE00" // rgb: lots, ??, ?? + overdose_threshold = 30 + dizzy_adj = 5 + alcohol_perc = 0.7 + drink_icon = "absinthebottle" + drink_name = "Glass of Absinthe" + drink_desc = "The green fairy is going to get you now!" + +//copy paste from LSD... shoot me +/datum/reagent/consumable/ethanol/absinthe/on_mob_life(mob/living/M) + M.AdjustHallucinate(5) + ..() + +/datum/reagent/consumable/ethanol/absinthe/overdose_process(mob/living/M, severity) + M.adjustToxLoss(1) + +/datum/reagent/consumable/ethanol/rum + name = "Rum" + id = "rum" + description = "Popular with the sailors. Not very popular with everyone else." + color = "#664300" // rgb: 102, 67, 0 + overdose_threshold = 30 + alcohol_perc = 0.4 + dizzy_adj = 5 + drink_icon = "rumglass" + drink_name = "Glass of Rum" + drink_desc = "Now you want to Pray for a pirate suit, don't you?" + +/datum/reagent/consumable/ethanol/rum/overdose_process(mob/living/M, severity) + M.adjustToxLoss(1) + +/datum/reagent/consumable/ethanol/mojito + name = "Mojito" + id = "mojito" + description = "If it's good enough for Spesscuba, it's good enough for you." + color = "#664300" // rgb: 102, 67, 0 + alcohol_perc = 0.2 + drink_icon = "mojito" + drink_name = "Glass of Mojito" + drink_desc = "Fresh from Spesscuba." + +/datum/reagent/consumable/ethanol/vodka + name = "Vodka" + id = "vodka" + description = "Number one drink AND fueling choice for Russians worldwide." + color = "#664300" // rgb: 102, 67, 0 + alcohol_perc = 0.4 + drink_icon = "ginvodkaglass" + drink_name = "Glass of vodka" + drink_desc = "The glass contain wodka. Xynta." + +/datum/reagent/consumable/ethanol/sake + name = "Sake" + id = "sake" + description = "Anime's favorite drink." + color = "#664300" // rgb: 102, 67, 0 + alcohol_perc = 0.2 + drink_icon = "ginvodkaglass" + drink_name = "Glass of Sake" + drink_desc = "A glass of Sake." + +/datum/reagent/consumable/ethanol/tequila + name = "Tequila" + id = "tequila" + description = "A strong and mildly flavoured, mexican produced spirit. Feeling thirsty hombre?" + color = "#A8B0B7" // rgb: 168, 176, 183 + alcohol_perc = 0.4 + drink_icon = "tequilaglass" + drink_name = "Glass of Tequila" + drink_desc = "Now all that's missing is the weird colored shades!" + +/datum/reagent/consumable/ethanol/vermouth + name = "Vermouth" + id = "vermouth" + description = "You suddenly feel a craving for a martini..." + color = "#664300" // rgb: 102, 67, 0 + alcohol_perc = 0.2 + drink_icon = "vermouthglass" + drink_name = "Glass of Vermouth" + drink_desc = "You wonder why you're even drinking this straight." + +/datum/reagent/consumable/ethanol/wine + name = "Wine" + id = "wine" + description = "An premium alchoholic beverage made from distilled grape juice." + color = "#7E4043" // rgb: 126, 64, 67 + dizzy_adj = 2 + alcohol_perc = 0.2 + drink_icon = "wineglass" + drink_name = "Glass of wine" + drink_desc = "A very classy looking drink." + +/datum/reagent/consumable/ethanol/cognac + name = "Cognac" + id = "cognac" + description = "A sweet and strongly alchoholic drink, made after numerous distillations and years of maturing. Classy as fornication." + color = "#664300" // rgb: 102, 67, 0 + dizzy_adj = 4 + alcohol_perc = 0.4 + drink_icon = "cognacglass" + drink_name = "Glass of cognac" + drink_desc = "Damn, you feel like some kind of French aristocrat just by holding this." + +/datum/reagent/consumable/ethanol/suicider //otherwise known as "I want to get so smashed my liver gives out and I die from alcohol poisoning". + name = "Suicider" + id = "suicider" + description = "An unbelievably strong and potent variety of Cider." + color = "#CF3811" + dizzy_adj = 20 + alcohol_perc = 1 //because that's a thing it's supposed to do, I guess + drink_icon = "suicider" + drink_name = "Suicider" + drink_desc = "You've really hit rock bottom now... your liver packed its bags and left last night." + +/datum/reagent/consumable/ethanol/ale + name = "Ale" + id = "ale" + description = "A dark alchoholic beverage made by malted barley and yeast." + color = "#664300" // rgb: 102, 67, 0 + alcohol_perc = 0.1 + drink_icon = "aleglass" + drink_name = "Ale glass" + drink_desc = "A freezing pint of delicious Ale" + +/datum/reagent/consumable/ethanol/thirteenloko + name = "Thirteen Loko" + id = "thirteenloko" + description = "A potent mixture of caffeine and alcohol." + reagent_state = LIQUID + color = "#102000" // rgb: 16, 32, 0 + alcohol_perc = 0.3 + heart_rate_increase = 1 + drink_icon = "thirteen_loko_glass" + drink_name = "Glass of Thirteen Loko" + drink_desc = "This is a glass of Thirteen Loko, it appears to be of the highest quality. The drink, not the glass" + +/datum/reagent/consumable/ethanol/thirteenloko/on_mob_life(mob/living/M) + M.AdjustDrowsy(-7) + M.AdjustSleeping(-2) + if(M.bodytemperature > 310) + M.bodytemperature = max(310, M.bodytemperature - (5 * TEMPERATURE_DAMAGE_COEFFICIENT)) + M.Jitter(5) + ..() + + +/////////////////////////////////////////////////////////////////cocktail entities////////////////////////////////////////////// + +/datum/reagent/consumable/ethanol/bilk + name = "Bilk" + id = "bilk" + description = "This appears to be beer mixed with milk. Disgusting." + reagent_state = LIQUID + color = "#895C4C" // rgb: 137, 92, 76 + alcohol_perc = 0.2 + drink_icon = "glass_brown" + drink_name = "Glass of bilk" + drink_desc = "A brew of milk and beer. For those alcoholics who fear osteoporosis." + +/datum/reagent/consumable/ethanol/atomicbomb + name = "Atomic Bomb" + id = "atomicbomb" + description = "Nuclear proliferation never tasted so good." + reagent_state = LIQUID + color = "#666300" // rgb: 102, 99, 0 + alcohol_perc = 0.2 + drink_icon = "atomicbombglass" + drink_name = "Atomic Bomb" + drink_desc = "Nanotrasen cannot take legal responsibility for your actions after imbibing." + +/datum/reagent/consumable/ethanol/threemileisland + name = "THree Mile Island Iced Tea" + id = "threemileisland" + description = "Made for a woman, strong enough for a man." + reagent_state = LIQUID + color = "#666340" // rgb: 102, 99, 64 + alcohol_perc = 0.2 + drink_icon = "threemileislandglass" + drink_name = "Three Mile Island Ice Tea" + drink_desc = "A glass of this is sure to prevent a meltdown." + +/datum/reagent/consumable/ethanol/goldschlager + name = "Goldschlager" + id = "goldschlager" + description = "100 proof cinnamon schnapps, made for alcoholic teen girls on spring break." + reagent_state = LIQUID + color = "#664300" // rgb: 102, 67, 0 + alcohol_perc = 0.4 + drink_icon = "ginvodkaglass" + drink_name = "Glass of goldschlager" + drink_desc = "100 proof that teen girls will drink anything with gold in it." + +/datum/reagent/consumable/ethanol/patron + name = "Patron" + id = "patron" + description = "Tequila with silver in it, a favorite of alcoholic women in the club scene." + reagent_state = LIQUID + color = "#585840" // rgb: 88, 88, 64 + alcohol_perc = 0.4 + drink_icon = "patronglass" + drink_name = "Glass of Patron" + drink_desc = "Drinking patron in the bar, with all the subpar ladies." + +/datum/reagent/consumable/ethanol/gintonic + name = "Gin and Tonic" + id = "gintonic" + description = "An all time classic, mild cocktail." + reagent_state = LIQUID + color = "#664300" // rgb: 102, 67, 0 + alcohol_perc = 0.4 + drink_icon = "gintonicglass" + drink_name = "Gin and Tonic" + drink_desc = "A mild but still great cocktail. Drink up, like a true Englishman." + +/datum/reagent/consumable/ethanol/cuba_libre + name = "Cuba Libre" + id = "cubalibre" + description = "Rum, mixed with cola. Viva la revolution." + reagent_state = LIQUID + color = "#3E1B00" // rgb: 62, 27, 0 + alcohol_perc = 0.2 + drink_icon = "cubalibreglass" + drink_name = "Cuba Libre" + drink_desc = "A classic mix of rum and cola." + +/datum/reagent/consumable/ethanol/whiskey_cola + name = "Whiskey Cola" + id = "whiskeycola" + description = "Whiskey, mixed with cola. Surprisingly refreshing." + reagent_state = LIQUID + color = "#3E1B00" // rgb: 62, 27, 0 + alcohol_perc = 0.3 + drink_icon = "whiskeycolaglass" + drink_name = "Whiskey Cola" + drink_desc = "An innocent-looking mixture of cola and Whiskey. Delicious." + +/datum/reagent/consumable/ethanol/martini + name = "Classic Martini" + id = "martini" + description = "Vermouth with Gin. Not quite how 007 enjoyed it, but still delicious." + reagent_state = LIQUID + color = "#664300" // rgb: 102, 67, 0 + alcohol_perc = 0.5 + drink_icon = "martiniglass" + drink_name = "Classic Martini" + drink_desc = "Damn, the bartender even stirred it, not shook it." + +/datum/reagent/consumable/ethanol/vodkamartini + name = "Vodka Martini" + id = "vodkamartini" + description = "Vodka with Gin. Not quite how 007 enjoyed it, but still delicious." + reagent_state = LIQUID + color = "#664300" // rgb: 102, 67, 0 + alcohol_perc = 0.4 + drink_icon = "martiniglass" + drink_name = "Vodka martini" + drink_desc ="A bastardisation of the classic martini. Still great." + +/datum/reagent/consumable/ethanol/white_russian + name = "White Russian" + id = "whiterussian" + description = "That's just, like, your opinion, man..." + reagent_state = LIQUID + color = "#A68340" // rgb: 166, 131, 64 + alcohol_perc = 0.3 + drink_icon = "whiterussianglass" + drink_name = "White Russian" + drink_desc = "A very nice looking drink. But that's just, like, your opinion, man." + +/datum/reagent/consumable/ethanol/screwdrivercocktail + name = "Screwdriver" + id = "screwdrivercocktail" + description = "Vodka, mixed with plain ol' orange juice. The result is surprisingly delicious." + reagent_state = LIQUID + color = "#A68310" // rgb: 166, 131, 16 + alcohol_perc = 0.3 + drink_icon = "screwdriverglass" + drink_name = "Screwdriver" + drink_desc = "A simple, yet superb mixture of Vodka and orange juice. Just the thing for the tired engineer." + +/datum/reagent/consumable/ethanol/booger + name = "Booger" + id = "booger" + description = "Ewww..." + reagent_state = LIQUID + color = "#A68310" // rgb: 166, 131, 16 + alcohol_perc = 0.2 + drink_icon = "booger" + drink_name = "Booger" + drink_desc = "Ewww..." + +/datum/reagent/consumable/ethanol/bloody_mary + name = "Bloody Mary" + id = "bloodymary" + description = "A strange yet pleasurable mixture made of vodka, tomato and lime juice. Or at least you THINK the red stuff is tomato juice." + reagent_state = LIQUID + color = "#664300" // rgb: 102, 67, 0 + alcohol_perc = 0.2 + drink_icon = "bloodymaryglass" + drink_name = "Bloody Mary" + drink_desc = "Tomato juice, mixed with Vodka and a lil' bit of lime. Tastes like liquid murder." + +/datum/reagent/consumable/ethanol/gargle_blaster + name = "Pan-Galactic Gargle Blaster" + id = "gargleblaster" + description = "Whoah, this stuff looks volatile!" + reagent_state = LIQUID + color = "#664300" // rgb: 102, 67, 0 + alcohol_perc = 0.7 //ouch + drink_icon = "gargleblasterglass" + drink_name = "Pan-Galactic Gargle Blaster" + drink_desc = "Does... does this mean that Arthur and Ford are on the station? Oh joy." + +/datum/reagent/consumable/ethanol/brave_bull + name = "Brave Bull" + id = "bravebull" + description = "A strange yet pleasurable mixture made of vodka, tomato and lime juice. Or at least you THINK the red stuff is tomato juice." + reagent_state = LIQUID + color = "#664300" // rgb: 102, 67, 0 + alcohol_perc = 0.3 + drink_icon = "bravebullglass" + drink_name = "Brave Bull" + drink_desc = "Tequila and Coffee liquor, brought together in a mouthwatering mixture. Drink up." + +/datum/reagent/consumable/ethanol/tequila_sunrise + name = "Tequila Sunrise" + id = "tequilasunrise" + description = "Tequila and orange juice. Much like a Screwdriver, only Mexican~" + reagent_state = LIQUID + color = "#664300" // rgb: 102, 67, 0 + alcohol_perc = 0.3 + drink_icon = "tequilasunriseglass" + drink_name = "Tequila Sunrise" + drink_desc = "Oh great, now you feel nostalgic about sunrises back on Terra..." + +/datum/reagent/consumable/ethanol/toxins_special + name = "Toxins Special" + id = "toxinsspecial" + description = "This thing is FLAMING!. CALL THE DAMN SHUTTLE!" + reagent_state = LIQUID + color = "#664300" // rgb: 102, 67, 0 + alcohol_perc = 0.5 + drink_icon = "toxinsspecialglass" + drink_name = "Toxins Special" + drink_desc = "Whoah, this thing is on FIRE" + +/datum/reagent/consumable/ethanol/toxins_special/on_mob_life(mob/living/M) + if(M.bodytemperature < 330) + M.bodytemperature = min(330, M.bodytemperature + (15 * TEMPERATURE_DAMAGE_COEFFICIENT)) //310 is the normal bodytemp. 310.055 + ..() + +/datum/reagent/consumable/ethanol/beepsky_smash + name = "Beepsky Smash" + id = "beepskysmash" + description = "Deny drinking this and prepare for THE LAW." + reagent_state = LIQUID + color = "#664300" // rgb: 102, 67, 0 + alcohol_perc = 0.5 + drink_icon = "beepskysmashglass" + drink_name = "Beepsky Smash" + drink_desc = "Heavy, hot and strong. Just like the Iron fist of the LAW." + +/datum/reagent/consumable/ethanol/beepsky_smash/on_mob_life(mob/living/M) + M.Stun(1) + ..() + +/datum/reagent/consumable/ethanol/irish_cream + name = "Irish Cream" + id = "irishcream" + description = "Whiskey-imbued cream, what else would you expect from the Irish." + reagent_state = LIQUID + color = "#664300" // rgb: 102, 67, 0 + alcohol_perc = 0.3 + drink_icon = "irishcreamglass" + drink_name = "Irish Cream" + drink_desc = "It's cream, mixed with whiskey. What else would you expect from the Irish?" + +/datum/reagent/consumable/ethanol/manly_dorf + name = "The Manly Dorf" + id = "manlydorf" + description = "Beer and Ale, brought together in a delicious mix. Intended for true men only." + reagent_state = LIQUID + color = "#664300" // rgb: 102, 67, 0 + alcohol_perc = 0.2 + drink_icon = "manlydorfglass" + drink_name = "The Manly Dorf" + drink_desc = "A manly concotion made from Ale and Beer. Intended for true men only." + +/datum/reagent/consumable/ethanol/longislandicedtea + name = "Long Island Iced Tea" + id = "longislandicedtea" + description = "The liquor cabinet, brought together in a delicious mix. Intended for middle-aged alcoholic women only." + reagent_state = LIQUID + color = "#664300" // rgb: 102, 67, 0 + alcohol_perc = 0.5 + drink_icon = "longislandicedteaglass" + drink_name = "Long Island Iced Tea" + drink_desc = "The liquor cabinet, brought together in a delicious mix. Intended for middle-aged alcoholic women only." + +/datum/reagent/consumable/ethanol/moonshine + name = "Moonshine" + id = "moonshine" + description = "You've really hit rock bottom now... your liver packed its bags and left last night." + reagent_state = LIQUID + color = "#664300" // rgb: 102, 67, 0 + alcohol_perc = 0.8 //yeeehaw + drink_icon = "glass_clear" + drink_name = "Moonshine" + drink_desc = "You've really hit rock bottom now... your liver packed its bags and left last night." + +/datum/reagent/consumable/ethanol/b52 + name = "B-52" + id = "b52" + description = "Coffee, Irish Cream, and congac. You will get bombed." + reagent_state = LIQUID + color = "#664300" // rgb: 102, 67, 0 + alcohol_perc = 0.3 + drink_icon = "b52glass" + drink_name = "B-52" + drink_desc = "Kahlua, Irish Cream, and congac. You will get bombed." + +/datum/reagent/consumable/ethanol/irishcoffee + name = "Irish Coffee" + id = "irishcoffee" + description = "Coffee, and alcohol. More fun than a Mimosa to drink in the morning." + reagent_state = LIQUID + color = "#664300" // rgb: 102, 67, 0 + alcohol_perc = 0.2 + drink_icon = "irishcoffeeglass" + drink_name = "Irish Coffee" + drink_desc = "Coffee and alcohol. More fun than a Mimosa to drink in the morning." + +/datum/reagent/consumable/ethanol/margarita + name = "Margarita" + id = "margarita" + description = "On the rocks with salt on the rim. Arriba~!" + reagent_state = LIQUID + color = "#664300" // rgb: 102, 67, 0 + alcohol_perc = 0.3 + drink_icon = "margaritaglass" + drink_name = "Margarita" + drink_desc = "On the rocks with salt on the rim. Arriba~!" + +/datum/reagent/consumable/ethanol/black_russian + name = "Black Russian" + id = "blackrussian" + description = "For the lactose-intolerant. Still as classy as a White Russian." + reagent_state = LIQUID + color = "#360000" // rgb: 54, 0, 0 + alcohol_perc = 0.4 + drink_icon = "blackrussianglass" + drink_name = "Black Russian" + drink_desc = "For the lactose-intolerant. Still as classy as a White Russian." + +/datum/reagent/consumable/ethanol/manhattan + name = "Manhattan" + id = "manhattan" + description = "The Detective's undercover drink of choice. He never could stomach gin..." + reagent_state = LIQUID + color = "#664300" // rgb: 102, 67, 0 + alcohol_perc = 0.4 + drink_icon = "manhattanglass" + drink_name = "Manhattan" + drink_desc = "The Detective's undercover drink of choice. He never could stomach gin..." + +/datum/reagent/consumable/ethanol/manhattan_proj + name = "Manhattan Project" + id = "manhattan_proj" + description = "A scienitst's drink of choice, for pondering ways to blow up the station." + reagent_state = LIQUID + color = "#664300" // rgb: 102, 67, 0 + alcohol_perc = 0.4 + drink_icon = "proj_manhattanglass" + drink_name = "Manhattan Project" + drink_desc = "A scienitst drink of choice, for thinking how to blow up the station." + +/datum/reagent/consumable/ethanol/whiskeysoda + name = "Whiskey Soda" + id = "whiskeysoda" + description = "Ultimate refreshment." + reagent_state = LIQUID + color = "#664300" // rgb: 102, 67, 0 + alcohol_perc = 0.3 + drink_icon = "whiskeysodaglass2" + drink_name = "Whiskey Soda" + drink_desc = "Ultimate refreshment." + +/datum/reagent/consumable/ethanol/antifreeze + name = "Anti-freeze" + id = "antifreeze" + description = "Ultimate refreshment." + reagent_state = LIQUID + color = "#664300" // rgb: 102, 67, 0 + alcohol_perc = 0.2 + drink_icon = "antifreeze" + drink_name = "Anti-freeze" + drink_desc = "The ultimate refreshment." + +/datum/reagent/consumable/ethanol/antifreeze/on_mob_life(mob/living/M) + if(M.bodytemperature < 330) + M.bodytemperature = min(330, M.bodytemperature + (20 * TEMPERATURE_DAMAGE_COEFFICIENT)) //310 is the normal bodytemp. 310.055 + ..() + +/datum/reagent/consumable/ethanol/barefoot + name = "Barefoot" + id = "barefoot" + description = "Barefoot and pregnant" + reagent_state = LIQUID + color = "#664300" // rgb: 102, 67, 0 + alcohol_perc = 0.2 + drink_icon = "b&p" + drink_name = "Barefoot" + drink_desc = "Barefoot and pregnant" + +/datum/reagent/consumable/ethanol/snowwhite + name = "Snow White" + id = "snowwhite" + description = "A cold refreshment" + reagent_state = LIQUID + color = "#664300" // rgb: 102, 67, 0 + alcohol_perc = 0.2 + drink_icon = "snowwhite" + drink_name = "Snow White" + drink_desc = "A cold refreshment." + +/datum/reagent/consumable/ethanol/demonsblood + name = "Demons Blood" + id = "demonsblood" + description = "AHHHH!!!!" + reagent_state = LIQUID + color = "#664300" // rgb: 102, 67, 0 + dizzy_adj = 10 + alcohol_perc = 0.4 + drink_icon = "demonsblood" + drink_name = "Demons Blood" + drink_desc = "Just looking at this thing makes the hair at the back of your neck stand up." + +/datum/reagent/consumable/ethanol/vodkatonic + name = "Vodka and Tonic" + id = "vodkatonic" + description = "For when a gin and tonic isn't russian enough." + reagent_state = LIQUID + color = "#664300" // rgb: 102, 67, 0 + dizzy_adj = 4 + alcohol_perc = 0.3 + drink_icon = "vodkatonicglass" + drink_name = "Vodka and Tonic" + drink_desc = "For when a gin and tonic isn't russian enough." + +/datum/reagent/consumable/ethanol/ginfizz + name = "Gin Fizz" + id = "ginfizz" + description = "Refreshingly lemony, deliciously dry." + reagent_state = LIQUID + color = "#664300" // rgb: 102, 67, 0 + dizzy_adj = 4 + alcohol_perc = 0.4 + drink_icon = "ginfizzglass" + drink_name = "Gin Fizz" + drink_desc = "Refreshingly lemony, deliciously dry." + +/datum/reagent/consumable/ethanol/bahama_mama + name = "Bahama mama" + id = "bahama_mama" + description = "Tropic cocktail." + reagent_state = LIQUID + color = "#664300" // rgb: 102, 67, 0 + alcohol_perc = 0.2 + drink_icon = "bahama_mama" + drink_name = "Bahama Mama" + drink_desc = "Tropic cocktail" + +/datum/reagent/consumable/ethanol/singulo + name = "Singulo" + id = "singulo" + description = "A blue-space beverage!" + reagent_state = LIQUID + color = "#2E6671" // rgb: 46, 102, 113 + dizzy_adj = 15 + alcohol_perc = 0.7 + drink_icon = "singulo" + drink_name = "Singulo" + drink_desc = "A blue-space beverage." + +/datum/reagent/consumable/ethanol/sbiten + name = "Sbiten" + id = "sbiten" + description = "A spicy Vodka! Might be a little hot for the little guys!" + reagent_state = LIQUID + color = "#664300" // rgb: 102, 67, 0 + alcohol_perc = 0.4 + drink_icon = "sbitenglass" + drink_name = "Sbiten" + drink_desc = "A spicy mix of Vodka and Spice. Very hot." + +/datum/reagent/consumable/ethanol/sbiten/on_mob_life(mob/living/M) + if(M.bodytemperature < 360) + M.bodytemperature = min(360, M.bodytemperature + (50 * TEMPERATURE_DAMAGE_COEFFICIENT)) //310 is the normal bodytemp. 310.055 + ..() + +/datum/reagent/consumable/ethanol/devilskiss + name = "Devils Kiss" + id = "devilskiss" + description = "Creepy time!" + reagent_state = LIQUID + color = "#A68310" // rgb: 166, 131, 16 + alcohol_perc = 0.3 + drink_icon = "devilskiss" + drink_name = "Devils Kiss" + drink_desc = "Creepy time!" + +/datum/reagent/consumable/ethanol/red_mead + name = "Red Mead" + id = "red_mead" + description = "The true Viking drink! Even though it has a strange red color." + reagent_state = LIQUID + color = "#664300" // rgb: 102, 67, 0 + alcohol_perc = 0.2 + drink_icon = "red_meadglass" + drink_name = "Red Mead" + drink_desc = "A True Vikings Beverage, though its color is strange." + +/datum/reagent/consumable/ethanol/mead + name = "Mead" + id = "mead" + description = "A Vikings drink, though a cheap one." + reagent_state = LIQUID + color = "#664300" // rgb: 102, 67, 0 + alcohol_perc = 0.2 + drink_icon = "meadglass" + drink_name = "Mead" + drink_desc = "A Vikings Beverage, though a cheap one." + +/datum/reagent/consumable/ethanol/iced_beer + name = "Iced Beer" + id = "iced_beer" + description = "A beer which is so cold the air around it freezes." + reagent_state = LIQUID + color = "#664300" // rgb: 102, 67, 0 + alcohol_perc = 0.2 + drink_icon = "iced_beerglass" + drink_name = "Iced Beer" + drink_desc = "A beer so frosty, the air around it freezes." + +/datum/reagent/consumable/ethanol/iced_beer/on_mob_life(mob/living/M) + if(M.bodytemperature > 270) + M.bodytemperature = max(270, M.bodytemperature - (20 * TEMPERATURE_DAMAGE_COEFFICIENT)) //310 is the normal bodytemp. 310.055 + ..() + +/datum/reagent/consumable/ethanol/grog + name = "Grog" + id = "grog" + description = "Watered down rum, Nanotrasen approves!" + reagent_state = LIQUID + color = "#664300" // rgb: 102, 67, 0 + alcohol_perc = 0.2 + drink_icon = "grogglass" + drink_name = "Grog" + drink_desc = "A fine and cepa drink for Space." + +/datum/reagent/consumable/ethanol/aloe + name = "Aloe" + id = "aloe" + description = "So very, very, very good." + reagent_state = LIQUID + color = "#664300" // rgb: 102, 67, 0 + alcohol_perc = 0.2 + drink_icon = "aloe" + drink_name = "Aloe" + drink_desc = "Very, very, very good." + +/datum/reagent/consumable/ethanol/andalusia + name = "Andalusia" + id = "andalusia" + description = "A nice, strange named drink." + reagent_state = LIQUID + color = "#664300" // rgb: 102, 67, 0 + alcohol_perc = 0.4 + drink_icon = "andalusia" + drink_name = "Andalusia" + drink_desc = "A nice, strange named drink." + +/datum/reagent/consumable/ethanol/alliescocktail + name = "Allies Cocktail" + id = "alliescocktail" + description = "A drink made from your allies." + reagent_state = LIQUID + color = "#664300" // rgb: 102, 67, 0 + alcohol_perc = 0.5 + drink_icon = "alliescocktail" + drink_name = "Allies cocktail" + drink_desc = "A drink made from your allies." + +/datum/reagent/consumable/ethanol/acid_spit + name = "Acid Spit" + id = "acidspit" + description = "A drink by Nanotrasen. Made from live aliens." + reagent_state = LIQUID + color = "#365000" // rgb: 54, 80, 0 + alcohol_perc = 0.3 + drink_icon = "acidspitglass" + drink_name = "Acid Spit" + drink_desc = "A drink from Nanotrasen. Made from live aliens." + +/datum/reagent/consumable/ethanol/amasec + name = "Amasec" + id = "amasec" + description = "Official drink of the Imperium." + reagent_state = LIQUID + color = "#664300" // rgb: 102, 67, 0 + alcohol_perc = 0.3 + drink_icon = "amasecglass" + drink_name = "Amasec" + drink_desc = "Always handy before COMBAT!!!" + +/datum/reagent/consumable/ethanol/neurotoxin + name = "Neuro-toxin" + id = "neurotoxin" + description = "A strong neurotoxin that puts the subject into a death-like state." + reagent_state = LIQUID + color = "#2E2E61" // rgb: 46, 46, 97 + dizzy_adj = 6 + alcohol_perc = 0.7 + heart_rate_decrease = 1 + drink_icon = "neurotoxinglass" + drink_name = "Neurotoxin" + drink_desc = "A drink that is guaranteed to knock you silly." + +/datum/reagent/consumable/ethanol/neurotoxin/on_mob_life(mob/living/M) + M.Weaken(3) + if(current_cycle >=55) + M.Druggy(55) + if(current_cycle >=200) + M.adjustToxLoss(2) + ..() + +/datum/reagent/consumable/ethanol/hippies_delight + name = "Hippie's Delight" + id = "hippiesdelight" + description = "You just don't get it maaaan." + reagent_state = LIQUID + color = "#664300" // rgb: 102, 67, 0 + metabolization_rate = 0.2 * REAGENTS_METABOLISM + drink_icon = "hippiesdelightglass" + drink_name = "Hippie's Delight" + drink_desc = "A drink enjoyed by people during the 1960's." + +/datum/reagent/consumable/ethanol/hippies_delight/on_mob_life(mob/living/M) + M.Druggy(50) + switch(current_cycle) + if(1 to 5) + if(!M.stuttering) M.stuttering = 1 + M.Dizzy(10) + if(prob(10)) M.emote(pick("twitch","giggle")) + if(5 to 10) + if(!M.stuttering) M.stuttering = 1 + M.Jitter(20) + M.Dizzy(20) + M.Druggy(45) + if(prob(20)) M.emote(pick("twitch","giggle")) + if(10 to INFINITY) + if(!M.stuttering) M.stuttering = 1 + M.Jitter(40) + M.Dizzy(40) + M.Druggy(60) + if(prob(30)) M.emote(pick("twitch","giggle")) + ..() + +/datum/reagent/consumable/ethanol/changelingsting + name = "Changeling Sting" + id = "changelingsting" + description = "A stingy drink." + reagent_state = LIQUID + color = "#2E6671" // rgb: 46, 102, 113 + alcohol_perc = 0.7 + dizzy_adj = 5 + drink_icon = "changelingsting" + drink_name = "Changeling Sting" + drink_desc = "A stingy drink." + +/datum/reagent/consumable/ethanol/irishcarbomb + name = "Irish Car Bomb" + id = "irishcarbomb" + description = "Mmm, tastes like chocolate cake..." + reagent_state = LIQUID + color = "#2E6671" // rgb: 46, 102, 113 + alcohol_perc = 0.3 + dizzy_adj = 5 + drink_icon = "irishcarbomb" + drink_name = "Irish Car Bomb" + drink_desc = "An irish car bomb." + +/datum/reagent/consumable/ethanol/syndicatebomb + name = "Syndicate Bomb" + id = "syndicatebomb" + description = "A Syndicate bomb" + reagent_state = LIQUID + color = "#2E6671" // rgb: 46, 102, 113 + alcohol_perc = 0.2 + drink_icon = "syndicatebomb" + drink_name = "Syndicate Bomb" + drink_desc = "A syndicate bomb." + +/datum/reagent/consumable/ethanol/erikasurprise + name = "Erika Surprise" + id = "erikasurprise" + description = "The surprise is, it's green!" + reagent_state = LIQUID + color = "#2E6671" // rgb: 46, 102, 113 + alcohol_perc = 0.2 + drink_icon = "erikasurprise" + name = "Erika Surprise" + drink_desc = "The surprise is, it's green!" + +/datum/reagent/consumable/ethanol/driestmartini + name = "Driest Martini" + id = "driestmartini" + description = "Only for the experienced. You think you see sand floating in the glass." + nutriment_factor = 1 * REAGENTS_METABOLISM + color = "#2E6671" // rgb: 46, 102, 113 + alcohol_perc = 0.5 + dizzy_adj = 10 + drink_icon = "driestmartiniglass" + drink_name = "Driest Martini" + drink_desc = "Only for the experienced. You think you see sand floating in the glass." + +/datum/reagent/consumable/ethanol/driestmartini/on_mob_life(mob/living/M) + if(current_cycle >= 55 && current_cycle < 115) + M.stuttering += 10 + ..() + +/datum/reagent/consumable/ethanol/kahlua + name = "Kahlua" + id = "kahlua" + description = "A widely known, Mexican coffee-flavoured liqueur. In production since 1936!" + color = "#664300" // rgb: 102, 67, 0 + alcohol_perc = 0.2 + drink_icon = "kahluaglass" + drink_name = "Glass of RR coffee Liquor" + drink_desc = "DAMN, THIS THING LOOKS ROBUST" + +/datum/reagent/consumable/ethanol/kahlua/on_mob_life(mob/living/M) + M.AdjustDizzy(-5) + M.AdjustDrowsy(-3) + M.AdjustSleeping(-2) + M.Jitter(5) + ..() + +/datum/reagent/ginsonic + name = "Gin and sonic" + id = "ginsonic" + description = "GOTTA GET CRUNK FAST BUT LIQUOR TOO SLOW" + reagent_state = LIQUID + color = "#1111CF" + drink_icon = "ginsonic" + drink_name = "Gin and Sonic" + drink_desc = "An extremely high amperage drink. Absolutely not for the true Englishman." + +/datum/reagent/ginsonic/on_mob_life(mob/living/M) + M.AdjustDrowsy(-5) + if(prob(25)) + M.AdjustParalysis(-1) + M.AdjustStunned(-1) + M.AdjustWeakened(-1) + if(prob(8)) + M.reagents.add_reagent("methamphetamine",1.2) + var/sonic_message = pick("Gotta go fast!", "Time to speed, keed!", "I feel a need for speed!", "Let's juice.", "Juice time.", "Way Past Cool!") + if(prob(50)) + M.say("[sonic_message]") + else + to_chat(M, "[sonic_message ]") + ..() + +/datum/reagent/consumable/ethanol/applejack + name = "Applejack" + id = "applejack" + description = "A highly concentrated alcoholic beverage made by repeatedly freezing cider and removing the ice." + color = "#997A00" + alcohol_perc = 0.4 + drink_icon = "cognacglass" + drink_name = "Glass of applejack" + drink_desc = "When cider isn't strong enough, you gotta jack it." + +/datum/reagent/consumable/ethanol/jackrose + name = "Jack Rose" + id = "jackrose" + description = "A classic cocktail that had fallen out of fashion, but never out of taste," + color = "#664300" + alcohol_perc = 0.4 + drink_icon = "patronglass" + drink_name = "Jack Rose" + drink_desc = "Drinking this makes you feel like you belong in a luxury hotel bar during the 1920s." + +/datum/reagent/consumable/ethanol/dragons_breath //inaccessible to players, but here for admin shennanigans + name = "Dragon's Breath" + id = "dragonsbreath" + description = "Possessing this stuff probably breaks the Geneva convention." + reagent_state = LIQUID + color = "#DC0000" + alcohol_perc = 1 + can_synth = 0 + +/datum/reagent/consumable/ethanol/dragons_breath/reaction_mob(mob/living/M, method=TOUCH, volume) + if(method == INGEST && prob(20)) + if(M.on_fire) + M.adjust_fire_stacks(3) + +/datum/reagent/consumable/ethanol/dragons_breath/on_mob_life(mob/living/M) + if(M.reagents.has_reagent("milk")) + to_chat(M, "The milk stops the burning. Ahhh.") + M.reagents.del_reagent("milk") + M.reagents.del_reagent("dragonsbreath") + return + if(prob(8)) + to_chat(M, "Oh god! Oh GODD!!") + if(prob(50)) + to_chat(M, "Your throat burns terribly!") + M.emote(pick("scream","cry","choke","gasp")) + M.Stun(1) + if(prob(8)) + to_chat(M, "Why!? WHY!?") + if(prob(8)) + to_chat(M, "ARGHHHH!") + if(prob(2 * volume)) + to_chat(M, "OH GOD OH GOD PLEASE NO!!") + if(M.on_fire) + M.adjust_fire_stacks(5) + if(prob(50)) + to_chat(M, "IT BURNS!!!!") + M.visible_message("[M] is consumed in flames!") + M.dust() + return + ..() + +// ROBOT ALCOHOL PAST THIS POINT +// WOOO! + +/datum/reagent/consumable/ethanol/synthanol + name = "Synthanol" + id = "synthanol" + description = "A runny liquid with conductive capacities. Its effects on synthetics are similar to those of alcohol on organics." + reagent_state = LIQUID + color = "#1BB1FF" + process_flags = ORGANIC | SYNTHETIC + alcohol_perc = 0.5 + drink_icon = "synthanolglass" + drink_name = "Glass of Synthanol" + drink_desc = "The equivalent of alcohol for synthetic crewmembers. They'd find it awful if they had tastebuds too." + +/datum/reagent/consumable/ethanol/synthanol/on_mob_life(mob/living/M) + if(!M.isSynthetic()) + holder.remove_reagent(id, 3.6) //gets removed from organics very fast + if(prob(25)) + holder.remove_reagent(id, 15) + M.fakevomit() + ..() + +/datum/reagent/consumable/ethanol/synthanol/reaction_mob(mob/living/M, method=TOUCH, volume) + if(M.isSynthetic()) + return + if(method == INGEST) + to_chat(M, pick("That was awful!", "Yuck!")) + +/datum/reagent/consumable/ethanol/synthanol/robottears + name = "Robot Tears" + id = "robottears" + description = "An oily substance that an IPC could technically consider a 'drink'." + reagent_state = LIQUID + color = "#363636" + alcohol_perc = 0.25 + drink_icon = "robottearsglass" + drink_name = "Glass of Robot Tears" + drink_desc = "No robots were hurt in the making of this drink." + +/datum/reagent/consumable/ethanol/synthanol/trinary + name = "Trinary" + id = "trinary" + description = "A fruit drink meant only for synthetics, however that works." + reagent_state = LIQUID + color = "#adb21f" + alcohol_perc = 0.2 + drink_icon = "trinaryglass" + drink_name = "Glass of Trinary" + drink_desc = "Colorful drink made for synthetic crewmembers. It doesn't seem like it would taste well." + +/datum/reagent/consumable/ethanol/synthanol/servo + name = "Servo" + id = "servo" + description = "A drink containing some organic ingredients, but meant only for synthetics." + reagent_state = LIQUID + color = "#5b3210" + alcohol_perc = 0.25 + drink_icon = "servoglass" + drink_name = "Glass of Servo" + drink_desc = "Chocolate - based drink made for IPCs. Not sure if anyone's actually tried out the recipe." + +/datum/reagent/consumable/ethanol/synthanol/uplink + name = "Uplink" + id = "uplink" + description = "A potent mix of alcohol and synthanol. Will only work on synthetics." + reagent_state = LIQUID + color = "#e7ae04" + alcohol_perc = 0.15 + drink_icon = "uplinkglass" + drink_name = "Glass of Uplink" + drink_desc = "An exquisite mix of the finest liquoirs and synthanol. Meant only for synthetics." + +/datum/reagent/consumable/ethanol/synthanol/synthnsoda + name = "Synth 'n Soda" + id = "synthnsoda" + description = "The classic drink adjusted for a robot's tastes." + reagent_state = LIQUID + color = "#7204e7" + alcohol_perc = 0.25 + drink_icon = "synthnsodaglass" + drink_name = "Glass of Synth 'n Soda" + drink_desc = "Classic drink altered to fit the tastes of a robot. Bad idea to drink if you're made of carbon." + +/datum/reagent/consumable/ethanol/synthanol/synthignon + name = "Synthignon" + id = "synthignon" + description = "Someone mixed wine and alcohol for robots. Hope you're proud of yourself." + reagent_state = LIQUID + color = "#d004e7" + alcohol_perc = 0.25 + drink_icon = "synthignonglass" + drink_name = "Glass of Synthignon" + drink_desc = "Someone mixed good wine and robot booze. Romantic, but atrocious." \ No newline at end of file diff --git a/code/modules/reagents/newchem/Blob-Reagents.dm b/code/modules/reagents/chemistry/reagents/blob.dm similarity index 98% rename from code/modules/reagents/newchem/Blob-Reagents.dm rename to code/modules/reagents/chemistry/reagents/blob.dm index a7cfa32f403..895922c7542 100644 --- a/code/modules/reagents/newchem/Blob-Reagents.dm +++ b/code/modules/reagents/chemistry/reagents/blob.dm @@ -4,6 +4,7 @@ description = "" var/message = "The blob strikes you" //message sent to any mob hit by the blob var/message_living = null //extension to first mob sent to only living mobs i.e. silicons have no skin to be burnt + can_synth = 0 /datum/reagent/blob/reaction_mob(mob/living/M, method=TOUCH, volume, show_message, touch_protection) return round(volume * min(1.5 - touch_protection, 1), 0.1) //full touch protection means 50% volume, any prot below 0.5 means 100% volume. @@ -149,4 +150,4 @@ if(message_living && !issilicon(M)) totalmessage += message_living totalmessage += "!" - to_chat(M, "[totalmessage]") + to_chat(M, "[totalmessage]") \ No newline at end of file diff --git a/code/modules/reagents/chemistry/reagents/disease.dm b/code/modules/reagents/chemistry/reagents/disease.dm new file mode 100644 index 00000000000..f9fbf930e3e --- /dev/null +++ b/code/modules/reagents/chemistry/reagents/disease.dm @@ -0,0 +1,186 @@ +/datum/reagent/spider_eggs + name = "spider eggs" + id = "spidereggs" + description = "A fine dust containing spider eggs. Oh gosh." + reagent_state = SOLID + color = "#FFFFFF" + can_synth = 0 + +/datum/reagent/spider_eggs/on_mob_life(mob/living/M) + if(volume > 2.5) + if(iscarbon(M)) + if(!M.get_int_organ(/obj/item/organ/internal/body_egg)) + new/obj/item/organ/internal/body_egg/spider_eggs(M) //Yes, even Xenos can fall victim to the plague that is spider infestation. + ..() + + +/datum/reagent/nanomachines + name = "Nanomachines" + id = "nanomachines" + description = "Microscopic construction robots." + color = "#535E66" // rgb: 83, 94, 102 + can_synth = 0 + +/datum/reagent/nanomachines/on_mob_life(mob/living/carbon/M) + if(volume > 1.5) + M.ForceContractDisease(new /datum/disease/transformation/robot(0)) + ..() + + +/datum/reagent/xenomicrobes + name = "Xenomicrobes" + id = "xenomicrobes" + description = "Microbes with an entirely alien cellular structure." + color = "#535E66" // rgb: 83, 94, 102 + can_synth = 0 + +/datum/reagent/xenomicrobes/on_mob_life(mob/living/carbon/M) + if(volume > 1.5) + M.ContractDisease(new /datum/disease/transformation/xeno(0)) + ..() + +/datum/reagent/fungalspores + name = "Tubercle bacillus Cosmosis microbes" + id = "fungalspores" + description = "Active fungal spores." + color = "#92D17D" // rgb: 146, 209, 125 + can_synth = 0 + +/datum/reagent/fungalspores/on_mob_life(mob/living/carbon/M) + if(volume > 2.5) + M.ForceContractDisease(new /datum/disease/tuberculosis(0)) + ..() + +/datum/reagent/jagged_crystals + name = "Jagged Crystals" + id = "jagged_crystals" + description = "Rapid chemical decomposition has warped these crystals into twisted spikes." + reagent_state = SOLID + color = "#FA0000" // rgb: 250, 0, 0 + can_synth = 0 + +/datum/reagent/jagged_crystals/on_mob_life(mob/living/carbon/M) + M.ForceContractDisease(new /datum/disease/berserker(0)) + ..() + +/datum/reagent/salmonella + name = "Salmonella" + id = "salmonella" + description = "A nasty bacteria found in spoiled food." + reagent_state = LIQUID + color = "#1E4600" + can_synth = 0 + +/datum/reagent/salmonella/on_mob_life(mob/living/carbon/M) + M.ForceContractDisease(new /datum/disease/food_poisoning(0)) + ..() + +/datum/reagent/gibbis + name = "Gibbis" + id = "gibbis" + description = "Liquid gibbis." + reagent_state = LIQUID + color = "#FF0000" + can_synth = 0 + +/datum/reagent/gibbis/on_mob_life(mob/living/carbon/M) + if(volume > 2.5) + M.ForceContractDisease(new /datum/disease/gbs/curable(0)) + ..() + +/datum/reagent/prions + name = "Prions" + id = "prions" + description = "A disease-causing agent that is neither bacterial nor fungal nor viral and contains no genetic material." + reagent_state = LIQUID + color = "#FFFFFF" + can_synth = 0 + +/datum/reagent/prions/on_mob_life(mob/living/carbon/M) + if(volume > 4.5) + M.ForceContractDisease(new /datum/disease/kuru(0)) + ..() + +/datum/reagent/grave_dust + name = "Grave Dust" + id = "grave_dust" + description = "Moldy old dust taken from a grave site." + reagent_state = LIQUID + color = "#465046" + can_synth = 0 + +/datum/reagent/grave_dust/on_mob_life(mob/living/carbon/M) + if(volume > 4.5) + M.ForceContractDisease(new /datum/disease/vampire(0)) + ..() + +/datum/reagent/heartworms + name = "Space heartworms" + id = "heartworms" + description = "Aww, gross! These things can't be good for your heart. They're gunna eat it!" + reagent_state = SOLID + color = "#925D6C" + can_synth = 0 + +/datum/reagent/heartworms/on_mob_life(mob/living/carbon/M) + if(volume > 4.5) + if(ishuman(M)) + var/mob/living/carbon/human/H = M + var/obj/item/organ/internal/heart/ate_heart = H.get_int_organ(/obj/item/organ/internal/heart) + if(ate_heart) + ate_heart.remove(H) + qdel(ate_heart) + ..() + +/datum/reagent/concentrated_initro + name = "Concentrated Initropidril" + id = "concentrated_initro" + description = "A guaranteed heart-stopper!" + reagent_state = LIQUID + color = "#AB1CCF" + can_synth = 0 + +/datum/reagent/concentrated_initro/on_mob_life(mob/living/M) + if(volume >=5) + if(ishuman(M)) + var/mob/living/carbon/human/H = M + if(!H.heart_attack) + H.heart_attack = 1 // rip in pepperoni + +//virus foods + +/datum/reagent/consumable/virus_food + name = "Virus Food" + id = "virusfood" + description = "A mixture of water, milk, and oxygen. Virus cells can use this mixture to reproduce." + reagent_state = LIQUID + nutriment_factor = 2 * REAGENTS_METABOLISM + color = "#899613" // rgb: 137, 150, 19 + +/datum/reagent/mutagen/mutagenvirusfood + name = "mutagenic agar" + id = "mutagenvirusfood" + description = "mutates blood" + color = "#A3C00F" // rgb: 163,192,15 + +/datum/reagent/mutagen/mutagenvirusfood/sugar + name = "sucrose agar" + id = "sugarvirusfood" + color = "#41B0C0" // rgb: 65,176,192 + +/datum/reagent/medicine/diphenhydramine/diphenhydraminevirusfood + name = "virus rations" + id = "diphenhydraminevirusfood" + description = "mutates blood" + color = "#D18AA5" // rgb: 209,138,165 + +/datum/reagent/plasma_dust/plasmavirusfood + name = "virus plasma" + id = "plasmavirusfood" + description = "mutates blood" + color = "#A69DA9" // rgb: 166,157,169 + +/datum/reagent/plasma_dust/plasmavirusfood/weak + name = "weakened virus plasma" + id = "weakplasmavirusfood" + color = "#CEC3C6" // rgb: 206,195,198 \ No newline at end of file diff --git a/code/modules/reagents/oldchem/reagents/drink/reagents_drink_base.dm b/code/modules/reagents/chemistry/reagents/drink_base.dm similarity index 83% rename from code/modules/reagents/oldchem/reagents/drink/reagents_drink_base.dm rename to code/modules/reagents/chemistry/reagents/drink_base.dm index 6e30efb9423..25484983a4f 100644 --- a/code/modules/reagents/oldchem/reagents/drink/reagents_drink_base.dm +++ b/code/modules/reagents/chemistry/reagents/drink_base.dm @@ -1,9 +1,8 @@ -/datum/reagent/drink +/datum/reagent/consumable/drink name = "Drink" id = "drink" description = "Uh, some kind of drink." reagent_state = LIQUID - nutriment_factor = 1 * REAGENTS_METABOLISM color = "#E78108" // rgb: 231, 129, 8 var/adj_dizzy = 0 var/adj_drowsy = 0 @@ -11,8 +10,7 @@ var/adj_temp_hot = 0 var/adj_temp_cool = 0 -/datum/reagent/drink/on_mob_life(mob/living/M) - M.nutrition += nutriment_factor +/datum/reagent/consumable/drink/on_mob_life(mob/living/M) if(adj_dizzy) M.AdjustDizzy(adj_dizzy) if(adj_drowsy) @@ -25,4 +23,4 @@ if(adj_temp_cool) if(M.bodytemperature > 310)//310 is the normal bodytemp. 310.055 M.bodytemperature = max(310, M.bodytemperature - (adj_temp_cool * TEMPERATURE_DAMAGE_COEFFICIENT)) - ..() + ..() \ No newline at end of file diff --git a/code/modules/reagents/chemistry/reagents/drink_cold.dm b/code/modules/reagents/chemistry/reagents/drink_cold.dm new file mode 100644 index 00000000000..ffd43a81840 --- /dev/null +++ b/code/modules/reagents/chemistry/reagents/drink_cold.dm @@ -0,0 +1,163 @@ +/datum/reagent/consumable/drink/cold + name = "Cold drink" + adj_temp_cool = 5 + +/datum/reagent/consumable/drink/cold/tonic + name = "Tonic Water" + id = "tonic" + description = "It tastes strange but at least the quinine keeps the Space Malaria at bay." + color = "#664300" // rgb: 102, 67, 0 + adj_dizzy = -5 + adj_drowsy = -3 + adj_sleepy = -2 + drink_icon = "glass_clear" + drink_name = "Glass of Tonic Water" + drink_desc = "Quinine tastes funny, but at least it'll keep that Space Malaria away." + +/datum/reagent/consumable/drink/cold/sodawater + name = "Soda Water" + id = "sodawater" + description = "A can of club soda. Why not make a scotch and soda?" + color = "#619494" // rgb: 97, 148, 148 + adj_dizzy = -5 + adj_drowsy = -3 + drink_icon = "glass_clear" + drink_name = "Glass of Soda Water" + drink_desc = "Soda water. Why not make a scotch and soda?" + +/datum/reagent/consumable/drink/cold/ice + name = "Ice" + id = "ice" + description = "Frozen water, your dentist wouldn't like you chewing this." + reagent_state = SOLID + color = "#619494" // rgb: 97, 148, 148 + adj_temp_cool = 0 + drink_icon = "iceglass" + drink_name = "Glass of ice" + drink_desc = "Generally, you're supposed to put something else in there too..." + +/datum/reagent/consumable/drink/cold/ice/on_mob_life(mob/living/M) + M.bodytemperature = max(M.bodytemperature - 5 * TEMPERATURE_DAMAGE_COEFFICIENT, 0) + ..() + +/datum/reagent/consumable/drink/cold/space_cola + name = "Cola" + id = "cola" + description = "A refreshing beverage." + reagent_state = LIQUID + color = "#100800" // rgb: 16, 8, 0 + adj_drowsy = -5 + drink_icon = "glass_brown" + drink_name = "Glass of Space Cola" + drink_desc = "A glass of refreshing Space Cola" + +/datum/reagent/consumable/drink/cold/nuka_cola + name = "Nuka Cola" + id = "nuka_cola" + description = "Cola, cola never changes." + color = "#100800" // rgb: 16, 8, 0 + adj_sleepy = -2 + drink_icon = "nuka_colaglass" + drink_name = "Nuka Cola" + drink_desc = "Don't cry, Don't raise your eye, It's only nuclear wasteland" + +/datum/reagent/consumable/drink/cold/nuka_cola/on_mob_life(mob/living/M) + M.Jitter(20) + M.Druggy(30) + M.AdjustDizzy(5) + M.SetDrowsy(0) + M.status_flags |= GOTTAGOFAST + ..() + +/datum/reagent/consumable/drink/cold/nuka_cola/on_mob_delete(mob/living/M) + M.status_flags &= ~GOTTAGOFAST + ..() + +/datum/reagent/consumable/drink/cold/spacemountainwind + name = "Space Mountain Wind" + id = "spacemountainwind" + description = "Blows right through you like a space wind." + color = "#102000" // rgb: 16, 32, 0 + adj_drowsy = -7 + adj_sleepy = -1 + drink_icon = "Space_mountain_wind_glass" + drink_name = "Glass of Space Mountain Wind" + drink_desc = "Space Mountain Wind. As you know, there are no mountains in space, only wind." + +/datum/reagent/consumable/drink/cold/dr_gibb + name = "Dr. Gibb" + id = "dr_gibb" + description = "A delicious blend of 42 different flavours" + color = "#102000" // rgb: 16, 32, 0 + adj_drowsy = -6 + drink_icon = "dr_gibb_glass" + drink_name = "Glass of Dr. Gibb" + drink_desc = "Dr. Gibb. Not as dangerous as the name might imply." + +/datum/reagent/consumable/drink/cold/space_up + name = "Space-Up" + id = "space_up" + description = "Tastes like a hull breach in your mouth." + color = "#202800" // rgb: 32, 40, 0 + adj_temp_cool = 8 + drink_icon = "space-up_glass" + drink_name = "Glass of Space-up" + drink_desc = "Space-up. It helps keep your cool." + +/datum/reagent/consumable/drink/cold/lemon_lime + name = "Lemon Lime" + description = "A tangy substance made of 0.5% natural citrus!" + id = "lemon_lime" + color = "#878F00" // rgb: 135, 40, 0 + adj_temp_cool = 8 + +/datum/reagent/consumable/drink/cold/lemonade + name = "Lemonade" + description = "Oh the nostalgia..." + id = "lemonade" + color = "#FFFF00" // rgb: 255, 255, 0 + drink_icon = "lemonade" + drink_name = "Lemonade" + drink_desc = "Oh the nostalgia..." + +/datum/reagent/consumable/drink/cold/kiraspecial + name = "Kira Special" + description = "Long live the guy who everyone had mistaken for a girl. Baka!" + id = "kiraspecial" + color = "#CCCC99" // rgb: 204, 204, 153 + drink_icon = "kiraspecial" + drink_name = "Kira Special" + drink_desc = "Long live the guy who everyone had mistaken for a girl. Baka!" + +/datum/reagent/consumable/drink/cold/brownstar + name = "Brown Star" + description = "It's not what it sounds like..." + id = "brownstar" + color = "#9F3400" // rgb: 159, 052, 000 + adj_temp_cool = 2 + drink_icon = "brownstar" + drink_name = "Brown Star" + drink_desc = "Its not what it sounds like..." + +/datum/reagent/consumable/drink/cold/milkshake + name = "Milkshake" + description = "Glorious brainfreezing mixture." + id = "milkshake" + color = "#AEE5E4" // rgb" 174, 229, 228 + adj_temp_cool = 9 + drink_icon = "milkshake" + drink_name = "Milkshake" + drink_desc = "Glorious brainfreezing mixture." + +/datum/reagent/consumable/drink/cold/rewriter + name = "Rewriter" + description = "The secert of the sanctuary of the Libarian..." + id = "rewriter" + color = "#485000" // rgb:72, 080, 0 + drink_icon = "rewriter" + drink_name = "Rewriter" + drink_desc = "The secert of the sanctuary of the Libarian..." + +/datum/reagent/consumable/drink/cold/rewriter/on_mob_life(mob/living/M) + M.Jitter(5) + ..() \ No newline at end of file diff --git a/code/modules/reagents/oldchem/reagents/drink/reagents_drink.dm b/code/modules/reagents/chemistry/reagents/drinks.dm similarity index 50% rename from code/modules/reagents/oldchem/reagents/drink/reagents_drink.dm rename to code/modules/reagents/chemistry/reagents/drinks.dm index 869e9295bf5..489eac3eb81 100644 --- a/code/modules/reagents/oldchem/reagents/drink/reagents_drink.dm +++ b/code/modules/reagents/chemistry/reagents/drinks.dm @@ -1,43 +1,55 @@ -/datum/reagent/drink/orangejuice +/datum/reagent/consumable/drink/orangejuice name = "Orange juice" id = "orangejuice" description = "Both delicious AND rich in Vitamin C, what more do you need?" color = "#E78108" // rgb: 231, 129, 8 + drink_icon = "glass_orange" + drink_name = "Glass of Orange juice" + drink_desc = "Vitamins! Yay!" -/datum/reagent/drink/orangejuicde/on_mob_life(mob/living/M) +/datum/reagent/consumable/drink/orangejuicde/on_mob_life(mob/living/M) if(M.getOxyLoss() && prob(30)) - M.adjustOxyLoss(-1*REM) + M.adjustOxyLoss(-1*REAGENTS_EFFECT_MULTIPLIER) ..() -/datum/reagent/drink/tomatojuice +/datum/reagent/consumable/drink/tomatojuice name = "Tomato Juice" id = "tomatojuice" description = "Tomatoes made into juice. What a waste of big, juicy tomatoes, huh?" color = "#731008" // rgb: 115, 16, 8 + drink_icon = "glass_red" + drink_name = "Glass of Tomato juice" + drink_desc = "Are you sure this is tomato juice?" -/datum/reagent/drink/tomatojuice/on_mob_life(mob/living/M) +/datum/reagent/consumable/drink/tomatojuice/on_mob_life(mob/living/M) if(M.getFireLoss() && prob(20)) M.adjustFireLoss(-1) ..() -/datum/reagent/drink/limejuice +/datum/reagent/consumable/drink/limejuice name = "Lime Juice" id = "limejuice" description = "The sweet-sour juice of limes." color = "#365E30" // rgb: 54, 94, 48 + drink_icon = "glass_green" + drink_name = "Glass of Lime juice" + drink_desc = "A glass of sweet-sour lime juice." -/datum/reagent/drink/limejuice/on_mob_life(mob/living/M) +/datum/reagent/consumable/drink/limejuice/on_mob_life(mob/living/M) if(M.getToxLoss() && prob(20)) M.adjustToxLoss(-1) ..() -/datum/reagent/drink/carrotjuice +/datum/reagent/consumable/drink/carrotjuice name = "Carrot juice" id = "carrotjuice" description = "It is just like a carrot but without crunching." color = "#973800" // rgb: 151, 56, 0 + drink_icon = "carrotjuice" + drink_name = "Glass of carrot juice" + drink_desc = "It is just like a carrot but without crunching." -/datum/reagent/drink/carrotjuicde/on_mob_life(mob/living/M) +/datum/reagent/consumable/drink/carrotjuicde/on_mob_life(mob/living/M) M.AdjustEyeBlurry(-1) M.AdjustEyeBlind(-1) switch(current_cycle) @@ -48,124 +60,167 @@ M.disabilities &= ~NEARSIGHTED ..() -/datum/reagent/drink/doctor_delight +/datum/reagent/consumable/drink/doctor_delight name = "The Doctor's Delight" id = "doctorsdelight" description = "A gulp a day keeps the MediBot away. That's probably for the best." reagent_state = LIQUID color = "#FF8CFF" // rgb: 255, 140, 255 + drink_icon = "doctorsdelightglass" + drink_name = "Doctor's Delight" + drink_desc = "A healthy mixture of juices, guaranteed to keep you healthy until the next toolboxing takes place." -/datum/reagent/drink/doctors_delight/on_mob_life(mob/living/M) +/datum/reagent/consumable/drink/doctors_delight/on_mob_life(mob/living/M) if(M.getToxLoss() && prob(20)) M.adjustToxLoss(-1) ..() -/datum/reagent/drink/berryjuice +/datum/reagent/consumable/drink/triple_citrus + name = "Triple Citrus" + id = "triple_citrus" + description = "A refreshing mixed drink of orange, lemon and lime juice." + reagent_state = LIQUID + color = "#23A046" + drink_icon = "triplecitrus" + drink_name = "Glass of Triplecitrus Juice" + drink_desc = "As colorful and healthy as it is delicious." + +/datum/reagent/consumable/drink/triple_citrus/reaction_mob(mob/living/M, method=TOUCH, volume) + if(method == INGEST) + M.adjustToxLoss(-rand(1,2)) + +/datum/reagent/consumable/drink/berryjuice name = "Berry Juice" id = "berryjuice" description = "A delicious blend of several different kinds of berries." color = "#863333" // rgb: 134, 51, 51 + drink_icon = "berryjuice" + drink_name = "Glass of berry juice" + drink_desc = "Berry juice. Or maybe its jam. Who cares?" -/datum/reagent/drink/poisonberryjuice +/datum/reagent/consumable/drink/poisonberryjuice name = "Poison Berry Juice" id = "poisonberryjuice" description = "A tasty juice blended from various kinds of very deadly and toxic berries." color = "#863353" // rgb: 134, 51, 83 + drink_icon = "poisonberryjuice" + drink_name = "Glass of poison berry juice" + drink_desc = "A glass of deadly juice." -/datum/reagent/drink/poisonberryjuice/on_mob_life(mob/living/M) +/datum/reagent/consumable/drink/poisonberryjuice/on_mob_life(mob/living/M) M.adjustToxLoss(1) ..() -/datum/reagent/drink/watermelonjuice +/datum/reagent/consumable/drink/watermelonjuice name = "Watermelon Juice" id = "watermelonjuice" description = "Delicious juice made from watermelon." color = "#863333" // rgb: 134, 51, 51 -/datum/reagent/drink/lemonjuice +/datum/reagent/consumable/drink/lemonjuice name = "Lemon Juice" id = "lemonjuice" description = "This juice is VERY sour." color = "#863333" // rgb: 175, 175, 0 + drink_icon = "lemonglass" + drink_name = "Glass of lemonjuice" + drink_desc = "Sour..." -/datum/reagent/drink/grapejuice +/datum/reagent/consumable/drink/grapejuice name = "Grape Juice" id = "grapejuice" description = "This juice is known to stain shirts." color = "#993399" // rgb: 153, 51, 153 -/datum/reagent/drink/banana +/datum/reagent/consumable/drink/banana name = "Banana Juice" id = "banana" description = "The raw essence of a banana." color = "#863333" // rgb: 175, 175, 0 + drink_icon = "banana" + drink_name = "Glass of banana juice" + drink_desc = "The raw essence of a banana. HONK" -/datum/reagent/drink/banana/on_mob_life(mob/living/M) - M.nutrition += nutriment_factor +/datum/reagent/consumable/drink/banana/on_mob_life(mob/living/M) if((ishuman(M) && M.job in list("Clown") ) || issmall(M)) M.adjustBruteLoss(-1) M.adjustFireLoss(-1) ..() -/datum/reagent/drink/nothing +/datum/reagent/consumable/drink/nothing name = "Nothing" id = "nothing" description = "Absolutely nothing." + drink_icon = "nothing" + drink_name = "Nothing" + drink_desc = "Absolutely nothing." -/datum/reagent/drink/nothing/on_mob_life(mob/living/M) - M.nutrition += nutriment_factor +/datum/reagent/consumable/drink/nothing/on_mob_life(mob/living/M) if(ishuman(M) && M.job in list("Mime")) M.adjustBruteLoss(-1) M.adjustFireLoss(-1) ..() -/datum/reagent/drink/potato_juice +/datum/reagent/consumable/drink/potato_juice name = "Potato Juice" id = "potato" description = "Juice of the potato. Bleh." - nutriment_factor = 2 * FOOD_METABOLISM + nutriment_factor = 2 * REAGENTS_METABOLISM color = "#302000" // rgb: 48, 32, 0 + drink_icon = "glass_brown" + drink_name = "Glass of potato juice" + drink_desc = "Who in the hell requests this? Gross!" -/datum/reagent/drink/milk +/datum/reagent/consumable/drink/milk name = "Milk" id = "milk" description = "An opaque white liquid produced by the mammary glands of mammals." color = "#DFDFDF" // rgb: 223, 223, 223 + drink_icon = "glass_white" + drink_name = "Glass of milk" + drink_desc = "White and nutritious goodness!" -/datum/reagent/drink/milk/on_mob_life(mob/living/M) +/datum/reagent/consumable/drink/milk/on_mob_life(mob/living/M) if(M.getBruteLoss() && prob(20)) M.adjustBruteLoss(-1) if(holder.has_reagent("capsaicin")) holder.remove_reagent("capsaicin", 2) ..() -/datum/reagent/drink/milk/soymilk +/datum/reagent/consumable/drink/milk/soymilk name = "Soy Milk" id = "soymilk" description = "An opaque white liquid made from soybeans." color = "#DFDFC7" // rgb: 223, 223, 199 + drink_name = "Glass of soy milk" + drink_desc = "White and nutritious soy goodness!" -/datum/reagent/drink/milk/cream +/datum/reagent/consumable/drink/milk/cream name = "Cream" id = "cream" description = "The fatty, still liquid part of milk. Why don't you mix this with sum scotch, eh?" color = "#DFD7AF" // rgb: 223, 215, 175 + drink_name = "Glass of cream" + drink_desc = "Ewwww..." -/datum/reagent/drink/milk/chocolate_milk +/datum/reagent/consumable/drink/milk/chocolate_milk name = "Chocolate milk" id ="chocolate_milk" description = "Chocolate-flavored milk, tastes like being a kid again." color = "#85432C" -/datum/reagent/drink/hot_coco +/datum/reagent/consumable/drink/hot_coco name = "Hot Chocolate" id = "hot_coco" description = "Made with love! And coco beans." - nutriment_factor = 2 * FOOD_METABOLISM + nutriment_factor = 2 * REAGENTS_METABOLISM color = "#403010" // rgb: 64, 48, 16 adj_temp_hot = 5 + drink_icon = "hot_coco" + drink_name = "Glass of hot coco" + drink_desc = "Delicious and cozy" -/datum/reagent/drink/coffee +/datum/reagent/consumable/drink/coffee name = "Coffee" id = "coffee" description = "Coffee is a brewed drink prepared from roasted seeds, commonly called coffee beans, of the coffee plant." @@ -177,8 +232,11 @@ overdose_threshold = 45 addiction_chance = 1 // It's true. heart_rate_increase = 1 + drink_icon = "glass_brown" + drink_name = "Glass of coffee" + drink_desc = "Don't drop it, or you'll send scalding liquid and glass shards everywhere." -/datum/reagent/drink/coffee/on_mob_life(mob/living/M) +/datum/reagent/consumable/drink/coffee/on_mob_life(mob/living/M) if(holder.has_reagent("frostoil")) holder.remove_reagent("frostoil", 5) if(prob(50)) @@ -187,53 +245,64 @@ M.AdjustWeakened(-1) ..() -/datum/reagent/drink/coffee/overdose_process(mob/living/M, severity) +/datum/reagent/consumable/drink/coffee/overdose_process(mob/living/M, severity) if(volume > 45) M.Jitter(5) -/datum/reagent/drink/coffee/icecoffee +/datum/reagent/consumable/drink/coffee/icecoffee name = "Iced Coffee" id = "icecoffee" description = "Coffee and ice, refreshing and cool." color = "#102838" // rgb: 16, 40, 56 adj_temp_hot = 0 adj_temp_cool = 5 + drink_icon = "icedcoffeeglass" + drink_name = "Iced Coffee" + drink_desc = "A drink to perk you up and refresh you!" -/datum/reagent/drink/coffee/soy_latte +/datum/reagent/consumable/drink/coffee/soy_latte name = "Soy Latte" id = "soy_latte" description = "A nice and tasty beverage while you are reading your hippie books." color = "#664300" // rgb: 102, 67, 0 adj_sleepy = 0 adj_temp_hot = 5 + drink_icon = "soy_latte" + drink_name = "Soy Latte" + drink_desc = "A nice and refrshing beverage while you are reading." -/datum/reagent/drink/coffee/soy_latte/on_mob_life(mob/living/M) +/datum/reagent/consumable/drink/coffee/soy_latte/on_mob_life(mob/living/M) ..() M.SetSleeping(0) if(M.getBruteLoss() && prob(20)) M.adjustBruteLoss(-1) -/datum/reagent/drink/coffee/cafe_latte +/datum/reagent/consumable/drink/coffee/cafe_latte name = "Cafe Latte" id = "cafe_latte" description = "A nice, strong and tasty beverage while you are reading." color = "#664300" // rgb: 102, 67, 0 adj_sleepy = 0 adj_temp_hot = 5 + drink_icon = "cafe_latte" + drink_name = "Cafe Latte" + drink_desc = "A nice, strong and refreshing beverage while you are reading." -/datum/reagent/drink/coffee/cafe_latte/on_mob_life(mob/living/M) +/datum/reagent/consumable/drink/coffee/cafe_latte/on_mob_life(mob/living/M) ..() M.SetSleeping(0) if(M.getBruteLoss() && prob(20)) M.adjustBruteLoss(-1) -/datum/reagent/drink/coffee/cafe_latte/cafe_mocha +/datum/reagent/consumable/drink/coffee/cafe_latte/cafe_mocha name = "Cafe Mocha" id = "cafe_mocha" description = "The perfect blend of coffe, milk, and chocolate." color = "#673629" + drink_name = "Cafe Mocha" + drink_desc = "The perfect blend of coffe, milk, and chocolate." -/datum/reagent/drink/tea +/datum/reagent/consumable/drink/tea name = "Tea" id = "tea" description = "Tasty black tea: It has antioxidants. It's good for you!" @@ -242,44 +311,52 @@ adj_drowsy = -1 adj_sleepy = -3 adj_temp_hot = 20 + drink_icon = "glass_brown" + drink_name = "Glass of Tea" + drink_desc = "A glass of hot tea. Perhaps a cup with a handle would have been smarter?" -/datum/reagent/drink/tea/on_mob_life(mob/living/M) +/datum/reagent/consumable/drink/tea/on_mob_life(mob/living/M) if(M.getToxLoss() && prob(20)) M.adjustToxLoss(-1) ..() -/datum/reagent/drink/tea/icetea +/datum/reagent/consumable/drink/tea/icetea name = "Iced Tea" id = "icetea" description = "No relation to a certain rap artist/ actor." color = "#104038" // rgb: 16, 64, 56 adj_temp_hot = 0 adj_temp_cool = 5 + drink_icon = "icetea" + drink_name = "Iced Tea" + drink_desc = "No relation to a certain rap artist/ actor." -/datum/reagent/drink/bananahonk +/datum/reagent/consumable/drink/bananahonk name = "Banana Mama" id = "bananahonk" description = "A drink from Clown Heaven." - nutriment_factor = 1 * FOOD_METABOLISM color = "#664300" // rgb: 102, 67, 0 + drink_icon = "bananahonkglass" + drink_name = "Banana Honk" + drink_desc = "A drink from Banana Heaven." -/datum/reagent/drink/bananahonk/on_mob_life(mob/living/M) - M.nutrition += nutriment_factor +/datum/reagent/consumable/drink/bananahonk/on_mob_life(mob/living/M) if((ishuman(M) && M.job in list("Clown") ) || issmall(M)) M.adjustBruteLoss(-1) M.adjustFireLoss(-1) ..() -/datum/reagent/drink/silencer +/datum/reagent/consumable/drink/silencer name = "Silencer" id = "silencer" description = "A drink from Mime Heaven." - nutriment_factor = 1 * FOOD_METABOLISM color = "#664300" // rgb: 102, 67, 0 + drink_icon = "silencerglass" + drink_name = "Silencer" + drink_desc = "A drink from mime Heaven." -/datum/reagent/drink/silencer/on_mob_life(mob/living/M) - M.nutrition += nutriment_factor +/datum/reagent/consumable/drink/silencer/on_mob_life(mob/living/M) if(ishuman(M) && M.job in list("Mime")) M.adjustBruteLoss(-1) M.adjustFireLoss(-1) - ..() + ..() \ No newline at end of file diff --git a/code/modules/reagents/newchem/drugs.dm b/code/modules/reagents/chemistry/reagents/drugs.dm similarity index 80% rename from code/modules/reagents/newchem/drugs.dm rename to code/modules/reagents/chemistry/reagents/drugs.dm index bc5b10be569..3719c6f49b8 100644 --- a/code/modules/reagents/newchem/drugs.dm +++ b/code/modules/reagents/chemistry/reagents/drugs.dm @@ -1,8 +1,88 @@ -#define SOLID 1 -#define LIQUID 2 -#define GAS 3 +/datum/reagent/serotrotium + name = "Serotrotium" + id = "serotrotium" + description = "A chemical compound that promotes concentrated production of the serotonin neurotransmitter in humans." + reagent_state = LIQUID + color = "#202040" // rgb: 20, 20, 40 + metabolization_rate = 0.25 * REAGENTS_METABOLISM -#define REM REAGENTS_EFFECT_MULTIPLIER +/datum/reagent/serotrotium/on_mob_life(mob/living/M) + if(ishuman(M)) + if(prob(7)) + M.emote(pick("twitch","drool","moan","gasp")) + ..() + + +/datum/reagent/lithium + name = "Lithium" + id = "lithium" + description = "A chemical element." + reagent_state = SOLID + color = "#808080" // rgb: 128, 128, 128 + +/datum/reagent/lithium/on_mob_life(mob/living/M) + if(isturf(M.loc) && !istype(M.loc, /turf/space)) + if(M.canmove && !M.restrained()) + step(M, pick(cardinal)) + if(prob(5)) M.emote(pick("twitch","drool","moan")) + ..() + +/datum/reagent/lsd + name = "Lysergic acid diethylamide" + id = "lsd" + description = "A highly potent hallucinogenic substance. Far out, maaaan." + reagent_state = LIQUID + color = "#0000D8" + +/datum/reagent/lsd/on_mob_life(mob/living/M) + M.Druggy(15) + M.AdjustHallucinate(10) + ..() + +/datum/reagent/space_drugs + name = "Space drugs" + id = "space_drugs" + description = "An illegal chemical compound used as drug." + reagent_state = LIQUID + color = "#9087A2" + metabolization_rate = 0.2 + addiction_chance = 65 + heart_rate_decrease = 1 + +/datum/reagent/space_drugs/on_mob_life(mob/living/M) + M.Druggy(15) + if(isturf(M.loc) && !istype(M.loc, /turf/space)) + if(M.canmove && !M.restrained()) + step(M, pick(cardinal)) + if(prob(7)) M.emote(pick("twitch","drool","moan","giggle")) + ..() + +/datum/reagent/psilocybin + name = "Psilocybin" + id = "psilocybin" + description = "A strong psycotropic derived from certain species of mushroom." + color = "#E700E7" // rgb: 231, 0, 231 + +/datum/reagent/psilocybin/on_mob_life(mob/living/M) + M.Druggy(30) + switch(current_cycle) + if(1 to 5) + M.Stuttering(1) + M.Dizzy(5) + if(prob(10)) M.emote(pick("twitch","giggle")) + if(5 to 10) + M.Stuttering(1) + M.Jitter(10) + M.Dizzy(10) + M.Druggy(35) + if(prob(20)) M.emote(pick("twitch","giggle")) + if(10 to INFINITY) + M.Stuttering(1) + M.Jitter(20) + M.Dizzy(20) + M.Druggy(40) + if(prob(30)) M.emote(pick("twitch","giggle")) + ..() /datum/reagent/nicotine name = "Nicotine" @@ -22,7 +102,7 @@ M.AdjustParalysis(-1) M.AdjustStunned(-1) M.AdjustWeakened(-1) - M.adjustStaminaLoss(-1*REM) + M.adjustStaminaLoss(-1*REAGENTS_EFFECT_MULTIPLIER) ..() /datum/reagent/nicotine/overdose_process(mob/living/M, severity) @@ -133,22 +213,6 @@ M.adjustBruteLoss(5) M.emote("twitch_s") -/datum/chemical_reaction/crank - name = "Crank" - id = "crank" - result = "crank" - required_reagents = list("diphenhydramine" = 1, "ammonia" = 1, "lithium" = 1, "sacid" = 1, "fuel" = 1) - result_amount = 5 - mix_message = "The mixture violently reacts, leaving behind a few crystalline shards." - mix_sound = 'sound/goonstation/effects/crystalshatter.ogg' - min_temp = 390 - -/datum/chemical_reaction/crank/on_reaction(datum/reagents/holder, created_volume) - var/turf/T = get_turf(holder.my_atom) - for(var/turf/turf in range(1,T)) - new /obj/effect/hotspot(turf) - explosion(T,0,0,2) - /datum/reagent/krokodil name = "Krokodil" id = "krokodil" @@ -216,16 +280,6 @@ M.emote("shiver") M.bodytemperature -= 70 -/datum/chemical_reaction/krokodil - name = "Krokodil" - id = "krokodil" - result = "krokodil" - required_reagents = list("diphenhydramine" = 1, "morphine" = 1, "cleaner" = 1, "potassium" = 1, "phosphorus" = 1, "fuel" = 1) - result_amount = 6 - mix_message = "The mixture dries into a pale blue powder." - min_temp = 380 - mix_sound = 'sound/goonstation/misc/fuse.ogg' - /datum/reagent/methamphetamine name = "Methamphetamine" id = "methamphetamine" @@ -253,7 +307,7 @@ M.adjustBrainLoss(1.0) ..() -/datum/reagent/methamphetamine/reagent_deleted(mob/living/M) +/datum/reagent/methamphetamine/on_mob_delete(mob/living/M) M.status_flags &= ~GOTTAGOREALLYFAST ..() @@ -282,39 +336,6 @@ else if(effect <= 7) M.emote("laugh") -/datum/chemical_reaction/methamphetamine - name = "methamphetamine" - id = "methamphetamine" - result = "methamphetamine" - required_reagents = list("ephedrine" = 1, "iodine" = 1, "phosphorus" = 1, "hydrogen" = 1) - result_amount = 4 - min_temp = 374 - -/datum/chemical_reaction/methamphetamine/on_reaction(datum/reagents/holder) - var/turf/T = get_turf(holder.my_atom) - T.visible_message("The solution generates a strong vapor!") - for(var/mob/living/carbon/C in range(T, 1)) - if(C.can_breathe_gas()) - C.emote("gasp") - C.AdjustLoseBreath(1) - C.reagents.add_reagent("toxin", 10) - C.reagents.add_reagent("neurotoxin2", 20) - -/datum/chemical_reaction/saltpetre - name = "saltpetre" - id = "saltpetre" - result = "saltpetre" - required_reagents = list("potassium" = 1, "nitrogen" = 1, "oxygen" = 3) - result_amount = 3 - mix_sound = 'sound/goonstation/misc/fuse.ogg' - -/datum/reagent/saltpetre - name = "Saltpetre" - id = "saltpetre" - description = "Volatile." - reagent_state = LIQUID - color = "#60A584" // rgb: 96, 165, 132 - /datum/reagent/bath_salts name = "Bath Salts" id = "bath_salts" @@ -411,32 +432,6 @@ M.reagents.add_reagent("jagged_crystals", 5) M.emote("twitch") -/datum/chemical_reaction/bath_salts - name = "bath_salts" - id = "bath_salts" - result = "bath_salts" - required_reagents = list("????" = 1, "saltpetre" = 1, "msg" = 1, "cleaner" = 1, "enzyme" = 1, "mugwort" = 1, "mercury" = 1) - result_amount = 6 - min_temp = 374 - mix_message = "Tiny cubic crystals precipitate out of the mixture. Huh." - mix_sound = 'sound/goonstation/misc/fuse.ogg' - -/datum/chemical_reaction/jenkem - name = "Jenkem" - id = "jenkem" - result = "jenkem" - required_reagents = list("toiletwater" = 1, "ammonia" = 1, "water" = 1) - result_amount = 3 - mix_message = "The mixture ferments into a filthy morass." - mix_sound = 'sound/effects/blobattack.ogg' - -/datum/chemical_reaction/jenkem/on_reaction(datum/reagents/holder) - var/turf/T = get_turf(holder.my_atom) - T.visible_message("The solution generates a strong vapor!") - for(var/mob/living/carbon/C in range(T, 1)) - if(C.can_breathe_gas()) - C.reagents.add_reagent("jenkem", 25) - /datum/reagent/jenkem name = "Jenkem" id = "jenkem" @@ -452,13 +447,6 @@ M.adjustToxLoss(1) ..() -/datum/chemical_reaction/aranesp - name = "Aranesp" - id = "aranesp" - result = "aranesp" - required_reagents = list("epinephrine" = 1, "atropine" = 1, "insulin" = 1) - result_amount = 3 - /datum/reagent/aranesp name = "Aranesp" id = "aranesp" @@ -489,7 +477,6 @@ reagent_state = LIQUID color = "#0FBE0F" - /datum/reagent/thc/on_mob_life(mob/living/M) M.stuttering += rand(0,2) if(prob(5)) @@ -514,19 +501,6 @@ process_flags = ORGANIC | SYNTHETIC //Flipping for everyone! addiction_chance = 10 -/datum/chemical_reaction/fliptonium - name = "fliptonium" - id = "fliptonium" - result = "fliptonium" - required_reagents = list("ephedrine" = 1, "liquid_dark_matter" = 1, "chocolate" = 1, "ginsonic" = 1) - result_amount = 4 - mix_message = "The mixture swirls around excitedly!" - -/datum/reagent/fliptonium/reaction_mob(mob/living/M, method=TOUCH, volume) - if(method == INGEST || method == TOUCH) - M.SpinAnimation(speed = 12, loops = -1) - ..() - /datum/reagent/fliptonium/on_mob_life(mob/living/M) if(current_cycle == 5) M.SpinAnimation(speed = 11, loops = -1) @@ -553,7 +527,12 @@ M.SetSleeping(0) ..() -/datum/reagent/fliptonium/reagent_deleted(mob/living/M) +/datum/reagent/fliptonium/reaction_mob(mob/living/M, method=TOUCH, volume) + if(method == INGEST || method == TOUCH) + M.SpinAnimation(speed = 12, loops = -1) + ..() + +/datum/reagent/fliptonium/on_mob_delete(mob/living/M) M.SpinAnimation(speed = 12, loops = -1) /datum/reagent/fliptonium/overdose_process(mob/living/M, severity) @@ -592,20 +571,11 @@ description = "Ultra-Lube is an enhanced lubricant which induces effect similar to Methamphetamine in synthetic users by drastically reducing internal friction and increasing cooling capabilities." reagent_state = LIQUID color = "#1BB1FF" - process_flags = SYNTHETIC overdose_threshold = 20 addiction_chance = 60 metabolization_rate = 0.6 -/datum/chemical_reaction/lube/ultra - name = "Ultra-Lube" - id = "ultralube" - result = "ultralube" - required_reagents = list("lube" = 2, "formaldehyde" = 1, "cryostylane" = 1) - result_amount = 2 - mix_message = "The mixture darkens and appears to partially vaporize into a chilling aerosol." - /datum/reagent/lube/ultra/on_mob_life(mob/living/M) var/high_message = pick("You feel your servos whir!", "You feel like you need to go faster.", "You feel like you were just overclocked!") if(prob(1)) @@ -624,7 +594,7 @@ M.emote(pick("twitch", "shiver")) ..() -/datum/reagent/lube/ultra/reagent_deleted(mob/living/M) +/datum/reagent/lube/ultra/on_mob_delete(mob/living/M) M.status_flags &= ~GOTTAGOREALLYFAST ..() @@ -680,13 +650,5 @@ B.pixel_x = rand(-20, 0) B.pixel_y = rand(-20, 0) B.icon = I - M.adjustFireLoss(rand(1,5)*REM) - M.adjustBruteLoss(rand(1,5)*REM) - -/datum/chemical_reaction/surge - name = "Surge" - id = "surge" - result = "surge" - required_reagents = list("thermite" = 3, "uranium" = 1, "fluorosurfactant" = 1, "sacid" = 1) - result_amount = 6 - mix_message = "The mixture congeals into a metallic green gel that crackles with electrical activity." + M.adjustFireLoss(rand(1,5)*REAGENTS_EFFECT_MULTIPLIER) + M.adjustBruteLoss(rand(1,5)*REAGENTS_EFFECT_MULTIPLIER) \ No newline at end of file diff --git a/code/modules/reagents/chemistry/reagents/food.dm b/code/modules/reagents/chemistry/reagents/food.dm new file mode 100644 index 00000000000..e2aef002060 --- /dev/null +++ b/code/modules/reagents/chemistry/reagents/food.dm @@ -0,0 +1,835 @@ +/////////////////////////Food Reagents//////////////////////////// +// Part of the food code. Nutriment is used instead of the old "heal_amt" code. Also is where all the food +// condiments, additives, and such go. + +/datum/reagent/consumable + name = "Consumable" + id = "consumable" + var/nutriment_factor = 1 * REAGENTS_METABOLISM + var/diet_flags = DIET_OMNI | DIET_HERB | DIET_CARN + +/datum/reagent/consumable/on_mob_life(mob/living/M) + if(!(M.mind in ticker.mode.vampires)) + if(ishuman(M)) + var/mob/living/carbon/human/H = M + if(H.can_eat(diet_flags)) //Make sure the species has it's dietflag set, otherwise it can't digest any nutrients + H.nutrition += nutriment_factor // For hunger and fatness + ..() + +/datum/reagent/consumable/nutriment // Pure nutriment, universally digestable and thus slightly less effective + name = "Nutriment" + id = "nutriment" + description = "A questionable mixture of various pure nutrients commonly found in processed foods." + reagent_state = SOLID + nutriment_factor = 12 * REAGENTS_METABOLISM + color = "#664330" // rgb: 102, 67, 48 + +/datum/reagent/consumable/nutriment/on_mob_life(mob/living/M) + if(!(M.mind in ticker.mode.vampires)) + if(ishuman(M)) + var/mob/living/carbon/human/H = M + if(H.can_eat(diet_flags)) //Make sure the species has it's dietflag set, otherwise it can't digest any nutrients + if(prob(50)) + M.adjustBruteLoss(-1) + if(H.species.exotic_blood) + H.vessel.add_reagent(H.species.exotic_blood, 0.4) + else + if(!(H.species.flags & NO_BLOOD)) + H.vessel.add_reagent("blood", 0.4) + ..() + +/datum/reagent/consumable/nutriment/protein // Meat-based protein, digestable by carnivores and omnivores, worthless to herbivores + name = "Protein" + id = "protein" + description = "Various essential proteins and fats commonly found in animal flesh and blood." + nutriment_factor = 15 * REAGENTS_METABOLISM + diet_flags = DIET_CARN | DIET_OMNI + +/datum/reagent/consumable/nutriment/plantmatter // Plant-based biomatter, digestable by herbivores and omnivores, worthless to carnivores + name = "Plant-matter" + id = "plantmatter" + description = "Vitamin-rich fibers and natural sugars commonly found in fresh produce." + nutriment_factor = 15 * REAGENTS_METABOLISM + diet_flags = DIET_HERB | DIET_OMNI + +/datum/reagent/consumable/vitamin + name = "Vitamin" + id = "vitamin" + description = "All the best vitamins, minerals, and carbohydrates the body needs in pure form." + reagent_state = SOLID + color = "#664330" // rgb: 102, 67, 48 + +/datum/reagent/consumable/vitamin/on_mob_life(mob/living/M) + if(prob(50)) + M.adjustBruteLoss(-1) + M.adjustFireLoss(-1) + if(ishuman(M)) + var/mob/living/carbon/human/H = M + if(H.species.exotic_blood) + H.vessel.add_reagent(H.species.exotic_blood, 0.5) + else + if(!(H.species.flags & NO_BLOOD)) + H.vessel.add_reagent("blood", 0.5) + ..() + +/datum/reagent/consumable/soysauce + name = "Soysauce" + id = "soysauce" + description = "A salty sauce made from the soy plant." + reagent_state = LIQUID + nutriment_factor = 2 * REAGENTS_METABOLISM + color = "#792300" // rgb: 121, 35, 0 + +/datum/reagent/consumable/ketchup + name = "Ketchup" + id = "ketchup" + description = "Ketchup, catsup, whatever. It's tomato paste." + reagent_state = LIQUID + nutriment_factor = 5 * REAGENTS_METABOLISM + color = "#731008" // rgb: 115, 16, 8 + +/datum/reagent/consumable/capsaicin + name = "Capsaicin Oil" + id = "capsaicin" + description = "This is what makes chilis hot." + reagent_state = LIQUID + color = "#B31008" // rgb: 179, 16, 8 + +/datum/reagent/consumable/capsaicin/on_mob_life(mob/living/M) + switch(current_cycle) + if(1 to 15) + M.bodytemperature += 5 * TEMPERATURE_DAMAGE_COEFFICIENT + if(holder.has_reagent("frostoil")) + holder.remove_reagent("frostoil", 5) + if(isslime(M)) + M.bodytemperature += rand(5,20) + if(15 to 25) + M.bodytemperature += 10 * TEMPERATURE_DAMAGE_COEFFICIENT + if(isslime(M)) + M.bodytemperature += rand(10,20) + if(25 to 35) + M.bodytemperature += 15 * TEMPERATURE_DAMAGE_COEFFICIENT + if(isslime(M)) + M.bodytemperature += rand(15,20) + if(35 to INFINITY) + M.bodytemperature += 20 * TEMPERATURE_DAMAGE_COEFFICIENT + if(isslime(M)) + M.bodytemperature += rand(20,25) + ..() + +/datum/reagent/consumable/condensedcapsaicin + name = "Condensed Capsaicin" + id = "condensedcapsaicin" + description = "This shit goes in pepperspray." + reagent_state = LIQUID + color = "#B31008" // rgb: 179, 16, 8 + +/datum/reagent/consumable/condensedcapsaicin/on_mob_life(mob/living/M) + if(prob(5)) + M.visible_message("[M] [pick("dry heaves!","coughs!","splutters!")]") + ..() + +/datum/reagent/consumable/condensedcapsaicin/reaction_mob(mob/living/M, method=TOUCH, volume) + if(method == TOUCH) + if(ishuman(M)) + var/mob/living/carbon/human/victim = M + var/mouth_covered = 0 + var/eyes_covered = 0 + var/obj/item/safe_thing = null + if( victim.wear_mask ) + if( victim.wear_mask.flags & MASKCOVERSEYES ) + eyes_covered = 1 + safe_thing = victim.wear_mask + if( victim.wear_mask.flags & MASKCOVERSMOUTH ) + mouth_covered = 1 + safe_thing = victim.wear_mask + if( victim.head ) + if( victim.head.flags & MASKCOVERSEYES ) + eyes_covered = 1 + safe_thing = victim.head + if( victim.head.flags & MASKCOVERSMOUTH ) + mouth_covered = 1 + safe_thing = victim.head + if(victim.glasses) + eyes_covered = 1 + if( !safe_thing ) + safe_thing = victim.glasses + if( eyes_covered && mouth_covered ) + to_chat(victim, "Your [safe_thing] protects you from the pepperspray!") + return + else if( mouth_covered ) // Reduced effects if partially protected + to_chat(victim, "Your [safe_thing] protect you from most of the pepperspray!") + if(prob(5)) + victim.emote("scream") + victim.EyeBlurry(3) + victim.EyeBlind(1) + victim.Confused(3) + victim.damageoverlaytemp = 60 + victim.Weaken(3) + victim.drop_item() + return + else if( eyes_covered ) // Eye cover is better than mouth cover + to_chat(victim, "Your [safe_thing] protects your eyes from the pepperspray!") + victim.EyeBlurry(3) + victim.damageoverlaytemp = 30 + return + else // Oh dear :D + if(prob(5)) + victim.emote("scream") + to_chat(victim, "You're sprayed directly in the eyes with pepperspray!") + victim.EyeBlurry(5) + victim.EyeBlind(2) + victim.Confused(6) + victim.damageoverlaytemp = 75 + victim.Weaken(5) + victim.drop_item() + +/datum/reagent/consumable/frostoil + name = "Frost Oil" + id = "frostoil" + description = "A special oil that noticably chills the body. Extraced from Icepeppers." + reagent_state = LIQUID + color = "#8BA6E9" // rgb: 139, 166, 233 + process_flags = ORGANIC | SYNTHETIC + +/datum/reagent/consumable/frostoil/on_mob_life(mob/living/M) + switch(current_cycle) + if(1 to 15) + M.bodytemperature -= 10 * TEMPERATURE_DAMAGE_COEFFICIENT + if(holder.has_reagent("capsaicin")) + holder.remove_reagent("capsaicin", 5) + if(isslime(M)) + M.bodytemperature -= rand(5,20) + if(15 to 25) + M.bodytemperature -= 15 * TEMPERATURE_DAMAGE_COEFFICIENT + if(isslime(M)) + M.bodytemperature -= rand(10,20) + if(25 to 35) + M.bodytemperature -= 20 * TEMPERATURE_DAMAGE_COEFFICIENT + if(prob(1)) + M.emote("shiver") + if(isslime(M)) + M.bodytemperature -= rand(15,20) + if(35 to INFINITY) + M.bodytemperature -= 20 * TEMPERATURE_DAMAGE_COEFFICIENT + if(prob(1)) + M.emote("shiver") + if(isslime(M)) + M.bodytemperature -= rand(20,25) + ..() + +/datum/reagent/consumable/frostoil/reaction_turf(turf/T, volume) + if(volume >= 5) + for(var/mob/living/carbon/slime/M in T) + M.adjustToxLoss(rand(15,30)) + +/datum/reagent/consumable/sodiumchloride + name = "Salt" + id = "sodiumchloride" + description = "Sodium chloride, common table salt." + reagent_state = SOLID + color = "#B1B0B0" + overdose_threshold = 100 + +/datum/reagent/consumable/sodiumchloride/overdose_process(mob/living/M, severity) + if(prob(70)) + M.adjustBrainLoss(1) + ..() + +/datum/reagent/consumable/blackpepper + name = "Black Pepper" + id = "blackpepper" + description = "A powder ground from peppercorns. *AAAACHOOO*" + reagent_state = SOLID + +/datum/reagent/consumable/cocoa + name = "Cocoa Powder" + id = "cocoa" + description = "A fatty, bitter paste made from cocoa beans." + reagent_state = SOLID + nutriment_factor = 5 * REAGENTS_METABOLISM + color = "#302000" // rgb: 48, 32, 0 + +/datum/reagent/consumable/hot_coco + name = "Hot Chocolate" + id = "hot_coco" + description = "Made with love! And cocoa beans." + reagent_state = LIQUID + nutriment_factor = 2 * REAGENTS_METABOLISM + color = "#403010" // rgb: 64, 48, 16 + +/datum/reagent/consumable/hot_coco/on_mob_life(mob/living/M) + if(M.bodytemperature < 310)//310 is the normal bodytemp. 310.055 + M.bodytemperature = min(310, M.bodytemperature + (5 * TEMPERATURE_DAMAGE_COEFFICIENT)) + ..() + +/datum/reagent/consumable/sprinkles + name = "Sprinkles" + id = "sprinkles" + description = "Multi-colored little bits of sugar, commonly found on donuts. Loved by cops." + color = "#FF00FF" // rgb: 255, 0, 255 + +/datum/reagent/consumable/sprinkles/on_mob_life(mob/living/M) + if(ishuman(M) && M.job in list("Security Officer", "Security Pod Pilot", "Detective", "Warden", "Head of Security", "Brig Physician", "Internal Affairs Agent", "Magistrate")) + M.adjustBruteLoss(-1) + M.adjustFireLoss(-1) + ..() + +/datum/reagent/consumable/cornoil + name = "Corn Oil" + id = "cornoil" + description = "An oil derived from various types of corn." + reagent_state = LIQUID + nutriment_factor = 20 * REAGENTS_METABOLISM + color = "#302000" // rgb: 48, 32, 0 + +/datum/reagent/consumable/cornoil/reaction_turf(turf/simulated/T, volume) + if(!istype(T)) + return + if(volume >= 3) + T.MakeSlippery() + var/hotspot = (locate(/obj/effect/hotspot) in T) + if(hotspot) + var/datum/gas_mixture/lowertemp = T.remove_air( T.air.total_moles()) + lowertemp.temperature = max(min(lowertemp.temperature-2000, lowertemp.temperature / 2), 0) + lowertemp.react() + T.assume_air(lowertemp) + qdel(hotspot) + +/datum/reagent/consumable/enzyme + name = "Denatured Enzyme" + id = "enzyme" + description = "Heated beyond usefulness, this enzyme is now worthless." + reagent_state = LIQUID + color = "#282314" // rgb: 54, 94, 48 + +/datum/reagent/consumable/dry_ramen + name = "Dry Ramen" + id = "dry_ramen" + description = "Space age food, since August 25, 1958. Contains dried noodles, vegetables, and chemicals that boil in contact with water." + reagent_state = SOLID + color = "#302000" // rgb: 48, 32, 0 + +/datum/reagent/consumable/hot_ramen + name = "Hot Ramen" + id = "hot_ramen" + description = "The noodles are boiled, the flavors are artificial, just like being back in school." + reagent_state = LIQUID + nutriment_factor = 5 * REAGENTS_METABOLISM + color = "#302000" // rgb: 48, 32, 0 + +/datum/reagent/consumable/hot_ramen/on_mob_life(mob/living/M) + if(M.bodytemperature < 310)//310 is the normal bodytemp. 310.055 + M.bodytemperature = min(310, M.bodytemperature + (10 * TEMPERATURE_DAMAGE_COEFFICIENT)) + ..() + +/datum/reagent/consumable/hell_ramen + name = "Hell Ramen" + id = "hell_ramen" + description = "The noodles are boiled, the flavors are artificial, just like being back in school." + reagent_state = LIQUID + nutriment_factor = 5 * REAGENTS_METABOLISM + color = "#302000" // rgb: 48, 32, 0 + +/datum/reagent/consumable/hell_ramen/on_mob_life(mob/living/M) + M.bodytemperature += 10 * TEMPERATURE_DAMAGE_COEFFICIENT + ..() + +/datum/reagent/consumable/flour + name = "flour" + id = "flour" + description = "This is what you rub all over yourself to pretend to be a ghost." + reagent_state = SOLID + color = "#FFFFFF" // rgb: 0, 0, 0 + +/datum/reagent/consumable/flour/reaction_turf(turf/T, volume) + if(!istype(T, /turf/space)) + new /obj/effect/decal/cleanable/flour(T) + +/datum/reagent/consumable/rice + name = "Rice" + id = "rice" + description = "Enjoy the great taste of nothing." + reagent_state = SOLID + color = "#FFFFFF" // rgb: 0, 0, 0 + +/datum/reagent/consumable/cherryjelly + name = "Cherry Jelly" + id = "cherryjelly" + description = "Totally the best. Only to be spread on foods with excellent lateral symmetry." + reagent_state = LIQUID + color = "#801E28" // rgb: 128, 30, 40 + +/datum/reagent/consumable/egg + name = "Egg" + id = "egg" + description = "A runny and viscous mixture of clear and yellow fluids." + reagent_state = LIQUID + color = "#F0C814" + +/datum/reagent/consumable/egg/on_mob_life(mob/living/M) + if(prob(8)) + M.emote("fart") + if(prob(3)) + M.reagents.add_reagent("cholesterol", rand(1,2)) + ..() + +/datum/reagent/consumable/corn_starch + name = "Corn Starch" + id = "corn_starch" + description = "The powdered starch of maize, derived from the kernel's endosperm. Used as a thickener for gravies and puddings." + reagent_state = LIQUID + color = "#C8A5DC" + +/datum/reagent/consumable/corn_syrup + name = "Corn Syrup" + id = "corn_syrup" + description = "A sweet syrup derived from corn starch that has had its starches converted into maltose and other sugars." + reagent_state = LIQUID + color = "#C8A5DC" + +/datum/reagent/consumable/corn_syrup/on_mob_life(mob/living/M) + M.reagents.add_reagent("sugar", 1.2) + ..() + +/datum/reagent/consumable/vhfcs + name = "Very-high-fructose corn syrup" + id = "vhfcs" + description = "An incredibly sweet syrup, created from corn syrup treated with enzymes to convert its sugars into fructose." + reagent_state = LIQUID + color = "#C8A5DC" + +/datum/reagent/consumable/vhfcs/on_mob_life(mob/living/M) + M.reagents.add_reagent("sugar", 2.4) + ..() + +/datum/reagent/consumable/honey + name = "Honey" + id = "honey" + description = "A sweet substance produced by bees through partial digestion. Bee barf." + reagent_state = LIQUID + color = "#d3a308" + +/datum/reagent/consumable/honey/on_mob_life(mob/living/M) + M.reagents.add_reagent("sugar", 0.4) + if(prob(20)) + M.adjustBruteLoss(-3) + M.adjustFireLoss(-1) + ..() + +/datum/reagent/consumable/chocolate + name = "Chocolate" + id = "chocolate" + description = "Chocolate is a delightful product derived from the seeds of the theobroma cacao tree." + reagent_state = LIQUID + nutriment_factor = 5 * REAGENTS_METABOLISM //same as pure cocoa powder, because it makes no sense that chocolate won't fill you up and make you fat + color = "#2E2418" + drink_icon = "chocolateglass" + drink_name = "Glass of chocolate" + drink_desc = "Tasty" + +/datum/reagent/consumable/chocolate/on_mob_life(mob/living/M) + M.reagents.add_reagent("sugar", 0.8) + ..() + +/datum/reagent/consumable/chocolate/reaction_turf(turf/T, volume) + if(volume >= 5 && !istype(T, /turf/space)) + new /obj/item/weapon/reagent_containers/food/snacks/choc_pile(T) + +/datum/reagent/consumable/mugwort + name = "Mugwort" + id = "mugwort" + description = "A rather bitter herb once thought to hold magical protective properties." + reagent_state = LIQUID + color = "#21170E" + +/datum/reagent/consumable/mugwort/on_mob_life(mob/living/M) + if(ishuman(M) && M.mind) + if(M.mind.special_role == SPECIAL_ROLE_WIZARD) + M.adjustToxLoss(-1*REAGENTS_EFFECT_MULTIPLIER) + M.adjustOxyLoss(-1*REAGENTS_EFFECT_MULTIPLIER) + M.adjustBruteLoss(-1*REAGENTS_EFFECT_MULTIPLIER) + M.adjustFireLoss(-1*REAGENTS_EFFECT_MULTIPLIER) + ..() + +/datum/reagent/consumable/porktonium + name = "Porktonium" + id = "porktonium" + description = "A highly-radioactive pork byproduct first discovered in hotdogs." + reagent_state = LIQUID + color = "#AB5D5D" + metabolization_rate = 0.2 + overdose_threshold = 133 + +/datum/reagent/consumable/porktonium/overdose_process(mob/living/M, severity) + if(prob(15)) + M.reagents.add_reagent("cholesterol", rand(1,3)) + if(prob(8)) + M.reagents.add_reagent("radium", 15) + M.reagents.add_reagent("cyanide", 10) + +/datum/reagent/consumable/chicken_soup + name = "Chicken soup" + id = "chicken_soup" + description = "An old household remedy for mild illnesses." + reagent_state = LIQUID + color = "#B4B400" + metabolization_rate = 0.2 + nutriment_factor = 2 + +/datum/reagent/consumable/cheese + name = "Cheese" + id = "cheese" + description = "Some cheese. Pour it out to make it solid." + reagent_state = SOLID + color = "#FFFF00" + metabolization_rate = 0 //heheheh + nutriment_factor = 0 + +/datum/reagent/consumable/cheese/on_mob_life(mob/living/M) + if(prob(3)) + M.reagents.add_reagent("cholesterol", rand(1,2)) + ..() + +/datum/reagent/consumable/cheese/reaction_turf(turf/T, volume) + if(volume >= 5 && !istype(T, /turf/space)) + new /obj/item/weapon/reagent_containers/food/snacks/cheesewedge(T) + +/datum/reagent/consumable/fake_cheese + name = "Cheese substitute" + id = "fake_cheese" + description = "A cheese-like substance derived loosely from actual cheese." + reagent_state = LIQUID + color = "#B2B139" + overdose_threshold = 50 + +/datum/reagent/consumable/fake_cheese/overdose_process(mob/living/M, severity) + if(prob(8)) + to_chat(M, "You feel something squirming in your stomach. Your thoughts turn to cheese and you begin to sweat.") + M.adjustToxLoss(rand(1,2)) + +/datum/reagent/consumable/weird_cheese + name = "Weird cheese" + id = "weird_cheese" + description = "Hell, I don't even know if this IS cheese. Whatever it is, it ain't normal. If you want to, pour it out to make it solid." + reagent_state = SOLID + color = "#50FF00" + metabolization_rate = 0 //heheheh + addiction_chance = 5 + nutriment_factor = 0 + +/datum/reagent/consumable/weird_cheese/on_mob_life(mob/living/M) + if(prob(5)) + M.reagents.add_reagent("cholesterol", rand(1,3)) + ..() + +/datum/reagent/consumable/weird_cheese/reaction_turf(turf/T, volume) + if(volume >= 5 && !istype(T, /turf/space)) + new /obj/item/weapon/reagent_containers/food/snacks/weirdcheesewedge(T) + +/datum/reagent/consumable/beans + name = "Refried beans" + id = "beans" + description = "A dish made of mashed beans cooked with lard." + reagent_state = LIQUID + color = "#684435" + +/datum/reagent/consumable/beans/on_mob_life(mob/living/M) + if(prob(10)) + M.emote("fart") + ..() + +/datum/reagent/consumable/bread + name = "Bread" + id = "bread" + description = "Bread! Yep, bread." + reagent_state = SOLID + color = "#9C5013" + +/datum/reagent/consumable/soybeanoil + name = "Space-soybean oil" + id = "soybeanoil" + description = "An oil derived from extra-terrestrial soybeans." + reagent_state = LIQUID + color = "#B1B0B0" + +/datum/reagent/consumable/soybeanoil/on_mob_life(mob/living/M) + if(prob(10)) + M.reagents.add_reagent("cholesterol", rand(1,3)) + if(prob(8)) + M.reagents.add_reagent("porktonium", 5) + ..() + +/datum/reagent/consumable/hydrogenated_soybeanoil + name = "Partially hydrogenated space-soybean oil" + id = "hydrogenated_soybeanoil" + description = "An oil derived from extra-terrestrial soybeans, with additional hydrogen atoms added to convert it into a saturated form." + reagent_state = LIQUID + color = "#B1B0B0" + metabolization_rate = 0.2 + overdose_threshold = 75 + +/datum/reagent/consumable/hydrogenated_soybeanoil/on_mob_life(mob/living/M) + if(prob(15)) + M.reagents.add_reagent("cholesterol", rand(1,3)) + if(prob(8)) + M.reagents.add_reagent("porktonium", 5) + if(volume >= 75) + metabolization_rate = 0.4 + else + metabolization_rate = 0.2 + ..() + +/datum/reagent/consumable/hydrogenated_soybeanoil/overdose_process(mob/living/M, severity) + if(prob(33)) + to_chat(M, "You feel horribly weak.") + if(prob(10)) + to_chat(M, "You cannot breathe!") + M.adjustOxyLoss(5) + if(prob(5)) + to_chat(M, "You feel a sharp pain in your chest!") + M.adjustOxyLoss(25) + M.Stun(5) + M.Paralyse(10) + +/datum/reagent/consumable/meatslurry + name = "Meat Slurry" + id = "meatslurry" + description = "A paste comprised of highly-processed organic material. Uncomfortably similar to deviled ham spread." + reagent_state = LIQUID + color = "#EBD7D7" + +/datum/reagent/consumable/meatslurry/on_mob_life(mob/living/M) + if(prob(4)) + M.reagents.add_reagent("cholesterol", rand(1,3)) + ..() + +/datum/reagent/consumable/meatslurry/reaction_turf(turf/T, volume) + if(volume >= 5 && prob(10) && !istype(T, /turf/space)) + new /obj/effect/decal/cleanable/blood/gibs/cleangibs(T) + playsound(T, 'sound/effects/splat.ogg', 50, 1, -3) + +/datum/reagent/consumable/mashedpotatoes + name = "Mashed potatoes" + id = "mashedpotatoes" + description = "A starchy food paste made from boiled potatoes." + reagent_state = SOLID + color = "#D6D9C1" + +/datum/reagent/consumable/gravy + name = "Gravy" + id = "gravy" + description = "A savory sauce made from a simple meat-dripping roux and milk." + reagent_state = LIQUID + color = "#B4641B" + +/datum/reagent/consumable/beff + name = "Beff" + id = "beff" + description = "An advanced blend of mechanically-recovered meat and textured synthesized protein product notable for its unusual crystalline grain when sliced." + reagent_state = SOLID + color = "#AC7E67" + +/datum/reagent/consumable/beff/on_mob_life(mob/living/M) + if(prob(5)) + M.reagents.add_reagent("cholesterol", rand(1,3)) + if(prob(8)) + M.reagents.add_reagent(pick("blood", "corn_syrup", "synthflesh", "hydrogenated_soybeanoil", "porktonium", "toxic_slurry"), 0.8) + else if(prob(6)) + to_chat(M, "[pick("You feel ill.","Your stomach churns.","You feel queasy.","You feel sick.")]") + M.emote(pick("groan","moan")) + ..() + +/datum/reagent/consumable/pepperoni + name = "Pepperoni" + id = "pepperoni" + description = "An Italian-American variety of salami usually made from beef and pork" + reagent_state = SOLID + color = "#AC7E67" + +/datum/reagent/consumable/pepperoni/reaction_mob(mob/living/M, method=TOUCH, volume) + if(method == TOUCH) + if(ishuman(M)) + var/mob/living/carbon/human/H = M + + if(H.wear_mask) + to_chat(H, "The pepperoni bounces off your mask!") + return + + if(H.head) + to_chat(H, "Your mask protects you from the errant pepperoni!") + return + + if(prob(50)) + M.adjustBruteLoss(1) + playsound(M, 'sound/effects/woodhit.ogg', 50, 1) + to_chat(M, "A slice of pepperoni slaps you!") + else + M.emote("burp") + to_chat(M, "My goodness, that was tasty!") + + +///Food Related, but non-nutritious + +/datum/reagent/sugar + name = "Sugar" + id = "sugar" + description = "The organic compound commonly known as table sugar and sometimes called saccharose. This white, odorless, crystalline powder has a pleasing, sweet taste." + reagent_state = SOLID + color = "#FFFFFF" // rgb: 255, 255, 255 + overdose_threshold = 200 // Hyperglycaemic shock + +/datum/reagent/sugar/on_mob_life(mob/living/M) + M.AdjustDrowsy(-5) + if(current_cycle >= 90) + M.AdjustJitter(2) + if(prob(50)) + M.AdjustParalysis(-1) + M.AdjustStunned(-1) + M.AdjustWeakened(-1) + if(prob(4)) + M.reagents.add_reagent("epinephrine", 1.2) + ..() + +/datum/reagent/sugar/overdose_start(mob/living/M) + to_chat(M, "You pass out from hyperglycemic shock!") + M.emote("collapse") + ..() + +/datum/reagent/sugar/overdose_process(mob/living/M, severity) + M.Paralyse(3 * severity) + M.Weaken(4 * severity) + if(prob(8)) + M.adjustToxLoss(severity) + +/datum/reagent/questionmark // food poisoning + name = "????" + id = "????" + description = "A gross and unidentifiable substance." + reagent_state = LIQUID + color = "#63DE63" + +/datum/reagent/questionmark/reaction_mob(mob/living/M, method=TOUCH, volume) + if(method == INGEST) + M.Stun(2) + M.Weaken(2) + to_chat(M, "Ugh! Eating that was a terrible idea!") + M.ForceContractDisease(new /datum/disease/food_poisoning(0)) + +/datum/reagent/msg + name = "Monosodium glutamate" + id = "msg" + description = "Monosodium Glutamate is a sodium salt known chiefly for its use as a controversial flavor enhancer." + reagent_state = LIQUID + color = "#F5F5F5" + metabolization_rate = 0.2 + +/datum/reagent/msg/on_mob_life(mob/living/M) + if(prob(5)) + if(prob(10)) + M.adjustToxLoss(rand(2.4)) + if(prob(7)) + to_chat(M, "A horrible migraine overpowers you.") + M.Stun(rand(2,5)) + ..() + +/datum/reagent/msg/reaction_mob(mob/living/M, method=TOUCH, volume) + if(method == INGEST) + to_chat(M, "That tasted amazing!") + +/datum/reagent/cholesterol + name = "cholesterol" + id = "cholesterol" + description = "Pure cholesterol. Probably not very good for you." + reagent_state = LIQUID + color = "#FFFAC8" + +/datum/reagent/cholesterol/on_mob_life(mob/living/M) + if(volume >= 25 && prob(volume*0.15)) + to_chat(M, "Your chest feels [pick("weird","uncomfortable","nasty","gross","odd","unusual","warm")]!") + M.adjustToxLoss(rand(1,2)) + else if(volume >= 45 && prob(volume*0.08)) + to_chat(M, "Your chest [pick("hurts","stings","aches","burns")]!") + M.adjustToxLoss(rand(2,4)) + M.Stun(1) + else if(volume >= 150 && prob(volume*0.01)) + to_chat(M, "Your chest is burning with pain!") + M.Stun(1) + M.Weaken(1) + if(ishuman(M)) + var/mob/living/carbon/human/H = M + if(!H.heart_attack) + H.heart_attack = 1 + ..() + +/datum/reagent/fungus + name = "Space fungus" + id = "fungus" + description = "Scrapings of some unknown fungus found growing on the station walls." + reagent_state = LIQUID + color = "#C87D28" + +/datum/reagent/fungus/reaction_mob(mob/living/M, method=TOUCH, volume) + if(method == INGEST) + var/ranchance = rand(1,10) + if(ranchance == 1) + to_chat(M, "You feel very sick.") + M.reagents.add_reagent("toxin", rand(1,5)) + else if(ranchance <= 5) + to_chat(M, "That tasted absolutely FOUL.") + M.ForceContractDisease(new /datum/disease/food_poisoning(0)) + else + to_chat(M, "Yuck!") + +/datum/reagent/ectoplasm + name = "Ectoplasm" + id = "ectoplasm" + description = "A bizarre gelatinous substance supposedly derived from ghosts." + reagent_state = LIQUID + color = "#8EAE7B" + process_flags = ORGANIC | SYNTHETIC //Because apparently ghosts in the shell + +/datum/reagent/ectoplasm/on_mob_life(mob/living/M) + var/spooky_message = pick("You notice something moving out of the corner of your eye, but nothing is there...", "Your eyes twitch, you feel like something you can't see is here...", "You've got the heebie-jeebies.", "You feel uneasy.", "You shudder as if cold...", "You feel something gliding across your back...") + if(prob(8)) + to_chat(M, "[spooky_message]") + ..() + +/datum/reagent/ectoplasm/reaction_mob(mob/living/M, method=TOUCH, volume) + if(method == INGEST) + var/spooky_eat = pick("Ugh, why did you eat that? Your mouth feels haunted. Haunted with bad flavors.", "Ugh, why did you eat that? It has the texture of ham aspic. From the 1950s. Left out in the sun.", "Ugh, why did you eat that? It tastes like a ghost fart.", "Ugh, why did you eat that? It tastes like flavor died.") + to_chat(M, "[spooky_eat]") + +/datum/reagent/ectoplasm/reaction_turf(turf/T, volume) + if(volume >= 10 && !istype(T, /turf/space)) + new /obj/item/weapon/reagent_containers/food/snacks/ectoplasm(T) + +///Vomit/// + +/datum/reagent/consumable/bread/reaction_turf(turf/T, volume) + if(volume >= 5 && !istype(T, /turf/space)) + new /obj/item/weapon/reagent_containers/food/snacks/breadslice(T) + +/datum/reagent/vomit + name = "Vomit" + id = "vomit" + description = "Looks like someone lost their lunch. And then collected it. Yuck." + reagent_state = LIQUID + color = "#FFFF00" + +/datum/reagent/vomit/reaction_turf(turf/T, volume) + if(volume >= 5 && !istype(T, /turf/space)) + new /obj/effect/decal/cleanable/vomit(T) + playsound(T, 'sound/effects/splat.ogg', 50, 1, -3) + +/datum/reagent/greenvomit + name = "Green vomit" + id = "green_vomit" + description = "Whoa, that can't be natural. That's horrible." + reagent_state = LIQUID + color = "#78FF74" + +/datum/reagent/greenvomit/reaction_turf(turf/T, volume) + if(volume >= 5 && !istype(T, /turf/space)) + new /obj/effect/decal/cleanable/vomit/green(T) + playsound(T, 'sound/effects/splat.ogg', 50, 1, -3) \ No newline at end of file diff --git a/code/modules/reagents/newchem/medicine.dm b/code/modules/reagents/chemistry/reagents/medicine.dm similarity index 60% rename from code/modules/reagents/newchem/medicine.dm rename to code/modules/reagents/chemistry/reagents/medicine.dm index a84ac83f385..b3b94ff7e88 100644 --- a/code/modules/reagents/newchem/medicine.dm +++ b/code/modules/reagents/chemistry/reagents/medicine.dm @@ -1,10 +1,151 @@ -#define SOLID 1 -#define LIQUID 2 -#define GAS 3 +/datum/reagent/medicine + name = "Medicine" + id = "medicine" -#define REM REAGENTS_EFFECT_MULTIPLIER +/datum/reagent/medicine/hydrocodone + name = "Hydrocodone" + id = "hydrocodone" + description = "An extremely effective painkiller; may have long term abuse consequences." + reagent_state = LIQUID + color = "#C805DC" + metabolization_rate = 0.3 // Lasts 1.5 minutes for 15 units + shock_reduction = 200 -/datum/reagent/silver_sulfadiazine +/datum/reagent/medicine/hydrocodone/on_mob_life(mob/living/M) + if(ishuman(M)) + var/mob/living/carbon/human/H = M + if(H.traumatic_shock < 100) + H.shock_stage = 0 + ..() + +/datum/reagent/medicine/sterilizine + name = "Sterilizine" + id = "sterilizine" + description = "Sterilizes wounds in preparation for surgery." + reagent_state = LIQUID + color = "#C8A5DC" // rgb: 200, 165, 220 + + //makes you squeaky clean +/datum/reagent/medicine/sterilizine/reaction_mob(mob/living/M, method=TOUCH, volume) + if(method == TOUCH) + M.germ_level -= min(volume*20, M.germ_level) + +/datum/reagent/medicine/sterilizine/reaction_obj(obj/O, volume) + O.germ_level -= min(volume*20, O.germ_level) + +/datum/reagent/medicine/sterilizine/reaction_turf(turf/T, volume) + T.germ_level -= min(volume*20, T.germ_level) + +/datum/reagent/medicine/synaptizine + name = "Synaptizine" + id = "synaptizine" + description = "Synaptizine is used to treat neuroleptic shock. Can be used to help remove disabling symptoms such as paralysis." + reagent_state = LIQUID + color = "#FA46FA" + overdose_threshold = 40 + +/datum/reagent/medicine/synaptizine/on_mob_life(mob/living/M) + M.AdjustDrowsy(-5) + M.AdjustParalysis(-1) + M.AdjustStunned(-1) + M.AdjustWeakened(-1) + M.SetSleeping(0) + if(prob(50)) + M.adjustBrainLoss(-1.0) + ..() + +/datum/reagent/medicine/synaptizine/overdose_process(mob/living/M, severity) + var/effect = ..() + if(severity == 1) + if(effect <= 1) + M.visible_message("[M] suddenly and violently vomits!") + M.fakevomit(no_text = 1) + else if(effect <= 3) + M.emote(pick("groan","moan")) + if(effect <= 8) + M.adjustToxLoss(1) + else if(severity == 2) + if(effect <= 2) + M.visible_message("[M] suddenly and violently vomits!") + M.fakevomit(no_text = 1) + else if(effect <= 5) + M.visible_message("[M] staggers and drools, their eyes bloodshot!") + M.Dizzy(8) + M.Weaken(4) + if(effect <= 15) + M.adjustToxLoss(1) + +/datum/reagent/medicine/mitocholide + name = "Mitocholide" + id = "mitocholide" + description = "A specialized drug that stimulates the mitochondria of cells to encourage healing of internal organs." + reagent_state = LIQUID + color = "#C8A5DC" // rgb: 200, 165, 220 + +/datum/reagent/medicine/mitocholide/on_mob_life(mob/living/M) + if(ishuman(M)) + var/mob/living/carbon/human/H = M + + //Mitocholide is hard enough to get, it's probably fair to make this all internal organs + for(var/name in H.internal_organs) + var/obj/item/organ/internal/I = H.get_int_organ(name) + if(I.damage > 0) + I.damage = max(I.damage-0.4, 0) + ..() + +/datum/reagent/medicine/mitocholide/reaction_obj(obj/O, volume) + if(istype(O, /obj/item/organ)) + var/obj/item/organ/Org = O + Org.rejuvenate() + +/datum/reagent/medicine/cryoxadone + name = "Cryoxadone" + id = "cryoxadone" + description = "A plasma mixture with almost magical healing powers. Its main limitation is that the targets body temperature must be under 265K for it to metabolise correctly." + reagent_state = LIQUID + color = "#0000C8" // rgb: 200, 165, 220 + heart_rate_decrease = 1 + +/datum/reagent/medicine/cryoxadone/on_mob_life(mob/living/M) + if(M.bodytemperature < 265) + M.adjustCloneLoss(-4) + M.adjustOxyLoss(-10) + M.adjustToxLoss(-3) + M.adjustBruteLoss(-12) + M.adjustFireLoss(-12) + M.status_flags &= ~DISFIGURED + ..() + +/datum/reagent/medicine/rezadone + name = "Rezadone" + id = "rezadone" + description = "A powder derived from fish toxin, Rezadone can effectively treat genetic damage as well as restoring minor wounds. Overdose will cause intense nausea and minor toxin damage." + reagent_state = SOLID + color = "#669900" // rgb: 102, 153, 0 + overdose_threshold = 30 + +/datum/reagent/medicine/rezadone/on_mob_life(mob/living/M) + M.setCloneLoss(0) //Rezadone is almost never used in favor of cryoxadone. Hopefully this will change that. + M.adjustCloneLoss(-1) //What? We just set cloneloss to 0. Why? Simple; this is so external organs properly unmutate. + M.adjustBruteLoss(-1) + M.adjustFireLoss(-1) + M.status_flags &= ~DISFIGURED + ..() + +/datum/reagent/medicine/rezadone/overdose_process(mob/living/M, severity) + M.adjustToxLoss(1) + M.Dizzy(5) + M.Jitter(5) + +/datum/reagent/medicine/spaceacillin + name = "Spaceacillin" + id = "spaceacillin" + description = "An all-purpose antibiotic agent extracted from space fungus." + reagent_state = LIQUID + color = "#0AB478" + metabolization_rate = 0.2 + +/datum/reagent/medicine/silver_sulfadiazine name = "Silver Sulfadiazine" id = "silver_sulfadiazine" description = "This antibacterial compound is used to treat burn victims." @@ -12,7 +153,11 @@ color = "#F0C814" metabolization_rate = 3 -/datum/reagent/silver_sulfadiazine/reaction_mob(mob/living/M, method=TOUCH, volume, show_message = 1) +/datum/reagent/medicine/silver_sulfadiazine/on_mob_life(mob/living/M) + M.adjustFireLoss(-2*REAGENTS_EFFECT_MULTIPLIER) + ..() + +/datum/reagent/medicine/silver_sulfadiazine/reaction_mob(mob/living/M, method=TOUCH, volume, show_message = 1) if(iscarbon(M)) if(method == TOUCH) M.adjustFireLoss(-volume) @@ -24,11 +169,7 @@ to_chat(M, "You feel sick...") ..() -/datum/reagent/silver_sulfadiazine/on_mob_life(mob/living/M) - M.adjustFireLoss(-2*REM) - ..() - -/datum/reagent/styptic_powder +/datum/reagent/medicine/styptic_powder name = "Styptic Powder" id = "styptic_powder" description = "Styptic (aluminium sulfate) powder helps control bleeding and heal physical wounds." @@ -36,7 +177,11 @@ color = "#C8A5DC" metabolization_rate = 3 -/datum/reagent/styptic_powder/reaction_mob(mob/living/M, method=TOUCH, volume, show_message = 1) +/datum/reagent/medicine/styptic_powder/on_mob_life(mob/living/M) + M.adjustBruteLoss(-2*REAGENTS_EFFECT_MULTIPLIER) + ..() + +/datum/reagent/medicine/styptic_powder/reaction_mob(mob/living/M, method=TOUCH, volume, show_message = 1) if(iscarbon(M)) if(method == TOUCH) M.adjustBruteLoss(-volume) @@ -49,11 +194,7 @@ to_chat(M, "You feel gross!") ..() -/datum/reagent/styptic_powder/on_mob_life(mob/living/M) - M.adjustBruteLoss(-2*REM) - ..() - -/datum/reagent/salglu_solution +/datum/reagent/medicine/salglu_solution name = "Saline-Glucose Solution" id = "salglu_solution" description = "This saline and glucose solution can help stabilize critically injured patients and cleanse wounds." @@ -62,24 +203,24 @@ penetrates_skin = 1 metabolization_rate = 0.15 -/datum/reagent/salglu_solution/on_mob_life(mob/living/M) +/datum/reagent/medicine/salglu_solution/on_mob_life(mob/living/M) if(prob(33)) - M.adjustBruteLoss(-2*REM) - M.adjustFireLoss(-2*REM) + M.adjustBruteLoss(-2*REAGENTS_EFFECT_MULTIPLIER) + M.adjustFireLoss(-2*REAGENTS_EFFECT_MULTIPLIER) if(ishuman(M)) var/mob/living/carbon/human/H = M if(!H.species.exotic_blood && !(H.species.flags & NO_BLOOD) && prob(33)) H.vessel.add_reagent("blood", 1) ..() -/datum/reagent/synthflesh +/datum/reagent/medicine/synthflesh name = "Synthflesh" id = "synthflesh" description = "A resorbable microfibrillar collagen and protein mixture that can rapidly heal injuries when applied topically." reagent_state = LIQUID color = "#FFEBEB" -/datum/reagent/synthflesh/reaction_mob(mob/living/M, method=TOUCH, volume, show_message = 1) +/datum/reagent/medicine/synthflesh/reaction_mob(mob/living/M, method=TOUCH, volume, show_message = 1) if(iscarbon(M)) if(method == TOUCH) M.adjustBruteLoss(-1.5*volume) @@ -88,70 +229,27 @@ to_chat(M, "The synthetic flesh integrates itself into your wounds, healing you.") ..() -/datum/reagent/synthflesh/reaction_turf(turf/T, volume) //let's make a mess! +/datum/reagent/medicine/synthflesh/reaction_turf(turf/T, volume) //let's make a mess! if(volume >= 5 && !istype(T, /turf/space)) new /obj/effect/decal/cleanable/blood/gibs/cleangibs(T) playsound(T, 'sound/effects/splat.ogg', 50, 1, -3) -/datum/reagent/charcoal +/datum/reagent/medicine/charcoal name = "Charcoal" id = "charcoal" description = "Activated charcoal helps to absorb toxins." reagent_state = LIQUID color = "#000000" -/datum/reagent/charcoal/on_mob_life(mob/living/M) - M.adjustToxLoss(-1.5*REM) +/datum/reagent/medicine/charcoal/on_mob_life(mob/living/M) + M.adjustToxLoss(-1.5*REAGENTS_EFFECT_MULTIPLIER) if(prob(50)) for(var/datum/reagent/R in M.reagents.reagent_list) if(R != src) M.reagents.remove_reagent(R.id,1) ..() -/datum/chemical_reaction/charcoal - name = "Charcoal" - id = "charcoal" - result = "charcoal" - required_reagents = list("ash" = 1, "sodiumchloride" = 1) - result_amount = 2 - mix_message = "The mixture yields a fine black powder." - min_temp = 380 - mix_sound = 'sound/goonstation/misc/fuse.ogg' - -/datum/chemical_reaction/silver_sulfadiazine - name = "Silver Sulfadiazine" - id = "silver_sulfadiazine" - result = "silver_sulfadiazine" - required_reagents = list("ammonia" = 1, "silver" = 1, "sulfur" = 1, "oxygen" = 1, "chlorine" = 1) - result_amount = 5 - mix_message = "A strong and cloying odor begins to bubble from the mixture." - mix_sound = 'sound/goonstation/misc/drinkfizz.ogg' - -/datum/chemical_reaction/salglu_solution - name = "Saline-Glucose Solution" - id = "salglu_solution" - result = "salglu_solution" - required_reagents = list("sodiumchloride" = 1, "water" = 1, "sugar" = 1) - result_amount = 3 - -/datum/chemical_reaction/synthflesh - name = "Synthflesh" - id = "synthflesh" - result = "synthflesh" - required_reagents = list("blood" = 1, "carbon" = 1, "styptic_powder" = 1) - result_amount = 3 - mix_message = "The mixture knits together into a fibrous, bloody mass." - mix_sound = 'sound/effects/blobattack.ogg' - -/datum/chemical_reaction/styptic_powder - name = "Styptic Powder" - id = "styptic_powder" - result = "styptic_powder" - required_reagents = list("aluminum" = 1, "hydrogen" = 1, "oxygen" = 1, "sacid" = 1) - result_amount = 4 - mix_message = "The solution yields an astringent powder." - -/datum/reagent/omnizine +/datum/reagent/medicine/omnizine name = "Omnizine" id = "omnizine" description = "Omnizine is a highly potent healing medication that can be used to treat a wide range of injuries." @@ -161,16 +259,16 @@ overdose_threshold = 30 addiction_chance = 5 -/datum/reagent/omnizine/on_mob_life(mob/living/M) - M.adjustToxLoss(-1*REM) - M.adjustOxyLoss(-1*REM) - M.adjustBruteLoss(-2*REM) - M.adjustFireLoss(-2*REM) +/datum/reagent/medicine/omnizine/on_mob_life(mob/living/M) + M.adjustToxLoss(-1*REAGENTS_EFFECT_MULTIPLIER) + M.adjustOxyLoss(-1*REAGENTS_EFFECT_MULTIPLIER) + M.adjustBruteLoss(-2*REAGENTS_EFFECT_MULTIPLIER) + M.adjustFireLoss(-2*REAGENTS_EFFECT_MULTIPLIER) if(prob(50)) M.AdjustLoseBreath(-1) ..() -/datum/reagent/omnizine/overdose_process(mob/living/M, severity) +/datum/reagent/medicine/omnizine/overdose_process(mob/living/M, severity) var/effect = ..() if(severity == 1) //lesser M.stuttering += 1 @@ -204,7 +302,7 @@ M.Dizzy(5) M.Weaken(3) -/datum/reagent/calomel +/datum/reagent/medicine/calomel name = "Calomel" id = "calomel" description = "This potent purgative rids the body of impurities. It is highly toxic however and close supervision is required." @@ -212,74 +310,48 @@ color = "#22AB35" metabolization_rate = 0.8 -/datum/reagent/calomel/on_mob_life(mob/living/M) +/datum/reagent/medicine/calomel/on_mob_life(mob/living/M) for(var/datum/reagent/R in M.reagents.reagent_list) if(R != src) M.reagents.remove_reagent(R.id,5) if(M.health > 20) - M.adjustToxLoss(5*REM) + M.adjustToxLoss(5*REAGENTS_EFFECT_MULTIPLIER) if(prob(6)) M.fakevomit() ..() -/datum/chemical_reaction/calomel - name = "Calomel" - id = "calomel" - result = "calomel" - required_reagents = list("mercury" = 1, "chlorine" = 1) - result_amount = 2 - min_temp = 374 - mix_message = "Stinging vapors rise from the solution." - -/datum/reagent/potass_iodide +/datum/reagent/medicine/potass_iodide name = "Potassium Iodide" id = "potass_iodide" description = "Potassium Iodide is a medicinal drug used to counter the effects of radiation poisoning." reagent_state = LIQUID color = "#B4DCBE" -/datum/reagent/potass_iodide/on_mob_life(mob/living/M) +/datum/reagent/medicine/potass_iodide/on_mob_life(mob/living/M) if(prob(80)) M.radiation = max(0, M.radiation-1) ..() -/datum/chemical_reaction/potass_iodide - name = "Potassium Iodide" - id = "potass_iodide" - result = "potass_iodide" - required_reagents = list("potassium" = 1, "iodine" = 1) - result_amount = 2 - mix_message = "The solution settles calmly and emits gentle fumes." - -/datum/reagent/pen_acid +/datum/reagent/medicine/pen_acid name = "Pentetic Acid" id = "pen_acid" description = "Pentetic Acid is an aggressive chelation agent. May cause tissue damage. Use with caution." reagent_state = LIQUID color = "#C8A5DC" -/datum/reagent/pen_acid/on_mob_life(mob/living/M) +/datum/reagent/medicine/pen_acid/on_mob_life(mob/living/M) for(var/datum/reagent/R in M.reagents.reagent_list) if(R != src) M.reagents.remove_reagent(R.id,4) M.radiation = max(0, M.radiation-7) if(prob(75)) - M.adjustToxLoss(-4*REM) + M.adjustToxLoss(-4*REAGENTS_EFFECT_MULTIPLIER) if(prob(33)) - M.adjustBruteLoss(1*REM) - M.adjustFireLoss(1*REM) + M.adjustBruteLoss(1*REAGENTS_EFFECT_MULTIPLIER) + M.adjustFireLoss(1*REAGENTS_EFFECT_MULTIPLIER) ..() - return -/datum/chemical_reaction/pen_acid - name = "Pentetic Acid" - id = "pen_acid" - result = "pen_acid" - required_reagents = list("fuel" = 1, "chlorine" = 1, "ammonia" = 1, "formaldehyde" = 1, "sodium" = 1, "cyanide" = 1) - result_amount = 6 - mix_message = "The substance becomes very still, emitting a curious haze." - -/datum/reagent/sal_acid +/datum/reagent/medicine/sal_acid name = "Salicylic Acid" id = "sal_acid" description = "This is a is a standard salicylate pain reliever and fever reducer." @@ -289,25 +361,16 @@ shock_reduction = 25 overdose_threshold = 25 -/datum/reagent/sal_acid/on_mob_life(mob/living/M) +/datum/reagent/medicine/sal_acid/on_mob_life(mob/living/M) if(prob(55)) - M.adjustBruteLoss(-2*REM) + M.adjustBruteLoss(-2*REAGENTS_EFFECT_MULTIPLIER) if(ishuman(M)) var/mob/living/carbon/human/H = M if(H.traumatic_shock < 100) H.shock_stage = 0 ..() -/datum/chemical_reaction/sal_acid - name = "Salicyclic Acid" - id = "sal_acid" - result = "sal_acid" - required_reagents = list("sodium" = 1, "phenol" = 1, "carbon" = 1, "oxygen" = 1, "sacid" = 1) - result_amount = 5 - mix_message = "The mixture crystallizes." - mix_sound = 'sound/goonstation/misc/drinkfizz.ogg' - -/datum/reagent/salbutamol +/datum/reagent/medicine/salbutamol name = "Salbutamol" id = "salbutamol" description = "Salbutamol is a common bronchodilation medication for asthmatics. It may help with other breathing problems as well." @@ -315,21 +378,12 @@ color = "#00FFFF" metabolization_rate = 0.2 -/datum/reagent/salbutamol/on_mob_life(mob/living/M) - M.adjustOxyLoss(-6*REM) +/datum/reagent/medicine/salbutamol/on_mob_life(mob/living/M) + M.adjustOxyLoss(-6*REAGENTS_EFFECT_MULTIPLIER) M.AdjustLoseBreath(-4) ..() -/datum/chemical_reaction/salbutamol - name = "Salbutamol" - id = "salbutamol" - result = "salbutamol" - required_reagents = list("sal_acid" = 1, "lithium" = 1, "aluminum" = 1, "bromine" = 1, "ammonia" = 1) - result_amount = 5 - mix_message = "The solution bubbles freely, creating a head of bluish foam." - mix_sound = 'sound/goonstation/misc/drinkfizz.ogg' - -/datum/reagent/perfluorodecalin +/datum/reagent/medicine/perfluorodecalin name = "Perfluorodecalin" id = "perfluorodecalin" description = "This experimental perfluoronated solvent has applications in liquid breathing and tissue oxygenation. Use with caution." @@ -338,27 +392,17 @@ metabolization_rate = 0.2 addiction_chance = 20 -/datum/reagent/perfluorodecalin/on_mob_life(mob/living/carbon/human/M) - M.adjustOxyLoss(-25*REM) +/datum/reagent/medicine/perfluorodecalin/on_mob_life(mob/living/carbon/human/M) + M.adjustOxyLoss(-25*REAGENTS_EFFECT_MULTIPLIER) if(volume >= 4) M.LoseBreath(6) M.Silence(6) if(prob(33)) - M.adjustBruteLoss(-1*REM) - M.adjustFireLoss(-1*REM) + M.adjustBruteLoss(-1*REAGENTS_EFFECT_MULTIPLIER) + M.adjustFireLoss(-1*REAGENTS_EFFECT_MULTIPLIER) ..() -/datum/chemical_reaction/perfluorodecalin - name = "Perfluorodecalin" - id = "perfluorodecalin" - result = "perfluorodecalin" - required_reagents = list("hydrogen" = 1, "fluorine" = 1, "oil" = 1) - result_amount = 3 - min_temp = 370 - mix_message = "The mixture rapidly turns into a dense pink liquid." - mix_sound = 'sound/goonstation/misc/drinkfizz.ogg' - -/datum/reagent/ephedrine +/datum/reagent/medicine/ephedrine name = "Ephedrine" id = "ephedrine" description = "Ephedrine is a plant-derived stimulant." @@ -368,12 +412,12 @@ overdose_threshold = 35 addiction_chance = 25 -/datum/reagent/ephedrine/on_mob_life(mob/living/M) +/datum/reagent/medicine/ephedrine/on_mob_life(mob/living/M) M.AdjustDrowsy(-5) M.AdjustParalysis(-1) M.AdjustStunned(-1) M.AdjustWeakened(-1) - M.adjustStaminaLoss(-1*REM) + M.adjustStaminaLoss(-1*REAGENTS_EFFECT_MULTIPLIER) M.AdjustLoseBreath(-1, bound_lower = 5) if(M.oxyloss > 75) M.adjustOxyLoss(-1) @@ -383,7 +427,7 @@ M.adjustFireLoss(-1) ..() -/datum/reagent/ephedrine/overdose_process(mob/living/M, severity) +/datum/reagent/medicine/ephedrine/overdose_process(mob/living/M, severity) var/effect = ..() if(severity == 1) if(effect <= 1) @@ -404,15 +448,7 @@ if(effect <= 15) M.emote("collapse") -/datum/chemical_reaction/ephedrine - name = "Ephedrine" - id = "ephedrine" - result = "ephedrine" - required_reagents = list("sugar" = 1, "oil" = 1, "hydrogen" = 1, "diethylamine" = 1) - result_amount = 4 - mix_message = "The solution fizzes and gives off toxic fumes." - -/datum/reagent/diphenhydramine +/datum/reagent/medicine/diphenhydramine name = "Diphenhydramine" id = "diphenhydramine" description = "Anti-allergy medication. May cause drowsiness, do not operate heavy machinery while using this." @@ -420,7 +456,7 @@ color = "#5BCBE1" addiction_chance = 10 -/datum/reagent/diphenhydramine/on_mob_life(mob/living/M) +/datum/reagent/medicine/diphenhydramine/on_mob_life(mob/living/M) M.AdjustJitter(-20) M.reagents.remove_reagent("histamine",3) M.reagents.remove_reagent("itching_powder",3) @@ -432,16 +468,7 @@ M.visible_message("[M] looks a bit dazed.") ..() -/datum/chemical_reaction/diphenhydramine - name = "Diphenhydramine" - id = "diphenhydramine" - result = "diphenhydramine" - required_reagents = list("oil" = 1, "carbon" = 1, "bromine" = 1, "diethylamine" = 1, "ethanol" = 1) - result_amount = 4 - mix_message = "The mixture fizzes gently." - mix_sound = 'sound/goonstation/misc/drinkfizz.ogg' - -/datum/reagent/morphine +/datum/reagent/medicine/morphine name = "Morphine" id = "morphine" description = "A strong but highly addictive opiate painkiller with sedative side effects." @@ -451,7 +478,7 @@ addiction_chance = 50 shock_reduction = 50 -/datum/reagent/morphine/on_mob_life(mob/living/M) +/datum/reagent/medicine/morphine/on_mob_life(mob/living/M) M.AdjustJitter(-25) switch(current_cycle) if(1 to 15) @@ -468,7 +495,14 @@ H.shock_stage = 0 ..() -/datum/reagent/oculine/on_mob_life(mob/living/M) +/datum/reagent/medicine/oculine + name = "Oculine" + id = "oculine" + description = "Oculine is a saline eye medication with mydriatic and antibiotic effects." + reagent_state = LIQUID + color = "#C8A5DC" + +/datum/reagent/medicine/oculine/on_mob_life(mob/living/M) if(prob(80)) if(ishuman(M)) var/mob/living/carbon/human/H = M @@ -487,24 +521,7 @@ M.SetEarDeaf(0) ..() -/datum/chemical_reaction/oculine - name = "Oculine" - id = "oculine" - result = "oculine" - required_reagents = list("atropine" = 1, "spaceacillin" = 1, "salglu_solution" = 1) - result_amount = 3 - mix_message = "The mixture settles, becoming a milky white." - -/datum/reagent/oculine - name = "Oculine" - id = "oculine" - description = "Oculine is a saline eye medication with mydriatic and antibiotic effects." - reagent_state = LIQUID - color = "#C8A5DC" - metabolization_rate = 0.4 - var/cycle_amount = 0 - -/datum/reagent/atropine +/datum/reagent/medicine/atropine name = "Atropine" id = "atropine" description = "Atropine is a potent cardiac resuscitant but it can causes confusion, dizzyness and hyperthermia." @@ -513,32 +530,24 @@ metabolization_rate = 0.2 overdose_threshold = 25 -/datum/reagent/atropine/on_mob_life(mob/living/M) +/datum/reagent/medicine/atropine/on_mob_life(mob/living/M) M.AdjustDizzy(1) M.Confused(5) if(prob(4)) M.emote("collapse") M.AdjustLoseBreath(-5, bound_lower = 5) if(M.oxyloss > 65) - M.adjustOxyLoss(-10*REM) + M.adjustOxyLoss(-10*REAGENTS_EFFECT_MULTIPLIER) if(M.health < -25) M.adjustToxLoss(-1) - M.adjustBruteLoss(-3*REM) - M.adjustFireLoss(-3*REM) + M.adjustBruteLoss(-3*REAGENTS_EFFECT_MULTIPLIER) + M.adjustFireLoss(-3*REAGENTS_EFFECT_MULTIPLIER) else if(M.health > -60) M.adjustToxLoss(1) M.reagents.remove_reagent("sarin", 20) ..() -/datum/chemical_reaction/atropine - name = "Atropine" - id = "atropine" - result = "atropine" - required_reagents = list("ethanol" = 1, "acetone" = 1, "diethylamine" = 1, "phenol" = 1, "sacid" = 1) - result_amount = 5 - mix_message = "A horrid smell like something died drifts from the mixture." - -/datum/reagent/epinephrine +/datum/reagent/medicine/epinephrine name = "Epinephrine" id = "epinephrine" description = "Epinephrine is a potent neurotransmitter, used in medical emergencies to halt anaphylactic shock and prevent cardiac arrest." @@ -547,7 +556,7 @@ metabolization_rate = 0.2 overdose_threshold = 20 -/datum/reagent/epinephrine/on_mob_life(mob/living/M) +/datum/reagent/medicine/epinephrine/on_mob_life(mob/living/M) M.AdjustDrowsy(-5) if(prob(20)) M.AdjustParalysis(-1) @@ -562,14 +571,14 @@ holder.remove_reagent("histamine", 15) M.AdjustLoseBreath(-1, bound_lower = 3) if(M.oxyloss > 35) - M.adjustOxyLoss(-10*REM) + M.adjustOxyLoss(-10*REAGENTS_EFFECT_MULTIPLIER) if(M.health < -10 && M.health > -65) - M.adjustToxLoss(-1*REM) - M.adjustBruteLoss(-1*REM) - M.adjustFireLoss(-1*REM) + M.adjustToxLoss(-1*REAGENTS_EFFECT_MULTIPLIER) + M.adjustBruteLoss(-1*REAGENTS_EFFECT_MULTIPLIER) + M.adjustFireLoss(-1*REAGENTS_EFFECT_MULTIPLIER) ..() -/datum/reagent/epinephrine/overdose_process(mob/living/M, severity) +/datum/reagent/medicine/epinephrine/overdose_process(mob/living/M, severity) var/effect = ..() if(severity == 1) if(effect <= 1) @@ -590,16 +599,7 @@ if(effect <= 15) M.emote("collapse") -/datum/chemical_reaction/epinephrine - name = "Epinephrine" - id = "epinephrine" - result = "epinephrine" - required_reagents = list("phenol" = 1, "acetone" = 1, "diethylamine" = 1, "oxygen" = 1, "chlorine" = 1, "hydrogen" = 1) - result_amount = 6 - mix_message = "Tiny white crystals precipitate out of the solution." - mix_sound = 'sound/goonstation/misc/drinkfizz.ogg' - -/datum/reagent/strange_reagent +/datum/reagent/medicine/strange_reagent name = "Strange Reagent" id = "strange_reagent" description = "A glowing green fluid highly reminiscent of nuclear waste." @@ -607,7 +607,13 @@ color = "#A0E85E" metabolization_rate = 0.2 -/datum/reagent/strange_reagent/reaction_mob(mob/living/M, method=TOUCH, volume) +/datum/reagent/medicine/strange_reagent/on_mob_life(mob/living/M) + if(prob(10)) + M.adjustBruteLoss(2*REAGENTS_EFFECT_MULTIPLIER) + M.adjustToxLoss(2*REAGENTS_EFFECT_MULTIPLIER) + ..() + +/datum/reagent/medicine/strange_reagent/reaction_mob(mob/living/M, method=TOUCH, volume) if(isanimal(M)) if(method == TOUCH) var/mob/living/simple_animal/SM = M @@ -639,58 +645,23 @@ add_logs(M, M, "revived", object="strange reagent") //Yes, the logs say you revived yourself. ..() -/datum/reagent/strange_reagent/on_mob_life(mob/living/M) - if(prob(10)) - M.adjustBruteLoss(2*REM) - M.adjustToxLoss(2*REM) - ..() - -/datum/chemical_reaction/strange_reagent - name = "Strange Reagent" - id = "strange_reagent" - result = "strange_reagent" - required_reagents = list("omnizine" = 1, "holywater" = 1, "mutagen" = 1) - result_amount = 3 - mix_message = "The substance begins moving on its own somehow." - -/datum/reagent/life - name = "Life" - id = "life" - description = "Can create a life form, however it is not guaranteed to be friendly. May want to have Security on hot standby." - reagent_state = LIQUID - color = "#C8A5DC" - metabolization_rate = 0.2 - -/datum/chemical_reaction/life - name = "Life" - id = "life" - result = null - required_reagents = list("strange_reagent" = 1, "synthflesh" = 1, "blood" = 1) - result_amount = 3 - min_temp = 374 - -/datum/chemical_reaction/life/on_reaction(datum/reagents/holder, created_volume) - chemical_mob_spawn(holder, 1, "Life") - -/datum/reagent/mannitol/on_mob_life(mob/living/M) - M.adjustBrainLoss(-3) - ..() - -/datum/chemical_reaction/mannitol - name = "Mannitol" - id = "mannitol" - result = "mannitol" - required_reagents = list("sugar" = 1, "hydrogen" = 1, "water" = 1) - result_amount = 3 - mix_message = "The mixture bubbles slowly, making a slightly sweet odor." - -/datum/reagent/mannitol +/datum/reagent/medicine/mannitol name = "Mannitol" id = "mannitol" description = "Mannitol is a sugar alcohol that can help alleviate cranial swelling." color = "#D1D1F1" -/datum/reagent/mutadone/on_mob_life(mob/living/carbon/human/M) +/datum/reagent/medicine/mannitol/on_mob_life(mob/living/M) + M.adjustBrainLoss(-3) + ..() + +/datum/reagent/medicine/mutadone + name = "Mutadone" + id = "mutadone" + description = "Mutadone is an experimental bromide that can cure genetic abnomalities." + color = "#5096C8" + +/datum/reagent/medicine/mutadone/on_mob_life(mob/living/carbon/human/M) M.SetJitter(0) var/needs_update = M.mutations.len > 0 || M.disabilities > 0 @@ -708,57 +679,33 @@ H.update_mutations() ..() -/datum/chemical_reaction/mutadone - name = "Mutadone" - id = "mutadone" - result = "mutadone" - required_reagents = list("mutagen" = 1, "acetone" = 1, "bromine" = 1) - result_amount = 3 - mix_message = "A foul astringent liquid emerges from the reaction." - - -/datum/reagent/mutadone - name = "Mutadone" - id = "mutadone" - description = "Mutadone is an experimental bromide that can cure genetic abnomalities." - color = "#5096C8" - -/datum/reagent/antihol +/datum/reagent/medicine/antihol name = "Antihol" id = "antihol" description = "A medicine which quickly eliminates alcohol in the body." color = "#009CA8" -/datum/reagent/antihol/on_mob_life(mob/living/M) +/datum/reagent/medicine/antihol/on_mob_life(mob/living/M) M.SetSlur(0) M.AdjustDrunk(-4) - M.reagents.remove_all_type(/datum/reagent/ethanol, 8, 0, 1) + M.reagents.remove_all_type(/datum/reagent/consumable/ethanol, 8, 0, 1) if(M.toxloss <= 25) M.adjustToxLoss(-2.0) ..() -/datum/chemical_reaction/antihol - name = "antihol" - id = "antihol" - result = "antihol" - required_reagents = list("ethanol" = 1, "charcoal" = 1) - result_amount = 2 - mix_message = "A minty and refreshing smell drifts from the effervescent mixture." - mix_sound = 'sound/goonstation/misc/drinkfizz.ogg' - -/datum/reagent/stimulants +/datum/reagent/medicine/stimulants name = "Stimulants" id = "stimulants" description = "Increases run speed and eliminates stuns, can heal minor damage. If overdosed it will deal toxin damage and stun." color = "#C8A5DC" - metabolization_rate = 0.4 + can_synth = 0 -/datum/reagent/stimulants/on_mob_life(mob/living/M) +/datum/reagent/medicine/stimulants/on_mob_life(mob/living/M) if(volume > 5) - M.adjustOxyLoss(-5*REM) - M.adjustToxLoss(-5*REM) - M.adjustBruteLoss(-10*REM) - M.adjustFireLoss(-10*REM) + M.adjustOxyLoss(-5*REAGENTS_EFFECT_MULTIPLIER) + M.adjustToxLoss(-5*REAGENTS_EFFECT_MULTIPLIER) + M.adjustBruteLoss(-10*REAGENTS_EFFECT_MULTIPLIER) + M.adjustFireLoss(-10*REAGENTS_EFFECT_MULTIPLIER) M.setStaminaLoss(0) M.SetSlowed(0) M.AdjustDizzy(-10) @@ -775,7 +722,7 @@ M.Stun(3) ..() -/datum/reagent/stimulants/reagent_deleted(mob/living/M) +/datum/reagent/medicine/stimulants/on_mob_delete(mob/living/M) M.status_flags |= CANSTUN | CANWEAKEN | CANPARALYSE ..() @@ -786,57 +733,49 @@ color = "#C8A5DC" metabolization_rate = 0.5 * REAGENTS_METABOLISM overdose_threshold = 60 + can_synth = 0 /datum/reagent/medicine/stimulative_agent/on_mob_life(mob/living/M) M.status_flags |= GOTTAGOFAST if(M.health < 50 && M.health > 0) - M.adjustOxyLoss(-1*REM) - M.adjustToxLoss(-1*REM) - M.adjustBruteLoss(-1*REM) - M.adjustFireLoss(-1*REM) + M.adjustOxyLoss(-1*REAGENTS_EFFECT_MULTIPLIER) + M.adjustToxLoss(-1*REAGENTS_EFFECT_MULTIPLIER) + M.adjustBruteLoss(-1*REAGENTS_EFFECT_MULTIPLIER) + M.adjustFireLoss(-1*REAGENTS_EFFECT_MULTIPLIER) M.AdjustParalysis(-3) M.AdjustStunned(-3) M.AdjustWeakened(-3) - M.adjustStaminaLoss(-5*REM) + M.adjustStaminaLoss(-5*REAGENTS_EFFECT_MULTIPLIER) ..() -/datum/reagent/medicine/stimulative_agent/reagent_deleted(mob/living/M) +/datum/reagent/medicine/stimulative_agent/on_mob_delete(mob/living/M) M.status_flags &= ~GOTTAGOFAST ..() /datum/reagent/medicine/stimulative_agent/overdose_process(mob/living/M, severity) if(prob(33)) - M.adjustStaminaLoss(2.5*REM) - M.adjustToxLoss(1*REM) + M.adjustStaminaLoss(2.5*REAGENTS_EFFECT_MULTIPLIER) + M.adjustToxLoss(1*REAGENTS_EFFECT_MULTIPLIER) M.AdjustLoseBreath(1) -/datum/reagent/insulin +/datum/reagent/medicine/insulin name = "Insulin" id = "insulin" description = "A hormone generated by the pancreas responsible for metabolizing carbohydrates and fat in the bloodstream." reagent_state = LIQUID color = "#C8A5DC" -/datum/reagent/insulin/on_mob_life(mob/living/M) +/datum/reagent/medicine/insulin/on_mob_life(mob/living/M) M.reagents.remove_reagent("sugar", 5) ..() - -/datum/reagent/simethicone +/datum/reagent/medicine/simethicone name = "Simethicone" id = "simethicone" description = "This strange liquid seems to have no bubbles on the surface." color = "#14AA46" -/datum/chemical_reaction/Simethicone - name = "Simethicone" - id = "simethicone" - result = "simethicone" - required_reagents = list("hydrogen" = 1, "chlorine" = 1, "silicon" = 1, "oxygen" = 1) - result_amount = 4 - - -/datum/reagent/teporone +/datum/reagent/medicine/teporone name = "Teporone" id = "teporone" description = "This experimental plasma-based compound seems to regulate body temperature." @@ -845,30 +784,21 @@ addiction_chance = 20 overdose_threshold = 50 -/datum/reagent/teporone/on_mob_life(mob/living/M) +/datum/reagent/medicine/teporone/on_mob_life(mob/living/M) if(M.bodytemperature > 310) M.bodytemperature = max(310, M.bodytemperature - (40 * TEMPERATURE_DAMAGE_COEFFICIENT)) else if(M.bodytemperature < 311) M.bodytemperature = min(310, M.bodytemperature + (40 * TEMPERATURE_DAMAGE_COEFFICIENT)) ..() -/datum/chemical_reaction/teporone - name = "Teporone" - id = "teporone" - result = "teporone" - required_reagents = list("acetone" = 1, "silicon" = 1, "plasma" = 1) - result_amount = 2 - mix_message = "The mixture turns an odd lavender color." - mix_sound = 'sound/goonstation/misc/drinkfizz.ogg' - -/datum/reagent/haloperidol +/datum/reagent/medicine/haloperidol name = "Haloperidol" id = "haloperidol" description = "Haloperidol is a powerful antipsychotic and sedative. Will help control psychiatric problems, but may cause brain damage." reagent_state = LIQUID color = "#FFDCFF" -/datum/reagent/haloperidol/on_mob_life(mob/living/M) +/datum/reagent/medicine/haloperidol/on_mob_life(mob/living/M) M.reagents.remove_reagent("crank", 5) M.reagents.remove_reagent("methamphetamine", 5) M.reagents.remove_reagent("space_drugs", 5) @@ -890,23 +820,14 @@ M.adjustBrainLoss(1) ..() -/datum/chemical_reaction/haloperidol - name = "Haloperidol" - id = "haloperidol" - result = "haloperidol" - required_reagents = list("chlorine" = 1, "fluorine" = 1, "aluminum" = 1, "potass_iodide" = 1, "oil" = 1) - result_amount = 4 - mix_message = "The chemicals mix into an odd pink slush." - - -/datum/reagent/ether +/datum/reagent/medicine/ether name = "Ether" id = "ether" description = "A strong anesthetic and sedative." reagent_state = LIQUID color = "#96DEDE" -/datum/reagent/ether/on_mob_life(mob/living/M) +/datum/reagent/medicine/ether/on_mob_life(mob/living/M) M.AdjustJitter(-25) switch(current_cycle) if(1 to 15) @@ -919,95 +840,24 @@ M.Drowsy(20) ..() -/datum/chemical_reaction/ether - name = "Ether" - id = "ether" - result = "ether" - required_reagents = list("sacid" = 1, "ethanol" = 1, "oxygen" = 1) - result_amount = 1 - mix_message = "The mixture yields a pungent odor, which makes you tired." - -////////////////////////////// -// Synth-Meds // -////////////////////////////// - -//Degreaser: Mild Purgative / Lube Remover -/datum/reagent/degreaser - name = "Degreaser" - id = "degreaser" - description = "An industrial degreaser which can be used to clean residual build-up from machinery and surfaces." - reagent_state = LIQUID - color = "#CC7A00" - process_flags = SYNTHETIC - -/datum/chemical_reaction/degreaser - name = "Degreaser" - id = "degreaser" - result = "degreaser" - required_reagents = list("oil" = 1, "sterilizine" = 1) - result_amount = 2 - -/datum/reagent/degreaser/reaction_turf(turf/simulated/T, volume) - if(volume >= 1 && istype(T)) - if(T.wet) - T.MakeDry(TURF_WET_LUBE) - -/datum/reagent/degreaser/on_mob_life(mob/living/M) - if(prob(50)) //Same effects as coffee, to help purge ill effects like paralysis - M.AdjustParalysis(-1) - M.AdjustStunned(-1) - M.AdjustWeakened(-1) - M.AdjustConfused(-5) - for(var/datum/reagent/R in M.reagents.reagent_list) - if(R != src) - if(R.id == "ultralube" || R.id == "lube") - //Flushes lube and ultra-lube even faster than other chems - M.reagents.remove_reagent(R.id, 5) - else - M.reagents.remove_reagent(R.id,1) - ..() - -//Liquid Solder: Mannitol -/datum/reagent/liquid_solder - name = "Liquid Solder" - id = "liquid_solder" - description = "A solution formulated to clean and repair damaged connections in posibrains while in use." - reagent_state = LIQUID - color = "#D7B395" - process_flags = SYNTHETIC - -/datum/reagent/liquid_solder/on_mob_life(mob/living/M) - M.adjustBrainLoss(-3) - ..() - -/datum/chemical_reaction/liquid_solder - name = "Liquid Solder" - id = "liquid_solder" - result = "liquid_solder" - required_reagents = list("ethanol" = 1, "copper" = 1, "silver" = 1) - result_amount = 3 - min_temp = 370 - mix_message = "The solution gently swirls with a metallic sheen." - - /datum/reagent/medicine/syndicate_nanites //Used exclusively by Syndicate medical cyborgs name = "Restorative Nanites" id = "syndicate_nanites" description = "Miniature medical robots that swiftly restore bodily damage. May begin to attack their host's cells in high amounts." reagent_state = SOLID color = "#555555" + can_synth = 0 /datum/reagent/medicine/syndicate_nanites/on_mob_life(mob/living/M) - M.adjustBruteLoss(-5*REM) //A ton of healing - this is a 50 telecrystal investment. - M.adjustFireLoss(-5*REM) - M.adjustOxyLoss(-15*REM) - M.adjustToxLoss(-5*REM) - M.adjustBrainLoss(-15*REM) - M.adjustCloneLoss(-3*REM) + M.adjustBruteLoss(-5*REAGENTS_EFFECT_MULTIPLIER) //A ton of healing - this is a 50 telecrystal investment. + M.adjustFireLoss(-5*REAGENTS_EFFECT_MULTIPLIER) + M.adjustOxyLoss(-15*REAGENTS_EFFECT_MULTIPLIER) + M.adjustToxLoss(-5*REAGENTS_EFFECT_MULTIPLIER) + M.adjustBrainLoss(-15*REAGENTS_EFFECT_MULTIPLIER) + M.adjustCloneLoss(-3*REAGENTS_EFFECT_MULTIPLIER) ..() - -/datum/reagent/omnizine_diluted +/datum/reagent/medicine/omnizine_diluted name = "Diluted Omnizine" id = "weak_omnizine" description = "Slowly heals all damage types. A far weaker substitute than actual omnizine." @@ -1016,14 +866,14 @@ overdose_threshold = 30 metabolization_rate = 0.1 -/datum/reagent/omnizine_diluted/on_mob_life(mob/living/M) - M.adjustToxLoss(-0.5*REM) - M.adjustOxyLoss(-0.5*REM) - M.adjustBruteLoss(-0.5*REM) - M.adjustFireLoss(-0.5*REM) +/datum/reagent/medicine/omnizine_diluted/on_mob_life(mob/living/M) + M.adjustToxLoss(-0.5*REAGENTS_EFFECT_MULTIPLIER) + M.adjustOxyLoss(-0.5*REAGENTS_EFFECT_MULTIPLIER) + M.adjustBruteLoss(-0.5*REAGENTS_EFFECT_MULTIPLIER) + M.adjustFireLoss(-0.5*REAGENTS_EFFECT_MULTIPLIER) ..() -/datum/reagent/omnizine_diluted/overdose_process(mob/living/M, severity) +/datum/reagent/medicine/omnizine_diluted/overdose_process(mob/living/M, severity) var/effect = ..() if(severity == 1) //lesser M.stuttering += 1 @@ -1056,3 +906,68 @@ M.visible_message("[M] stumbles and staggers.") M.Dizzy(5) M.Weaken(3) + +//virus-specific symptom reagents + +/datum/reagent/medicine/synaphydramine + name = "Diphen-Synaptizine" + id = "synaphydramine" + description = "Reduces drowsiness and hallucinations while also purging histamine from the body." + color = "#EC536D" // rgb: 236, 83, 109 + +/datum/reagent/medicine/synaphydramine/on_mob_life(mob/living/M) + M.AdjustDrowsy(-5) + if(holder.has_reagent("lsd")) + holder.remove_reagent("lsd", 5) + if(holder.has_reagent("histamine")) + holder.remove_reagent("histamine", 5) + M.AdjustHallucinate(-10) + if(prob(30)) + M.adjustToxLoss(1) + ..() + +////////////////////////////// +// Synth-Meds // +////////////////////////////// + +//Degreaser: Mild Purgative / Lube Remover +/datum/reagent/medicine/degreaser + name = "Degreaser" + id = "degreaser" + description = "An industrial degreaser which can be used to clean residual build-up from machinery and surfaces." + reagent_state = LIQUID + color = "#CC7A00" + process_flags = SYNTHETIC + +/datum/reagent/medicine/degreaser/on_mob_life(mob/living/M) + if(prob(50)) //Same effects as coffee, to help purge ill effects like paralysis + M.AdjustParalysis(-1) + M.AdjustStunned(-1) + M.AdjustWeakened(-1) + M.AdjustConfused(-5) + for(var/datum/reagent/R in M.reagents.reagent_list) + if(R != src) + if(R.id == "ultralube" || R.id == "lube") + //Flushes lube and ultra-lube even faster than other chems + M.reagents.remove_reagent(R.id, 5) + else + M.reagents.remove_reagent(R.id,1) + ..() + +/datum/reagent/medicine/degreaser/reaction_turf(turf/simulated/T, volume) + if(volume >= 1 && istype(T)) + if(T.wet) + T.MakeDry(TURF_WET_LUBE) + +//Liquid Solder: Mannitol +/datum/reagent/medicine/liquid_solder + name = "Liquid Solder" + id = "liquid_solder" + description = "A solution formulated to clean and repair damaged connections in posibrains while in use." + reagent_state = LIQUID + color = "#D7B395" + process_flags = SYNTHETIC + +/datum/reagent/medicine/liquid_solder/on_mob_life(mob/living/M) + M.adjustBrainLoss(-3) + ..() \ No newline at end of file diff --git a/code/modules/reagents/newchem/other.dm b/code/modules/reagents/chemistry/reagents/misc.dm similarity index 57% rename from code/modules/reagents/newchem/other.dm rename to code/modules/reagents/chemistry/reagents/misc.dm index 2ff4a18c3d0..bb386d0215c 100644 --- a/code/modules/reagents/newchem/other.dm +++ b/code/modules/reagents/chemistry/reagents/misc.dm @@ -1,9 +1,189 @@ -#define SOLID 1 -#define LIQUID 2 -#define GAS 3 -#define REM REAGENTS_EFFECT_MULTIPLIER +/*/datum/reagent/silicate + name = "Silicate" + id = "silicate" + description = "A compound that can be used to reinforce glass." + reagent_state = LIQUID + color = "#C7FFFF" // rgb: 199, 255, 255 -var/list/random_color_list = list("#00aedb","#a200ff","#f47835","#d41243","#d11141","#00b159","#00aedb","#f37735","#ffc425","#008744","#0057e7","#d62d20","#ffa700") +/datum/reagent/silicate/reaction_obj(obj/O, volume) + if(istype(O, /obj/structure/window)) + if(O:silicate <= 200) + + O:silicate += volume + O:health += volume * 3 + + if(!O:silicateIcon) + var/icon/I = icon(O.icon,O.icon_state,O.dir) + + var/r = (volume / 100) + 1 + var/g = (volume / 70) + 1 + var/b = (volume / 50) + 1 + I.SetIntensity(r,g,b) + O.icon = I + O:silicateIcon = I + else + var/icon/I = O:silicateIcon + + var/r = (volume / 100) + 1 + var/g = (volume / 70) + 1 + var/b = (volume / 50) + 1 + I.SetIntensity(r,g,b) + O.icon = I + O:silicateIcon = I */ + + +/datum/reagent/oxygen + name = "Oxygen" + id = "oxygen" + description = "A colorless, odorless gas." + reagent_state = GAS + color = "#808080" // rgb: 128, 128, 128 + + +/datum/reagent/nitrogen + name = "Nitrogen" + id = "nitrogen" + description = "A colorless, odorless, tasteless gas." + reagent_state = GAS + color = "#808080" // rgb: 128, 128, 128 + + +/datum/reagent/hydrogen + name = "Hydrogen" + id = "hydrogen" + description = "A colorless, odorless, nonmetallic, tasteless, highly combustible diatomic gas." + reagent_state = GAS + color = "#808080" // rgb: 128, 128, 128 + + +/datum/reagent/potassium + name = "Potassium" + id = "potassium" + description = "A soft, low-melting solid that can easily be cut with a knife. Reacts violently with water." + reagent_state = SOLID + color = "#A0A0A0" // rgb: 160, 160, 160 + + +/datum/reagent/sulfur + name = "Sulfur" + id = "sulfur" + description = "A chemical element." + reagent_state = SOLID + color = "#BF8C00" // rgb: 191, 140, 0 + + +/datum/reagent/sodium + name = "Sodium" + id = "sodium" + description = "A chemical element." + reagent_state = SOLID + color = "#808080" // rgb: 128, 128, 128 + + +/datum/reagent/phosphorus + name = "Phosphorus" + id = "phosphorus" + description = "A chemical element." + reagent_state = SOLID + color = "#832828" // rgb: 131, 40, 40 + + +/datum/reagent/carbon + name = "Carbon" + id = "carbon" + description = "A chemical element." + reagent_state = SOLID + color = "#1C1300" // rgb: 30, 20, 0 + +/datum/reagent/carbon/reaction_turf(turf/T, volume) + if(!istype(T, /turf/space) && !(locate(/obj/effect/decal/cleanable/dirt) in T)) // Only add one dirt per turf. Was causing people to crash. + new /obj/effect/decal/cleanable/dirt(T) + +/datum/reagent/gold + name = "Gold" + id = "gold" + description = "Gold is a dense, soft, shiny metal and the most malleable and ductile metal known." + reagent_state = SOLID + color = "#F7C430" // rgb: 247, 196, 48 + + +/datum/reagent/silver + name = "Silver" + id = "silver" + description = "A lustrous metallic element regarded as one of the precious metals." + reagent_state = SOLID + color = "#D0D0D0" // rgb: 208, 208, 208 + + +/datum/reagent/aluminum + name = "Aluminum" + id = "aluminum" + description = "A silvery white and ductile member of the boron group of chemical elements." + reagent_state = SOLID + color = "#A8A8A8" // rgb: 168, 168, 168 + + +/datum/reagent/silicon + name = "Silicon" + id = "silicon" + description = "A tetravalent metalloid, silicon is less reactive than its chemical analog carbon." + reagent_state = SOLID + color = "#A8A8A8" // rgb: 168, 168, 168 + + +/datum/reagent/copper + name = "Copper" + id = "copper" + description = "A highly ductile metal." + color = "#6E3B08" // rgb: 110, 59, 8 + + +/datum/reagent/iron + name = "Iron" + id = "iron" + description = "Pure iron is a metal." + reagent_state = SOLID + color = "#C8A5DC" // rgb: 200, 165, 220 + +/datum/reagent/iron/on_mob_life(mob/living/M) + if(ishuman(M)) + var/mob/living/carbon/human/H = M + if(!H.species.exotic_blood && !(H.species.flags & NO_BLOOD)) + H.vessel.add_reagent("blood", 0.8) + ..() + +//foam +/datum/reagent/fluorosurfactant + name = "Fluorosurfactant" + id = "fluorosurfactant" + description = "A perfluoronated sulfonic acid that forms a foam when mixed with water." + reagent_state = LIQUID + color = "#9E6B38" // rgb: 158, 107, 56 + +// metal foaming agent +// this is lithium hydride. Add other recipies (e.g. LiH + H2O -> LiOH + H2) eventually +/datum/reagent/ammonia + name = "Ammonia" + id = "ammonia" + description = "A caustic substance commonly used in fertilizer or household cleaners." + reagent_state = GAS + color = "#404030" // rgb: 64, 64, 48 + +/datum/reagent/diethylamine + name = "Diethylamine" + id = "diethylamine" + description = "A secondary amine, useful as a plant nutrient and as building block for other compounds." + reagent_state = LIQUID + color = "#322D00" + +// Allows you to make planks from any plant that has this reagent in it. +// Also vines with this reagent are considered dense. +/datum/reagent/woodpulp + name = "Wood Pulp" + id = "woodpulp" + description = "A mass of wood fibers." + reagent_state = LIQUID + color = "#B97A57" /datum/reagent/oil name = "Oil" @@ -64,49 +244,12 @@ var/list/random_color_list = list("#00aedb","#a200ff","#f47835","#d41243","#d111 M.adjustToxLoss(1.5) ..() -/datum/chemical_reaction/acetone - name = "acetone" - id = "acetone" - result = "acetone" - required_reagents = list("oil" = 1, "fuel" = 1, "oxygen" = 1) - result_amount = 3 - mix_message = "The smell of paint thinner assaults you as the solution bubbles." - -/datum/chemical_reaction/carpet - name = "carpet" - id = "carpet" - result = "carpet" - required_reagents = list("fungus" = 1, "blood" = 1) - result_amount = 2 - mix_message = "The substance turns thick and stiff, yet soft." - - -/datum/chemical_reaction/oil - name = "Oil" - id = "oil" - result = "oil" - required_reagents = list("fuel" = 1, "carbon" = 1, "hydrogen" = 1) - result_amount = 3 - mix_message = "An iridescent black chemical forms in the container." - -/datum/chemical_reaction/phenol - name = "phenol" - id = "phenol" - result = "phenol" - required_reagents = list("water" = 1, "chlorine" = 1, "oil" = 1) - result_amount = 3 - mix_message = "The mixture bubbles and gives off an unpleasant medicinal odor." - mix_sound = 'sound/goonstation/misc/drinkfizz.ogg' - -/datum/chemical_reaction/ash - name = "Ash" - id = "ash" - result = "ash" - required_reagents = list("oil" = 1) - result_amount = 0.5 - min_temp = 480 - mix_sound = null - no_message = 1 +/datum/reagent/saltpetre + name = "Saltpetre" + id = "saltpetre" + description = "Volatile." + reagent_state = LIQUID + color = "#60A584" // rgb: 96, 165, 132 /datum/reagent/colorful_reagent name = "Colorful Reagent" @@ -115,14 +258,6 @@ var/list/random_color_list = list("#00aedb","#a200ff","#f47835","#d41243","#d111 reagent_state = LIQUID color = "#FFFFFF" -/datum/chemical_reaction/colorful_reagent - name = "colorful_reagent" - id = "colorful_reagent" - result = "colorful_reagent" - required_reagents = list("plasma" = 1, "radium" = 1, "space_drugs" = 1, "cryoxadone" = 1, "triple_citrus" = 1, "stabilizing_agent" = 1) - result_amount = 6 - mix_message = "The substance flashes multiple colors and emits the smell of a pocket protector." - /datum/reagent/colorful_reagent/reaction_mob(mob/living/simple_animal/M, method=TOUCH, volume) if(isanimal(M)) M.color = pick(random_color_list) @@ -138,40 +273,6 @@ var/list/random_color_list = list("#00aedb","#a200ff","#f47835","#d41243","#d111 T.color = pick(random_color_list) ..() -/datum/chemical_reaction/corgium - name = "corgium" - id = "corgium" - result = null - required_reagents = list("nutriment" = 1, "colorful_reagent" = 1, "strange_reagent" = 1, "blood" = 1) - result_amount = 3 - min_temp = 374 - -/datum/reagent/corgium - name = "Corgium" - id = "corgium" - description = "Corgi in liquid form. Don't ask." - reagent_state = LIQUID - color = "#F9A635" - -/datum/chemical_reaction/corgium/on_reaction(datum/reagents/holder, created_volume) - var/location = get_turf(holder.my_atom) - new /mob/living/simple_animal/pet/corgi(location) - ..() - -/datum/chemical_reaction/flaptonium - name = "Flaptonium" - id = "flaptonium" - result = null - required_reagents = list("egg" = 1, "colorful_reagent" = 1, "chicken_soup" = 1, "strange_reagent" = 1, "blood" = 1) - result_amount = 5 - min_temp = 374 - mix_message = "The substance turns an airy sky-blue and foams up into a new shape." - -/datum/chemical_reaction/flaptonium/on_reaction(datum/reagents/holder, created_volume) - var/location = get_turf(holder.my_atom) - new /mob/living/simple_animal/parrot(location) - ..() - /datum/reagent/hair_dye name = "Quantum Hair Dye" id = "hair_dye" @@ -179,13 +280,6 @@ var/list/random_color_list = list("#00aedb","#a200ff","#f47835","#d41243","#d111 reagent_state = LIQUID color = "#960096" -/datum/chemical_reaction/hair_dye - name = "hair_dye" - id = "hair_dye" - result = "hair_dye" - required_reagents = list("colorful_reagent" = 1, "hairgrownium" = 1) - result_amount = 2 - /datum/reagent/hair_dye/reaction_mob(mob/living/M, volume) if(ishuman(M)) var/mob/living/carbon/human/H = M @@ -208,14 +302,6 @@ var/list/random_color_list = list("#00aedb","#a200ff","#f47835","#d41243","#d111 color = "#5DDA5D" penetrates_skin = 1 -/datum/chemical_reaction/hairgrownium - name = "hairgrownium" - id = "hairgrownium" - result = "hairgrownium" - required_reagents = list("carpet" = 1, "synthflesh" = 1, "ephedrine" = 1) - result_amount = 3 - mix_message = "The liquid becomes slightly hairy." - /datum/reagent/hairgrownium/reaction_mob(mob/living/M, volume) if(ishuman(M)) var/mob/living/carbon/human/H = M @@ -234,15 +320,6 @@ var/list/random_color_list = list("#00aedb","#a200ff","#f47835","#d41243","#d111 color = "#5DD95D" penetrates_skin = 1 - -/datum/chemical_reaction/super_hairgrownium - name = "Super Hairgrownium" - id = "super_hairgrownium" - result = "super_hairgrownium" - required_reagents = list("iron" = 1, "methamphetamine" = 1, "hairgrownium" = 1) - result_amount = 3 - mix_message = "The liquid becomes amazingly furry and smells peculiar." - /datum/reagent/super_hairgrownium/reaction_mob(mob/living/M, volume) if(ishuman(M)) var/mob/living/carbon/human/H = M @@ -275,14 +352,6 @@ var/list/random_color_list = list("#00aedb","#a200ff","#f47835","#d41243","#d111 reagent_state = GAS color = "#D06E27" -/datum/chemical_reaction/fartonium - name = "Fartonium" - id = "fartonium" - result = "fartonium" - required_reagents = list("fake_cheese" = 1, "beans" = 1, "????" = 1, "egg" = 1) - result_amount = 2 - mix_message = "The substance makes a little 'toot' noise and starts to smell pretty bad." - /datum/reagent/fartonium/on_mob_life(mob/living/M) if(prob(66)) M.emote("fart") @@ -299,49 +368,6 @@ var/list/random_color_list = list("#00aedb","#a200ff","#f47835","#d41243","#d111 M.adjustBruteLoss(4) ..() -/datum/chemical_reaction/soapification - name = "Soapification" - id = "soapification" - result = null - required_reagents = list("liquidgibs" = 10, "lye" = 10) // requires two scooped gib tiles - min_temp = 374 - result_amount = 1 - - -/datum/chemical_reaction/soapification/on_reaction(datum/reagents/holder, created_volume) - var/location = get_turf(holder.my_atom) - new /obj/item/weapon/soap/homemade(location) - -/datum/chemical_reaction/candlefication - name = "Candlefication" - id = "candlefication" - result = null - required_reagents = list("liquidgibs" = 5, "oxygen" = 5) // - min_temp = 374 - result_amount = 1 - -/datum/chemical_reaction/candlefication/on_reaction(datum/reagents/holder, created_volume) - var/location = get_turf(holder.my_atom) - new /obj/item/candle(location) - -/datum/chemical_reaction/meatification - name = "Meatification" - id = "meatification" - result = null - required_reagents = list("liquidgibs" = 10, "nutriment" = 10, "carbon" = 10) - result_amount = 1 - -/datum/chemical_reaction/meatification/on_reaction(datum/reagents/holder, created_volume) - var/location = get_turf(holder.my_atom) - new /obj/item/weapon/reagent_containers/food/snacks/meat/slab/meatproduct(location) - -/datum/chemical_reaction/lye - name = "lye" - id = "lye" - result = "lye" - required_reagents = list("sodium" = 1, "hydrogen" = 1, "oxygen" = 1) - result_amount = 3 - /datum/reagent/hugs name = "Pure hugs" id = "hugs" @@ -356,9 +382,6 @@ var/list/random_color_list = list("#00aedb","#a200ff","#f47835","#d41243","#d111 reagent_state = LIQUID color = "#FF83A5" -/datum/reagent/love/reaction_mob(mob/living/M, method=TOUCH, volume) - to_chat(M, "You feel loved!") - /datum/reagent/love/on_mob_life(mob/living/M) if(M.a_intent == I_HARM) M.a_intent = I_HELP @@ -378,13 +401,53 @@ var/list/random_color_list = list("#00aedb","#a200ff","#f47835","#d41243","#d111 break ..() -/datum/chemical_reaction/love - name = "pure love" - id = "love" - result = "love" - required_reagents = list("hugs" = 1, "chocolate" = 1) - result_amount = 2 - mix_message = "The substance gives off a lovely scent!" +/datum/reagent/love/reaction_mob(mob/living/M, method=TOUCH, volume) + to_chat(M, "You feel loved!") + +/datum/reagent/royal_bee_jelly + name = "royal bee jelly" + id = "royal_bee_jelly" + description = "Royal Bee Jelly, if injected into a Queen Space Bee said bee will split into two bees." + color = "#00ff80" + +/datum/reagent/royal_bee_jelly/on_mob_life(mob/living/M) + if(prob(2)) + M.say(pick("Bzzz...","BZZ BZZ","Bzzzzzzzzzzz...")) + ..() + +/datum/reagent/toxin/coffeepowder + name = "Coffee Grounds" + id = "coffeepowder" + description = "Finely ground Coffee beans, used to make coffee." + reagent_state = SOLID + color = "#5B2E0D" // rgb: 91, 46, 13 + +/datum/reagent/toxin/teapowder + name = "Ground Tea Leaves" + id = "teapowder" + description = "Finely shredded Tea leaves, used for making tea." + reagent_state = SOLID + color = "#7F8400" // rgb: 127, 132, 0 + +//Reagents used for plant fertilizers. +/datum/reagent/toxin/fertilizer + name = "fertilizer" + id = "fertilizer" + description = "A chemical mix good for growing plants with." + reagent_state = LIQUID + color = "#664330" // rgb: 102, 67, 48 + +/datum/reagent/toxin/fertilizer/eznutrient + name = "EZ Nutrient" + id = "eznutrient" + +/datum/reagent/toxin/fertilizer/left4zed + name = "Left-4-Zed" + id = "left4zed" + +/datum/reagent/toxin/fertilizer/robustharvest + name = "Robust Harvest" + id = "robustharvest" ///Alchemical Reagents @@ -421,22 +484,4 @@ var/list/random_color_list = list("#00aedb","#a200ff","#f47835","#d41243","#d111 id = "triplepiss" description = "Ewwwwwwwww." reagent_state = LIQUID - color = "#857400" - -/datum/reagent/royal_bee_jelly - name = "royal bee jelly" - id = "royal_bee_jelly" - description = "Royal Bee Jelly, if injected into a Queen Space Bee said bee will split into two bees." - color = "#00ff80" - -/datum/reagent/royal_bee_jelly/on_mob_life(mob/living/M) - if(prob(2)) - M.say(pick("Bzzz...","BZZ BZZ","Bzzzzzzzzzzz...")) - ..() - -/datum/chemical_reaction/royal_bee_jelly - name = "royal bee jelly" - id = "royal_bee_jelly" - result = "royal_bee_jelly" - required_reagents = list("mutagen" = 10, "honey" = 40) - result_amount = 5 \ No newline at end of file + color = "#857400" \ No newline at end of file diff --git a/code/modules/reagents/oldchem/reagents/reagents_paint.dm b/code/modules/reagents/chemistry/reagents/paint.dm similarity index 100% rename from code/modules/reagents/oldchem/reagents/reagents_paint.dm rename to code/modules/reagents/chemistry/reagents/paint.dm diff --git a/code/modules/reagents/newchem/paradise_pop.dm b/code/modules/reagents/chemistry/reagents/paradise_pop.dm similarity index 76% rename from code/modules/reagents/newchem/paradise_pop.dm rename to code/modules/reagents/chemistry/reagents/paradise_pop.dm index 055b96020db..17fdc2cb444 100644 --- a/code/modules/reagents/newchem/paradise_pop.dm +++ b/code/modules/reagents/chemistry/reagents/paradise_pop.dm @@ -1,4 +1,3 @@ - /* Paradise Pop reagents Created through the bottler machine via bottler_recipes, not through standard reactions @@ -10,7 +9,7 @@ //Paradise Punch: No effect, aside from maybe messages about how tasty it is or something -/datum/reagent/paradise_punch +/datum/reagent/consumable/drink/paradise_punch name = "Paradise Punch" id = "paradise_punch" description = "Tastes just how you'd think Paradise would if you could bottle it." @@ -18,14 +17,14 @@ color = "#cc0044" //Apple-pocalypse: Low chance to cause a goonchem vortex that pulls things within a very small radius (2 tiles?) towards the drinker -/datum/reagent/apple_pocalypse +/datum/reagent/consumable/drink/apple_pocalypse name = "Apple-pocalypse" id = "apple-pocalypse" description = "If doomsday came in fruit form, it'd probably be apples." reagent_state = LIQUID color = "#44FF44" -/datum/reagent/apple_pocalypse/on_mob_life(mob/living/M) +/datum/reagent/consumable/drink/apple_pocalypse/on_mob_life(mob/living/M) if(prob(1)) var/turf/simulated/T = get_turf(M) goonchem_vortex(T, 0, 2, 1) @@ -33,61 +32,61 @@ ..() //Berry Banned: This one is tasty and safe to drink, might have a low chance of healing a random damage type? -/datum/reagent/berry_banned +/datum/reagent/consumable/drink/berry_banned name = "Berry Banned" id = "berry_banned" description = "Reason for ban: Excessive Flavor." reagent_state = LIQUID color = "#FF44FF" -/datum/reagent/berry_banned/on_mob_life(mob/living/M) +/datum/reagent/consumable/drink/berry_banned/on_mob_life(mob/living/M) if(prob(10)) var/heal_type = rand(0, 5) //still prefer the string version switch(heal_type) if(0) - M.adjustBruteLoss(-0.5*REM) + M.adjustBruteLoss(-0.5*REAGENTS_EFFECT_MULTIPLIER) if(1) - M.adjustFireLoss(-0.5*REM) + M.adjustFireLoss(-0.5*REAGENTS_EFFECT_MULTIPLIER) if(2) - M.adjustToxLoss(-0.5*REM) + M.adjustToxLoss(-0.5*REAGENTS_EFFECT_MULTIPLIER) if(3) - M.adjustOxyLoss(-0.5*REM) + M.adjustOxyLoss(-0.5*REAGENTS_EFFECT_MULTIPLIER) if(4) - M.adjustCloneLoss(-0.5*REM) + M.adjustCloneLoss(-0.5*REAGENTS_EFFECT_MULTIPLIER) if(5) - M.adjustBrainLoss(-1*REM) + M.adjustBrainLoss(-1*REAGENTS_EFFECT_MULTIPLIER) to_chat(M, "You feel slightly rejuvinated!") ..() //Berry Banned 2: This one is tasty and toxic. Deals toxin damage and MAYBE plays the "BWOINK!" sound if it kills someone? -/datum/reagent/berry_banned2 +/datum/reagent/consumable/drink/berry_banned2 name = "Berry Banned" id = "berry_banned2" description = "Reason for ban: Excessive Flavor." reagent_state = LIQUID color = "#FF44FF" -/datum/reagent/berry_banned2/on_mob_life(mob/living/M) +/datum/reagent/consumable/drink/berry_banned2/on_mob_life(mob/living/M) if(prob(50)) - M.adjustToxLoss(2*REM) //double strength of poison berry juice alone, because it's concentrated (this is equal to the damage of normal toxin, less often) + M.adjustToxLoss(2*REAGENTS_EFFECT_MULTIPLIER) //double strength of poison berry juice alone, because it's concentrated (this is equal to the damage of normal toxin, less often) if(prob(10)) to_chat(M, "You feel slightly rejuvinated!") //meta this! ..() -/datum/reagent/berry_banned2/on_mob_death(mob/living/M) +/datum/reagent/consumable/drink/berry_banned2/on_mob_death(mob/living/M) M << sound('sound/effects/adminhelp.ogg',0,1,0,25) to_chat(M, "PM from-Administrator: BWOINK!") ..() //Blackeye Brew: Chance to make the drinker say greytider-themed things like "I thought clown was valid!" -/datum/reagent/blackeye_brew +/datum/reagent/consumable/drink/blackeye_brew name = "Blackeye Brew" id = "blackeye_brew" description = "Creamy, smooth flavor, just like the bald heads of the masses. Supposedly aged for 30 years." reagent_state = LIQUID color = "#4d2600" -/datum/reagent/blackeye_brew/on_mob_life(mob/living/M) +/datum/reagent/consumable/drink/blackeye_brew/on_mob_life(mob/living/M) if(prob(25)) var/list/tider_talk = list("CLOWN IS VALID, RIGHT?", "SHITMINS! SHITMINS! SHITMINS!", @@ -103,14 +102,14 @@ ..() //Grape Granade: causes the drinker to sometimes burp, has a low chance to cause a goonchem vortex that pushes things within a very small radius (1-2 tiles) away from the drinker -/datum/reagent/grape_granade +/datum/reagent/consumable/drink/grape_granade name = "Grape Granade" id = "grape_granade" description = "Exploding with grape flavor and a favorite among ERT members system-wide." reagent_state = LIQUID color = "#9933ff" -/datum/reagent/grape_granade/on_mob_life(mob/living/M) +/datum/reagent/consumable/drink/grape_granade/on_mob_life(mob/living/M) if(prob(1)) var/turf/simulated/T = get_turf(M) goonchem_vortex(T, 1, 1, 2) @@ -121,14 +120,14 @@ ..() //Meteor Malt: Sometimes causes screen shakes for the drinker like a meteor impact, low chance to add 1-5 units of a random mineral reagent to the drinker's blood (iron, copper, silver, gold, uranium, carbon, etc) -/datum/reagent/meteor_malt +/datum/reagent/consumable/drink/meteor_malt name = "Meteor Malt" id = "meteor_malt" description = "Soft drinks have been detected on collision course with your tastebuds." reagent_state = LIQUID color = "#cc9900" -/datum/reagent/meteor_malt/on_mob_life(mob/living/M) +/datum/reagent/consumable/drink/meteor_malt/on_mob_life(mob/living/M) if(prob(25)) M << sound('sound/effects/meteorimpact.ogg',0,1,0,25) shake_camera(M, 3, 1) @@ -136,4 +135,4 @@ var/amount = rand(1, 5) var/mineral = pick("copper", "iron", "gold", "carbon", "silver", "aluminum", "silicon", "sodiumchloride", "plasma") M.reagents.add_reagent(mineral, amount) - ..() + ..() \ No newline at end of file diff --git a/code/modules/reagents/chemistry/reagents/pyrotechnic.dm b/code/modules/reagents/chemistry/reagents/pyrotechnic.dm new file mode 100644 index 00000000000..a92982a8aaf --- /dev/null +++ b/code/modules/reagents/chemistry/reagents/pyrotechnic.dm @@ -0,0 +1,302 @@ +/datum/reagent/fuel + name = "Welding fuel" + id = "fuel" + description = "A highly flammable blend of basic hydrocarbons, mostly Acetylene. Useful for both welding and organic chemistry, and can be fortified into a heavier oil." + reagent_state = LIQUID + color = "#060606" + drink_icon = "dr_gibb_glass" + drink_name = "Glass of welder fuel" + drink_desc = "Unless you are an industrial tool, this is probably not safe for consumption." + +/datum/reagent/fuel/reaction_mob(mob/living/M, method=TOUCH, volume)//Splashing people with welding fuel to make them easy to ignite! + if(method == TOUCH) + M.adjust_fire_stacks(volume / 10) + return + ..() + +/datum/reagent/plasma + name = "Plasma" + id = "plasma" + description = "The liquid phase of an unusual extraterrestrial compound." + reagent_state = LIQUID + color = "#7A2B94" + +/datum/reagent/plasma/on_mob_life(mob/living/M) + M.adjustToxLoss(1*REAGENTS_EFFECT_MULTIPLIER) + if(holder.has_reagent("epinephrine")) + holder.remove_reagent("epinephrine", 2) + if(iscarbon(M)) + var/mob/living/carbon/C = M + C.adjustPlasma(10) + ..() + +/datum/reagent/plasma/reaction_mob(mob/living/M, method=TOUCH, volume)//Splashing people with plasma is stronger than fuel! + if(method == TOUCH) + M.adjust_fire_stacks(volume / 5) + ..() + + +/datum/reagent/thermite + name = "Thermite" + id = "thermite" + description = "Thermite produces an aluminothermic reaction known as a thermite reaction. Can be used to melt walls." + reagent_state = SOLID + color = "#673910" // rgb: 103, 57, 16 + process_flags = ORGANIC | SYNTHETIC + +/datum/reagent/thermite/reaction_turf(turf/simulated/wall/W, volume) + if(volume >= 5 && istype(W)) + W.thermite = 1 + W.overlays.Cut() + W.overlays = image('icons/effects/effects.dmi',icon_state = "thermite") + +/datum/reagent/glycerol + name = "Glycerol" + id = "glycerol" + description = "Glycerol is a simple polyol compound. Glycerol is sweet-tasting and of low toxicity." + reagent_state = LIQUID + color = "#808080" // rgb: 128, 128, 128 + +/datum/reagent/stabilizing_agent + name = "Stabilizing Agent" + id = "stabilizing_agent" + description = "A chemical that stabilises normally volatile compounds, preventing them from reacting immediately." + reagent_state = LIQUID + color = "#FFFF00" + +/datum/reagent/clf3 + name = "Chlorine Trifluoride" + id = "clf3" + description = "An extremely volatile substance, handle with the utmost care." + reagent_state = LIQUID + color = "#FF0000" + metabolization_rate = 4 + process_flags = ORGANIC | SYNTHETIC + +/datum/reagent/clf3/on_mob_life(mob/living/M) + M.adjust_fire_stacks(2) + var/burndmg = max(0.3*M.fire_stacks, 0.3) + M.adjustFireLoss(burndmg) + ..() + +/datum/reagent/clf3/reaction_turf(turf/simulated/T, volume) + if(istype(T, /turf/simulated/floor/plating)) + var/turf/simulated/floor/plating/F = T + if(prob(1)) + F.ChangeTurf(/turf/space) + if(istype(T, /turf/simulated/floor/)) + var/turf/simulated/floor/F = T + if(prob(volume/10)) + F.make_plating() + if(istype(F, /turf/simulated/floor/)) + new /obj/effect/hotspot(F) + if(istype(T, /turf/simulated/wall/)) + var/turf/simulated/wall/W = T + if(prob(volume/10)) + W.ChangeTurf(/turf/simulated/floor) + if(istype(T, /turf/simulated/shuttle/)) + new /obj/effect/hotspot(T) + +/datum/reagent/clf3/reaction_mob(mob/living/M, method=TOUCH, volume) + if(method == TOUCH) + M.adjust_fire_stacks(min(volume/5, 10)) + M.IgniteMob() + M.bodytemperature += 30 + +/datum/reagent/sorium + name = "Sorium" + id = "sorium" + description = "Sends everything flying from the detonation point." + reagent_state = LIQUID + color = "#FFA500" + +/datum/reagent/liquid_dark_matter + name = "Liquid Dark Matter" + id = "liquid_dark_matter" + description = "Sucks everything into the detonation point." + reagent_state = LIQUID + color = "#800080" + +/datum/reagent/blackpowder + name = "Black Powder" + id = "blackpowder" + description = "Explodes. Violently." + reagent_state = LIQUID + color = "#000000" + metabolization_rate = 0.05 + penetrates_skin = 1 + +/datum/reagent/blackpowder/reaction_turf(turf/T, volume) //oh shit + if(volume >= 5 && !istype(T, /turf/space)) + if(!locate(/obj/effect/decal/cleanable/dirt/blackpowder) in T) //let's not have hundreds of decals of black powder on the same turf + new /obj/effect/decal/cleanable/dirt/blackpowder(T) + +/* +/datum/reagent/blackpowder/on_ex_act() + var/location = get_turf(holder.my_atom) + var/datum/effect/system/spark_spread/s = new /datum/effect/system/spark_spread + s.set_up(2, 1, location) + s.start() + sleep(rand(10,15)) + blackpowder_detonate(holder, volume) + holder.remove_reagent("blackpowder", volume) + return */ + +/datum/reagent/flash_powder + name = "Flash Powder" + id = "flash_powder" + description = "Makes a very bright flash." + reagent_state = LIQUID + color = "#FFFF00" + +/datum/reagent/smoke_powder + name = "Smoke Powder" + id = "smoke_powder" + description = "Makes a large cloud of smoke that can carry reagents." + reagent_state = LIQUID + color = "#808080" + +/datum/reagent/sonic_powder + name = "Sonic Powder" + id = "sonic_powder" + description = "Makes a deafening noise." + reagent_state = LIQUID + color = "#0000FF" + +/datum/reagent/phlogiston + name = "Phlogiston" + id = "phlogiston" + description = "Catches you on fire and makes you ignite." + reagent_state = LIQUID + color = "#FF9999" + process_flags = ORGANIC | SYNTHETIC + +/datum/reagent/phlogiston/on_mob_life(mob/living/M) + M.adjust_fire_stacks(1) + var/burndmg = max(0.3*M.fire_stacks, 0.3) + M.adjustFireLoss(burndmg) + ..() + +/datum/reagent/phlogiston/reaction_mob(mob/living/M, method=TOUCH, volume) + M.IgniteMob() + ..() + +/datum/reagent/napalm + name = "Napalm" + id = "napalm" + description = "Very flammable." + reagent_state = LIQUID + color = "#FF9999" + process_flags = ORGANIC | SYNTHETIC + +/datum/reagent/napalm/on_mob_life(mob/living/M) + M.adjust_fire_stacks(1) + ..() + +/datum/reagent/napalm/reaction_mob(mob/living/M, method=TOUCH, volume) + if(method == TOUCH) + M.adjust_fire_stacks(min(volume/4, 20)) + +/datum/reagent/cryostylane + name = "Cryostylane" + id = "cryostylane" + description = "Comes into existence at 20K. As long as there is sufficient oxygen for it to react with, Cryostylane slowly cools all other reagents in the mob down to 0K." + color = "#B2B2FF" // rgb: 139, 166, 233 + process_flags = ORGANIC | SYNTHETIC + +/datum/reagent/cryostylane/on_mob_life(mob/living/M) //TODO: code freezing into an ice cube + if(M.reagents.has_reagent("oxygen")) + M.reagents.remove_reagent("oxygen", 1) + M.bodytemperature -= 30 + ..() + +/datum/reagent/cryostylane/on_tick() + if(holder.has_reagent("oxygen")) + holder.remove_reagent("oxygen", 1) + holder.chem_temp -= 10 + holder.handle_reactions() + ..() + +/datum/reagent/cryostylane/reaction_turf(turf/T, volume) + if(volume >= 5) + for(var/mob/living/carbon/slime/M in T) + M.adjustToxLoss(rand(15,30)) + +/datum/reagent/pyrosium + name = "Pyrosium" + id = "pyrosium" + description = "Comes into existence at 20K. As long as there is sufficient oxygen for it to react with, Pyrosium slowly cools all other reagents in the mob down to 0K." + color = "#B20000" // rgb: 139, 166, 233 + process_flags = ORGANIC | SYNTHETIC + +/datum/reagent/pyrosium/on_mob_life(mob/living/M) + if(M.reagents.has_reagent("oxygen")) + M.reagents.remove_reagent("oxygen", 1) + M.bodytemperature += 30 + ..() + +/datum/reagent/pyrosium/on_tick() + if(holder.has_reagent("oxygen")) + holder.remove_reagent("oxygen", 1) + holder.chem_temp += 10 + holder.handle_reactions() + ..() + +/datum/reagent/firefighting_foam + name = "Firefighting foam" + id = "firefighting_foam" + description = "Carbon Tetrachloride is a foam used for fire suppression." + reagent_state = LIQUID + color = "#A0A090" + var/cooling_temperature = 3 // more effective than water + +/datum/reagent/firefighting_foam/reaction_mob(mob/living/M, method=TOUCH, volume) +// Put out fire + if(method == TOUCH) + M.adjust_fire_stacks(-(volume / 5)) // more effective than water + M.ExtinguishMob() + +/datum/reagent/firefighting_foam/reaction_obj(obj/O, volume) + if(istype(O)) + O.extinguish() + +/datum/reagent/firefighting_foam/reaction_turf(turf/simulated/T, volume) + if(!istype(T)) + return + var/CT = cooling_temperature + new /obj/effect/decal/cleanable/flour/foam(T) //foam mess; clears up quickly. + var/hotspot = (locate(/obj/effect/hotspot) in T) + if(hotspot) + var/datum/gas_mixture/lowertemp = T.remove_air(T.air.total_moles()) + lowertemp.temperature = max(min(lowertemp.temperature-(CT*1000), lowertemp.temperature / CT), 0) + lowertemp.react() + T.assume_air(lowertemp) + qdel(hotspot) + +/datum/reagent/plasma_dust + name = "Plasma Dust" + id = "plasma_dust" + description = "A fine dust of plasma. This chemical has unusual mutagenic properties for viruses and slimes alike." + color = "#500064" // rgb: 80, 0, 100 + +/datum/reagent/plasma_dust/on_mob_life(mob/living/M) + M.adjustToxLoss(3) + if(iscarbon(M)) + var/mob/living/carbon/C = M + C.adjustPlasma(20) + ..() + +/datum/reagent/plasma_dust/reaction_obj(obj/O, volume) + if((!O) || (!volume)) + return 0 + O.atmos_spawn_air(SPAWN_TOXINS|SPAWN_20C, volume) + +/datum/reagent/plasma_dust/reaction_turf(turf/simulated/T, volume) + if(istype(T)) + T.atmos_spawn_air(SPAWN_TOXINS|SPAWN_20C, volume) + +/datum/reagent/plasma_dust/reaction_mob(mob/living/M, method=TOUCH, volume)//Splashing people with plasma dust is stronger than fuel! + if(method == TOUCH) + M.adjust_fire_stacks(volume / 5) + return + ..() \ No newline at end of file diff --git a/code/modules/reagents/newchem/toxins.dm b/code/modules/reagents/chemistry/reagents/toxins.dm similarity index 68% rename from code/modules/reagents/newchem/toxins.dm rename to code/modules/reagents/chemistry/reagents/toxins.dm index d8e8205b1f7..8b575be41a5 100644 --- a/code/modules/reagents/newchem/toxins.dm +++ b/code/modules/reagents/chemistry/reagents/toxins.dm @@ -1,8 +1,336 @@ -#define SOLID 1 -#define LIQUID 2 -#define GAS 3 +/datum/reagent/toxin + name = "Toxin" + id = "toxin" + description = "A Toxic chemical." + reagent_state = LIQUID + color = "#CF3600" // rgb: 207, 54, 0 -#define REM REAGENTS_EFFECT_MULTIPLIER +/datum/reagent/toxin/on_mob_life(mob/living/M) + M.adjustToxLoss(2) + ..() + +/datum/reagent/spider_venom + name = "Spider venom" + id = "spidertoxin" + description = "A toxic venom injected by spacefaring arachnids." + reagent_state = LIQUID + color = "#CF3600" // rgb: 207, 54, 0 + +/datum/reagent/spider_venom/on_mob_life(mob/living/M) + M.adjustToxLoss(1.5) + ..() + +/datum/reagent/plasticide + name = "Plasticide" + id = "plasticide" + description = "Liquid plastic, do not eat." + reagent_state = LIQUID + color = "#CF3600" // rgb: 207, 54, 0 + +/datum/reagent/plasticide/on_mob_life(mob/living/M) + M.adjustToxLoss(1.5) + ..() + + +/datum/reagent/minttoxin + name = "Mint Toxin" + id = "minttoxin" + description = "Useful for dealing with undesirable customers." + reagent_state = LIQUID + color = "#CF3600" // rgb: 207, 54, 0 + +/datum/reagent/minttoxin/on_mob_life(mob/living/M) + if(FAT in M.mutations) + M.gib() + ..() + +/datum/reagent/slimejelly + name = "Slime Jelly" + id = "slimejelly" + description = "A gooey semi-liquid produced from one of the deadliest lifeforms in existence. SO REAL." + reagent_state = LIQUID + color = "#801E28" // rgb: 128, 30, 40 + +/datum/reagent/slimejelly/on_mob_life(mob/living/M) + if(prob(10)) + to_chat(M, "Your insides are burning!") + M.adjustToxLoss(rand(20,60)*REAGENTS_EFFECT_MULTIPLIER) + else if(prob(40)) + M.adjustBruteLoss(-5*REAGENTS_EFFECT_MULTIPLIER) + ..() + +/datum/reagent/slimetoxin + name = "Mutation Toxin" + id = "mutationtoxin" + description = "A corruptive toxin produced by slimes." + reagent_state = LIQUID + color = "#13BC5E" // rgb: 19, 188, 94 + can_synth = 0 + +/datum/reagent/slimetoxin/on_mob_life(mob/living/M) + if(ishuman(M)) + var/mob/living/carbon/human/human = M + if(human.species.name != "Shadow") + to_chat(M, "Your flesh rapidly mutates!") + to_chat(M, "You are now a Shadow Person, a mutant race of darkness-dwelling humanoids.") + to_chat(M, "Your body reacts violently to light. \green However, it naturally heals in darkness.") + to_chat(M, "Aside from your new traits, you are mentally unchanged and retain your prior obligations.") + human.set_species("Shadow") + ..() + +/datum/reagent/aslimetoxin + name = "Advanced Mutation Toxin" + id = "amutationtoxin" + description = "An advanced corruptive toxin produced by slimes." + reagent_state = LIQUID + color = "#13BC5E" // rgb: 19, 188, 94 + can_synth = 0 + +/datum/reagent/aslimetoxin/reaction_mob(mob/living/M, method=TOUCH, volume) + if(method != TOUCH) + M.ForceContractDisease(new /datum/disease/transformation/slime(0)) + + +/datum/reagent/mercury + name = "Mercury" + id = "mercury" + description = "A chemical element." + reagent_state = LIQUID + color = "#484848" // rgb: 72, 72, 72 + metabolization_rate = 0.2 + penetrates_skin = 1 + +/datum/reagent/mercury/on_mob_life(mob/living/M) + if(prob(70)) + M.adjustBrainLoss(1) + ..() + +/datum/reagent/chlorine + name = "Chlorine" + id = "chlorine" + description = "A chemical element." + reagent_state = GAS + color = "#808080" // rgb: 128, 128, 128 + penetrates_skin = 1 + process_flags = ORGANIC | SYNTHETIC + +/datum/reagent/chlorine/on_mob_life(mob/living/M) + M.adjustFireLoss(1) + ..() + +/datum/reagent/fluorine + name = "Fluorine" + id = "fluorine" + description = "A highly-reactive chemical element." + reagent_state = GAS + color = "#6A6054" + penetrates_skin = 1 + process_flags = ORGANIC | SYNTHETIC + +/datum/reagent/fluorine/on_mob_life(mob/living/M) + M.adjustFireLoss(1) + M.adjustToxLoss(1*REAGENTS_EFFECT_MULTIPLIER) + ..() + +/datum/reagent/radium + name = "Radium" + id = "radium" + description = "Radium is an alkaline earth metal. It is extremely radioactive." + reagent_state = SOLID + color = "#C7C7C7" // rgb: 199,199,199 + penetrates_skin = 1 + +/datum/reagent/radium/on_mob_life(mob/living/M) + if(M.radiation < 80) + M.apply_effect(4, IRRADIATE, negate_armor = 1) + ..() + +/datum/reagent/radium/reaction_turf(turf/T, volume) + if(volume >= 3 && !istype(T, /turf/space)) + new /obj/effect/decal/cleanable/greenglow(T) + +/datum/reagent/mutagen + name = "Unstable mutagen" + id = "mutagen" + description = "Might cause unpredictable mutations. Keep away from children." + reagent_state = LIQUID + color = "#04DF27" + metabolization_rate = 0.3 + +/datum/reagent/mutagen/reaction_mob(mob/living/M, method=TOUCH, volume) + if(!..()) + return + if(!M.dna) + return //No robots, AIs, aliens, Ians or other mobs should be affected by this. + if((method==TOUCH && prob(33)) || method==INGEST) + randmutb(M) + domutcheck(M, null) + M.UpdateAppearance() + +/datum/reagent/mutagen/on_mob_life(mob/living/M) + if(!M.dna) + return //No robots, AIs, aliens, Ians or other mobs should be affected by this. + M.apply_effect(2*REAGENTS_EFFECT_MULTIPLIER, IRRADIATE, negate_armor = 1) + if(prob(4)) + randmutb(M) + ..() + + +/datum/reagent/uranium + name ="Uranium" + id = "uranium" + description = "A silvery-white metallic chemical element in the actinide series, weakly radioactive." + reagent_state = SOLID + color = "#B8B8C0" // rgb: 184, 184, 192 + +/datum/reagent/uranium/on_mob_life(mob/living/M) + M.apply_effect(2, IRRADIATE, negate_armor = 1) + ..() + +/datum/reagent/uranium/reaction_turf(turf/T, volume) + if(volume >= 3 && !istype(T, /turf/space)) + new /obj/effect/decal/cleanable/greenglow(T) + + +/datum/reagent/lexorin + name = "Lexorin" + id = "lexorin" + description = "Lexorin temporarily stops respiration. Causes tissue damage." + reagent_state = LIQUID + color = "#52685D" + metabolization_rate = 0.2 + +/datum/reagent/lexorin/on_mob_life(mob/living/M) + M.adjustToxLoss(1) + ..() + + +/datum/reagent/sacid + name = "Sulphuric acid" + id = "sacid" + description = "A strong mineral acid with the molecular formula H2SO4." + reagent_state = LIQUID + color = "#00D72B" + process_flags = ORGANIC | SYNTHETIC + +/datum/reagent/sacid/on_mob_life(mob/living/M) + M.adjustFireLoss(1) + ..() + +/datum/reagent/sacid/reaction_mob(mob/living/M, method=TOUCH, volume) + if(method == TOUCH) + if(ishuman(M)) + var/mob/living/carbon/human/H = M + + if(volume > 25) + + if(H.wear_mask) + to_chat(H, "Your mask protects you from the acid!") + return + + if(H.head) + to_chat(H, "Your helmet protects you from the acid!") + return + + if(!M.unacidable) + if(prob(75)) + var/obj/item/organ/external/affecting = H.get_organ("head") + if(affecting) + affecting.take_damage(5, 10) + H.UpdateDamageIcon() + H.emote("scream") + else + M.take_organ_damage(5,10) + else + M.take_organ_damage(5,10) + + if(method == INGEST) + if(ishuman(M)) + var/mob/living/carbon/human/H = M + + if(volume < 10) + to_chat(M, "The greenish acidic substance stings you, but isn't concentrated enough to harm you!") + + if(volume >=10 && volume <=25) + if(!H.unacidable) + M.take_organ_damage(0,min(max(volume-10,2)*2,20)) + M.emote("scream") + + + if(volume > 25) + if(!M.unacidable) + if(prob(75)) + var/obj/item/organ/external/affecting = H.get_organ("head") + if(affecting) + affecting.take_damage(0, 20) + H.UpdateDamageIcon() + H.emote("scream") + else + M.take_organ_damage(0,20) + +/datum/reagent/sacid/reaction_obj(obj/O, volume) + if((istype(O,/obj/item) || istype(O,/obj/effect/glowshroom)) && prob(40)) + if(!O.unacidable) + var/obj/effect/decal/cleanable/molten_item/I = new/obj/effect/decal/cleanable/molten_item(O.loc) + I.desc = "Looks like this was \an [O] some time ago." + O.visible_message("[O] melts.") + qdel(O) + +/datum/reagent/carpotoxin + name = "Carpotoxin" + id = "carpotoxin" + description = "A deadly neurotoxin produced by the dreaded spess carp." + reagent_state = LIQUID + color = "#003333" // rgb: 0, 51, 51 + +/datum/reagent/carpotoxin/on_mob_life(mob/living/M) + M.adjustToxLoss(2*REAGENTS_EFFECT_MULTIPLIER) + ..() + +/datum/reagent/staminatoxin + name = "Tirizene" + id = "tirizene" + description = "A toxin that affects the stamina of a person when injected into the bloodstream." + reagent_state = LIQUID + color = "#6E2828" + data = 13 + +/datum/reagent/staminatoxin/on_mob_life(mob/living/M) + M.adjustStaminaLoss(REAGENTS_EFFECT_MULTIPLIER * data) + data = max(data - 1, 3) + ..() + + +/datum/reagent/spore + name = "Spore Toxin" + id = "spore" + description = "A natural toxin produced by blob spores that inhibits vision when ingested." + color = "#9ACD32" + +/datum/reagent/spores/on_mob_life(mob/living/M) + M.adjustToxLoss(1) + M.damageoverlaytemp = 60 + M.EyeBlurry(3) + ..() + +/datum/reagent/beer2 //disguised as normal beer for use by emagged brobots + name = "Beer" + id = "beer2" + description = "An alcoholic beverage made from malted grains, hops, yeast, and water." + color = "#664300" // rgb: 102, 67, 0 + metabolization_rate = 1.5 * REAGENTS_METABOLISM + drink_icon ="beerglass" + drink_name = "Beer glass" + drink_desc = "A freezing pint of beer" + +/datum/reagent/beer2/on_mob_life(mob/living/M) + switch(current_cycle) + if(1 to 50) + M.AdjustSleeping(1) + if(51 to INFINITY) + M.AdjustSleeping(1) + M.adjustToxLoss((current_cycle - 50)*REAGENTS_EFFECT_MULTIPLIER) + ..() /datum/reagent/polonium name = "Polonium" @@ -12,12 +340,12 @@ color = "#CF3600" metabolization_rate = 0.1 penetrates_skin = 1 + can_synth = 0 /datum/reagent/polonium/on_mob_life(mob/living/M) M.apply_effect(8, IRRADIATE, negate_armor = 1) ..() - /datum/reagent/histamine name = "Histamine" id = "histamine" @@ -100,20 +428,11 @@ penetrates_skin = 1 /datum/reagent/formaldehyde/on_mob_life(mob/living/M) - M.adjustToxLoss(1*REM) + M.adjustToxLoss(1*REAGENTS_EFFECT_MULTIPLIER) if(prob(10)) M.reagents.add_reagent("histamine",rand(5,15)) ..() -/datum/chemical_reaction/formaldehyde - name = "formaldehyde" - id = "formaldehyde" - result = "formaldehyde" - required_reagents = list("ethanol" = 1, "oxygen" = 1, "silver" = 1) - result_amount = 3 - min_temp = 420 - mix_message = "Ugh, it smells like the morgue in here." - /datum/reagent/venom name = "Venom" id = "venom" @@ -122,6 +441,7 @@ color = "#CF3600" metabolization_rate = 0.2 overdose_threshold = 40 + can_synth = 0 /datum/reagent/venom/on_mob_life(mob/living/M) if(prob(25)) @@ -182,16 +502,6 @@ M.adjustToxLoss(1) ..() -/datum/chemical_reaction/neurotoxin2 - name = "neurotoxin2" - id = "neurotoxin2" - result = "neurotoxin2" - required_reagents = list("space_drugs" = 1) - result_amount = 1 - min_temp = 674 - mix_sound = null - no_message = 1 - /datum/reagent/cyanide name = "Cyanide" id = "cyanide" @@ -202,7 +512,7 @@ penetrates_skin = 1 /datum/reagent/cyanide/on_mob_life(mob/living/M) - M.adjustToxLoss(1.5*REM) + M.adjustToxLoss(1.5*REAGENTS_EFFECT_MULTIPLIER) if(prob(5)) M.emote("drool") if(prob(10)) @@ -215,23 +525,6 @@ M.adjustToxLoss(2) ..() -/datum/chemical_reaction/cyanide - name = "Cyanide" - id = "cyanide" - result = "cyanide" - required_reagents = list("oil" = 1, "ammonia" = 1, "oxygen" = 1) - result_amount = 3 - min_temp = 380 - mix_message = "The mixture gives off a faint scent of almonds." - mix_sound = 'sound/goonstation/misc/drinkfizz.ogg' - -/datum/chemical_reaction/cyanide/on_reaction(datum/reagents/holder) - var/turf/T = get_turf(holder.my_atom) - T.visible_message("The solution generates a strong vapor!") - for(var/mob/living/carbon/C in range(T, 1)) - if(C.can_breathe_gas()) - C.reagents.add_reagent("cyanide", 7) - /datum/reagent/itching_powder name = "Itching Powder" id = "itching_powder" @@ -266,20 +559,6 @@ M.emote("scream") ..() -/datum/chemical_reaction/itching_powder - name = "Itching Powder" - id = "itching_powder" - result = "itching_powder" - required_reagents = list("fuel" = 1, "ammonia" = 1, "fungus" = 1) - result_amount = 3 - mix_message = "The mixture congeals and dries up, leaving behind an abrasive powder." - mix_sound = 'sound/effects/blobattack.ogg' - -/datum/reagent/facid/on_mob_life(mob/living/M) - M.adjustToxLoss(1*REM) - M.adjustFireLoss(1) - ..() - /datum/reagent/facid name = "Fluorosulfuric Acid" id = "facid" @@ -288,6 +567,11 @@ color = "#4141D2" process_flags = ORGANIC | SYNTHETIC +/datum/reagent/facid/on_mob_life(mob/living/M) + M.adjustToxLoss(1*REAGENTS_EFFECT_MULTIPLIER) + M.adjustFireLoss(1) + ..() + /datum/reagent/facid/reaction_mob(mob/living/M, method=TOUCH, volume) if(method == TOUCH || method == INGEST) if(ishuman(M)) @@ -338,22 +622,13 @@ O.visible_message("[O] melts.") qdel(O) -/datum/chemical_reaction/facid - name = "Fluorosulfuric Acid" - id = "facid" - result = "facid" - required_reagents = list("sacid" = 1, "fluorine" = 1, "hydrogen" = 1, "potassium" = 1) - result_amount = 4 - min_temp = 380 - mix_message = "The mixture deepens to a dark blue, and slowly begins to corrode its container." - /datum/reagent/initropidril name = "Initropidril" id = "initropidril" description = "A highly potent cardiac poison - can kill within minutes." reagent_state = LIQUID color = "#7F10C0" - metabolization_rate = 0.4 + can_synth = 0 /datum/reagent/initropidril/on_mob_life(mob/living/M) if(prob(33)) @@ -377,30 +652,6 @@ H.heart_attack = 1 // rip in pepperoni ..() -/datum/chemical_reaction/initropidril - name = "Initropidril" - id = "initropidril" - result = "initropidril" - required_reagents = list("crank" = 1, "histamine" = 1, "krokodil" = 1, "bath_salts" = 1, "atropine" = 1, "nicotine" = 1, "morphine" = 1) - result_amount = 4 - mix_message = "A sweet and sugary scent drifts from the unpleasant milky substance." - - -/datum/reagent/concentrated_initro - name = "Concentrated Initropidril" - id = "concentrated_initro" - description = "A guaranteed heart-stopper!" - reagent_state = LIQUID - color = "#AB1CCF" - metabolization_rate = 0.4 - -/datum/reagent/concentrated_initro/on_mob_life(mob/living/M) - if(volume >=5) - if(ishuman(M)) - var/mob/living/carbon/human/H = M - if(!H.heart_attack) - H.heart_attack = 1 // rip in pepperoni - /datum/reagent/pancuronium name = "Pancuronium" id = "pancuronium" @@ -440,6 +691,7 @@ reagent_state = LIQUID color = "#5F8BE1" metabolization_rate = 0.7 + can_synth = 0 /datum/reagent/sodium_thiopental/on_mob_life(mob/living/M) switch(current_cycle) @@ -467,6 +719,7 @@ color = "#646EA0" metabolization_rate = 0.8 penetrates_skin = 1 + can_synth = 0 /datum/reagent/ketamine/on_mob_life(mob/living/M) switch(current_cycle) @@ -492,15 +745,6 @@ color = "#6BA688" metabolization_rate = 0.1 -/datum/chemical_reaction/sulfonal - name = "sulfonal" - id = "sulfonal" - result = "sulfonal" - required_reagents = list("acetone" = 1, "diethylamine" = 1, "sulfur" = 1) - result_amount = 3 - mix_message = "The mixture gives off quite a stench." - mix_sound = 'sound/goonstation/misc/drinkfizz.ogg' - /datum/reagent/sulfonal/on_mob_life(mob/living/M) M.AdjustJitter(-30) switch(current_cycle) @@ -526,7 +770,7 @@ reagent_state = LIQUID color = "#D9D9D9" -/datum/reagent/amanitin/reagent_deleted(mob/living/M) +/datum/reagent/amanitin/on_mob_delete(mob/living/M) M.adjustToxLoss(current_cycle*rand(2,4)) ..() @@ -538,13 +782,6 @@ color = "#D1DED1" metabolization_rate = 0.2 -/datum/chemical_reaction/lipolicide - name = "lipolicide" - id = "lipolicide" - result = "lipolicide" - required_reagents = list("mercury" = 1, "diethylamine" = 1, "ephedrine" = 1) - result_amount = 3 - /datum/reagent/lipolicide/on_mob_life(mob/living/M) if(!M.nutrition) switch(rand(1,3)) @@ -567,6 +804,7 @@ reagent_state = LIQUID color = "#C2D8CD" metabolization_rate = 0.05 + can_synth = 0 /datum/reagent/coniine/on_mob_life(mob/living/M) M.adjustToxLoss(2) @@ -616,23 +854,6 @@ penetrates_skin = 1 overdose_threshold = 25 -/datum/chemical_reaction/sarin - name = "sarin" - id = "sarin" - result = "sarin" - required_reagents = list("chlorine" = 1, "fuel" = 1, "oxygen" = 1, "phosphorus" = 1, "fluorine" = 1, "hydrogen" = 1, "acetone" = 1, "atrazine" = 1) - result_amount = 3 - mix_message = "The mixture yields a colorless, odorless liquid." - min_temp = 374 - mix_sound = 'sound/goonstation/misc/drinkfizz.ogg' - -/datum/chemical_reaction/sarin/on_reaction(datum/reagents/holder) - var/turf/T = get_turf(holder.my_atom) - T.visible_message("The solution generates a strong vapor!") - for(var/mob/living/carbon/C in range(T, 2)) - if(C.can_breathe_gas()) - C.reagents.add_reagent("sarin", 4) - /datum/reagent/sarin/on_mob_life(mob/living/M) switch(current_cycle) if(1 to 15) @@ -690,8 +911,7 @@ M.adjustToxLoss(2) ..() - // Clear off wallrot fungi -/datum/reagent/atrazine/reaction_turf(turf/simulated/wall/W, volume) +/datum/reagent/atrazine/reaction_turf(turf/simulated/wall/W, volume) // Clear off wallrot fungi if(istype(W) && W.rotting) W.rotting = 0 for(var/obj/effect/overlay/O in W) @@ -727,14 +947,6 @@ D.adjustHealth(100) ..() -/datum/chemical_reaction/atrazine - name = "atrazine" - id = "atrazine" - result = "atrazine" - required_reagents = list("chlorine" = 1, "hydrogen" = 1, "nitrogen" = 1) - result_amount = 3 - mix_message = "The mixture gives off a harsh odor" - /datum/reagent/capulettium name = "Capulettium" id = "capulettium" @@ -743,14 +955,6 @@ color = "#60A584" heart_rate_stop = 1 -/datum/chemical_reaction/capulettium - name = "capulettium" - id = "capulettium" - result = "capulettium" - required_reagents = list("neurotoxin2" = 1, "chlorine" = 1, "hydrogen" = 1) - result_amount = 1 - mix_message = "The smell of death wafts up from the solution." - /datum/reagent/capulettium/on_mob_life(mob/living/M) switch(current_cycle) if(1 to 5) @@ -774,14 +978,6 @@ color = "#60A584" heart_rate_stop = 1 -/datum/chemical_reaction/capulettium_plus - name = "capulettium_plus" - id = "capulettium_plus" - result = "capulettium_plus" - required_reagents = list("capulettium" = 1, "ephedrine" = 1, "methamphetamine" = 1) - result_amount = 3 - mix_message = "The solution begins to slosh about violently by itself." - /datum/reagent/capulettium_plus/on_mob_life(mob/living/M) M.Silence(2) ..() @@ -840,6 +1036,10 @@ color = "#993333" process_flags = ORGANIC | SYNTHETIC +/datum/reagent/ants/on_mob_life(mob/living/M) + M.adjustBruteLoss(2) + ..() + /datum/reagent/ants/reaction_mob(mob/living/M, method=TOUCH, volume) //NOT THE ANTS if(iscarbon(M)) if(method == TOUCH || method==INGEST) @@ -847,11 +1047,6 @@ M.emote("scream") M.adjustBruteLoss(4) - -/datum/reagent/ants/on_mob_life(mob/living/M) - M.adjustBruteLoss(2) - ..() - /datum/reagent/teslium //Teslium. Causes periodic shocks, and makes shocks against the target much more effective. name = "Teslium" id = "teslium" @@ -868,20 +1063,4 @@ shock_timer = 0 M.electrocute_act(rand(5,20), "Teslium in their body", 1, 1) //Override because it's caused from INSIDE of you playsound(M, "sparks", 50, 1) - ..() - -/datum/chemical_reaction/teslium - name = "Teslium" - id = "teslium" - result = "teslium" - required_reagents = list("plasma" = 1, "silver" = 1, "blackpowder" = 1) - result_amount = 3 - mix_message = "A jet of sparks flies from the mixture as it merges into a flickering slurry." - min_temp = 400 - mix_sound = null - -/datum/chemical_reaction/teslium/on_reaction(datum/reagents/holder, created_volume) - var/location = get_turf(holder.my_atom) - var/datum/effect/system/spark_spread/s = new /datum/effect/system/spark_spread - s.set_up(6, 1, location) - s.start() + ..() \ No newline at end of file diff --git a/code/modules/reagents/oldchem/reagents/reagents_water.dm b/code/modules/reagents/chemistry/reagents/water.dm similarity index 86% rename from code/modules/reagents/oldchem/reagents/reagents_water.dm rename to code/modules/reagents/chemistry/reagents/water.dm index a2dd3eb7fc4..ef00ea54c61 100644 --- a/code/modules/reagents/oldchem/reagents/reagents_water.dm +++ b/code/modules/reagents/chemistry/reagents/water.dm @@ -15,6 +15,9 @@ color = "#0064C8" // rgb: 0, 100, 200 var/cooling_temperature = 2 process_flags = ORGANIC | SYNTHETIC + drink_icon = "glass_clear" + drink_name = "Glass of Water" + drink_desc = "The father of all refreshments." /datum/reagent/water/reaction_mob(mob/living/M, method=TOUCH, volume) // Put out fire @@ -133,6 +136,9 @@ id = "blood" reagent_state = LIQUID color = "#C80000" // rgb: 200, 0, 0 + drink_icon = "glass_red" + drink_name = "Glass of Tomato juice" + drink_desc = "Are you sure this is tomato juice?" /datum/reagent/blood/reaction_mob(mob/living/M, method=TOUCH, volume) if(data && data["viruses"]) @@ -262,6 +268,9 @@ reagent_state = LIQUID color = "#0064C8" // rgb: 0, 100, 200 process_flags = ORGANIC | SYNTHETIC + drink_icon = "glass_clear" + drink_name = "Glass of Water" + drink_desc = "The father of all refreshments." /datum/reagent/holywater/on_mob_life(mob/living/M) M.AdjustJitter(-5) @@ -330,6 +339,47 @@ qdel(R) T.Bless() +/datum/reagent/fuel/unholywater //if you somehow managed to extract this from someone, dont splash it on yourself and have a smoke + name = "Unholy Water" + id = "unholywater" + description = "Something that shouldn't exist on this plane of existance." + process_flags = ORGANIC | SYNTHETIC //ethereal means everything processes it. + metabolization_rate = 1 + +/datum/reagent/fuel/unholywater/on_mob_life(mob/living/M) + M.adjustBrainLoss(3) + if(iscultist(M)) + M.status_flags |= GOTTAGOFAST + M.AdjustDrowsy(-5) + M.AdjustParalysis(-2) + M.AdjustStunned(-2) + M.AdjustWeakened(-2) + else + M.adjustToxLoss(2) + M.adjustFireLoss(2) + M.adjustOxyLoss(2) + M.adjustBruteLoss(2) + ..() + +/datum/reagent/fuel/unholywater/on_mob_delete(mob/living/M) + M.status_flags &= ~GOTTAGOFAST + ..() + +/datum/reagent/hellwater + name = "Hell Water" + id = "hell_water" + description = "YOUR FLESH! IT BURNS!" + process_flags = ORGANIC | SYNTHETIC //Admin-bus has no brakes! KILL THEM ALL. + metabolization_rate = 1 + can_synth = 0 + +/datum/reagent/hellwater/on_mob_life(mob/living/M) + M.fire_stacks = min(5, M.fire_stacks + 3) + M.IgniteMob() //Only problem with igniting people is currently the commonly availible fire suits make you immune to being on fire + M.adjustToxLoss(1) + M.adjustFireLoss(1) //Hence the other damages... ain't I a bastard? + M.adjustBrainLoss(5) + ..() /datum/reagent/liquidgibs name = "Liquid gibs" @@ -365,4 +415,4 @@ if(istype(O, /obj/item/clothing/shoes/galoshes)) var/t_loc = get_turf(O) qdel(O) - new /obj/item/clothing/shoes/galoshes/dry(t_loc) + new /obj/item/clothing/shoes/galoshes/dry(t_loc) \ No newline at end of file diff --git a/code/modules/reagents/chemistry/recipes.dm b/code/modules/reagents/chemistry/recipes.dm new file mode 100644 index 00000000000..28994d10fb2 --- /dev/null +++ b/code/modules/reagents/chemistry/recipes.dm @@ -0,0 +1,81 @@ +/////////////////////////////////////////////////////////////////////////////////// +/datum/chemical_reaction + var/name = null + var/id = null + var/result = null + var/list/required_reagents = list() + var/list/required_catalysts = list() + + // Both of these variables are mostly going to be used with slime cores - but if you want to, you can use them for other things + var/atom/required_container = null // the container required for the reaction to happen + var/required_other = 0 // an integer required for the reaction to happen + + var/result_amount = 0 + var/secondary = 0 // set to nonzero if secondary reaction + var/list/secondary_results = list() //additional reagents produced by the reaction + var/min_temp = 0 //Minimum temperature required for the reaction to occur (heat to/above this). min_temp = 0 means no requirement + var/max_temp = 9999 //Maximum temperature allowed for the reaction to occur (cool to/below this). + var/mix_message = "The solution begins to bubble." + var/mix_sound = 'sound/effects/bubbles.ogg' + var/no_message = 0 + +/datum/chemical_reaction/proc/on_reaction(datum/reagents/holder, created_volume) + return + +var/list/chemical_mob_spawn_meancritters = list() // list of possible hostile mobs +var/list/chemical_mob_spawn_nicecritters = list() // and possible friendly mobs +/datum/chemical_reaction/proc/chemical_mob_spawn(datum/reagents/holder, amount_to_spawn, reaction_name, mob_faction = "chemicalsummon") + if(holder && holder.my_atom) + if(chemical_mob_spawn_meancritters.len <= 0 || chemical_mob_spawn_nicecritters.len <= 0) + for(var/T in typesof(/mob/living/simple_animal)) + var/mob/living/simple_animal/SA = T + switch(initial(SA.gold_core_spawnable)) + if(CHEM_MOB_SPAWN_HOSTILE) + chemical_mob_spawn_meancritters += T + if(CHEM_MOB_SPAWN_FRIENDLY) + chemical_mob_spawn_nicecritters += T + var/atom/A = holder.my_atom + var/turf/T = get_turf(A) + var/area/my_area = get_area(T) + var/message = "A [reaction_name] reaction has occured in [my_area.name]. (JMP)" + message += " (VV)" + + var/mob/M = get(A, /mob) + if(M) + message += " - Carried By: [key_name_admin(M)](?) (FLW)" + else + message += " - Last Fingerprint: [(A.fingerprintslast ? A.fingerprintslast : "N/A")]" + + message_admins(message, 0, 1) + + playsound(get_turf(holder.my_atom), 'sound/effects/phasein.ogg', 100, 1) + + for(var/mob/living/carbon/C in viewers(get_turf(holder.my_atom), null)) + C.flash_eyes() + for(var/i = 1, i <= amount_to_spawn, i++) + var/chosen + if(reaction_name == "Friendly Gold Slime") + chosen = pick(chemical_mob_spawn_nicecritters) + else + chosen = pick(chemical_mob_spawn_meancritters) + var/mob/living/simple_animal/C = new chosen + C.faction |= mob_faction + C.forceMove(get_turf(holder.my_atom)) + if(prob(50)) + for(var/j = 1, j <= rand(1, 3), j++) + step(C, pick(NORTH,SOUTH,EAST,WEST)) + +/proc/goonchem_vortex(turf/simulated/T, setting_type, range, pull_times) + for(var/atom/movable/X in orange(range, T)) + if(istype(X, /obj/effect)) + continue //stop pulling smoke and hotspots please + if(istype(X, /atom/movable)) + if((X) && !X.anchored) + if(setting_type) + playsound(T, 'sound/effects/bang.ogg', 25, 1) + for(var/i = 0, i < pull_times, i++) + step_away(X,T) + else + playsound(T, 'sound/effects/whoosh.ogg', 25, 1) //credit to Robinhood76 of Freesound.org for this. + for(var/i = 0, i < pull_times, i++) + step_towards(X,T) \ No newline at end of file diff --git a/code/modules/reagents/oldchem/chemical_reaction/chemical_reaction_drink.dm b/code/modules/reagents/chemistry/recipes/drinks.dm similarity index 86% rename from code/modules/reagents/oldchem/chemical_reaction/chemical_reaction_drink.dm rename to code/modules/reagents/chemistry/recipes/drinks.dm index 1b69b88e071..d1866a2b2f1 100644 --- a/code/modules/reagents/oldchem/chemical_reaction/chemical_reaction_drink.dm +++ b/code/modules/reagents/chemistry/recipes/drinks.dm @@ -676,3 +676,96 @@ required_reagents = list("spacemountainwind" = 1, "coffee" = 1) result_amount = 2 mix_sound = 'sound/goonstation/misc/drinkfizz.ogg' + +/datum/chemical_reaction/ginsonic + name = "ginsonic" + id = "ginsonic" + result = "ginsonic" + required_reagents = list("gintonic" = 1, "methamphetamine" = 1) + result_amount = 2 + mix_message = "The drink turns electric blue and starts quivering violently." + mix_sound = 'sound/goonstation/misc/drinkfizz.ogg' + +/datum/chemical_reaction/applejack + name = "applejack" + id = "applejack" + result = "applejack" + required_reagents = list("cider" = 2) + max_temp = 270 + result_amount = 1 + mix_message = "The drink darkens as the water freezes, leaving the concentrated cider behind." + mix_sound = null + +/datum/chemical_reaction/jackrose + name = "jackrose" + id = "jackrose" + result = "jackrose" + required_reagents = list("applejack" = 4, "lemonjuice" = 1) + result_amount = 5 + mix_sound = 'sound/goonstation/misc/drinkfizz.ogg' + +/datum/chemical_reaction/synthanol + name = "Synthanol" + id = "synthanol" + result = "synthanol" + required_reagents = list("lube" = 1, "plasma" = 1, "fuel" = 1) + result_amount = 3 + mix_message = "The chemicals mix to create shiny, blue substance." + mix_sound = 'sound/goonstation/misc/drinkfizz.ogg' + +/datum/chemical_reaction/synthanol/robottears + name = "Robot Tears" + id = "robottears" + result = "robottears" + required_reagents = list("synthanol" = 1, "oil" = 1, "sodawater" = 1) + result_amount = 3 + mix_message = "The ingredients combine into a stiff, dark goo." + +/datum/chemical_reaction/synthanol/trinary + name = "Trinary" + id = "trinary" + result = "trinary" + required_reagents = list("synthanol" = 1, "limejuice" = 1, "orangejuice" = 1) + result_amount = 3 + mix_message = "The ingredients mix into a colorful substance." + +/datum/chemical_reaction/synthanol/servo + name = "Servo" + id = "servo" + result = "servo" + required_reagents = list("synthanol" = 2, "cream" = 1, "hot_coco" = 1) + result_amount = 4 + mix_message = "The ingredients mix into a dark brown substance." + +/datum/chemical_reaction/synthanol/uplink + name = "Uplink" + id = "uplink" + result = "uplink" + required_reagents = list("rum" = 1, "vodka" = 1, "tequila" = 1, "whiskey" = 1, "synthanol" = 1) + result_amount = 5 + mix_message = "The chemicals mix to create a shiny, orange substance." + +/datum/chemical_reaction/synthanol/synthnsoda + name = "Synth 'n Soda" + id = "synthnsoda" + result = "synthnsoda" + required_reagents = list("synthanol" = 1, "cola" = 1) + result_amount = 2 + mix_message = "The chemicals mix to create a smooth, fizzy substance." + +/datum/chemical_reaction/synthanol/synthignon + name = "Synthignon" + id = "synthignon" + result = "synthignon" + required_reagents = list("synthanol" = 1, "wine" = 1) + result_amount = 2 + mix_message = "The chemicals mix to create a fine, red substance." + +/datum/chemical_reaction/triple_citrus + name = "triple_citrus" + id = "triple_citrus" + result = "triple_citrus" + required_reagents = list("lemonjuice" = 1, "limejuice" = 1, "orangejuice" = 1) + result_amount = 3 + mix_message = "The citrus juices begin to blend together." + mix_sound = 'sound/goonstation/misc/drinkfizz.ogg' \ No newline at end of file diff --git a/code/modules/reagents/chemistry/recipes/drugs.dm b/code/modules/reagents/chemistry/recipes/drugs.dm new file mode 100644 index 00000000000..e44ace8f511 --- /dev/null +++ b/code/modules/reagents/chemistry/recipes/drugs.dm @@ -0,0 +1,117 @@ +/datum/chemical_reaction/space_drugs + name = "Space Drugs" + id = "space_drugs" + result = "space_drugs" + required_reagents = list("mercury" = 1, "sugar" = 1, "lithium" = 1) + result_amount = 3 + mix_message = "Slightly dizzying fumes drift from the solution." + mix_sound = 'sound/goonstation/misc/drinkfizz.ogg' + +/datum/chemical_reaction/crank + name = "Crank" + id = "crank" + result = "crank" + required_reagents = list("diphenhydramine" = 1, "ammonia" = 1, "lithium" = 1, "sacid" = 1, "fuel" = 1) + result_amount = 5 + mix_message = "The mixture violently reacts, leaving behind a few crystalline shards." + mix_sound = 'sound/goonstation/effects/crystalshatter.ogg' + min_temp = 390 + +/datum/chemical_reaction/crank/on_reaction(datum/reagents/holder, created_volume) + var/turf/T = get_turf(holder.my_atom) + for(var/turf/turf in range(1,T)) + new /obj/effect/hotspot(turf) + explosion(T,0,0,2) + +/datum/chemical_reaction/krokodil + name = "Krokodil" + id = "krokodil" + result = "krokodil" + required_reagents = list("diphenhydramine" = 1, "morphine" = 1, "cleaner" = 1, "potassium" = 1, "phosphorus" = 1, "fuel" = 1) + result_amount = 6 + mix_message = "The mixture dries into a pale blue powder." + min_temp = 380 + mix_sound = 'sound/goonstation/misc/fuse.ogg' + +/datum/chemical_reaction/methamphetamine + name = "methamphetamine" + id = "methamphetamine" + result = "methamphetamine" + required_reagents = list("ephedrine" = 1, "iodine" = 1, "phosphorus" = 1, "hydrogen" = 1) + result_amount = 4 + min_temp = 374 + +/datum/chemical_reaction/methamphetamine/on_reaction(datum/reagents/holder) + var/turf/T = get_turf(holder.my_atom) + T.visible_message("The solution generates a strong vapor!") + for(var/mob/living/carbon/C in range(T, 1)) + if(C.can_breathe_gas()) + C.emote("gasp") + C.AdjustLoseBreath(1) + C.reagents.add_reagent("toxin", 10) + C.reagents.add_reagent("neurotoxin2", 20) + +/datum/chemical_reaction/bath_salts + name = "bath_salts" + id = "bath_salts" + result = "bath_salts" + required_reagents = list("????" = 1, "saltpetre" = 1, "msg" = 1, "cleaner" = 1, "enzyme" = 1, "mugwort" = 1, "mercury" = 1) + result_amount = 6 + min_temp = 374 + mix_message = "Tiny cubic crystals precipitate out of the mixture. Huh." + mix_sound = 'sound/goonstation/misc/fuse.ogg' + +/datum/chemical_reaction/jenkem + name = "Jenkem" + id = "jenkem" + result = "jenkem" + required_reagents = list("toiletwater" = 1, "ammonia" = 1, "water" = 1) + result_amount = 3 + mix_message = "The mixture ferments into a filthy morass." + mix_sound = 'sound/effects/blobattack.ogg' + +/datum/chemical_reaction/jenkem/on_reaction(datum/reagents/holder) + var/turf/T = get_turf(holder.my_atom) + T.visible_message("The solution generates a strong vapor!") + for(var/mob/living/carbon/C in range(T, 1)) + if(C.can_breathe_gas()) + C.reagents.add_reagent("jenkem", 25) + +/datum/chemical_reaction/aranesp + name = "Aranesp" + id = "aranesp" + result = "aranesp" + required_reagents = list("epinephrine" = 1, "atropine" = 1, "insulin" = 1) + result_amount = 3 + +/datum/chemical_reaction/fliptonium + name = "fliptonium" + id = "fliptonium" + result = "fliptonium" + required_reagents = list("ephedrine" = 1, "liquid_dark_matter" = 1, "chocolate" = 1, "ginsonic" = 1) + result_amount = 4 + mix_message = "The mixture swirls around excitedly!" + +/datum/chemical_reaction/lsd + name = "Lysergic acid diethylamide" + id = "lsd" + result = "lsd" + required_reagents = list("diethylamine" = 1, "fungus" = 1) + result_amount = 3 + mix_message = "The mixture turns a rather unassuming color and settles." + +/datum/chemical_reaction/lube/ultra + name = "Ultra-Lube" + id = "ultralube" + result = "ultralube" + required_reagents = list("lube" = 2, "formaldehyde" = 1, "cryostylane" = 1) + result_amount = 2 + mix_message = "The mixture darkens and appears to partially vaporize into a chilling aerosol." + +/datum/chemical_reaction/surge + name = "Surge" + id = "surge" + result = "surge" + required_reagents = list("thermite" = 3, "uranium" = 1, "fluorosurfactant" = 1, "sacid" = 1) + result_amount = 6 + mix_message = "The mixture congeals into a metallic green gel that crackles with electrical activity." \ No newline at end of file diff --git a/code/modules/reagents/oldchem/chemical_reaction/chemical_reaction_food.dm b/code/modules/reagents/chemistry/recipes/food.dm similarity index 51% rename from code/modules/reagents/oldchem/chemical_reaction/chemical_reaction_food.dm rename to code/modules/reagents/chemistry/recipes/food.dm index b43c9b344f1..02453d44e31 100644 --- a/code/modules/reagents/oldchem/chemical_reaction/chemical_reaction_food.dm +++ b/code/modules/reagents/chemistry/recipes/food.dm @@ -89,34 +89,6 @@ required_reagents = list("flour" = 15, "water" = 5) required_catalysts = list("enzyme" = 5) -/datum/chemical_reaction/sodiumchloride - name = "Sodium Chloride" - id = "sodiumchloride" - result = "sodiumchloride" - required_reagents = list("sodium" = 1, "chlorine" = 1, "water" = 1) - result_amount = 3 - mix_message = "The solution crystallizes with a brief flare of light." - -/datum/chemical_reaction/ice - name = "Ice" - id = "ice" - result = "ice" - required_reagents = list("water" = 1) - result_amount = 1 - max_temp = 273 - mix_message = "Ice forms as the water freezes." - mix_sound = null - -/datum/chemical_reaction/water - name = "Water" - id = "water" - result = "water" - required_reagents = list("ice" = 1) - result_amount = 1 - min_temp = 301 // In Space.....ice melts at 82F...don't ask - mix_message = "Water pools as the ice melts." - mix_sound = null - /datum/chemical_reaction/dough name = "Dough" id = "dough" @@ -128,4 +100,101 @@ /datum/chemical_reaction/dough/on_reaction(datum/reagents/holder, created_volume) var/location = get_turf(holder.my_atom) for(var/i = 1, i <= created_volume, i++) - new /obj/item/weapon/reagent_containers/food/snacks/dough(location) \ No newline at end of file + new /obj/item/weapon/reagent_containers/food/snacks/dough(location) + +/datum/chemical_reaction/corn_syrup + name = "corn_syrup" + id = "corn_syrup" + result = "corn_syrup" + required_reagents = list("corn_starch" = 1, "sacid" = 1) + result_amount = 2 + min_temp = 374 + mix_message = "The mixture forms a viscous, clear fluid!" + +/datum/chemical_reaction/vhfcs + name = "vhfcs" + id = "vhfcs" + result = "vhfcs" + required_reagents = list("corn_syrup" = 1) + required_catalysts = list("enzyme" = 1) + result_amount = 1 + mix_message = "The mixture emits a sickly-sweet smell." + +/datum/chemical_reaction/cola + name = "cola" + id = "cola" + result = "cola" + required_reagents = list("carbon" = 1, "oxygen" = 1, "water" = 1, "sugar" = 1) + result_amount = 4 + mix_message = "The mixture begins to fizz." + mix_sound = 'sound/goonstation/misc/drinkfizz.ogg' + +/datum/chemical_reaction/cheese + name = "cheese" + id = "cheese" + result = "cheese" + required_reagents = list("vomit" = 1, "milk" = 1) + result_amount = 1 + mix_message = "The mixture curdles up." + +/datum/chemical_reaction/cheese/on_reaction(datum/reagents/holder) + var/turf/T = get_turf(holder.my_atom) + T.visible_message("A faint cheesy smell drifts through the air...") + +/datum/chemical_reaction/weird_cheese + name = "Weird cheese" + id = "weird_cheese" + result = "weird_cheese" + required_reagents = list("green_vomit" = 1, "milk" = 1) + result_amount = 1 + mix_message = "The disgusting mixture sloughs together horribly, emitting a foul stench." + mix_sound = 'sound/goonstation/misc/gurggle.ogg' + +/datum/chemical_reaction/weird_cheese/on_reaction(datum/reagents/holder) + var/turf/T = get_turf(holder.my_atom) + T.visible_message("A horrible smell assaults your nose! What in space is it?") + +/datum/chemical_reaction/hydrogenated_soybeanoil + name = "Partially hydrogenated space-soybean oil" + id = "hydrogenated_soybeanoil" + result = "hydrogenated_soybeanoil" + required_reagents = list("soybeanoil" = 1, "hydrogen" = 1) + result_amount = 2 + min_temp = 520 + mix_message = "The mixture emits a burnt, oily smell." + +/datum/chemical_reaction/meatslurry + name = "Meat Slurry" + id = "meatslurry" + result = "meatslurry" + required_reagents = list("corn_starch" = 1, "blood" = 1) + result_amount = 2 + mix_message = "The mixture congeals into a bloody mass." + mix_sound = 'sound/effects/blobattack.ogg' + +/datum/chemical_reaction/gravy + name = "Gravy" + id = "gravy" + result = "gravy" + required_reagents = list("porktonium" = 1, "corn_starch" = 1, "milk" = 1) + result_amount = 3 + min_temp = 374 + mix_message = "The substance thickens and takes on a meaty odor." + +/datum/chemical_reaction/beff + name = "Beff" + id = "beff" + result = "beff" + required_reagents = list("hydrogenated_soybeanoil" = 2, "meatslurry" = 1, "plasma" = 1) + result_amount = 4 + mix_message = "The mixture solidifies, taking a crystalline appearance." + mix_sound = 'sound/effects/blobattack.ogg' + +/datum/chemical_reaction/pepperoni + name = "Pepperoni" + id = "pepperoni" + result = "pepperoni" + required_reagents = list("beff" = 1, "saltpetre" = 1, "synthflesh" = 1) + result_amount = 2 + mix_message = "The beff and the synthflesh combine to form a smoky red log." + mix_sound = 'sound/effects/blobattack.ogg' \ No newline at end of file diff --git a/code/modules/reagents/chemistry/recipes/medicine.dm b/code/modules/reagents/chemistry/recipes/medicine.dm new file mode 100644 index 00000000000..1c22693513f --- /dev/null +++ b/code/modules/reagents/chemistry/recipes/medicine.dm @@ -0,0 +1,274 @@ +/datum/chemical_reaction/hydrocodone + name = "Hydrocodone" + id = "hydrocodone" + result = "hydrocodone" + required_reagents = list("morphine" = 1, "sacid" = 1, "water" = 1, "oil" = 1) + result_amount = 2 + +/datum/chemical_reaction/mitocholide + name = "mitocholide" + id = "mitocholide" + result = "mitocholide" + required_reagents = list("synthflesh" = 1, "cryoxadone" = 1, "plasma" = 1) + result_amount = 3 + +/datum/chemical_reaction/cryoxadone + name = "Cryoxadone" + id = "cryoxadone" + result = "cryoxadone" + required_reagents = list("cryostylane" = 1, "plasma" = 1, "acetone" = 1, "mutagen" = 1) + result_amount = 4 + mix_message = "The solution bubbles softly." + mix_sound = 'sound/goonstation/misc/drinkfizz.ogg' + +/datum/chemical_reaction/spaceacillin + name = "Spaceacillin" + id = "spaceacillin" + result = "spaceacillin" + required_reagents = list("fungus" = 1, "ethanol" = 1) + result_amount = 2 + mix_message = "The solvent extracts an antibiotic compound from the fungus." + +/datum/chemical_reaction/rezadone + name = "Rezadone" + id = "rezadone" + result = "rezadone" + required_reagents = list("carpotoxin" = 1, "spaceacillin" = 1, "copper" = 1) + result_amount = 3 + +/datum/chemical_reaction/sterilizine + name = "Sterilizine" + id = "sterilizine" + result = "sterilizine" + required_reagents = list("antihol" = 2, "chlorine" = 1) + result_amount = 3 + +/datum/chemical_reaction/charcoal + name = "Charcoal" + id = "charcoal" + result = "charcoal" + required_reagents = list("ash" = 1, "sodiumchloride" = 1) + result_amount = 2 + mix_message = "The mixture yields a fine black powder." + min_temp = 380 + mix_sound = 'sound/goonstation/misc/fuse.ogg' + +/datum/chemical_reaction/silver_sulfadiazine + name = "Silver Sulfadiazine" + id = "silver_sulfadiazine" + result = "silver_sulfadiazine" + required_reagents = list("ammonia" = 1, "silver" = 1, "sulfur" = 1, "oxygen" = 1, "chlorine" = 1) + result_amount = 5 + mix_message = "A strong and cloying odor begins to bubble from the mixture." + mix_sound = 'sound/goonstation/misc/drinkfizz.ogg' + +/datum/chemical_reaction/salglu_solution + name = "Saline-Glucose Solution" + id = "salglu_solution" + result = "salglu_solution" + required_reagents = list("sodiumchloride" = 1, "water" = 1, "sugar" = 1) + result_amount = 3 + +/datum/chemical_reaction/synthflesh + name = "Synthflesh" + id = "synthflesh" + result = "synthflesh" + required_reagents = list("blood" = 1, "carbon" = 1, "styptic_powder" = 1) + result_amount = 3 + mix_message = "The mixture knits together into a fibrous, bloody mass." + mix_sound = 'sound/effects/blobattack.ogg' + +/datum/chemical_reaction/styptic_powder + name = "Styptic Powder" + id = "styptic_powder" + result = "styptic_powder" + required_reagents = list("aluminum" = 1, "hydrogen" = 1, "oxygen" = 1, "sacid" = 1) + result_amount = 4 + mix_message = "The solution yields an astringent powder." + +/datum/chemical_reaction/calomel + name = "Calomel" + id = "calomel" + result = "calomel" + required_reagents = list("mercury" = 1, "chlorine" = 1) + result_amount = 2 + min_temp = 374 + mix_message = "Stinging vapors rise from the solution." + +/datum/chemical_reaction/potass_iodide + name = "Potassium Iodide" + id = "potass_iodide" + result = "potass_iodide" + required_reagents = list("potassium" = 1, "iodine" = 1) + result_amount = 2 + mix_message = "The solution settles calmly and emits gentle fumes." + +/datum/chemical_reaction/pen_acid + name = "Pentetic Acid" + id = "pen_acid" + result = "pen_acid" + required_reagents = list("fuel" = 1, "chlorine" = 1, "ammonia" = 1, "formaldehyde" = 1, "sodium" = 1, "cyanide" = 1) + result_amount = 6 + mix_message = "The substance becomes very still, emitting a curious haze." + +/datum/chemical_reaction/sal_acid + name = "Salicyclic Acid" + id = "sal_acid" + result = "sal_acid" + required_reagents = list("sodium" = 1, "phenol" = 1, "carbon" = 1, "oxygen" = 1, "sacid" = 1) + result_amount = 5 + mix_message = "The mixture crystallizes." + mix_sound = 'sound/goonstation/misc/drinkfizz.ogg' + +/datum/chemical_reaction/salbutamol + name = "Salbutamol" + id = "salbutamol" + result = "salbutamol" + required_reagents = list("sal_acid" = 1, "lithium" = 1, "aluminum" = 1, "bromine" = 1, "ammonia" = 1) + result_amount = 5 + mix_message = "The solution bubbles freely, creating a head of bluish foam." + mix_sound = 'sound/goonstation/misc/drinkfizz.ogg' + +/datum/chemical_reaction/perfluorodecalin + name = "Perfluorodecalin" + id = "perfluorodecalin" + result = "perfluorodecalin" + required_reagents = list("hydrogen" = 1, "fluorine" = 1, "oil" = 1) + result_amount = 3 + min_temp = 370 + mix_message = "The mixture rapidly turns into a dense pink liquid." + mix_sound = 'sound/goonstation/misc/drinkfizz.ogg' + +/datum/chemical_reaction/ephedrine + name = "Ephedrine" + id = "ephedrine" + result = "ephedrine" + required_reagents = list("sugar" = 1, "oil" = 1, "hydrogen" = 1, "diethylamine" = 1) + result_amount = 4 + mix_message = "The solution fizzes and gives off toxic fumes." + +/datum/chemical_reaction/diphenhydramine + name = "Diphenhydramine" + id = "diphenhydramine" + result = "diphenhydramine" + required_reagents = list("oil" = 1, "carbon" = 1, "bromine" = 1, "diethylamine" = 1, "ethanol" = 1) + result_amount = 4 + mix_message = "The mixture fizzes gently." + mix_sound = 'sound/goonstation/misc/drinkfizz.ogg' + +/datum/chemical_reaction/oculine + name = "Oculine" + id = "oculine" + result = "oculine" + required_reagents = list("atropine" = 1, "spaceacillin" = 1, "salglu_solution" = 1) + result_amount = 3 + mix_message = "The mixture settles, becoming a milky white." + +/datum/chemical_reaction/atropine + name = "Atropine" + id = "atropine" + result = "atropine" + required_reagents = list("ethanol" = 1, "acetone" = 1, "diethylamine" = 1, "phenol" = 1, "sacid" = 1) + result_amount = 5 + mix_message = "A horrid smell like something died drifts from the mixture." + +/datum/chemical_reaction/epinephrine + name = "Epinephrine" + id = "epinephrine" + result = "epinephrine" + required_reagents = list("phenol" = 1, "acetone" = 1, "diethylamine" = 1, "oxygen" = 1, "chlorine" = 1, "hydrogen" = 1) + result_amount = 6 + mix_message = "Tiny white crystals precipitate out of the solution." + mix_sound = 'sound/goonstation/misc/drinkfizz.ogg' + +/datum/chemical_reaction/strange_reagent + name = "Strange Reagent" + id = "strange_reagent" + result = "strange_reagent" + required_reagents = list("omnizine" = 1, "holywater" = 1, "mutagen" = 1) + result_amount = 3 + mix_message = "The substance begins moving on its own somehow." + +/datum/chemical_reaction/life + name = "Life" + id = "life" + result = null + required_reagents = list("strange_reagent" = 1, "synthflesh" = 1, "blood" = 1) + result_amount = 3 + min_temp = 374 + +/datum/chemical_reaction/life/on_reaction(datum/reagents/holder, created_volume) + chemical_mob_spawn(holder, 1, "Life") + +/datum/chemical_reaction/mannitol + name = "Mannitol" + id = "mannitol" + result = "mannitol" + required_reagents = list("sugar" = 1, "hydrogen" = 1, "water" = 1) + result_amount = 3 + mix_message = "The mixture bubbles slowly, making a slightly sweet odor." + +/datum/chemical_reaction/mutadone + name = "Mutadone" + id = "mutadone" + result = "mutadone" + required_reagents = list("mutagen" = 1, "acetone" = 1, "bromine" = 1) + result_amount = 3 + mix_message = "A foul astringent liquid emerges from the reaction." + +/datum/chemical_reaction/antihol + name = "antihol" + id = "antihol" + result = "antihol" + required_reagents = list("ethanol" = 1, "charcoal" = 1) + result_amount = 2 + mix_message = "A minty and refreshing smell drifts from the effervescent mixture." + mix_sound = 'sound/goonstation/misc/drinkfizz.ogg' + +/datum/chemical_reaction/simethicone + name = "simethicone" + id = "simethicone" + result = "simethicone" + required_reagents = list("hydrogen" = 1, "chlorine" = 1, "silicon" = 1, "oxygen" = 1) + result_amount = 4 + +/datum/chemical_reaction/teporone + name = "Teporone" + id = "teporone" + result = "teporone" + required_reagents = list("acetone" = 1, "silicon" = 1, "plasma" = 1) + result_amount = 2 + mix_message = "The mixture turns an odd lavender color." + mix_sound = 'sound/goonstation/misc/drinkfizz.ogg' + +/datum/chemical_reaction/haloperidol + name = "Haloperidol" + id = "haloperidol" + result = "haloperidol" + required_reagents = list("chlorine" = 1, "fluorine" = 1, "aluminum" = 1, "potass_iodide" = 1, "oil" = 1) + result_amount = 4 + mix_message = "The chemicals mix into an odd pink slush." + +/datum/chemical_reaction/ether + name = "Ether" + id = "ether" + result = "ether" + required_reagents = list("sacid" = 1, "ethanol" = 1, "oxygen" = 1) + result_amount = 1 + mix_message = "The mixture yields a pungent odor, which makes you tired." + +/datum/chemical_reaction/degreaser + name = "Degreaser" + id = "degreaser" + result = "degreaser" + required_reagents = list("oil" = 1, "sterilizine" = 1) + result_amount = 2 + +/datum/chemical_reaction/liquid_solder + name = "Liquid Solder" + id = "liquid_solder" + result = "liquid_solder" + required_reagents = list("ethanol" = 1, "copper" = 1, "silver" = 1) + result_amount = 3 + min_temp = 370 + mix_message = "The solution gently swirls with a metallic sheen." \ No newline at end of file diff --git a/code/modules/reagents/chemistry/recipes/others.dm b/code/modules/reagents/chemistry/recipes/others.dm new file mode 100644 index 00000000000..b97deb0ae8f --- /dev/null +++ b/code/modules/reagents/chemistry/recipes/others.dm @@ -0,0 +1,482 @@ +// foam and foam precursor + +/datum/chemical_reaction/surfactant + name = "Foam surfactant" + id = "foam surfactant" + result = "fluorosurfactant" + required_reagents = list("fluorine" = 2, "carbon" = 2, "sacid" = 1) + result_amount = 5 + mix_message = "A head of foam results from the mixture's constant fizzing." + +/datum/chemical_reaction/foam + name = "Foam" + id = "foam" + result = null + required_reagents = list("fluorosurfactant" = 1, "water" = 1) + result_amount = 2 + +/datum/chemical_reaction/foam/on_reaction(datum/reagents/holder, created_volume) + var/location = get_turf(holder.my_atom) + holder.my_atom.visible_message("The solution spews out foam!") + + var/datum/effect/system/foam_spread/s = new() + s.set_up(created_volume, location, holder, 0) + s.start() + holder.clear_reagents() + + +/datum/chemical_reaction/metalfoam + name = "Metal Foam" + id = "metalfoam" + result = null + required_reagents = list("aluminum" = 3, "fluorosurfactant" = 1, "sacid" = 1) + result_amount = 5 + +/datum/chemical_reaction/metalfoam/on_reaction(datum/reagents/holder, created_volume) + var/location = get_turf(holder.my_atom) + + holder.my_atom.visible_message("The solution spews out a metalic foam!") + + var/datum/effect/system/foam_spread/s = new() + s.set_up(created_volume, location, holder, MFOAM_ALUMINUM) + s.start() + + +/datum/chemical_reaction/ironfoam + name = "Iron Foam" + id = "ironlfoam" + result = null + required_reagents = list("iron" = 3, "fluorosurfactant" = 1, "sacid" = 1) + result_amount = 5 + +/datum/chemical_reaction/ironfoam/on_reaction(datum/reagents/holder, created_volume) + var/location = get_turf(holder.my_atom) + + holder.my_atom.visible_message("= 5 && !istype(T, /turf/space)) - if(!locate(/obj/effect/decal/cleanable/dirt/blackpowder) in T) //let's not have hundreds of decals of black powder on the same turf - new /obj/effect/decal/cleanable/dirt/blackpowder(T) - /datum/chemical_reaction/blackpowder_explosion/on_reaction(datum/reagents/holder, created_volume) var/location = get_turf(holder.my_atom) var/datum/effect/system/spark_spread/s = new /datum/effect/system/spark_spread @@ -190,17 +136,6 @@ sleep(rand(20,30)) blackpowder_detonate(holder, created_volume) -/* -/datum/reagent/blackpowder/on_ex_act() - var/location = get_turf(holder.my_atom) - var/datum/effect/system/spark_spread/s = new /datum/effect/system/spark_spread - s.set_up(2, 1, location) - s.start() - sleep(rand(10,15)) - blackpowder_detonate(holder, volume) - holder.remove_reagent("blackpowder", volume) - return */ - /proc/blackpowder_detonate(datum/reagents/holder, created_volume) var/turf/simulated/T = get_turf(holder.my_atom) var/ex_severe = round(created_volume / 100) @@ -213,20 +148,28 @@ spawn(0) qdel(holder.my_atom) -/datum/reagent/flash_powder - name = "Flash Powder" - id = "flash_powder" - description = "Makes a very bright flash." - reagent_state = LIQUID - color = "#FFFF00" - -/datum/chemical_reaction/flash_powder +datum/chemical_reaction/flash_powder name = "Flash powder" id = "flash_powder" result = "flash_powder" required_reagents = list("aluminum" = 1, "potassium" = 1, "sulfur" = 1, "chlorine" = 1) result_amount = 3 +/datum/chemical_reaction/flash_powder/on_reaction(datum/reagents/holder, created_volume) + if(holder.has_reagent("stabilizing_agent")) + return + var/location = get_turf(holder.my_atom) + var/datum/effect/system/spark_spread/s = new /datum/effect/system/spark_spread + s.set_up(2, 1, location) + s.start() + for(var/mob/living/carbon/C in viewers(5, location)) + if(C.flash_eyes()) + if(get_dist(C, location) < 4) + C.Weaken(5) + continue + C.Stun(5) + holder.remove_reagent("flash_powder", created_volume) + /datum/chemical_reaction/flash_powder_flash name = "Flash powder activation" id = "flash_powder_flash" @@ -246,29 +189,6 @@ continue C.Stun(5) - -/datum/chemical_reaction/flash_powder/on_reaction(datum/reagents/holder, created_volume) - if(holder.has_reagent("stabilizing_agent")) - return - var/location = get_turf(holder.my_atom) - var/datum/effect/system/spark_spread/s = new /datum/effect/system/spark_spread - s.set_up(2, 1, location) - s.start() - for(var/mob/living/carbon/C in viewers(5, location)) - if(C.flash_eyes()) - if(get_dist(C, location) < 4) - C.Weaken(5) - continue - C.Stun(5) - holder.remove_reagent("flash_powder", created_volume) - -/datum/reagent/smoke_powder - name = "Smoke Powder" - id = "smoke_powder" - description = "Makes a large cloud of smoke that can carry reagents." - reagent_state = LIQUID - color = "#808080" - /datum/chemical_reaction/smoke_powder name = "smoke_powder" id = "smoke_powder" @@ -318,13 +238,6 @@ forbidden_reagents = list("stimulants") mix_sound = null -/datum/reagent/sonic_powder - name = "Sonic Powder" - id = "sonic_powder" - description = "Makes a deafening noise." - reagent_state = LIQUID - color = "#0000FF" - /datum/chemical_reaction/sonic_powder name = "sonic_powder" id = "sonic_powder" @@ -332,6 +245,35 @@ required_reagents = list("oxygen" = 1, "cola" = 1, "phosphorus" = 1) result_amount = 3 +/datum/chemical_reaction/sonic_powder/on_reaction(datum/reagents/holder, created_volume) + if(holder.has_reagent("stabilizing_agent")) + return + var/location = get_turf(holder.my_atom) + playsound(location, 'sound/effects/bang.ogg', 25, 1) + for(var/mob/living/M in hearers(5, location)) + var/ear_safety = 0 + var/distance = max(1,get_dist(src,T)) + if(iscarbon(M)) + var/mob/living/carbon/C = M + if(ishuman(C)) + var/mob/living/carbon/human/H = C + if((H.r_ear && (H.r_ear.flags & EARBANGPROTECT)) || (H.l_ear && (H.l_ear.flags & EARBANGPROTECT)) || (H.head && (H.head.flags & HEADBANGPROTECT))) + ear_safety++ + to_chat(C, "BANG") + if(!ear_safety) + M.Stun(max(10/distance, 3)) + M.Weaken(max(10/distance, 3)) + M.AdjustEarDamage(rand(0, 5)) + M.EarDeaf(15) + if(M.ear_damage >= 15) + to_chat(M, "Your ears start to ring badly!") + if(prob(M.ear_damage - 5)) + to_chat(M, "You can't hear anything!") + M.disabilities |= DEAF + else + if(M.ear_damage >= 5) + to_chat(M, "Your ears start to ring!") + holder.remove_reagent("sonic_powder", created_volume) /datum/chemical_reaction/sonic_powder_deafen name = "sonic_powder_deafen" @@ -367,44 +309,6 @@ if(M.ear_damage >= 5) to_chat(M, "Your ears start to ring!") -/datum/chemical_reaction/sonic_powder/on_reaction(datum/reagents/holder, created_volume) - if(holder.has_reagent("stabilizing_agent")) - return - var/location = get_turf(holder.my_atom) - playsound(location, 'sound/effects/bang.ogg', 25, 1) - for(var/mob/living/M in hearers(5, location)) - var/ear_safety = 0 - var/distance = max(1,get_dist(src,T)) - if(iscarbon(M)) - var/mob/living/carbon/C = M - if(ishuman(C)) - var/mob/living/carbon/human/H = C - if((H.r_ear && (H.r_ear.flags & EARBANGPROTECT)) || (H.l_ear && (H.l_ear.flags & EARBANGPROTECT)) || (H.head && (H.head.flags & HEADBANGPROTECT))) - ear_safety++ - to_chat(C, "BANG") - if(!ear_safety) - M.Stun(max(10/distance, 3)) - M.Weaken(max(10/distance, 3)) - M.AdjustEarDamage(rand(0, 5)) - M.EarDeaf(15) - if(M.ear_damage >= 15) - to_chat(M, "Your ears start to ring badly!") - if(prob(M.ear_damage - 5)) - to_chat(M, "You can't hear anything!") - M.disabilities |= DEAF - else - if(M.ear_damage >= 5) - to_chat(M, "Your ears start to ring!") - holder.remove_reagent("sonic_powder", created_volume) - -/datum/reagent/phlogiston - name = "Phlogiston" - id = "phlogiston" - description = "Catches you on fire and makes you ignite." - reagent_state = LIQUID - color = "#FF9999" - process_flags = ORGANIC | SYNTHETIC - /datum/chemical_reaction/phlogiston name = "phlogiston" id = "phlogiston" @@ -419,32 +323,6 @@ for(var/turf/simulated/turf in range(min(created_volume/10,4),T)) new /obj/effect/hotspot(turf) -/datum/reagent/phlogiston/reaction_mob(mob/living/M, method=TOUCH, volume) - M.IgniteMob() - ..() - -/datum/reagent/phlogiston/on_mob_life(mob/living/M) - M.adjust_fire_stacks(1) - var/burndmg = max(0.3*M.fire_stacks, 0.3) - M.adjustFireLoss(burndmg) - ..() - -/datum/reagent/napalm - name = "Napalm" - id = "napalm" - description = "Very flammable." - reagent_state = LIQUID - color = "#FF9999" - process_flags = ORGANIC | SYNTHETIC - -/datum/reagent/napalm/on_mob_life(mob/living/M) - M.adjust_fire_stacks(1) - ..() - -/datum/reagent/napalm/reaction_mob(mob/living/M, method=TOUCH, volume) - if(method == TOUCH) - M.adjust_fire_stacks(min(volume/4, 20)) - /datum/chemical_reaction/napalm name = "Napalm" id = "napalm" @@ -452,13 +330,6 @@ required_reagents = list("sugar" = 1, "fuel" = 1, "ethanol" = 1 ) result_amount = 1 -/datum/reagent/cryostylane - name = "Cryostylane" - id = "cryostylane" - description = "Comes into existence at 20K. As long as there is sufficient oxygen for it to react with, Cryostylane slowly cools all other reagents in the mob down to 0K." - color = "#B2B2FF" // rgb: 139, 166, 233 - process_flags = ORGANIC | SYNTHETIC - /datum/chemical_reaction/cryostylane name = "cryostylane" id = "cryostylane" @@ -467,31 +338,6 @@ result_amount = 3 mix_sound = 'sound/goonstation/misc/drinkfizz.ogg' -/datum/reagent/cryostylane/on_mob_life(mob/living/M) //TODO: code freezing into an ice cube - if(M.reagents.has_reagent("oxygen")) - M.reagents.remove_reagent("oxygen", 1) - M.bodytemperature -= 30 - ..() - -/datum/reagent/cryostylane/on_tick() - if(holder.has_reagent("oxygen")) - holder.remove_reagent("oxygen", 1) - holder.chem_temp -= 10 - holder.handle_reactions() - ..() - -/datum/reagent/cryostylane/reaction_turf(turf/T, volume) - if(volume >= 5) - for(var/mob/living/carbon/slime/M in T) - M.adjustToxLoss(rand(15,30)) - -/datum/reagent/pyrosium - name = "Pyrosium" - id = "pyrosium" - description = "Comes into existence at 20K. As long as there is sufficient oxygen for it to react with, Pyrosium slowly cools all other reagents in the mob down to 0K." - color = "#B20000" // rgb: 139, 166, 233 - process_flags = ORGANIC | SYNTHETIC - /datum/chemical_reaction/pyrosium name = "pyrosium" id = "pyrosium" @@ -499,19 +345,6 @@ required_reagents = list("plasma" = 1, "radium" = 1, "phosphorus" = 1) result_amount = 3 -/datum/reagent/pyrosium/on_mob_life(mob/living/M) - if(M.reagents.has_reagent("oxygen")) - M.reagents.remove_reagent("oxygen", 1) - M.bodytemperature += 30 - ..() - -/datum/reagent/pyrosium/on_tick() - if(holder.has_reagent("oxygen")) - holder.remove_reagent("oxygen", 1) - holder.chem_temp += 10 - holder.handle_reactions() - ..() - /datum/chemical_reaction/azide name = "azide" id = "azide" @@ -525,14 +358,6 @@ var/location = get_turf(holder.my_atom) explosion(location, 0, 1, 4) -/datum/reagent/firefighting_foam - name = "Firefighting foam" - id = "firefighting_foam" - description = "Carbon Tetrachloride is a foam used for fire suppression." - reagent_state = LIQUID - color = "#A0A090" - var/cooling_temperature = 3 // more effective than water - /datum/chemical_reaction/firefighting_foam name = "firefighting_foam" id = "firefighting_foam" @@ -542,29 +367,6 @@ mix_message = "The mixture bubbles gently." mix_sound = 'sound/goonstation/misc/drinkfizz.ogg' -/datum/reagent/firefighting_foam/reaction_mob(mob/living/M, method=TOUCH, volume) -// Put out fire - if(method == TOUCH) - M.adjust_fire_stacks(-(volume / 5)) // more effective than water - M.ExtinguishMob() - -/datum/reagent/firefighting_foam/reaction_obj(obj/O, volume) - if(istype(O)) - O.extinguish() - -/datum/reagent/firefighting_foam/reaction_turf(turf/simulated/T, volume) - if(!istype(T)) - return - var/CT = cooling_temperature - new /obj/effect/decal/cleanable/flour/foam(T) //foam mess; clears up quickly. - var/hotspot = (locate(/obj/effect/hotspot) in T) - if(hotspot) - var/datum/gas_mixture/lowertemp = T.remove_air(T.air.total_moles()) - lowertemp.temperature = max(min(lowertemp.temperature-(CT*1000), lowertemp.temperature / CT), 0) - lowertemp.react() - T.assume_air(lowertemp) - qdel(hotspot) - /datum/chemical_reaction/clf3_firefighting name = "clf3_firefighting" id = "clf3_firefighting" @@ -595,30 +397,9 @@ holder.del_reagent("teslium") //Clear all remaining Teslium and Uranium, but leave all other reagents untouched. holder.del_reagent("uranium") -/datum/reagent/plasma_dust - name = "Plasma Dust" - id = "plasma_dust" - description = "A fine dust of plasma. This chemical has unusual mutagenic properties for viruses and slimes alike." - color = "#500064" // rgb: 80, 0, 100 - -/datum/reagent/plasma_dust/on_mob_life(mob/living/M) - M.adjustToxLoss(3) - if(iscarbon(M)) - var/mob/living/carbon/C = M - C.adjustPlasma(20) - ..() - -/datum/reagent/plasma_dust/reaction_obj(obj/O, volume) - if((!O) || (!volume)) - return 0 - O.atmos_spawn_air(SPAWN_TOXINS|SPAWN_20C, volume) - -/datum/reagent/plasma_dust/reaction_turf(turf/simulated/T, volume) - if(istype(T)) - T.atmos_spawn_air(SPAWN_TOXINS|SPAWN_20C, volume) - -/datum/reagent/plasma_dust/reaction_mob(mob/living/M, method=TOUCH, volume)//Splashing people with plasma dust is stronger than fuel! - if(method == TOUCH) - M.adjust_fire_stacks(volume / 5) - return - ..() +/datum/chemical_reaction/thermite + name = "Thermite" + id = "thermite" + result = "thermite" + required_reagents = list("aluminum" = 1, "iron" = 1, "oxygen" = 1) + result_amount = 3 \ No newline at end of file diff --git a/code/modules/reagents/oldchem/chemical_reaction/chemical_reaction_slime.dm b/code/modules/reagents/chemistry/recipes/slime_extracts.dm similarity index 100% rename from code/modules/reagents/oldchem/chemical_reaction/chemical_reaction_slime.dm rename to code/modules/reagents/chemistry/recipes/slime_extracts.dm diff --git a/code/modules/reagents/chemistry/recipes/toxins.dm b/code/modules/reagents/chemistry/recipes/toxins.dm new file mode 100644 index 00000000000..2181401b2da --- /dev/null +++ b/code/modules/reagents/chemistry/recipes/toxins.dm @@ -0,0 +1,142 @@ +/datum/chemical_reaction/formaldehyde + name = "formaldehyde" + id = "formaldehyde" + result = "formaldehyde" + required_reagents = list("ethanol" = 1, "oxygen" = 1, "silver" = 1) + result_amount = 3 + min_temp = 420 + mix_message = "Ugh, it smells like the morgue in here." + +/datum/chemical_reaction/neurotoxin2 + name = "neurotoxin2" + id = "neurotoxin2" + result = "neurotoxin2" + required_reagents = list("space_drugs" = 1) + result_amount = 1 + min_temp = 674 + mix_sound = null + no_message = 1 + +/datum/chemical_reaction/cyanide + name = "Cyanide" + id = "cyanide" + result = "cyanide" + required_reagents = list("oil" = 1, "ammonia" = 1, "oxygen" = 1) + result_amount = 3 + min_temp = 380 + mix_message = "The mixture gives off a faint scent of almonds." + mix_sound = 'sound/goonstation/misc/drinkfizz.ogg' + +/datum/chemical_reaction/cyanide/on_reaction(datum/reagents/holder) + var/turf/T = get_turf(holder.my_atom) + T.visible_message("The solution generates a strong vapor!") + for(var/mob/living/carbon/C in range(T, 1)) + if(C.can_breathe_gas()) + C.reagents.add_reagent("cyanide", 7) + +/datum/chemical_reaction/itching_powder + name = "Itching Powder" + id = "itching_powder" + result = "itching_powder" + required_reagents = list("fuel" = 1, "ammonia" = 1, "fungus" = 1) + result_amount = 3 + mix_message = "The mixture congeals and dries up, leaving behind an abrasive powder." + mix_sound = 'sound/effects/blobattack.ogg' + +/datum/chemical_reaction/facid + name = "Fluorosulfuric Acid" + id = "facid" + result = "facid" + required_reagents = list("sacid" = 1, "fluorine" = 1, "hydrogen" = 1, "potassium" = 1) + result_amount = 4 + min_temp = 380 + mix_message = "The mixture deepens to a dark blue, and slowly begins to corrode its container." + +/datum/chemical_reaction/initropidril + name = "Initropidril" + id = "initropidril" + result = "initropidril" + required_reagents = list("crank" = 1, "histamine" = 1, "krokodil" = 1, "bath_salts" = 1, "atropine" = 1, "nicotine" = 1, "morphine" = 1) + result_amount = 4 + mix_message = "A sweet and sugary scent drifts from the unpleasant milky substance." + +/datum/chemical_reaction/sulfonal + name = "sulfonal" + id = "sulfonal" + result = "sulfonal" + required_reagents = list("acetone" = 1, "diethylamine" = 1, "sulfur" = 1) + result_amount = 3 + mix_message = "The mixture gives off quite a stench." + mix_sound = 'sound/goonstation/misc/drinkfizz.ogg' + +/datum/chemical_reaction/lipolicide + name = "lipolicide" + id = "lipolicide" + result = "lipolicide" + required_reagents = list("mercury" = 1, "diethylamine" = 1, "ephedrine" = 1) + result_amount = 3 + +/datum/chemical_reaction/sarin + name = "sarin" + id = "sarin" + result = "sarin" + required_reagents = list("chlorine" = 1, "fuel" = 1, "oxygen" = 1, "phosphorus" = 1, "fluorine" = 1, "hydrogen" = 1, "acetone" = 1, "atrazine" = 1) + result_amount = 3 + mix_message = "The mixture yields a colorless, odorless liquid." + min_temp = 374 + mix_sound = 'sound/goonstation/misc/drinkfizz.ogg' + +/datum/chemical_reaction/sarin/on_reaction(datum/reagents/holder) + var/turf/T = get_turf(holder.my_atom) + T.visible_message("The solution generates a strong vapor!") + for(var/mob/living/carbon/C in range(T, 2)) + if(C.can_breathe_gas()) + C.reagents.add_reagent("sarin", 4) + +/datum/chemical_reaction/atrazine + name = "atrazine" + id = "atrazine" + result = "atrazine" + required_reagents = list("chlorine" = 1, "hydrogen" = 1, "nitrogen" = 1) + result_amount = 3 + mix_message = "The mixture gives off a harsh odor" + +/datum/chemical_reaction/capulettium + name = "capulettium" + id = "capulettium" + result = "capulettium" + required_reagents = list("neurotoxin2" = 1, "chlorine" = 1, "hydrogen" = 1) + result_amount = 1 + mix_message = "The smell of death wafts up from the solution." + +/datum/chemical_reaction/capulettium_plus + name = "capulettium_plus" + id = "capulettium_plus" + result = "capulettium_plus" + required_reagents = list("capulettium" = 1, "ephedrine" = 1, "methamphetamine" = 1) + result_amount = 3 + mix_message = "The solution begins to slosh about violently by itself." + +/datum/chemical_reaction/teslium + name = "Teslium" + id = "teslium" + result = "teslium" + required_reagents = list("plasma" = 1, "silver" = 1, "blackpowder" = 1) + result_amount = 3 + mix_message = "A jet of sparks flies from the mixture as it merges into a flickering slurry." + min_temp = 400 + mix_sound = null + +/datum/chemical_reaction/teslium/on_reaction(datum/reagents/holder, created_volume) + var/location = get_turf(holder.my_atom) + var/datum/effect/system/spark_spread/s = new /datum/effect/system/spark_spread + s.set_up(6, 1, location) + s.start() + +/datum/chemical_reaction/mutagen + name = "Unstable mutagen" + id = "mutagen" + result = "mutagen" + required_reagents = list("radium" = 1, "plasma" = 1, "chlorine" = 1) + result_amount = 3 + mix_message = "The substance turns neon green and bubbles unnervingly." \ No newline at end of file diff --git a/code/modules/reagents/newchem/disease.dm b/code/modules/reagents/newchem/disease.dm deleted file mode 100644 index cdc2d0b8d43..00000000000 --- a/code/modules/reagents/newchem/disease.dm +++ /dev/null @@ -1,320 +0,0 @@ -/datum/reagent/spider_eggs - name = "spider eggs" - id = "spidereggs" - description = "A fine dust containing spider eggs. Oh gosh." - reagent_state = SOLID - color = "#FFFFFF" - -/datum/reagent/spider_eggs/on_mob_life(mob/living/M) - if(volume > 2.5) - if(iscarbon(M)) - if(!M.get_int_organ(/obj/item/organ/internal/body_egg)) - new/obj/item/organ/internal/body_egg/spider_eggs(M) //Yes, even Xenos can fall victim to the plague that is spider infestation. - ..() - - -/datum/reagent/nanomachines - name = "Nanomachines" - id = "nanomachines" - description = "Microscopic construction robots." - color = "#535E66" // rgb: 83, 94, 102 - -/datum/reagent/nanomachines/on_mob_life(mob/living/carbon/M) - if(volume > 1.5) - M.ForceContractDisease(new /datum/disease/transformation/robot(0)) - ..() - - -/datum/reagent/xenomicrobes - name = "Xenomicrobes" - id = "xenomicrobes" - description = "Microbes with an entirely alien cellular structure." - color = "#535E66" // rgb: 83, 94, 102 - -/datum/reagent/xenomicrobes/on_mob_life(mob/living/carbon/M) - if(volume > 1.5) - M.ContractDisease(new /datum/disease/transformation/xeno(0)) - ..() - -/datum/reagent/fungalspores - name = "Tubercle bacillus Cosmosis microbes" - id = "fungalspores" - description = "Active fungal spores." - color = "#92D17D" // rgb: 146, 209, 125 - -/datum/reagent/fungalspores/on_mob_life(mob/living/carbon/M) - if(volume > 2.5) - M.ForceContractDisease(new /datum/disease/tuberculosis(0)) - ..() - -/datum/reagent/jagged_crystals - name = "Jagged Crystals" - id = "jagged_crystals" - description = "Rapid chemical decomposition has warped these crystals into twisted spikes." - reagent_state = SOLID - color = "#FA0000" // rgb: 250, 0, 0 - -/datum/reagent/jagged_crystals/on_mob_life(mob/living/carbon/M) - M.ForceContractDisease(new /datum/disease/berserker(0)) - ..() - -/datum/reagent/salmonella - name = "Salmonella" - id = "salmonella" - description = "A nasty bacteria found in spoiled food." - reagent_state = LIQUID - color = "#1E4600" - -/datum/reagent/salmonella/on_mob_life(mob/living/carbon/M) - M.ForceContractDisease(new /datum/disease/food_poisoning(0)) - ..() - -/datum/reagent/gibbis - name = "Gibbis" - id = "gibbis" - description = "Liquid gibbis." - reagent_state = LIQUID - color = "#FF0000" - -/datum/reagent/gibbis/on_mob_life(mob/living/carbon/M) - if(volume > 2.5) - M.ForceContractDisease(new /datum/disease/gbs/curable(0)) - ..() - -/datum/reagent/prions - name = "Prions" - id = "prions" - description = "A disease-causing agent that is neither bacterial nor fungal nor viral and contains no genetic material." - reagent_state = LIQUID - color = "#FFFFFF" - -/datum/reagent/prions/on_mob_life(mob/living/carbon/M) - if(volume > 4.5) - M.ForceContractDisease(new /datum/disease/kuru(0)) - ..() - -/datum/reagent/grave_dust - name = "Grave Dust" - id = "grave_dust" - description = "Moldy old dust taken from a grave site." - reagent_state = LIQUID - color = "#465046" - -/datum/reagent/grave_dust/on_mob_life(mob/living/carbon/M) - if(volume > 4.5) - M.ForceContractDisease(new /datum/disease/vampire(0)) - ..() - -/datum/reagent/heartworms - name = "Space heartworms" - id = "heartworms" - description = "Aww, gross! These things can't be good for your heart. They're gunna eat it!" - reagent_state = SOLID - color = "#925D6C" - -/datum/reagent/heartworms/on_mob_life(mob/living/carbon/M) - if(volume > 4.5) - if(ishuman(M)) - var/mob/living/carbon/human/H = M - var/obj/item/organ/internal/heart/ate_heart = H.get_int_organ(/obj/item/organ/internal/heart) - if(ate_heart) - ate_heart.remove(H) - qdel(ate_heart) - ..() - -//virus-specific symptom reagents - -/datum/reagent/synaphydramine - name = "Diphen-Synaptizine" - id = "synaphydramine" - description = "Reduces drowsiness and hallucinations while also purging histamine from the body." - color = "#EC536D" // rgb: 236, 83, 109 - -/datum/reagent/synaphydramine/on_mob_life(mob/living/M) - M.AdjustDrowsy(-5) - if(holder.has_reagent("lsd")) - holder.remove_reagent("lsd", 5) - if(holder.has_reagent("histamine")) - holder.remove_reagent("histamine", 5) - M.AdjustHallucinate(-10) - if(prob(30)) - M.adjustToxLoss(1) - ..() - -//virus food -/datum/reagent/virus_food - name = "Virus Food" - id = "virusfood" - description = "A mixture of water, milk, and oxygen. Virus cells can use this mixture to reproduce." - reagent_state = LIQUID - nutriment_factor = 2 * REAGENTS_METABOLISM - color = "#899613" // rgb: 137, 150, 19 - -/datum/reagent/virus_food/on_mob_life(mob/living/M) - M.nutrition += nutriment_factor * REAGENTS_EFFECT_MULTIPLIER - ..() - -/datum/reagent/mutagen/mutagenvirusfood - name = "mutagenic agar" - id = "mutagenvirusfood" - description = "mutates blood" - color = "#A3C00F" // rgb: 163,192,15 - -/datum/reagent/mutagen/mutagenvirusfood/sugar - name = "sucrose agar" - id = "sugarvirusfood" - color = "#41B0C0" // rgb: 65,176,192 - -/datum/reagent/diphenhydramine/diphenhydraminevirusfood - name = "virus rations" - id = "diphenhydraminevirusfood" - description = "mutates blood" - color = "#D18AA5" // rgb: 209,138,165 - -/datum/reagent/plasma_dust/plasmavirusfood - name = "virus plasma" - id = "plasmavirusfood" - description = "mutates blood" - color = "#A69DA9" // rgb: 166,157,169 - -/datum/reagent/plasma_dust/plasmavirusfood/weak - name = "weakened virus plasma" - id = "weakplasmavirusfood" - color = "#CEC3C6" // rgb: 206,195,198 - -//reactions -/datum/chemical_reaction/virus_food - name = "Virus Food" - id = "virusfood" - result = "virusfood" - required_reagents = list("water" = 1, "milk" = 1, "oxygen" = 1) - result_amount = 3 - -/datum/chemical_reaction/virus_food_mutagen - name = "mutagenic agar" - id = "mutagenvirusfood" - result = "mutagenvirusfood" - required_reagents = list("mutagen" = 1, "virusfood" = 1) - result_amount = 1 - -/datum/chemical_reaction/virus_food_diphenhydramine - name = "virus rations" - id = "diphenhydraminevirusfood" - result = "diphenhydraminevirusfood" - required_reagents = list("diphenhydramine" = 1, "virusfood" = 1) - result_amount = 1 - -/datum/chemical_reaction/virus_food_plasma - name = "virus plasma" - id = "plasmavirusfood" - result = "plasmavirusfood" - required_reagents = list("plasma_dust" = 1, "virusfood" = 1) - result_amount = 1 - -/datum/chemical_reaction/virus_food_plasma_diphenhydramine - name = "weakened virus plasma" - id = "weakplasmavirusfood" - result = "weakplasmavirusfood" - required_reagents = list("diphenhydramine" = 1, "plasmavirusfood" = 1) - result_amount = 2 - -/datum/chemical_reaction/virus_food_mutagen_sugar - name = "sucrose agar" - id = "sugarvirusfood" - result = "sugarvirusfood" - required_reagents = list("sugar" = 1, "mutagenvirusfood" = 1) - result_amount = 2 - -/datum/chemical_reaction/virus_food_mutagen_salineglucose - name = "sucrose agar" - id = "salineglucosevirusfood" - result = "sugarvirusfood" - required_reagents = list("salglu_solution" = 1, "mutagenvirusfood" = 1) - result_amount = 2 - - -//mix virus -/datum/chemical_reaction/mix_virus - name = "Mix Virus" - id = "mixvirus" - required_reagents = list("virusfood" = 1) - required_catalysts = list("blood" = 1) - var/level_min = 0 - var/level_max = 2 - -/datum/chemical_reaction/mix_virus/on_reaction(datum/reagents/holder, created_volume) - var/datum/reagent/blood/B = locate(/datum/reagent/blood) in holder.reagent_list - if(B && B.data) - var/datum/disease/advance/D = locate(/datum/disease/advance) in B.data["viruses"] - if(D) - D.Evolve(level_min, level_max) - - -/datum/chemical_reaction/mix_virus/mix_virus_2 - name = "Mix Virus 2" - id = "mixvirus2" - required_reagents = list("mutagen" = 1) - level_min = 2 - level_max = 4 - -/datum/chemical_reaction/mix_virus/mix_virus_3 - name = "Mix Virus 3" - id = "mixvirus3" - required_reagents = list("plasma_dust" = 1) - level_min = 4 - level_max = 6 - -/datum/chemical_reaction/mix_virus/mix_virus_4 - name = "Mix Virus 4" - id = "mixvirus4" - required_reagents = list("uranium" = 1) - level_min = 5 - level_max = 6 - -/datum/chemical_reaction/mix_virus/mix_virus_5 - name = "Mix Virus 5" - id = "mixvirus5" - required_reagents = list("mutagenvirusfood" = 1) - level_min = 3 - level_max = 3 - -/datum/chemical_reaction/mix_virus/mix_virus_6 - name = "Mix Virus 6" - id = "mixvirus6" - required_reagents = list("sugarvirusfood" = 1) - level_min = 4 - level_max = 4 - -/datum/chemical_reaction/mix_virus/mix_virus_7 - name = "Mix Virus 7" - id = "mixvirus7" - required_reagents = list("weakplasmavirusfood" = 1) - level_min = 5 - level_max = 5 - -/datum/chemical_reaction/mix_virus/mix_virus_8 - name = "Mix Virus 8" - id = "mixvirus8" - required_reagents = list("plasmavirusfood" = 1) - level_min = 6 - level_max = 6 - -/datum/chemical_reaction/mix_virus/mix_virus_9 - name = "Mix Virus 9" - id = "mixvirus9" - required_reagents = list("diphenhydraminevirusfood" = 1) - level_min = 1 - level_max = 1 - -/datum/chemical_reaction/mix_virus/rem_virus - name = "Devolve Virus" - id = "remvirus" - required_reagents = list("diphenhydramine" = 1) - required_catalysts = list("blood" = 1) - -/datum/chemical_reaction/mix_virus/rem_virus/on_reaction(datum/reagents/holder, created_volume) - var/datum/reagent/blood/B = locate(/datum/reagent/blood) in holder.reagent_list - if(B && B.data) - var/datum/disease/advance/D = locate(/datum/disease/advance) in B.data["viruses"] - if(D) - D.Devolve() diff --git a/code/modules/reagents/newchem/drinks.dm b/code/modules/reagents/newchem/drinks.dm deleted file mode 100644 index da07f7a995f..00000000000 --- a/code/modules/reagents/newchem/drinks.dm +++ /dev/null @@ -1,238 +0,0 @@ -/datum/reagent/ginsonic - name = "Gin and sonic" - id = "ginsonic" - description = "GOTTA GET CRUNK FAST BUT LIQUOR TOO SLOW" - reagent_state = LIQUID - color = "#1111CF" - -/datum/chemical_reaction/ginsonic - name = "ginsonic" - id = "ginsonic" - result = "ginsonic" - required_reagents = list("gintonic" = 1, "methamphetamine" = 1) - result_amount = 2 - mix_message = "The drink turns electric blue and starts quivering violently." - mix_sound = 'sound/goonstation/misc/drinkfizz.ogg' - -/datum/reagent/ginsonic/on_mob_life(mob/living/M) - M.AdjustDrowsy(-5) - if(prob(25)) - M.AdjustParalysis(-1) - M.AdjustStunned(-1) - M.AdjustWeakened(-1) - if(prob(8)) - M.reagents.add_reagent("methamphetamine",1.2) - var/sonic_message = pick("Gotta go fast!", "Time to speed, keed!", "I feel a need for speed!", "Let's juice.", "Juice time.", "Way Past Cool!") - if(prob(50)) - M.say("[sonic_message]") - else - to_chat(M, "[sonic_message ]") - ..() - -/datum/reagent/ethanol/applejack - name = "Applejack" - id = "applejack" - description = "A highly concentrated alcoholic beverage made by repeatedly freezing cider and removing the ice." - color = "#997A00" - alcohol_perc = 0.4 - -/datum/chemical_reaction/applejack - name = "applejack" - id = "applejack" - result = "applejack" - required_reagents = list("cider" = 2) - max_temp = 270 - result_amount = 1 - mix_message = "The drink darkens as the water freezes, leaving the concentrated cider behind." - mix_sound = null - -/datum/reagent/ethanol/jackrose - name = "Jack Rose" - id = "jackrose" - description = "A classic cocktail that had fallen out of fashion, but never out of taste," - color = "#664300" - alcohol_perc = 0.4 - -/datum/chemical_reaction/jackrose - name = "jackrose" - id = "jackrose" - result = "jackrose" - required_reagents = list("applejack" = 4, "lemonjuice" = 1) - result_amount = 5 - mix_sound = 'sound/goonstation/misc/drinkfizz.ogg' - - -/datum/reagent/ethanol/dragons_breath //inaccessible to players, but here for admin shennanigans - name = "Dragon's Breath" - id = "dragonsbreath" - description = "Possessing this stuff probably breaks the Geneva convention." - reagent_state = LIQUID - color = "#DC0000" - alcohol_perc = 1 - -/datum/reagent/ethanol/dragons_breath/reaction_mob(mob/living/M, method=TOUCH, volume) - if(method == INGEST && prob(20)) - if(M.on_fire) - M.adjust_fire_stacks(3) - -/datum/reagent/ethanol/dragons_breath/on_mob_life(mob/living/M) - if(M.reagents.has_reagent("milk")) - to_chat(M, "The milk stops the burning. Ahhh.") - M.reagents.del_reagent("milk") - M.reagents.del_reagent("dragonsbreath") - return - if(prob(8)) - to_chat(M, "Oh god! Oh GODD!!") - if(prob(50)) - to_chat(M, "Your throat burns terribly!") - M.emote(pick("scream","cry","choke","gasp")) - M.Stun(1) - if(prob(8)) - to_chat(M, "Why!? WHY!?") - if(prob(8)) - to_chat(M, "ARGHHHH!") - if(prob(2 * volume)) - to_chat(M, "OH GOD OH GOD PLEASE NO!!") - if(M.on_fire) - M.adjust_fire_stacks(5) - if(prob(50)) - to_chat(M, "IT BURNS!!!!") - M.visible_message("[M] is consumed in flames!") - M.dust() - return - ..() - -// ROBOT ALCOHOL PAST THIS POINT -// WOOO! - - -/datum/reagent/ethanol/synthanol - name = "Synthanol" - id = "synthanol" - description = "A runny liquid with conductive capacities. Its effects on synthetics are similar to those of alcohol on organics." - reagent_state = LIQUID - color = "#1BB1FF" - process_flags = ORGANIC | SYNTHETIC - metabolization_rate = 0.4 - alcohol_perc = 0.5 - -/datum/chemical_reaction/synthanol - name = "Synthanol" - id = "synthanol" - result = "synthanol" - required_reagents = list("lube" = 1, "plasma" = 1, "fuel" = 1) - result_amount = 3 - mix_message = "The chemicals mix to create shiny, blue substance." - mix_sound = 'sound/goonstation/misc/drinkfizz.ogg' - -/datum/reagent/ethanol/synthanol/on_mob_life(mob/living/M) - if(!M.isSynthetic()) - holder.remove_reagent(id, 3.6) //gets removed from organics very fast - if(prob(25)) - holder.remove_reagent(id, 15) - M.fakevomit() - ..() - -/datum/reagent/ethanol/synthanol/reaction_mob(mob/living/M, method=TOUCH, volume) - if(M.isSynthetic()) - return - if(method == INGEST) - to_chat(M, pick("That was awful!", "Yuck!")) - -/datum/reagent/ethanol/synthanol/robottears - name = "Robot Tears" - id = "robottears" - description = "An oily substance that an IPC could technically consider a 'drink'." - reagent_state = LIQUID - color = "#363636" - alcohol_perc = 0.25 - -/datum/chemical_reaction/synthanol/robottears - name = "Robot Tears" - id = "robottears" - result = "robottears" - required_reagents = list("synthanol" = 1, "oil" = 1, "sodawater" = 1) - result_amount = 3 - mix_message = "The ingredients combine into a stiff, dark goo." - -/datum/reagent/ethanol/synthanol/trinary - name = "Trinary" - id = "trinary" - description = "A fruit drink meant only for synthetics, however that works." - reagent_state = LIQUID - color = "#adb21f" - alcohol_perc = 0.2 - -/datum/chemical_reaction/synthanol/trinary - name = "Trinary" - id = "trinary" - result = "trinary" - required_reagents = list("synthanol" = 1, "limejuice" = 1, "orangejuice" = 1) - result_amount = 3 - mix_message = "The ingredients mix into a colorful substance." - -/datum/reagent/ethanol/synthanol/servo - name = "Servo" - id = "servo" - description = "A drink containing some organic ingredients, but meant only for synthetics." - reagent_state = LIQUID - color = "#5b3210" - alcohol_perc = 0.25 - -/datum/chemical_reaction/synthanol/servo - name = "Servo" - id = "servo" - result = "servo" - required_reagents = list("synthanol" = 2, "cream" = 1, "hot_coco" = 1) - result_amount = 4 - mix_message = "The ingredients mix into a dark brown substance." - -/datum/reagent/ethanol/synthanol/uplink - name = "Uplink" - id = "uplink" - description = "A potent mix of alcohol and synthanol. Will only work on synthetics." - reagent_state = LIQUID - color = "#e7ae04" - alcohol_perc = 0.15 - -/datum/chemical_reaction/synthanol/uplink - name = "Uplink" - id = "uplink" - result = "uplink" - required_reagents = list("rum" = 1, "vodka" = 1, "tequila" = 1, "whiskey" = 1, "synthanol" = 1) - result_amount = 5 - mix_message = "The chemicals mix to create a shiny, orange substance." - -/datum/reagent/ethanol/synthanol/synthnsoda - name = "Synth 'n Soda" - id = "synthnsoda" - description = "The classic drink adjusted for a robot's tastes." - reagent_state = LIQUID - color = "#7204e7" - alcohol_perc = 0.25 - -/datum/chemical_reaction/synthanol/synthnsoda - name = "Synth 'n Soda" - id = "synthnsoda" - result = "synthnsoda" - required_reagents = list("synthanol" = 1, "cola" = 1) - result_amount = 2 - mix_message = "The chemicals mix to create a smooth, fizzy substance." - -/datum/reagent/ethanol/synthanol/synthignon - name = "Synthignon" - id = "synthignon" - description = "Someone mixed wine and alcohol for robots. Hope you're proud of yourself." - reagent_state = LIQUID - color = "#d004e7" - alcohol_perc = 0.25 - -/datum/chemical_reaction/synthanol/synthignon - name = "Synthignon" - id = "synthignon" - result = "synthignon" - required_reagents = list("synthanol" = 1, "wine" = 1) - result_amount = 2 - mix_message = "The chemicals mix to create a fine, red substance." - -// ROBOT ALCOHOL ENDS diff --git a/code/modules/reagents/newchem/food.dm b/code/modules/reagents/newchem/food.dm deleted file mode 100644 index 7f529b6b815..00000000000 --- a/code/modules/reagents/newchem/food.dm +++ /dev/null @@ -1,557 +0,0 @@ -/datum/reagent/questionmark // food poisoning - name = "????" - id = "????" - description = "A gross and unidentifiable substance." - reagent_state = LIQUID - color = "#63DE63" - metabolization_rate = 0.4 - -/datum/reagent/questionmark/reaction_mob(mob/living/M, method=TOUCH, volume) - if(method == INGEST) - M.Stun(2) - M.Weaken(2) - to_chat(M, "Ugh! Eating that was a terrible idea!") - M.ForceContractDisease(new /datum/disease/food_poisoning(0)) - -/datum/reagent/egg - name = "Egg" - id = "egg" - description = "A runny and viscous mixture of clear and yellow fluids." - reagent_state = LIQUID - color = "#F0C814" - -/datum/reagent/egg/on_mob_life(mob/living/M) - if(prob(8)) - M.emote("fart") - if(prob(3)) - M.reagents.add_reagent("cholesterol", rand(1,2)) - ..() - -/datum/reagent/triple_citrus - name = "Triple Citrus" - id = "triple_citrus" - description = "A refreshing mixed drink of orange, lemon and lime juice." - reagent_state = LIQUID - color = "#23A046" - -/datum/chemical_reaction/triple_citrus - name = "triple_citrus" - id = "triple_citrus" - result = "triple_citrus" - required_reagents = list("lemonjuice" = 1, "limejuice" = 1, "orangejuice" = 1) - result_amount = 3 - mix_message = "The citrus juices begin to blend together." - mix_sound = 'sound/goonstation/misc/drinkfizz.ogg' - -/datum/reagent/triple_citrus/reaction_mob(mob/living/M, method=TOUCH, volume) - if(method == INGEST) - M.adjustToxLoss(-rand(1,2)) - -/datum/reagent/corn_starch - name = "Corn Starch" - id = "corn_starch" - description = "The powdered starch of maize, derived from the kernel's endosperm. Used as a thickener for gravies and puddings." - reagent_state = LIQUID - color = "#C8A5DC" - -/datum/chemical_reaction/corn_syrup - name = "corn_syrup" - id = "corn_syrup" - result = "corn_syrup" - required_reagents = list("corn_starch" = 1, "sacid" = 1) - result_amount = 2 - min_temp = 374 - mix_message = "The mixture forms a viscous, clear fluid!" - -/datum/reagent/corn_syrup - name = "Corn Syrup" - id = "corn_syrup" - description = "A sweet syrup derived from corn starch that has had its starches converted into maltose and other sugars." - reagent_state = LIQUID - color = "#C8A5DC" - -/datum/reagent/corn_syrup/on_mob_life(mob/living/M) - M.reagents.add_reagent("sugar", 1.2) - ..() - -/datum/chemical_reaction/vhfcs - name = "vhfcs" - id = "vhfcs" - result = "vhfcs" - required_reagents = list("corn_syrup" = 1) - required_catalysts = list("enzyme" = 1) - result_amount = 1 - mix_message = "The mixture emits a sickly-sweet smell." - -/datum/reagent/vhfcs - name = "Very-high-fructose corn syrup" - id = "vhfcs" - description = "An incredibly sweet syrup, created from corn syrup treated with enzymes to convert its sugars into fructose." - reagent_state = LIQUID - color = "#C8A5DC" - -/datum/reagent/vhfcs/on_mob_life(mob/living/M) - M.reagents.add_reagent("sugar", 2.4) - ..() - -/datum/chemical_reaction/cola - name = "cola" - id = "cola" - result = "cola" - required_reagents = list("carbon" = 1, "oxygen" = 1, "water" = 1, "sugar" = 1) - result_amount = 4 - mix_message = "The mixture begins to fizz." - mix_sound = 'sound/goonstation/misc/drinkfizz.ogg' - -/datum/reagent/honey - name = "Honey" - id = "honey" - description = "A sweet substance produced by bees through partial digestion. Bee barf." - reagent_state = LIQUID - color = "#d3a308" - -/datum/reagent/honey/on_mob_life(mob/living/M) - M.reagents.add_reagent("sugar", 0.4) - if(prob(20)) - M.heal_organ_damage(3,1) - ..() - -/datum/reagent/chocolate - name = "Chocolate" - id = "chocolate" - description = "Chocolate is a delightful product derived from the seeds of the theobroma cacao tree." - reagent_state = LIQUID - nutriment_factor = 5 * REAGENTS_METABOLISM //same as pure cocoa powder, because it makes no sense that chocolate won't fill you up and make you fat - color = "#2E2418" - -/datum/reagent/chocolate/on_mob_life(mob/living/M) - M.nutrition += nutriment_factor - M.reagents.add_reagent("sugar", 0.8) - ..() - -/datum/reagent/chocolate/reaction_turf(turf/T, volume) - if(volume >= 5 && !istype(T, /turf/space)) - new /obj/item/weapon/reagent_containers/food/snacks/choc_pile(T) - -/datum/reagent/mugwort - name = "Mugwort" - id = "mugwort" - description = "A rather bitter herb once thought to hold magical protective properties." - reagent_state = LIQUID - color = "#21170E" - -/datum/reagent/mugwort/on_mob_life(mob/living/M) - if(ishuman(M) && M.mind) - if(M.mind.special_role == SPECIAL_ROLE_WIZARD) - M.adjustToxLoss(-1*REM) - M.adjustOxyLoss(-1*REM) - M.adjustBruteLoss(-1*REM) - M.adjustFireLoss(-1*REM) - ..() - -/datum/reagent/porktonium - name = "Porktonium" - id = "porktonium" - description = "A highly-radioactive pork byproduct first discovered in hotdogs." - reagent_state = LIQUID - color = "#AB5D5D" - metabolization_rate = 0.2 - overdose_threshold = 133 - -/datum/reagent/porktonium/overdose_process(mob/living/M, severity) - if(prob(15)) - M.reagents.add_reagent("cholesterol", rand(1,3)) - if(prob(8)) - M.reagents.add_reagent("radium", 15) - M.reagents.add_reagent("cyanide", 10) - -/datum/reagent/fungus - name = "Space fungus" - id = "fungus" - description = "Scrapings of some unknown fungus found growing on the station walls." - reagent_state = LIQUID - color = "#C87D28" - -/datum/reagent/fungus/reaction_mob(mob/living/M, method=TOUCH, volume) - if(method == INGEST) - var/ranchance = rand(1,10) - if(ranchance == 1) - to_chat(M, "You feel very sick.") - M.reagents.add_reagent("toxin", rand(1,5)) - else if(ranchance <= 5) - to_chat(M, "That tasted absolutely FOUL.") - M.ForceContractDisease(new /datum/disease/food_poisoning(0)) - else - to_chat(M, "Yuck!") - -/datum/reagent/chicken_soup - name = "Chicken soup" - id = "chicken_soup" - description = "An old household remedy for mild illnesses." - reagent_state = LIQUID - color = "#B4B400" - metabolization_rate = 0.2 - -/datum/reagent/chicken_soup/on_mob_life(mob/living/M) - M.nutrition += 2 - ..() - -/datum/reagent/msg - name = "Monosodium glutamate" - id = "msg" - description = "Monosodium Glutamate is a sodium salt known chiefly for its use as a controversial flavor enhancer." - reagent_state = LIQUID - color = "#F5F5F5" - metabolization_rate = 0.2 - -/datum/reagent/msg/reaction_mob(mob/living/M, method=TOUCH, volume) - if(method == INGEST) - to_chat(M, "That tasted amazing!") - - -/datum/reagent/msg/on_mob_life(mob/living/M) - if(prob(5)) - if(prob(10)) - M.adjustToxLoss(rand(2.4)) - if(prob(7)) - to_chat(M, "A horrible migraine overpowers you.") - M.Stun(rand(2,5)) - ..() - -/datum/reagent/cheese - name = "Cheese" - id = "cheese" - description = "Some cheese. Pour it out to make it solid." - reagent_state = SOLID - color = "#FFFF00" - metabolization_rate = 0 //heheheh - - -/datum/reagent/cheese/on_mob_life(mob/living/M) - if(prob(3)) - M.reagents.add_reagent("cholesterol", rand(1,2)) - ..() - -/datum/reagent/cheese/reaction_turf(turf/T, volume) - if(volume >= 5 && !istype(T, /turf/space)) - new /obj/item/weapon/reagent_containers/food/snacks/cheesewedge(T) - -/datum/chemical_reaction/cheese - name = "cheese" - id = "cheese" - result = "cheese" - required_reagents = list("vomit" = 1, "milk" = 1) - result_amount = 1 - mix_message = "The mixture curdles up." - -/datum/chemical_reaction/cheese/on_reaction(datum/reagents/holder) - var/turf/T = get_turf(holder.my_atom) - T.visible_message("A faint cheesy smell drifts through the air...") - -/datum/reagent/fake_cheese - name = "Cheese substitute" - id = "fake_cheese" - description = "A cheese-like substance derived loosely from actual cheese." - reagent_state = LIQUID - color = "#B2B139" - overdose_threshold = 50 - -/datum/reagent/fake_cheese/overdose_process(mob/living/M, severity) - if(prob(8)) - to_chat(M, "You feel something squirming in your stomach. Your thoughts turn to cheese and you begin to sweat.") - M.adjustToxLoss(rand(1,2)) - -/datum/reagent/weird_cheese - name = "Weird cheese" - id = "weird_cheese" - description = "Hell, I don't even know if this IS cheese. Whatever it is, it ain't normal. If you want to, pour it out to make it solid." - reagent_state = SOLID - color = "#50FF00" - metabolization_rate = 0 //heheheh - addiction_chance = 5 - -/datum/reagent/weird_cheese/on_mob_life(mob/living/M) - if(prob(5)) - M.reagents.add_reagent("cholesterol", rand(1,3)) - ..() - -/datum/reagent/weird_cheese/reaction_turf(turf/T, volume) - if(volume >= 5 && !istype(T, /turf/space)) - new /obj/item/weapon/reagent_containers/food/snacks/weirdcheesewedge(T) - -/datum/chemical_reaction/weird_cheese - name = "Weird cheese" - id = "weird_cheese" - result = "weird_cheese" - required_reagents = list("green_vomit" = 1, "milk" = 1) - result_amount = 1 - mix_message = "The disgusting mixture sloughs together horribly, emitting a foul stench." - mix_sound = 'sound/goonstation/misc/gurggle.ogg' - -/datum/chemical_reaction/weird_cheese/on_reaction(datum/reagents/holder) - var/turf/T = get_turf(holder.my_atom) - T.visible_message("A horrible smell assaults your nose! What in space is it?") - -/datum/reagent/beans - name = "Refried beans" - id = "beans" - description = "A dish made of mashed beans cooked with lard." - reagent_state = LIQUID - color = "#684435" - -/datum/reagent/beans/on_mob_life(mob/living/M) - if(prob(10)) - M.emote("fart") - ..() - -/datum/reagent/bread - name = "Bread" - id = "bread" - description = "Bread! Yep, bread." - reagent_state = SOLID - color = "#9C5013" - -/datum/reagent/bread/reaction_turf(turf/T, volume) - if(volume >= 5 && !istype(T, /turf/space)) - new /obj/item/weapon/reagent_containers/food/snacks/breadslice(T) - -/datum/reagent/vomit - name = "Vomit" - id = "vomit" - description = "Looks like someone lost their lunch. And then collected it. Yuck." - reagent_state = LIQUID - color = "#FFFF00" - -/datum/reagent/vomit/reaction_turf(turf/T, volume) - if(volume >= 5 && !istype(T, /turf/space)) - new /obj/effect/decal/cleanable/vomit(T) - playsound(T, 'sound/effects/splat.ogg', 50, 1, -3) - -/datum/reagent/greenvomit - name = "Green vomit" - id = "green_vomit" - description = "Whoa, that can't be natural. That's horrible." - reagent_state = LIQUID - color = "#78FF74" - -/datum/reagent/greenvomit/reaction_turf(turf/T, volume) - if(volume >= 5 && !istype(T, /turf/space)) - new /obj/effect/decal/cleanable/vomit/green(T) - playsound(T, 'sound/effects/splat.ogg', 50, 1, -3) - - -/datum/reagent/ectoplasm - name = "Ectoplasm" - id = "ectoplasm" - description = "A bizarre gelatinous substance supposedly derived from ghosts." - reagent_state = LIQUID - color = "#8EAE7B" - process_flags = ORGANIC | SYNTHETIC //Because apparently ghosts in the shell - -/datum/reagent/ectoplasm/reaction_mob(mob/living/M, method=TOUCH, volume) - if(method == INGEST) - var/spooky_eat = pick("Ugh, why did you eat that? Your mouth feels haunted. Haunted with bad flavors.", "Ugh, why did you eat that? It has the texture of ham aspic. From the 1950s. Left out in the sun.", "Ugh, why did you eat that? It tastes like a ghost fart.", "Ugh, why did you eat that? It tastes like flavor died.") - to_chat(M, "[spooky_eat]") - -/datum/reagent/ectoplasm/on_mob_life(mob/living/M) - var/spooky_message = pick("You notice something moving out of the corner of your eye, but nothing is there...", "Your eyes twitch, you feel like something you can't see is here...", "You've got the heebie-jeebies.", "You feel uneasy.", "You shudder as if cold...", "You feel something gliding across your back...") - if(prob(8)) - to_chat(M, "[spooky_message]") - ..() - -/datum/reagent/ectoplasm/reaction_turf(turf/T, volume) - if(volume >= 10 && !istype(T, /turf/space)) - new /obj/item/weapon/reagent_containers/food/snacks/ectoplasm(T) - -/datum/reagent/soybeanoil - name = "Space-soybean oil" - id = "soybeanoil" - description = "An oil derived from extra-terrestrial soybeans." - reagent_state = LIQUID - color = "#B1B0B0" - -/datum/reagent/soybeanoil/on_mob_life(mob/living/M) - if(prob(10)) - M.reagents.add_reagent("cholesterol", rand(1,3)) - if(prob(8)) - M.reagents.add_reagent("porktonium", 5) - ..() - -/datum/reagent/hydrogenated_soybeanoil - name = "Partially hydrogenated space-soybean oil" - id = "hydrogenated_soybeanoil" - description = "An oil derived from extra-terrestrial soybeans, with additional hydrogen atoms added to convert it into a saturated form." - reagent_state = LIQUID - color = "#B1B0B0" - metabolization_rate = 0.2 - overdose_threshold = 75 - -/datum/reagent/hydrogenated_soybeanoil/on_mob_life(mob/living/M) - if(prob(15)) - M.reagents.add_reagent("cholesterol", rand(1,3)) - if(prob(8)) - M.reagents.add_reagent("porktonium", 5) - if(volume >= 75) - metabolization_rate = 0.4 - else - metabolization_rate = 0.2 - ..() - -/datum/reagent/hydrogenated_soybeanoil/overdose_process(mob/living/M, severity) - if(prob(33)) - to_chat(M, "You feel horribly weak.") - if(prob(10)) - to_chat(M, "You cannot breathe!") - M.adjustOxyLoss(5) - if(prob(5)) - to_chat(M, "You feel a sharp pain in your chest!") - M.adjustOxyLoss(25) - M.Stun(5) - M.Paralyse(10) - -/datum/chemical_reaction/hydrogenated_soybeanoil - name = "Partially hydrogenated space-soybean oil" - id = "hydrogenated_soybeanoil" - result = "hydrogenated_soybeanoil" - required_reagents = list("soybeanoil" = 1, "hydrogen" = 1) - result_amount = 2 - min_temp = 520 - mix_message = "The mixture emits a burnt, oily smell." - -/datum/reagent/meatslurry - name = "Meat Slurry" - id = "meatslurry" - description = "A paste comprised of highly-processed organic material. Uncomfortably similar to deviled ham spread." - reagent_state = LIQUID - color = "#EBD7D7" - -/datum/reagent/meatslurry/on_mob_life(mob/living/M) - if(prob(4)) - M.reagents.add_reagent("cholesterol", rand(1,3)) - ..() - -/datum/reagent/meatslurry/reaction_turf(turf/T, volume) - if(volume >= 5 && prob(10) && !istype(T, /turf/space)) - new /obj/effect/decal/cleanable/blood/gibs/cleangibs(T) - playsound(T, 'sound/effects/splat.ogg', 50, 1, -3) - -/datum/chemical_reaction/meatslurry - name = "Meat Slurry" - id = "meatslurry" - result = "meatslurry" - required_reagents = list("corn_starch" = 1, "blood" = 1) - result_amount = 2 - mix_message = "The mixture congeals into a bloody mass." - mix_sound = 'sound/effects/blobattack.ogg' - -/datum/reagent/mashedpotatoes - name = "Mashed potatoes" - id = "mashedpotatoes" - description = "A starchy food paste made from boiled potatoes." - reagent_state = SOLID - color = "#D6D9C1" - -/datum/reagent/gravy - name = "Gravy" - id = "gravy" - description = "A savory sauce made from a simple meat-dripping roux and milk." - reagent_state = LIQUID - color = "#B4641B" - -/datum/chemical_reaction/gravy - name = "Gravy" - id = "gravy" - result = "gravy" - required_reagents = list("porktonium" = 1, "corn_starch" = 1, "milk" = 1) - result_amount = 3 - min_temp = 374 - mix_message = "The substance thickens and takes on a meaty odor." - -/datum/reagent/beff - name = "Beff" - id = "beff" - description = "An advanced blend of mechanically-recovered meat and textured synthesized protein product notable for its unusual crystalline grain when sliced." - reagent_state = SOLID - color = "#AC7E67" - -/datum/reagent/beff/on_mob_life(mob/living/M) - if(prob(5)) - M.reagents.add_reagent("cholesterol", rand(1,3)) - if(prob(8)) - M.reagents.add_reagent(pick("blood", "corn_syrup", "synthflesh", "hydrogenated_soybeanoil", "porktonium", "toxic_slurry"), 0.8) - else if(prob(6)) - to_chat(M, "[pick("You feel ill.","Your stomach churns.","You feel queasy.","You feel sick.")]") - M.emote(pick("groan","moan")) - ..() - -/datum/chemical_reaction/beff - name = "Beff" - id = "beff" - result = "beff" - required_reagents = list("hydrogenated_soybeanoil" = 2, "meatslurry" = 1, "plasma" = 1) - result_amount = 4 - mix_message = "The mixture solidifies, taking a crystalline appearance." - mix_sound = 'sound/effects/blobattack.ogg' - -/datum/reagent/pepperoni - name = "Pepperoni" - id = "pepperoni" - description = "An Italian-American variety of salami usually made from beef and pork" - reagent_state = SOLID - color = "#AC7E67" - -/datum/reagent/pepperoni/reaction_mob(mob/living/M, method=TOUCH, volume) - if(method == TOUCH) - if(ishuman(M)) - var/mob/living/carbon/human/H = M - - if(H.wear_mask) - to_chat(H, "The pepperoni bounces off your mask!") - return - - if(H.head) - to_chat(H, "Your mask protects you from the errant pepperoni!") - return - - if(prob(50)) - M.adjustBruteLoss(1) - playsound(M, 'sound/effects/woodhit.ogg', 50, 1) - to_chat(M, "A slice of pepperoni slaps you!") - else - M.emote("burp") - to_chat(M, "My goodness, that was tasty!") - - -/datum/chemical_reaction/pepperoni - name = "Pepperoni" - id = "pepperoni" - result = "pepperoni" - required_reagents = list("beff" = 1, "saltpetre" = 1, "synthflesh" = 1) - result_amount = 2 - mix_message = "The beff and the synthflesh combine to form a smoky red log." - mix_sound = 'sound/effects/blobattack.ogg' - -/datum/reagent/cholesterol - name = "cholesterol" - id = "cholesterol" - description = "Pure cholesterol. Probably not very good for you." - reagent_state = LIQUID - color = "#FFFAC8" - -/datum/reagent/cholesterol/on_mob_life(mob/living/M) - if(volume >= 25 && prob(volume*0.15)) - to_chat(M, "Your chest feels [pick("weird","uncomfortable","nasty","gross","odd","unusual","warm")]!") - M.adjustToxLoss(rand(1,2)) - else if(volume >= 45 && prob(volume*0.08)) - to_chat(M, "Your chest [pick("hurts","stings","aches","burns")]!") - M.adjustToxLoss(rand(2,4)) - M.Stun(1) - else if(volume >= 150 && prob(volume*0.01)) - to_chat(M, "Your chest is burning with pain!") - M.Stun(1) - M.Weaken(1) - if(ishuman(M)) - var/mob/living/carbon/human/H = M - if(!H.heart_attack) - H.heart_attack = 1 - ..() \ No newline at end of file diff --git a/code/modules/reagents/newchem/newchem_procs.dm b/code/modules/reagents/newchem/newchem_procs.dm deleted file mode 100644 index 7ad083407d9..00000000000 --- a/code/modules/reagents/newchem/newchem_procs.dm +++ /dev/null @@ -1,212 +0,0 @@ -#define ADDICTION_TIME 4800 //8 minutes - -/datum/reagent - var/overdose_threshold = 0 - var/addiction_chance = 0 - var/addiction_stage = 1 - var/last_addiction_dose = 0 - var/overdosed = 0 // You fucked up and this is now triggering it's overdose effects, purge that shit quick. - var/current_cycle = 1 - -/datum/reagents/proc/metabolize(mob/living/M) - if(M) - chem_temp = M.bodytemperature - handle_reactions() - for(var/A in reagent_list) - var/datum/reagent/R = A - if(!istype(R)) // How are non-reagents ending up in the reagents_list? - continue - if(!R.holder) - continue - if(!M) - M = R.holder.my_atom - if(ishuman(M)) - var/mob/living/carbon/human/H = M - //Check if this mob's species is set and can process this type of reagent - var/can_process = 0 - //If we somehow avoided getting a species or reagent_tag set, we'll assume we aren't meant to process ANY reagents (CODERS: SET YOUR SPECIES AND TAG!) - if(H.species && H.species.reagent_tag) - if((R.process_flags & SYNTHETIC) && (H.species.reagent_tag & PROCESS_SYN)) //SYNTHETIC-oriented reagents require PROCESS_SYN - can_process = 1 - if((R.process_flags & ORGANIC) && (H.species.reagent_tag & PROCESS_ORG)) //ORGANIC-oriented reagents require PROCESS_ORG - can_process = 1 - //Species with PROCESS_DUO are only affected by reagents that affect both organics and synthetics, like acid and hellwater - if((R.process_flags & ORGANIC) && (R.process_flags & SYNTHETIC) && (H.species.reagent_tag & PROCESS_DUO)) - can_process = 1 - - //If handle_reagents returns 0, it's doing the reagent removal on its own - var/species_handled = !(H.species.handle_reagents(H, R)) - can_process = can_process && !species_handled - //If the mob can't process it, remove the reagent at it's normal rate without doing any addictions, overdoses, or on_mob_life() for the reagent - if(can_process == 0) - if(!species_handled) - R.holder.remove_reagent(R.id, R.metabolization_rate) - continue - //We'll assume that non-human mobs lack the ability to process synthetic-oriented reagents (adjust this if we need to change that assumption) - else - if(R.process_flags == SYNTHETIC) - R.holder.remove_reagent(R.id, R.metabolization_rate) - continue - //If you got this far, that means we can process whatever reagent this iteration is for. Handle things normally from here. - if(M && R) - R.on_mob_life(M) - if(R.volume >= R.overdose_threshold && !R.overdosed && R.overdose_threshold > 0) - R.overdosed = 1 - R.overdose_start(M) - if(R.volume < R.overdose_threshold && R.overdosed) - R.overdosed = 0 - if(R.overdosed) - R.overdose_process(M, R.volume >= R.overdose_threshold*2 ? 2 : 1) - - for(var/A in addiction_list) - var/datum/reagent/R = A - if(M && R) - if(R.addiction_stage < 5) - if(prob(5)) - R.addiction_stage++ - switch(R.addiction_stage) - if(1) - R.addiction_act_stage1(M) - if(2) - R.addiction_act_stage2(M) - if(3) - R.addiction_act_stage3(M) - if(4) - R.addiction_act_stage4(M) - if(5) - R.addiction_act_stage5(M) - if(prob(20) && (world.timeofday > (R.last_addiction_dose + ADDICTION_TIME))) //Each addiction lasts 8 minutes before it can end - to_chat(M, "You no longer feel reliant on [R.name]!") - addiction_list.Remove(R) - update_total() - -/datum/reagents/proc/death_metabolize(mob/living/M) - if(!M) - return - if(M.stat != DEAD) //what part of DEATH_metabolize don't you get? - return - for(var/A in reagent_list) - var/datum/reagent/R = A - if(!istype(R)) - continue - if(M && R) - R.on_mob_death(M) - -/datum/reagents/proc/overdose_list() - var/od_chems[0] - for(var/datum/reagent/R in reagent_list) - if(R.overdosed) - od_chems.Add(R.id) - return od_chems - - -/datum/reagents/proc/reagent_on_tick() - for(var/datum/reagent/R in reagent_list) - R.on_tick() - return - -// Called every time reagent containers process. -/datum/reagent/proc/on_tick(data) - return - -// Called when the reagent container is hit by an explosion -/datum/reagent/proc/on_ex_act(severity) - return - -// Called if the reagent has passed the overdose threshold and is set to be triggering overdose effects -/datum/reagent/proc/overdose_process(mob/living/M, severity) - var/effect = rand(1, 100) - severity - if(effect <= 8) - M.adjustToxLoss(severity) - return effect - -/datum/reagent/proc/overdose_start(mob/living/M) - return - -/datum/reagent/proc/addiction_act_stage1(mob/living/M) - return - -/datum/reagent/proc/addiction_act_stage2(mob/living/M) - if(prob(8)) - M.emote("shiver") - if(prob(8)) - M.emote("sneeze") - if(prob(4)) - to_chat(M, "You feel a dull headache.") - -/datum/reagent/proc/addiction_act_stage3(mob/living/M) - if(prob(8)) - M.emote("twitch_s") - if(prob(8)) - M.emote("shiver") - if(prob(4)) - to_chat(M, "You begin craving [name]!") - -/datum/reagent/proc/addiction_act_stage4(mob/living/M) - if(prob(8)) - M.emote("twitch") - if(prob(4)) - to_chat(M, "You have the strong urge for some [name]!") - if(prob(4)) - to_chat(M, "You REALLY crave some [name]!") - -/datum/reagent/proc/addiction_act_stage5(mob/living/M) - if(prob(8)) - M.emote("twitch") - if(prob(6)) - to_chat(M, "Your stomach lurches painfully!") - M.visible_message("[M] gags and retches!") - M.Stun(rand(2,4)) - M.Weaken(rand(2,4)) - if(prob(5)) - to_chat(M, "You feel like you can't live without [name]!") - if(prob(5)) - to_chat(M, "You would DIE for some [name] right now!") - -/datum/reagent/proc/reagent_deleted() - return - -var/list/chemical_mob_spawn_meancritters = list() // list of possible hostile mobs -var/list/chemical_mob_spawn_nicecritters = list() // and possible friendly mobs -/datum/chemical_reaction/proc/chemical_mob_spawn(datum/reagents/holder, amount_to_spawn, reaction_name, mob_faction = "chemicalsummon") - if(holder && holder.my_atom) - if(chemical_mob_spawn_meancritters.len <= 0 || chemical_mob_spawn_nicecritters.len <= 0) - for(var/T in typesof(/mob/living/simple_animal)) - var/mob/living/simple_animal/SA = T - switch(initial(SA.gold_core_spawnable)) - if(CHEM_MOB_SPAWN_HOSTILE) - chemical_mob_spawn_meancritters += T - if(CHEM_MOB_SPAWN_FRIENDLY) - chemical_mob_spawn_nicecritters += T - var/atom/A = holder.my_atom - var/turf/T = get_turf(A) - var/area/my_area = get_area(T) - var/message = "A [reaction_name] reaction has occured in [my_area.name]. (JMP)" - message += " (VV)" - - var/mob/M = get(A, /mob) - if(M) - message += " - Carried By: [key_name_admin(M)](?) (FLW)" - else - message += " - Last Fingerprint: [(A.fingerprintslast ? A.fingerprintslast : "N/A")]" - - message_admins(message, 0, 1) - - playsound(get_turf(holder.my_atom), 'sound/effects/phasein.ogg', 100, 1) - - for(var/mob/living/carbon/C in viewers(get_turf(holder.my_atom), null)) - C.flash_eyes() - for(var/i = 1, i <= amount_to_spawn, i++) - var/chosen - if(reaction_name == "Friendly Gold Slime") - chosen = pick(chemical_mob_spawn_nicecritters) - else - chosen = pick(chemical_mob_spawn_meancritters) - var/mob/living/simple_animal/C = new chosen - C.faction |= mob_faction - C.forceMove(get_turf(holder.my_atom)) - if(prob(50)) - for(var/j = 1, j <= rand(1, 3), j++) - step(C, pick(NORTH,SOUTH,EAST,WEST)) - -#undef ADDICTION_TIME \ No newline at end of file diff --git a/code/modules/reagents/oldchem/chemical_reaction/_chemical_reaction_base.dm b/code/modules/reagents/oldchem/chemical_reaction/_chemical_reaction_base.dm deleted file mode 100644 index 3b4cc507415..00000000000 --- a/code/modules/reagents/oldchem/chemical_reaction/_chemical_reaction_base.dm +++ /dev/null @@ -1,23 +0,0 @@ -/////////////////////////////////////////////////////////////////////////////////// -/datum/chemical_reaction - var/name = null - var/id = null - var/result = null - var/list/required_reagents = list() - var/list/required_catalysts = list() - - // Both of these variables are mostly going to be used with slime cores - but if you want to, you can use them for other things - var/atom/required_container = null // the container required for the reaction to happen - var/required_other = 0 // an integer required for the reaction to happen - - var/result_amount = 0 - var/secondary = 0 // set to nonzero if secondary reaction - var/list/secondary_results = list() //additional reagents produced by the reaction - var/min_temp = 0 //Minimum temperature required for the reaction to occur (heat to/above this). min_temp = 0 means no requirement - var/max_temp = 9999 //Maximum temperature allowed for the reaction to occur (cool to/below this). - var/mix_message = "The solution begins to bubble." - var/mix_sound = 'sound/effects/bubbles.ogg' - var/no_message = 0 - -/datum/chemical_reaction/proc/on_reaction(datum/reagents/holder, created_volume) - return \ No newline at end of file diff --git a/code/modules/reagents/oldchem/chemical_reaction/chemical_reaction_harm.dm b/code/modules/reagents/oldchem/chemical_reaction/chemical_reaction_harm.dm deleted file mode 100644 index afcd0d398ce..00000000000 --- a/code/modules/reagents/oldchem/chemical_reaction/chemical_reaction_harm.dm +++ /dev/null @@ -1,71 +0,0 @@ -//Anything for harm or hostile intents go here (explosions, EMPs, thermite, mutagen) -/datum/chemical_reaction/explosion_potassium - name = "Explosion" - id = "explosion_potassium" - result = null - required_reagents = list("water" = 1, "potassium" = 1) - result_amount = 2 - mix_message = "The mixture explodes!" - -/datum/chemical_reaction/explosion_potassium/on_reaction(datum/reagents/holder, created_volume) - var/datum/effect/system/reagents_explosion/e = new() - e.set_up(round (created_volume/10, 1), holder.my_atom, 0, 0) - e.start() - holder.clear_reagents() - -/datum/chemical_reaction/emp_pulse - name = "EMP Pulse" - id = "emp_pulse" - result = null - required_reagents = list("uranium" = 1, "iron" = 1) // Yes, laugh, it's the best recipe I could think of that makes a little bit of sense - result_amount = 2 - -/datum/chemical_reaction/emp_pulse/on_reaction(datum/reagents/holder, created_volume) - var/location = get_turf(holder.my_atom) - // 100 created volume = 4 heavy range & 7 light range. A few tiles smaller than traitor EMP grandes. - // 200 created volume = 8 heavy range & 14 light range. 4 tiles larger than traitor EMP grenades. - empulse(location, round(created_volume / 24), round(created_volume / 14), 1) - holder.clear_reagents() - -/datum/chemical_reaction/mutagen - name = "Unstable mutagen" - id = "mutagen" - result = "mutagen" - required_reagents = list("radium" = 1, "plasma" = 1, "chlorine" = 1) - result_amount = 3 - mix_message = "The substance turns neon green and bubbles unnervingly." - -/datum/chemical_reaction/thermite - name = "Thermite" - id = "thermite" - result = "thermite" - required_reagents = list("aluminum" = 1, "iron" = 1, "oxygen" = 1) - result_amount = 3 - -/datum/chemical_reaction/glycerol - name = "Glycerol" - id = "glycerol" - result = "glycerol" - required_reagents = list("cornoil" = 3, "sacid" = 1) - result_amount = 1 - -/datum/chemical_reaction/nitroglycerin - name = "Nitroglycerin" - id = "nitroglycerin" - result = "nitroglycerin" - required_reagents = list("glycerol" = 1, "facid" = 1, "sacid" = 1) - result_amount = 2 - -/datum/chemical_reaction/nitroglycerin/on_reaction(datum/reagents/holder, created_volume) - var/datum/effect/system/reagents_explosion/e = new() - e.set_up(round(created_volume/2, 1), holder.my_atom, 0, 0) - e.start() - holder.clear_reagents() - -/datum/chemical_reaction/condensedcapsaicin - name = "Condensed Capsaicin" - id = "condensedcapsaicin" - result = "condensedcapsaicin" - required_reagents = list("capsaicin" = 2) - required_catalysts = list("plasma" = 5) - result_amount = 1 \ No newline at end of file diff --git a/code/modules/reagents/oldchem/chemical_reaction/chemical_reaction_med.dm b/code/modules/reagents/oldchem/chemical_reaction/chemical_reaction_med.dm deleted file mode 100644 index 0550813849c..00000000000 --- a/code/modules/reagents/oldchem/chemical_reaction/chemical_reaction_med.dm +++ /dev/null @@ -1,44 +0,0 @@ -/datum/chemical_reaction/hydrocodone - name = "Hydrocodone" - id = "hydrocodone" - result = "hydrocodone" - required_reagents = list("morphine" = 1, "sacid" = 1, "water" = 1, "oil" = 1) - result_amount = 2 - -/datum/chemical_reaction/mitocholide - name = "mitocholide" - id = "mitocholide" - result = "mitocholide" - required_reagents = list("synthflesh" = 1, "cryoxadone" = 1, "plasma" = 1) - result_amount = 3 - -/datum/chemical_reaction/cryoxadone - name = "Cryoxadone" - id = "cryoxadone" - result = "cryoxadone" - required_reagents = list("cryostylane" = 1, "plasma" = 1, "acetone" = 1, "mutagen" = 1) - result_amount = 4 - mix_message = "The solution bubbles softly." - mix_sound = 'sound/goonstation/misc/drinkfizz.ogg' - -/datum/chemical_reaction/spaceacillin - name = "Spaceacillin" - id = "spaceacillin" - result = "spaceacillin" - required_reagents = list("fungus" = 1, "ethanol" = 1) - result_amount = 2 - mix_message = "The solvent extracts an antibiotic compound from the fungus." - -/datum/chemical_reaction/rezadone - name = "Rezadone" - id = "rezadone" - result = "rezadone" - required_reagents = list("carpotoxin" = 1, "spaceacillin" = 1, "copper" = 1) - result_amount = 3 - -/datum/chemical_reaction/sterilizine - name = "Sterilizine" - id = "sterilizine" - result = "sterilizine" - required_reagents = list("antihol" = 2, "chlorine" = 1) - result_amount = 3 diff --git a/code/modules/reagents/oldchem/chemical_reaction/chemical_reaction_misc.dm b/code/modules/reagents/oldchem/chemical_reaction/chemical_reaction_misc.dm deleted file mode 100644 index 8a5dedf218b..00000000000 --- a/code/modules/reagents/oldchem/chemical_reaction/chemical_reaction_misc.dm +++ /dev/null @@ -1,147 +0,0 @@ -// foam and foam precursor - -/datum/chemical_reaction/surfactant - name = "Foam surfactant" - id = "foam surfactant" - result = "fluorosurfactant" - required_reagents = list("fluorine" = 2, "carbon" = 2, "sacid" = 1) - result_amount = 5 - mix_message = "A head of foam results from the mixture's constant fizzing." - -/datum/chemical_reaction/foam - name = "Foam" - id = "foam" - result = null - required_reagents = list("fluorosurfactant" = 1, "water" = 1) - result_amount = 2 - -/datum/chemical_reaction/foam/on_reaction(datum/reagents/holder, created_volume) - var/location = get_turf(holder.my_atom) - holder.my_atom.visible_message("The solution spews out foam!") - - var/datum/effect/system/foam_spread/s = new() - s.set_up(created_volume, location, holder, 0) - s.start() - holder.clear_reagents() - - -/datum/chemical_reaction/metalfoam - name = "Metal Foam" - id = "metalfoam" - result = null - required_reagents = list("aluminum" = 3, "fluorosurfactant" = 1, "sacid" = 1) - result_amount = 5 - -/datum/chemical_reaction/metalfoam/on_reaction(datum/reagents/holder, created_volume) - var/location = get_turf(holder.my_atom) - - holder.my_atom.visible_message("The solution spews out a metalic foam!") - - var/datum/effect/system/foam_spread/s = new() - s.set_up(created_volume, location, holder, MFOAM_ALUMINUM) - s.start() - - -/datum/chemical_reaction/ironfoam - name = "Iron Foam" - id = "ironlfoam" - result = null - required_reagents = list("iron" = 3, "fluorosurfactant" = 1, "sacid" = 1) - result_amount = 5 - -/datum/chemical_reaction/ironfoam/on_reaction(datum/reagents/holder, created_volume) - var/location = get_turf(holder.my_atom) - - holder.my_atom.visible_message("= 5) - var/obj/item/weapon/book/affectedbook = O - affectedbook.dat = null - to_chat(usr, "The solution melts away the ink on the book.") - else - to_chat(usr, "It wasn't enough...") - -/datum/reagent/ethanol/reaction_mob(mob/living/M, method=TOUCH, volume)//Splashing people with ethanol isn't quite as good as fuel. - if(method == TOUCH) - M.adjust_fire_stacks(volume / 15) - - -/datum/reagent/ethanol/beer - name = "Beer" - id = "beer" - description = "An alcoholic beverage made from malted grains, hops, yeast, and water." - nutriment_factor = 2 * FOOD_METABOLISM - color = "#664300" // rgb: 102, 67, 0 - alcohol_perc = 0.2 - -/datum/reagent/ethanol/cider - name = "Cider" - id = "cider" - description = "An alcoholic beverage derived from apples." - color = "#174116" - alcohol_perc = 0.2 - -/datum/reagent/ethanol/whiskey - name = "Whiskey" - id = "whiskey" - description = "A superb and well-aged single-malt whiskey. Damn." - color = "#664300" // rgb: 102, 67, 0 - dizzy_adj = 4 - alcohol_perc = 0.4 - -/datum/reagent/ethanol/specialwhiskey - name = "Special Blend Whiskey" - id = "specialwhiskey" - description = "Just when you thought regular station whiskey was good... This silky, amber goodness has to come along and ruin everything." - color = "#664300" // rgb: 102, 67, 0 - alcohol_perc = 0.5 - -/datum/reagent/ethanol/gin - name = "Gin" - id = "gin" - description = "It's gin. In space. I say, good sir." - color = "#664300" // rgb: 102, 67, 0 - dizzy_adj = 3 - alcohol_perc = 0.5 - -/datum/reagent/ethanol/absinthe - name = "Absinthe" - id = "absinthe" - description = "Watch out that the Green Fairy doesn't come for you!" - color = "#33EE00" // rgb: lots, ??, ?? - overdose_threshold = 30 - dizzy_adj = 5 - alcohol_perc = 0.7 - -//copy paste from LSD... shoot me -/datum/reagent/ethanol/absinthe/on_mob_life(mob/living/M) - M.AdjustHallucinate(5) - ..() - -/datum/reagent/ethanol/absinthe/overdose_process(mob/living/M, severity) - M.adjustToxLoss(1) - -/datum/reagent/ethanol/rum - name = "Rum" - id = "rum" - description = "Popular with the sailors. Not very popular with everyone else." - color = "#664300" // rgb: 102, 67, 0 - overdose_threshold = 30 - alcohol_perc = 0.4 - dizzy_adj = 5 - -/datum/reagent/ethanol/rum/overdose_process(mob/living/M, severity) - M.adjustToxLoss(1) - -/datum/reagent/ethanol/mojito - name = "Mojito" - id = "mojito" - description = "If it's good enough for Spesscuba, it's good enough for you." - color = "#664300" // rgb: 102, 67, 0 - alcohol_perc = 0.2 - -/datum/reagent/ethanol/vodka - name = "Vodka" - id = "vodka" - description = "Number one drink AND fueling choice for Russians worldwide." - color = "#664300" // rgb: 102, 67, 0 - alcohol_perc = 0.4 - -/datum/reagent/ethanol/sake - name = "Sake" - id = "sake" - description = "Anime's favorite drink." - color = "#664300" // rgb: 102, 67, 0 - alcohol_perc = 0.2 - -/datum/reagent/ethanol/tequila - name = "Tequila" - id = "tequila" - description = "A strong and mildly flavoured, mexican produced spirit. Feeling thirsty hombre?" - color = "#A8B0B7" // rgb: 168, 176, 183 - alcohol_perc = 0.4 - -/datum/reagent/ethanol/vermouth - name = "Vermouth" - id = "vermouth" - description = "You suddenly feel a craving for a martini..." - color = "#664300" // rgb: 102, 67, 0 - alcohol_perc = 0.2 - -/datum/reagent/ethanol/wine - name = "Wine" - id = "wine" - description = "An premium alchoholic beverage made from distilled grape juice." - color = "#7E4043" // rgb: 126, 64, 67 - dizzy_adj = 2 - alcohol_perc = 0.2 - -/datum/reagent/ethanol/cognac - name = "Cognac" - id = "cognac" - description = "A sweet and strongly alchoholic drink, made after numerous distillations and years of maturing. Classy as fornication." - color = "#664300" // rgb: 102, 67, 0 - dizzy_adj = 4 - alcohol_perc = 0.4 - -/datum/reagent/ethanol/suicider //otherwise known as "I want to get so smashed my liver gives out and I die from alcohol poisoning". - name = "Suicider" - id = "suicider" - description = "An unbelievably strong and potent variety of Cider." - color = "#CF3811" - dizzy_adj = 20 - alcohol_perc = 1 //because that's a thing it's supposed to do, I guess - -/datum/reagent/ethanol/ale - name = "Ale" - id = "ale" - description = "A dark alchoholic beverage made by malted barley and yeast." - color = "#664300" // rgb: 102, 67, 0 - alcohol_perc = 0.1 - -/datum/reagent/ethanol/thirteenloko - name = "Thirteen Loko" - id = "thirteenloko" - description = "A potent mixture of caffeine and alcohol." - reagent_state = LIQUID - color = "#102000" // rgb: 16, 32, 0 - alcohol_perc = 0.3 - heart_rate_increase = 1 - -/datum/reagent/ethanol/thirteenloko/on_mob_life(mob/living/M) - M.nutrition += nutriment_factor - M.AdjustDrowsy(-7) - M.AdjustSleeping(-2) - if(M.bodytemperature > 310) - M.bodytemperature = max(310, M.bodytemperature - (5 * TEMPERATURE_DAMAGE_COEFFICIENT)) - M.Jitter(5) - ..() - - -/////////////////////////////////////////////////////////////////cocktail entities////////////////////////////////////////////// - -/datum/reagent/ethanol/bilk - name = "Bilk" - id = "bilk" - description = "This appears to be beer mixed with milk. Disgusting." - reagent_state = LIQUID - color = "#895C4C" // rgb: 137, 92, 76 - alcohol_perc = 0.2 - -/datum/reagent/ethanol/atomicbomb - name = "Atomic Bomb" - id = "atomicbomb" - description = "Nuclear proliferation never tasted so good." - reagent_state = LIQUID - color = "#666300" // rgb: 102, 99, 0 - alcohol_perc = 0.2 - -/datum/reagent/ethanol/threemileisland - name = "THree Mile Island Iced Tea" - id = "threemileisland" - description = "Made for a woman, strong enough for a man." - reagent_state = LIQUID - color = "#666340" // rgb: 102, 99, 64 - alcohol_perc = 0.2 - -/datum/reagent/ethanol/goldschlager - name = "Goldschlager" - id = "goldschlager" - description = "100 proof cinnamon schnapps, made for alcoholic teen girls on spring break." - reagent_state = LIQUID - color = "#664300" // rgb: 102, 67, 0 - alcohol_perc = 0.4 - -/datum/reagent/ethanol/patron - name = "Patron" - id = "patron" - description = "Tequila with silver in it, a favorite of alcoholic women in the club scene." - reagent_state = LIQUID - color = "#585840" // rgb: 88, 88, 64 - alcohol_perc = 0.4 - -/datum/reagent/ethanol/gintonic - name = "Gin and Tonic" - id = "gintonic" - description = "An all time classic, mild cocktail." - reagent_state = LIQUID - color = "#664300" // rgb: 102, 67, 0 - alcohol_perc = 0.4 - -/datum/reagent/ethanol/cuba_libre - name = "Cuba Libre" - id = "cubalibre" - description = "Rum, mixed with cola. Viva la revolution." - reagent_state = LIQUID - color = "#3E1B00" // rgb: 62, 27, 0 - alcohol_perc = 0.2 - -/datum/reagent/ethanol/whiskey_cola - name = "Whiskey Cola" - id = "whiskeycola" - description = "Whiskey, mixed with cola. Surprisingly refreshing." - reagent_state = LIQUID - color = "#3E1B00" // rgb: 62, 27, 0 - alcohol_perc = 0.3 - -/datum/reagent/ethanol/martini - name = "Classic Martini" - id = "martini" - description = "Vermouth with Gin. Not quite how 007 enjoyed it, but still delicious." - reagent_state = LIQUID - color = "#664300" // rgb: 102, 67, 0 - alcohol_perc = 0.5 - -/datum/reagent/ethanol/vodkamartini - name = "Vodka Martini" - id = "vodkamartini" - description = "Vodka with Gin. Not quite how 007 enjoyed it, but still delicious." - reagent_state = LIQUID - color = "#664300" // rgb: 102, 67, 0 - alcohol_perc = 0.4 - -/datum/reagent/ethanol/white_russian - name = "White Russian" - id = "whiterussian" - description = "That's just, like, your opinion, man..." - reagent_state = LIQUID - color = "#A68340" // rgb: 166, 131, 64 - alcohol_perc = 0.3 - -/datum/reagent/ethanol/screwdrivercocktail - name = "Screwdriver" - id = "screwdrivercocktail" - description = "Vodka, mixed with plain ol' orange juice. The result is surprisingly delicious." - reagent_state = LIQUID - color = "#A68310" // rgb: 166, 131, 16 - alcohol_perc = 0.3 - -/datum/reagent/ethanol/booger - name = "Booger" - id = "booger" - description = "Ewww..." - reagent_state = LIQUID - color = "#A68310" // rgb: 166, 131, 16 - alcohol_perc = 0.2 - -/datum/reagent/ethanol/bloody_mary - name = "Bloody Mary" - id = "bloodymary" - description = "A strange yet pleasurable mixture made of vodka, tomato and lime juice. Or at least you THINK the red stuff is tomato juice." - reagent_state = LIQUID - color = "#664300" // rgb: 102, 67, 0 - alcohol_perc = 0.2 - -/datum/reagent/ethanol/gargle_blaster - name = "Pan-Galactic Gargle Blaster" - id = "gargleblaster" - description = "Whoah, this stuff looks volatile!" - reagent_state = LIQUID - color = "#664300" // rgb: 102, 67, 0 - alcohol_perc = 0.7 //ouch - -/datum/reagent/ethanol/brave_bull - name = "Brave Bull" - id = "bravebull" - description = "A strange yet pleasurable mixture made of vodka, tomato and lime juice. Or at least you THINK the red stuff is tomato juice." - reagent_state = LIQUID - color = "#664300" // rgb: 102, 67, 0 - alcohol_perc = 0.3 - -/datum/reagent/ethanol/tequila_sunrise - name = "Tequila Sunrise" - id = "tequilasunrise" - description = "Tequila and orange juice. Much like a Screwdriver, only Mexican~" - reagent_state = LIQUID - color = "#664300" // rgb: 102, 67, 0 - alcohol_perc = 0.3 - -/datum/reagent/ethanol/toxins_special - name = "Toxins Special" - id = "toxinsspecial" - description = "This thing is FLAMING!. CALL THE DAMN SHUTTLE!" - reagent_state = LIQUID - color = "#664300" // rgb: 102, 67, 0 - alcohol_perc = 0.5 - -/datum/reagent/ethanol/toxins_special/on_mob_life(mob/living/M) - if(M.bodytemperature < 330) - M.bodytemperature = min(330, M.bodytemperature + (15 * TEMPERATURE_DAMAGE_COEFFICIENT)) //310 is the normal bodytemp. 310.055 - ..() - -/datum/reagent/ethanol/beepsky_smash - name = "Beepsky Smash" - id = "beepskysmash" - description = "Deny drinking this and prepare for THE LAW." - reagent_state = LIQUID - color = "#664300" // rgb: 102, 67, 0 - alcohol_perc = 0.5 - -/datum/reagent/ethanol/beepsky_smash/on_mob_life(mob/living/M) - M.Stun(1) - ..() - -/datum/reagent/ethanol/irish_cream - name = "Irish Cream" - id = "irishcream" - description = "Whiskey-imbued cream, what else would you expect from the Irish." - reagent_state = LIQUID - color = "#664300" // rgb: 102, 67, 0 - alcohol_perc = 0.3 - -/datum/reagent/ethanol/manly_dorf - name = "The Manly Dorf" - id = "manlydorf" - description = "Beer and Ale, brought together in a delicious mix. Intended for true men only." - reagent_state = LIQUID - color = "#664300" // rgb: 102, 67, 0 - alcohol_perc = 0.2 - -/datum/reagent/ethanol/longislandicedtea - name = "Long Island Iced Tea" - id = "longislandicedtea" - description = "The liquor cabinet, brought together in a delicious mix. Intended for middle-aged alcoholic women only." - reagent_state = LIQUID - color = "#664300" // rgb: 102, 67, 0 - alcohol_perc = 0.5 - -/datum/reagent/ethanol/moonshine - name = "Moonshine" - id = "moonshine" - description = "You've really hit rock bottom now... your liver packed its bags and left last night." - reagent_state = LIQUID - color = "#664300" // rgb: 102, 67, 0 - alcohol_perc = 0.8 //yeeehaw - -/datum/reagent/ethanol/b52 - name = "B-52" - id = "b52" - description = "Coffee, Irish Cream, and congac. You will get bombed." - reagent_state = LIQUID - color = "#664300" // rgb: 102, 67, 0 - alcohol_perc = 0.3 - -/datum/reagent/ethanol/irishcoffee - name = "Irish Coffee" - id = "irishcoffee" - description = "Coffee, and alcohol. More fun than a Mimosa to drink in the morning." - reagent_state = LIQUID - color = "#664300" // rgb: 102, 67, 0 - alcohol_perc = 0.2 - -/datum/reagent/ethanol/margarita - name = "Margarita" - id = "margarita" - description = "On the rocks with salt on the rim. Arriba~!" - reagent_state = LIQUID - color = "#664300" // rgb: 102, 67, 0 - alcohol_perc = 0.3 - -/datum/reagent/ethanol/black_russian - name = "Black Russian" - id = "blackrussian" - description = "For the lactose-intolerant. Still as classy as a White Russian." - reagent_state = LIQUID - color = "#360000" // rgb: 54, 0, 0 - alcohol_perc = 0.4 - -/datum/reagent/ethanol/manhattan - name = "Manhattan" - id = "manhattan" - description = "The Detective's undercover drink of choice. He never could stomach gin..." - reagent_state = LIQUID - color = "#664300" // rgb: 102, 67, 0 - alcohol_perc = 0.4 - -/datum/reagent/ethanol/manhattan_proj - name = "Manhattan Project" - id = "manhattan_proj" - description = "A scienitst's drink of choice, for pondering ways to blow up the station." - reagent_state = LIQUID - color = "#664300" // rgb: 102, 67, 0 - alcohol_perc = 0.4 - -/datum/reagent/ethanol/whiskeysoda - name = "Whiskey Soda" - id = "whiskeysoda" - description = "Ultimate refreshment." - reagent_state = LIQUID - color = "#664300" // rgb: 102, 67, 0 - alcohol_perc = 0.3 - -/datum/reagent/ethanol/antifreeze - name = "Anti-freeze" - id = "antifreeze" - description = "Ultimate refreshment." - reagent_state = LIQUID - color = "#664300" // rgb: 102, 67, 0 - alcohol_perc = 0.2 - -/datum/reagent/ethanol/antifreeze/on_mob_life(mob/living/M) - if(M.bodytemperature < 330) - M.bodytemperature = min(330, M.bodytemperature + (20 * TEMPERATURE_DAMAGE_COEFFICIENT)) //310 is the normal bodytemp. 310.055 - ..() - -/datum/reagent/ethanol/barefoot - name = "Barefoot" - id = "barefoot" - description = "Barefoot and pregnant" - reagent_state = LIQUID - color = "#664300" // rgb: 102, 67, 0 - alcohol_perc = 0.2 - -/datum/reagent/ethanol/snowwhite - name = "Snow White" - id = "snowwhite" - description = "A cold refreshment" - reagent_state = LIQUID - color = "#664300" // rgb: 102, 67, 0 - alcohol_perc = 0.2 - -/datum/reagent/ethanol/demonsblood - name = "Demons Blood" - id = "demonsblood" - description = "AHHHH!!!!" - reagent_state = LIQUID - color = "#664300" // rgb: 102, 67, 0 - dizzy_adj = 10 - alcohol_perc = 0.4 - -/datum/reagent/ethanol/vodkatonic - name = "Vodka and Tonic" - id = "vodkatonic" - description = "For when a gin and tonic isn't russian enough." - reagent_state = LIQUID - color = "#664300" // rgb: 102, 67, 0 - dizzy_adj = 4 - alcohol_perc = 0.3 - -/datum/reagent/ethanol/ginfizz - name = "Gin Fizz" - id = "ginfizz" - description = "Refreshingly lemony, deliciously dry." - reagent_state = LIQUID - color = "#664300" // rgb: 102, 67, 0 - dizzy_adj = 4 - alcohol_perc = 0.4 - -/datum/reagent/ethanol/bahama_mama - name = "Bahama mama" - id = "bahama_mama" - description = "Tropic cocktail." - reagent_state = LIQUID - color = "#664300" // rgb: 102, 67, 0 - alcohol_perc = 0.2 - -/datum/reagent/ethanol/singulo - name = "Singulo" - id = "singulo" - description = "A blue-space beverage!" - reagent_state = LIQUID - color = "#2E6671" // rgb: 46, 102, 113 - dizzy_adj = 15 - alcohol_perc = 0.7 - -/datum/reagent/ethanol/sbiten - name = "Sbiten" - id = "sbiten" - description = "A spicy Vodka! Might be a little hot for the little guys!" - reagent_state = LIQUID - color = "#664300" // rgb: 102, 67, 0 - alcohol_perc = 0.4 - -/datum/reagent/ethanol/sbiten/on_mob_life(mob/living/M) - if(M.bodytemperature < 360) - M.bodytemperature = min(360, M.bodytemperature + (50 * TEMPERATURE_DAMAGE_COEFFICIENT)) //310 is the normal bodytemp. 310.055 - ..() - -/datum/reagent/ethanol/devilskiss - name = "Devils Kiss" - id = "devilskiss" - description = "Creepy time!" - reagent_state = LIQUID - color = "#A68310" // rgb: 166, 131, 16 - alcohol_perc = 0.3 - -/datum/reagent/ethanol/red_mead - name = "Red Mead" - id = "red_mead" - description = "The true Viking drink! Even though it has a strange red color." - reagent_state = LIQUID - color = "#664300" // rgb: 102, 67, 0 - alcohol_perc = 0.2 - -/datum/reagent/ethanol/mead - name = "Mead" - id = "mead" - description = "A Vikings drink, though a cheap one." - reagent_state = LIQUID - color = "#664300" // rgb: 102, 67, 0 - alcohol_perc = 0.2 - -/datum/reagent/ethanol/iced_beer - name = "Iced Beer" - id = "iced_beer" - description = "A beer which is so cold the air around it freezes." - reagent_state = LIQUID - color = "#664300" // rgb: 102, 67, 0 - alcohol_perc = 0.2 - -/datum/reagent/ethanol/iced_beer/on_mob_life(mob/living/M) - if(M.bodytemperature > 270) - M.bodytemperature = max(270, M.bodytemperature - (20 * TEMPERATURE_DAMAGE_COEFFICIENT)) //310 is the normal bodytemp. 310.055 - ..() - -/datum/reagent/ethanol/grog - name = "Grog" - id = "grog" - description = "Watered down rum, Nanotrasen approves!" - reagent_state = LIQUID - color = "#664300" // rgb: 102, 67, 0 - alcohol_perc = 0.2 - -/datum/reagent/ethanol/aloe - name = "Aloe" - id = "aloe" - description = "So very, very, very good." - reagent_state = LIQUID - color = "#664300" // rgb: 102, 67, 0 - alcohol_perc = 0.2 - -/datum/reagent/ethanol/andalusia - name = "Andalusia" - id = "andalusia" - description = "A nice, strange named drink." - reagent_state = LIQUID - color = "#664300" // rgb: 102, 67, 0 - alcohol_perc = 0.4 - -/datum/reagent/ethanol/alliescocktail - name = "Allies Cocktail" - id = "alliescocktail" - description = "A drink made from your allies." - reagent_state = LIQUID - color = "#664300" // rgb: 102, 67, 0 - alcohol_perc = 0.5 - -/datum/reagent/ethanol/acid_spit - name = "Acid Spit" - id = "acidspit" - description = "A drink by Nanotrasen. Made from live aliens." - reagent_state = LIQUID - color = "#365000" // rgb: 54, 80, 0 - alcohol_perc = 0.3 - -/datum/reagent/ethanol/amasec - name = "Amasec" - id = "amasec" - description = "Official drink of the Imperium." - reagent_state = LIQUID - color = "#664300" // rgb: 102, 67, 0 - alcohol_perc = 0.3 - -/datum/reagent/ethanol/neurotoxin - name = "Neuro-toxin" - id = "neurotoxin" - description = "A strong neurotoxin that puts the subject into a death-like state." - reagent_state = LIQUID - color = "#2E2E61" // rgb: 46, 46, 97 - dizzy_adj = 6 - alcohol_perc = 0.7 - heart_rate_decrease = 1 - -/datum/reagent/ethanol/neurotoxin/on_mob_life(mob/living/M) - M.weakened = max(M.weakened, 3) - if(current_cycle >=55) - M.Druggy(55) - if(current_cycle >=200) - M.adjustToxLoss(2) - ..() - -/datum/reagent/ethanol/changelingsting - name = "Changeling Sting" - id = "changelingsting" - description = "A stingy drink." - reagent_state = LIQUID - color = "#2E6671" // rgb: 46, 102, 113 - alcohol_perc = 0.7 - dizzy_adj = 5 - -/datum/reagent/ethanol/irishcarbomb - name = "Irish Car Bomb" - id = "irishcarbomb" - description = "Mmm, tastes like chocolate cake..." - reagent_state = LIQUID - color = "#2E6671" // rgb: 46, 102, 113 - alcohol_perc = 0.3 - dizzy_adj = 5 - -/datum/reagent/ethanol/syndicatebomb - name = "Syndicate Bomb" - id = "syndicatebomb" - description = "A Syndicate bomb" - reagent_state = LIQUID - color = "#2E6671" // rgb: 46, 102, 113 - alcohol_perc = 0.2 - -/datum/reagent/ethanol/erikasurprise - name = "Erika Surprise" - id = "erikasurprise" - description = "The surprise is, it's green!" - reagent_state = LIQUID - color = "#2E6671" // rgb: 46, 102, 113 - alcohol_perc = 0.2 - -/datum/reagent/ethanol/driestmartini - name = "Driest Martini" - id = "driestmartini" - description = "Only for the experienced. You think you see sand floating in the glass." - nutriment_factor = 1 * FOOD_METABOLISM - color = "#2E6671" // rgb: 46, 102, 113 - alcohol_perc = 0.5 - dizzy_adj = 10 - -/datum/reagent/ethanol/driestmartini/on_mob_life(mob/living/M) - if(current_cycle >= 55 && current_cycle < 115) - M.stuttering += 10 - ..() - -/datum/reagent/ethanol/kahlua - name = "Kahlua" - id = "kahlua" - description = "A widely known, Mexican coffee-flavoured liqueur. In production since 1936!" - color = "#664300" // rgb: 102, 67, 0 - alcohol_perc = 0.2 - -/datum/reagent/ethanol/kahlua/on_mob_life(mob/living/M) - M.AdjustDizzy(-5) - M.AdjustDrowsy(-3) - M.AdjustSleeping(-2) - M.Jitter(5) - ..() diff --git a/code/modules/reagents/oldchem/reagents/drink/reagents_drink_cold.dm b/code/modules/reagents/oldchem/reagents/drink/reagents_drink_cold.dm deleted file mode 100644 index 26164571769..00000000000 --- a/code/modules/reagents/oldchem/reagents/drink/reagents_drink_cold.dm +++ /dev/null @@ -1,124 +0,0 @@ -/datum/reagent/drink/cold - name = "Cold drink" - adj_temp_cool = 5 - -/datum/reagent/drink/cold/tonic - name = "Tonic Water" - id = "tonic" - description = "It tastes strange but at least the quinine keeps the Space Malaria at bay." - color = "#664300" // rgb: 102, 67, 0 - adj_dizzy = -5 - adj_drowsy = -3 - adj_sleepy = -2 - -/datum/reagent/drink/cold/sodawater - name = "Soda Water" - id = "sodawater" - description = "A can of club soda. Why not make a scotch and soda?" - color = "#619494" // rgb: 97, 148, 148 - adj_dizzy = -5 - adj_drowsy = -3 - -/datum/reagent/drink/cold/ice - name = "Ice" - id = "ice" - description = "Frozen water, your dentist wouldn't like you chewing this." - reagent_state = SOLID - color = "#619494" // rgb: 97, 148, 148 - adj_temp_cool = 0 - -/datum/reagent/drink/cold/ice/on_mob_life(mob/living/M) - M.bodytemperature = max(M.bodytemperature - 5 * TEMPERATURE_DAMAGE_COEFFICIENT, 0) - ..() - -/datum/reagent/drink/cold/space_cola - name = "Cola" - id = "cola" - description = "A refreshing beverage." - reagent_state = LIQUID - color = "#100800" // rgb: 16, 8, 0 - adj_drowsy = -5 - -/datum/reagent/drink/cold/nuka_cola - name = "Nuka Cola" - id = "nuka_cola" - description = "Cola, cola never changes." - color = "#100800" // rgb: 16, 8, 0 - adj_sleepy = -2 - -/datum/reagent/drink/cold/nuka_cola/on_mob_life(mob/living/M) - M.Jitter(20) - M.Druggy(30) - M.AdjustDizzy(5) - M.SetDrowsy(0) - M.status_flags |= GOTTAGOFAST - ..() - -/datum/reagent/drink/cold/nuka_cola/reagent_deleted(mob/living/M) - M.status_flags &= ~GOTTAGOFAST - ..() - -/datum/reagent/drink/cold/spacemountainwind - name = "Space Mountain Wind" - id = "spacemountainwind" - description = "Blows right through you like a space wind." - color = "#102000" // rgb: 16, 32, 0 - adj_drowsy = -7 - adj_sleepy = -1 - -/datum/reagent/drink/cold/dr_gibb - name = "Dr. Gibb" - id = "dr_gibb" - description = "A delicious blend of 42 different flavours" - color = "#102000" // rgb: 16, 32, 0 - adj_drowsy = -6 - -/datum/reagent/drink/cold/space_up - name = "Space-Up" - id = "space_up" - description = "Tastes like a hull breach in your mouth." - color = "#202800" // rgb: 32, 40, 0 - adj_temp_cool = 8 - -/datum/reagent/drink/cold/lemon_lime - name = "Lemon Lime" - description = "A tangy substance made of 0.5% natural citrus!" - id = "lemon_lime" - color = "#878F00" // rgb: 135, 40, 0 - adj_temp_cool = 8 - -/datum/reagent/drink/cold/lemonade - name = "Lemonade" - description = "Oh the nostalgia..." - id = "lemonade" - color = "#FFFF00" // rgb: 255, 255, 0 - -/datum/reagent/drink/cold/kiraspecial - name = "Kira Special" - description = "Long live the guy who everyone had mistaken for a girl. Baka!" - id = "kiraspecial" - color = "#CCCC99" // rgb: 204, 204, 153 - -/datum/reagent/drink/cold/brownstar - name = "Brown Star" - description = "It's not what it sounds like..." - id = "brownstar" - color = "#9F3400" // rgb: 159, 052, 000 - adj_temp_cool = 2 - -/datum/reagent/drink/cold/milkshake - name = "Milkshake" - description = "Glorious brainfreezing mixture." - id = "milkshake" - color = "#AEE5E4" // rgb" 174, 229, 228 - adj_temp_cool = 9 - -/datum/reagent/drink/cold/rewriter - name = "Rewriter" - description = "The secert of the sanctuary of the Libarian..." - id = "rewriter" - color = "#485000" // rgb:72, 080, 0 - -/datum/reagent/drink/cold/rewriter/on_mob_life(mob/living/M) - M.Jitter(5) - ..() diff --git a/code/modules/reagents/oldchem/reagents/reagents_drugs.dm b/code/modules/reagents/oldchem/reagents/reagents_drugs.dm deleted file mode 100644 index 1fd0188287a..00000000000 --- a/code/modules/reagents/oldchem/reagents/reagents_drugs.dm +++ /dev/null @@ -1,115 +0,0 @@ -/datum/reagent/serotrotium - name = "Serotrotium" - id = "serotrotium" - description = "A chemical compound that promotes concentrated production of the serotonin neurotransmitter in humans." - reagent_state = LIQUID - color = "#202040" // rgb: 20, 20, 40 - metabolization_rate = 0.25 * REAGENTS_METABOLISM - -/datum/reagent/serotrotium/on_mob_life(mob/living/M) - if(ishuman(M)) - if(prob(7)) - M.emote(pick("twitch","drool","moan","gasp")) - ..() - - -/datum/reagent/lithium - name = "Lithium" - id = "lithium" - description = "A chemical element." - reagent_state = SOLID - color = "#808080" // rgb: 128, 128, 128 - -/datum/reagent/lithium/on_mob_life(mob/living/M) - if(isturf(M.loc) && !istype(M.loc, /turf/space)) - if(M.canmove && !M.restrained()) - step(M, pick(cardinal)) - if(prob(5)) M.emote(pick("twitch","drool","moan")) - ..() - - -/datum/reagent/hippies_delight - name = "Hippie's Delight" - id = "hippiesdelight" - description = "You just don't get it maaaan." - reagent_state = LIQUID - color = "#664300" // rgb: 102, 67, 0 - metabolization_rate = 0.2 * REAGENTS_METABOLISM - -/datum/reagent/hippies_delight/on_mob_life(mob/living/M) - M.Druggy(50) - switch(current_cycle) - if(1 to 5) - if(!M.stuttering) M.stuttering = 1 - M.Dizzy(10) - if(prob(10)) M.emote(pick("twitch","giggle")) - if(5 to 10) - if(!M.stuttering) M.stuttering = 1 - M.Jitter(20) - M.Dizzy(20) - M.Druggy(45) - if(prob(20)) M.emote(pick("twitch","giggle")) - if(10 to INFINITY) - if(!M.stuttering) M.stuttering = 1 - M.Jitter(40) - M.Dizzy(40) - M.Druggy(60) - if(prob(30)) M.emote(pick("twitch","giggle")) - ..() - -/datum/reagent/lsd - name = "Lysergic acid diethylamide" - id = "lsd" - description = "A highly potent hallucinogenic substance. Far out, maaaan." - reagent_state = LIQUID - color = "#0000D8" - -/datum/reagent/lsd/on_mob_life(mob/living/M) - M.Druggy(15) - M.AdjustHallucinate(10) - ..() - -/datum/reagent/space_drugs - name = "Space drugs" - id = "space_drugs" - description = "An illegal chemical compound used as drug." - reagent_state = LIQUID - color = "#9087A2" - metabolization_rate = 0.2 - addiction_chance = 65 - heart_rate_decrease = 1 - -/datum/reagent/space_drugs/on_mob_life(mob/living/M) - M.Druggy(15) - if(isturf(M.loc) && !istype(M.loc, /turf/space)) - if(M.canmove && !M.restrained()) - step(M, pick(cardinal)) - if(prob(7)) M.emote(pick("twitch","drool","moan","giggle")) - ..() - -/datum/reagent/psilocybin - name = "Psilocybin" - id = "psilocybin" - description = "A strong psycotropic derived from certain species of mushroom." - color = "#E700E7" // rgb: 231, 0, 231 - -/datum/reagent/psilocybin/on_mob_life(mob/living/M) - M.Druggy(30) - switch(current_cycle) - if(1 to 5) - M.Stuttering(1) - M.Dizzy(5) - if(prob(10)) M.emote(pick("twitch","giggle")) - if(5 to 10) - M.Stuttering(1) - M.Jitter(10) - M.Dizzy(10) - M.Druggy(35) - if(prob(20)) M.emote(pick("twitch","giggle")) - if(10 to INFINITY) - M.Stuttering(1) - M.Jitter(20) - M.Dizzy(20) - M.Druggy(40) - if(prob(30)) M.emote(pick("twitch","giggle")) - ..() diff --git a/code/modules/reagents/oldchem/reagents/reagents_flammable.dm b/code/modules/reagents/oldchem/reagents/reagents_flammable.dm deleted file mode 100644 index 61228dfb2d0..00000000000 --- a/code/modules/reagents/oldchem/reagents/reagents_flammable.dm +++ /dev/null @@ -1,81 +0,0 @@ -/datum/reagent/fuel - name = "Welding fuel" - id = "fuel" - description = "A highly flammable blend of basic hydrocarbons, mostly Acetylene. Useful for both welding and organic chemistry, and can be fortified into a heavier oil." - reagent_state = LIQUID - color = "#060606" - -/datum/reagent/fuel/reaction_mob(mob/living/M, method=TOUCH, volume)//Splashing people with welding fuel to make them easy to ignite! - if(method == TOUCH) - M.adjust_fire_stacks(volume / 10) - return - ..() - -/datum/reagent/fuel/unholywater //if you somehow managed to extract this from someone, dont splash it on yourself and have a smoke - name = "Unholy Water" - id = "unholywater" - description = "Something that shouldn't exist on this plane of existance." - process_flags = ORGANIC | SYNTHETIC //ethereal means everything processes it. - metabolization_rate = 1 - -/datum/reagent/fuel/unholywater/on_mob_life(mob/living/M) - M.adjustBrainLoss(3) - if(iscultist(M)) - M.status_flags |= GOTTAGOFAST - M.AdjustDrowsy(-5) - M.AdjustParalysis(-2) - M.AdjustStunned(-2) - M.AdjustWeakened(-2) - else - M.adjustToxLoss(2) - M.adjustFireLoss(2) - M.adjustOxyLoss(2) - M.adjustBruteLoss(2) - ..() - -/datum/reagent/fuel/unholywater/reagent_deleted(mob/living/M) - M.status_flags &= ~GOTTAGOFAST - ..() - -/datum/reagent/plasma - name = "Plasma" - id = "plasma" - description = "The liquid phase of an unusual extraterrestrial compound." - reagent_state = LIQUID - color = "#7A2B94" - -/datum/reagent/plasma/on_mob_life(mob/living/M) - M.adjustToxLoss(1*REM) - if(holder.has_reagent("epinephrine")) - holder.remove_reagent("epinephrine", 2) - if(iscarbon(M)) - var/mob/living/carbon/C = M - C.adjustPlasma(10) - ..() - -/datum/reagent/plasma/reaction_mob(mob/living/M, method=TOUCH, volume)//Splashing people with plasma is stronger than fuel! - if(method == TOUCH) - M.adjust_fire_stacks(volume / 5) - ..() - - -/datum/reagent/thermite - name = "Thermite" - id = "thermite" - description = "Thermite produces an aluminothermic reaction known as a thermite reaction. Can be used to melt walls." - reagent_state = SOLID - color = "#673910" // rgb: 103, 57, 16 - process_flags = ORGANIC | SYNTHETIC - -/datum/reagent/thermite/reaction_turf(turf/simulated/wall/W, volume) - if(volume >= 5 && istype(W)) - W.thermite = 1 - W.overlays.Cut() - W.overlays = image('icons/effects/effects.dmi',icon_state = "thermite") - -/datum/reagent/glycerol - name = "Glycerol" - id = "glycerol" - description = "Glycerol is a simple polyol compound. Glycerol is sweet-tasting and of low toxicity." - reagent_state = LIQUID - color = "#808080" // rgb: 128, 128, 128 diff --git a/code/modules/reagents/oldchem/reagents/reagents_food.dm b/code/modules/reagents/oldchem/reagents/reagents_food.dm deleted file mode 100644 index de52805fef2..00000000000 --- a/code/modules/reagents/oldchem/reagents/reagents_food.dm +++ /dev/null @@ -1,393 +0,0 @@ -/////////////////////////Food Reagents//////////////////////////// -// Part of the food code. Nutriment is used instead of the old "heal_amt" code. Also is where all the food -// condiments, additives, and such go. -/datum/reagent/nutriment // Pure nutriment, universally digestable and thus slightly less effective - name = "Nutriment" - id = "nutriment" - description = "A questionable mixture of various pure nutrients commonly found in processed foods." - reagent_state = SOLID - nutriment_factor = 12 * REAGENTS_METABOLISM - color = "#664330" // rgb: 102, 67, 48 - var/diet_flags = DIET_OMNI | DIET_HERB | DIET_CARN - -/datum/reagent/nutriment/on_mob_life(mob/living/M) - if(!(M.mind in ticker.mode.vampires)) - if(ishuman(M)) - var/mob/living/carbon/human/H = M - if(H.can_eat(diet_flags)) //Make sure the species has it's dietflag set, otherwise it can't digest any nutrients - H.nutrition += nutriment_factor // For hunger and fatness - if(prob(50)) - M.adjustBruteLoss(-1) - if(H.species.exotic_blood) - H.vessel.add_reagent(H.species.exotic_blood, 0.4) - else - if(!(H.species.flags & NO_BLOOD)) - H.vessel.add_reagent("blood", 0.4) - ..() - -/datum/reagent/nutriment/protein // Meat-based protein, digestable by carnivores and omnivores, worthless to herbivores - name = "Protein" - id = "protein" - description = "Various essential proteins and fats commonly found in animal flesh and blood." - nutriment_factor = 15 * REAGENTS_METABOLISM - diet_flags = DIET_CARN | DIET_OMNI - -/datum/reagent/nutriment/plantmatter // Plant-based biomatter, digestable by herbivores and omnivores, worthless to carnivores - name = "Plant-matter" - id = "plantmatter" - description = "Vitamin-rich fibers and natural sugars commonly found in fresh produce." - nutriment_factor = 15 * REAGENTS_METABOLISM - diet_flags = DIET_HERB | DIET_OMNI - - -/datum/reagent/vitamin - name = "Vitamin" - id = "vitamin" - description = "All the best vitamins, minerals, and carbohydrates the body needs in pure form." - reagent_state = SOLID - nutriment_factor = 1 * REAGENTS_METABOLISM - color = "#664330" // rgb: 102, 67, 48 - -/datum/reagent/vitamin/on_mob_life(mob/living/M) //everyone needs vitamins, so this works on everyone, regardless of diet or if they're a vampire. - M.nutrition += nutriment_factor - if(prob(50)) - M.adjustBruteLoss(-1) - M.adjustFireLoss(-1) - if(ishuman(M)) - var/mob/living/carbon/human/H = M - if(H.species.exotic_blood) - H.vessel.add_reagent(H.species.exotic_blood, 0.5) - else - if(!(H.species.flags & NO_BLOOD)) - H.vessel.add_reagent("blood", 0.5) - ..() - -/datum/reagent/soysauce - name = "Soysauce" - id = "soysauce" - description = "A salty sauce made from the soy plant." - reagent_state = LIQUID - nutriment_factor = 2 * REAGENTS_METABOLISM - color = "#792300" // rgb: 121, 35, 0 - -/datum/reagent/ketchup - name = "Ketchup" - id = "ketchup" - description = "Ketchup, catsup, whatever. It's tomato paste." - reagent_state = LIQUID - nutriment_factor = 5 * REAGENTS_METABOLISM - color = "#731008" // rgb: 115, 16, 8 - - -/datum/reagent/capsaicin - name = "Capsaicin Oil" - id = "capsaicin" - description = "This is what makes chilis hot." - reagent_state = LIQUID - color = "#B31008" // rgb: 179, 16, 8 - -/datum/reagent/capsaicin/on_mob_life(mob/living/M) - switch(current_cycle) - if(1 to 15) - M.bodytemperature += 5 * TEMPERATURE_DAMAGE_COEFFICIENT - if(holder.has_reagent("frostoil")) - holder.remove_reagent("frostoil", 5) - if(isslime(M)) - M.bodytemperature += rand(5,20) - if(15 to 25) - M.bodytemperature += 10 * TEMPERATURE_DAMAGE_COEFFICIENT - if(isslime(M)) - M.bodytemperature += rand(10,20) - if(25 to 35) - M.bodytemperature += 15 * TEMPERATURE_DAMAGE_COEFFICIENT - if(isslime(M)) - M.bodytemperature += rand(15,20) - if(35 to INFINITY) - M.bodytemperature += 20 * TEMPERATURE_DAMAGE_COEFFICIENT - if(isslime(M)) - M.bodytemperature += rand(20,25) - ..() - -/datum/reagent/frostoil - name = "Frost Oil" - id = "frostoil" - description = "A special oil that noticably chills the body. Extraced from Icepeppers." - reagent_state = LIQUID - color = "#8BA6E9" // rgb: 139, 166, 233 - process_flags = ORGANIC | SYNTHETIC - -/datum/reagent/frostoil/on_mob_life(mob/living/M) - switch(current_cycle) - if(1 to 15) - M.bodytemperature -= 10 * TEMPERATURE_DAMAGE_COEFFICIENT - if(holder.has_reagent("capsaicin")) - holder.remove_reagent("capsaicin", 5) - if(isslime(M)) - M.bodytemperature -= rand(5,20) - if(15 to 25) - M.bodytemperature -= 15 * TEMPERATURE_DAMAGE_COEFFICIENT - if(isslime(M)) - M.bodytemperature -= rand(10,20) - if(25 to 35) - M.bodytemperature -= 20 * TEMPERATURE_DAMAGE_COEFFICIENT - if(prob(1)) - M.emote("shiver") - if(isslime(M)) - M.bodytemperature -= rand(15,20) - if(35 to INFINITY) - M.bodytemperature -= 20 * TEMPERATURE_DAMAGE_COEFFICIENT - if(prob(1)) - M.emote("shiver") - if(isslime(M)) - M.bodytemperature -= rand(20,25) - ..() - -/datum/reagent/frostoil/reaction_turf(turf/T, volume) - if(volume >= 5) - for(var/mob/living/carbon/slime/M in T) - M.adjustToxLoss(rand(15,30)) - - -/datum/reagent/sodiumchloride - name = "Salt" - id = "sodiumchloride" - description = "Sodium chloride, common table salt." - reagent_state = SOLID - color = "#B1B0B0" - overdose_threshold = 100 - -/datum/reagent/sodiumchloride/overdose_process(mob/living/M, severity) - if(prob(70)) - M.adjustBrainLoss(1) - ..() - -/datum/reagent/blackpepper - name = "Black Pepper" - id = "blackpepper" - description = "A powder ground from peppercorns. *AAAACHOOO*" - reagent_state = SOLID - -/datum/reagent/cocoa - name = "Cocoa Powder" - id = "cocoa" - description = "A fatty, bitter paste made from cocoa beans." - reagent_state = SOLID - nutriment_factor = 5 * REAGENTS_METABOLISM - color = "#302000" // rgb: 48, 32, 0 - -/datum/reagent/cocoa/on_mob_life(mob/living/M) - M.nutrition += nutriment_factor - ..() - -/datum/reagent/hot_coco - name = "Hot Chocolate" - id = "hot_coco" - description = "Made with love! And cocoa beans." - reagent_state = LIQUID - nutriment_factor = 2 * REAGENTS_METABOLISM - color = "#403010" // rgb: 64, 48, 16 - -/datum/reagent/hot_coco/on_mob_life(mob/living/M) - if(M.bodytemperature < 310)//310 is the normal bodytemp. 310.055 - M.bodytemperature = min(310, M.bodytemperature + (5 * TEMPERATURE_DAMAGE_COEFFICIENT)) - M.nutrition += nutriment_factor - ..() - -/datum/reagent/sprinkles - name = "Sprinkles" - id = "sprinkles" - description = "Multi-colored little bits of sugar, commonly found on donuts. Loved by cops." - nutriment_factor = 1 * REAGENTS_METABOLISM - color = "#FF00FF" // rgb: 255, 0, 255 - -/datum/reagent/sprinkles/on_mob_life(mob/living/M) - M.nutrition += nutriment_factor - if(ishuman(M) && M.job in list("Security Officer", "Security Pod Pilot", "Detective", "Warden", "Head of Security", "Brig Physician", "Internal Affairs Agent", "Magistrate")) - M.adjustBruteLoss(-1) - M.adjustFireLoss(-1) - ..() - - -/datum/reagent/cornoil - name = "Corn Oil" - id = "cornoil" - description = "An oil derived from various types of corn." - reagent_state = LIQUID - nutriment_factor = 20 * REAGENTS_METABOLISM - color = "#302000" // rgb: 48, 32, 0 - -/datum/reagent/cornoil/on_mob_life(mob/living/M) - M.nutrition += nutriment_factor - ..() - -/datum/reagent/cornoil/reaction_turf(turf/simulated/T, volume) - if(!istype(T)) - return - if(volume >= 3) - T.MakeSlippery() - var/hotspot = (locate(/obj/effect/hotspot) in T) - if(hotspot) - var/datum/gas_mixture/lowertemp = T.remove_air( T.air.total_moles()) - lowertemp.temperature = max(min(lowertemp.temperature-2000, lowertemp.temperature / 2), 0) - lowertemp.react() - T.assume_air(lowertemp) - qdel(hotspot) - - -/datum/reagent/enzyme - name = "Denatured Enzyme" - id = "enzyme" - description = "Heated beyond usefulness, this enzyme is now worthless." - reagent_state = LIQUID - color = "#282314" // rgb: 54, 94, 48 - - -/datum/reagent/dry_ramen - name = "Dry Ramen" - id = "dry_ramen" - description = "Space age food, since August 25, 1958. Contains dried noodles, vegetables, and chemicals that boil in contact with water." - reagent_state = SOLID - nutriment_factor = 1 * REAGENTS_METABOLISM - color = "#302000" // rgb: 48, 32, 0 - -/datum/reagent/dry_ramen/on_mob_life(mob/living/M) - M.nutrition += nutriment_factor - ..() - - -/datum/reagent/hot_ramen - name = "Hot Ramen" - id = "hot_ramen" - description = "The noodles are boiled, the flavors are artificial, just like being back in school." - reagent_state = LIQUID - nutriment_factor = 5 * REAGENTS_METABOLISM - color = "#302000" // rgb: 48, 32, 0 - -/datum/reagent/hot_ramen/on_mob_life(mob/living/M) - M.nutrition += nutriment_factor - if(M.bodytemperature < 310)//310 is the normal bodytemp. 310.055 - M.bodytemperature = min(310, M.bodytemperature + (10 * TEMPERATURE_DAMAGE_COEFFICIENT)) - ..() - - -/datum/reagent/hell_ramen - name = "Hell Ramen" - id = "hell_ramen" - description = "The noodles are boiled, the flavors are artificial, just like being back in school." - reagent_state = LIQUID - nutriment_factor = 5 * REAGENTS_METABOLISM - color = "#302000" // rgb: 48, 32, 0 - -/datum/reagent/hell_ramen/on_mob_life(mob/living/M) - M.nutrition += nutriment_factor - M.bodytemperature += 10 * TEMPERATURE_DAMAGE_COEFFICIENT - ..() - - -/datum/reagent/flour - name = "flour" - id = "flour" - description = "This is what you rub all over yourself to pretend to be a ghost." - reagent_state = SOLID - nutriment_factor = 1 * REAGENTS_METABOLISM - color = "#FFFFFF" // rgb: 0, 0, 0 - -/datum/reagent/flour/on_mob_life(mob/living/M) - M.nutrition += nutriment_factor - ..() - -/datum/reagent/flour/reaction_turf(turf/T, volume) - if(!istype(T, /turf/space)) - new /obj/effect/decal/cleanable/flour(T) - - -/datum/reagent/rice - name = "Rice" - id = "rice" - description = "Enjoy the great taste of nothing." - reagent_state = SOLID - nutriment_factor = 1 * REAGENTS_METABOLISM - color = "#FFFFFF" // rgb: 0, 0, 0 - -/datum/reagent/rice/on_mob_life(mob/living/M) - M.nutrition += nutriment_factor - ..() - - -/datum/reagent/cherryjelly - name = "Cherry Jelly" - id = "cherryjelly" - description = "Totally the best. Only to be spread on foods with excellent lateral symmetry." - reagent_state = LIQUID - nutriment_factor = 1 * REAGENTS_METABOLISM - color = "#801E28" // rgb: 128, 30, 40 - -/datum/reagent/cherryjelly/on_mob_life(mob/living/M) - M.nutrition += nutriment_factor - ..() - -/datum/reagent/toxin/coffeepowder - name = "Coffee Grounds" - id = "coffeepowder" - description = "Finely ground Coffee beans, used to make coffee." - reagent_state = SOLID - color = "#5B2E0D" // rgb: 91, 46, 13 - -/datum/reagent/toxin/teapowder - name = "Ground Tea Leaves" - id = "teapowder" - description = "Finely shredded Tea leaves, used for making tea." - reagent_state = SOLID - color = "#7F8400" // rgb: 127, 132, 0 - -//Reagents used for plant fertilizers. -/datum/reagent/toxin/fertilizer - name = "fertilizer" - id = "fertilizer" - description = "A chemical mix good for growing plants with." - reagent_state = LIQUID - color = "#664330" // rgb: 102, 67, 48 - -/datum/reagent/toxin/fertilizer/eznutrient - name = "EZ Nutrient" - id = "eznutrient" - -/datum/reagent/toxin/fertilizer/left4zed - name = "Left-4-Zed" - id = "left4zed" - -/datum/reagent/toxin/fertilizer/robustharvest - name = "Robust Harvest" - id = "robustharvest" - - -/datum/reagent/sugar - name = "Sugar" - id = "sugar" - description = "The organic compound commonly known as table sugar and sometimes called saccharose. This white, odorless, crystalline powder has a pleasing, sweet taste." - reagent_state = SOLID - color = "#FFFFFF" // rgb: 255, 255, 255 - overdose_threshold = 200 // Hyperglycaemic shock - -/datum/reagent/sugar/on_mob_life(mob/living/M) - M.AdjustDrowsy(-5) - if(current_cycle >= 90) - M.AdjustJitter(2) - if(prob(50)) - M.AdjustParalysis(-1) - M.AdjustStunned(-1) - M.AdjustWeakened(-1) - if(prob(4)) - M.reagents.add_reagent("epinephrine", 1.2) - ..() - -/datum/reagent/sugar/overdose_start(mob/living/M) - to_chat(M, "You pass out from hyperglycemic shock!") - M.emote("collapse") - ..() - -/datum/reagent/sugar/overdose_process(mob/living/M, severity) - M.Paralyse(3 * severity) - M.Weaken(4 * severity) - if(prob(8)) - M.adjustToxLoss(severity) diff --git a/code/modules/reagents/oldchem/reagents/reagents_med.dm b/code/modules/reagents/oldchem/reagents/reagents_med.dm deleted file mode 100644 index b0a09afc999..00000000000 --- a/code/modules/reagents/oldchem/reagents/reagents_med.dm +++ /dev/null @@ -1,142 +0,0 @@ -/datum/reagent/hydrocodone - name = "Hydrocodone" - id = "hydrocodone" - description = "An extremely effective painkiller; may have long term abuse consequences." - reagent_state = LIQUID - color = "#C805DC" - metabolization_rate = 0.3 // Lasts 1.5 minutes for 15 units - shock_reduction = 200 - -/datum/reagent/hydrocodone/on_mob_life(mob/living/M) - if(ishuman(M)) - var/mob/living/carbon/human/H = M - if(H.traumatic_shock < 100) - H.shock_stage = 0 - ..() - -/datum/reagent/sterilizine - name = "Sterilizine" - id = "sterilizine" - description = "Sterilizes wounds in preparation for surgery." - reagent_state = LIQUID - color = "#C8A5DC" // rgb: 200, 165, 220 - - //makes you squeaky clean -/datum/reagent/sterilizine/reaction_mob(mob/living/M, method=TOUCH, volume) - if(method == TOUCH) - M.germ_level -= min(volume*20, M.germ_level) - -/datum/reagent/sterilizine/reaction_obj(obj/O, volume) - O.germ_level -= min(volume*20, O.germ_level) - -/datum/reagent/sterilizine/reaction_turf(turf/T, volume) - T.germ_level -= min(volume*20, T.germ_level) - -/datum/reagent/synaptizine - name = "Synaptizine" - id = "synaptizine" - description = "Synaptizine is used to treat neuroleptic shock. Can be used to help remove disabling symptoms such as paralysis." - reagent_state = LIQUID - color = "#FA46FA" - overdose_threshold = 40 - -/datum/reagent/synaptizine/on_mob_life(mob/living/M) - M.AdjustDrowsy(-5) - M.AdjustParalysis(-1) - M.AdjustStunned(-1) - M.AdjustWeakened(-1) - M.SetSleeping(0) - if(prob(50)) - M.adjustBrainLoss(-1.0) - ..() - -/datum/reagent/synaptizine/overdose_process(mob/living/M, severity) - var/effect = ..() - if(severity == 1) - if(effect <= 1) - M.visible_message("[M] suddenly and violently vomits!") - M.fakevomit(no_text = 1) - else if(effect <= 3) - M.emote(pick("groan","moan")) - if(effect <= 8) - M.adjustToxLoss(1) - else if(severity == 2) - if(effect <= 2) - M.visible_message("[M] suddenly and violently vomits!") - M.fakevomit(no_text = 1) - else if(effect <= 5) - M.visible_message("[M] staggers and drools, their eyes bloodshot!") - M.Dizzy(8) - M.Weaken(4) - if(effect <= 15) - M.adjustToxLoss(1) - -/datum/reagent/mitocholide - name = "Mitocholide" - id = "mitocholide" - description = "A specialized drug that stimulates the mitochondria of cells to encourage healing of internal organs." - reagent_state = LIQUID - color = "#C8A5DC" // rgb: 200, 165, 220 - -/datum/reagent/mitocholide/on_mob_life(mob/living/M) - if(ishuman(M)) - var/mob/living/carbon/human/H = M - - //Mitocholide is hard enough to get, it's probably fair to make this all internal organs - for(var/name in H.internal_organs) - var/obj/item/organ/internal/I = H.get_int_organ(name) - if(I.damage > 0) - I.damage = max(I.damage-0.4, 0) - ..() - -/datum/reagent/mitocholide/reaction_obj(obj/O, volume) - if(istype(O, /obj/item/organ)) - var/obj/item/organ/Org = O - Org.rejuvenate() - -/datum/reagent/cryoxadone - name = "Cryoxadone" - id = "cryoxadone" - description = "A plasma mixture with almost magical healing powers. Its main limitation is that the targets body temperature must be under 265K for it to metabolise correctly." - reagent_state = LIQUID - color = "#0000C8" // rgb: 200, 165, 220 - heart_rate_decrease = 1 - -/datum/reagent/cryoxadone/on_mob_life(mob/living/M) - if(M.bodytemperature < 265) - M.adjustCloneLoss(-4) - M.adjustOxyLoss(-10) - M.adjustToxLoss(-3) - M.adjustBruteLoss(-12) - M.adjustFireLoss(-12) - M.status_flags &= ~DISFIGURED - ..() - -/datum/reagent/rezadone - name = "Rezadone" - id = "rezadone" - description = "A powder derived from fish toxin, Rezadone can effectively treat genetic damage as well as restoring minor wounds. Overdose will cause intense nausea and minor toxin damage." - reagent_state = SOLID - color = "#669900" // rgb: 102, 153, 0 - overdose_threshold = 30 - -/datum/reagent/rezadone/on_mob_life(mob/living/M) - M.setCloneLoss(0) //Rezadone is almost never used in favor of cryoxadone. Hopefully this will change that. - M.adjustCloneLoss(-1) //What? We just set cloneloss to 0. Why? Simple; this is so external organs properly unmutate. - M.adjustBruteLoss(-1) - M.adjustFireLoss(-1) - M.status_flags &= ~DISFIGURED - ..() - -/datum/reagent/rezadone/overdose_process(mob/living/M, severity) - M.adjustToxLoss(1) - M.Dizzy(5) - M.Jitter(5) - -/datum/reagent/spaceacillin - name = "Spaceacillin" - id = "spaceacillin" - description = "An all-purpose antibiotic agent extracted from space fungus." - reagent_state = LIQUID - color = "#0AB478" - metabolization_rate = 0.2 diff --git a/code/modules/reagents/oldchem/reagents/reagents_misc.dm b/code/modules/reagents/oldchem/reagents/reagents_misc.dm deleted file mode 100644 index ff729dcdf3f..00000000000 --- a/code/modules/reagents/oldchem/reagents/reagents_misc.dm +++ /dev/null @@ -1,189 +0,0 @@ -/*/datum/reagent/silicate - name = "Silicate" - id = "silicate" - description = "A compound that can be used to reinforce glass." - reagent_state = LIQUID - color = "#C7FFFF" // rgb: 199, 255, 255 - -/datum/reagent/silicate/reaction_obj(obj/O, volume) - if(istype(O, /obj/structure/window)) - if(O:silicate <= 200) - - O:silicate += volume - O:health += volume * 3 - - if(!O:silicateIcon) - var/icon/I = icon(O.icon,O.icon_state,O.dir) - - var/r = (volume / 100) + 1 - var/g = (volume / 70) + 1 - var/b = (volume / 50) + 1 - I.SetIntensity(r,g,b) - O.icon = I - O:silicateIcon = I - else - var/icon/I = O:silicateIcon - - var/r = (volume / 100) + 1 - var/g = (volume / 70) + 1 - var/b = (volume / 50) + 1 - I.SetIntensity(r,g,b) - O.icon = I - O:silicateIcon = I */ - - -/datum/reagent/oxygen - name = "Oxygen" - id = "oxygen" - description = "A colorless, odorless gas." - reagent_state = GAS - color = "#808080" // rgb: 128, 128, 128 - - -/datum/reagent/nitrogen - name = "Nitrogen" - id = "nitrogen" - description = "A colorless, odorless, tasteless gas." - reagent_state = GAS - color = "#808080" // rgb: 128, 128, 128 - - -/datum/reagent/hydrogen - name = "Hydrogen" - id = "hydrogen" - description = "A colorless, odorless, nonmetallic, tasteless, highly combustible diatomic gas." - reagent_state = GAS - color = "#808080" // rgb: 128, 128, 128 - - -/datum/reagent/potassium - name = "Potassium" - id = "potassium" - description = "A soft, low-melting solid that can easily be cut with a knife. Reacts violently with water." - reagent_state = SOLID - color = "#A0A0A0" // rgb: 160, 160, 160 - - -/datum/reagent/sulfur - name = "Sulfur" - id = "sulfur" - description = "A chemical element." - reagent_state = SOLID - color = "#BF8C00" // rgb: 191, 140, 0 - - -/datum/reagent/sodium - name = "Sodium" - id = "sodium" - description = "A chemical element." - reagent_state = SOLID - color = "#808080" // rgb: 128, 128, 128 - - -/datum/reagent/phosphorus - name = "Phosphorus" - id = "phosphorus" - description = "A chemical element." - reagent_state = SOLID - color = "#832828" // rgb: 131, 40, 40 - - -/datum/reagent/carbon - name = "Carbon" - id = "carbon" - description = "A chemical element." - reagent_state = SOLID - color = "#1C1300" // rgb: 30, 20, 0 - -/datum/reagent/carbon/reaction_turf(turf/T, volume) - if(!istype(T, /turf/space) && !(locate(/obj/effect/decal/cleanable/dirt) in T)) // Only add one dirt per turf. Was causing people to crash. - new /obj/effect/decal/cleanable/dirt(T) - -/datum/reagent/gold - name = "Gold" - id = "gold" - description = "Gold is a dense, soft, shiny metal and the most malleable and ductile metal known." - reagent_state = SOLID - color = "#F7C430" // rgb: 247, 196, 48 - - -/datum/reagent/silver - name = "Silver" - id = "silver" - description = "A lustrous metallic element regarded as one of the precious metals." - reagent_state = SOLID - color = "#D0D0D0" // rgb: 208, 208, 208 - - -/datum/reagent/aluminum - name = "Aluminum" - id = "aluminum" - description = "A silvery white and ductile member of the boron group of chemical elements." - reagent_state = SOLID - color = "#A8A8A8" // rgb: 168, 168, 168 - - -/datum/reagent/silicon - name = "Silicon" - id = "silicon" - description = "A tetravalent metalloid, silicon is less reactive than its chemical analog carbon." - reagent_state = SOLID - color = "#A8A8A8" // rgb: 168, 168, 168 - - -/datum/reagent/copper - name = "Copper" - id = "copper" - description = "A highly ductile metal." - color = "#6E3B08" // rgb: 110, 59, 8 - - -/datum/reagent/iron - name = "Iron" - id = "iron" - description = "Pure iron is a metal." - reagent_state = SOLID - color = "#C8A5DC" // rgb: 200, 165, 220 - -/datum/reagent/iron/on_mob_life(mob/living/M) - if(ishuman(M)) - var/mob/living/carbon/human/H = M - if(!H.species.exotic_blood && !(H.species.flags & NO_BLOOD)) - H.vessel.add_reagent("blood", 0.8) - ..() - - -//foam -/datum/reagent/fluorosurfactant - name = "Fluorosurfactant" - id = "fluorosurfactant" - description = "A perfluoronated sulfonic acid that forms a foam when mixed with water." - reagent_state = LIQUID - color = "#9E6B38" // rgb: 158, 107, 56 - -// metal foaming agent -// this is lithium hydride. Add other recipies (e.g. LiH + H2O -> LiOH + H2) eventually -/datum/reagent/ammonia - name = "Ammonia" - id = "ammonia" - description = "A caustic substance commonly used in fertilizer or household cleaners." - reagent_state = GAS - color = "#404030" // rgb: 64, 64, 48 - -/datum/reagent/diethylamine - name = "Diethylamine" - id = "diethylamine" - description = "A secondary amine, useful as a plant nutrient and as building block for other compounds." - reagent_state = LIQUID - color = "#322D00" - - -// Ported from Bay as part of the Botany Update -// Allows you to make planks from any plant that has this reagent in it. -// Also vines with this reagent are considered dense. -/datum/reagent/woodpulp - name = "Wood Pulp" - id = "woodpulp" - description = "A mass of wood fibers." - reagent_state = LIQUID - color = "#B97A57" \ No newline at end of file diff --git a/code/modules/reagents/oldchem/reagents/reagents_toxin.dm b/code/modules/reagents/oldchem/reagents/reagents_toxin.dm deleted file mode 100644 index 0aae5e3f40e..00000000000 --- a/code/modules/reagents/oldchem/reagents/reagents_toxin.dm +++ /dev/null @@ -1,414 +0,0 @@ -/datum/reagent/toxin - name = "Toxin" - id = "toxin" - description = "A Toxic chemical." - reagent_state = LIQUID - color = "#CF3600" // rgb: 207, 54, 0 - -/datum/reagent/toxin/on_mob_life(mob/living/M) - M.adjustToxLoss(2) - ..() - -/datum/reagent/spider_venom - name = "Spider venom" - id = "spidertoxin" - description = "A toxic venom injected by spacefaring arachnids." - reagent_state = LIQUID - color = "#CF3600" // rgb: 207, 54, 0 - -/datum/reagent/spider_venom/on_mob_life(mob/living/M) - M.adjustToxLoss(1.5) - ..() - -/datum/reagent/plasticide - name = "Plasticide" - id = "plasticide" - description = "Liquid plastic, do not eat." - reagent_state = LIQUID - color = "#CF3600" // rgb: 207, 54, 0 - -/datum/reagent/plasticide/on_mob_life(mob/living/M) - M.adjustToxLoss(1.5) - ..() - - -/datum/reagent/minttoxin - name = "Mint Toxin" - id = "minttoxin" - description = "Useful for dealing with undesirable customers." - reagent_state = LIQUID - color = "#CF3600" // rgb: 207, 54, 0 - -/datum/reagent/minttoxin/on_mob_life(mob/living/M) - if(FAT in M.mutations) - M.gib() - ..() - -/datum/reagent/slimejelly - name = "Slime Jelly" - id = "slimejelly" - description = "A gooey semi-liquid produced from one of the deadliest lifeforms in existence. SO REAL." - reagent_state = LIQUID - color = "#801E28" // rgb: 128, 30, 40 - -/datum/reagent/slimejelly/on_mob_life(mob/living/M) - if(prob(10)) - to_chat(M, "Your insides are burning!") - M.adjustToxLoss(rand(20,60)*REM) - else if(prob(40)) - M.adjustBruteLoss(-5*REM) - ..() - -/datum/reagent/slimetoxin - name = "Mutation Toxin" - id = "mutationtoxin" - description = "A corruptive toxin produced by slimes." - reagent_state = LIQUID - color = "#13BC5E" // rgb: 19, 188, 94 - -/datum/reagent/slimetoxin/on_mob_life(mob/living/M) - if(ishuman(M)) - var/mob/living/carbon/human/human = M - if(human.species.name != "Shadow") - to_chat(M, "Your flesh rapidly mutates!") - to_chat(M, "You are now a Shadow Person, a mutant race of darkness-dwelling humanoids.") - to_chat(M, "Your body reacts violently to light. \green However, it naturally heals in darkness.") - to_chat(M, "Aside from your new traits, you are mentally unchanged and retain your prior obligations.") - human.set_species("Shadow") - ..() - -/datum/reagent/aslimetoxin - name = "Advanced Mutation Toxin" - id = "amutationtoxin" - description = "An advanced corruptive toxin produced by slimes." - reagent_state = LIQUID - color = "#13BC5E" // rgb: 19, 188, 94 - -/datum/reagent/aslimetoxin/reaction_mob(mob/living/M, method=TOUCH, volume) - if(method != TOUCH) - M.ForceContractDisease(new /datum/disease/transformation/slime(0)) - - -/datum/reagent/mercury - name = "Mercury" - id = "mercury" - description = "A chemical element." - reagent_state = LIQUID - color = "#484848" // rgb: 72, 72, 72 - metabolization_rate = 0.2 - penetrates_skin = 1 - -/datum/reagent/mercury/on_mob_life(mob/living/M) - if(prob(70)) - M.adjustBrainLoss(1) - ..() - -/datum/reagent/chlorine - name = "Chlorine" - id = "chlorine" - description = "A chemical element." - reagent_state = GAS - color = "#808080" // rgb: 128, 128, 128 - penetrates_skin = 1 - process_flags = ORGANIC | SYNTHETIC - -/datum/reagent/chlorine/on_mob_life(mob/living/M) - M.adjustFireLoss(1) - ..() - -/datum/reagent/fluorine - name = "Fluorine" - id = "fluorine" - description = "A highly-reactive chemical element." - reagent_state = GAS - color = "#6A6054" - penetrates_skin = 1 - process_flags = ORGANIC | SYNTHETIC - -/datum/reagent/fluorine/on_mob_life(mob/living/M) - M.adjustFireLoss(1) - M.adjustToxLoss(1*REM) - ..() - -/datum/reagent/radium - name = "Radium" - id = "radium" - description = "Radium is an alkaline earth metal. It is extremely radioactive." - reagent_state = SOLID - color = "#C7C7C7" // rgb: 199,199,199 - metabolization_rate = 0.4 - penetrates_skin = 1 - -/datum/reagent/radium/on_mob_life(mob/living/M) - if(M.radiation < 80) - M.apply_effect(4, IRRADIATE, negate_armor = 1) - ..() - -/datum/reagent/radium/reaction_turf(turf/T, volume) - if(volume >= 3 && !istype(T, /turf/space)) - new /obj/effect/decal/cleanable/greenglow(T) - -/datum/reagent/mutagen - name = "Unstable mutagen" - id = "mutagen" - description = "Might cause unpredictable mutations. Keep away from children." - reagent_state = LIQUID - color = "#04DF27" - metabolization_rate = 0.3 - -/datum/reagent/mutagen/reaction_mob(mob/living/M, method=TOUCH, volume) - if(!..()) - return - if(!M.dna) - return //No robots, AIs, aliens, Ians or other mobs should be affected by this. - if((method==TOUCH && prob(33)) || method==INGEST) - randmutb(M) - domutcheck(M, null) - M.UpdateAppearance() - -/datum/reagent/mutagen/on_mob_life(mob/living/M) - if(!M.dna) - return //No robots, AIs, aliens, Ians or other mobs should be affected by this. - M.apply_effect(2*REM, IRRADIATE, negate_armor = 1) - if(prob(4)) - randmutb(M) - ..() - - -/datum/reagent/uranium - name ="Uranium" - id = "uranium" - description = "A silvery-white metallic chemical element in the actinide series, weakly radioactive." - reagent_state = SOLID - color = "#B8B8C0" // rgb: 184, 184, 192 - -/datum/reagent/uranium/on_mob_life(mob/living/M) - M.apply_effect(2, IRRADIATE, negate_armor = 1) - ..() - -/datum/reagent/uranium/reaction_turf(turf/T, volume) - if(volume >= 3 && !istype(T, /turf/space)) - new /obj/effect/decal/cleanable/greenglow(T) - - -/datum/reagent/lexorin - name = "Lexorin" - id = "lexorin" - description = "Lexorin temporarily stops respiration. Causes tissue damage." - reagent_state = LIQUID - color = "#52685D" - metabolization_rate = 0.2 - -/datum/reagent/lexorin/on_mob_life(mob/living/M) - M.adjustToxLoss(1) - ..() - - -/datum/reagent/sacid - name = "Sulphuric acid" - id = "sacid" - description = "A strong mineral acid with the molecular formula H2SO4." - reagent_state = LIQUID - color = "#00D72B" - process_flags = ORGANIC | SYNTHETIC - -/datum/reagent/sacid/on_mob_life(mob/living/M) - M.adjustFireLoss(1) - ..() - -/datum/reagent/sacid/reaction_mob(mob/living/M, method=TOUCH, volume) - if(method == TOUCH) - if(ishuman(M)) - var/mob/living/carbon/human/H = M - - if(volume > 25) - - if(H.wear_mask) - to_chat(H, "Your mask protects you from the acid!") - return - - if(H.head) - to_chat(H, "Your helmet protects you from the acid!") - return - - if(!M.unacidable) - if(prob(75)) - var/obj/item/organ/external/affecting = H.get_organ("head") - if(affecting) - affecting.take_damage(5, 10) - H.UpdateDamageIcon() - H.emote("scream") - else - M.take_organ_damage(5,10) - else - M.take_organ_damage(5,10) - - if(method == INGEST) - if(ishuman(M)) - var/mob/living/carbon/human/H = M - - if(volume < 10) - to_chat(M, "The greenish acidic substance stings you, but isn't concentrated enough to harm you!") - - if(volume >=10 && volume <=25) - if(!H.unacidable) - M.take_organ_damage(0,min(max(volume-10,2)*2,20)) - M.emote("scream") - - - if(volume > 25) - if(!M.unacidable) - if(prob(75)) - var/obj/item/organ/external/affecting = H.get_organ("head") - if(affecting) - affecting.take_damage(0, 20) - H.UpdateDamageIcon() - H.emote("scream") - else - M.take_organ_damage(0,20) - -/datum/reagent/sacid/reaction_obj(obj/O, volume) - if((istype(O,/obj/item) || istype(O,/obj/effect/glowshroom)) && prob(40)) - if(!O.unacidable) - var/obj/effect/decal/cleanable/molten_item/I = new/obj/effect/decal/cleanable/molten_item(O.loc) - I.desc = "Looks like this was \an [O] some time ago." - O.visible_message("[O] melts.") - qdel(O) - - -/datum/reagent/hellwater - name = "Hell Water" - id = "hell_water" - description = "YOUR FLESH! IT BURNS!" - process_flags = ORGANIC | SYNTHETIC //Admin-bus has no brakes! KILL THEM ALL. - metabolization_rate = 1 - -/datum/reagent/hellwater/on_mob_life(mob/living/M) - M.fire_stacks = min(5, M.fire_stacks + 3) - M.IgniteMob() //Only problem with igniting people is currently the commonly availible fire suits make you immune to being on fire - M.adjustToxLoss(1) - M.adjustFireLoss(1) //Hence the other damages... ain't I a bastard? - M.adjustBrainLoss(5) - ..() - - -/datum/reagent/carpotoxin - name = "Carpotoxin" - id = "carpotoxin" - description = "A deadly neurotoxin produced by the dreaded spess carp." - reagent_state = LIQUID - color = "#003333" // rgb: 0, 51, 51 - -/datum/reagent/carpotoxin/on_mob_life(mob/living/M) - M.adjustToxLoss(2*REM) - ..() - -/datum/reagent/staminatoxin - name = "Tirizene" - id = "tirizene" - description = "A toxin that affects the stamina of a person when injected into the bloodstream." - reagent_state = LIQUID - color = "#6E2828" - data = 13 - -/datum/reagent/staminatoxin/on_mob_life(mob/living/M) - M.adjustStaminaLoss(REM * data) - data = max(data - 1, 3) - ..() - - -/datum/reagent/spore - name = "Spore Toxin" - id = "spore" - description = "A natural toxin produced by blob spores that inhibits vision when ingested." - color = "#9ACD32" - -/datum/reagent/spores/on_mob_life(mob/living/M) - M.adjustToxLoss(1) - M.damageoverlaytemp = 60 - M.EyeBlurry(3) - ..() - -/datum/reagent/beer2 //disguised as normal beer for use by emagged brobots - name = "Beer" - id = "beer2" - description = "An alcoholic beverage made from malted grains, hops, yeast, and water." - color = "#664300" // rgb: 102, 67, 0 - metabolization_rate = 1.5 * REAGENTS_METABOLISM - -/datum/reagent/beer2/on_mob_life(mob/living/M) - switch(current_cycle) - if(1 to 50) - M.AdjustSleeping(1) - if(51 to INFINITY) - M.AdjustSleeping(1) - M.adjustToxLoss((current_cycle - 50)*REM) - ..() - -/////////////////////////////////////////////////////////////////////////////////////////////////////////////// -/datum/reagent/condensedcapsaicin - name = "Condensed Capsaicin" - id = "condensedcapsaicin" - description = "This shit goes in pepperspray." - reagent_state = LIQUID - color = "#B31008" // rgb: 179, 16, 8 - -/datum/reagent/condensedcapsaicin/reaction_mob(mob/living/M, method=TOUCH, volume) - if(method == TOUCH) - if(ishuman(M)) - var/mob/living/carbon/human/victim = M - var/mouth_covered = 0 - var/eyes_covered = 0 - var/obj/item/safe_thing = null - if( victim.wear_mask ) - if( victim.wear_mask.flags & MASKCOVERSEYES ) - eyes_covered = 1 - safe_thing = victim.wear_mask - if( victim.wear_mask.flags & MASKCOVERSMOUTH ) - mouth_covered = 1 - safe_thing = victim.wear_mask - if( victim.head ) - if( victim.head.flags & MASKCOVERSEYES ) - eyes_covered = 1 - safe_thing = victim.head - if( victim.head.flags & MASKCOVERSMOUTH ) - mouth_covered = 1 - safe_thing = victim.head - if(victim.glasses) - eyes_covered = 1 - if( !safe_thing ) - safe_thing = victim.glasses - if( eyes_covered && mouth_covered ) - to_chat(victim, "Your [safe_thing] protects you from the pepperspray!") - return - else if( mouth_covered ) // Reduced effects if partially protected - to_chat(victim, "Your [safe_thing] protect you from most of the pepperspray!") - if(prob(5)) - victim.emote("scream") - victim.EyeBlurry(3) - victim.EyeBlind(1) - victim.Confused(3) - victim.damageoverlaytemp = 60 - victim.Weaken(3) - victim.drop_item() - return - else if( eyes_covered ) // Eye cover is better than mouth cover - to_chat(victim, "Your [safe_thing] protects your eyes from the pepperspray!") - victim.EyeBlurry(3) - victim.damageoverlaytemp = 30 - return - else // Oh dear :D - if(prob(5)) - victim.emote("scream") - to_chat(victim, "You're sprayed directly in the eyes with pepperspray!") - victim.EyeBlurry(5) - victim.EyeBlind(2) - victim.Confused(6) - victim.damageoverlaytemp = 75 - victim.Weaken(5) - victim.drop_item() - -/datum/reagent/condensedcapsaicin/on_mob_life(mob/living/M) - if(prob(5)) - M.visible_message("[M] [pick("dry heaves!","coughs!","splutters!")]") - ..() diff --git a/code/modules/reagents/reagent_containers.dm b/code/modules/reagents/reagent_containers.dm index f8e6f626bb1..f46d4010e69 100644 --- a/code/modules/reagents/reagent_containers.dm +++ b/code/modules/reagents/reagent_containers.dm @@ -29,9 +29,7 @@ ..() if(!possible_transfer_amounts) verbs -= /obj/item/weapon/reagent_containers/verb/set_APTFT - var/datum/reagents/R = new/datum/reagents(volume) - reagents = R - R.my_atom = src + create_reagents(volume) processing_objects.Add(src) if(spawned_disease) var/datum/disease/F = new spawned_disease(0) diff --git a/code/modules/reagents/reagent_containers/borghydro.dm b/code/modules/reagents/reagent_containers/borghydro.dm index 634e0875aaf..c69c7b4a0ef 100644 --- a/code/modules/reagents/reagent_containers/borghydro.dm +++ b/code/modules/reagents/reagent_containers/borghydro.dm @@ -118,4 +118,4 @@ empty = 0 if(empty) - to_chat(user, "It is currently empty. Allow some time for the internal syntheszier to produce more.") + to_chat(user, "It is currently empty. Allow some time for the internal syntheszier to produce more.") \ No newline at end of file diff --git a/code/modules/reagents/reagent_containers/bottle.dm b/code/modules/reagents/reagent_containers/bottle.dm index a22802a4a45..d46ba85c3c9 100644 --- a/code/modules/reagents/reagent_containers/bottle.dm +++ b/code/modules/reagents/reagent_containers/bottle.dm @@ -1,4 +1,3 @@ - //Not to be confused with /obj/item/weapon/reagent_containers/food/drinks/bottle @@ -331,4 +330,4 @@ name = "BVAK bottle" desc = "A small bottle containing Bio Virus Antidote Kit." icon_state = "wide_bottle" - list_reagents = list("atropine" = 5, "epinephrine" = 5, "salbutamol" = 10, "spaceacillin" = 10) + list_reagents = list("atropine" = 5, "epinephrine" = 5, "salbutamol" = 10, "spaceacillin" = 10) \ No newline at end of file diff --git a/code/modules/reagents/reagent_containers/glass_containers.dm b/code/modules/reagents/reagent_containers/glass_containers.dm index 32836a15cc9..60c924e0515 100644 --- a/code/modules/reagents/reagent_containers/glass_containers.dm +++ b/code/modules/reagents/reagent_containers/glass_containers.dm @@ -1,4 +1,4 @@ - //////////////////////////////////////////////////////////////////////////////// +//////////////////////////////////////////////////////////////////////////////// /// (Mixing)Glass. //////////////////////////////////////////////////////////////////////////////// /obj/item/weapon/reagent_containers/glass @@ -331,7 +331,7 @@ armor = list(melee = 10, bullet = 0, laser = 0, energy = 0, bomb = 0, bio = 0, rad = 0) slot_flags = SLOT_HEAD flags = OPENCONTAINER - + /obj/item/weapon/reagent_containers/glass/bucket/equipped(mob/user, slot) ..() if(slot == slot_head && reagents.total_volume) diff --git a/code/modules/reagents/reagent_containers/hypospray.dm b/code/modules/reagents/reagent_containers/hypospray.dm index 6533dbf52c2..490f46e0a52 100644 --- a/code/modules/reagents/reagent_containers/hypospray.dm +++ b/code/modules/reagents/reagent_containers/hypospray.dm @@ -110,4 +110,4 @@ amount_per_transfer_from_this = 50 possible_transfer_amounts = list(50) volume = 50 - list_reagents = list("stimulants" = 50) + list_reagents = list("stimulants" = 50) \ No newline at end of file diff --git a/code/modules/reagents/newchem/patch.dm b/code/modules/reagents/reagent_containers/patch.dm similarity index 100% rename from code/modules/reagents/newchem/patch.dm rename to code/modules/reagents/reagent_containers/patch.dm diff --git a/code/modules/reagents/reagent_containers/spray.dm b/code/modules/reagents/reagent_containers/spray.dm index 3972f0a4a13..a706d443d90 100644 --- a/code/modules/reagents/reagent_containers/spray.dm +++ b/code/modules/reagents/reagent_containers/spray.dm @@ -216,4 +216,4 @@ if(istype(A, /obj/effect/blob)) // blob damage in blob code return - ..() + ..() \ No newline at end of file diff --git a/code/modules/reagents/reagent_dispenser.dm b/code/modules/reagents/reagent_dispenser.dm index f5225daeae1..4c2d2caa6b8 100644 --- a/code/modules/reagents/reagent_dispenser.dm +++ b/code/modules/reagents/reagent_dispenser.dm @@ -16,9 +16,7 @@ return /obj/structure/reagent_dispensers/New() - var/datum/reagents/R = new/datum/reagents(1000) - reagents = R - R.my_atom = src + create_reagents(1000) if(!possible_transfer_amounts) verbs -= /obj/structure/reagent_dispensers/verb/set_APTFT ..() diff --git a/code/modules/surgery/organs/organ_internal.dm b/code/modules/surgery/organs/organ_internal.dm index 18f0e51b2e2..5dd4d570ee2 100644 --- a/code/modules/surgery/organs/organ_internal.dm +++ b/code/modules/surgery/organs/organ_internal.dm @@ -327,7 +327,7 @@ // Coffee is really bad for you with busted kidneys. // This should probably be expanded in some way, but fucked if I know // what else kidneys can process in our reagent list. - var/datum/reagent/coffee = locate(/datum/reagent/drink/coffee) in owner.reagents.reagent_list + var/datum/reagent/coffee = locate(/datum/reagent/consumable/drink/coffee) in owner.reagents.reagent_list if(coffee) if(is_bruised()) owner.adjustToxLoss(0.1 * PROCESS_ACCURACY) @@ -416,7 +416,7 @@ if(src.damage >= src.min_bruised_damage) for(var/datum/reagent/R in owner.reagents.reagent_list) // Ethanol and all drinks are bad - if(istype(R, /datum/reagent/ethanol)) + if(istype(R, /datum/reagent/consumable/ethanol)) owner.adjustToxLoss(0.1 * PROCESS_ACCURACY) // Can't cope with toxins at all diff --git a/paradise.dme b/paradise.dme index 34f790922b8..fc6303fd746 100644 --- a/paradise.dme +++ b/paradise.dme @@ -1830,54 +1830,49 @@ #include "code\modules\projectiles\projectile\magic.dm" #include "code\modules\projectiles\projectile\reusable.dm" #include "code\modules\projectiles\projectile\special.dm" -#include "code\modules\reagents\Chemistry-Colours.dm" -#include "code\modules\reagents\Chemistry-Holder.dm" -#include "code\modules\reagents\Chemistry-Machinery.dm" -#include "code\modules\reagents\Chemistry-Readme.dm" -#include "code\modules\reagents\pandemic.dm" #include "code\modules\reagents\reagent_containers.dm" #include "code\modules\reagents\reagent_dispenser.dm" -#include "code\modules\reagents\newchem\Blob-Reagents.dm" -#include "code\modules\reagents\newchem\chem_heater.dm" -#include "code\modules\reagents\newchem\disease.dm" -#include "code\modules\reagents\newchem\drinks.dm" -#include "code\modules\reagents\newchem\drugs.dm" -#include "code\modules\reagents\newchem\food.dm" -#include "code\modules\reagents\newchem\medicine.dm" -#include "code\modules\reagents\newchem\newchem_procs.dm" -#include "code\modules\reagents\newchem\other.dm" -#include "code\modules\reagents\newchem\paradise_pop.dm" -#include "code\modules\reagents\newchem\patch.dm" -#include "code\modules\reagents\newchem\pyro.dm" -#include "code\modules\reagents\newchem\toxins.dm" -#include "code\modules\reagents\oldchem\chemical_reaction\_chemical_reaction_base.dm" -#include "code\modules\reagents\oldchem\chemical_reaction\chemical_reaction_drink.dm" -#include "code\modules\reagents\oldchem\chemical_reaction\chemical_reaction_food.dm" -#include "code\modules\reagents\oldchem\chemical_reaction\chemical_reaction_harm.dm" -#include "code\modules\reagents\oldchem\chemical_reaction\chemical_reaction_med.dm" -#include "code\modules\reagents\oldchem\chemical_reaction\chemical_reaction_misc.dm" -#include "code\modules\reagents\oldchem\chemical_reaction\chemical_reaction_slime.dm" -#include "code\modules\reagents\oldchem\reagents\__oldchem_defines.dm" -#include "code\modules\reagents\oldchem\reagents\_reagent_base.dm" -#include "code\modules\reagents\oldchem\reagents\reagents_admin.dm" -#include "code\modules\reagents\oldchem\reagents\reagents_drugs.dm" -#include "code\modules\reagents\oldchem\reagents\reagents_flammable.dm" -#include "code\modules\reagents\oldchem\reagents\reagents_food.dm" -#include "code\modules\reagents\oldchem\reagents\reagents_med.dm" -#include "code\modules\reagents\oldchem\reagents\reagents_misc.dm" -#include "code\modules\reagents\oldchem\reagents\reagents_paint.dm" -#include "code\modules\reagents\oldchem\reagents\reagents_toxin.dm" -#include "code\modules\reagents\oldchem\reagents\reagents_water.dm" -#include "code\modules\reagents\oldchem\reagents\drink\reagents_alcohol.dm" -#include "code\modules\reagents\oldchem\reagents\drink\reagents_drink.dm" -#include "code\modules\reagents\oldchem\reagents\drink\reagents_drink_base.dm" -#include "code\modules\reagents\oldchem\reagents\drink\reagents_drink_cold.dm" +#include "code\modules\reagents\chemistry\colors.dm" +#include "code\modules\reagents\chemistry\holder.dm" +#include "code\modules\reagents\chemistry\readme.dm" +#include "code\modules\reagents\chemistry\reagents.dm" +#include "code\modules\reagents\chemistry\recipes.dm" +#include "code\modules\reagents\chemistry\machinery\chem_dispenser.dm" +#include "code\modules\reagents\chemistry\machinery\chem_heater.dm" +#include "code\modules\reagents\chemistry\machinery\chem_master.dm" +#include "code\modules\reagents\chemistry\machinery\pandemic.dm" +#include "code\modules\reagents\chemistry\machinery\reagentgrinder.dm" +#include "code\modules\reagents\chemistry\reagents\admin.dm" +#include "code\modules\reagents\chemistry\reagents\alcohol.dm" +#include "code\modules\reagents\chemistry\reagents\blob.dm" +#include "code\modules\reagents\chemistry\reagents\disease.dm" +#include "code\modules\reagents\chemistry\reagents\drink_base.dm" +#include "code\modules\reagents\chemistry\reagents\drink_cold.dm" +#include "code\modules\reagents\chemistry\reagents\drinks.dm" +#include "code\modules\reagents\chemistry\reagents\drugs.dm" +#include "code\modules\reagents\chemistry\reagents\food.dm" +#include "code\modules\reagents\chemistry\reagents\medicine.dm" +#include "code\modules\reagents\chemistry\reagents\misc.dm" +#include "code\modules\reagents\chemistry\reagents\paint.dm" +#include "code\modules\reagents\chemistry\reagents\paradise_pop.dm" +#include "code\modules\reagents\chemistry\reagents\pyrotechnic.dm" +#include "code\modules\reagents\chemistry\reagents\toxins.dm" +#include "code\modules\reagents\chemistry\reagents\water.dm" +#include "code\modules\reagents\chemistry\recipes\drinks.dm" +#include "code\modules\reagents\chemistry\recipes\drugs.dm" +#include "code\modules\reagents\chemistry\recipes\food.dm" +#include "code\modules\reagents\chemistry\recipes\medicine.dm" +#include "code\modules\reagents\chemistry\recipes\others.dm" +#include "code\modules\reagents\chemistry\recipes\pyrotechnics.dm" +#include "code\modules\reagents\chemistry\recipes\slime_extracts.dm" +#include "code\modules\reagents\chemistry\recipes\toxins.dm" #include "code\modules\reagents\reagent_containers\blood_pack.dm" #include "code\modules\reagents\reagent_containers\borghydro.dm" #include "code\modules\reagents\reagent_containers\bottle.dm" #include "code\modules\reagents\reagent_containers\dropper.dm" #include "code\modules\reagents\reagent_containers\glass_containers.dm" #include "code\modules\reagents\reagent_containers\hypospray.dm" +#include "code\modules\reagents\reagent_containers\patch.dm" #include "code\modules\reagents\reagent_containers\pill.dm" #include "code\modules\reagents\reagent_containers\spray.dm" #include "code\modules\reagents\reagent_containers\syringes.dm"