From e476b418be4b7e16f86897efb85e71b7a26324f1 Mon Sep 17 00:00:00 2001 From: "baloh.matevz" Date: Sat, 18 Aug 2012 22:06:04 +0000 Subject: [PATCH] - Reagent code reorganization commit 5 (Some big errors... Yeah, renaming files in explorer and expecting SVN to understand is a bad idea.) git-svn-id: http://tgstation13.googlecode.com/svn/trunk@4494 316c924e-a436-60f5-8080-3fe189b3f50e --- code/modules/reagents/Chemistry-Colours.dm | 39 + code/modules/reagents/Chemistry-Holder.dm | 440 ++ code/modules/reagents/Chemistry-Machinery.dm | 1029 +++++ code/modules/reagents/Chemistry-Readme.dm | 247 + code/modules/reagents/Chemistry-Reagents.dm | 4041 +++++++++++++++++ code/modules/reagents/Chemistry-Recipes.dm | 1420 ++++++ code/modules/reagents/grenade_launcher.dm | 66 + code/modules/reagents/reagent_containers.dm | 45 + .../reagents/reagent_containers/borghydro.dm | 93 + .../reagents/reagent_containers/dropper.dm | 93 + .../reagents/reagent_containers/food.dm | 11 + .../reagent_containers/food/condiment.dm | 176 + .../reagent_containers/food/drinks.dm | 368 ++ .../reagent_containers/food/drinks/bottle.dm | 278 ++ .../food/drinks/bottle/robot.dm | 0 .../food/drinks/drinkingglass.dm | 446 ++ .../reagent_containers/food/drinks/jar.dm | 29 + .../reagent_containers/food/snacks.dm | 2280 ++++++++++ .../reagent_containers/food/snacks/grown.dm | 925 ++++ .../reagent_containers/food/snacks/meat.dm | 27 + .../reagents/reagent_containers/glass.dm | 231 + .../reagent_containers/glass/bottle.dm | 255 ++ .../reagent_containers/glass/bottle/robot.dm | 33 + .../reagents/reagent_containers/hypospray.dm | 46 + .../reagents/reagent_containers/pill.dm | 171 + .../reagent_containers/robodropper.dm | 88 + .../reagents/reagent_containers/spray.dm | 219 + .../reagents/reagent_containers/syringes.dm | 376 ++ code/modules/reagents/reagent_dispenser.dm | 153 + code/modules/reagents/syringe_gun.dm | 119 + 30 files changed, 13744 insertions(+) create mode 100644 code/modules/reagents/Chemistry-Colours.dm create mode 100644 code/modules/reagents/Chemistry-Holder.dm create mode 100644 code/modules/reagents/Chemistry-Machinery.dm create mode 100644 code/modules/reagents/Chemistry-Readme.dm create mode 100644 code/modules/reagents/Chemistry-Reagents.dm create mode 100644 code/modules/reagents/Chemistry-Recipes.dm create mode 100644 code/modules/reagents/grenade_launcher.dm create mode 100644 code/modules/reagents/reagent_containers.dm create mode 100644 code/modules/reagents/reagent_containers/borghydro.dm create mode 100644 code/modules/reagents/reagent_containers/dropper.dm create mode 100644 code/modules/reagents/reagent_containers/food.dm create mode 100644 code/modules/reagents/reagent_containers/food/condiment.dm create mode 100644 code/modules/reagents/reagent_containers/food/drinks.dm create mode 100644 code/modules/reagents/reagent_containers/food/drinks/bottle.dm create mode 100644 code/modules/reagents/reagent_containers/food/drinks/bottle/robot.dm create mode 100644 code/modules/reagents/reagent_containers/food/drinks/drinkingglass.dm create mode 100644 code/modules/reagents/reagent_containers/food/drinks/jar.dm create mode 100644 code/modules/reagents/reagent_containers/food/snacks.dm create mode 100644 code/modules/reagents/reagent_containers/food/snacks/grown.dm create mode 100644 code/modules/reagents/reagent_containers/food/snacks/meat.dm create mode 100644 code/modules/reagents/reagent_containers/glass.dm create mode 100644 code/modules/reagents/reagent_containers/glass/bottle.dm create mode 100644 code/modules/reagents/reagent_containers/glass/bottle/robot.dm create mode 100644 code/modules/reagents/reagent_containers/hypospray.dm create mode 100644 code/modules/reagents/reagent_containers/pill.dm create mode 100644 code/modules/reagents/reagent_containers/robodropper.dm create mode 100644 code/modules/reagents/reagent_containers/spray.dm create mode 100644 code/modules/reagents/reagent_containers/syringes.dm create mode 100644 code/modules/reagents/reagent_dispenser.dm create mode 100644 code/modules/reagents/syringe_gun.dm diff --git a/code/modules/reagents/Chemistry-Colours.dm b/code/modules/reagents/Chemistry-Colours.dm new file mode 100644 index 00000000000..e1b43763e81 --- /dev/null +++ b/code/modules/reagents/Chemistry-Colours.dm @@ -0,0 +1,39 @@ +/proc/GetColors(hex) + hex = uppertext(hex) + var/hi1 = text2ascii(hex, 2) + var/lo1 = text2ascii(hex, 3) + var/hi2 = text2ascii(hex, 4) + var/lo2 = text2ascii(hex, 5) + var/hi3 = text2ascii(hex, 6) + var/lo3 = text2ascii(hex, 7) + return list(((hi1>= 65 ? hi1-55 : hi1-48)<<4) | (lo1 >= 65 ? lo1-55 : lo1-48), + ((hi2 >= 65 ? hi2-55 : hi2-48)<<4) | (lo2 >= 65 ? lo2-55 : lo2-48), + ((hi3 >= 65 ? hi3-55 : hi3-48)<<4) | (lo3 >= 65 ? lo3-55 : lo3-48)) + +/proc/mix_color_from_reagents(var/list/reagent_list) + if(!reagent_list || !reagent_list.len) return 0 + + var/list/rgbcolor = list(0,0,0) + var/finalcolor = 0 + for(var/datum/reagent/re in reagent_list) // natural color mixing bullshit/algorithm + if(!finalcolor) + rgbcolor = GetColors(re.color) + finalcolor = re.color + else + var/newcolor[3] + var/prergbcolor[3] + prergbcolor = rgbcolor + newcolor = GetColors(re.color) + + rgbcolor[1] = (prergbcolor[1]+newcolor[1])/2 + rgbcolor[2] = (prergbcolor[2]+newcolor[2])/2 + rgbcolor[3] = (prergbcolor[3]+newcolor[3])/2 + + finalcolor = rgb(rgbcolor[1], rgbcolor[2], rgbcolor[3]) + + return finalcolor + +// This isn't a perfect color mixing system, the more reagents that are inside, +// the darker it gets until it becomes absolutely pitch black! I dunno, maybe +// that's pretty realistic? I don't do a whole lot of color-mixing anyway. +// If you add brighter colors to it it'll eventually get lighter, though. \ No newline at end of file diff --git a/code/modules/reagents/Chemistry-Holder.dm b/code/modules/reagents/Chemistry-Holder.dm new file mode 100644 index 00000000000..42e3d21501a --- /dev/null +++ b/code/modules/reagents/Chemistry-Holder.dm @@ -0,0 +1,440 @@ +//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 + + 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 = typesof(/datum/reagent) - /datum/reagent + chemical_reagents_list = list() + for(var/path in paths) + var/datum/reagent/D = new path() + chemical_reagents_list[D.id] = D + if(!chemical_reactions_list) + //Chemical Reactions - Initialises all /datum/chemical_reaction into a list (without an index) + var/paths = typesof(/datum/chemical_reaction) - /datum/chemical_reaction + chemical_reactions_list = list() + for(var/path in paths) + var/datum/chemical_reaction/D = new path() + chemical_reactions_list += D + + proc + + remove_any(var/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] + + src.remove_reagent(current_reagent.id, 1) + + current_list_element++ + total_transfered++ + src.update_total() + + handle_reactions() + return total_transfered + + 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 + + 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 + + trans_to(var/obj/target, var/amount=1, var/multiplier=1, var/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 (!target.reagents || src.total_volume<=0) + return + var/datum/reagents/R = target.reagents + amount = min(min(amount, src.total_volume), R.maximum_volume-R.total_volume) + var/part = amount / src.total_volume + var/trans_data = null + for (var/datum/reagent/current_reagent in src.reagent_list) + var/current_reagent_transfer = current_reagent.volume * part + if(preserve_data) + trans_data = current_reagent.data + R.add_reagent(current_reagent.id, (current_reagent_transfer * multiplier), trans_data) + src.remove_reagent(current_reagent.id, current_reagent_transfer) + + src.update_total() + R.update_total() + R.handle_reactions() + src.handle_reactions() + return amount + + copy_to(var/obj/target, var/amount=1, var/multiplier=1, var/preserve_data=1) + if(!target) + return + if(!target.reagents || src.total_volume<=0) + return + var/datum/reagents/R = target.reagents + amount = min(min(amount, src.total_volume), R.maximum_volume-R.total_volume) + var/part = amount / src.total_volume + var/trans_data = null + for (var/datum/reagent/current_reagent in src.reagent_list) + var/current_reagent_transfer = current_reagent.volume * part + if(preserve_data) + trans_data = current_reagent.data + R.add_reagent(current_reagent.id, (current_reagent_transfer * multiplier), trans_data) + + src.update_total() + R.update_total() + R.handle_reactions() + src.handle_reactions() + return amount + + trans_id_to(var/obj/target, var/reagent, var/amount=1, var/preserve_data=1)//Not sure why this proc didn't exist before. It does now! /N + if (!target) + return + if (!target.reagents || src.total_volume<=0 || !src.get_reagent_amount(reagent)) + return + + var/datum/reagents/R = target.reagents + if(src.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) + src.remove_reagent(current_reagent.id, 1) + + current_list_element++ + total_transfered++ + src.update_total() + R.update_total() + R.handle_reactions() + handle_reactions() + + return total_transfered +*/ + + metabolize(var/mob/M) + for(var/A in reagent_list) + var/datum/reagent/R = A + if(M && R) + R.on_mob_life(M) + update_total() + + conditional_update_move(var/atom/A, var/Running = 0) + for(var/datum/reagent/R in reagent_list) + R.on_move (A, Running) + update_total() + + conditional_update(var/atom/A, ) + for(var/datum/reagent/R in reagent_list) + R.on_update (A) + update_total() + + 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/chemical_reaction/C in chemical_reactions_list) + 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() + + 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/metroid_core)) + var/obj/item/metroid_core/M = my_atom + + if(M.POWERFLAG == C.required_other && M.Uses > 0) // added a limit to metroid cores -- Muskets requested this + matching_other = 1 + + + + + if(total_matching_reagents == total_required_reagents && total_matching_catalysts == total_required_catalysts && matching_container && matching_other) + var/multiplier = min(multipliers) + for(var/B in C.required_reagents) + 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) + + for(var/mob/M in viewers(4, get_turf(my_atom)) ) + M << "\blue \icon[my_atom] The solution begins to bubble." + + if(istype(my_atom, /obj/item/metroid_core)) + var/obj/item/metroid_core/ME = my_atom + ME.Uses-- + if(ME.Uses <= 0) // give the notification that the metroid core is dead + for(var/mob/M in viewers(4, get_turf(my_atom)) ) + M << "\blue \icon[my_atom] The innards begin to boil!" + + playsound(get_turf(my_atom), 'sound/effects/bubbles.ogg', 80, 1) + + C.on_reaction(src, created_volume) + reaction_occured = 1 + break + + while(reaction_occured) + update_total() + return 0 + + isolate_reagent(var/reagent) + for(var/A in reagent_list) + var/datum/reagent/R = A + if (R.id != reagent) + del_reagent(R.id) + update_total() + + del_reagent(var/reagent) + for(var/A in reagent_list) + var/datum/reagent/R = A + if (R.id == reagent) + reagent_list -= A + del(A) + update_total() + my_atom.on_reagent_change() + return 0 + + + return 1 + + 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 + + clear_reagents() + for(var/datum/reagent/R in reagent_list) + del_reagent(R.id) + return 0 + + reaction(var/atom/A, var/method=TOUCH, var/volume_modifier=0) + + switch(method) + if(TOUCH) + for(var/datum/reagent/R in reagent_list) + if(ismob(A)) + spawn(0) + if(!R) return + else R.reaction_mob(A, TOUCH, R.volume+volume_modifier) + if(isturf(A)) + spawn(0) + if(!R) return + else R.reaction_turf(A, R.volume+volume_modifier) + if(isobj(A)) + spawn(0) + if(!R) return + else R.reaction_obj(A, R.volume+volume_modifier) + if(INGEST) + for(var/datum/reagent/R in reagent_list) + if(ismob(A) && R) + spawn(0) + if(!R) return + else R.reaction_mob(A, INGEST, R.volume+volume_modifier) + if(isturf(A) && R) + spawn(0) + if(!R) return + else R.reaction_turf(A, R.volume+volume_modifier) + if(isobj(A) && R) + spawn(0) + if(!R) return + else R.reaction_obj(A, R.volume+volume_modifier) + return + + add_reagent(var/reagent, var/amount, var/data=null) + 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. + + 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() + + // mix dem viruses + if(R.id == "blood" && reagent == "blood") + if(R.data && data) + if(R.data && R.data["viruses"] || data && data["viruses"]) + var/list/this = R.data["viruses"] + var/list/that = data["viruses"] + this += that // combine the two + + /* -- Turns out this code was buggy and unnecessary ---- Doohl + for(var/datum/disease/D in this) // makes sure no two viruses are in the reagent at the same time + for(var/datum/disease/d in this)//Something in here can cause an inf loop and I am tired so someone else will have to fix it. + if(d != D) + D.cure(0) + */ + + 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 + R.data = data + //debug + //world << "Adding data" + //for(var/D in R.data) + // world << "Container data: [D] = [R.data[D]]" + //debug + update_total() + my_atom.on_reagent_change() + handle_reactions() + return 0 + + handle_reactions() + + return 1 + + remove_reagent(var/reagent, var/amount, var/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 + + has_reagent(var/reagent, var/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 + + get_reagent_amount(var/reagent) + for(var/A in reagent_list) + var/datum/reagent/R = A + if (R.id == reagent) + return R.volume + + return 0 + + get_reagents() + var/res = "" + for(var/datum/reagent/A in reagent_list) + if (res != "") res += "," + res += A.name + + return res + + +/////////////////////////////////////////////////////////////////////////////////// + + +// Convenience proc to create a reagents holder for an atom +// Max vol is maximum volume of holder +atom/proc/create_reagents(var/max_vol) + reagents = new/datum/reagents(max_vol) + reagents.my_atom = src diff --git a/code/modules/reagents/Chemistry-Machinery.dm b/code/modules/reagents/Chemistry-Machinery.dm new file mode 100644 index 00000000000..c9f58c00a59 --- /dev/null +++ b/code/modules/reagents/Chemistry-Machinery.dm @@ -0,0 +1,1029 @@ +#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 = 1 + idle_power_usage = 40 + var/energy = 100 + var/max_energy = 100 + var/amount = 30 + var/beaker = null + var/recharged = 0 + var/list/dispensable_reagents = list("hydrogen","lithium","carbon","nitrogen","oxygen","fluorine", + "sodium","aluminum","silicon","phosphorus","sulfur","chlorine","potassium","iron", + "copper","mercury","radium","water","ethanol","sugar","sacid") + +/obj/machinery/chem_dispenser/proc/recharge() + if(stat & (BROKEN|NOPOWER)) return + var/addenergy = 2 + var/oldenergy = energy + energy = min(energy + addenergy, max_energy) + if(energy != oldenergy) + use_power(2000) // This thing uses up alot of power (this is still low as shit for creating reagents from thin air) + +/obj/machinery/chem_dispenser/power_change() + if(powered()) + stat &= ~NOPOWER + else + spawn(rand(0, 15)) + stat |= NOPOWER + +/obj/machinery/chem_dispenser/process() + + if(recharged < 0) + recharge() + recharged = 15 + else + recharged -= 1 + +/obj/machinery/chem_dispenser/New() + ..() + recharge() + dispensable_reagents = sortList(dispensable_reagents) + +/obj/machinery/chem_dispenser/ex_act(severity) + switch(severity) + if(1.0) + del(src) + return + if(2.0) + if (prob(50)) + del(src) + return + +/obj/machinery/chem_dispenser/blob_act() + if (prob(50)) + del(src) + +/obj/machinery/chem_dispenser/meteorhit() + del(src) + return + +/obj/machinery/chem_dispenser/proc/updateWindow(mob/user as mob) + winset(user, "chemdispenser.energy", "text=\"Energy: [src.energy]\"") + winset(user, "chemdispenser.amount", "text=\"Amount: [src.amount]\"") + if (beaker) + winset(user, "chemdispenser.eject", "text=\"Eject beaker\"") + else + winset(user, "chemdispenser.eject", "text=\"\[Insert beaker\]\"") +/obj/machinery/chem_dispenser/proc/initWindow(mob/user as mob) + var/i = 0 + var/list/nameparams = params2list(winget(user, "chemdispenser_reagents.template_name", "pos;size;type;image;image-mode")) + var/list/buttonparams = params2list(winget(user, "chemdispenser_reagents.template_dispense", "pos;size;type;image;image-mode;text;is-flat")) + for(var/re in dispensable_reagents) + var/datum/reagent/temp = chemical_reagents_list[re] + if(temp) + var/list/newparams1 = nameparams.Copy() + var/list/newparams2 = buttonparams.Copy() + var/posy = 8 + 40 * i + newparams1["pos"] = text("8,[posy]") + newparams2["pos"] = text("248,[posy]") + newparams1["parent"] = "chemdispenser_reagents" + newparams2["parent"] = "chemdispenser_reagents" + newparams1["text"] = temp.name + newparams2["command"] = text("skincmd \"chemdispenser;[temp.id]\"") + winset(user, "chemdispenser_reagent_name[i]", list2params(newparams1)) + winset(user, "chemdispenser_reagent_dispense[i]", list2params(newparams2)) + i++ + winset(user, "chemdispenser_reagents", "size=340x[8 + 40 * i]") + +/obj/machinery/chem_dispenser/SkinCmd(mob/user as mob, var/data as text) + if(stat & (BROKEN|NOPOWER)) return + if(usr.stat || usr.restrained()) return + if(!in_range(src, usr)) return + + usr.machine = src + + if (data == "amountc") + var/num = input("Enter desired output amount", "Amount", "30") as num + if (num) + amount = text2num(num) + else if (data == "eject") + if (src.beaker) + var/obj/item/weapon/reagent_containers/glass/B = src.beaker + B.loc = src.loc + src.beaker = null + else if (copytext(data, 1, 7) == "amount") + if (text2num(copytext(data, 7))) + amount = text2num(copytext(data, 7)) + else + if (dispensable_reagents.Find(data) && beaker != null) + var/obj/item/weapon/reagent_containers/glass/B = src.beaker + var/datum/reagents/R = B.reagents + var/space = R.maximum_volume - R.total_volume + + R.add_reagent(data, min(amount, energy * 10, space)) + energy = max(energy - min(amount, energy * 10, space) / 10, 0) + + amount = round(amount, 10) // Chem dispenser doesnt really have that much prescion + if (amount < 0) // Since the user can actually type the commands himself, some sanity checking + amount = 0 + if (amount > 100) + amount = 100 + + for(var/mob/player) + if (player.machine == src && player.client) + updateWindow(player) + + src.add_fingerprint(usr) + return + +/obj/machinery/chem_dispenser/attackby(var/obj/item/weapon/reagent_containers/glass/B as obj, var/mob/user as mob) + if(isrobot(user)) + return + + if(!istype(B, /obj/item/weapon/reagent_containers/glass)) + return + + if(src.beaker) + user << "A beaker is already loaded into the machine." + return + + src.beaker = B + user.drop_item() + B.loc = src + user << "You add the beaker to the machine!" + for(var/mob/player) + if (player.machine == src && player.client) + updateWindow(player) + +/obj/machinery/chem_dispenser/attack_ai(mob/user as mob) + return src.attack_hand(user) + +/obj/machinery/chem_dispenser/attack_paw(mob/user as mob) + return src.attack_hand(user) + +/obj/machinery/chem_dispenser/attack_hand(mob/user as mob) + if(stat & BROKEN) + return + user.machine = src + + initWindow(user) + updateWindow(user) + winshow(user, "chemdispenser", 1) + user.skincmds["chemdispenser"] = src + return + +////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + +/obj/machinery/chem_master + name = "ChemMaster 3000" + density = 1 + anchored = 1 + icon = 'icons/obj/chemical.dmi' + icon_state = "mixer0" + use_power = 1 + idle_power_usage = 20 + var/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 + +/obj/machinery/chem_master/New() + var/datum/reagents/R = new/datum/reagents(100) + reagents = R + R.my_atom = src + +/obj/machinery/chem_master/ex_act(severity) + switch(severity) + if(1.0) + del(src) + return + if(2.0) + if (prob(50)) + del(src) + return + +/obj/machinery/chem_master/blob_act() + if (prob(50)) + del(src) + +/obj/machinery/chem_master/meteorhit() + del(src) + return + +/obj/machinery/chem_master/power_change() + if(powered()) + stat &= ~NOPOWER + else + spawn(rand(0, 15)) + stat |= NOPOWER + +/obj/machinery/chem_master/attackby(var/obj/item/weapon/B as obj, var/mob/user as mob) + + if(istype(B, /obj/item/weapon/reagent_containers/glass)) + + if(src.beaker) + user << "A beaker is already loaded into the machine." + return + src.beaker = B + user.drop_item() + B.loc = src + user << "You add the beaker to the machine!" + src.updateUsrDialog() + icon_state = "mixer1" + + else if(istype(B, /obj/item/weapon/storage/pill_bottle)) + + if(src.loaded_pill_bottle) + user << "A pill bottle is already loaded into the machine." + return + + src.loaded_pill_bottle = B + user.drop_item() + B.loc = src + user << "You add the pill bottle into the dispenser slot!" + src.updateUsrDialog() + return + + +/obj/machinery/chem_master/Topic(href, href_list) + if(stat & (BROKEN|NOPOWER)) return + if(usr.stat || usr.restrained()) return + if(!in_range(src, usr)) return + + src.add_fingerprint(usr) + usr.machine = src + + + if (href_list["ejectp"]) + if(loaded_pill_bottle) + loaded_pill_bottle.loc = src.loc + loaded_pill_bottle = null + else if(href_list["close"]) + usr << browse(null, "window=chemmaster") + usr.machine = null + return + + if(beaker) + var/datum/reagents/R = beaker:reagents + if (href_list["analyze"]) + var/dat = "" + if(!condi) + dat += "Chemmaster 3000Chemical infos:

Name:
[href_list["name"]]

Description:
[href_list["desc"]]


(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["add1"]) + + /* + (this fixes a pretty serious exploit) ~~ Doohl + R.remove_reagent(href_list["add1"], 1) //Remove/add used instead of trans_to since we're moving a specific reagent. + reagents.add_reagent(href_list["add1"], 1) + */ + + R.trans_id_to(src, href_list["add1"], 1) + + else if (href_list["add5"]) + R.trans_id_to(src, href_list["add5"], 5) + else if (href_list["add10"]) + R.trans_id_to(src, href_list["add10"], 10) + else if (href_list["addall"]) + var/temp_amt = R.get_reagent_amount(href_list["addall"]) + R.trans_id_to(src, href_list["addall"], temp_amt) + else if (href_list["addcustom"]) + + var/id = href_list["addcustom"] + useramount = input("Select the amount to transfer.", 30, useramount) as num + useramount = isgoodnumber(useramount) + var/realamount = R.get_reagent_amount(id) + R.trans_id_to(src, href_list["addcustom"], realamount) + + else if (href_list["remove1"]) + reagents.remove_reagent(href_list["remove1"], 1) + if(mode) R.add_reagent(href_list["remove1"], 1) + else if (href_list["remove5"]) + reagents.remove_reagent(href_list["remove5"], 5) + if(mode) R.add_reagent(href_list["remove5"], 5) + else if (href_list["remove10"]) + reagents.remove_reagent(href_list["remove10"], 10) + if(mode) R.add_reagent(href_list["remove10"], 10) + else if (href_list["removeall"]) + if(mode) + var/temp_amt = reagents.get_reagent_amount(href_list["removeall"]) + R.add_reagent(href_list["removeall"], temp_amt) + reagents.del_reagent(href_list["removeall"]) + else if (href_list["removecustom"]) + + var/id = href_list["removecustom"] + useramount = input("Select the amount to transfer.", 30, useramount) as num + useramount = isgoodnumber(useramount) + reagents.remove_reagent(id, useramount) + if(mode) R.add_reagent(id, useramount) + + else if (href_list["toggle"]) + if(mode) + mode = 0 + else + mode = 1 + else if (href_list["main"]) + attack_hand(usr) + return + else if (href_list["eject"]) + if(beaker) + beaker:loc = src.loc + beaker = null + reagents.clear_reagents() + icon_state = "mixer0" + else if (href_list["createpill"]) + var/name = reject_bad_text(input(usr,"Name:","Name your pill!",reagents.get_master_reagent_name())) + var/obj/item/weapon/reagent_containers/pill/P + + if(loaded_pill_bottle && loaded_pill_bottle.contents.len < loaded_pill_bottle.storage_slots) + P = new/obj/item/weapon/reagent_containers/pill(loaded_pill_bottle) + else + P = new/obj/item/weapon/reagent_containers/pill(src.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) + reagents.trans_to(P,50) + + else if (href_list["createbottle"]) + if(!condi) + var/name = reject_bad_text(input(usr,"Name:","Name your bottle!",reagents.get_master_reagent_name())) + var/obj/item/weapon/reagent_containers/glass/bottle/P = new/obj/item/weapon/reagent_containers/glass/bottle(src.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) + reagents.trans_to(P,30) + else + var/obj/item/weapon/reagent_containers/food/condiment/P = new/obj/item/weapon/reagent_containers/food/condiment(src.loc) + reagents.trans_to(P,50) + + src.updateUsrDialog() + return + +/obj/machinery/chem_master/attack_ai(mob/user as mob) + return src.attack_hand(user) + +/obj/machinery/chem_master/attack_paw(mob/user as mob) + return src.attack_hand(user) + +/obj/machinery/chem_master/attack_hand(mob/user as mob) + if(stat & BROKEN) + return + user.machine = src + var/dat = "" + if(!beaker) + dat = "Please insert beaker.
" + if(src.loaded_pill_bottle) + dat += "Eject Pill Bottle \[[loaded_pill_bottle.contents.len]/[loaded_pill_bottle.storage_slots]\]

" + else + dat += "No pill bottle inserted.

" + dat += "Close" + else + var/datum/reagents/R = beaker:reagents + dat += "Eject beaker and Clear Buffer
" + if(src.loaded_pill_bottle) + dat += "Eject Pill Bottle \[[loaded_pill_bottle.contents.len]/[loaded_pill_bottle.storage_slots]\]

" + else + dat += "No pill bottle inserted.

" + if(!R.total_volume) + dat += "Beaker is empty." + else + dat += "Add to buffer:
" + for(var/datum/reagent/G in R.reagent_list) + dat += "[G.name] , [G.volume] Units - " + dat += "(Analyze) " + dat += "(1) " + if(G.volume >= 5) dat += "(5) " + if(G.volume >= 10) dat += "(10) " + dat += "(All) " + dat += "(Custom)
" + if(!mode) + dat += "
Transfer to disposal:
" + else + dat += "
Transfer to beaker:
" + if(reagents.total_volume) + for(var/datum/reagent/N in reagents.reagent_list) + dat += "[N.name] , [N.volume] Units - " + dat += "(Analyze) " + dat += "(1) " + if(N.volume >= 5) dat += "(5) " + if(N.volume >= 10) dat += "(10) " + dat += "(All) " + dat += "(Custom)
" + else + dat += "Empty
" + if(!condi) + dat += "

Create pill (50 units max)
" + dat += "Create bottle (30 units max)" + else + dat += "Create bottle (50 units max)" + if(!condi) + user << browse("Chemmaster 3000Chemmaster menu:

[dat]", "window=chem_master;size=575x400") + else + user << browse("Condimaster 3000Condimaster menu:

[dat]", "window=chem_master;size=575x400") + onclose(user, "chem_master") + return + +/obj/machinery/chem_master/proc/isgoodnumber(var/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/condimaster + name = "CondiMaster 3000" + condi = 1 + +//////////////////////////////////////////////////////////////////////// +//////////////////////////////////////////////////////////////////////// + +/obj/machinery/computer/pandemic + name = "PanD.E.M.I.C 2200" + density = 1 + anchored = 1 + icon = 'icons/obj/chemical.dmi' + icon_state = "mixer0" + use_power = 1 + idle_power_usage = 20 + var/temphtml = "" + var/wait = null + var/obj/item/weapon/reagent_containers/glass/beaker = null + + +/obj/machinery/computer/pandemic/set_broken() + icon_state = (src.beaker?"mixer1_b":"mixer0_b") + stat |= BROKEN + + +/obj/machinery/computer/pandemic/power_change() + + if(stat & BROKEN) + icon_state = (src.beaker?"mixer1_b":"mixer0_b") + + else if(powered()) + icon_state = (src.beaker?"mixer1":"mixer0") + stat &= ~NOPOWER + + else + spawn(rand(0, 15)) + src.icon_state = (src.beaker?"mixer1_nopower":"mixer0_nopower") + stat |= NOPOWER + + +/obj/machinery/computer/pandemic/Topic(href, href_list) + if(stat & (NOPOWER|BROKEN)) return + if(usr.stat || usr.restrained()) return + if(!in_range(src, usr)) return + + usr.machine = src + if(!beaker) return + + if (href_list["create_vaccine"]) + if(!src.wait) + var/obj/item/weapon/reagent_containers/glass/bottle/B = new/obj/item/weapon/reagent_containers/glass/bottle(src.loc) + if(B) + var/vaccine_type = text2path(href_list["create_vaccine"])//the path is received as string - converting + var/datum/disease/D = new vaccine_type + if(D) + B.name = "[D.name] vaccine bottle" + B.reagents.add_reagent("vaccine",15,vaccine_type) + del(D) + wait = 1 + var/datum/reagents/R = beaker.reagents + var/datum/reagent/blood/Blood = null + for(var/datum/reagent/blood/L in R.reagent_list) + if(L) + Blood = L + break + var/list/res = Blood.data["resistances"] + spawn(res.len*500) + src.wait = null + else + src.temphtml = "The replicator is not ready yet." + src.updateUsrDialog() + return + else if (href_list["create_virus_culture"]) + if(!wait) + var/obj/item/weapon/reagent_containers/glass/bottle/B = new/obj/item/weapon/reagent_containers/glass/bottle(src.loc) + B.icon_state = "bottle3" + var/type = text2path(href_list["create_virus_culture"])//the path is received as string - converting + var/datum/disease/D = new type + var/list/data = list("viruses"=list(D)) + var/name = sanitize(input(usr,"Name:","Name the culture",D.name)) + if(!name || name == " ") name = D.name + B.name = "[name] culture bottle" + B.desc = "A small bottle. Contains [D.agent] culture in synthblood medium." + B.reagents.add_reagent("blood",20,data) + src.updateUsrDialog() + wait = 1 + spawn(2000) + src.wait = null + else + src.temphtml = "The replicator is not ready yet." + src.updateUsrDialog() + return + else if (href_list["empty_beaker"]) + beaker.reagents.clear_reagents() + src.updateUsrDialog() + return + else if (href_list["eject"]) + beaker:loc = src.loc + beaker = null + icon_state = "mixer0" + src.updateUsrDialog() + return + else if(href_list["clear"]) + src.temphtml = "" + src.updateUsrDialog() + return + else + usr << browse(null, "window=pandemic") + src.updateUsrDialog() + return + + src.add_fingerprint(usr) + return + +/obj/machinery/computer/pandemic/attack_ai(mob/user as mob) + return src.attack_hand(user) + +/obj/machinery/computer/pandemic/attack_paw(mob/user as mob) + return src.attack_hand(user) + +/obj/machinery/computer/pandemic/attack_hand(mob/user as mob) + if(stat & (NOPOWER|BROKEN)) + return + user.machine = src + var/dat = "" + if(src.temphtml) + dat = "[src.temphtml]

Main Menu" + else if(!beaker) + dat += "Please insert beaker.
" + dat += "Close" + else + var/datum/reagents/R = beaker.reagents + var/datum/reagent/blood/Blood = null + for(var/datum/reagent/blood/B in R.reagent_list) + if(B) + Blood = B + break + if(!R.total_volume||!R.reagent_list.len) + dat += "The beaker is empty
" + else if(!Blood) + dat += "No blood sample found in beaker" + else + dat += "

Blood sample data:

" + dat += "Blood DNA: [(Blood.data["blood_DNA"]||"none")]
" + dat += "Blood Type: [(Blood.data["blood_type"]||"none")]
" + + + if(Blood.data["viruses"]) + var/list/vir = Blood.data["viruses"] + if(vir.len) + for(var/datum/disease/D in Blood.data["viruses"]) + if(!D.hidden[PANDEMIC]) + + dat += "Disease Agent: [D?"[D.agent] - Create virus culture bottle":"none"]
" + dat += "Common name: [(D.name||"none")]
" + dat += "Description: [(D.desc||"none")]
" + dat += "Possible cure: [(D.cure||"none")]

" + + dat += "Contains antibodies to: " + if(Blood.data["resistances"]) + var/list/res = Blood.data["resistances"] + if(res.len) + dat += "
" + else + dat += "nothing
" + else + dat += "nothing
" + dat += "
Eject beaker[((R.total_volume&&R.reagent_list.len) ? "-- Empty beaker":"")]
" + dat += "Close" + + user << browse("[src.name]
[dat]", "window=pandemic;size=575x400") + onclose(user, "pandemic") + return + +/obj/machinery/computer/pandemic/attackby(var/obj/I as obj, var/mob/user as mob) + if(istype(I, /obj/item/weapon/screwdriver)) + playsound(src.loc, 'sound/items/Screwdriver.ogg', 50, 1) + if(do_after(user, 20)) + if (src.stat & BROKEN) + user << "\blue The broken glass falls out." + var/obj/structure/computerframe/A = new /obj/structure/computerframe(src.loc) + new /obj/item/weapon/shard(src.loc) + var/obj/item/weapon/circuitboard/pandemic/M = new /obj/item/weapon/circuitboard/pandemic(A) + for (var/obj/C in src) + C.loc = src.loc + A.circuit = M + A.state = 3 + A.icon_state = "3" + A.anchored = 1 + del(src) + else + user << "\blue You disconnect the monitor." + var/obj/structure/computerframe/A = new /obj/structure/computerframe( src.loc ) + var/obj/item/weapon/circuitboard/pandemic/M = new /obj/item/weapon/circuitboard/pandemic(A) + for (var/obj/C in src) + C.loc = src.loc + A.circuit = M + A.state = 4 + A.icon_state = "4" + A.anchored = 1 + del(src) + else if(istype(I, /obj/item/weapon/reagent_containers/glass)) + if(stat & (NOPOWER|BROKEN)) return + if(src.beaker) + user << "A beaker is already loaded into the machine." + return + + src.beaker = I + user.drop_item() + I.loc = src + user << "You add the beaker to the machine!" + src.updateUsrDialog() + icon_state = "mixer1" + + else + ..() + return +//////////////////////////////////////////////////////////////////////// +//////////////////////////////////////////////////////////////////////// +/obj/machinery/reagentgrinder + + name = "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 + var/list/blend_items = list ( + + //Sheets + /obj/item/stack/sheet/plasma = list("plasma" = 20), + /obj/item/stack/sheet/uranium = list("uranium" = 20), + /obj/item/stack/sheet/clown = list("banana" = 20), + /obj/item/stack/sheet/silver = list("silver" = 20), + /obj/item/stack/sheet/gold = list("gold" = 20), + /obj/item/weapon/grown/nettle = list("sacid" = 0), + /obj/item/weapon/grown/deathnettle = list("pacid" = 0), + + //Blender Stuff + /obj/item/weapon/reagent_containers/food/snacks/grown/soybeans = list("soymilk" = 0), + /obj/item/weapon/reagent_containers/food/snacks/grown/tomato = list("ketchup" = 0), + /obj/item/weapon/reagent_containers/food/snacks/grown/corn = list("cornoil" = 0), + + + + //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/pill = list(), + /obj/item/weapon/reagent_containers/food = list() + ) + + var/list/juice_items = list ( + + //Juicer Stuff + /obj/item/weapon/reagent_containers/food/snacks/grown/tomato = list("tomatojuice" = 0), + /obj/item/weapon/reagent_containers/food/snacks/grown/carrot = list("carrotjuice" = 0), + /obj/item/weapon/reagent_containers/food/snacks/grown/berries = list("berryjuice" = 0), + /obj/item/weapon/reagent_containers/food/snacks/grown/banana = list("banana" = 0), + /obj/item/weapon/reagent_containers/food/snacks/grown/potato = list("potato" = 0), + /obj/item/weapon/reagent_containers/food/snacks/grown/lemon = list("lemonjuice" = 0), + /obj/item/weapon/reagent_containers/food/snacks/grown/orange = list("orangejuice" = 0), + /obj/item/weapon/reagent_containers/food/snacks/grown/lime = list("limejuice" = 0), + /obj/item/weapon/reagent_containers/food/snacks/watermelonslice = list("watermelonjuice" = 0), + /obj/item/weapon/reagent_containers/food/snacks/grown/poisonberries = list("poisonberryjuice" = 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(var/obj/item/O as obj, var/mob/user as mob) + + + 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 + src.beaker = O + user.drop_item() + O.loc = src + update_icon() + src.updateUsrDialog() + return 0 + + if(holdingitems && holdingitems.len >= limit) + usr << "The machine cannot hold anymore items." + return 1 + + //Fill machine with the plantbag! + if(istype(O, /obj/item/weapon/plantbag)) + + for (var/obj/item/weapon/reagent_containers/food/snacks/grown/G in O.contents) + O.contents -= G + G.loc = src + holdingitems += G + if((holdingitems && holdingitems.len >= limit) || beaker.reagents.total_volume >= 80) //Sanity checking so the blender doesn't overfill + user << "You fill the All-In-One grinder to the brim." + break + + if(!O.contents.len) + user << "You empty the plant bag into the All-In-One grinder." + + src.updateUsrDialog() + return 0 + + if (!is_type_in_list(O, blend_items) && !is_type_in_list(O, juice_items)) + user << "Cannot refine into a reagent." + return 1 + + user.before_take_item(O) + O.loc = src + holdingitems += O + src.updateUsrDialog() + return 0 + +/obj/machinery/reagentgrinder/attack_paw(mob/user as mob) + return src.attack_hand(user) + +/obj/machinery/reagentgrinder/attack_ai(mob/user as mob) + return 0 + +/obj/machinery/reagentgrinder/attack_hand(mob/user as mob) + user.machine = src + interact(user) + +/obj/machinery/reagentgrinder/proc/interact(mob/user as mob) // 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.machine = src + switch(href_list["action"]) + if ("grind") + grind() + if("juice") + juice() + if("eject") + eject() + if ("detach") + detach() + src.updateUsrDialog() + return + +/obj/machinery/reagentgrinder/proc/detach() + + if (usr.stat != 0) + return + if (!beaker) + return + beaker.loc = src.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.loc = src.loc + holdingitems -= O + holdingitems = list() + +/obj/machinery/reagentgrinder/proc/is_allowed(var/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(var/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(var/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(var/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_grownweapon_amount(var/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(var/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(var/obj/item/O) + holdingitems -= O + del(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(src.loc, 'sound/machines/juicer.ogg', 20, 1) + inuse = 1 + spawn(50) + 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 = 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(src.loc, 'sound/machines/blender.ogg', 50, 1) + inuse = 1 + spawn(60) + 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 = 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) + 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)) + + 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) + + //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) diff --git a/code/modules/reagents/Chemistry-Readme.dm b/code/modules/reagents/Chemistry-Readme.dm new file mode 100644 index 00000000000..e3eab685c7b --- /dev/null +++ b/code/modules/reagents/Chemistry-Readme.dm @@ -0,0 +1,247 @@ +/* +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(var/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(var/obj/target, var/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(var/obj/target, var/reagent, var/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(var/mob/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. + + isolate_reagent(var/reagent) + Pass it a reagent id and it will remove all reagents but that one. + It's that simple. + + del_reagent(var/reagent) + Completely remove the reagent with the matching id. + + reaction_fire(exposed_temp) + Simply calls the reaction_fire procs of all contained reagents. + + 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(var/atom/A, var/method=TOUCH, var/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(var/reagent, var/amount, var/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(var/reagent, var/amount) + The exact opposite of the add_reagent proc. + + has_reagent(var/reagent, var/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(var/reagent) + Returns the amount of the matching reagent inside the + holder. Returns 0 if the reagent is missing. + + 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(var/mob/M, var/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. + + reaction_obj(var/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(var/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(var/mob/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. I used it for the sleep + toxins to make them work slowly instead of instantly. You could also 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(var/datum/reagents/holder, var/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(var/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/Chemistry-Reagents.dm b/code/modules/reagents/Chemistry-Reagents.dm new file mode 100644 index 00000000000..af2f39ba8ae --- /dev/null +++ b/code/modules/reagents/Chemistry-Reagents.dm @@ -0,0 +1,4041 @@ +#define SOLID 1 +#define LIQUID 2 +#define GAS 3 + +//The reaction procs must ALWAYS set src = null, this detaches the proc from the object (the reagent) +//so that it can continue working when the reagent is deleted while the proc is still active. + +datum + reagent + var/name = "Reagent" + var/id = "reagent" + var/description = "" + var/datum/reagents/holder = null + var/reagent_state = SOLID + var/data = null + var/volume = 0 + var/nutriment_factor = 0 + //var/list/viruses = list() + var/color = "#000000" // rgb: 0, 0, 0 (does not support alpha channels - yet!) + + proc + reaction_mob(var/mob/M, var/method=TOUCH, var/volume) //By default we have a chance to transfer some + if(!istype(M, /mob/living)) return 0 + var/datum/reagent/self = src + src = null //of the reagent to the mob on TOUCHING it. + + if(!istype(self.holder.my_atom, /obj/effect/effect/chem_smoke)) + // If the chemicals are in a smoke cloud, do not try to let the chemicals "penetrate" into the mob's system (balance station 13) -- Doohl + + if(method == TOUCH) + + var/chance = 1 + var/block = 0 + + for(var/obj/item/clothing/C in M.get_equipped_items()) + if(C.permeability_coefficient < chance) chance = C.permeability_coefficient + if(istype(C, /obj/item/clothing/suit/bio_suit)) + // bio suits are just about completely fool-proof - Doohl + // kind of a hacky way of making bio suits more resistant to chemicals but w/e + if(prob(75)) + block = 1 + + if(istype(C, /obj/item/clothing/head/bio_hood)) + if(prob(75)) + block = 1 + + chance = chance * 100 + + if(prob(chance) && !block) + if(M.reagents) + M.reagents.add_reagent(self.id,self.volume/2) + return 1 + + reaction_obj(var/obj/O, var/volume) //By default we transfer a small part of the reagent to the object + src = null //if it can hold reagents. nope! + //if(O.reagents) + // O.reagents.add_reagent(id,volume/3) + return + + reaction_turf(var/turf/T, var/volume) + src = null + return + + on_mob_life(var/mob/living/M as mob) + if(!istype(M, /mob/living)) + return //Noticed runtime errors from pacid trying to damage ghosts, this should fix. --NEO + holder.remove_reagent(src.id, REAGENTS_METABOLISM) //By default it slowly disappears. + return + + on_move(var/mob/M) + return + + on_update(var/atom/A) + return + + metroid + name = "Metroid Jam" + id = "metroid" + description = "A green semi-liquid produced from one of the deadliest lifeforms in existence." + reagent_state = LIQUID + color = "#005020" // rgb: 0, 50, 20 + on_mob_life(var/mob/living/M as mob) + if(prob(10)) + M << "\red Your insides are burning!" + M.adjustToxLoss(rand(20,60)) + else if(prob(40)) + M.heal_organ_damage(5,0) + ..() + return + + + blood + data = new/list("donor"=null,"viruses"=null,"blood_DNA"=null,"blood_type"=null,"resistances"=null,"trace_chem"=null) + name = "Blood" + id = "blood" + reagent_state = LIQUID + color = "#C80000" // rgb: 200, 0, 0 + + reaction_mob(var/mob/M, var/method=TOUCH, var/volume) + var/datum/reagent/blood/self = src + src = null + for(var/datum/disease/D in self.data["viruses"]) + var/datum/disease/virus = new D.type + if(method == TOUCH) + M.contract_disease(virus) + + else //injected + M.contract_disease(virus, 1, 0) + + + /* + if(self.data["virus"]) + var/datum/disease/V = self.data["virus"] + if(M.resistances.Find(V.type)) return + if(method == TOUCH)//respect all protective clothing... + M.contract_disease(V) + else //injected + M.contract_disease(V, 1, 0) + return + */ + + + reaction_turf(var/turf/simulated/T, var/volume)//splash the blood all over the place + if(!istype(T)) return + var/datum/reagent/blood/self = src + src = null + //var/datum/disease/D = self.data["virus"] + if(!self.data["donor"] || istype(self.data["donor"], /mob/living/carbon/human)) + var/obj/effect/decal/cleanable/blood/blood_prop = locate() in T //find some blood here + if(!blood_prop) //first blood! + blood_prop = new(T) + blood_prop.blood_DNA[self.data["blood_DNA"]] = self.data["blood_type"] + + for(var/datum/disease/D in self.data["viruses"]) + var/datum/disease/newVirus = new D.type + blood_prop.viruses += newVirus + newVirus.holder = blood_prop + + + else if(istype(self.data["donor"], /mob/living/carbon/monkey)) + var/obj/effect/decal/cleanable/blood/blood_prop = locate() in T + if(!blood_prop) + blood_prop = new(T) + blood_prop.blood_DNA["Non-Human DNA"] = "A+" + for(var/datum/disease/D in self.data["viruses"]) + var/datum/disease/newVirus = new D.type + blood_prop.viruses += newVirus + newVirus.holder = blood_prop + + /* + if(T.density==0) + newVirus.spread_type = CONTACT_FEET + else + newVirus.spread_type = CONTACT_HANDS + */ + + else if(istype(self.data["donor"], /mob/living/carbon/alien)) + var/obj/effect/decal/cleanable/xenoblood/blood_prop = locate() in T + if(!blood_prop) + blood_prop = new(T) + blood_prop.blood_DNA["UNKNOWN DNA STRUCTURE"] = "X*" + for(var/datum/disease/D in self.data["viruses"]) + var/datum/disease/newVirus = new D.type + blood_prop.viruses += newVirus + newVirus.holder = blood_prop + /* + if(T.density==0) + newVirus.spread_type = CONTACT_FEET + else + newVirus.spread_type = CONTACT_HANDS + */ + return + +/* Must check the transfering of reagents and their data first. They all can point to one disease datum. + + Del() + if(src.data["virus"]) + var/datum/disease/D = src.data["virus"] + D.cure(0) + ..() +*/ + vaccine + //data must contain virus type + name = "Vaccine" + id = "vaccine" + reagent_state = LIQUID + color = "#C81040" // rgb: 200, 16, 64 + + reaction_mob(var/mob/M, var/method=TOUCH, var/volume) + var/datum/reagent/vaccine/self = src + src = null + if(self.data&&method == INGEST) + for(var/datum/disease/D in M.viruses) + if(D.type == self.data) + D.cure() + + M.resistances += self.data + return + + + water + name = "Water" + id = "water" + description = "A ubiquitous chemical substance that is composed of hydrogen and oxygen." + reagent_state = LIQUID + color = "#0064C8" // rgb: 0, 100, 200 + + reaction_turf(var/turf/simulated/T, var/volume) + if (!istype(T)) return + src = null + if(volume >= 3) + if(T.wet >= 1) return + T.wet = 1 + if(T.wet_overlay) + T.overlays -= T.wet_overlay + T.wet_overlay = null + T.wet_overlay = image('icons/effects/water.dmi',T,"wet_floor") + T.overlays += T.wet_overlay + + spawn(800) + if (!istype(T)) return + if(T.wet >= 2) return + T.wet = 0 + if(T.wet_overlay) + T.overlays -= T.wet_overlay + T.wet_overlay = null + + for(var/mob/living/carbon/metroid/M in T) + M.adjustToxLoss(rand(15,20)) + + var/hotspot = (locate(/obj/effect/hotspot) in T) + if(hotspot && !istype(T, /turf/space)) + 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) + del(hotspot) + return + reaction_obj(var/obj/O, var/volume) + src = null + var/turf/T = get_turf(O) + var/hotspot = (locate(/obj/effect/hotspot) in T) + if(hotspot && !istype(T, /turf/space)) + 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) + del(hotspot) + if(istype(O,/obj/item/weapon/reagent_containers/food/snacks/monkeycube)) + var/obj/item/weapon/reagent_containers/food/snacks/monkeycube/cube = O + if(!cube.wrapped) + cube.Expand() + return + + lube + name = "Space Lube" + id = "lube" + description = "Lubricant is a substance introduced between two moving surfaces to reduce the friction and wear between them. giggity." + reagent_state = LIQUID + color = "#009CA8" // rgb: 0, 156, 168 + + reaction_turf(var/turf/simulated/T, var/volume) + if (!istype(T)) return + src = null + if(T.wet >= 2) return + T.wet = 2 + spawn(800) + if (!istype(T)) return + T.wet = 0 + if(T.wet_overlay) + T.overlays -= T.wet_overlay + T.wet_overlay = null + return + + anti_toxin + name = "Anti-Toxin (Dylovene)" + id = "anti_toxin" + description = "Dylovene is a broad-spectrum antitoxin." + reagent_state = LIQUID + color = "#C8A5DC" // rgb: 200, 165, 220 + + on_mob_life(var/mob/living/M as mob) + if(!M) M = holder.my_atom + M.drowsyness = max(M.drowsyness-2, 0) + if(holder.has_reagent("toxin")) + holder.remove_reagent("toxin", 2) + if(holder.has_reagent("stoxin")) + holder.remove_reagent("stoxin", 2) + if(holder.has_reagent("plasma")) + holder.remove_reagent("plasma", 1) + if(holder.has_reagent("sacid")) + holder.remove_reagent("sacid", 1) + if(holder.has_reagent("cyanide")) + holder.remove_reagent("cyanide", 1) + if(holder.has_reagent("amatoxin")) + holder.remove_reagent("amatoxin", 2) + if(holder.has_reagent("chloralhydrate")) + holder.remove_reagent("chloralhydrate", 5) + if(holder.has_reagent("carpotoxin")) + holder.remove_reagent("carpotoxin", 1) + if(holder.has_reagent("zombiepowder")) + holder.remove_reagent("zombiepowder", 0.5) + M.adjustToxLoss(-2) + ..() + return + + toxin + name = "Toxin" + id = "toxin" + description = "A Toxic chemical." + reagent_state = LIQUID + color = "#CF3600" // rgb: 207, 54, 0 + + on_mob_life(var/mob/living/M as mob) + if(!M) M = holder.my_atom + M.adjustToxLoss(1.5) + ..() + return + + cyanide + name = "Cyanide" + id = "cyanide" + description = "A highly toxic chemical." + reagent_state = LIQUID + color = "#CF3600" // rgb: 207, 54, 0 + + on_mob_life(var/mob/living/M as mob) + if(!M) M = holder.my_atom + M.adjustToxLoss(3) + M.adjustOxyLoss(3) + M.sleeping += 1 + ..() + return + + minttoxin + name = "Mint Toxin" + id = "minttoxin" + description = "Useful for dealing with undesirable customers." + reagent_state = LIQUID + color = "#CF3600" // rgb: 207, 54, 0 + + on_mob_life(var/mob/living/M as mob) + if(!M) M = holder.my_atom + if (FAT in M.mutations) + M.gib() + ..() + return + + stoxin + name = "Sleep Toxin" + id = "stoxin" + description = "An effective hypnotic used to treat insomnia." + reagent_state = LIQUID + color = "#E895CC" // rgb: 232, 149, 204 + + on_mob_life(var/mob/living/M as mob) + if(!M) M = holder.my_atom + if(!data) data = 1 + switch(data) + if(1 to 15) + M.eye_blurry = max(M.eye_blurry, 10) + if(15 to 25) + M.drowsyness = max(M.drowsyness, 20) + if(25 to INFINITY) + M.Paralyse(20) + M.drowsyness = max(M.drowsyness, 30) + data++ + ..() + return + + srejuvenate + name = "Soporific Rejuvenant" + id = "stoxin2" + description = "Put people to sleep, and heals them." + reagent_state = LIQUID + color = "#C8A5DC" // rgb: 200, 165, 220 + + on_mob_life(var/mob/living/M as mob) + if(!M) M = holder.my_atom + if(!data) data = 1 + data++ + if(M.losebreath >= 10) + M.losebreath = max(10, M.losebreath-10) + holder.remove_reagent(src.id, 0.2) + switch(data) + if(1 to 15) + M.eye_blurry = max(M.eye_blurry, 10) + if(15 to 25) + M.drowsyness = max(M.drowsyness, 20) + if(25 to INFINITY) + M.sleeping += 1 + M.adjustOxyLoss(-M.getOxyLoss()) + M.SetWeakened(0) + M.SetStunned(0) + M.SetParalysis(0) + M.dizziness = 0 + M.drowsyness = 0 + M.stuttering = 0 + M.confused = 0 + M.jitteriness = 0 + ..() + return + + inaprovaline + name = "Inaprovaline" + id = "inaprovaline" + description = "Inaprovaline is a synaptic stimulant and cardiostimulant. Commonly used to stabilize patients." + reagent_state = LIQUID + color = "#C8A5DC" // rgb: 200, 165, 220 + + on_mob_life(var/mob/living/M as mob) + if(!M) M = holder.my_atom + if(M.losebreath >= 10) + M.losebreath = max(10, M.losebreath-5) + holder.remove_reagent(src.id, 0.2) + return + + space_drugs + name = "Space drugs" + id = "space_drugs" + description = "An illegal chemical compound used as drug." + reagent_state = LIQUID + color = "#60A584" // rgb: 96, 165, 132 + + on_mob_life(var/mob/living/M as mob) + if(!M) M = holder.my_atom + M.druggy = max(M.druggy, 15) + if(isturf(M.loc) && !istype(M.loc, /turf/space)) + if(M.canmove) + if(prob(10)) step(M, pick(cardinal)) + if(prob(7)) M.emote(pick("twitch","drool","moan","giggle")) + holder.remove_reagent(src.id, 0.2) + return + + 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 + + on_mob_life(var/mob/living/M as mob) + if(ishuman(M)) + if(prob(7)) M.emote(pick("twitch","drool","moan","gasp")) + holder.remove_reagent(src.id, 0.1) + return + +/* silicate + name = "Silicate" + id = "silicate" + description = "A compound that can be used to reinforce glass." + reagent_state = LIQUID + color = "#C7FFFF" // rgb: 199, 255, 255 + + reaction_obj(var/obj/O, var/volume) + src = null + 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 + + return*/ + + oxygen + name = "Oxygen" + id = "oxygen" + description = "A colorless, odorless gas." + reagent_state = GAS + color = "#808080" // rgb: 128, 128, 128 + + copper + name = "Copper" + id = "copper" + description = "A highly ductile metal." + color = "#6E3B08" // rgb: 110, 59, 8 + + nitrogen + name = "Nitrogen" + id = "nitrogen" + description = "A colorless, odorless, tasteless gas." + reagent_state = GAS + color = "#808080" // rgb: 128, 128, 128 + + hydrogen + name = "Hydrogen" + id = "hydrogen" + description = "A colorless, odorless, nonmetallic, tasteless, highly combustible diatomic gas." + reagent_state = GAS + color = "#808080" // rgb: 128, 128, 128 + + 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 + + mercury + name = "Mercury" + id = "mercury" + description = "A chemical element." + reagent_state = LIQUID + color = "#484848" // rgb: 72, 72, 72 + + on_mob_life(var/mob/living/M as mob) + if(!M) M = holder.my_atom + if(M.canmove && istype(M.loc, /turf/space)) + step(M, pick(cardinal)) + if(prob(5)) M.emote(pick("twitch","drool","moan")) + ..() + return + + sulfur + name = "Sulfur" + id = "sulfur" + description = "A chemical element." + reagent_state = SOLID + color = "#BF8C00" // rgb: 191, 140, 0 + + carbon + name = "Carbon" + id = "carbon" + description = "A chemical element." + reagent_state = SOLID + color = "#C77400" // rgb: 199, 116, 0 + + reaction_turf(var/turf/T, var/volume) + src = null + if(!istype(T, /turf/space)) + new /obj/effect/decal/cleanable/dirt(T) + + chlorine + name = "Chlorine" + id = "chlorine" + description = "A chemical element." + reagent_state = GAS + color = "#808080" // rgb: 128, 128, 128 + + on_mob_life(var/mob/living/M as mob) + if(!M) M = holder.my_atom + M.take_organ_damage(1, 0) + ..() + return + + fluorine + name = "Fluorine" + id = "fluorine" + description = "A highly-reactive chemical element." + reagent_state = GAS + color = "#808080" // rgb: 128, 128, 128 + + on_mob_life(var/mob/living/M as mob) + if(!M) M = holder.my_atom + M.adjustToxLoss(1) + ..() + return + + sodium + name = "Sodium" + id = "sodium" + description = "A chemical element." + reagent_state = SOLID + color = "#808080" // rgb: 128, 128, 128 + + phosphorus + name = "Phosphorus" + id = "phosphorus" + description = "A chemical element." + reagent_state = SOLID + color = "#832828" // rgb: 131, 40, 40 + + lithium + name = "Lithium" + id = "lithium" + description = "A chemical element." + reagent_state = SOLID + color = "#808080" // rgb: 128, 128, 128 + + on_mob_life(var/mob/living/M as mob) + if(!M) M = holder.my_atom + if(M.canmove && istype(M.loc, /turf/space)) + step(M, pick(cardinal)) + if(prob(5)) M.emote(pick("twitch","drool","moan")) + ..() + return + + 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 = "#808080" // rgb: 128, 128, 128 + + on_mob_life(var/mob/living/M as mob) + M.nutrition += 1 + ..() + return + + sacid + name = "Sulphuric acid" + id = "sacid" + description = "A strong mineral acid with the molecular formula H2SO4." + reagent_state = LIQUID + color = "#DB5008" // rgb: 219, 80, 8 + + on_mob_life(var/mob/living/M as mob) + if(!M) M = holder.my_atom + M.adjustToxLoss(1) + M.take_organ_damage(0, 1) + ..() + return + reaction_mob(var/mob/living/M, var/method=TOUCH, var/volume) + if(!istype(M, /mob/living)) + return + if(method == TOUCH) + if(istype(M, /mob/living/carbon/human)) + var/mob/living/carbon/human/H = M + if(H.wear_mask) + del (H.wear_mask) + H.update_inv_wear_mask() + H << "\red Your mask melts away but protects you from the acid!" + return + if(H.head) + del (H.head) + H.update_inv_head() + H << "\red Your helmet melts into uselessness but protects you from the acid!" + return + else if(istype(M, /mob/living/carbon/monkey)) + var/mob/living/carbon/monkey/MK = M + if(MK.wear_mask) + del (MK.wear_mask) + MK.update_inv_wear_mask() + MK << "\red Your mask melts away but protects you from the acid!" + return + if(!M.unacidable) + if(prob(15) && istype(M, /mob/living/carbon/human) && volume >= 30) + var/mob/living/carbon/human/H = M + var/datum/organ/external/affecting = H.get_organ("head") + if(affecting) + if(affecting.take_damage(25, 0)) + H.UpdateDamageIcon() + H.status_flags |= DISFIGURED + H.emote("scream") + else + M.take_organ_damage(min(15, volume * 2)) // uses min() and volume to make sure they aren't being sprayed in trace amounts (1 unit != insta rape) -- Doohl + else + if(!M.unacidable) + M.take_organ_damage(min(15, volume * 2)) + + reaction_obj(var/obj/O, var/volume) + if((istype(O,/obj/item) || istype(O,/obj/effect/glowshroom)) && prob(10)) + 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." + for(var/mob/M in viewers(5, O)) + M << "\red \the [O] melts." + del(O) + + pacid + name = "Polytrinic acid" + id = "pacid" + description = "Polytrinic acid is a an extremely corrosive chemical substance." + reagent_state = LIQUID + color = "#8E18A9" // rgb: 142, 24, 169 + + on_mob_life(var/mob/living/M as mob) + if(!M) M = holder.my_atom + M.adjustToxLoss(1) + ..() + return + + reaction_mob(var/mob/living/M, var/method=TOUCH, var/volume) + if(!istype(M, /mob/living)) + return //wooo more runtime fixin + if(method == TOUCH) + if(ishuman(M)) + var/mob/living/carbon/human/H = M + if(H.wear_mask) + del (H.wear_mask) + H << "\red Your mask melts away!" + return + if(H.head) + if(prob(15)) + del(H.head) + H.update_inv_head() + H << "\red Your helmet melts from the acid!" + else + H << "\red Your helmet protects you from the acid!" + return + + if(!H.unacidable) + var/datum/organ/external/affecting = H.get_organ("head") + if(affecting.take_damage(15, 0)) + H.UpdateDamageIcon() + H.emote("scream") + else + if(ismonkey(M)) + var/mob/living/carbon/monkey/MK = M + if(MK.wear_mask) + del (MK.wear_mask) + MK.update_inv_wear_mask() + MK << "\red Your mask melts away but protects you from the acid!" + return + if(!MK.unacidable) + MK.take_organ_damage(min(15, volume * 4)) // same deal as sulphuric acid + else + if(!M.unacidable) + if(ishuman(M)) + var/mob/living/carbon/human/H = M + var/datum/organ/external/affecting = H.get_organ("head") + if(affecting.take_damage(15, 0)) + H.UpdateDamageIcon() + H.emote("scream") + H.status_flags |= DISFIGURED + else + M.take_organ_damage(min(15, volume * 4)) + + reaction_obj(var/obj/O, var/volume) + if((istype(O,/obj/item) || istype(O,/obj/effect/glowshroom))) + 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." + for(var/mob/M in viewers(5, O)) + M << "\red \the [O] melts." + del(O) + + 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 + + nitroglycerin + name = "Nitroglycerin" + id = "nitroglycerin" + description = "Nitroglycerin is a heavy, colorless, oily, explosive liquid obtained by nitrating glycerol." + reagent_state = LIQUID + color = "#808080" // rgb: 128, 128, 128 + + radium + name = "Radium" + id = "radium" + description = "Radium is an alkaline earth metal. It is extremely radioactive." + reagent_state = SOLID + color = "#604838" // rgb: 96, 72, 56 + + on_mob_life(var/mob/living/M as mob) + if(!M) M = holder.my_atom + M.apply_effect(2,IRRADIATE,0) + ..() + return + + reaction_turf(var/turf/T, var/volume) + src = null + if(!istype(T, /turf/space)) + new /obj/effect/decal/cleanable/greenglow(T) + return + + + ryetalyn + name = "Ryetalyn" + id = "ryetalyn" + description = "Ryetalyn can cure all genetic abnomalities." + reagent_state = SOLID + color = "#C8A5DC" // rgb: 200, 165, 220 + + on_mob_life(var/mob/living/M as mob) + if(!M) M = holder.my_atom + M.mutations = list() + M.disabilities = 0 + M.sdisabilities = 0 + ..() + return + + 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 + + reaction_turf(var/turf/T, var/volume) + src = null + if(istype(T, /turf/simulated/wall)) + T:thermite = 1 + T.overlays = null + T.overlays = image('icons/effects/effects.dmi',icon_state = "thermite") + return + + mutagen + name = "Unstable mutagen" + id = "mutagen" + description = "Might cause unpredictable mutations. Keep away from children." + reagent_state = LIQUID + color = "#13BC5E" // rgb: 19, 188, 94 + + reaction_mob(var/mob/M, var/method=TOUCH, var/volume) + if(!..()) return + if(!M.dna) return //No robots, AIs, aliens, Ians or other mobs should be affected by this. + src = null + if((method==TOUCH && prob(33)) || method==INGEST) + randmuti(M) + if(prob(98)) + randmutb(M) + else + randmutg(M) + domutcheck(M, null) + updateappearance(M,M.dna.uni_identity) + return + on_mob_life(var/mob/living/M as mob) + if(!M.dna) return //No robots, AIs, aliens, Ians or other mobs should be affected by this. + if(!M) M = holder.my_atom + M.apply_effect(10,IRRADIATE,0) + ..() + return + + 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 + + on_mob_life(var/mob/living/M as mob) + if(!M) M = holder.my_atom + M.nutrition += nutriment_factor + ..() + return + + sterilizine + name = "Sterilizine" + id = "sterilizine" + description = "Sterilizes wounds in preparation for surgery." + reagent_state = LIQUID + color = "#C8A5DC" // rgb: 200, 165, 220 + /* reaction_mob(var/mob/living/M, var/method=TOUCH, var/volume) + src = null + if (method==TOUCH) + if(istype(M, /mob/living/carbon/human)) + if(M.health >= -100 && M.health <= 0) + M.crit_op_stage = 0.0 + if (method==INGEST) + usr << "Well, that was stupid." + M.adjustToxLoss(3) + return + on_mob_life(var/mob/living/M as mob) + if(!M) M = holder.my_atom + M.radiation += 3 + ..() + return + */ + iron + name = "Iron" + id = "iron" + description = "Pure iron is a metal." + reagent_state = SOLID + color = "#C8A5DC" // rgb: 200, 165, 220 +/* + on_mob_life(var/mob/living/M as mob) + if(!M) M = holder.my_atom + if((M.virus) && (prob(8) && (M.virus.name=="Magnitis"))) + if(M.virus.spread == "Airborne") + M.virus.spread = "Remissive" + M.virus.stage-- + if(M.virus.stage <= 0) + M.resistances += M.virus.type + M.virus = null + holder.remove_reagent(src.id, 0.2) + return +*/ + + 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 + + silver + name = "Silver" + id = "silver" + description = "A soft, white, lustrous transition metal, it has the highest electrical conductivity of any element and the highest thermal conductivity of any metal." + reagent_state = SOLID + color = "#D0D0D0" // rgb: 208, 208, 208 + + 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 + + on_mob_life(var/mob/living/M as mob) + if(!M) M = holder.my_atom + M.apply_effect(1,IRRADIATE,0) + ..() + return + + + reaction_turf(var/turf/T, var/volume) + src = null + if(!istype(T, /turf/space)) + new /obj/effect/decal/cleanable/greenglow(T) + + 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 + + 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 + + fuel + name = "Welding fuel" + id = "fuel" + description = "Required for welders. Flamable." + reagent_state = LIQUID + color = "#660000" // rgb: 102, 0, 0 + +//Commenting this out as it's horribly broken. It's a neat effect though, so it might be worth making a new reagent (that is less common) with similar effects. -Pete +/* + reaction_obj(var/obj/O, var/volume) + src = null + var/turf/the_turf = get_turf(O) + if(!the_turf) + return //No sense trying to start a fire if you don't have a turf to set on fire. --NEO + var/datum/gas_mixture/napalm = new + var/datum/gas/volatile_fuel/fuel = new + fuel.moles = 15 + napalm.trace_gases += fuel + the_turf.assume_air(napalm) + reaction_turf(var/turf/T, var/volume) + src = null + var/datum/gas_mixture/napalm = new + var/datum/gas/volatile_fuel/fuel = new + fuel.moles = 15 + napalm.trace_gases += fuel + T.assume_air(napalm) + return*/ + on_mob_life(var/mob/living/M as mob) + if(!M) M = holder.my_atom + M.adjustToxLoss(1) + ..() + return + + + space_cleaner + name = "Space cleaner" + id = "cleaner" + description = "A compound used to clean things. Now with 50% more sodium hypochlorite!" + reagent_state = LIQUID + color = "#A5F0EE" // rgb: 165, 240, 238 + + reaction_obj(var/obj/O, var/volume) + if(istype(O,/obj/effect/decal/cleanable)) + del(O) + else + if(O) + O.clean_blood() + reaction_turf(var/turf/T, var/volume) + T.overlays = null + T.clean_blood() + for(var/obj/effect/decal/cleanable/C in src) + del(C) + + for(var/mob/living/carbon/metroid/M in T) + M.adjustToxLoss(rand(5,10)) + + reaction_mob(var/mob/M, var/method=TOUCH, var/volume) + if(iscarbon(M)) + var/mob/living/carbon/C = M + if(C.r_hand) + C.r_hand.clean_blood() + if(C.l_hand) + C.l_hand.clean_blood() + if(C.wear_mask) + if(C.wear_mask.clean_blood()) + C.update_inv_wear_mask(0) + if(ishuman(M)) + var/mob/living/carbon/human/H = C + if(H.head) + if(H.head.clean_blood()) + H.update_inv_head(0) + if(H.wear_suit) + if(H.wear_suit.clean_blood()) + H.update_inv_wear_suit(0) + else if(H.w_uniform) + if(H.w_uniform.clean_blood()) + H.update_inv_w_uniform(0) + if(H.shoes) + if(H.shoes.clean_blood()) + H.update_inv_shoes(0) + M.clean_blood() + + plantbgone + name = "Plant-B-Gone" + id = "plantbgone" + description = "A harmful toxic mixture to kill plantlife. Do not ingest!" + reagent_state = LIQUID + color = "#49002E" // rgb: 73, 0, 46 + + on_mob_life(var/mob/living/carbon/M) + if(!M) M = holder.my_atom + M.adjustToxLoss(1.0) + ..() + return + + reaction_obj(var/obj/O, var/volume) + if(istype(O,/obj/effect/alien/weeds/)) + var/obj/effect/alien/weeds/alien_weeds = O + alien_weeds.health -= rand(15,35) // Kills alien weeds pretty fast + alien_weeds.healthcheck() + else if(istype(O,/obj/effect/glowshroom)) //even a small amount is enough to kill it + del(O) + else if(istype(O,/obj/effect/spacevine)) + if(prob(50)) del(O) //Kills kudzu too. + // Damage that is done to growing plants is separately + // at code/game/machinery/hydroponics at obj/item/hydroponics + + reaction_mob(var/mob/living/M, var/method=TOUCH, var/volume) + src = null + if(iscarbon(M)) + var/mob/living/carbon/C = M + if(!C.wear_mask) // If not wearing a mask + C.adjustToxLoss(2) // 4 toxic damage per application, doubled for some reason + if(ishuman(M)) + var/mob/living/carbon/human/H = M + if(H.dna) + if(H.dna.mutantrace == "plant") //plantmen take a LOT of damage + H.adjustToxLoss(10) + + plasma + name = "Plasma" + id = "plasma" + description = "Plasma in its liquid form." + reagent_state = LIQUID + color = "#E71B00" // rgb: 231, 27, 0 + + on_mob_life(var/mob/living/M as mob) + if(!M) M = holder.my_atom + if(holder.has_reagent("inaprovaline")) + holder.remove_reagent("inaprovaline", 2) + M.adjustToxLoss(1) + ..() + return + reaction_obj(var/obj/O, var/volume) + if((!O) || (!volume)) return 0 + src = null + var/turf/the_turf = get_turf(O) + var/datum/gas_mixture/napalm = new + var/datum/gas/volatile_fuel/fuel = new + fuel.moles = 5 + napalm.trace_gases += fuel + the_turf.assume_air(napalm) + reaction_turf(var/turf/T, var/volume) + src = null + var/datum/gas_mixture/napalm = new + var/datum/gas/volatile_fuel/fuel = new + fuel.moles = 5 + napalm.trace_gases += fuel + T.assume_air(napalm) + return + + leporazine + name = "Leporazine" + id = "leporazine" + description = "Leporazine can be use to stabilize an individuals body temperature." + reagent_state = LIQUID + color = "#C8A5DC" // rgb: 200, 165, 220 + + on_mob_life(var/mob/living/M as mob) + if(!M) M = holder.my_atom + if(M.bodytemperature > 310) + M.bodytemperature = max(310, M.bodytemperature - (20 * TEMPERATURE_DAMAGE_COEFFICIENT)) + else if(M.bodytemperature < 311) + M.bodytemperature = min(310, M.bodytemperature + (20 * TEMPERATURE_DAMAGE_COEFFICIENT)) + ..() + return + + cryptobiolin + name = "Cryptobiolin" + id = "cryptobiolin" + description = "Cryptobiolin causes confusion and dizzyness." + reagent_state = LIQUID + color = "#C8A5DC" // rgb: 200, 165, 220 + + on_mob_life(var/mob/living/M as mob) + if(!M) M = holder.my_atom + M.make_dizzy(1) + if(!M.confused) M.confused = 1 + M.confused = max(M.confused, 20) + holder.remove_reagent(src.id, 0.2) + ..() + return + + lexorin + name = "Lexorin" + id = "lexorin" + description = "Lexorin temporarily stops respiration. Causes tissue damage." + reagent_state = LIQUID + color = "#C8A5DC" // rgb: 200, 165, 220 + + on_mob_life(var/mob/living/M as mob) + if(M.stat == 2.0) + return + if(!M) M = holder.my_atom + if(prob(33)) + M.take_organ_damage(1, 0) + M.adjustOxyLoss(3) + if(prob(20)) M.emote("gasp") + ..() + return + + kelotane + name = "Kelotane" + id = "kelotane" + description = "Kelotane is a drug used to treat burns." + reagent_state = LIQUID + color = "#C8A5DC" // rgb: 200, 165, 220 + + on_mob_life(var/mob/living/M as mob) + if(M.stat == 2.0) + return + if(!M) M = holder.my_atom + M.heal_organ_damage(0,2) + ..() + return + + dermaline + name = "Dermaline" + id = "dermaline" + description = "Dermaline is the next step in burn medication. Works twice as good as kelotane and enables the body to restore even the direst heat-damaged tissue." + reagent_state = LIQUID + color = "#C8A5DC" // rgb: 200, 165, 220 + + on_mob_life(var/mob/living/M as mob) + if(M.stat == 2.0) //THE GUY IS **DEAD**! BEREFT OF ALL LIFE HE RESTS IN PEACE etc etc. He does NOT metabolise shit anymore, god DAMN + return + if(!M) M = holder.my_atom + M.heal_organ_damage(0,3) + ..() + return + + dexalin + name = "Dexalin" + id = "dexalin" + description = "Dexalin is used in the treatment of oxygen deprivation." + reagent_state = LIQUID + color = "#C8A5DC" // rgb: 200, 165, 220 + + on_mob_life(var/mob/living/M as mob) + if(M.stat == 2.0) + return //See above, down and around. --Agouri + if(!M) M = holder.my_atom + M.adjustOxyLoss(-2) + if(holder.has_reagent("lexorin")) + holder.remove_reagent("lexorin", 2) + ..() + return + + dexalinp + name = "Dexalin Plus" + id = "dexalinp" + description = "Dexalin Plus is used in the treatment of oxygen deprivation. Its highly effective." + reagent_state = LIQUID + color = "#C8A5DC" // rgb: 200, 165, 220 + + on_mob_life(var/mob/living/M as mob) + if(M.stat == 2.0) + return + if(!M) M = holder.my_atom + M.adjustOxyLoss(-M.getOxyLoss()) + if(holder.has_reagent("lexorin")) + holder.remove_reagent("lexorin", 2) + ..() + return + + tricordrazine + name = "Tricordrazine" + id = "tricordrazine" + description = "Tricordrazine is a highly potent stimulant, originally derived from cordrazine. Can be used to treat a wide range of injuries." + reagent_state = LIQUID + color = "#C8A5DC" // rgb: 200, 165, 220 + + on_mob_life(var/mob/living/M as mob) + if(M.stat == 2.0) + return + if(!M) M = holder.my_atom + if(M.getOxyLoss() && prob(40)) M.adjustOxyLoss(-1) + if(M.getBruteLoss() && prob(40)) M.heal_organ_damage(1,0) + if(M.getFireLoss() && prob(40)) M.heal_organ_damage(0,1) + if(M.getToxLoss() && prob(40)) M.adjustToxLoss(-1) + ..() + return + + adminordrazine //An OP chemical for admins + name = "Adminordrazine" + id = "adminordrazine" + description = "It's magic. We don't have to explain it." + reagent_state = LIQUID + color = "#C8A5DC" // rgb: 200, 165, 220 + + on_mob_life(var/mob/living/carbon/M as mob) + if(!M) M = holder.my_atom ///This can even heal dead people. + M.setCloneLoss(0) + M.setOxyLoss(0) + M.radiation = 0 + M.heal_organ_damage(5,5) + M.adjustToxLoss(-5) + if(holder.has_reagent("toxin")) + holder.remove_reagent("toxin", 5) + if(holder.has_reagent("stoxin")) + holder.remove_reagent("stoxin", 5) + if(holder.has_reagent("plasma")) + holder.remove_reagent("plasma", 5) + if(holder.has_reagent("sacid")) + holder.remove_reagent("sacid", 5) + if(holder.has_reagent("pacid")) + holder.remove_reagent("pacid", 5) + if(holder.has_reagent("cyanide")) + holder.remove_reagent("cyanide", 5) + if(holder.has_reagent("lexorin")) + holder.remove_reagent("lexorin", 5) + if(holder.has_reagent("amatoxin")) + holder.remove_reagent("amatoxin", 5) + if(holder.has_reagent("chloralhydrate")) + holder.remove_reagent("chloralhydrate", 5) + if(holder.has_reagent("carpotoxin")) + holder.remove_reagent("carpotoxin", 5) + if(holder.has_reagent("zombiepowder")) + holder.remove_reagent("zombiepowder", 5) + M.setBrainLoss(0) + M.disabilities = 0 + M.sdisabilities = 0 + M.eye_blurry = 0 + M.eye_blind = 0 +// M.disabilities &= ~NEARSIGHTED //doesn't even do anythig cos of the disabilities = 0 bit +// M.sdisabilities &= ~BLIND //doesn't even do anythig cos of the sdisabilities = 0 bit + M.SetWeakened(0) + M.SetStunned(0) + M.SetParalysis(0) + M.silent = 0 + M.dizziness = 0 + M.drowsyness = 0 + M.stuttering = 0 + M.confused = 0 + M.sleeping = 0 + M.jitteriness = 0 + for(var/datum/disease/D in M.viruses) + D.spread = "Remissive" + D.stage-- + if(D.stage < 1) + D.cure() + ..() + return + + synaptizine + name = "Synaptizine" + id = "synaptizine" + description = "Synaptizine is used to treat various diseases." + reagent_state = LIQUID + color = "#C8A5DC" // rgb: 200, 165, 220 + + on_mob_life(var/mob/living/M as mob) + if(!M) M = holder.my_atom + M.drowsyness = max(M.drowsyness-5, 0) + M.AdjustParalysis(-1) + M.AdjustStunned(-1) + M.AdjustWeakened(-1) + if(prob(60)) M.adjustToxLoss(1) + ..() + return + + + impedrezene + name = "Impedrezene" + id = "impedrezene" + description = "Impedrezene is a narcotic that impedes one's ability by slowing down the higher brain cell functions." + reagent_state = LIQUID + color = "#C8A5DC" // rgb: 200, 165, 220 + + on_mob_life(var/mob/living/M as mob) + if(!M) M = holder.my_atom + M.jitteriness = max(M.jitteriness-5,0) + if(prob(80)) M.adjustBrainLoss(1) + if(prob(50)) M.drowsyness = max(M.drowsyness, 3) + if(prob(10)) M.emote("drool") + ..() + return + + hyronalin + name = "Hyronalin" + id = "hyronalin" + description = "Hyronalin is a medicinal drug used to counter the effect of radiation poisoning." + reagent_state = LIQUID + color = "#C8A5DC" // rgb: 200, 165, 220 + + on_mob_life(var/mob/living/M as mob) + if(!M) M = holder.my_atom + M.radiation = max(M.radiation-3,0) + ..() + return + + arithrazine + name = "Arithrazine" + id = "arithrazine" + description = "Arithrazine is an unstable medication used for the most extreme cases of radiation poisoning." + reagent_state = LIQUID + color = "#C8A5DC" // rgb: 200, 165, 220 + + on_mob_life(var/mob/living/M as mob) + if(M.stat == 2.0) + return //See above, down and around. --Agouri + if(!M) M = holder.my_atom + M.radiation = max(M.radiation-7,0) + M.adjustToxLoss(-1) + if(prob(15)) + M.take_organ_damage(1, 0) + ..() + return + + alkysine + name = "Alkysine" + id = "alkysine" + description = "Alkysine is a drug used to lessen the damage to neurological tissue after a catastrophic injury. Can heal brain tissue." + reagent_state = LIQUID + color = "#C8A5DC" // rgb: 200, 165, 220 + + on_mob_life(var/mob/living/M as mob) + if(!M) M = holder.my_atom + M.adjustBrainLoss(-3) + ..() + return + + imidazoline + name = "Imidazoline" + id = "imidazoline" + description = "Heals eye damage" + reagent_state = LIQUID + color = "#C8A5DC" // rgb: 200, 165, 220 + + on_mob_life(var/mob/living/M as mob) + if(!M) M = holder.my_atom + M.eye_blurry = max(M.eye_blurry-5 , 0) + M.eye_blind = max(M.eye_blind-5 , 0) + M.disabilities &= ~NEARSIGHTED + M.eye_stat = max(M.eye_stat-5, 0) +// M.sdisabilities &= ~1 Replaced by eye surgery + ..() + return + + bicaridine + name = "Bicaridine" + id = "bicaridine" + description = "Bicaridine is an analgesic medication and can be used to treat blunt trauma." + reagent_state = LIQUID + color = "#C8A5DC" // rgb: 200, 165, 220 + + on_mob_life(var/mob/living/M as mob) + if(M.stat == 2.0) + return + if(!M) M = holder.my_atom + M.heal_organ_damage(2,0) + ..() + return + + hyperzine + name = "Hyperzine" + id = "hyperzine" + description = "Hyperzine is a highly effective, long lasting, muscle stimulant." + reagent_state = LIQUID + color = "#C8A5DC" // rgb: 200, 165, 220 + + on_mob_life(var/mob/living/M as mob) + if(!M) M = holder.my_atom + if(prob(5)) M.emote(pick("twitch","blink_r","shiver")) + holder.remove_reagent(src.id, 0.2) + ..() + return + + cryoxadone + name = "Cryoxadone" + id = "cryoxadone" + description = "A chemical mixture with almost magical healing powers. Its main limitation is that the targets body temperature must be under 170K for it to metabolise correctly." + reagent_state = LIQUID + color = "#C8A5DC" // rgb: 200, 165, 220 + + on_mob_life(var/mob/living/M as mob) + if(!M) M = holder.my_atom + if(M.bodytemperature < 170) + M.adjustCloneLoss(-1) + M.adjustOxyLoss(-3) + M.heal_organ_damage(3,3) + M.adjustToxLoss(-3) + ..() + return + + clonexadone + name = "Clonexadone" + id = "clonexadone" + description = "A liquid compound similar to that used in the cloning process. Can be used to 'finish' clones that get ejected early when used in conjunction with a cryo tube." + reagent_state = LIQUID + color = "#C8A5DC" // rgb: 200, 165, 220 + + on_mob_life(var/mob/living/M as mob) + if(!M) M = holder.my_atom + if(M.bodytemperature < 170) + M.adjustCloneLoss(-3) + M.adjustOxyLoss(-3) + M.heal_organ_damage(3,3) + M.adjustToxLoss(-3) + ..() + return + + spaceacillin + name = "Spaceacillin" + id = "spaceacillin" + description = "An all-purpose antiviral agent." + reagent_state = LIQUID + color = "#C8A5DC" // rgb: 200, 165, 220 + + on_mob_life(var/mob/living/M as mob)//no more mr. panacea + holder.remove_reagent(src.id, 0.2) + ..() + return + + carpotoxin + name = "Carpotoxin" + id = "carpotoxin" + description = "A deadly neurotoxin produced by the dreaded spess carp." + reagent_state = LIQUID + color = "#003333" // rgb: 0, 51, 51 + + on_mob_life(var/mob/living/M as mob) + if(!M) M = holder.my_atom + M.adjustToxLoss(2) + ..() + return + + zombiepowder + name = "Zombie Powder" + id = "zombiepowder" + description = "A strong neurotoxin that puts the subject into a death-like state." + color = "#669900" // rgb: 102, 153, 0 + + on_mob_life(var/mob/living/carbon/M as mob) + if(!M) M = holder.my_atom + M.status_flags |= FAKEDEATH + M.adjustOxyLoss(0.5) + M.adjustToxLoss(0.5) + M.Weaken(10) + M.silent = max(M.silent, 10) + M.tod = worldtime2text() + ..() + return + + Del() + if(holder && ismob(holder.my_atom)) + var/mob/M = holder.my_atom + M.status_flags &= ~FAKEDEATH + ..() + + LSD + name = "LSD" + id = "LSD" + description = "A hallucinogen" + reagent_state = LIQUID + color = "#B31008" // rgb: 139, 166, 233 + + on_mob_life(var/mob/living/M) + if(!M) M = holder.my_atom + M.hallucination += 10 + ..() + return + + +/////////////////////////////////////////////////////////////////////////////////////////////////////////////// + + nanites + name = "Nanomachines" + id = "nanites" + description = "Microscopic construction robots." + reagent_state = LIQUID + color = "#535E66" // rgb: 83, 94, 102 + + reaction_mob(var/mob/M, var/method=TOUCH, var/volume) + src = null + if( (prob(10) && method==TOUCH) || method==INGEST) + M.contract_disease(new /datum/disease/robotic_transformation(0),1) + + xenomicrobes + name = "Xenomicrobes" + id = "xenomicrobes" + description = "Microbes with an entirely alien cellular structure." + reagent_state = LIQUID + color = "#535E66" // rgb: 83, 94, 102 + + reaction_mob(var/mob/M, var/method=TOUCH, var/volume) + src = null + if( (prob(10) && method==TOUCH) || method==INGEST) + M.contract_disease(new /datum/disease/xeno_transformation(0),1) + +//foam precursor + + 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 + + foaming_agent + name = "Foaming agent" + id = "foaming_agent" + description = "A agent that yields metallic foam when mixed with light metal and a strong acid." + reagent_state = SOLID + color = "#664B63" // rgb: 102, 75, 99 + + nicotine + name = "Nicotine" + id = "nicotine" + description = "A highly addictive stimulant extracted from the tobacco plant." + reagent_state = LIQUID + color = "#181818" // rgb: 24, 24, 24 + + ethanol + name = "Ethanol" + id = "ethanol" + description = "A well-known alcohol with a variety of applications." + reagent_state = LIQUID + color = "#404030" // rgb: 64, 64, 48 + + on_mob_life(var/mob/living/M as mob) + if(!data) data = 1 + data++ + M.make_dizzy(5) + M.jitteriness = max(M.jitteriness-5,0) + if(data >= 25) + if (!M.stuttering) M.stuttering = 1 + M.stuttering += 4 + if(data >= 40 && prob(33)) + if (!M.confused) M.confused = 1 + M.confused += 3 + ..() + return + reaction_obj(var/obj/O, var/volume) + if(istype(O,/obj/item/weapon/paper)) + var/obj/item/weapon/paper/paperaffected = O + paperaffected.clearpaper() + 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 + usr << "The solution melts away the ink on the book." + else + usr << "It wasn't enough..." + return + + 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 + + ultraglue + name = "Ulta Glue" + id = "glue" + description = "An extremely powerful bonding agent." + color = "#FFFFCC" // rgb: 255, 255, 204 + + diethylamine + name = "Diethylamine" + id = "diethylamine" + description = "A secondary amine, mildly corrosive." + reagent_state = LIQUID + color = "#604030" // rgb: 96, 64, 48 + + ethylredoxrazine // FUCK YOU, ALCOHOL + name = "Ethylredoxrazine" + id = "ethylredoxrazine" + description = "A powerfuld oxidizer that reacts with ethanol." + reagent_state = SOLID + color = "#605048" // rgb: 96, 80, 72 + + on_mob_life(var/mob/living/M as mob) + if(!M) M = holder.my_atom + M.dizziness = 0 + M.drowsyness = 0 + M.stuttering = 0 + M.confused = 0 + ..() + return + + chloralhydrate //Otherwise known as a "Mickey Finn" + name = "Chloral Hydrate" + id = "chloralhydrate" + description = "A powerful sedative." + reagent_state = SOLID + color = "#000067" // rgb: 0, 0, 103 + + on_mob_life(var/mob/living/M as mob) + if(!M) M = holder.my_atom + if(!data) data = 1 + data++ + switch(data) + if(1) + M.confused += 2 + M.drowsyness += 2 + if(2 to 50) + M.sleeping += 1 + if(51 to INFINITY) + M.sleeping += 1 + M.adjustToxLoss(data - 50) + ..() + return + + beer2 //copypasta of chloral hydrate, 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." + reagent_state = LIQUID + color = "#664300" // rgb: 102, 67, 0 + + on_mob_life(var/mob/living/M as mob) + if(!M) M = holder.my_atom + if(!data) data = 1 + switch(data) + if(1) + M.confused += 2 + M.drowsyness += 2 + if(2 to 50) + M.sleeping += 1 + if(51 to INFINITY) + M.sleeping += 1 + M.adjustToxLoss(data - 50) + data++ + ..() + return + + +/////////////////////////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. + nutriment + name = "Nutriment" + id = "nutriment" + description = "All the vitamins, minerals, and carbohydrates the body needs in pure form." + reagent_state = SOLID + nutriment_factor = 15 * REAGENTS_METABOLISM + color = "#664330" // rgb: 102, 67, 48 + + on_mob_life(var/mob/living/M as mob) + if(!M) M = holder.my_atom + if(prob(50)) M.heal_organ_damage(1,0) + M.nutrition += nutriment_factor // For hunger and fatness +/* + // If overeaten - vomit and fall down + // Makes you feel bad but removes reagents and some effect + // from your body + if (M.nutrition > 650) + M.nutrition = rand (250, 400) + M.weakened += rand(2, 10) + M.jitteriness += rand(0, 5) + M.dizziness = max (0, (M.dizziness - rand(0, 15))) + M.druggy = max (0, (M.druggy - rand(0, 15))) + M.adjustToxLoss(rand(-15, -5))) + M.updatehealth() +*/ + ..() + return + + lipozine + name = "Lipozine" // The anti-nutriment. + id = "lipozine" + description = "A chemical compound that causes a powerful fat-burning reaction." + reagent_state = LIQUID + nutriment_factor = 10 * REAGENTS_METABOLISM + color = "#BBEDA4" // rgb: 187, 237, 164 + + on_mob_life(var/mob/living/M as mob) + if(!M) M = holder.my_atom + M.nutrition -= nutriment_factor + M.overeatduration = 0 + if(M.nutrition < 0)//Prevent from going into negatives. + M.nutrition = 0 + ..() + return + + 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 + + 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 + + + capsaicin + name = "Capsaicin Oil" + id = "capsaicin" + description = "This is what makes chilis hot." + reagent_state = LIQUID + color = "#B31008" // rgb: 179, 16, 8 + + on_mob_life(var/mob/living/M as mob) + if(!M) M = holder.my_atom + if(!data) data = 1 + switch(data) + if(1 to 15) + M.bodytemperature += 5 * TEMPERATURE_DAMAGE_COEFFICIENT + if(holder.has_reagent("frostoil")) + holder.remove_reagent("frostoil", 5) + if(istype(M, /mob/living/carbon/metroid)) + M.bodytemperature += rand(5,20) + if(15 to 25) + M.bodytemperature += 10 * TEMPERATURE_DAMAGE_COEFFICIENT + if(istype(M, /mob/living/carbon/metroid)) + M.bodytemperature += rand(10,20) + if(25 to INFINITY) + M.bodytemperature += 15 * TEMPERATURE_DAMAGE_COEFFICIENT + if(istype(M, /mob/living/carbon/metroid)) + M.bodytemperature += rand(15,20) + data++ + ..() + return + + condensedcapsaicin + name = "Condensed Capsaicin" + id = "condensedcapsaicin" + description = "This shit goes in pepperspray." + reagent_state = LIQUID + color = "#B31008" // rgb: 179, 16, 8 + + reaction_mob(var/mob/living/M, var/method=TOUCH, var/volume) + if(!istype(M, /mob/living)) + return + if(method == TOUCH) + if(istype(M, /mob/living/carbon/human)) + 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 ) + victim << "\red Your [safe_thing] protects you from the pepperspray!" + return + else if ( mouth_covered ) // Reduced effects if partially protected + victim << "\red Your [safe_thing] protect you from most of the pepperspray!" + victim.eye_blurry = max(M.eye_blurry, 3) + victim.eye_blind = max(M.eye_blind, 1) + victim.Paralyse(1) + victim.drop_item() + return + else if ( eyes_covered ) // Eye cover is better than mouth cover + victim << "\red Your [safe_thing] protects your eyes from the pepperspray!" + victim.emote("scream") + victim.eye_blurry = max(M.eye_blurry, 1) + return + else // Oh dear :D + victim.emote("scream") + victim << "\red You're sprayed directly in the eyes with pepperspray!" + victim.eye_blurry = max(M.eye_blurry, 5) + victim.eye_blind = max(M.eye_blind, 2) + victim.Paralyse(1) + victim.drop_item() + + frostoil + name = "Frost Oil" + id = "frostoil" + description = "A special oil that noticably chills the body. Extraced from Icepeppers." + reagent_state = LIQUID + color = "#B31008" // rgb: 139, 166, 233 + + on_mob_life(var/mob/living/M as mob) + if(!M) M = holder.my_atom + if(!data) data = 1 + switch(data) + if(1 to 15) + M.bodytemperature -= 5 * TEMPERATURE_DAMAGE_COEFFICIENT + if(holder.has_reagent("capsaicin")) + holder.remove_reagent("capsaicin", 5) + if(istype(M, /mob/living/carbon/metroid)) + M.bodytemperature -= rand(5,20) + if(15 to 25) + M.bodytemperature -= 10 * TEMPERATURE_DAMAGE_COEFFICIENT + if(istype(M, /mob/living/carbon/metroid)) + M.bodytemperature -= rand(10,20) + if(25 to INFINITY) + M.bodytemperature -= 15 * TEMPERATURE_DAMAGE_COEFFICIENT + if(prob(1)) M.emote("shiver") + if(istype(M, /mob/living/carbon/metroid)) + M.bodytemperature -= rand(15,20) + data++ + ..() + return + + reaction_turf(var/turf/simulated/T, var/volume) + for(var/mob/living/carbon/metroid/M in T) + M.adjustToxLoss(rand(15,30)) + + sodiumchloride + name = "Table Salt" + id = "sodiumchloride" + description = "A salt made of sodium chloride. Commonly used to season food." + reagent_state = SOLID + color = "#282828" // rgb: 40, 40, 40 + + blackpepper + name = "Black Pepper" + id = "blackpepper" + description = "A powder ground from peppercorns. *AAAACHOOO*" + reagent_state = SOLID + // no color (ie, black) + + coco + name = "Coco Powder" + id = "coco" + description = "A fatty, bitter paste made from coco beans." + reagent_state = SOLID + nutriment_factor = 5 * REAGENTS_METABOLISM + color = "#302000" // rgb: 48, 32, 0 + + on_mob_life(var/mob/living/M as mob) + M.nutrition += nutriment_factor + ..() + return + + hot_coco + name = "Hot Chocolate" + id = "hot_coco" + description = "Made with love! And coco beans." + reagent_state = LIQUID + nutriment_factor = 2 * REAGENTS_METABOLISM + color = "#403010" // rgb: 64, 48, 16 + + on_mob_life(var/mob/living/M as mob) + 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 + ..() + return + + amatoxin + name = "Amatoxin" + id = "amatoxin" + description = "A powerful poison derived from certain species of mushroom." + color = "#792300" // rgb: 121, 35, 0 + + on_mob_life(var/mob/living/M as mob) + if(!M) M = holder.my_atom + M.adjustToxLoss(1) + ..() + return + + psilocybin + name = "Psilocybin" + id = "psilocybin" + description = "A strong psycotropic derived from certain species of mushroom." + color = "#E700E7" // rgb: 231, 0, 231 + + on_mob_life(var/mob/living/M as mob) + if(!M) M = holder.my_atom + M.druggy = max(M.druggy, 30) + if(!data) data = 1 + switch(data) + if(1 to 5) + if (!M.stuttering) M.stuttering = 1 + M.make_dizzy(5) + if(prob(10)) M.emote(pick("twitch","giggle")) + if(5 to 10) + if (!M.stuttering) M.stuttering = 1 + M.make_jittery(10) + M.make_dizzy(10) + M.druggy = max(M.druggy, 35) + if(prob(20)) M.emote(pick("twitch","giggle")) + if (10 to INFINITY) + if (!M.stuttering) M.stuttering = 1 + M.make_jittery(20) + M.make_dizzy(20) + M.druggy = max(M.druggy, 40) + if(prob(30)) M.emote(pick("twitch","giggle")) + holder.remove_reagent(src.id, 0.2) + data++ + ..() + return + + 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 = "#302000" // rgb: 48, 32, 0 + + on_mob_life(var/mob/living/M as mob) + M.nutrition += nutriment_factor + if(istype(M, /mob/living/carbon/human) && M.job in list("Security Officer", "Head of Security", "Detective", "Warden")) + if(!M) M = holder.my_atom + M.heal_organ_damage(1,1) + M.nutrition += nutriment_factor + ..() + return + ..() + + syndicream + name = "Cream filling" + id = "syndicream" + description = "Delicious cream filling of a mysterious origin. Tastes criminally good." + nutriment_factor = 1 * REAGENTS_METABOLISM + color = "#AB7878" // rgb: 171, 120, 120 + + on_mob_life(var/mob/living/M as mob) + M.nutrition += nutriment_factor + if(istype(M, /mob/living/carbon/human) && M.mind) + if(M.mind.special_role) + if(!M) M = holder.my_atom + M.heal_organ_damage(1,1) + M.nutrition += nutriment_factor + ..() + return + ..() + + 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 + + on_mob_life(var/mob/living/M as mob) + M.nutrition += nutriment_factor + ..() + return + reaction_turf(var/turf/simulated/T, var/volume) + if (!istype(T)) return + src = null + if(volume >= 3) + if(T.wet >= 1) return + T.wet = 1 + if(T.wet_overlay) + T.overlays -= T.wet_overlay + T.wet_overlay = null + T.wet_overlay = image('icons/effects/water.dmi',T,"wet_floor") + T.overlays += T.wet_overlay + + spawn(800) + if (!istype(T)) return + if(T.wet >= 2) return + T.wet = 0 + if(T.wet_overlay) + T.overlays -= T.wet_overlay + T.wet_overlay = null + 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) + del(hotspot) + + enzyme + name = "Universal Enzyme" + id = "enzyme" + description = "A universal enzyme used in the preperation of certain chemicals and foods." + reagent_state = LIQUID + color = "#365E30" // rgb: 54, 94, 48 + + 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 + + on_mob_life(var/mob/living/M as mob) + M.nutrition += nutriment_factor + ..() + return + + 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 + + on_mob_life(var/mob/living/M as mob) + 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)) + ..() + return + + 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 + + on_mob_life(var/mob/living/M as mob) + M.nutrition += nutriment_factor + M.bodytemperature += 10 * TEMPERATURE_DAMAGE_COEFFICIENT + ..() + return + + +///////////////////////////////////////////////////////////////////////////////////////////////////////// +/////////////////////// DRINKS BELOW, Beer is up there though, along with cola. Cap'n Pete's Cuban Spiced Rum//////////////////////////////// +///////////////////////////////////////////////////////////////////////////////////////////////////////// + + orangejuice + name = "Orange juice" + id = "orangejuice" + description = "Both delicious AND rich in Vitamin C, what more do you need?" + reagent_state = LIQUID + nutriment_factor = 1 * REAGENTS_METABOLISM + color = "#E78108" // rgb: 231, 129, 8 + + on_mob_life(var/mob/living/M as mob) + M.nutrition += nutriment_factor + if(!M) M = holder.my_atom + if(M.getOxyLoss() && prob(30)) M.adjustOxyLoss(-1) + M.nutrition++ + ..() + return + + tomatojuice + name = "Tomato Juice" + id = "tomatojuice" + description = "Tomatoes made into juice. What a waste of big, juicy tomatoes, huh?" + reagent_state = LIQUID + nutriment_factor = 1 * REAGENTS_METABOLISM + color = "#731008" // rgb: 115, 16, 8 + + on_mob_life(var/mob/living/M as mob) + M.nutrition += nutriment_factor + if(!M) M = holder.my_atom + if(M.getFireLoss() && prob(20)) M.heal_organ_damage(0,1) + M.nutrition++ + ..() + return + + limejuice + name = "Lime Juice" + id = "limejuice" + description = "The sweet-sour juice of limes." + reagent_state = LIQUID + nutriment_factor = 1 * REAGENTS_METABOLISM + color = "#365E30" // rgb: 54, 94, 48 + + on_mob_life(var/mob/living/M as mob) + M.nutrition += nutriment_factor + if(!M) M = holder.my_atom + if(M.getToxLoss() && prob(20)) M.adjustToxLoss(-1) + M.nutrition++ + ..() + return + + carrotjuice + name = "Carrot juice" + id = "carrotjuice" + description = "It is just like a carrot but without crunching." + reagent_state = LIQUID + nutriment_factor = 1 * REAGENTS_METABOLISM + color = "#973800" // rgb: 151, 56, 0 + + on_mob_life(var/mob/living/M as mob) + if(!M) M = holder.my_atom + M.nutrition += nutriment_factor + M.eye_blurry = max(M.eye_blurry-1 , 0) + M.eye_blind = max(M.eye_blind-1 , 0) + if(!data) data = 1 + switch(data) + if(1 to 20) + //nothing + if(21 to INFINITY) + if (prob(data-10)) + M.disabilities &= ~NEARSIGHTED + data++ + ..() + return + + berryjuice + name = "Berry Juice" + id = "berryjuice" + description = "A delicious blend of several different kinds of berries." + reagent_state = LIQUID + nutriment_factor = 1 * REAGENTS_METABOLISM + color = "#863333" // rgb: 134, 51, 51 + + on_mob_life(var/mob/living/M as mob) + if(!M) M = holder.my_atom + M.nutrition += nutriment_factor + ..() + return + + poisonberryjuice + name = "Poison Berry Juice" + id = "poisonberryjuice" + description = "A tasty juice blended from various kinds of very deadly and toxic berries." + reagent_state = LIQUID + nutriment_factor = 1 * REAGENTS_METABOLISM + color = "#863353" // rgb: 134, 51, 83 + + on_mob_life(var/mob/living/M as mob) + if(!M) M = holder.my_atom + M.nutrition += nutriment_factor + M.adjustToxLoss(1) + ..() + return + + watermelonjuice + name = "Watermelon Juice" + id = "watermelonjuice" + description = "Delicious juice made from watermelon." + reagent_state = LIQUID + nutriment_factor = 1 * REAGENTS_METABOLISM + color = "#863333" // rgb: 134, 51, 51 + + on_mob_life(var/mob/living/M as mob) + if(!M) M = holder.my_atom + M.nutrition += nutriment_factor + ..() + return + + lemonjuice + name = "Lemon Juice" + id = "lemonjuice" + description = "This juice is VERY sour." + reagent_state = LIQUID + nutriment_factor = 1 * REAGENTS_METABOLISM + color = "#863333" // rgb: 175, 175, 0 + + on_mob_life(var/mob/living/M as mob) + if(!M) M = holder.my_atom + M.nutrition += nutriment_factor + ..() + return + + banana + name = "Banana Juice" + id = "banana" + description = "The raw essence of a banana. HONK" + nutriment_factor = 1 * REAGENTS_METABOLISM + color = "#863333" // rgb: 175, 175, 0 + + on_mob_life(var/mob/living/M as mob) + M.nutrition += nutriment_factor + if(istype(M, /mob/living/carbon/human) && M.job in list("Clown")) + if(!M) M = holder.my_atom + M.heal_organ_damage(1,1) + ..() + return + if(istype(M, /mob/living/carbon/monkey)) + if(!M) M = holder.my_atom + M.heal_organ_damage(1,1) + ..() + return + ..() + + nothing + name = "Nothing" + id = "nothing" + description = "Absolutely nothing." + nutriment_factor = 1 * REAGENTS_METABOLISM + on_mob_life(var/mob/living/M as mob) + M.nutrition += nutriment_factor + if(istype(M, /mob/living/carbon/human) && M.job in list("Mime")) + if(!M) M = holder.my_atom + M.heal_organ_damage(1,1) + ..() + return + ..() + + potato_juice + name = "Potato Juice" + id = "potato" + description = "Juice of the potato. Bleh." + reagent_state = LIQUID + nutriment_factor = 2 * REAGENTS_METABOLISM + color = "#302000" // rgb: 48, 32, 0 + + on_mob_life(var/mob/living/M as mob) + M.nutrition += nutriment_factor + ..() + return + + milk + name = "Milk" + id = "milk" + description = "An opaque white liquid produced by the mammary glands of mammals." + reagent_state = LIQUID + color = "#DFDFDF" // rgb: 223, 223, 223 + + on_mob_life(var/mob/living/M as mob) + if(!M) M = holder.my_atom + if(M.getBruteLoss() && prob(20)) M.heal_organ_damage(1,0) + if(holder.has_reagent("capsaicin")) + holder.remove_reagent("capsaicin", 2) + M.nutrition++ + ..() + return + + soymilk + name = "Soy Milk" + id = "soymilk" + description = "An opaque white liquid made from soybeans." + reagent_state = LIQUID + color = "#DFDFC7" // rgb: 223, 223, 199 + + on_mob_life(var/mob/living/M as mob) + if(!M) M = holder.my_atom + if(M.getBruteLoss() && prob(20)) M.heal_organ_damage(1,0) + M.nutrition++ + ..() + return + + cream + name = "Cream" + id = "cream" + description = "The fatty, still liquid part of milk. Why don't you mix this with sum scotch, eh?" + reagent_state = LIQUID + nutriment_factor = 1 * REAGENTS_METABOLISM + color = "#DFD7AF" // rgb: 223, 215, 175 + + on_mob_life(var/mob/living/M as mob) + M.nutrition += nutriment_factor + if(M.getBruteLoss() && prob(20)) M.heal_organ_damage(1,0) + ..() + return + + coffee + name = "Coffee" + id = "coffee" + description = "Coffee is a brewed drink prepared from roasted seeds, commonly called coffee beans, of the coffee plant." + reagent_state = LIQUID + color = "#482000" // rgb: 72, 32, 0 + + on_mob_life(var/mob/living/M as mob) + ..() + M.dizziness = max(0,M.dizziness-5) + M.drowsyness = max(0,M.drowsyness-3) + M.sleeping = max(0,M.sleeping - 2) + if (M.bodytemperature < 310)//310 is the normal bodytemp. 310.055 + M.bodytemperature = min(310, M.bodytemperature + (25 * TEMPERATURE_DAMAGE_COEFFICIENT)) + M.make_jittery(5) + if(holder.has_reagent("frostoil")) + holder.remove_reagent("frostoil", 5) + ..() + return + + tea + name = "Tea" + id = "tea" + description = "Tasty black tea, it has antioxidants, it's good for you!" + reagent_state = LIQUID + color = "#101000" // rgb: 16, 16, 0 + + on_mob_life(var/mob/living/M as mob) + ..() + M.dizziness = max(0,M.dizziness-2) + M.drowsyness = max(0,M.drowsyness-1) + M.jitteriness = max(0,M.jitteriness-3) + M.sleeping = max(0,M.sleeping-1) + if(M.getToxLoss() && prob(20)) + M.adjustToxLoss(-1) + if (M.bodytemperature < 310) //310 is the normal bodytemp. 310.055 + M.bodytemperature = min(310, M.bodytemperature + (5 * TEMPERATURE_DAMAGE_COEFFICIENT)) + ..() + return + + icecoffee + name = "Iced Coffee" + id = "icecoffee" + description = "Coffee and ice, refreshing and cool." + reagent_state = LIQUID + color = "#102838" // rgb: 16, 40, 56 + + on_mob_life(var/mob/living/M as mob) + ..() + M.dizziness = max(0,M.dizziness-5) + M.drowsyness = max(0,M.drowsyness-3) + M.sleeping = max(0,M.sleeping-2) + if (M.bodytemperature > 310)//310 is the normal bodytemp. 310.055 + M.bodytemperature = min(310, M.bodytemperature - (5 * TEMPERATURE_DAMAGE_COEFFICIENT)) + M.make_jittery(5) + ..() + return + + icetea + name = "Iced Tea" + id = "icetea" + description = "No relation to a certain rap artist/ actor." + reagent_state = LIQUID + color = "#104038" // rgb: 16, 64, 56 + + on_mob_life(var/mob/living/M as mob) + ..() + M.dizziness = max(0,M.dizziness-2) + M.drowsyness = max(0,M.drowsyness-1) + M.sleeping = max(0,M.sleeping-2) + if(M.getToxLoss() && prob(20)) + M.adjustToxLoss(-1) + if (M.bodytemperature > 310)//310 is the normal bodytemp. 310.055 + M.bodytemperature = min(310, M.bodytemperature - (5 * TEMPERATURE_DAMAGE_COEFFICIENT)) + return + + space_cola + name = "Cola" + id = "cola" + description = "A refreshing beverage." + reagent_state = LIQUID + color = "#100800" // rgb: 16, 8, 0 + + on_mob_life(var/mob/living/M as mob) + M.drowsyness = max(0,M.drowsyness-5) + if (M.bodytemperature > 310)//310 is the normal bodytemp. 310.055 + M.bodytemperature = max(310, M.bodytemperature - (5 * TEMPERATURE_DAMAGE_COEFFICIENT)) + M.nutrition += 1 + ..() + return + + nuka_cola + name = "Nuka Cola" + id = "nuka_cola" + description = "Cola, cola never changes." + reagent_state = LIQUID + color = "#100800" // rgb: 16, 8, 0 + + on_mob_life(var/mob/living/M as mob) + M.make_jittery(20) + M.druggy = max(M.druggy, 30) + M.dizziness +=5 + M.drowsyness = 0 + M.sleeping = max(0,M.sleeping-2) + if (M.bodytemperature > 310)//310 is the normal bodytemp. 310.055 + M.bodytemperature = max(310, M.bodytemperature - (5 * TEMPERATURE_DAMAGE_COEFFICIENT)) + M.nutrition += 1 + ..() + return + + spacemountainwind + name = "Space Mountain Wind" + id = "spacemountainwind" + description = "Blows right through you like a space wind." + reagent_state = LIQUID + color = "#102000" // rgb: 16, 32, 0 + + on_mob_life(var/mob/living/M as mob) + M.drowsyness = max(0,M.drowsyness-7) + M.sleeping = max(0,M.sleeping-1) + if (M.bodytemperature > 310) + M.bodytemperature = max(310, M.bodytemperature - (5 * TEMPERATURE_DAMAGE_COEFFICIENT)) + M.make_jittery(5) + M.nutrition += 1 + ..() + return + + thirteenloko + name = "Thirteen Loko" + id = "thirteenloko" + description = "A potent mixture of caffeine and alcohol." + reagent_state = LIQUID + color = "#102000" // rgb: 16, 32, 0 + + on_mob_life(var/mob/living/M as mob) + M.drowsyness = max(0,M.drowsyness-7) + M.sleeping = max(0,M.sleeping-2) + if (M.bodytemperature > 310) + M.bodytemperature = max(310, M.bodytemperature - (5 * TEMPERATURE_DAMAGE_COEFFICIENT)) + M.make_jittery(5) + M.nutrition += 1 + if(!data) data = 1 + data++ + M.dizziness +=4 + if(data >= 45 && data <115) + if (!M.stuttering) M.stuttering = 1 + M.stuttering += 3 + else if(data >= 125 && prob(33)) + M.confused = max(M.confused+2,0) + ..() + return + + dr_gibb + name = "Dr. Gibb" + id = "dr_gibb" + description = "A delicious blend of 42 different flavours" + reagent_state = LIQUID + color = "#102000" // rgb: 16, 32, 0 + + on_mob_life(var/mob/living/M as mob) + M.drowsyness = max(0,M.drowsyness-6) + if (M.bodytemperature > 310) + M.bodytemperature = max(310, M.bodytemperature - (5 * TEMPERATURE_DAMAGE_COEFFICIENT)) //310 is the normal bodytemp. 310.055 + M.nutrition += 1 + ..() + return + + space_up + name = "Space-Up" + id = "space_up" + description = "Tastes like a hull breach in your mouth." + reagent_state = LIQUID + color = "#202800" // rgb: 32, 40, 0 + + on_mob_life(var/mob/living/M as mob) + if (M.bodytemperature > 310) + M.bodytemperature = max(310, M.bodytemperature - (8 * TEMPERATURE_DAMAGE_COEFFICIENT)) //310 is the normal bodytemp. 310.055 + M.nutrition += 1 + ..() + return + + lemon_lime + name = "Lemon Lime" + description = "A tangy substance made of 0.5% natural citrus!" + id = "lemon_lime" + reagent_state = LIQUID + color = "#878F00" // rgb: 135, 40, 0 + + on_mob_life(var/mob/living/M as mob) + if (M.bodytemperature > 310) + M.bodytemperature = max(310, M.bodytemperature - (8 * TEMPERATURE_DAMAGE_COEFFICIENT)) //310 is the normal bodytemp. 310.055 + M.nutrition += 1 + ..() + return + + beer + name = "Beer" + id = "beer" + description = "An alcoholic beverage made from malted grains, hops, yeast, and water." + reagent_state = LIQUID + color = "#664300" // rgb: 102, 67, 0 + + on_mob_life(var/mob/living/M as mob) + if(!data) data = 1 + data++ + M.make_dizzy(3) + M.jitteriness = max(M.jitteriness-3,0) + M.nutrition += 2 + if(data >= 25) + if (!M.stuttering) M.stuttering = 1 + M.stuttering += 3 + if(data >= 40 && prob(33)) + if (!M.confused) M.confused = 1 + M.confused += 2 + + ..() + return + + whiskey + name = "Whiskey" + id = "whiskey" + description = "A superb and well-aged single-malt whiskey. Damn." + reagent_state = LIQUID + color = "#664300" // rgb: 102, 67, 0 + + on_mob_life(var/mob/living/M as mob) + if(!data) data = 1 + data++ + M.dizziness +=4 + if(data >= 45 && data <125) + if (!M.stuttering) M.stuttering = 1 + M.stuttering += 3 + else if(data >= 125 && prob(33)) + M.confused = max(M.confused+2,0) + ..() + return + + 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." + reagent_state = LIQUID + color = "#664300" // rgb: 102, 67, 0 + + on_mob_life(var/mob/living/M as mob) + if(!data) data = 1 + data++ + M.dizziness +=3 + if(data >= 45 && data <125) + if (!M.stuttering) M.stuttering = 1 + M.stuttering += 3 + else if(data >= 125 && prob(33)) + M.confused = max(M.confused+2,0) + ..() + return + + + gin + name = "Gin" + id = "gin" + description = "It's gin. In space. I say, good sir." + reagent_state = LIQUID + color = "#664300" // rgb: 102, 67, 0 + + on_mob_life(var/mob/living/M as mob) + if(!data) data = 1 + data++ + M.dizziness +=3 + if(data >= 45 && data <125) + if (!M.stuttering) M.stuttering = 1 + M.stuttering += 3 + else if(data >= 125 && prob(33)) + M.confused = max(M.confused+2,0) + ..() + return + + rum + name = "Rum" + id = "rum" + description = "Yohoho and all that." + reagent_state = LIQUID + color = "#664300" // rgb: 102, 67, 0 + + on_mob_life(var/mob/living/M as mob) + if(!data) data = 1 + data++ + M.dizziness +=3 + if(data >= 45 && data <125) + if (!M.stuttering) M.stuttering = 1 + M.stuttering += 3 + else if(data >= 125 && prob(33)) + M.confused = max(M.confused+2,0) + ..() + return + + vodka + name = "Vodka" + id = "vodka" + description = "Number one drink AND fueling choice for Russians worldwide." + reagent_state = LIQUID + color = "#664300" // rgb: 102, 67, 0 + + on_mob_life(var/mob/living/M as mob) + if(!data) data = 1 + data++ + M.dizziness +=3 + M.radiation = max(M.radiation-2,0) + if(data >= 45 && data <125) + if (!M.stuttering) M.stuttering = 1 + M.stuttering += 3 + else if(data >= 125 && prob(33)) + M.confused = max(M.confused+2,0) + ..() + return + + holywater + name = "Holy Water" + id = "holywater" + description = "Water blessed by some deity." + reagent_state = LIQUID + color = "#E0E8EF" // rgb: 224, 232, 239 + + on_mob_life(var/mob/living/M as mob) + if(!data) data = 1 + data++ + M.dizziness +=8 + if(data >= 45 && data <125) + if (!M.stuttering) M.stuttering = 1 + M.stuttering += 8 + else if(data >= 125 && prob(33)) + M.confused = max(M.confused+8,8) + ..() + return + + reaction_turf(var/turf/simulated/T, var/volume) + if(!istype(T)) return + T.Bless() + + tequilla + name = "Tequila" + id = "tequilla" + description = "A strong and mildly flavoured, mexican produced spirit. Feeling thirsty hombre?" + reagent_state = LIQUID + color = "#A8B0B7" // rgb: 168, 176, 183 + + on_mob_life(var/mob/living/M as mob) + if(!data) data = 1 + data++ + M.dizziness +=3 + if(data >= 45 && data <125) + if (!M.stuttering) M.stuttering = 1 + M.stuttering += 3 + else if(data >= 125 && prob(33)) + M.confused = max(M.confused+2,0) + ..() + return + + vermouth + name = "Vermouth" + id = "vermouth" + description = "You suddenly feel a craving for a martini..." + reagent_state = LIQUID + color = "#664300" // rgb: 102, 67, 0 + + on_mob_life(var/mob/living/M as mob) + if(!data) data = 1 + data++ + M.dizziness +=3 + if(data >= 45 && data <125) + if (!M.stuttering) M.stuttering = 1 + M.stuttering += 3 + else if(data >= 125 && prob(33)) + M.confused = max(M.confused+2,0) + ..() + return + + wine + name = "Wine" + id = "wine" + description = "An premium alchoholic beverage made from distilled grape juice." + reagent_state = LIQUID + color = "#7E4043" // rgb: 126, 64, 67 + + on_mob_life(var/mob/living/M as mob) + if(!data) data = 1 + data++ + M.dizziness +=2 + if(data >= 65 && data <125) + if (!M.stuttering) M.stuttering = 1 + M.stuttering += 3 + else if(data >= 145 && prob(33)) + M.confused = max(M.confused+2,0) + ..() + return + + tonic + name = "Tonic Water" + id = "tonic" + description = "It tastes strange but at least the quinine keeps the Space Malaria at bay." + reagent_state = LIQUID + color = "#664300" // rgb: 102, 67, 0 + + on_mob_life(var/mob/living/M as mob) + M.dizziness = max(0,M.dizziness-5) + M.drowsyness = max(0,M.drowsyness-3) + M.sleeping = max(0,M.sleeping-2) + if (M.bodytemperature > 310) + M.bodytemperature = max(310, M.bodytemperature - (5 * TEMPERATURE_DAMAGE_COEFFICIENT)) + ..() + return + + kahlua + name = "Kahlua" + id = "kahlua" + description = "A widely known, Mexican coffee-flavoured liqueur. In production since 1936!" + reagent_state = LIQUID + color = "#664300" // rgb: 102, 67, 0 + + on_mob_life(var/mob/living/M as mob) + M.dizziness = max(0,M.dizziness-5) + M.drowsyness = max(0,M.drowsyness-3) + M.sleeping = max(0,M.sleeping-2)//Copy-paste from Coffee, derp + M.make_jittery(5) + ..() + return + + + cognac + name = "Cognac" + id = "cognac" + description = "A sweet and strongly alchoholic drink, made after numerous distillations and years of maturing. Classy as fornication." + reagent_state = LIQUID + color = "#664300" // rgb: 102, 67, 0 + + on_mob_life(var/mob/living/M as mob) + if(!data) data = 1 + data++ + M.dizziness +=4 + if(data >= 45 && data <115) + if (!M.stuttering) M.stuttering = 1 + M.stuttering += 3 + else if(data >= 115 && prob(33)) + M.confused = max(M.confused+2,0) + ..() + return + + hooch + name = "Hooch" + id = "hooch" + description = "Either someone's failure at cocktail making or attempt in alchohol production. In any case, do you really want to drink that?" + reagent_state = LIQUID + color = "#664300" // rgb: 102, 67, 0 + + on_mob_life(var/mob/living/M as mob) + if(!data) data = 1 + data++ + M.dizziness +=6 + if(data >= 35 && data <90) + if (!M.stuttering) M.stuttering = 1 + M.stuttering += 5 + else if(data >= 90 && prob(33)) + M.confused = max(M.confused+2,0) + ..() + return + + ale + name = "Ale" + id = "ale" + description = "A dark alchoholic beverage made by malted barley and yeast." + reagent_state = LIQUID + color = "#664300" // rgb: 102, 67, 0 + + on_mob_life(var/mob/living/M as mob) + if(!data) data = 1 + data++ + M.dizziness +=3 + if(data >= 45 && data <125) + if (!M.stuttering) M.stuttering = 1 + M.stuttering += 3 + else if(data >= 125 && prob(33)) + M.confused = max(M.confused+2,0) + ..() + return + + sodawater + name = "Soda Water" + id = "sodawater" + description = "A can of club soda. Why not make a scotch and soda?" + reagent_state = LIQUID + color = "#619494" // rgb: 97, 148, 148 + + on_mob_life(var/mob/living/M as mob) + M.dizziness = max(0,M.dizziness-5) + M.drowsyness = max(0,M.drowsyness-3) + if (M.bodytemperature > 310) + M.bodytemperature = max(310, M.bodytemperature - (5 * TEMPERATURE_DAMAGE_COEFFICIENT)) + ..() + return + + 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 + + on_mob_life(var/mob/living/M as mob) + if(!M) M = holder.my_atom + M.bodytemperature -= 5 * TEMPERATURE_DAMAGE_COEFFICIENT + ..() + return + +/////////////////////////////////////////////////////////////////cocktail entities////////////////////////////////////////////// + + bilk + name = "Bilk" + id = "bilk" + description = "This appears to be beer mixed with milk. Disgusting." + reagent_state = LIQUID + color = "#895C4C" // rgb: 137, 92, 76 + + on_mob_life(var/mob/living/M as mob) + if(M.getBruteLoss() && prob(10)) M.heal_organ_damage(1,0) + M.nutrition += 2 + if(!data) data = 1 + data++ + M.make_dizzy(3) + M.jitteriness = max(M.jitteriness-3,0) + if(data >= 25) + if (!M.stuttering) M.stuttering = 1 + M.stuttering += 3 + if(data >= 40 && prob(33)) + if (!M.confused) M.confused = 1 + M.confused += 2 + ..() + return + + atomicbomb + name = "Atomic Bomb" + id = "atomicbomb" + description = "Nuclear proliferation never tasted so good." + reagent_state = LIQUID + color = "#666300" // rgb: 102, 99, 0 + + on_mob_life(var/mob/living/M as mob) + M.druggy = max(M.druggy, 50) + M.confused = max(M.confused+2,0) + M.make_dizzy(10) + if (!M.stuttering) M.stuttering = 1 + M.stuttering += 3 + if(!data) data = 1 + data++ + switch(data) + if(51 to INFINITY) + M.sleeping += 1 + ..() + return + + 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 + + on_mob_life(var/mob/living/M as mob) + if(!data) data = 1 + data++ + M.dizziness +=3 + M.druggy = max(M.druggy, 50) + if(data >= 35 && data <90) + if (!M.stuttering) M.stuttering = 1 + M.stuttering += 3 + else if(data >= 90) + M.confused = max(M.confused+2,0) + ..() + return + + 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 + + on_mob_life(var/mob/living/M as mob) + if(!data) data = 1 + data++ + M.dizziness +=3 + if(data >= 45 && data <125) + if (!M.stuttering) M.stuttering = 1 + M.stuttering += 3 + else if(data >= 125 && prob(33)) + M.confused = max(M.confused+2,0) + ..() + return + + 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 + + on_mob_life(var/mob/living/M as mob) + if(!data) data = 1 + data++ + M.dizziness +=3 + if(data >= 45 && data <125) + if (!M.stuttering) M.stuttering = 1 + M.stuttering += 3 + else if(data >= 125 && prob(33)) + M.confused = max(M.confused+2,0) + ..() + return + + gintonic + name = "Gin and Tonic" + id = "gintonic" + description = "An all time classic, mild cocktail." + reagent_state = LIQUID + color = "#664300" // rgb: 102, 67, 0 + + on_mob_life(var/mob/living/M as mob) + if(!data) data = 1 + data++ + M.dizziness +=3 + if(data >= 45 && data <135) + if (!M.stuttering) M.stuttering = 1 + M.stuttering += 3 + else if(data >= 135 && prob(33)) + M.confused = max(M.confused+2,0) + ..() + return + + cuba_libre + name = "Cuba Libre" + id = "cubalibre" + description = "Rum, mixed with cola. Viva la revolution." + reagent_state = LIQUID + color = "#3E1B00" // rgb: 62, 27, 0 + + on_mob_life(var/mob/living/M as mob) + if(!data) data = 1 + data++ + M.dizziness +=3 + if(data >= 45 && data <135) + if (!M.stuttering) M.stuttering = 1 + M.stuttering += 3 + else if(data >= 135 && prob(33)) + M.confused = max(M.confused+2,0) + ..() + return + + whiskey_cola + name = "Whiskey Cola" + id = "whiskeycola" + description = "Whiskey, mixed with cola. Surprisingly refreshing." + reagent_state = LIQUID + color = "#3E1B00" // rgb: 62, 27, 0 + + on_mob_life(var/mob/living/M as mob) + if(!data) data = 1 + data++ + M.dizziness +=3 + if(data >= 55 && data <125) + if (!M.stuttering) M.stuttering = 1 + M.stuttering += 3 + else if(data >= 125 && prob(33)) + M.confused = max(M.confused+2,0) + ..() + return + + 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 + + on_mob_life(var/mob/living/M as mob) + if(!data) data = 1 + data++ + M.dizziness +=3 + if(data >= 45 && data <165) + if (!M.stuttering) M.stuttering = 1 + M.stuttering += 3 + else if(data >= 135 && prob(33)) + M.confused = max(M.confused+2,0) + ..() + return + + 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 + + on_mob_life(var/mob/living/M as mob) + if(!data) data = 1 + data++ + M.dizziness +=3 + if(data >= 45 && data <165) + if (!M.stuttering) M.stuttering = 1 + M.stuttering += 3 + else if(data >= 135 && prob(33)) + M.confused = max(M.confused+2,0) + ..() + return + + white_russian + name = "White Russian" + id = "whiterussian" + description = "That's just, like, your opinion, man..." + reagent_state = LIQUID + color = "#A68340" // rgb: 166, 131, 64 + + on_mob_life(var/mob/living/M as mob) + if(!data) data = 1 + data++ + M.dizziness +=3 + if(data >= 55 && data <165) + if (!M.stuttering) M.stuttering = 1 + M.stuttering += 3 + else if(data >= 165 && prob(33)) + M.confused = max(M.confused+2,0) + ..() + return + + 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 + + on_mob_life(var/mob/living/M as mob) + if(!data) data = 1 + data++ + M.dizziness +=3 + if(data >= 55 && data <165) + if (!M.stuttering) M.stuttering = 1 + M.stuttering += 3 + else if(data >= 165 && prob(33)) + M.confused = max(M.confused+2,0) + ..() + return + + booger + name = "Booger" + id = "booger" + description = "Ewww..." + reagent_state = LIQUID + color = "#A68310" // rgb: 166, 131, 16 + + on_mob_life(var/mob/living/M as mob) + if(!data) data = 1 + data++ + M.dizziness +=4 + if(data >= 55 && data <165) + if (!M.stuttering) M.stuttering = 1 + M.stuttering += 4 + else if(data >= 165 && prob(33)) + M.confused = max(M.confused+4,0) + ..() + return + + 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 + + on_mob_life(var/mob/living/M as mob) + if(!data) data = 1 + data++ + M.dizziness +=3 + if(data >= 55 && data <165) + if (!M.stuttering) M.stuttering = 1 + M.stuttering += 3 + else if(data >= 165 && prob(33)) + M.confused = max(M.confused+2,0) + ..() + return + + gargle_blaster + name = "Pan-Galactic Gargle Blaster" + id = "gargleblaster" + description = "Whoah, this stuff looks volatile!" + reagent_state = LIQUID + color = "#664300" // rgb: 102, 67, 0 + + on_mob_life(var/mob/living/M as mob) + if(!data) data = 1 + data++ + M.dizziness +=6 + if(data >= 15 && data <45) + if (!M.stuttering) M.stuttering = 1 + M.stuttering += 3 + else if(data >= 45 && prob(50) && data <55) + M.confused = max(M.confused+3,0) + else if(data >=55) + M.druggy = max(M.druggy, 55) + ..() + return + + 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 + + on_mob_life(var/mob/living/M as mob) + if(!data) data = 1 + data++ + M.dizziness +=3 + if(data >= 45 && data <145) + if (!M.stuttering) M.stuttering = 1 + M.stuttering += 3 + else if(data >= 145 && prob(33)) + M.confused = max(M.confused+2,0) + ..() + return + + tequilla_sunrise + name = "Tequila Sunrise" + id = "tequillasunrise" + description = "Tequila and orange juice. Much like a Screwdriver, only Mexican~" + reagent_state = LIQUID + color = "#664300" // rgb: 102, 67, 0 + + on_mob_life(var/mob/living/M as mob) + if(!data) data = 1 + data++ + M.dizziness +=3 + if(data >= 55 && data <165) + if (!M.stuttering) M.stuttering = 1 + M.stuttering += 3 + else if(data >= 165 && prob(33)) + M.confused = max(M.confused+2,0) + ..() + return + + 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 + + on_mob_life(var/mob/living/M as mob) + if (M.bodytemperature < 330) + M.bodytemperature = min(330, M.bodytemperature + (15 * TEMPERATURE_DAMAGE_COEFFICIENT)) //310 is the normal bodytemp. 310.055 + if(!data) data = 1 + data++ + M.dizziness +=3 + if(data >= 55 && data <165) + if (!M.stuttering) M.stuttering = 1 + M.stuttering += 3 + else if(data >= 165 && prob(33)) + M.confused = max(M.confused+2,0) + ..() + return + + 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 + + on_mob_life(var/mob/living/M as mob) + M.Stun(2) + if(!data) data = 1 + data++ + M.dizziness +=3 + if(data >= 55 && data <165) + if (!M.stuttering) M.stuttering = 1 + M.stuttering += 3 + else if(data >= 165 && prob(33)) + M.confused = max(M.confused+2,0) + ..() + return + + 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 = "#664300" // rgb: 102, 67, 0 + + on_mob_life(var/mob/living/M as mob) + if(!M) M = holder.my_atom + if(M.getOxyLoss() && prob(50)) M.adjustOxyLoss(-2) + if(M.getBruteLoss() && prob(60)) M.heal_organ_damage(2,0) + if(M.getFireLoss() && prob(50)) M.heal_organ_damage(0,2) + if(M.getToxLoss() && prob(50)) M.adjustToxLoss(-2) + if(M.dizziness !=0) M.dizziness = max(0,M.dizziness-15) + if(M.confused !=0) M.confused = max(0,M.confused - 5) + ..() + return + + 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 + + on_mob_life(var/mob/living/M as mob) + if(!data) data = 1 + data++ + M.dizziness +=3 + if(data >= 45 && data <145) + if (!M.stuttering) M.stuttering = 1 + M.stuttering += 3 + else if(data >= 145 && prob(33)) + M.confused = max(M.confused+2,0) + ..() + return + + 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 + + on_mob_life(var/mob/living/M as mob) + if(!data) data = 1 + data++ + M.dizziness +=5 + if(data >= 35 && data <115) + if (!M.stuttering) M.stuttering = 1 + M.stuttering += 3 + else if(data >= 115 && prob(33)) + M.confused = max(M.confused+2,0) + ..() + return + + 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 + + on_mob_life(var/mob/living/M as mob) + if(!data) data = 1 + data++ + M.dizziness +=3 + if(data >= 55 && data <165) + if (!M.stuttering) M.stuttering = 1 + M.stuttering += 3 + else if(data >= 165 && prob(33)) + M.confused = max(M.confused+2,0) + ..() + return + + 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 + + on_mob_life(var/mob/living/M as mob) + if(!data) data = 1 + data++ + M.dizziness +=5 + if(data >= 30 && data <60) + if (!M.stuttering) M.stuttering = 1 + M.stuttering += 4 + else if(data >= 60 && prob(40)) + M.confused = max(M.confused+5,0) + ..() + return + + 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 + + on_mob_life(var/mob/living/M as mob) + if(!data) data = 1 + data++ + M.dizziness +=3 + if(data >= 25 && data <90) + if (!M.stuttering) M.stuttering = 1 + M.stuttering += 3 + else if(data >= 90 && prob(33)) + M.confused = max(M.confused+2,0) + ..() + return + + 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 + + on_mob_life(var/mob/living/M as mob) + if(!data) data = 1 + data++ + M.dizziness +=3 + if(data >= 55 && data <150) + if (!M.stuttering) M.stuttering = 1 + M.stuttering += 3 + else if(data >= 150 && prob(33)) + M.confused = max(M.confused+2,0) + ..() + return + + margarita + name = "Margarita" + id = "margarita" + description = "On the rocks with salt on the rim. Arriba~!" + reagent_state = LIQUID + color = "#664300" // rgb: 102, 67, 0 + + on_mob_life(var/mob/living/M as mob) + if(!data) data = 1 + data++ + M.dizziness +=4 + if(data >= 55 && data <150) + if (!M.stuttering) M.stuttering = 1 + M.stuttering += 3 + else if(data >= 150 && prob(33)) + M.confused = max(M.confused+2,0) + ..() + return + + 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 + + on_mob_life(var/mob/living/M as mob) + if(!data) data = 1 + data++ + M.dizziness +=4 + if(data >= 55 && data <115) + if (!M.stuttering) M.stuttering = 1 + M.stuttering += 3 + else if(data >= 115 && prob(33)) + M.confused = max(M.confused+2,0) + ..() + return + + 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 + + on_mob_life(var/mob/living/M as mob) + if(!data) data = 1 + data++ + M.dizziness +=4 + if(data >= 55 && data <115) + if (!M.stuttering) M.stuttering = 1 + M.stuttering += 3 + else if(data >= 115 && prob(33)) + M.confused = max(M.confused+2,0) + ..() + return + + manhattan_proj + name = "Manhattan Project" + id = "manhattan_proj" + description = "A scientist's drink of choice, for pondering ways to blow up the station." + reagent_state = LIQUID + color = "#664300" // rgb: 102, 67, 0 + + on_mob_life(var/mob/living/M as mob) + if(!data) data = 1 + data++ + M.dizziness +=4 + M.druggy = max(M.druggy, 30) + if(data >= 55 && data <115) + if (!M.stuttering) M.stuttering = 1 + M.stuttering += 3 + else if(data >= 115 && prob(33)) + M.confused = max(M.confused+2,0) + ..() + return + + whiskeysoda + name = "Whiskey Soda" + id = "whiskeysoda" + description = "Ultimate refreshment." + reagent_state = LIQUID + color = "#664300" // rgb: 102, 67, 0 + + on_mob_life(var/mob/living/M as mob) + if(!data) data = 1 + data++ + M.dizziness +=4 + if(data >= 55 && data <115) + if (!M.stuttering) M.stuttering = 1 + M.stuttering += 3 + else if(data >= 115 && prob(33)) + M.confused = max(M.confused+2,0) + ..() + return + + antifreeze + name = "Anti-freeze" + id = "antifreeze" + description = "Ultimate refreshment." + reagent_state = LIQUID + color = "#664300" // rgb: 102, 67, 0 + + on_mob_life(var/mob/living/M as mob) + if (M.bodytemperature < 330) + M.bodytemperature = min(330, M.bodytemperature + (20 * TEMPERATURE_DAMAGE_COEFFICIENT)) //310 is the normal bodytemp. 310.055 + if(!data) data = 1 + data++ + M.dizziness +=3 + if(data >= 55 && data <165) + if (!M.stuttering) M.stuttering = 1 + M.stuttering += 3 + else if(data >= 165 && prob(33)) + M.confused = max(M.confused+2,0) + ..() + return + + barefoot + name = "Barefoot" + id = "barefoot" + description = "Barefoot and pregnant" + reagent_state = LIQUID + color = "#664300" // rgb: 102, 67, 0 + + on_mob_life(var/mob/living/M as mob) + if(!data) data = 1 + data++ + M.dizziness +=5 + if(data >= 55 && data <115) + if (!M.stuttering) M.stuttering = 1 + M.stuttering += 5 + else if(data >= 115 && prob(33)) + M.confused = max(M.confused+5,0) + ..() + return + + snowwhite + name = "Snow White" + id = "snowwhite" + description = "A cold refreshment" + reagent_state = LIQUID + color = "#664300" // rgb: 102, 67, 0 + + on_mob_life(var/mob/living/M as mob) + if(!data) data = 1 + data++ + M.dizziness +=4 + if(data >= 55 && data <115) + if (!M.stuttering) M.stuttering = 1 + M.stuttering += 4 + else if(data >= 115 && prob(30)) + M.confused = max(M.confused+4,0) + ..() + return + + demonsblood + name = "Demons Blood" + id = "demonsblood" + description = "AHHHH!!!!" + reagent_state = LIQUID + color = "#664300" // rgb: 102, 67, 0 + + on_mob_life(var/mob/living/M as mob) + if(!data) data = 1 + data++ + M.dizziness +=10 + if(data >= 55 && data <115) + if (!M.stuttering) M.stuttering = 1 + M.stuttering += 10 + else if(data >= 115 && prob(90)) + M.confused = max(M.confused+10,10) + ..() + return + + 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 + + on_mob_life(var/mob/living/M as mob) + if(!data) data = 1 + data++ + M.dizziness +=4 + if(data >= 55 && data <115) + if (!M.stuttering) M.stuttering = 1 + M.stuttering += 3 + else if(data >= 115 && prob(33)) + M.confused = max(M.confused+2,0) + ..() + return + + ginfizz + name = "Gin Fizz" + id = "ginfizz" + description = "Refreshingly lemony, deliciously dry." + reagent_state = LIQUID + color = "#664300" // rgb: 102, 67, 0 + + on_mob_life(var/mob/living/M as mob) + if(!data) data = 1 + data++ + M.dizziness +=4 + if(data >= 45 && data <125) + if (!M.stuttering) M.stuttering = 1 + M.stuttering += 3 + else if(data >= 125 && prob(33)) + M.confused = max(M.confused+2,0) + ..() + return + + bahama_mama + name = "Bahama mama" + id = "bahama_mama" + description = "Tropic cocktail." + reagent_state = LIQUID + color = "#664300" // rgb: 102, 67, 0 + + on_mob_life(var/mob/living/M as mob) + if(!data) data = 1 + data++ + M.dizziness +=3 + if(data >= 55 && data <165) + if (!M.stuttering) M.stuttering = 1 + M.stuttering += 3 + else if(data >= 165 && prob(33)) + M.confused = max(M.confused+2,0) + if (M.bodytemperature > 310) + M.bodytemperature = max(310, M.bodytemperature - (5 * TEMPERATURE_DAMAGE_COEFFICIENT)) + ..() + return + + singulo + name = "Singulo" + id = "singulo" + description = "A blue-space beverage!" + reagent_state = LIQUID + color = "#2E6671" // rgb: 46, 102, 113 + + on_mob_life(var/mob/living/M as mob) + if(!data) data = 1 + data++ + M.dizziness +=15 + if(data >= 55 && data <115) + if (!M.stuttering) M.stuttering = 1 + M.stuttering += 15 + else if(data >= 115 && prob(33)) + M.confused = max(M.confused+15,15) + ..() + return + +////////////////////////// REMOVED COCKTAIL REAGENTS BELOW:: RE-ENABLE THEM IF THEY EVER GET SPRITES THAT DON'T LOOK FUCKING STUPID --Agouri /////////////////////////// + + 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 + + on_mob_life(var/mob/living/M as mob) + if (M.bodytemperature < 360) + M.bodytemperature = min(360, M.bodytemperature + (50 * TEMPERATURE_DAMAGE_COEFFICIENT)) //310 is the normal bodytemp. 310.055 + if(!data) data = 1 + data++ + M.dizziness +=6 + if(data >= 45 && data <125) + if (!M.stuttering) M.stuttering = 1 + M.stuttering += 6 + else if(data >= 125 && prob(33)) + M.confused = max(M.confused+5,5) + ..() + return + + devilskiss + name = "Devils Kiss" + id = "devilskiss" + description = "Creepy time!" + reagent_state = LIQUID + color = "#A68310" // rgb: 166, 131, 16 + + on_mob_life(var/mob/living/M as mob) + if(!data) data = 1 + data++ + M.dizziness +=4 + if(data >= 55 && data <165) + if (!M.stuttering) M.stuttering = 1 + M.stuttering += 4 + else if(data >= 165 && prob(33)) + M.confused = max(M.confused+4,0) + ..() + return + + 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 + + on_mob_life(var/mob/living/M as mob) + if(!data) data = 1 + data++ + M.dizziness +=5 + if(data >= 55 && data <115) + if (!M.stuttering) M.stuttering = 1 + M.stuttering += 4 + else if(data >= 115 && prob(33)) + M.confused = max(M.confused+4,4) + ..() + return + + mead + name = "Mead" + id = "mead" + description = "A Vikings drink, though a cheap one." + reagent_state = LIQUID + color = "#664300" // rgb: 102, 67, 0 + + on_mob_life(var/mob/living/M as mob) + if(!data) data = 1 + data++ + M.make_dizzy(3) + M.jitteriness = max(M.jitteriness-3,0) + M.nutrition += 2 + if(data >= 25) + if (!M.stuttering) M.stuttering = 1 + M.stuttering += 3 + if(data >= 40 && prob(33)) + if (!M.confused) M.confused = 1 + M.confused += 2 + + ..() + return + + 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 + + on_mob_life(var/mob/living/M as mob) + if (M.bodytemperature < 270) + M.bodytemperature = min(270, M.bodytemperature - (40 * TEMPERATURE_DAMAGE_COEFFICIENT)) //310 is the normal bodytemp. 310.055 + if(!data) data = 1 + data++ + M.make_dizzy(3) + M.jitteriness = max(M.jitteriness-3,0) + M.nutrition += 2 + if(data >= 25) + if (!M.stuttering) M.stuttering = 1 + M.stuttering += 3 + if(data >= 40 && prob(33)) + if (!M.confused) M.confused = 1 + M.confused += 2 + + ..() + return + + grog + name = "Grog" + id = "grog" + description = "Watered down rum, Nanotrasen approves!" + reagent_state = LIQUID + color = "#664300" // rgb: 102, 67, 0 + + on_mob_life(var/mob/living/M as mob) + if(!data) data = 1 + data++ + M.dizziness +=2 + if(data >= 90 && data <250) + if (!M.stuttering) M.stuttering = 1 + M.stuttering += 2 + else if(data >= 250 && prob(33)) + M.confused = max(M.confused+2,0) + ..() + return + + aloe + name = "Aloe" + id = "aloe" + description = "So very, very, very good." + reagent_state = LIQUID + color = "#664300" // rgb: 102, 67, 0 + + on_mob_life(var/mob/living/M as mob) + if(!data) data = 1 + data++ + M.dizziness +=2 + if(data >= 90 && data <250) + if (!M.stuttering) M.stuttering = 1 + M.stuttering += 2 + else if(data >= 250 && prob(33)) + M.confused = max(M.confused+2,0) + ..() + return + + andalusia + name = "Andalusia" + id = "andalusia" + description = "A nice, strange named drink." + reagent_state = LIQUID + color = "#664300" // rgb: 102, 67, 0 + + on_mob_life(var/mob/living/M as mob) + if(!data) data = 1 + data++ + M.dizziness +=8 + if(data >= 90 && data <250) + if (!M.stuttering) M.stuttering = 1 + M.stuttering += 1 + else if(data >= 250 && prob(33)) + M.confused = max(M.confused+2,0) + ..() + return + + alliescocktail + name = "Allies Cocktail" + id = "alliescocktail" + description = "A drink made from your allies." + reagent_state = LIQUID + color = "#664300" // rgb: 102, 67, 0 + + on_mob_life(var/mob/living/M as mob) + if(!data) data = 1 + data++ + M.dizziness +=4 + if(data >= 90 && data <250) + if (!M.stuttering) M.stuttering = 1 + M.stuttering += 7 + else if(data >= 250 && prob(60)) + M.confused = max(M.confused+8,0) + ..() + return + + soy_latte + name = "Soy Latte" + id = "soy_latte" + description = "A nice and tasty beverage while you are reading your hippie books." + reagent_state = LIQUID + color = "#664300" // rgb: 102, 67, 0 + + on_mob_life(var/mob/living/M as mob) + ..() + M.dizziness = max(0,M.dizziness-5) + M.drowsyness = max(0,M.drowsyness-3) + M.sleeping = 0 + if (M.bodytemperature < 310)//310 is the normal bodytemp. 310.055 + M.bodytemperature = min(310, M.bodytemperature + (5 * TEMPERATURE_DAMAGE_COEFFICIENT)) + M.make_jittery(5) + if(M.getBruteLoss() && prob(20)) M.heal_organ_damage(1,0) + M.nutrition++ + ..() + return + + cafe_latte + name = "Cafe Latte" + id = "cafe_latte" + description = "A nice, strong and tasty beverage while you are reading." + reagent_state = LIQUID + color = "#664300" // rgb: 102, 67, 0 + + on_mob_life(var/mob/living/M as mob) + ..() + M.dizziness = max(0,M.dizziness-5) + M.drowsyness = max(0,M.drowsyness-3) + M.sleeping = 0 + if (M.bodytemperature < 310)//310 is the normal bodytemp. 310.055 + M.bodytemperature = min(310, M.bodytemperature + (5 * TEMPERATURE_DAMAGE_COEFFICIENT)) + M.make_jittery(5) + if(M.getBruteLoss() && prob(20)) M.heal_organ_damage(1,0) + M.nutrition++ + ..() + return + + 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 + + on_mob_life(var/mob/living/M as mob) + if(!data) data = 1 + data++ + M.dizziness +=10 + if(data >= 55 && data <115) + if (!M.stuttering) M.stuttering = 1 + M.stuttering += 10 + else if(data >= 115 && prob(33)) + M.confused = max(M.confused+10,0) + ..() + return + + amasec + name = "Amasec" + id = "amasec" + description = "Official drink of the Imperium." + reagent_state = LIQUID + color = "#664300" // rgb: 102, 67, 0 + + on_mob_life(var/mob/living/M as mob) + M.stunned = 4 + if(!data) data = 1 + data++ + M.dizziness +=4 + if(data >= 55 && data <165) + if (!M.stuttering) M.stuttering = 1 + M.stuttering += 4 + else if(data >= 165 && prob(33)) + M.confused = max(M.confused+5,0) + ..() + return + + neurotoxin + name = "Neurotoxin" + id = "neurotoxin" + description = "A strong neurotoxin that puts the subject into a death-like state." + reagent_state = LIQUID + color = "#2E2E61" // rgb: 46, 46, 97 + + on_mob_life(var/mob/living/carbon/M as mob) + if(!M) M = holder.my_atom + M.adjustOxyLoss(0.5) + M.adjustOxyLoss(0.5) + M.weakened = max(M.weakened, 15) + M.silent = max(M.silent, 15) + if(!data) data = 1 + data++ + M.dizziness +=6 + if(data >= 15 && data <45) + if (!M.stuttering) M.stuttering = 1 + M.stuttering += 3 + else if(data >= 45 && prob(50) && data <55) + M.confused = max(M.confused+3,0) + else if(data >=55) + M.druggy = max(M.druggy, 55) + ..() + + return + + + hippies_delight + name = "Hippie's Delight" + id = "hippiesdelight" + description = "A drink enjoyed by people during the 1960's." + reagent_state = LIQUID + color = "#664300" // rgb: 102, 67, 0 + + on_mob_life(var/mob/living/M as mob) + if(!M) M = holder.my_atom + M.druggy = max(M.druggy, 50) + if(!data) data = 1 + switch(data) + if(1 to 5) + if (!M.stuttering) M.stuttering = 1 + M.make_dizzy(10) + if(prob(10)) M.emote(pick("twitch","giggle")) + if(5 to 10) + if (!M.stuttering) M.stuttering = 1 + M.make_jittery(20) + M.make_dizzy(20) + M.druggy = max(M.druggy, 45) + if(prob(20)) M.emote(pick("twitch","giggle")) + if (10 to INFINITY) + if (!M.stuttering) M.stuttering = 1 + M.make_jittery(40) + M.make_dizzy(40) + M.druggy = max(M.druggy, 60) + if(prob(30)) M.emote(pick("twitch","giggle")) + holder.remove_reagent(src.id, 0.2) + data++ + ..() + return + + bananahonk + name = "Banana Mama" + id = "bananahonk" + description = "A drink from Clown Heaven." + nutriment_factor = 1 * REAGENTS_METABOLISM + color = "#664300" // rgb: 102, 67, 0 + + on_mob_life(var/mob/living/M as mob) + M.nutrition += nutriment_factor + if(!data) data = 1 + data++ + if(istype(M, /mob/living/carbon/human) && M.job in list("Clown")) + if(!M) M = holder.my_atom + M.heal_organ_damage(1,1) + M.dizziness +=5 + if(data >= 55 && data <165) + if (!M.stuttering) M.stuttering = 1 + M.stuttering += 5 + else if(data >= 165 && prob(33)) + M.confused = max(M.confused+5,0) + ..() + return + if(istype(M, /mob/living/carbon/monkey)) + if(!M) M = holder.my_atom + M.heal_organ_damage(1,1) + M.dizziness +=5 + if(data >= 55 && data <165) + if (!M.stuttering) M.stuttering = 1 + M.stuttering += 5 + else if(data >= 165 && prob(33)) + M.confused = max(M.confused+5,0) + ..() + return + + silencer + name = "Silencer" + id = "silencer" + description = "A drink from Mime Heaven." + nutriment_factor = 1 * REAGENTS_METABOLISM + color = "#664300" // rgb: 102, 67, 0 + + on_mob_life(var/mob/living/M as mob) + M.nutrition += nutriment_factor + if(!data) data = 1 + data++ + if(istype(M, /mob/living/carbon/human) && M.job in list("Mime")) + if(!M) M = holder.my_atom + M.heal_organ_damage(1,1) + M.dizziness +=5 + if(data >= 55 && data <165) + if (!M.stuttering) M.stuttering = 1 + M.stuttering += 5 + else if(data >= 165 && prob(33)) + M.confused = max(M.confused+5,0) + ..() + return + + + changelingsting + name = "Changeling Sting" + id = "changelingsting" + description = "A stingy drink." + reagent_state = LIQUID + color = "#2E6671" // rgb: 46, 102, 113 + + on_mob_life(var/mob/living/M as mob) + if(!data) data = 1 + data++ + M.dizziness +=5 + if(data >= 55 && data <115) + if (!M.stuttering) M.stuttering = 1 + M.stuttering += 5 + else if(data >= 115 && prob(33)) + M.confused = max(M.confused+15,15) + ..() + return + + irishcarbomb + name = "Irish Car Bomb" + id = "irishcarbomb" + description = "Mmm, tastes like chocolate cake..." + reagent_state = LIQUID + color = "#2E6671" // rgb: 46, 102, 113 + + on_mob_life(var/mob/living/M as mob) + if(!data) data = 1 + data++ + M.dizziness +=5 + if(data >= 55 && data <115) + if (!M.stuttering) M.stuttering = 1 + M.stuttering += 5 + else if(data >= 115 && prob(33)) + M.confused = max(M.confused+15,15) + ..() + return + + syndicatebomb + name = "Syndicate Bomb" + id = "syndicatebomb" + description = "A Syndicate bomb" + reagent_state = LIQUID + color = "#2E6671" // rgb: 46, 102, 113 + + on_mob_life(var/mob/living/M as mob) + if(!data) data = 1 + data++ + M.dizziness +=10 + if(data >= 55 && data <115) + if (!M.stuttering) M.stuttering = 1 + M.stuttering += 10 + else if(data >= 115 && prob(33)) + M.confused = max(M.confused+15,15) + ..() + return + + erikasurprise + name = "Erika Surprise" + id = "erikasurprise" + description = "The surprise is, it's green!" + reagent_state = LIQUID + color = "#2E6671" // rgb: 46, 102, 113 + + on_mob_life(var/mob/living/M as mob) + if(!data) data = 1 + data++ + M.dizziness +=30 + if(data >= 55 && data <115) + if (!M.stuttering) M.stuttering = 1 + M.stuttering += 30 + else if(data >= 115 && prob(60)) + M.confused = max(M.confused+15,15) + ..() + return + + 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 + + on_mob_life(var/mob/living/M as mob) + if(!data) data = 1 + data++ + M.dizziness +=10 + if(data >= 55 && data <115) + if (!M.stuttering) M.stuttering = 1 + M.stuttering += 10 + else if(data >= 115 && prob(33)) + M.confused = max(M.confused+15,15) + ..() + return \ 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..770ae266400 --- /dev/null +++ b/code/modules/reagents/Chemistry-Recipes.dm @@ -0,0 +1,1420 @@ +/////////////////////////////////////////////////////////////////////////////////// +datum + chemical_reaction + var/name = null + var/id = null + var/result = null + var/list/required_reagents = new/list() + var/list/required_catalysts = new/list() + + // Both of these variables are mostly going to be used with Metroid 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 + + proc + on_reaction(var/datum/reagents/holder, var/created_volume) + return + + //I recommend you set the result amount to the total volume of all components. + + explosion_potassium + name = "Explosion" + id = "explosion_potassium" + result = null + required_reagents = list("water" = 1, "potassium" = 1) + result_amount = 2 + on_reaction(var/datum/reagents/holder, var/created_volume) + var/location = get_turf(holder.my_atom) + var/datum/effect/effect/system/reagents_explosion/e = new() + e.set_up(round (created_volume/10, 1), location, 0, 0) + e.start() + + holder.clear_reagents() + return +/* + silicate + name = "Silicate" + id = "silicate" + result = "silicate" + required_reagents = list("aluminum" = 1, "silicon" = 1, "oxygen" = 1) + result_amount = 3 +*/ + stoxin + name = "Sleep Toxin" + id = "stoxin" + result = "stoxin" + required_reagents = list("chloralhydrate" = 1, "sugar" = 4) + result_amount = 5 + + sterilizine + name = "Sterilizine" + id = "sterilizine" + result = "sterilizine" + required_reagents = list("ethanol" = 1, "anti_toxin" = 1, "chlorine" = 1) + result_amount = 3 + + inaprovaline + name = "Inaprovaline" + id = "inaprovaline" + result = "inaprovaline" + required_reagents = list("oxygen" = 1, "carbon" = 1, "sugar" = 1) + result_amount = 3 + + anti_toxin + name = "Anti-Toxin (Dylovene)" + id = "anti_toxin" + result = "anti_toxin" + required_reagents = list("silicon" = 1, "potassium" = 1, "nitrogen" = 1) + result_amount = 3 + + mutagen + name = "Unstable mutagen" + id = "mutagen" + result = "mutagen" + required_reagents = list("radium" = 1, "phosphorus" = 1, "chlorine" = 1) + result_amount = 3 + + //cyanide + // name = "Cyanide" + // id = "cyanide" + // result = "cyanide" + // required_reagents = list("hydrogen" = 1, "carbon" = 1, "nitrogen" = 1) + // result_amount = 1 + + thermite + name = "Thermite" + id = "thermite" + result = "thermite" + required_reagents = list("aluminum" = 1, "iron" = 1, "oxygen" = 1) + result_amount = 3 + + lexorin + name = "Lexorin" + id = "lexorin" + result = "lexorin" + required_reagents = list("plasma" = 1, "hydrogen" = 1, "nitrogen" = 1) + result_amount = 3 + + space_drugs + name = "Space Drugs" + id = "space_drugs" + result = "space_drugs" + required_reagents = list("mercury" = 1, "sugar" = 1, "lithium" = 1) + result_amount = 3 + + lube + name = "Space Lube" + id = "lube" + result = "lube" + required_reagents = list("water" = 1, "silicon" = 1, "oxygen" = 1) + result_amount = 4 + + pacid + name = "Polytrinic acid" + id = "pacid" + result = "pacid" + required_reagents = list("sacid" = 1, "chlorine" = 1, "potassium" = 1) + result_amount = 3 + + synaptizine + name = "Synaptizine" + id = "synaptizine" + result = "synaptizine" + required_reagents = list("sugar" = 1, "lithium" = 1, "water" = 1) + result_amount = 3 + + hyronalin + name = "Hyronalin" + id = "hyronalin" + result = "hyronalin" + required_reagents = list("radium" = 1, "anti_toxin" = 1) + result_amount = 2 + + arithrazine + name = "Arithrazine" + id = "arithrazine" + result = "arithrazine" + required_reagents = list("hyronalin" = 1, "hydrogen" = 1) + result_amount = 2 + + impedrezene + name = "Impedrezene" + id = "impedrezene" + result = "impedrezene" + required_reagents = list("mercury" = 1, "oxygen" = 1, "sugar" = 1) + result_amount = 2 + + kelotane + name = "Kelotane" + id = "kelotane" + result = "kelotane" + required_reagents = list("silicon" = 1, "carbon" = 1) + result_amount = 2 + + leporazine + name = "Leporazine" + id = "leporazine" + result = "leporazine" + required_reagents = list("silicon" = 1, "copper" = 1) + required_catalysts = list("plasma" = 5) + result_amount = 2 + + cryptobiolin + name = "Cryptobiolin" + id = "cryptobiolin" + result = "cryptobiolin" + required_reagents = list("potassium" = 1, "oxygen" = 1, "sugar" = 1) + result_amount = 3 + + tricordrazine + name = "Tricordrazine" + id = "tricordrazine" + result = "tricordrazine" + required_reagents = list("inaprovaline" = 1, "anti_toxin" = 1) + result_amount = 2 + + alkysine + name = "Alkysine" + id = "alkysine" + result = "alkysine" + required_reagents = list("chlorine" = 1, "nitrogen" = 1, "anti_toxin" = 1) + result_amount = 2 + + dexalin + name = "Dexalin" + id = "dexalin" + result = "dexalin" + required_reagents = list("oxygen" = 2) + required_catalysts = list("plasma" = 5) + result_amount = 1 + + dermaline + name = "Dermaline" + id = "dermaline" + result = "dermaline" + required_reagents = list("oxygen" = 1, "phosphorus" = 1, "kelotane" = 1) + result_amount = 3 + + dexalinp + name = "Dexalin Plus" + id = "dexalinp" + result = "dexalinp" + required_reagents = list("dexalin" = 1, "carbon" = 1, "iron" = 1) + result_amount = 3 + + bicaridine + name = "Bicaridine" + id = "bicaridine" + result = "bicaridine" + required_reagents = list("inaprovaline" = 1, "carbon" = 1) + result_amount = 2 + + hyperzine + name = "Hyperzine" + id = "hyperzine" + result = "hyperzine" + required_reagents = list("sugar" = 1, "phosphorus" = 1, "sulfur" = 1,) + result_amount = 3 + + ryetalyn + name = "Ryetalyn" + id = "ryetalyn" + result = "ryetalyn" + required_reagents = list("arithrazine" = 1, "carbon" = 1) + result_amount = 2 + + cryoxadone + name = "Cryoxadone" + id = "cryoxadone" + result = "cryoxadone" + required_reagents = list("dexalin" = 1, "water" = 1, "oxygen" = 1) + result_amount = 3 + + clonexadone + name = "Clonexadone" + id = "clonexadone" + result = "clonexadone" + required_reagents = list("cryoxadone" = 1, "sodium" = 1) + required_catalysts = list("plasma" = 5) + result_amount = 2 + + spaceacillin + name = "Spaceacillin" + id = "spaceacillin" + result = "spaceacillin" + required_reagents = list("cryptobiolin" = 1, "inaprovaline" = 1) + result_amount = 2 + + imidazoline + name = "imidazoline" + id = "imidazoline" + result = "imidazoline" + required_reagents = list("carbon" = 1, "hydrogen" = 1, "anti_toxin" = 1) + result_amount = 2 + + ethylredoxrazine + name = "Ethylredoxrazine" + id = "ethylredoxrazine" + result = "ethylredoxrazine" + required_reagents = list("oxygen" = 1, "anti_toxin" = 1, "carbon" = 1) + result_amount = 3 + + ethanoloxidation + name = "ethanoloxidation" //Kind of a placeholder in case someone ever changes it so that chemicals + id = "ethanoloxidation" // react in the body. Also it would be silly if it didn't exist. + result = "water" + required_reagents = list("ethylredoxrazine" = 1, "ethanol" = 1) + result_amount = 2 + + glycerol + name = "Glycerol" + id = "glycerol" + result = "glycerol" + required_reagents = list("cornoil" = 3, "sacid" = 1) + result_amount = 1 + + nitroglycerin + name = "Nitroglycerin" + id = "nitroglycerin" + result = "nitroglycerin" + required_reagents = list("glycerol" = 1, "pacid" = 1, "sacid" = 1) + result_amount = 2 + on_reaction(var/datum/reagents/holder, var/created_volume) + var/location = get_turf(holder.my_atom) + var/datum/effect/effect/system/reagents_explosion/e = new() + e.set_up(round (created_volume/2, 1), location, 0, 0) + e.start() + + holder.clear_reagents() + return + + sodiumchloride + name = "Sodium Chloride" + id = "sodiumchloride" + result = "sodiumchloride" + required_reagents = list("sodium" = 1, "chlorine" = 1) + result_amount = 2 + + flash_powder + name = "Flash powder" + id = "flash_powder" + result = null + required_reagents = list("aluminum" = 1, "potassium" = 1, "sulfur" = 1 ) + result_amount = null + on_reaction(var/datum/reagents/holder, var/created_volume) + var/location = get_turf(holder.my_atom) + var/datum/effect/effect/system/spark_spread/s = new /datum/effect/effect/system/spark_spread + s.set_up(2, 1, location) + s.start() + for(var/mob/living/carbon/M in viewers(world.view, location)) + switch(get_dist(M, location)) + if(0 to 3) + if(hasvar(M, "glasses")) + if(istype(M:glasses, /obj/item/clothing/glasses/sunglasses)) + continue + + flick("e_flash", M.flash) + M.Weaken(15) + + if(4 to 5) + if(hasvar(M, "glasses")) + if(istype(M:glasses, /obj/item/clothing/glasses/sunglasses)) + continue + + flick("e_flash", M.flash) + M.Stun(5) + + napalm + name = "Napalm" + id = "napalm" + result = null + required_reagents = list("aluminum" = 1, "plasma" = 1, "sacid" = 1 ) + result_amount = 1 + on_reaction(var/datum/reagents/holder, var/created_volume) + var/turf/location = get_turf(holder.my_atom.loc) + for(var/turf/simulated/floor/target_tile in range(0,location)) + if(target_tile.parent && target_tile.parent.group_processing) + target_tile.parent.suspend_group_processing() + + var/datum/gas_mixture/napalm = new + + napalm.toxins = created_volume + napalm.temperature = 400+T0C + + target_tile.assume_air(napalm) + spawn (0) target_tile.hotspot_expose(700, 400) + holder.del_reagent("napalm") + return + + /* + smoke + name = "Smoke" + id = "smoke" + result = null + required_reagents = list("potassium" = 1, "sugar" = 1, "phosphorus" = 1 ) + result_amount = null + secondary = 1 + on_reaction(var/datum/reagents/holder, var/created_volume) + var/location = get_turf(holder.my_atom) + var/datum/effect/system/bad_smoke_spread/S = new /datum/effect/system/bad_smoke_spread + S.attach(location) + S.set_up(10, 0, location) + playsound(location, 'sound/effects/smoke.ogg', 50, 1, -3) + spawn(0) + S.start() + sleep(10) + S.start() + sleep(10) + S.start() + sleep(10) + S.start() + sleep(10) + S.start() + holder.clear_reagents() + return */ + + chemsmoke + name = "Chemsmoke" + id = "chemsmoke" + result = null + required_reagents = list("potassium" = 1, "sugar" = 1, "phosphorus" = 1) + result_amount = null + secondary = 1 + on_reaction(var/datum/reagents/holder, var/created_volume) + var/location = get_turf(holder.my_atom) + var/datum/effect/effect/system/chem_smoke_spread/S = new /datum/effect/effect/system/chem_smoke_spread + S.attach(location) + S.set_up(holder, 10, 0, location) + playsound(location, 'sound/effects/smoke.ogg', 50, 1, -3) + spawn(0) + S.start() + sleep(10) + S.start() + holder.clear_reagents() + return + + chloralhydrate + name = "Chloral Hydrate" + id = "chloralhydrate" + result = "chloralhydrate" + required_reagents = list("ethanol" = 1, "chlorine" = 3, "water" = 1) + result_amount = 1 + + zombiepowder + name = "Zombie Powder" + id = "zombiepowder" + result = "zombiepowder" + required_reagents = list("carpotoxin" = 5, "stoxin" = 5, "copper" = 5) + result_amount = 2 + + LSD + name = "LSD" + id = "LSD" + result = "LSD" + required_reagents = list("silicon" = 1, "hydrogen" = 1, "anti_toxin" = 1) + result_amount = 5 + + lipozine + name = "Lipozine" + id = "Lipozine" + result = "lipozine" + required_reagents = list("sodiumchloride" = 1, "ethanol" = 1, "radium" = 1) + result_amount = 3 + + plasmasolidification + name = "Solid Plasma" + id = "solidplasma" + result = null + required_reagents = list("iron" = 5, "frostoil" = 5, "plasma" = 20) + result_amount = 1 + on_reaction(var/datum/reagents/holder, var/created_volume) + var/location = get_turf(holder.my_atom) + new /obj/item/stack/sheet/plasma(location) + return + +/////////////////////////////////////////////////////////////////////////////////// + +// foam and foam precursor + + surfactant + name = "Foam surfactant" + id = "foam surfactant" + result = "fluorosurfactant" + required_reagents = list("fluorine" = 2, "carbon" = 2, "sacid" = 1) + result_amount = 5 + + + foam + name = "Foam" + id = "foam" + result = null + required_reagents = list("fluorosurfactant" = 1, "water" = 1) + result_amount = 2 + + on_reaction(var/datum/reagents/holder, var/created_volume) + + + var/location = get_turf(holder.my_atom) + for(var/mob/M in viewers(5, location)) + M << "\red The solution violently bubbles!" + + location = get_turf(holder.my_atom) + + for(var/mob/M in viewers(5, location)) + M << "\red The solution spews out foam!" + + //world << "Holder volume is [holder.total_volume]" + //for(var/datum/reagent/R in holder.reagent_list) + // world << "[R.name] = [R.volume]" + + var/datum/effect/effect/system/foam_spread/s = new() + s.set_up(created_volume, location, holder, 0) + s.start() + holder.clear_reagents() + return + + metalfoam + name = "Metal Foam" + id = "metalfoam" + result = null + required_reagents = list("aluminum" = 3, "foaming_agent" = 1, "pacid" = 1) + result_amount = 5 + + on_reaction(var/datum/reagents/holder, var/created_volume) + + + var/location = get_turf(holder.my_atom) + + for(var/mob/M in viewers(5, location)) + M << "\red The solution spews out a metalic foam!" + + var/datum/effect/effect/system/foam_spread/s = new() + s.set_up(created_volume, location, holder, 1) + s.start() + return + + ironfoam + name = "Iron Foam" + id = "ironlfoam" + result = null + required_reagents = list("iron" = 3, "foaming_agent" = 1, "pacid" = 1) + result_amount = 5 + + on_reaction(var/datum/reagents/holder, var/created_volume) + + + var/location = get_turf(holder.my_atom) + + for(var/mob/M in viewers(5, location)) + M << "\red The solution spews out a metalic foam!" + + var/datum/effect/effect/system/foam_spread/s = new() + s.set_up(created_volume, location, holder, 2) + s.start() + return + + + + foaming_agent + name = "Foaming Agent" + id = "foaming_agent" + result = "foaming_agent" + required_reagents = list("lithium" = 1, "hydrogen" = 1) + result_amount = 1 + + // Synthesizing these three chemicals is pretty complex in real life, but fuck it, it's just a game! + ammonia + name = "Ammonia" + id = "ammonia" + result = "ammonia" + required_reagents = list("hydrogen" = 3, "nitrogen" = 1) + result_amount = 3 + + diethylamine + name = "Diethylamine" + id = "diethylamine" + result = "diethylamine" + required_reagents = list ("ammonia" = 1, "ethanol" = 1) + result_amount = 2 + + space_cleaner + name = "Space cleaner" + id = "cleaner" + result = "cleaner" + required_reagents = list("ammonia" = 1, "water" = 1) + result_amount = 2 + + plantbgone + name = "Plant-B-Gone" + id = "plantbgone" + result = "plantbgone" + required_reagents = list("toxin" = 1, "water" = 4) + result_amount = 5 + + +/////////////////////////////////////METROID CORE REACTIONS /////////////////////////////// + + metroidpepper + name = "Metroid Condensedcapaicin" + id = "m_condensedcapaicin" + result = "condensedcapsaicin" + required_reagents = list("sugar" = 1) + result_amount = 1 + required_container = /obj/item/metroid_core + required_other = 1 + metroidfrost + name = "Metroid Frost Oil" + id = "m_frostoil" + result = "frostoil" + required_reagents = list("water" = 1) + result_amount = 1 + required_container = /obj/item/metroid_core + required_other = 1 + metroidglycerol + name = "Metroid Glycerol" + id = "m_glycerol" + result = "glycerol" + required_reagents = list("blood" = 1) + result_amount = 1 + required_container = /obj/item/metroid_core + required_other = 1 + + metroid_explosion + name = "Metroid Explosion" + id = "m_explosion" + result = null + required_reagents = list("blood" = 1) + result_amount = 2 + required_container = /obj/item/metroid_core + required_other = 2 + on_reaction(var/datum/reagents/holder, var/created_volume) + var/location = get_turf(holder.my_atom) + var/datum/effect/effect/system/reagents_explosion/e = new() + e.set_up(round (created_volume/10, 1), location, 0, 0) + e.start() + + holder.clear_reagents() + return + metroidjam + name = "Metroid Jam" + id = "m_jam" + result = "metroid" + required_reagents = list("water" = 1) + result_amount = 1 + required_container = /obj/item/metroid_core + required_other = 2 + metroidsynthi + name = "Metroid Synthetic Flesh" + id = "m_flesh" + result = null + required_reagents = list("sugar" = 1) + result_amount = 1 + required_container = /obj/item/metroid_core + required_other = 2 + on_reaction(var/datum/reagents/holder, var/created_volume) + var/location = get_turf(holder.my_atom) + new /obj/item/weapon/reagent_containers/food/snacks/meat/syntiflesh(location) + return + + metroidenzyme + name = "Metroid Enzyme" + id = "m_enzyme" + result = "enzyme" + required_reagents = list("blood" = 1, "water" = 1) + result_amount = 2 + required_container = /obj/item/metroid_core + required_other = 3 + metroidplasma + name = "Metroid Plasma" + id = "m_plasma" + result = "plasma" + required_reagents = list("sugar" = 1, "blood" = 2) + result_amount = 2 + required_container = /obj/item/metroid_core + required_other = 3 + metroidvirus + name = "Metroid Virus" + id = "m_virus" + result = null + required_reagents = list("sugar" = 1, "sacid" = 1) + result_amount = 2 + required_container = /obj/item/metroid_core + required_other = 3 + on_reaction(var/datum/reagents/holder, var/created_volume) + holder.clear_reagents() + + var/virus = pick(/datum/disease/flu, /datum/disease/cold, \ + /datum/disease/pierrot_throat, /datum/disease/fake_gbs, \ + /datum/disease/brainrot, /datum/disease/magnitis) + + + var/datum/disease/F = new virus(0) + var/list/data = list("viruses"= list(F)) + holder.add_reagent("blood", 20, data) + + holder.add_reagent("cyanide", rand(1,10)) + + return + + metroidteleport + name = "Metroid Teleport" + id = "m_tele" + result = null + required_reagents = list("pacid" = 2, "mutagen" = 2) + required_catalysts = list("plasma" = 1) + result_amount = 1 + required_container = /obj/item/metroid_core + required_other = 4 + on_reaction(var/datum/reagents/holder, var/created_volume) + + // Calculate new position (searches through beacons in world) + var/obj/item/device/radio/beacon/chosen + var/list/possible = list() + for(var/obj/item/device/radio/beacon/W in world) + possible += W + + if(possible.len > 0) + chosen = pick(possible) + + if(chosen) + // Calculate previous position for transition + + var/turf/FROM = get_turf_loc(holder.my_atom) // the turf of origin we're travelling FROM + var/turf/TO = get_turf_loc(chosen) // the turf of origin we're travelling TO + + playsound(TO, 'sound/effects/phasein.ogg', 100, 1) + + var/list/flashers = list() + for(var/mob/living/carbon/human/M in viewers(TO, null)) + if(M:eyecheck() <= 0) + flick("e_flash", M.flash) // flash dose faggots + flashers += M + + var/y_distance = TO.y - FROM.y + var/x_distance = TO.x - FROM.x + for (var/atom/movable/A in range(2, FROM )) // iterate thru list of mobs in the area + if(istype(A, /obj/item/device/radio/beacon)) continue // don't teleport beacons because that's just insanely stupid + if( A.anchored && !istype(A, /mob/dead/observer) ) continue // don't teleport anchored things (computers, tables, windows, grilles, etc) because this causes problems! + // do teleport ghosts however because hell why not + + var/turf/newloc = locate(A.x + x_distance, A.y + y_distance, TO.z) // calculate the new place + if(!A.Move(newloc)) // if the atom, for some reason, can't move, FORCE them to move! :) We try Move() first to invoke any movement-related checks the atom needs to perform after moving + A.loc = locate(A.x + x_distance, A.y + y_distance, TO.z) + + spawn() + if(ismob(A) && !(A in flashers)) // don't flash if we're already doing an effect + var/mob/M = A + if(M.client) + var/obj/blueeffect = new /obj(src) + blueeffect.screen_loc = "WEST,SOUTH to EAST,NORTH" + blueeffect.icon = 'icons/effects/effects.dmi' + blueeffect.icon_state = "shieldsparkles" + blueeffect.layer = 17 + blueeffect.mouse_opacity = 0 + M.client.screen += blueeffect + sleep(20) + M.client.screen -= blueeffect + del(blueeffect) + metroidcrit + name = "Metroid Crit" + id = "m_tele" + result = null + required_reagents = list("sacid" = 1, "blood" = 1) + required_catalysts = list("plasma" = 1, "mutagen" = 1) + result_amount = 1 + required_container = /obj/item/metroid_core + required_other = 4 + on_reaction(var/datum/reagents/holder, var/created_volume) + + var/list/critters = typesof(/obj/effect/critter) - /obj/effect/critter // list of possible critters + + playsound(get_turf_loc(holder.my_atom), 'sound/effects/phasein.ogg', 100, 1) + + for(var/mob/living/carbon/human/M in viewers(get_turf_loc(holder.my_atom), null)) + if(M:eyecheck() <= 0) + flick("e_flash", M.flash) + + for(var/i = 1, i <= created_volume, i++) + var/chosen = pick(critters) + var/obj/effect/critter/C = new chosen + C.loc = get_turf_loc(holder.my_atom) + if(prob(50)) + for(var/j = 1, j <= rand(1, 3), j++) + step(C, pick(NORTH,SOUTH,EAST,WEST)) + metroidbork + name = "Metroid Bork" + id = "m_tele" + result = null + required_reagents = list("sugar" = 1, "water" = 1) + result_amount = 2 + required_container = /obj/item/metroid_core + required_other = 4 + on_reaction(var/datum/reagents/holder, var/created_volume) + + var/list/borks = typesof(/obj/item/weapon/reagent_containers/food/snacks) - /obj/item/weapon/reagent_containers/food/snacks + // BORK BORK BORK + + playsound(get_turf_loc(holder.my_atom), 'sound/effects/phasein.ogg', 100, 1) + + for(var/mob/living/carbon/human/M in viewers(get_turf_loc(holder.my_atom), null)) + if(M:eyecheck() <= 0) + flick("e_flash", M.flash) + + for(var/i = 1, i <= created_volume + rand(1,2), i++) + var/chosen = pick(borks) + var/obj/B = new chosen + if(B) + B.loc = get_turf_loc(holder.my_atom) + if(prob(50)) + for(var/j = 1, j <= rand(1, 3), j++) + step(B, pick(NORTH,SOUTH,EAST,WEST)) + + + + metroidchloral + name = "Metroid Chloral" + id = "m_bunch" + result = "chloralhydrate" + required_reagents = list("blood" = 1, "water" = 2) + result_amount = 2 + required_container = /obj/item/metroid_core + required_other = 5 + metroidretro + name = "Metroid Retro" + id = "m_xeno" + result = null + required_reagents = list("sugar" = 1) + result_amount = 1 + required_container = /obj/item/metroid_core + required_other = 5 + on_reaction(var/datum/reagents/holder, var/created_volume) + var/datum/disease/F = new /datum/disease/dna_retrovirus(0) + var/list/data = list("viruses"= list(F)) + holder.add_reagent("blood", 20, data) + metroidfoam + name = "Metroid Foam" + id = "m_foam" + result = null + required_reagents = list("sacid" = 1) + result_amount = 2 + required_container = /obj/item/metroid_core + required_other = 5 + + on_reaction(var/datum/reagents/holder, var/created_volume) + + + var/location = get_turf(holder.my_atom) + for(var/mob/M in viewers(5, location)) + M << "\red The solution violently bubbles!" + + location = get_turf(holder.my_atom) + + for(var/mob/M in viewers(5, location)) + M << "\red The solution spews out foam!" + + //world << "Holder volume is [holder.total_volume]" + //for(var/datum/reagent/R in holder.reagent_list) + // world << "[R.name] = [R.volume]" + + var/datum/effect/effect/system/foam_spread/s = new() + s.set_up(created_volume, location, holder, 0) + s.start() + holder.clear_reagents() + return + + + + + + + + + +//////////////////////////////////////////FOOD MIXTURES//////////////////////////////////// + + tofu + name = "Tofu" + id = "tofu" + result = null + required_reagents = list("soymilk" = 10) + required_catalysts = list("enzyme" = 5) + result_amount = 1 + on_reaction(var/datum/reagents/holder, var/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/tofu(location) + return + + chocolate_bar + name = "Chocolate Bar" + id = "chocolate_bar" + result = null + required_reagents = list("soymilk" = 2, "coco" = 2, "sugar" = 2) + result_amount = 1 + on_reaction(var/datum/reagents/holder, var/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/chocolatebar(location) + return + + chocolate_bar2 + name = "Chocolate Bar" + id = "chocolate_bar" + result = null + required_reagents = list("milk" = 2, "coco" = 2, "sugar" = 2) + result_amount = 1 + on_reaction(var/datum/reagents/holder, var/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/chocolatebar(location) + return + + hot_coco + name = "Hot Coco" + id = "hot_coco" + result = "hot_coco" + required_reagents = list("water" = 5, "coco" = 1) + result_amount = 5 + + soysauce + name = "Soy Sauce" + id = "soysauce" + result = "soysauce" + required_reagents = list("soymilk" = 4, "sacid" = 1) + result_amount = 5 + + cheesewheel + name = "Cheesewheel" + id = "cheesewheel" + result = null + required_reagents = list("milk" = 40) + required_catalysts = list("enzyme" = 5) + result_amount = 1 + on_reaction(var/datum/reagents/holder, var/created_volume) + var/location = get_turf(holder.my_atom) + new /obj/item/weapon/reagent_containers/food/snacks/sliceable/cheesewheel(location) + return + + syntiflesh + name = "Syntiflesh" + id = "syntiflesh" + result = null + required_reagents = list("blood" = 5, "clonexadone" = 1) + result_amount = 1 + on_reaction(var/datum/reagents/holder, var/created_volume) + var/location = get_turf(holder.my_atom) + new /obj/item/weapon/reagent_containers/food/snacks/meat/syntiflesh(location) + return + + hot_ramen + name = "Hot Ramen" + id = "hot_ramen" + result = "hot_ramen" + required_reagents = list("water" = 1, "dry_ramen" = 3) + result_amount = 3 + + hell_ramen + name = "Hell Ramen" + id = "hell_ramen" + result = "hell_ramen" + required_reagents = list("capsaicin" = 1, "hot_ramen" = 6) + result_amount = 6 + + +////////////////////////////////////////// COCKTAILS ////////////////////////////////////// + + + goldschlager + name = "Goldschlager" + id = "goldschlager" + result = "goldschlager" + required_reagents = list("vodka" = 10, "gold" = 1) + result_amount = 10 + + patron + name = "Patron" + id = "patron" + result = "patron" + required_reagents = list("tequilla" = 10, "silver" = 1) + result_amount = 10 + + bilk + name = "Bilk" + id = "bilk" + result = "bilk" + required_reagents = list("milk" = 1, "beer" = 1) + result_amount = 2 + + icetea + name = "Iced Tea" + id = "icetea" + result = "icetea" + required_reagents = list("ice" = 1, "tea" = 3) + result_amount = 4 + + icecoffee + name = "Iced Coffee" + id = "icecoffee" + result = "icecoffee" + required_reagents = list("ice" = 1, "coffee" = 3) + result_amount = 4 + + nuka_cola + name = "Nuka Cola" + id = "nuka_cola" + result = "nuka_cola" + required_reagents = list("uranium" = 1, "cola" = 6) + result_amount = 6 + + moonshine + name = "Moonshine" + id = "moonshine" + result = "moonshine" + required_reagents = list("nutriment" = 10) + required_catalysts = list("enzyme" = 5) + result_amount = 10 + + wine + name = "Wine" + id = "wine" + result = "wine" + required_reagents = list("berryjuice" = 10) + required_catalysts = list("enzyme" = 5) + result_amount = 10 + + vodka + name = "Vodka" + id = "vodka" + result = "vodka" + required_reagents = list("potato" = 10) + required_catalysts = list("enzyme" = 5) + result_amount = 10 + + kahlua + name = "Kahlua" + id = "kahlua" + result = "kahlua" + required_reagents = list("coffee" = 5, "sugar" = 5) + required_catalysts = list("enzyme" = 5) + result_amount = 5 + + gin_tonic + name = "Gin and Tonic" + id = "gintonic" + result = "gintonic" + required_reagents = list("gin" = 2, "tonic" = 1) + result_amount = 3 + + cuba_libre + name = "Cuba Libre" + id = "cubalibre" + result = "cubalibre" + required_reagents = list("rum" = 2, "cola" = 1) + result_amount = 3 + + martini + name = "Classic Martini" + id = "martini" + result = "martini" + required_reagents = list("gin" = 2, "vermouth" = 1) + result_amount = 3 + + vodkamartini + name = "Vodka Martini" + id = "vodkamartini" + result = "vodkamartini" + required_reagents = list("vodka" = 2, "vermouth" = 1) + result_amount = 3 + + white_russian + name = "White Russian" + id = "whiterussian" + result = "whiterussian" + required_reagents = list("blackrussian" = 3, "cream" = 2) + result_amount = 5 + + whiskey_cola + name = "Whiskey Cola" + id = "whiskeycola" + result = "whiskeycola" + required_reagents = list("whiskey" = 2, "cola" = 1) + result_amount = 3 + + screwdriver + name = "Screwdriver" + id = "screwdrivercocktail" + result = "screwdrivercocktail" + required_reagents = list("vodka" = 2, "orangejuice" = 1) + result_amount = 3 + + bloody_mary + name = "Bloody Mary" + id = "bloodymary" + result = "bloodymary" + required_reagents = list("vodka" = 1, "tomatojuice" = 2, "limejuice" = 1) + result_amount = 4 + + gargle_blaster + name = "Pan-Galactic Gargle Blaster" + id = "gargleblaster" + result = "gargleblaster" + required_reagents = list("vodka" = 1, "gin" = 1, "whiskey" = 1, "cognac" = 1, "limejuice" = 1) + result_amount = 5 + + brave_bull + name = "Brave Bull" + id = "bravebull" + result = "bravebull" + required_reagents = list("tequilla" = 2, "kahlua" = 1) + result_amount = 3 + + tequilla_sunrise + name = "Tequilla Sunrise" + id = "tequillasunrise" + result = "tequillasunrise" + required_reagents = list("tequilla" = 2, "orangejuice" = 1) + result_amount = 3 + + toxins_special + name = "Toxins Special" + id = "toxinsspecial" + result = "toxinsspecial" + required_reagents = list("rum" = 2, "vermouth" = 1, "plasma" = 2) + result_amount = 5 + + beepsky_smash + name = "Beepksy Smash" + id = "beepksysmash" + result = "beepskysmash" + required_reagents = list("limejuice" = 2, "whiskey" = 2, "iron" = 1) + result_amount = 4 + + doctor_delight + name = "The Doctor's Delight" + id = "doctordelight" + result = "doctorsdelight" + required_reagents = list("limejuice" = 1, "tomatojuice" = 1, "orangejuice" = 1, "cream" = 1) + result_amount = 4 + + irish_cream + name = "Irish Cream" + id = "irishcream" + result = "irishcream" + required_reagents = list("whiskey" = 2, "cream" = 1) + result_amount = 3 + + manly_dorf + name = "The Manly Dorf" + id = "manlydorf" + result = "manlydorf" + required_reagents = list ("beer" = 1, "ale" = 2) + result_amount = 3 + + hooch + name = "Hooch" + id = "hooch" + result = "hooch" + required_reagents = list ("sugar" = 1, "ethanol" = 2, "fuel" = 1) + result_amount = 3 + + irish_coffee + name = "Irish Coffee" + id = "irishcoffee" + result = "irishcoffee" + required_reagents = list("irishcream" = 1, "coffee" = 1) + result_amount = 2 + + b52 + name = "B-52" + id = "b52" + result = "b52" + required_reagents = list("irishcream" = 1, "kahlua" = 1, "cognac" = 1) + result_amount = 3 + + atomicbomb + name = "Atomic Bomb" + id = "atomicbomb" + result = "atomicbomb" + required_reagents = list("b52" = 10, "uranium" = 1) + result_amount = 10 + + margarita + name = "Margarita" + id = "margarita" + result = "margarita" + required_reagents = list("tequilla" = 2, "limejuice" = 1) + result_amount = 3 + + longislandicedtea + name = "Long Island Iced Tea" + id = "longislandicedtea" + result = "longislandicedtea" + required_reagents = list("vodka" = 1, "gin" = 1, "tequilla" = 1, "cubalibre" = 1) + result_amount = 4 + + threemileisland + name = "Three Mile Island Iced Tea" + id = "threemileisland" + result = "threemileisland" + required_reagents = list("longislandicedtea" = 10, "uranium" = 1) + result_amount = 10 + + whiskeysoda + name = "Whiskey Soda" + id = "whiskeysoda" + result = "whiskeysoda" + required_reagents = list("whiskey" = 2, "sodawater" = 1) + result_amount = 3 + + black_russian + name = "Black Russian" + id = "blackrussian" + result = "blackrussian" + required_reagents = list("vodka" = 3, "kahlua" = 2) + result_amount = 5 + + manhattan + name = "Manhattan" + id = "manhattan" + result = "manhattan" + required_reagents = list("whiskey" = 2, "vermouth" = 1) + result_amount = 3 + + manhattan_proj + name = "Manhattan Project" + id = "manhattan_proj" + result = "manhattan_proj" + required_reagents = list("manhattan" = 10, "uranium" = 1) + result_amount = 10 + + vodka_tonic + name = "Vodka and Tonic" + id = "vodkatonic" + result = "vodkatonic" + required_reagents = list("vodka" = 2, "tonic" = 1) + result_amount = 3 + + gin_fizz + name = "Gin Fizz" + id = "ginfizz" + result = "ginfizz" + required_reagents = list("gin" = 2, "sodawater" = 1, "limejuice" = 1) + result_amount = 4 + + bahama_mama + name = "Bahama mama" + id = "bahama_mama" + result = "bahama_mama" + required_reagents = list("rum" = 2, "orangejuice" = 2, "limejuice" = 1, "ice" = 1) + result_amount = 6 + + singulo + name = "Singulo" + id = "singulo" + result = "singulo" + required_reagents = list("vodka" = 5, "radium" = 1, "wine" = 5) + result_amount = 10 + + alliescocktail + name = "Allies Cocktail" + id = "alliescocktail" + result = "alliescocktail" + required_reagents = list("martini" = 1, "vodka" = 1) + result_amount = 2 + + demonsblood + name = "Demons Blood" + id = "demonsblood" + result = "demonsblood" + required_reagents = list("rum" = 1, "spacemountainwind" = 1, "blood" = 1, "dr_gibb" = 1) + result_amount = 4 + + booger + name = "Booger" + id = "booger" + result = "booger" + required_reagents = list("cream" = 1, "banana" = 1, "rum" = 1, "watermelonjuice" = 1) + result_amount = 4 + + antifreeze + name = "Anti-freeze" + id = "antifreeze" + result = "antifreeze" + required_reagents = list("vodka" = 2, "cream" = 1, "ice" = 1) + result_amount = 4 + + barefoot + name = "Barefoot" + id = "barefoot" + result = "barefoot" + required_reagents = list("berryjuice" = 1, "cream" = 1, "vermouth" = 1) + result_amount = 3 + + +////DRINKS THAT REQUIRED IMPROVED SPRITES BELOW:: -Agouri///// + + sbiten + name = "Sbiten" + id = "sbiten" + result = "sbiten" + required_reagents = list("vodka" = 10, "capsaicin" = 1) + result_amount = 10 + + red_mead + name = "Red Mead" + id = "red_mead" + result = "red_mead" + required_reagents = list("blood" = 1, "mead" = 1) + result_amount = 2 + + mead + name = "Mead" + id = "mead" + result = "mead" + required_reagents = list("sugar" = 1, "water" = 1) + required_catalysts = list("enzyme" = 5) + result_amount = 2 + + iced_beer + name = "Iced Beer" + id = "iced_beer" + result = "iced_beer" + required_reagents = list("beer" = 10, "frostoil" = 1) + result_amount = 10 + + iced_beer2 + name = "Iced Beer" + id = "iced_beer" + result = "iced_beer" + required_reagents = list("beer" = 5, "ice" = 1) + result_amount = 6 + + grog + name = "Grog" + id = "grog" + result = "grog" + required_reagents = list("rum" = 1, "water" = 1) + result_amount = 2 + + soy_latte + name = "Soy Latte" + id = "soy_latte" + result = "soy_latte" + required_reagents = list("coffee" = 1, "soymilk" = 1) + result_amount = 2 + + cafe_latte + name = "Cafe Latte" + id = "cafe_latte" + result = "cafe_latte" + required_reagents = list("coffee" = 1, "milk" = 1) + result_amount = 2 + + acidspit + name = "Acid Spit" + id = "acidspit" + result = "acidspit" + required_reagents = list("sacid" = 1, "wine" = 5) + result_amount = 6 + + amasec + name = "Amasec" + id = "amasec" + result = "amasec" + required_reagents = list("iron" = 1, "wine" = 5, "vodka" = 5) + result_amount = 10 + + changelingsting + name = "Changeling Sting" + id = "changelingsting" + result = "changelingsting" + required_reagents = list("orangejuice" = 1, "limejuice" = 1, "lemonjuice" = 1, "vodka" = 1) + result_amount = 4 + + aloe + name = "Aloe" + id = "aloe" + result = "aloe" + required_reagents = list("cream" = 1, "whiskey" = 1, "watermelonjuice" = 1) + result_amount = 2 + + andalusia + name = "Andalusia" + id = "andalusia" + result = "andalusia" + required_reagents = list("rum" = 1, "whiskey" = 1, "lemonjuice" = 1) + result_amount = 3 + + neurotoxin + name = "Neurotoxin" + id = "neurotoxin" + result = "neurotoxin" + required_reagents = list("gargleblaster" = 1, "stoxin" = 1) + result_amount = 2 + + snowwhite + name = "Snow White" + id = "snowwhite" + result = "snowwhite" + required_reagents = list("beer" = 1, "lemon_lime" = 1) + result_amount = 2 + + irishcarbomb + name = "Irish Car Bomb" + id = "irishcarbomb" + result = "irishcarbomb" + required_reagents = list("ale" = 1, "irishcream" = 1) + result_amount = 2 + + syndicatebomb + name = "Syndicate Bomb" + id = "syndicatebomb" + result = "syndicatebomb" + required_reagents = list("beer" = 1, "whiskeycola" = 1) + result_amount = 2 + + erikasurprise + name = "Erika Surprise" + id = "erikasurprise" + result = "erikasurprise" + required_reagents = list("ale" = 1, "limejuice" = 1, "whiskey" = 1, "banana" = 1, "ice" = 1) + result_amount = 5 + + devilskiss + name = "Devils Kiss" + id = "devilskiss" + result = "devilskiss" + required_reagents = list("blood" = 1, "kahlua" = 1, "rum" = 1) + result_amount = 3 + + hippiesdelight + name = "Hippies Delight" + id = "hippiesdelight" + result = "hippiesdelight" + required_reagents = list("psilocybin" = 1, "gargleblaster" = 1) + result_amount = 2 + + bananahonk + name = "Banana Honk" + id = "bananahonk" + result = "bananahonk" + required_reagents = list("banana" = 1, "cream" = 1, "sugar" = 1) + result_amount = 3 + + silencer + name = "Silencer" + id = "silencer" + result = "silencer" + required_reagents = list("nothing" = 1, "cream" = 1, "sugar" = 1) + result_amount = 3 + + driestmartini + name = "Driest Martini" + id = "driestmartini" + result = "driestmartini" + required_reagents = list("nothing" = 1, "gin" = 1) + result_amount = 2 + diff --git a/code/modules/reagents/grenade_launcher.dm b/code/modules/reagents/grenade_launcher.dm new file mode 100644 index 00000000000..0ee9962e908 --- /dev/null +++ b/code/modules/reagents/grenade_launcher.dm @@ -0,0 +1,66 @@ + + +/obj/item/weapon/gun/grenadelauncher + name = "grenade launcher" + icon = 'icons/obj/gun.dmi' + icon_state = "riotgun" + item_state = "riotgun" + w_class = 4.0 + throw_speed = 2 + throw_range = 10 + force = 5.0 + var/list/grenades = new/list() + var/max_grenades = 3 + m_amt = 2000 + + examine() + set src in view() + ..() + if (!(usr in view(2)) && usr!=src.loc) return + usr << "\icon [src] Grenade launcher:" + usr << "\blue [grenades] / [max_grenades] Grenades." + + attackby(obj/item/I as obj, mob/user as mob) + + if((istype(I, /obj/item/weapon/grenade))) + if(grenades.len < max_grenades) + user.drop_item() + I.loc = src + grenades += I + user << "\blue You put the grenade in the grenade launcher." + user << "\blue [grenades.len] / [max_grenades] Grenades." + else + usr << "\red The grenade launcher cannot hold more grenades." + + afterattack(obj/target, mob/user , flag) + + if (istype(target, /obj/item/weapon/storage/backpack )) + return + + else if (locate (/obj/structure/table, src.loc)) + return + + else if(target == user) + return + + if(grenades.len) + spawn(0) fire_grenade(target,user) + else + usr << "\red The grenade launcher is empty." + + proc + fire_grenade(atom/target, mob/user) + for(var/mob/O in viewers(world.view, user)) + O.show_message(text("\red [] fired a grenade!", user), 1) + user << "\red You fire the grenade launcher!" + var/obj/item/weapon/grenade/chem_grenade/F = grenades[1] //Now with less copypasta! + grenades -= F + F.loc = user.loc + F.throw_at(target, 30, 2) + message_admins("[key_name_admin(user)] fired a grenade ([F.name]) from a grenade launcher ([src.name]).") + log_game("[key_name_admin(user)] used a grenade ([src.name]).") + F.active = 1 + F.icon_state = initial(icon_state) + "_active" + playsound(user.loc, 'armbomb.ogg', 75, 1, -3) + spawn(15) + F.prime() \ No newline at end of file diff --git a/code/modules/reagents/reagent_containers.dm b/code/modules/reagents/reagent_containers.dm new file mode 100644 index 00000000000..13d023336fc --- /dev/null +++ b/code/modules/reagents/reagent_containers.dm @@ -0,0 +1,45 @@ +/obj/item/weapon/reagent_containers + name = "Container" + desc = "..." + icon = 'icons/obj/chemical.dmi' + icon_state = null + w_class = 1 + var/amount_per_transfer_from_this = 5 + var/possible_transfer_amounts = list(5,10,15,25,30) + var/volume = 30 + +/obj/item/weapon/reagent_containers/verb/set_APTFT() //set amount_per_transfer_from_this + set name = "Set transfer amount" + set category = "Object" + set src in range(0) + var/N = input("Amount per transfer from this:","[src]") as null|anything in possible_transfer_amounts + if (N) + amount_per_transfer_from_this = N + +/obj/item/weapon/reagent_containers/New() + ..() + if (!possible_transfer_amounts) + src.verbs -= /obj/item/weapon/reagent_containers/verb/set_APTFT + var/datum/reagents/R = new/datum/reagents(volume) + reagents = R + R.my_atom = src + +/obj/item/weapon/reagent_containers/attack_self(mob/user as mob) + return + +/obj/item/weapon/reagent_containers/attack(mob/M as mob, mob/user as mob, def_zone) + return + +/obj/item/weapon/reagent_containers/attackby(obj/item/I as obj, mob/user as mob) + return + +/obj/item/weapon/reagent_containers/afterattack(obj/target, mob/user , flag) + return + +/obj/item/weapon/reagent_containers/proc/reagentlist(var/obj/item/weapon/reagent_containers/snack) //Attack logs for regents in pills + var/data + if(snack.reagents.reagent_list && snack.reagents.reagent_list.len) //find a reagent list if there is and check if it has entries + for (var/datum/reagent/R in snack.reagents.reagent_list) //no reagents will be left behind + data += "[R.id]([R.volume] units); " //Using IDs because SOME chemicals(I'm looking at you, chlorhydrate-beer) have the same names as other chemicals. + return data + else return "No reagents" \ No newline at end of file diff --git a/code/modules/reagents/reagent_containers/borghydro.dm b/code/modules/reagents/reagent_containers/borghydro.dm new file mode 100644 index 00000000000..50fe47b800e --- /dev/null +++ b/code/modules/reagents/reagent_containers/borghydro.dm @@ -0,0 +1,93 @@ + + +/obj/item/weapon/reagent_containers/borghypo + name = "Cyborg Hypospray" + desc = "An advanced chemical synthesizer and injection system, designed for heavy-duty medical equipment." + icon = 'icons/obj/syringe.dmi' + item_state = "hypo" + icon_state = "borghypo" + amount_per_transfer_from_this = 5 + volume = 30 + possible_transfer_amounts = null + flags = FPRINT + var/mode = 1 + var/charge_cost = 50 + var/charge_tick = 0 + var/recharge_time = 5 //Time it takes for shots to recharge (in seconds) + + New() + ..() + processing_objects.Add(src) + + + Del() + processing_objects.Remove(src) + ..() + + process() //Every [recharge_time] seconds, recharge some reagents for the cyborg + charge_tick++ + if(charge_tick < recharge_time) return 0 + charge_tick = 0 + + if(isrobot(src.loc)) + var/mob/living/silicon/robot/R = src.loc + if(R && R.cell) + if(mode == 1 && reagents.total_volume < 30) //Don't recharge reagents and drain power if the storage is full. + R.cell.use(charge_cost) //Take power from borg... + reagents.add_reagent("tricordrazine",5) //And fill hypo with reagent. + if(mode == 2 && reagents.total_volume < 30) + R.cell.use(charge_cost) + reagents.add_reagent("inaprovaline", 5) + if(mode == 3 && reagents.total_volume < 30) + R.cell.use(charge_cost) + reagents.add_reagent("spaceacillin", 5) + //update_icon() + return 1 + +/obj/item/weapon/reagent_containers/borghypo/attack(mob/M as mob, mob/user as mob) + if(!reagents.total_volume) + user << "\red The injector is empty." + return + if (!( istype(M, /mob) )) + return + if (reagents.total_volume) + user << "\blue You inject [M] with the injector." + M << "\red You feel a tiny prick!" + + src.reagents.reaction(M, INGEST) + if(M.reagents) + var/trans = reagents.trans_to(M, amount_per_transfer_from_this) + user << "\blue [trans] units injected. [reagents.total_volume] units remaining." + return + +/obj/item/weapon/reagent_containers/borghypo/attack_self(mob/user as mob) + playsound(src.loc, 'pop.ogg', 50, 0) //Change the mode + if(mode == 1) + mode = 2 + charge_tick = 0 //Prevents wasted chems/cell charge if you're cycling through modes. + reagents.clear_reagents() //Flushes whatever was in the storage previously, so you don't get chems all mixed up. + user << "\blue Synthesizer is now producing 'Inaprovaline'." + return + if(mode == 2) + mode = 3 + charge_tick = 0 + reagents.clear_reagents() + user << "\blue Synthesizer is now producing 'Spaceacillin'." + return + if(mode == 3) + mode = 1 + charge_tick = 0 + reagents.clear_reagents() + user << "\blue Synthesizer is now producing 'Tricordrazine'." + return + +/obj/item/weapon/reagent_containers/borghypo/examine() + set src in view() + ..() + if (!(usr in view(2)) && usr!=src.loc) return + + if(reagents && reagents.reagent_list.len) + for(var/datum/reagent/R in reagents.reagent_list) + usr << "\blue It currently has [R.volume] units of [R.name] stored." + else + usr << "\blue 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/dropper.dm b/code/modules/reagents/reagent_containers/dropper.dm new file mode 100644 index 00000000000..fc18d449ebb --- /dev/null +++ b/code/modules/reagents/reagent_containers/dropper.dm @@ -0,0 +1,93 @@ +//////////////////////////////////////////////////////////////////////////////// +/// Droppers. +//////////////////////////////////////////////////////////////////////////////// +/obj/item/weapon/reagent_containers/dropper + name = "Dropper" + desc = "A dropper. Transfers 5 units." + icon = 'icons/obj/chemical.dmi' + icon_state = "dropper0" + amount_per_transfer_from_this = 5 + possible_transfer_amounts = list(1,2,3,4,5) + volume = 5 + var/filled = 0 + + afterattack(obj/target, mob/user , flag) + if(!target.reagents) return + + if(filled) + + if(target.reagents.total_volume >= target.reagents.maximum_volume) + user << "\red [target] is full." + return + + if(!target.is_open_container() && !ismob(target) && !istype(target,/obj/item/weapon/reagent_containers/food) && !istype(target, /obj/item/clothing/mask/cigarette)) //You can inject humans and food but you cant remove the shit. + user << "\red You cannot directly fill this object." + return + + var/trans = 0 + + if(ismob(target)) + if(istype(target , /mob/living/carbon/human)) + var/mob/living/carbon/human/victim = target + + var/obj/item/safe_thing = null + if( victim.wear_mask ) + if ( victim.wear_mask.flags & MASKCOVERSEYES ) + safe_thing = victim.wear_mask + if( victim.head ) + if ( victim.head.flags & MASKCOVERSEYES ) + safe_thing = victim.head + if(victim.glasses) + if ( !safe_thing ) + safe_thing = victim.glasses + + if(safe_thing) + if(!safe_thing.reagents) + safe_thing.create_reagents(100) + trans = src.reagents.trans_to(safe_thing, amount_per_transfer_from_this) + + for(var/mob/O in viewers(world.view, user)) + O.show_message(text("\red [] tries to squirt something into []'s eyes, but fails!", user, target), 1) + spawn(5) + src.reagents.reaction(safe_thing, TOUCH) + + + user << "\blue You transfer [trans] units of the solution." + if (src.reagents.total_volume<=0) + filled = 0 + icon_state = "dropper[filled]" + return + + + for(var/mob/O in viewers(world.view, user)) + O.show_message(text("\red [] squirts something into []'s eyes!", user, target), 1) + src.reagents.reaction(target, TOUCH) + + trans = src.reagents.trans_to(target, amount_per_transfer_from_this) + user << "\blue You transfer [trans] units of the solution." + if (src.reagents.total_volume<=0) + filled = 0 + icon_state = "dropper[filled]" + + else + + if(!target.is_open_container() && !istype(target,/obj/structure/reagent_dispensers)) + user << "\red You cannot directly remove reagents from [target]." + return + + if(!target.reagents.total_volume) + user << "\red [target] is empty." + return + + var/trans = target.reagents.trans_to(src, amount_per_transfer_from_this) + + user << "\blue You fill the dropper with [trans] units of the solution." + + filled = 1 + icon_state = "dropper[filled]" + + return + +//////////////////////////////////////////////////////////////////////////////// +/// Droppers. END +//////////////////////////////////////////////////////////////////////////////// \ No newline at end of file diff --git a/code/modules/reagents/reagent_containers/food.dm b/code/modules/reagents/reagent_containers/food.dm new file mode 100644 index 00000000000..4f14338886f --- /dev/null +++ b/code/modules/reagents/reagent_containers/food.dm @@ -0,0 +1,11 @@ +//////////////////////////////////////////////////////////////////////////////// +/// Food. +//////////////////////////////////////////////////////////////////////////////// +/obj/item/weapon/reagent_containers/food + possible_transfer_amounts = null + volume = 50 //Sets the default container amount for all food items. + +/obj/item/weapon/reagent_containers/food/New() + ..() + src.pixel_x = rand(-5.0, 5) //Randomizes postion slightly. + src.pixel_y = rand(-5.0, 5) \ No newline at end of file diff --git a/code/modules/reagents/reagent_containers/food/condiment.dm b/code/modules/reagents/reagent_containers/food/condiment.dm new file mode 100644 index 00000000000..31a3019c379 --- /dev/null +++ b/code/modules/reagents/reagent_containers/food/condiment.dm @@ -0,0 +1,176 @@ + +///////////////////////////////////////////////Condiments +//Notes by Darem: The condiments food-subtype is for stuff you don't actually eat but you use to modify existing food. They all +// leave empty containers when used up and can be filled/re-filled with other items. Formatting for first section is identical +// to mixed-drinks code. If you want an object that starts pre-loaded, you need to make it in addition to the other code. + +//Food items that aren't eaten normally and leave an empty container behind. +/obj/item/weapon/reagent_containers/food/condiment + name = "Condiment Container" + desc = "Just your average condiment container." + icon = 'icons/obj/food.dmi' + icon_state = "emptycondiment" + flags = FPRINT | TABLEPASS | OPENCONTAINER + possible_transfer_amounts = list(1,5,10) + volume = 50 + + attackby(obj/item/weapon/W as obj, mob/user as mob) + + return + attack_self(mob/user as mob) + return + attack(mob/M as mob, mob/user as mob, def_zone) + var/datum/reagents/R = src.reagents + + if(!R || !R.total_volume) + user << "\red None of [src] left, oh no!" + return 0 + + if(M == user) + M << "\blue You swallow some of contents of the [src]." + if(reagents.total_volume) + reagents.reaction(M, INGEST) + spawn(5) + reagents.trans_to(M, 10) + + playsound(M.loc,'drink.ogg', rand(10,50), 1) + return 1 + else if( istype(M, /mob/living/carbon/human) ) + + for(var/mob/O in viewers(world.view, user)) + O.show_message("\red [user] attempts to feed [M] [src].", 1) + if(!do_mob(user, M)) return + for(var/mob/O in viewers(world.view, user)) + O.show_message("\red [user] feeds [M] [src].", 1) + + M.attack_log += text("\[[time_stamp()]\] Has been fed [src.name] by [user.name] ([user.ckey]) Reagents: [reagentlist(src)]") + user.attack_log += text("\[[time_stamp()]\] Fed [src.name] by [M.name] ([M.ckey]) Reagents: [reagentlist(src)]") + + + log_attack("[user.name] ([user.ckey]) fed [M.name] ([M.ckey]) with [src.name] (INTENT: [uppertext(user.a_intent)])") + + if(reagents.total_volume) + reagents.reaction(M, INGEST) + spawn(5) + reagents.trans_to(M, 10) + + playsound(M.loc,'drink.ogg', rand(10,50), 1) + return 1 + return 0 + + attackby(obj/item/I as obj, mob/user as mob) + + return + + afterattack(obj/target, mob/user , flag) + if(istype(target, /obj/structure/reagent_dispensers)) //A dispenser. Transfer FROM it TO us. + + if(!target.reagents.total_volume) + user << "\red [target] is empty." + return + + if(reagents.total_volume >= reagents.maximum_volume) + user << "\red [src] is full." + return + + var/trans = target.reagents.trans_to(src, target:amount_per_transfer_from_this) + user << "\blue You fill [src] with [trans] units of the contents of [target]." + + //Something like a glass or a food item. Player probably wants to transfer TO it. + else if(target.is_open_container() || istype(target, /obj/item/weapon/reagent_containers/food/snacks)) + if(!reagents.total_volume) + user << "\red [src] is empty." + return + if(target.reagents.total_volume >= target.reagents.maximum_volume) + user << "\red you can't add anymore to [target]." + return + var/trans = src.reagents.trans_to(target, amount_per_transfer_from_this) + user << "\blue You transfer [trans] units of the condiment to [target]." + + on_reagent_change() + if(icon_state == "saltshakersmall" || icon_state == "peppermillsmall") + return + if(reagents.reagent_list.len > 0) + switch(reagents.get_master_reagent_id()) + if("ketchup") + name = "Ketchup" + desc = "You feel more American already." + icon_state = "ketchup" + if("capsaicin") + name = "Hotsauce" + desc = "You can almost TASTE the stomach ulcers now!" + icon_state = "hotsauce" + if("enzyme") + name = "Universal Enzyme" + desc = "Used in cooking various dishes." + icon_state = "enzyme" + if("soysauce") + name = "Soy Sauce" + desc = "A salty soy-based flavoring." + icon_state = "soysauce" + if("frostoil") + name = "Coldsauce" + desc = "Leaves the tongue numb in its passage." + icon_state = "coldsauce" + if("sodiumchloride") + name = "Salt Shaker" + desc = "Salt. From space oceans, presumably." + icon_state = "saltshaker" + if("blackpepper") + name = "Pepper Mill" + desc = "Often used to flavor food or make people sneeze." + icon_state = "peppermillsmall" + if("cornoil") + name = "Corn Oil" + desc = "A delicious oil used in cooking. Made from corn." + icon_state = "oliveoil" + if("sugar") + name = "Sugar" + desc = "Tastey space sugar!" + else + name = "Misc Condiment Bottle" + if (reagents.reagent_list.len==1) + desc = "Looks like it is [reagents.get_master_reagent_name()], but you are not sure." + else + desc = "A mixture of various condiments. [reagents.get_master_reagent_name()] is one of them." + icon_state = "mixedcondiments" + else + icon_state = "emptycondiment" + name = "Condiment Bottle" + desc = "An empty condiment bottle." + return + +/obj/item/weapon/reagent_containers/food/condiment/enzyme + name = "Universal Enzyme" + desc = "Used in cooking various dishes." + icon_state = "enzyme" + New() + ..() + reagents.add_reagent("enzyme", 50) + +/obj/item/weapon/reagent_containers/food/condiment/sugar + New() + ..() + reagents.add_reagent("sugar", 50) + +/obj/item/weapon/reagent_containers/food/condiment/saltshaker //Seperate from above since it's a small shaker rather then + name = "Salt Shaker" // a large one. + desc = "Salt. From space oceans, presumably." + icon_state = "saltshakersmall" + possible_transfer_amounts = list(1,20) //for clown turning the lid off + amount_per_transfer_from_this = 1 + volume = 20 + New() + ..() + reagents.add_reagent("sodiumchloride", 20) + +/obj/item/weapon/reagent_containers/food/condiment/peppermill + name = "Pepper Mill" + desc = "Often used to flavor food or make people sneeze." + icon_state = "peppermillsmall" + possible_transfer_amounts = list(1,20) //for clown turning the lid off + amount_per_transfer_from_this = 1 + volume = 20 + New() + ..() + reagents.add_reagent("blackpepper", 20) \ No newline at end of file diff --git a/code/modules/reagents/reagent_containers/food/drinks.dm b/code/modules/reagents/reagent_containers/food/drinks.dm new file mode 100644 index 00000000000..320aef73851 --- /dev/null +++ b/code/modules/reagents/reagent_containers/food/drinks.dm @@ -0,0 +1,368 @@ +//////////////////////////////////////////////////////////////////////////////// +/// Drinks. +//////////////////////////////////////////////////////////////////////////////// +/obj/item/weapon/reagent_containers/food/drinks + name = "drink" + desc = "yummy" + icon = 'icons/obj/drinks.dmi' + icon_state = null + flags = FPRINT | TABLEPASS | OPENCONTAINER + var/gulp_size = 5 //This is now officially broken ... need to think of a nice way to fix it. + possible_transfer_amounts = list(5,10,25) + volume = 50 + + on_reagent_change() + if (gulp_size < 5) gulp_size = 5 + else gulp_size = max(round(reagents.total_volume / 5), 5) + + attack_self(mob/user as mob) + return + + attack(mob/M as mob, mob/user as mob, def_zone) + var/datum/reagents/R = src.reagents + var/fillevel = gulp_size + + if(!R.total_volume || !R) + user << "\red None of [src] left, oh no!" + return 0 + + if(M == user) + M << "\blue You swallow a gulp of [src]." + if(reagents.total_volume) + reagents.reaction(M, INGEST) + spawn(5) + reagents.trans_to(M, gulp_size) + + playsound(M.loc,'drink.ogg', rand(10,50), 1) + return 1 + else if( istype(M, /mob/living/carbon/human) ) + + for(var/mob/O in viewers(world.view, user)) + O.show_message("\red [user] attempts to feed [M] [src].", 1) + if(!do_mob(user, M)) return + for(var/mob/O in viewers(world.view, user)) + O.show_message("\red [user] feeds [M] [src].", 1) + + M.attack_log += text("\[[time_stamp()]\] Has been fed [src.name] by [user.name] ([user.ckey]) Reagents: [reagentlist(src)]") + user.attack_log += text("\[[time_stamp()]\] Fed [M.name] by [M.name] ([M.ckey]) Reagents: [reagentlist(src)]") + + log_attack("[user.name] ([user.ckey]) fed [M.name] ([M.ckey]) with [src.name] (INTENT: [uppertext(user.a_intent)])") + + + if(reagents.total_volume) + reagents.reaction(M, INGEST) + spawn(5) + reagents.trans_to(M, gulp_size) + + if(isrobot(user)) //Cyborg modules that include drinks automatically refill themselves, but drain the borg's cell + var/mob/living/silicon/robot/bro = user + bro.cell.use(30) + var/refill = R.get_master_reagent_id() + spawn(600) + R.add_reagent(refill, fillevel) + + playsound(M.loc,'drink.ogg', rand(10,50), 1) + return 1 + + return 0 + + + afterattack(obj/target, mob/user , flag) + + if(istype(target, /obj/structure/reagent_dispensers)) //A dispenser. Transfer FROM it TO us. + + if(!target.reagents.total_volume) + user << "\red [target] is empty." + return + + if(reagents.total_volume >= reagents.maximum_volume) + user << "\red [src] is full." + return + + var/trans = target.reagents.trans_to(src, target:amount_per_transfer_from_this) + user << "\blue You fill [src] with [trans] units of the contents of [target]." + + else if(target.is_open_container()) //Something like a glass. Player probably wants to transfer TO it. + if(!reagents.total_volume) + user << "\red [src] is empty." + return + + if(target.reagents.total_volume >= target.reagents.maximum_volume) + user << "\red [target] is full." + return + + var/trans = src.reagents.trans_to(target, amount_per_transfer_from_this) + user << "\blue You transfer [trans] units of the solution to [target]." + + if(isrobot(user)) //Cyborg modules that include drinks automatically refill themselves, but drain the borg's cell + var/mob/living/silicon/robot/bro = user + bro.cell.use(30) + var/refill = reagents.get_master_reagent_id() + spawn(600) + reagents.add_reagent(refill, trans) + + return + + examine() + set src in view() + ..() + if (!(usr in range(0)) && usr!=src.loc) return + if(!reagents || reagents.total_volume==0) + usr << "\blue \The [src] is empty!" + else if (reagents.total_volume[target] has been hit over the head with a bottle of [src.name], by [user]!"), 1) + else O.show_message(text("\red [target] hit himself with a bottle of [src.name] on the head!"), 1) + //Weaken the target for the duration that we calculated and divide it by 5. + if(armor_duration) + target.apply_effect(min(armor_duration, 10) , WEAKEN) // Never weaken more than a flash! + + else + //Default attack message and don't weaken the target. + for(var/mob/O in viewers(user, null)) + if(target != user) O.show_message(text("\red [target] has been attacked with a bottle of [src.name], by [user]!"), 1) + else O.show_message(text("\red [target] has attacked himself with a bottle of [src.name]!"), 1) + + //Attack logs + user.attack_log += text("\[[time_stamp()]\] Has attacked [target.name] ([target.ckey]) with a bottle!") + target.attack_log += text("\[[time_stamp()]\] Has been smashed with a bottle by [user.name] ([user.ckey])") + log_attack("[user.name] ([user.ckey]) attacked [target.name] with a bottle. ([target.ckey])") + + //The reagents in the bottle splash all over the target, thanks for the idea Nodrak + if(src.reagents) + for(var/mob/O in viewers(user, null)) + O.show_message(text("\blue The contents of the [src] splashes all over [target]!"), 1) + src.reagents.reaction(target, TOUCH) + + //Finally, smash the bottle. This kills (del) the bottle. + src.smash(target, user) + + return + +//Keeping this here for now, I'll ask if I should keep it here. +/obj/item/weapon/broken_bottle + + name = "Broken Bottle" + desc = "A bottle with a sharp broken bottom." + icon = 'icons/obj/drinks.dmi' + icon_state = "broken_bottle" + force = 9.0 + throwforce = 5.0 + throw_speed = 3 + throw_range = 5 + item_state = "beer" + //item_state - Need to find a bottle sprite + attack_verb = list("stabbed", "slashed", "attacked") + var/icon/broken_outline = icon('icons/obj/drinks.dmi', "broken") + + + + +/obj/item/weapon/reagent_containers/food/drinks/bottle/gin + name = "Griffeater Gin" + desc = "A bottle of high quality gin, produced in the New London Space Station." + icon_state = "ginbottle" + New() + ..() + reagents.add_reagent("gin", 100) + +/obj/item/weapon/reagent_containers/food/drinks/bottle/whiskey + name = "Uncle Git's Special Reserve" + desc = "A premium single-malt whiskey, gently matured inside the tunnels of a nuclear shelter. TUNNEL WHISKEY RULES." + icon_state = "whiskeybottle" + New() + ..() + reagents.add_reagent("whiskey", 100) + +/obj/item/weapon/reagent_containers/food/drinks/bottle/vodka + name = "Tunguska Triple Distilled" + desc = "Aah, vodka. Prime choice of drink AND fuel by Russians worldwide." + icon_state = "vodkabottle" + New() + ..() + reagents.add_reagent("vodka", 100) + +/obj/item/weapon/reagent_containers/food/drinks/bottle/tequilla + name = "Caccavo Guaranteed Quality Tequilla" + desc = "Made from premium petroleum distillates, pure thalidomide and other fine quality ingredients!" + icon_state = "tequillabottle" + New() + ..() + reagents.add_reagent("tequilla", 100) + +/obj/item/weapon/reagent_containers/food/drinks/bottle/bottleofnothing + name = "Bottle of Nothing" + desc = "A bottle filled with nothing" + icon_state = "bottleofnothing" + New() + ..() + reagents.add_reagent("nothing", 100) + +/obj/item/weapon/reagent_containers/food/drinks/bottle/patron + name = "Wrapp Artiste Patron" + desc = "Silver laced tequilla, served in space night clubs across the galaxy." + icon_state = "patronbottle" + New() + ..() + reagents.add_reagent("patron", 100) + +/obj/item/weapon/reagent_containers/food/drinks/bottle/rum + name = "Captain Pete's Cuban Spiced Rum" + desc = "This isn't just rum, oh no. It's practically GRIFF in a bottle." + icon_state = "rumbottle" + New() + ..() + reagents.add_reagent("rum", 100) + +/obj/item/weapon/reagent_containers/food/drinks/bottle/holywater + name = "Flask of Holy Water" + desc = "A flask of the chaplain's holy water." + icon_state = "holyflask" + New() + ..() + reagents.add_reagent("holywater", 100) + +/obj/item/weapon/reagent_containers/food/drinks/bottle/vermouth + name = "Goldeneye Vermouth" + desc = "Sweet, sweet dryness~" + icon_state = "vermouthbottle" + New() + ..() + reagents.add_reagent("vermouth", 100) + +/obj/item/weapon/reagent_containers/food/drinks/bottle/kahlua + name = "Robert Robust's Coffee Liqueur" + desc = "A widely known, Mexican coffee-flavoured liqueur. In production since 1936, HONK" + icon_state = "kahluabottle" + New() + ..() + reagents.add_reagent("kahlua", 100) + +/obj/item/weapon/reagent_containers/food/drinks/bottle/goldschlager + name = "College Girl Goldschlager" + desc = "Because they are the only ones who will drink 100 proof cinnamon schnapps." + icon_state = "goldschlagerbottle" + New() + ..() + reagents.add_reagent("goldschlager", 100) + +/obj/item/weapon/reagent_containers/food/drinks/bottle/cognac + name = "Chateau De Baton Premium Cognac" + desc = "A sweet and strongly alchoholic drink, made after numerous distillations and years of maturing. You might as well not scream 'SHITCURITY' this time." + icon_state = "cognacbottle" + New() + ..() + reagents.add_reagent("cognac", 100) + +/obj/item/weapon/reagent_containers/food/drinks/bottle/wine + name = "Doublebeard Bearded Special Wine" + desc = "A faint aura of unease and asspainery surrounds the bottle." + icon_state = "winebottle" + New() + ..() + reagents.add_reagent("wine", 100) + +//////////////////////////JUICES AND STUFF /////////////////////// + +/obj/item/weapon/reagent_containers/food/drinks/bottle/orangejuice + name = "Orange Juice" + desc = "Full of vitamins and deliciousness!" + icon_state = "orangejuice" + item_state = "carton" + isGlass = 0 + New() + ..() + reagents.add_reagent("orangejuice", 100) + +/obj/item/weapon/reagent_containers/food/drinks/bottle/cream + name = "Milk Cream" + desc = "It's cream. Made from milk. What else did you think you'd find in there?" + icon_state = "cream" + item_state = "carton" + isGlass = 0 + New() + ..() + reagents.add_reagent("cream", 100) + +/obj/item/weapon/reagent_containers/food/drinks/bottle/tomatojuice + name = "Tomato Juice" + desc = "Well, at least it LOOKS like tomato juice. You can't tell with all that redness." + icon_state = "tomatojuice" + item_state = "carton" + isGlass = 0 + New() + ..() + reagents.add_reagent("tomatojuice", 100) + +/obj/item/weapon/reagent_containers/food/drinks/bottle/limejuice + name = "Lime Juice" + desc = "Sweet-sour goodness." + icon_state = "limejuice" + item_state = "carton" + isGlass = 0 + New() + ..() + reagents.add_reagent("limejuice", 100) diff --git a/code/modules/reagents/reagent_containers/food/drinks/bottle/robot.dm b/code/modules/reagents/reagent_containers/food/drinks/bottle/robot.dm new file mode 100644 index 00000000000..e69de29bb2d diff --git a/code/modules/reagents/reagent_containers/food/drinks/drinkingglass.dm b/code/modules/reagents/reagent_containers/food/drinks/drinkingglass.dm new file mode 100644 index 00000000000..e149c7c5237 --- /dev/null +++ b/code/modules/reagents/reagent_containers/food/drinks/drinkingglass.dm @@ -0,0 +1,446 @@ + + +/obj/item/weapon/reagent_containers/food/drinks/drinkingglass + name = "glass" + desc = "Your standard drinking glass." + icon_state = "glass_empty" + amount_per_transfer_from_this = 10 + volume = 50 + + on_reagent_change() + /*if(reagents.reagent_list.len > 1 ) + icon_state = "glass_brown" + name = "Glass of Hooch" + desc = "Two or more drinks, mixed together."*/ + /*else if(reagents.reagent_list.len == 1) + for(var/datum/reagent/R in reagents.reagent_list) + switch(R.id)*/ + if (reagents.reagent_list.len > 0) + //mrid = R.get_master_reagent_id() + switch(reagents.get_master_reagent_id()) + if("beer") + icon_state = "beerglass" + name = "Beer glass" + desc = "A freezing pint of beer" + 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("lemon") + icon_state = "lemonglass" + name = "Glass of lemon" + 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("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("tequilla") + icon_state = "tequillaglass" + name = "Glass of Tequilla" + 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("gintonic") + icon_state = "gintonicglass" + name = "Gin and Tonic" + desc = "A mild but still great cocktail. Drink up, like a 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 = "Tequilla and Coffee liquor, brought together in a mouthwatering mixture. Drink up." + if("tequillasunrise") + icon_state = "tequillasunriseglass" + name = "Tequilla 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("hooch") + icon_state = "glass_brown2" + name = "Hooch" + 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("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("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 Clown 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." + else + icon_state ="glass_brown" + name = "Glass of ..what?" + desc = "You can't really tell what this is." + else + icon_state = "glass_empty" + name = "Drinking glass" + desc = "Your standard drinking glass" + return + +// for /obj/machinery/vending/sovietsoda +/obj/item/weapon/reagent_containers/food/drinks/drinkingglass/soda + New() + ..() + reagents.add_reagent("sodawater", 50) + on_reagent_change() + +/obj/item/weapon/reagent_containers/food/drinks/drinkingglass/cola + New() + ..() + reagents.add_reagent("cola", 50) + on_reagent_change() \ No newline at end of file diff --git a/code/modules/reagents/reagent_containers/food/drinks/jar.dm b/code/modules/reagents/reagent_containers/food/drinks/jar.dm new file mode 100644 index 00000000000..d97165a4098 --- /dev/null +++ b/code/modules/reagents/reagent_containers/food/drinks/jar.dm @@ -0,0 +1,29 @@ + + +///jar + +/obj/item/weapon/reagent_containers/food/drinks/jar + name = "empty jar" + desc = "A jar. You're not sure what it's supposed to hold." + icon_state = "jar" + item_state = "beaker" + New() + ..() + reagents.add_reagent("metroid", 50) + + on_reagent_change() + if (reagents.reagent_list.len > 0) + switch(reagents.get_master_reagent_id()) + if("metroid") + icon_state = "jar_metroid" + name = "metroid jam" + desc = "A jar of metroid jam. Delicious!" + else + icon_state ="jar_what" + name = "jar of something" + desc = "You can't really tell what this is." + else + icon_state = "jar" + name = "empty jar" + desc = "A jar. You're not sure what it's supposed to hold." + return diff --git a/code/modules/reagents/reagent_containers/food/snacks.dm b/code/modules/reagents/reagent_containers/food/snacks.dm new file mode 100644 index 00000000000..a94cc6d406b --- /dev/null +++ b/code/modules/reagents/reagent_containers/food/snacks.dm @@ -0,0 +1,2280 @@ +//Food items that are eaten normally and don't leave anything behind. +/obj/item/weapon/reagent_containers/food/snacks + name = "snack" + desc = "yummy" + icon = 'icons/obj/food.dmi' + icon_state = null + var/bitesize = 1 + var/bitecount = 0 + var/trash = null + var/slice_path + var/slices_num + + //Placeholder for effect that trigger on eating that aren't tied to reagents. +/obj/item/weapon/reagent_containers/food/snacks/proc/On_Consume() + if(!usr) return + if(!reagents.total_volume) + usr.visible_message("[usr] finishes eating [src].","You finish eating [src].") + usr.drop_from_inventory(src) //so icons update :[ + + if(trash) + if(ispath(trash,/obj/item)) + var/obj/item/TrashItem = new trash(usr) + usr.put_in_hands(TrashItem) + else if(istype(trash,/obj/item)) + usr.put_in_hands(trash) + del(src) + return + +/obj/item/weapon/reagent_containers/food/snacks/attack_self(mob/user as mob) + return + +/obj/item/weapon/reagent_containers/food/snacks/attack(mob/M as mob, mob/user as mob, def_zone) + if(!reagents.total_volume) //Shouldn't be needed but it checks to see if it has anything left in it. + user << "\red None of [src] left, oh no!" + M.drop_from_inventory(src) //so icons update :[ + del(src) + return 0 + if(istype(M, /mob/living/carbon)) + if(M == user) //If you're eating it yourself. + var/fullness = M.nutrition + (M.reagents.get_reagent_amount("nutriment") * 25) + if (fullness <= 50) + M << "\red You hungrily chew out a piece of [src] and gobble it!" + if (fullness > 50 && fullness <= 150) + M << "\blue You hungrily begin to eat [src]." + if (fullness > 150 && fullness <= 350) + M << "\blue You take a bite of [src]." + if (fullness > 350 && fullness <= 550) + M << "\blue You unwillingly chew a bit of [src]." + if (fullness > (550 * (1 + M.overeatduration / 2000))) // The more you eat - the more you can eat + M << "\red You cannot force any more of [src] to go down your throat." + return 0 + else + if(!istype(M, /mob/living/carbon/metroid)) //If you're feeding it to someone else. + var/fullness = M.nutrition + (M.reagents.get_reagent_amount("nutriment") * 25) + if (fullness <= (550 * (1 + M.overeatduration / 1000))) + for(var/mob/O in viewers(world.view, user)) + O.show_message("\red [user] attempts to feed [M] [src].", 1) + else + for(var/mob/O in viewers(world.view, user)) + O.show_message("\red [user] cannot force anymore of [src] down [M]'s throat.", 1) + return 0 + + if(!do_mob(user, M)) return + + M.attack_log += text("\[[time_stamp()]\] Has been fed [src.name] by [user.name] ([user.ckey]) Reagents: [reagentlist(src)]") + user.attack_log += text("\[[time_stamp()]\] Fed [src.name] by [M.name] ([M.ckey]) Reagents: [reagentlist(src)]") + + log_attack("[user.name] ([user.ckey]) fed [M.name] ([M.ckey]) with [src.name] (INTENT: [uppertext(user.a_intent)])") + + for(var/mob/O in viewers(world.view, user)) + O.show_message("\red [user] feeds [M] [src].", 1) + + else + user << "This creature does not seem to have a mouth!" + return + + if(reagents) //Handle ingestion of the reagent. + playsound(M.loc,'eatfood.ogg', rand(10,50), 1) + if(reagents.total_volume) + reagents.reaction(M, INGEST) + spawn(5) + if(reagents.total_volume > bitesize) + /* + * I totally cannot understand what this code supposed to do. + * Right now every snack consumes in 2 bites, my popcorn does not work right, so I simplify it. -- rastaf0 + var/temp_bitesize = max(reagents.total_volume /2, bitesize) + reagents.trans_to(M, temp_bitesize) + */ + reagents.trans_to(M, bitesize) + else + reagents.trans_to(M, reagents.total_volume) + bitecount++ + On_Consume() + return 1 + + return 0 + +/obj/item/weapon/reagent_containers/food/snacks/afterattack(obj/target, mob/user , flag) + return + + + + + + + +/obj/item/weapon/reagent_containers/food/snacks/examine() + set src in view() + ..() + if (!(usr in range(0)) && usr!=src.loc) return + if (bitecount==0) + return + else if (bitecount==1) + usr << "\blue \The [src] was bitten by someone!" + else if (bitecount<=3) + usr << "\blue \The [src] was bitten [bitecount] times!" + else + usr << "\blue \The [src] was bitten multiple times!" + +/obj/item/weapon/reagent_containers/food/snacks/attackby(obj/item/weapon/W as obj, mob/user as mob) + + if((slices_num <= 0 || !slices_num) || !slice_path) + return 1 + var/inaccurate = 0 + if( \ + istype(W, /obj/item/weapon/kitchenknife) || \ + istype(W, /obj/item/weapon/butch) || \ + istype(W, /obj/item/weapon/scalpel) || \ + istype(W, /obj/item/weapon/kitchen/utensil/knife) \ + ) + else if( \ + istype(W, /obj/item/weapon/circular_saw) || \ + istype(W, /obj/item/weapon/melee/energy/sword) && W:active || \ + istype(W, /obj/item/weapon/melee/energy/blade) || \ + istype(W, /obj/item/weapon/shovel) || \ + istype(W, /obj/item/weapon/hatchet) \ + ) + inaccurate = 1 + else if(W.w_class <= 2 && istype(src,/obj/item/weapon/reagent_containers/food/snacks/sliceable)) + user << "\red You slip [W] inside [src]." + user.u_equip(W) + if ((user.client && user.s_active != src)) + user.client.screen -= W + W.dropped(user) + add_fingerprint(user) + contents += W + return + else + return 1 + if ( \ + !isturf(src.loc) || \ + !(locate(/obj/structure/table) in src.loc) && \ + !(locate(/obj/machinery/optable) in src.loc) && \ + !(locate(/obj/item/weapon/tray) in src.loc) \ + ) + user << "\red You cannot slice [src] here! You need a table or at least a tray to do it." + return 1 + var/slices_lost = 0 + if (!inaccurate) + user.visible_message( \ + "\blue [user] slices \the [src]!", \ + "\blue You slice \the [src]!" \ + ) + else + user.visible_message( \ + "\blue [user] inaccurately slices \the [src] with [W]!", \ + "\blue You inaccurately slice \the [src] with your [W]!" \ + ) + slices_lost = rand(1,min(1,round(slices_num/2))) + var/reagents_per_slice = reagents.total_volume/slices_num + for(var/i=1 to (slices_num-slices_lost)) + var/obj/slice = new slice_path (src.loc) + reagents.trans_to(slice,reagents_per_slice) + del(src) + return + +/obj/item/weapon/reagent_containers/food/snacks/Del() + if(contents) + for(var/atom/movable/something in contents) + something.loc = get_turf(src) + ..() + + +//////////////////////////////////////////////////////////////////////////////// +/// FOOD END +//////////////////////////////////////////////////////////////////////////////// + + + + + + + + + + + +////////////////////////////////////////////////// +////////////////////////////////////////////Snacks +////////////////////////////////////////////////// +//Items in the "Snacks" subcategory are food items that people actually eat. The key points are that they are created +// already filled with reagents and are destroyed when empty. Additionally, they make a "munching" noise when eaten. + +//Notes by Darem: Food in the "snacks" subtype can hold a maximum of 50 units Generally speaking, you don't want to go over 40 +// total for the item because you want to leave space for extra condiments. If you want effect besides healing, add a reagent for +// it. Try to stick to existing reagents when possible (so if you want a stronger healing effect, just use Tricordrazine). On use +// effect (such as the old officer eating a donut code) requires a unique reagent (unless you can figure out a better way). + +//The nutriment reagent and bitesize variable replace the old heal_amt and amount variables. Each unit of nutriment is equal to +// 2 of the old heal_amt variable. Bitesize is the rate at which the reagents are consumed. So if you have 6 nutriment and a +// bitesize of 2, then it'll take 3 bites to eat. Unlike the old system, the contained reagents are evenly spread among all +// the bites. No more contained reagents = no more bites. + +//Here is an example of the new formatting for anyone who wants to add more food items. +///obj/item/weapon/reagent_containers/food/snacks/xenoburger //Identification path for the object. +// name = "Xenoburger" //Name that displays in the UI. +// desc = "Smells caustic. Tastes like heresy." //Duh +// icon_state = "xburger" //Refers to an icon in food.dmi +// New() //Don't mess with this. +// ..() //Same here. +// reagents.add_reagent("xenomicrobes", 10) //This is what is in the food item. you may copy/paste +// reagents.add_reagent("nutriment", 2) // this line of code for all the contents. +// bitesize = 3 //This is the amount each bite consumes. + +/obj/item/weapon/reagent_containers/food/snacks/attack_animal(var/mob/M) + if(isanimal(M)) + if(iscorgi(M)) + if(bitecount == 0 || prob(50)) + M.emote("nibbles away at the [src]") + bitecount++ + if(bitecount >= 5) + var/sattisfaction_text = pick("burps from enjoyment", "yaps for more", "woofs twice", "looks at the area where the [src] was") + if(sattisfaction_text) + M.emote("[sattisfaction_text]") + del(src) + + + + +/obj/item/weapon/reagent_containers/food/snacks/aesirsalad + name = "Aesir salad" + desc = "Probably too incredible for mortal men to fully enjoy." + icon_state = "aesirsalad" + trash = /obj/item/trash/snack_bowl + New() + ..() + reagents.add_reagent("nutriment", 8) + reagents.add_reagent("tricordrazine", 8) + bitesize = 3 + +/obj/item/weapon/reagent_containers/food/snacks/candy + name = "candy" + desc = "Nougat love it or hate it." + icon_state = "candy" + trash = /obj/item/trash/candy + New() + ..() + reagents.add_reagent("nutriment", 1) + reagents.add_reagent("sugar", 3) + bitesize = 2 + +/obj/item/weapon/reagent_containers/food/snacks/candy_corn + name = "candy corn" + desc = "It's a handful of candy corn. Can be stored in a detective's hat." + icon_state = "candy_corn" + New() + ..() + reagents.add_reagent("nutriment", 4) + reagents.add_reagent("sugar", 2) + bitesize = 2 + +/obj/item/weapon/reagent_containers/food/snacks/chips + name = "chips" + desc = "Commander Riker's What-The-Crisps" + icon_state = "chips" + trash = /obj/item/trash/chips + New() + ..() + reagents.add_reagent("nutriment", 3) + bitesize = 1 + +/obj/item/weapon/reagent_containers/food/snacks/cookie + name = "cookie" + desc = "COOKIE!!!" + icon_state = "COOKIE!!!" + New() + ..() + reagents.add_reagent("nutriment", 5) + bitesize = 1 + +/obj/item/weapon/reagent_containers/food/snacks/chocolatebar + name = "Chocolate Bar" + desc = "Such, sweet, fattening food." + icon_state = "chocolatebar" + New() + ..() + reagents.add_reagent("nutriment", 2) + reagents.add_reagent("sugar", 2) + reagents.add_reagent("coco", 2) + bitesize = 2 + +/obj/item/weapon/reagent_containers/food/snacks/chocolateegg + name = "Chocolate Egg" + desc = "Such, sweet, fattening food." + icon_state = "chocolateegg" + New() + ..() + reagents.add_reagent("nutriment", 3) + reagents.add_reagent("sugar", 2) + reagents.add_reagent("coco", 2) + bitesize = 2 + +/obj/item/weapon/reagent_containers/food/snacks/donut + name = "donut" + desc = "Goes great with Robust Coffee." + icon_state = "donut1" + +/obj/item/weapon/reagent_containers/food/snacks/donut/normal + name = "donut" + desc = "Goes great with Robust Coffee." + icon_state = "donut1" + New() + ..() + reagents.add_reagent("nutriment", 3) + reagents.add_reagent("sprinkles", 1) + src.bitesize = 3 + if(prob(30)) + src.icon_state = "donut2" + src.name = "frosted donut" + reagents.add_reagent("sprinkles", 2) + +/obj/item/weapon/reagent_containers/food/snacks/donut/chaos + name = "Chaos Donut" + desc = "Like life, it never quite tastes the same." + icon_state = "donut1" + New() + + reagents.add_reagent("nutriment", 2) + reagents.add_reagent("sprinkles", 1) + bitesize = 10 + var/chaosselect = pick(1,2,3,4,5,6,7,8,9,10) + switch(chaosselect) + if(1) + reagents.add_reagent("nutriment", 3) + if(2) + reagents.add_reagent("capsaicin", 3) + if(3) + reagents.add_reagent("frostoil", 3) + if(4) + reagents.add_reagent("sprinkles", 3) + if(5) + reagents.add_reagent("plasma", 3) + if(6) + reagents.add_reagent("coco", 3) + if(7) + reagents.add_reagent("metroid", 3) + if(8) + reagents.add_reagent("banana", 3) + if(9) + reagents.add_reagent("berryjuice", 3) + if(10) + reagents.add_reagent("tricordrazine", 3) + if(prob(30)) + src.icon_state = "donut2" + src.name = "Frosted Chaos Donut" + reagents.add_reagent("sprinkles", 2) + + +/obj/item/weapon/reagent_containers/food/snacks/donut/jelly + name = "Jelly Donut" + desc = "You jelly?" + icon_state = "jdonut1" + New() + ..() + reagents.add_reagent("nutriment", 3) + reagents.add_reagent("sprinkles", 1) + reagents.add_reagent("berryjuice", 5) + bitesize = 5 + if(prob(30)) + src.icon_state = "jdonut2" + src.name = "Frosted Jelly Donut" + reagents.add_reagent("sprinkles", 2) + +/obj/item/weapon/reagent_containers/food/snacks/egg + name = "egg" + desc = "An egg!" + icon_state = "egg" + New() + ..() + reagents.add_reagent("nutriment", 1) + + throw_impact(atom/hit_atom) + ..() + new/obj/effect/decal/cleanable/egg_smudge(src.loc) + src.visible_message("\red [src.name] has been squashed.","\red You hear a smack.") + del(src) + + attackby(obj/item/weapon/W as obj, mob/user as mob) + if(istype( W, /obj/item/toy/crayon )) + var/obj/item/toy/crayon/C = W + var/clr = C.colourName + + if(!(clr in list("blue","green","mime","orange","purple","rainbow","red","yellow"))) + usr << "\blue The egg refuses to take on this color!" + return + + usr << "\blue You color \the [src] [clr]" + icon_state = "egg-[clr]" + color = clr + else + ..() + +/obj/item/weapon/reagent_containers/food/snacks/egg/blue + icon_state = "egg-blue" + color = "blue" + +/obj/item/weapon/reagent_containers/food/snacks/egg/green + icon_state = "egg-green" + color = "green" + +/obj/item/weapon/reagent_containers/food/snacks/egg/mime + icon_state = "egg-mime" + color = "mime" + +/obj/item/weapon/reagent_containers/food/snacks/egg/orange + icon_state = "egg-orange" + color = "orange" + +/obj/item/weapon/reagent_containers/food/snacks/egg/purple + icon_state = "egg-purple" + color = "purple" + +/obj/item/weapon/reagent_containers/food/snacks/egg/rainbow + icon_state = "egg-rainbow" + color = "rainbow" + +/obj/item/weapon/reagent_containers/food/snacks/egg/red + icon_state = "egg-red" + color = "red" + +/obj/item/weapon/reagent_containers/food/snacks/egg/yellow + icon_state = "egg-yellow" + color = "yellow" + +/obj/item/weapon/reagent_containers/food/snacks/friedegg + name = "Fried egg" + desc = "A fried egg, with a touch of salt and pepper." + icon_state = "friedegg" + New() + ..() + reagents.add_reagent("nutriment", 2) + reagents.add_reagent("sodiumchloride", 1) + reagents.add_reagent("blackpepper", 1) + bitesize = 1 + +/obj/item/weapon/reagent_containers/food/snacks/boiledegg + name = "Boiled egg" + desc = "A hard boiled egg." + icon_state = "egg" + New() + ..() + reagents.add_reagent("nutriment", 2) + +/obj/item/weapon/reagent_containers/food/snacks/flour + name = "flour" + desc = "Some flour" + icon_state = "flour" + New() + ..() + reagents.add_reagent("nutriment", 1) + +/obj/item/weapon/reagent_containers/food/snacks/appendix //yes, this is the same as meat. I might do something different in future + name = "appendix" + desc = "An appendix which looks perfectly healthy." + icon_state = "appendix" + New() + ..() + reagents.add_reagent("nutriment", 3) + src.bitesize = 3 + +/obj/item/weapon/reagent_containers/food/snacks/appendixinflamed + name = "inflamed appendix" + desc = "An appendix which appears to be inflamed." + icon_state = "appendixinflamed" + New() + ..() + reagents.add_reagent("nutriment", 1) + src.bitesize = 1 + +/obj/item/weapon/reagent_containers/food/snacks/tofu + name = "Tofu" + icon_state = "tofu" + desc = "We all love tofu." + New() + ..() + reagents.add_reagent("nutriment", 3) + src.bitesize = 3 + + +/obj/item/weapon/reagent_containers/food/snacks/carpmeat + name = "carp fillet" + desc = "A fillet of spess carp meat" + icon_state = "fishfillet" + New() + ..() + reagents.add_reagent("nutriment", 3) + reagents.add_reagent("carpotoxin", 3) + src.bitesize = 6 + +/obj/item/weapon/reagent_containers/food/snacks/fishfingers + name = "Fish Fingers" + desc = "A finger of fish." + icon_state = "fishfingers" + New() + ..() + reagents.add_reagent("nutriment", 4) + reagents.add_reagent("carpotoxin", 3) + bitesize = 3 + +/obj/item/weapon/reagent_containers/food/snacks/hugemushroomslice + name = "huge mushroom slice" + desc = "A slice from a huge mushroom." + icon_state = "hugemushroomslice" + New() + ..() + reagents.add_reagent("nutriment", 3) + reagents.add_reagent("psilocybin", 3) + src.bitesize = 6 + +/obj/item/weapon/reagent_containers/food/snacks/tomatomeat + name = "tomato slice" + desc = "A slice from a huge tomato" + icon_state = "tomatomeat" + New() + ..() + reagents.add_reagent("nutriment", 3) + src.bitesize = 6 + +/obj/item/weapon/reagent_containers/food/snacks/bearmeat + name = "bear meat" + desc = "A very manly slab of meat." + icon_state = "bearmeat" + New() + ..() + reagents.add_reagent("nutriment", 12) + reagents.add_reagent("hyperzine", 5) + src.bitesize = 3 + +/obj/item/weapon/reagent_containers/food/snacks/xenomeat + name = "meat" + desc = "A slab of meat" + icon_state = "xenomeat" + New() + ..() + reagents.add_reagent("nutriment", 3) + src.bitesize = 6 + +/obj/item/weapon/reagent_containers/food/snacks/faggot + name = "Faggot" + desc = "A great meal all round. Not a cord of wood." + icon_state = "faggot" + New() + ..() + reagents.add_reagent("nutriment", 3) + bitesize = 2 + +/obj/item/weapon/reagent_containers/food/snacks/sausage + name = "Sausage" + desc = "A piece of mixed, long meat." + icon_state = "sausage" + New() + ..() + reagents.add_reagent("nutriment", 6) + bitesize = 2 + +/obj/item/weapon/reagent_containers/food/snacks/donkpocket + name = "Donk-pocket" + desc = "The food of choice for the seasoned traitor." + icon_state = "donkpocket" + New() + ..() + reagents.add_reagent("nutriment", 4) + + var/warm = 0 + proc/cooltime() //Not working, derp? + if (src.warm) + spawn( 4200 ) + src.warm = 0 + src.reagents.del_reagent("tricordrazine") + src.name = "donk-pocket" + return + +/obj/item/weapon/reagent_containers/food/snacks/brainburger + name = "brainburger" + desc = "A strange looking burger. It looks almost sentient." + icon_state = "brainburger" + New() + ..() + reagents.add_reagent("nutriment", 6) + reagents.add_reagent("alkysine", 6) + bitesize = 2 + +/obj/item/weapon/reagent_containers/food/snacks/ghostburger + name = "Ghost Burger" + desc = "Spooky! It doesn't look very filling." + icon_state = "ghostburger" + New() + ..() + reagents.add_reagent("nutriment", 2) + bitesize = 2 + + +/obj/item/weapon/reagent_containers/food/snacks/human + var/hname = "" + var/job = null + +/obj/item/weapon/reagent_containers/food/snacks/human/burger + name = "-burger" + desc = "A bloody burger." + icon_state = "hburger" + New() + ..() + reagents.add_reagent("nutriment", 6) + bitesize = 2 + +/obj/item/weapon/reagent_containers/food/snacks/monkeyburger + name = "burger" + desc = "The cornerstone of every nutritious breakfast." + icon_state = "hburger" + New() + ..() + reagents.add_reagent("nutriment", 6) + bitesize = 2 + +/obj/item/weapon/reagent_containers/food/snacks/fishburger + name = "Fillet -o- Carp Sandwich" + desc = "Almost like a carp is yelling somewhere... Give me back that fillet -o- carp, give me that carp." + icon_state = "fishburger" + New() + ..() + reagents.add_reagent("nutriment", 6) + reagents.add_reagent("carpotoxin", 3) + bitesize = 3 + +/obj/item/weapon/reagent_containers/food/snacks/tofuburger + name = "Tofu Burger" + desc = "What.. is that meat?" + icon_state = "tofuburger" + New() + ..() + reagents.add_reagent("nutriment", 6) + bitesize = 2 + +/obj/item/weapon/reagent_containers/food/snacks/roburger + name = "roburger" + desc = "The lettuce is the only organic component. Beep." + icon_state = "roburger" + New() + ..() + reagents.add_reagent("nanites", 2) + bitesize = 2 + +/obj/item/weapon/reagent_containers/food/snacks/roburgerbig + name = "roburger" + desc = "This massive patty looks like poison. Beep." + icon_state = "roburger" + volume = 100 + New() + ..() + reagents.add_reagent("nanites", 100) + bitesize = 0.1 + +/obj/item/weapon/reagent_containers/food/snacks/xenoburger + name = "xenoburger" + desc = "Smells caustic. Tastes like heresy." + icon_state = "xburger" + New() + ..() + reagents.add_reagent("nutriment", 8) + bitesize = 2 + +/obj/item/weapon/reagent_containers/food/snacks/clownburger + name = "Clown Burger" + desc = "This tastes funny..." + icon_state = "clownburger" + New() + ..() +/* + var/datum/disease/F = new /datum/disease/pierrot_throat(0) + var/list/data = list("viruses"= list(F)) + reagents.add_reagent("blood", 4, data) +*/ + reagents.add_reagent("nutriment", 6) + bitesize = 2 + +/obj/item/weapon/reagent_containers/food/snacks/mimeburger + name = "Mime Burger" + desc = "Its taste defies language." + icon_state = "mimeburger" + New() + ..() + reagents.add_reagent("nutriment", 6) + bitesize = 2 + +/obj/item/weapon/reagent_containers/food/snacks/omelette + name = "Omelette Du Fromage" + desc = "That's all you can say!" + icon_state = "omelette" + trash = /obj/item/trash/plate + //var/herp = 0 + New() + ..() + reagents.add_reagent("nutriment", 8) + bitesize = 1 + attackby(obj/item/weapon/W as obj, mob/user as mob) + if(istype(W,/obj/item/weapon/kitchen/utensil/fork)) + if (W.icon_state == "forkloaded") + user << "\red You already have omelette on your fork." + return + //W.icon = 'icons/obj/kitchen.dmi' + W.icon_state = "forkloaded" + /*if (herp) + world << "[user] takes a piece of omelette with his fork!"*/ + //Why this unecessary check? Oh I know, because I'm bad >:C + // Yes, you are. You griefing my badmin toys. --rastaf0 + user.visible_message( \ + "[user] takes a piece of omelette with their fork!", \ + "\blue You take a piece of omelette with your fork!" \ + ) + reagents.remove_reagent("nutriment", 1) + if (reagents.total_volume <= 0) + del(src) +/* + * Unsused. +/obj/item/weapon/reagent_containers/food/snacks/omeletteforkload + name = "Omelette Du Fromage" + desc = "That's all you can say!" + New() + ..() + reagents.add_reagent("nutriment", 1) +*/ + +/obj/item/weapon/reagent_containers/food/snacks/muffin + name = "Muffin" + desc = "A delicious and spongy little cake" + icon_state = "muffin" + New() + ..() + reagents.add_reagent("nutriment", 6) + bitesize = 2 + +/obj/item/weapon/reagent_containers/food/snacks/pie + name = "Banana Cream Pie" + desc = "Just like back home, on clown planet! HONK!" + icon_state = "pie" + trash = /obj/item/trash/plate + +/obj/item/weapon/reagent_containers/food/snacks/pie/New() + ..() + reagents.add_reagent("nutriment", 4) + reagents.add_reagent("banana",5) + bitesize = 3 + +/obj/item/weapon/reagent_containers/food/snacks/pie/throw_impact(atom/hit_atom) + ..() + new/obj/effect/decal/cleanable/pie_smudge(src.loc) + src.visible_message("\red [src.name] splats.","\red You hear a splat.") + del(src) + +/obj/item/weapon/reagent_containers/food/snacks/berryclafoutis + name = "Berry Clafoutis" + desc = "No black birds, this is a good sign." + icon_state = "berryclafoutis" + trash = /obj/item/trash/plate + New() + ..() + reagents.add_reagent("nutriment", 4) + reagents.add_reagent("berryjuice", 5) + bitesize = 3 + +/obj/item/weapon/reagent_containers/food/snacks/waffles + name = "waffles" + desc = "Mmm, waffles" + icon_state = "waffles" + trash = /obj/item/trash/waffles + New() + ..() + reagents.add_reagent("nutriment", 8) + bitesize = 2 + +/obj/item/weapon/reagent_containers/food/snacks/eggplantparm + name = "Eggplant Parmigiana" + desc = "The only good recipe for eggplant." + icon_state = "eggplantparm" + trash = /obj/item/trash/plate + New() + ..() + reagents.add_reagent("nutriment", 6) + bitesize = 2 + +/obj/item/weapon/reagent_containers/food/snacks/soylentgreen + name = "Soylent Green" + desc = "Not made of people. Honest." //Totally people. + icon_state = "soylent_green" + trash = /obj/item/trash/waffles + New() + ..() + reagents.add_reagent("nutriment", 10) + bitesize = 2 + +/obj/item/weapon/reagent_containers/food/snacks/soylenviridians + name = "Soylen Virdians" + desc = "Not made of people. Honest." //Actually honest for once. + icon_state = "soylent_yellow" + trash = /obj/item/trash/waffles + New() + ..() + reagents.add_reagent("nutriment", 10) + bitesize = 2 + + +/obj/item/weapon/reagent_containers/food/snacks/meatpie + name = "Meat-pie" + icon_state = "meatpie" + desc = "An old barber recipe, very delicious!" + trash = /obj/item/trash/plate + New() + ..() + reagents.add_reagent("nutriment", 10) + bitesize = 2 + +/obj/item/weapon/reagent_containers/food/snacks/tofupie + name = "Tofu-pie" + icon_state = "meatpie" + desc = "A delicious tofu pie." + trash = /obj/item/trash/plate + New() + ..() + reagents.add_reagent("nutriment", 10) + bitesize = 2 + +/obj/item/weapon/reagent_containers/food/snacks/amanita_pie + name = "amanita pie" + desc = "Sweet and tasty poison pie." + icon_state = "amanita_pie" + New() + ..() + reagents.add_reagent("nutriment", 5) + reagents.add_reagent("amatoxin", 3) + reagents.add_reagent("psilocybin", 1) + bitesize = 3 + +/obj/item/weapon/reagent_containers/food/snacks/plump_pie + name = "plump pie" + desc = "I bet you love stuff made out of plump helmets!" + icon_state = "plump_pie" + New() + ..() + if(prob(10)) + name = "exceptional plump pie" + desc = "Microwave is taken by a fey mood! It has cooked an exceptional plump pie!" + reagents.add_reagent("nutriment", 8) + reagents.add_reagent("tricordrazine", 5) + bitesize = 2 + else + reagents.add_reagent("nutriment", 8) + bitesize = 2 + +/obj/item/weapon/reagent_containers/food/snacks/xemeatpie + name = "Xeno-pie" + icon_state = "xenomeatpie" + desc = "A delicious meatpie. Probably heretical." + trash = /obj/item/trash/plate + New() + ..() + reagents.add_reagent("nutriment", 10) + bitesize = 2 + +/obj/item/weapon/reagent_containers/food/snacks/wingfangchu + name = "Wing Fang Chu" + desc = "A savory dish of alien wing wang in soy." + icon_state = "wingfangchu" + trash = /obj/item/trash/snack_bowl + New() + ..() + reagents.add_reagent("nutriment", 6) + bitesize = 2 + + +/obj/item/weapon/reagent_containers/food/snacks/human/kabob + name = "-kabob" + icon_state = "kabob" + desc = "A human meat, on a stick." + trash = /obj/item/stack/rods + New() + ..() + reagents.add_reagent("nutriment", 8) + bitesize = 2 + +/obj/item/weapon/reagent_containers/food/snacks/monkeykabob + name = "Meat-kabob" + icon_state = "kabob" + desc = "Delicious meat, on a stick." + trash = /obj/item/stack/rods + New() + ..() + reagents.add_reagent("nutriment", 8) + bitesize = 2 + +/obj/item/weapon/reagent_containers/food/snacks/tofukabob + name = "Tofu-kabob" + icon_state = "kabob" + desc = "Vegan meat, on a stick." + trash = /obj/item/stack/rods + New() + ..() + reagents.add_reagent("nutriment", 8) + bitesize = 2 + +/obj/item/weapon/reagent_containers/food/snacks/cubancarp + name = "Cuban Carp" + desc = "A grifftastic sandwich that burns your tongue and then leaves it numb!" + icon_state = "cubancarp" + trash = /obj/item/trash/plate + New() + ..() + reagents.add_reagent("nutriment", 6) + reagents.add_reagent("carpotoxin", 3) + reagents.add_reagent("capsaicin", 3) + bitesize = 3 + +/obj/item/weapon/reagent_containers/food/snacks/popcorn + name = "Popcorn" + desc = "Now let's find some cinema." + icon_state = "popcorn" + trash = /obj/item/trash/popcorn + var/unpopped = 0 + New() + ..() + unpopped = rand(1,10) + reagents.add_reagent("nutriment", 2) + bitesize = 0.1 //this snack is supposed to be eating during looooong time. And this it not dinner food! --rastaf0 + On_Consume() + if(prob(unpopped)) //lol ...what's the point? + usr << "\red You bite down on an un-popped kernel!" + unpopped = max(0, unpopped-1) + ..() + + +/obj/item/weapon/reagent_containers/food/snacks/sosjerky + name = "Scaredy's Private Reserve Beef Jerky" + icon_state = "sosjerky" + desc = "Beef jerky made from the finest space cows." + trash = /obj/item/trash/sosjerky + New() + ..() + reagents.add_reagent("nutriment", 4) + bitesize = 2 + +/obj/item/weapon/reagent_containers/food/snacks/no_raisin + name = "4no Raisins" + icon_state = "4no_raisins" + desc = "Best raisins in the universe. Not sure why." + trash = /obj/item/trash/raisins + New() + ..() + reagents.add_reagent("nutriment", 6) + +/obj/item/weapon/reagent_containers/food/snacks/spacetwinkie + name = "Space Twinkie" + icon_state = "space_twinkie" + desc = "Guaranteed to survive longer then you will." + New() + ..() + reagents.add_reagent("sugar", 4) + bitesize = 2 + +/obj/item/weapon/reagent_containers/food/snacks/cheesiehonkers + name = "Cheesie Honkers" + icon_state = "cheesie_honkers" + desc = "Bite sized cheesie snacks that will honk all over your mouth" + trash = /obj/item/trash/cheesie + New() + ..() + reagents.add_reagent("nutriment", 4) + bitesize = 2 + +/obj/item/weapon/reagent_containers/food/snacks/syndicake + name = "Syndi-Cakes" + icon_state = "syndi_cakes" + desc = "An extremely moist snack cake that tastes just as good after being nuked." + trash = /obj/item/trash/syndi_cakes + New() + ..() + reagents.add_reagent("nutriment", 4) + reagents.add_reagent("syndicream", 2) + bitesize = 3 + +/obj/item/weapon/reagent_containers/food/snacks/loadedbakedpotato + name = "Loaded Baked Potato" + desc = "Totally baked." + icon_state = "loadedbakedpotato" + New() + ..() + reagents.add_reagent("nutriment", 6) + bitesize = 2 + +/obj/item/weapon/reagent_containers/food/snacks/fries + name = "Space Fries" + desc = "AKA: French Fries, Freedom Fries, etc" + icon_state = "fries" + trash = /obj/item/trash/plate + New() + ..() + reagents.add_reagent("nutriment", 4) + bitesize = 2 + +/obj/item/weapon/reagent_containers/food/snacks/soydope + name = "Soy Dope" + desc = "Dope from a soy." + icon_state = "soydope" + trash = /obj/item/trash/plate + New() + ..() + reagents.add_reagent("nutriment", 2) + bitesize = 2 + +/obj/item/weapon/reagent_containers/food/snacks/spagetti + name = "Spagetti" + desc = "Now thats a nice pasta!" + icon_state = "spagetti" + New() + ..() + reagents.add_reagent("nutriment", 1) + bitesize = 1 + +/obj/item/weapon/reagent_containers/food/snacks/cheesyfries + name = "Cheesy Fries" + desc = "Fries. Covered in cheese. Duh." + icon_state = "cheesyfries" + trash = /obj/item/trash/plate + New() + ..() + reagents.add_reagent("nutriment", 6) + bitesize = 2 + +/obj/item/weapon/reagent_containers/food/snacks/fortunecookie + name = "Fortune cookie" + desc = "A true prophecy in each cookie!" + icon_state = "fortune_cookie" + New() + ..() + reagents.add_reagent("nutriment", 3) + bitesize = 2 + +/obj/item/weapon/reagent_containers/food/snacks/badrecipe + name = "Burned mess" + desc = "Someone should be demoted from chef for this." + icon_state = "badrecipe" + New() + ..() + reagents.add_reagent("toxin", 1) + reagents.add_reagent("carbon", 3) + bitesize = 2 + +/obj/item/weapon/reagent_containers/food/snacks/meatsteak + name = "Meat steak" + desc = "A piece of hot spicy meat." + icon_state = "meatstake" + trash = /obj/item/trash/plate + New() + ..() + reagents.add_reagent("nutriment", 4) + reagents.add_reagent("sodiumchloride", 1) + reagents.add_reagent("blackpepper", 1) + bitesize = 3 + +/obj/item/weapon/reagent_containers/food/snacks/spacylibertyduff + name = "Spacy Liberty Duff" + desc = "Jello gelatin, from Alfred Hubbard's cookbook" + icon_state = "spacylibertyduff" + trash = /obj/item/trash/snack_bowl + New() + ..() + reagents.add_reagent("nutriment", 6) + reagents.add_reagent("psilocybin", 6) + bitesize = 3 + +/obj/item/weapon/reagent_containers/food/snacks/amanitajelly + name = "Amanita Jelly" + desc = "Looks curiously toxic" + icon_state = "amanitajelly" + trash = /obj/item/trash/snack_bowl + New() + ..() + reagents.add_reagent("nutriment", 6) + reagents.add_reagent("amatoxin", 6) + reagents.add_reagent("psilocybin", 3) + bitesize = 3 + +/obj/item/weapon/reagent_containers/food/snacks/poppypretzel + name = "Poppy pretzel" + desc = "It's all twisted up!" + icon_state = "poppypretzel" + bitesize = 2 + New() + ..() + reagents.add_reagent("nutriment", 5) + bitesize = 2 + + +/obj/item/weapon/reagent_containers/food/snacks/meatballsoup + name = "Meatball soup" + desc = "You've got balls kid, BALLS!" + icon_state = "meatballsoup" + trash = /obj/item/trash/snack_bowl + New() + ..() + reagents.add_reagent("nutriment", 8) + reagents.add_reagent("water", 5) + bitesize = 5 + +/obj/item/weapon/reagent_containers/food/snacks/metroidsoup + name = "Metroid soup" + desc = "Tasty" + icon_state = "metroidsoup" + New() + ..() + reagents.add_reagent("metroid", 5) + reagents.add_reagent("water", 10) + bitesize = 5 + +/obj/item/weapon/reagent_containers/food/snacks/bloodsoup + name = "Meatball soup" + desc = "Smells like copper" + icon_state = "meatballsoup" + New() + ..() + reagents.add_reagent("nutriment", 2) + reagents.add_reagent("blood", 10) + reagents.add_reagent("water", 5) + bitesize = 5 + +/obj/item/weapon/reagent_containers/food/snacks/clownstears + name = "Clown's Tears" + desc = "Not very funny." + icon_state = "clownstears" + New() + ..() + reagents.add_reagent("nutriment", 4) + reagents.add_reagent("banana", 5) + reagents.add_reagent("water", 10) + bitesize = 5 + +/obj/item/weapon/reagent_containers/food/snacks/vegetablesoup + name = "Vegetable soup" + desc = "A true vegan meal" //TODO + icon_state = "vegetablesoup" + trash = /obj/item/trash/snack_bowl + New() + ..() + reagents.add_reagent("nutriment", 8) + reagents.add_reagent("water", 5) + bitesize = 5 + +/obj/item/weapon/reagent_containers/food/snacks/nettlesoup + name = "Nettle soup" + desc = "To think, the botanist would've beat you to death with one of these." + icon_state = "nettlesoup" + trash = /obj/item/trash/snack_bowl + New() + ..() + reagents.add_reagent("nutriment", 8) + reagents.add_reagent("water", 5) + reagents.add_reagent("tricordrazine", 5) + bitesize = 5 + +/obj/item/weapon/reagent_containers/food/snacks/mysterysoup + name = "Mystery soup" + desc = "The mystery is, why aren't you eating it?" + icon_state = "mysterysoup" + trash = /obj/item/trash/snack_bowl + New() + ..() + var/mysteryselect = pick(1,2,3,4,5,6,7,8,9,10) + switch(mysteryselect) + if(1) + reagents.add_reagent("nutriment", 6) + reagents.add_reagent("capsaicin", 3) + reagents.add_reagent("tomatojuice", 2) + if(2) + reagents.add_reagent("nutriment", 6) + reagents.add_reagent("frostoil", 3) + reagents.add_reagent("tomatojuice", 2) + if(3) + reagents.add_reagent("nutriment", 5) + reagents.add_reagent("water", 5) + reagents.add_reagent("tricordrazine", 5) + if(4) + reagents.add_reagent("nutriment", 5) + reagents.add_reagent("water", 10) + if(5) + reagents.add_reagent("nutriment", 2) + reagents.add_reagent("banana", 10) + if(6) + reagents.add_reagent("nutriment", 6) + reagents.add_reagent("blood", 10) + if(7) + reagents.add_reagent("metroid", 10) + reagents.add_reagent("water", 10) + if(8) + reagents.add_reagent("carbon", 10) + reagents.add_reagent("toxin", 10) + if(9) + reagents.add_reagent("nutriment", 5) + reagents.add_reagent("tomatojuice", 10) + if(10) + reagents.add_reagent("nutriment", 6) + reagents.add_reagent("tomatojuice", 5) + reagents.add_reagent("imidazoline", 5) + bitesize = 5 + +/obj/item/weapon/reagent_containers/food/snacks/wishsoup + name = "Wish Soup" + desc = "I wish this was soup." + icon_state = "wishsoup" + trash = /obj/item/trash/snack_bowl + New() + ..() + reagents.add_reagent("water", 10) + bitesize = 5 + if(prob(25)) + src.desc = "A wish come true!" + reagents.add_reagent("nutriment", 8) + +/obj/item/weapon/reagent_containers/food/snacks/hotchili + name = "Hot Chili" + desc = "A five alarm Texan Chili!" + icon_state = "hotchili" + trash = /obj/item/trash/snack_bowl + New() + ..() + reagents.add_reagent("nutriment", 6) + reagents.add_reagent("capsaicin", 3) + reagents.add_reagent("tomatojuice", 2) + bitesize = 5 + + +/obj/item/weapon/reagent_containers/food/snacks/coldchili + name = "Cold Chili" + desc = "This slush is barely a liquid!" + icon_state = "coldchili" + trash = /obj/item/trash/snack_bowl + New() + ..() + reagents.add_reagent("nutriment", 6) + reagents.add_reagent("frostoil", 3) + reagents.add_reagent("tomatojuice", 2) + bitesize = 5 + +/obj/item/weapon/reagent_containers/food/snacks/telebacon + name = "Tele Bacon" + desc = "It tastes a little odd but it is still delicious." + icon_state = "bacon" + var/obj/item/device/radio/beacon/bacon/baconbeacon + bitesize = 2 + New() + ..() + reagents.add_reagent("nutriment", 4) + baconbeacon = new /obj/item/device/radio/beacon/bacon(src) + On_Consume() + if(!reagents.total_volume) + baconbeacon.loc = usr + baconbeacon.digest_delay() + + +/obj/item/weapon/reagent_containers/food/snacks/monkeycube + name = "monkey cube" + desc = "Just add water!" + icon_state = "monkeycube" + bitesize = 12 + var/wrapped = 0 + + New() + ..() + reagents.add_reagent("nutriment",10) + + afterattack(obj/O as obj, mob/user as mob) + if(istype(O,/obj/structure/sink) && !wrapped) + user << "You place [name] under a stream of water..." + loc = get_turf(O) + return Expand() + ..() + + attack_self(mob/user as mob) + if(wrapped) + Unwrap(user) + + proc/Expand() + for(var/mob/M in viewers(src,7)) + M << "\red The monkey cube expands!" + new /mob/living/carbon/monkey(get_turf(src)) + del(src) + + proc/Unwrap(mob/user as mob) + icon_state = "monkeycube" + desc = "Just add water!" + user << "You unwrap the cube." + wrapped = 0 + return + +/obj/item/weapon/reagent_containers/food/snacks/monkeycube/wrapped + desc = "Still wrapped in some paper." + icon_state = "monkeycubewrap" + wrapped = 1 + + +/obj/item/weapon/reagent_containers/food/snacks/spellburger + name = "Spell Burger" + desc = "This is absolutely Ei Nath." + icon_state = "spellburger" + New() + ..() + reagents.add_reagent("nutriment", 6) + bitesize = 2 + +/obj/item/weapon/reagent_containers/food/snacks/bigbiteburger + name = "Big Bite Burger" + desc = "Forget the Big Mac. THIS is the future!" + icon_state = "bigbiteburger" + New() + ..() + reagents.add_reagent("nutriment", 14) + bitesize = 3 + +/obj/item/weapon/reagent_containers/food/snacks/enchiladas + name = "Enchiladas" + desc = "Viva La Mexico!" + icon_state = "enchiladas" + trash = /obj/item/trash/tray + New() + ..() + reagents.add_reagent("nutriment",8) + reagents.add_reagent("capsaicin", 6) + bitesize = 4 + +/obj/item/weapon/reagent_containers/food/snacks/monkeysdelight + name = "monkey's Delight" + desc = "Eeee Eee!" + icon_state = "monkeysdelight" + trash = /obj/item/trash/tray + New() + ..() + reagents.add_reagent("nutriment", 10) + reagents.add_reagent("banana", 5) + reagents.add_reagent("blackpepper", 1) + reagents.add_reagent("sodiumchloride", 1) + bitesize = 6 + +/obj/item/weapon/reagent_containers/food/snacks/baguette + name = "Baguette" + desc = "Bon appetit!" + icon_state = "baguette" + New() + ..() + reagents.add_reagent("nutriment", 6) + reagents.add_reagent("blackpepper", 1) + reagents.add_reagent("sodiumchloride", 1) + bitesize = 3 + +/obj/item/weapon/reagent_containers/food/snacks/fishandchips + name = "Fish and Chips" + desc = "I do say so myself chap." + icon_state = "fishandchips" + New() + ..() + reagents.add_reagent("nutriment", 6) + reagents.add_reagent("carpotoxin", 3) + bitesize = 3 + +/obj/item/weapon/reagent_containers/food/snacks/sandwich + name = "Sandwich" + desc = "A grand creation of meat, cheese, bread, and several leaves of lettuce! Arthur Dent would be proud." + icon_state = "sandwich" + trash = /obj/item/trash/plate + New() + ..() + reagents.add_reagent("nutriment", 6) + bitesize = 2 + +/obj/item/weapon/reagent_containers/food/snacks/toastedsandwich + name = "Toasted Sandwich" + desc = "Now if you only had a pepper bar." + icon_state = "toastedsandwich" + trash = /obj/item/trash/plate + New() + ..() + reagents.add_reagent("nutriment", 6) + reagents.add_reagent("carbon", 2) + bitesize = 2 + +/obj/item/weapon/reagent_containers/food/snacks/grilledcheese + name = "Grilled Cheese Sandwich" + desc = "Goes great with Tomato soup!" + icon_state = "toastedsandwich" + trash = /obj/item/trash/plate + New() + ..() + reagents.add_reagent("nutriment", 7) + bitesize = 2 + +/obj/item/weapon/reagent_containers/food/snacks/tomatosoup + name = "Tomato Soup" + desc = "Drinking this feels like being a vampire! A tomato vampire..." + icon_state = "tomatosoup" + trash = /obj/item/trash/snack_bowl + New() + ..() + reagents.add_reagent("nutriment", 5) + reagents.add_reagent("tomatojuice", 10) + bitesize = 3 + +/obj/item/weapon/reagent_containers/food/snacks/rofflewaffles + name = "Roffle Waffles" + desc = "Waffles from Roffle. Co." + icon_state = "rofflewaffles" + trash = /obj/item/trash/waffles + New() + ..() + reagents.add_reagent("nutriment", 8) + reagents.add_reagent("psilocybin", 8) + bitesize = 4 + +/obj/item/weapon/reagent_containers/food/snacks/stew + name = "Stew" + desc = "A nice and warm stew. Healthy and strong." + icon_state = "stew" + New() + ..() + reagents.add_reagent("nutriment", 10) + reagents.add_reagent("tomatojuice", 5) + reagents.add_reagent("imidazoline", 5) + reagents.add_reagent("water", 5) + bitesize = 10 + +/obj/item/weapon/reagent_containers/food/snacks/metroidtoast + name = "Metroid Toast" + desc = "A slice of bread covered with delicious jam." + icon_state = "metroidtoast" + trash = /obj/item/trash/plate + New() + ..() + reagents.add_reagent("nutriment", 1) + reagents.add_reagent("metroid", 5) + bitesize = 3 + +/obj/item/weapon/reagent_containers/food/snacks/metroidburger + name = "Metroid Burger" + desc = "A very toxic and tasty burger." + icon_state = "metroidburger" + New() + ..() + reagents.add_reagent("nutriment", 1) + reagents.add_reagent("metroid", 5) + bitesize = 2 + +/obj/item/weapon/reagent_containers/food/snacks/milosoup + name = "Milosoup" + desc = "The universes best soup! Yum!!!" + icon_state = "milosoup" + trash = /obj/item/trash/snack_bowl + New() + ..() + reagents.add_reagent("nutriment", 8) + reagents.add_reagent("water", 5) + bitesize = 4 + +/obj/item/weapon/reagent_containers/food/snacks/stewedsoymeat + name = "Stewed Soy Meat" + desc = "Even non-vegetarians will LOVE this!" + icon_state = "stewedsoymeat" + trash = /obj/item/trash/plate + New() + ..() + reagents.add_reagent("nutriment", 8) + bitesize = 2 + +/obj/item/weapon/reagent_containers/food/snacks/boiledspagetti + name = "Boiled Spagetti" + desc = "A plain dish of noodles, this sucks." + icon_state = "spagettiboiled" + trash = /obj/item/trash/plate + New() + ..() + reagents.add_reagent("nutriment", 2) + bitesize = 2 + +/obj/item/weapon/reagent_containers/food/snacks/pastatomato + name = "Spagetti" + desc = "Spaghetti and crushed tomatoes. Just like your abusive father used to make!" + icon_state = "pastatomato" + trash = /obj/item/trash/plate + New() + ..() + reagents.add_reagent("nutriment", 6) + reagents.add_reagent("tomatojuice", 10) + bitesize = 4 + +/obj/item/weapon/reagent_containers/food/snacks/meatballspagetti + name = "Spagetti & Meatballs" + desc = "Now thats a nic'e meatball!" + icon_state = "meatballspagetti" + trash = /obj/item/trash/plate + New() + ..() + reagents.add_reagent("nutriment", 8) + bitesize = 2 + +/obj/item/weapon/reagent_containers/food/snacks/spesslaw + name = "Spesslaw" + desc = "A lawyers favourite" + icon_state = "spesslaw" + New() + ..() + reagents.add_reagent("nutriment", 8) + bitesize = 2 + +/obj/item/weapon/reagent_containers/food/snacks/poppypretzel + name = "Poppy Pretzel" + desc = "A large soft pretzel full of POP!" + icon_state = "poppypretzel" + New() + ..() + reagents.add_reagent("nutriment", 5) + bitesize = 2 + +/obj/item/weapon/reagent_containers/food/snacks/carrotfries + name = "Carrot Fries" + desc = "Tasty fries from fresh Carrots." + icon_state = "carrotfries" + trash = /obj/item/trash/plate + New() + ..() + reagents.add_reagent("nutriment", 3) + reagents.add_reagent("imidazoline", 3) + bitesize = 2 + +/obj/item/weapon/reagent_containers/food/snacks/superbiteburger + name = "Super Bite Burger" + desc = "This is a mountain of a burger. FOOD!" + icon_state = "superbiteburger" + New() + ..() + reagents.add_reagent("nutriment", 40) + bitesize = 10 + +/obj/item/weapon/reagent_containers/food/snacks/candiedapple + name = "Candied Apple" + desc = "An apple coated in sugary sweetness." + icon_state = "candiedapple" + New() + ..() + reagents.add_reagent("nutriment", 3) + bitesize = 3 + +/obj/item/weapon/reagent_containers/food/snacks/applepie + name = "Apple Pie" + desc = "A pie containing sweet sweet love...or apple." + icon_state = "applepie" + New() + ..() + reagents.add_reagent("nutriment", 4) + bitesize = 3 + +/obj/item/weapon/reagent_containers/food/snacks/twobread + name = "Two Bread" + desc = "It is very bitter and winy." + icon_state = "twobread" + New() + ..() + reagents.add_reagent("nutriment", 2) + bitesize = 3 + +/obj/item/weapon/reagent_containers/food/snacks/metroidsandwich + name = "Metroid Sandwich" + desc = "A sandwich is green stuff." + icon_state = "metroidsandwich" + trash = /obj/item/trash/plate + New() + ..() + reagents.add_reagent("nutriment", 2) + reagents.add_reagent("metroid", 5) + bitesize = 3 + +/obj/item/weapon/reagent_containers/food/snacks/boiledmetroidcore + name = "Boiled Metroid Core" + desc = "A boiled red thing." + icon_state = "boiledmetroidcore" + New() + ..() + reagents.add_reagent("metroid", 5) + bitesize = 3 + +/obj/item/weapon/reagent_containers/food/snacks/mint + name = "mint" + desc = "it is only wafer thin." + icon_state = "mint" + New() + ..() + reagents.add_reagent("minttoxin", 1) + bitesize = 1 + +/obj/item/weapon/reagent_containers/food/snacks/mushroomsoup + name = "chantrelle soup" + desc = "A delicious and hearty mushroom soup." + icon_state = "mushroomsoup" + trash = /obj/item/trash/snack_bowl + New() + ..() + reagents.add_reagent("nutriment", 8) + bitesize = 3 + +/obj/item/weapon/reagent_containers/food/snacks/plumphelmetbiscuit + name = "plump helmet biscuit" + desc = "This is a finely-prepared plump helmet biscuit. The ingredients are exceptionally minced plump helmet, and well-minced dwarven wheat flour." + icon_state = "phelmbiscuit" + New() + ..() + if(prob(10)) + name = "exceptional plump helmet biscuit" + desc = "Microwave is taken by a fey mood! It has cooked an exceptional plump helmet biscuit!" + reagents.add_reagent("nutriment", 8) + reagents.add_reagent("tricordrazine", 5) + bitesize = 2 + else + reagents.add_reagent("nutriment", 5) + bitesize = 2 + +/obj/item/weapon/reagent_containers/food/snacks/chawanmushi + name = "chawanmushi" + desc = "A legendary egg custard that makes friends out of enemies. Probably too hot for a cat to eat." + icon_state = "chawanmushi" + trash = /obj/item/trash/snack_bowl + New() + ..() + reagents.add_reagent("nutriment", 5) + bitesize = 1 + +/obj/item/weapon/reagent_containers/food/snacks/beetsoup + name = "beet soup" + desc = "Wait, how do you spell it again..?" + icon_state = "beetsoup" + trash = /obj/item/trash/snack_bowl + New() + ..() + switch(rand(1,6)) + if(1) + name = "borsch" + if(2) + name = "bortsch" + if(3) + name = "borstch" + if(4) + name = "borsh" + if(5) + name = "borshch" + if(6) + name = "borscht" + reagents.add_reagent("nutriment", 8) + bitesize = 2 + +/obj/item/weapon/reagent_containers/food/snacks/herbsalad + name = "herb salad" + desc = "A tasty salad with apples on top." + icon_state = "herbsalad" + trash = /obj/item/trash/snack_bowl + New() + ..() + reagents.add_reagent("nutriment", 8) + bitesize = 3 + +/obj/item/weapon/reagent_containers/food/snacks/validsalad + name = "valid salad" + desc = "It's just an herb salad with meatballs and fried potato slices. Nothing suspicious about it." + icon_state = "validsalad" + trash = /obj/item/trash/snack_bowl + New() + ..() + reagents.add_reagent("nutriment", 8) + reagents.add_reagent("syndicream", 5) + bitesize = 3 + +/obj/item/weapon/reagent_containers/food/snacks/appletart + name = "golden apple streusel tart" + desc = "A tasty dessert that won't make it through a metal detector." + icon_state = "gappletart" + trash = /obj/item/trash/plate + New() + ..() + reagents.add_reagent("nutriment", 8) + reagents.add_reagent("gold", 5) + bitesize = 3 + +/////////////////////////////////////////////////Sliceable//////////////////////////////////////// +// All the food items that can be sliced into smaller bits like Meatbread and Cheesewheels + +// sliceable is just an organization type path, it doesn't have any additional code or variables tied to it. + +/obj/item/weapon/reagent_containers/food/snacks/sliceable/meatbread + name = "meatbread loaf" + desc = "The culinary base of every self-respecting eloquen/tg/entleman." + icon_state = "meatbread" + slice_path = /obj/item/weapon/reagent_containers/food/snacks/meatbreadslice + slices_num = 5 + New() + ..() + reagents.add_reagent("nutriment", 30) + bitesize = 2 + +/obj/item/weapon/reagent_containers/food/snacks/meatbreadslice + name = "meatbread slice" + desc = "A slice of delicious meatbread." + icon_state = "meatbreadslice" + trash = /obj/item/trash/plate + bitesize = 2 + +/obj/item/weapon/reagent_containers/food/snacks/sliceable/xenomeatbread + name = "xenomeatbread loaf" + desc = "The culinary base of every self-respecting eloquen/tg/entleman. Extra Heretical." + icon_state = "xenomeatbread" + slice_path = /obj/item/weapon/reagent_containers/food/snacks/xenomeatbreadslice + slices_num = 5 + New() + ..() + reagents.add_reagent("nutriment", 30) + bitesize = 2 + +/obj/item/weapon/reagent_containers/food/snacks/xenomeatbreadslice + name = "xenomeatbread slice" + desc = "A slice of delicious meatbread. Extra Heretical." + icon_state = "xenobreadslice" + trash = /obj/item/trash/plate + bitesize = 2 + +/obj/item/weapon/reagent_containers/food/snacks/sliceable/bananabread + name = "Banana-nut bread" + desc = "A heavenly and filling treat." + icon_state = "bananabread" + slice_path = /obj/item/weapon/reagent_containers/food/snacks/bananabreadslice + slices_num = 5 + New() + ..() + reagents.add_reagent("banana", 20) + reagents.add_reagent("nutriment", 20) + bitesize = 2 + +/obj/item/weapon/reagent_containers/food/snacks/bananabreadslice + name = "Banana-nut bread slice" + desc = "A slice of delicious banana bread." + icon_state = "bananabreadslice" + trash = /obj/item/trash/plate + bitesize = 2 + +/obj/item/weapon/reagent_containers/food/snacks/sliceable/tofubread + name = "Tofubread" + icon_state = "Like meatbread but for vegetarians. Not guaranteed to give superpowers." + icon_state = "tofubread" + slice_path = /obj/item/weapon/reagent_containers/food/snacks/tofubreadslice + slices_num = 5 + New() + ..() + reagents.add_reagent("nutriment", 30) + bitesize = 2 + +/obj/item/weapon/reagent_containers/food/snacks/tofubreadslice + name = "Tofubread slice" + desc = "A slice of delicious tofubread." + icon_state = "tofubreadslice" + trash = /obj/item/trash/plate + bitesize = 2 + + +/obj/item/weapon/reagent_containers/food/snacks/sliceable/carrotcake + name = "Carrot Cake" + desc = "A favorite desert of a certain wascally wabbit. Not a lie." + icon_state = "carrotcake" + slice_path = /obj/item/weapon/reagent_containers/food/snacks/carrotcakeslice + slices_num = 5 + New() + ..() + reagents.add_reagent("nutriment", 25) + reagents.add_reagent("imidazoline", 10) + bitesize = 2 + +/obj/item/weapon/reagent_containers/food/snacks/carrotcakeslice + name = "Carrot Cake slice" + desc = "Carrotty slice of Carrot Cake, carrots are good for your eyes! Also not a lie." + icon_state = "carrotcake_slice" + trash = /obj/item/trash/plate + bitesize = 2 + +/obj/item/weapon/reagent_containers/food/snacks/sliceable/braincake + name = "Brain Cake" + desc = "A squishy cake-thing." + icon_state = "braincake" + slice_path = /obj/item/weapon/reagent_containers/food/snacks/braincakeslice + slices_num = 5 + New() + ..() + reagents.add_reagent("nutriment", 25) + reagents.add_reagent("alkysine", 10) + bitesize = 2 + +/obj/item/weapon/reagent_containers/food/snacks/braincakeslice + name = "Brain Cake slice" + desc = "Lemme tell you something about prions. THEY'RE DELICIOUS." + icon_state = "braincakeslice" + trash = /obj/item/trash/plate + bitesize = 2 + +/obj/item/weapon/reagent_containers/food/snacks/sliceable/cheesecake + name = "Cheese Cake" + desc = "DANGEROUSLY cheesy." + icon_state = "cheesecake" + slice_path = /obj/item/weapon/reagent_containers/food/snacks/cheesecakeslice + slices_num = 5 + New() + ..() + reagents.add_reagent("nutriment", 25) + bitesize = 2 + +/obj/item/weapon/reagent_containers/food/snacks/cheesecakeslice + name = "Cheese Cake slice" + desc = "Slice of pure cheestisfaction" + icon_state = "cheesecake_slice" + trash = /obj/item/trash/plate + bitesize = 2 + +/obj/item/weapon/reagent_containers/food/snacks/sliceable/plaincake + name = "Vanilla Cake" + desc = "A plain cake, not a lie." + icon_state = "plaincake" + slice_path = /obj/item/weapon/reagent_containers/food/snacks/plaincakeslice + slices_num = 5 + New() + ..() + reagents.add_reagent("nutriment", 20) + +/obj/item/weapon/reagent_containers/food/snacks/plaincakeslice + name = "Vanilla Cake slice" + desc = "Just a slice of cake, it is enough for everyone." + icon_state = "plaincake_slice" + trash = /obj/item/trash/plate + bitesize = 2 + +/obj/item/weapon/reagent_containers/food/snacks/sliceable/orangecake + name = "Orange Cake" + desc = "A cake with added orange." + icon_state = "orangecake" + slice_path = /obj/item/weapon/reagent_containers/food/snacks/orangecakeslice + slices_num = 5 + New() + ..() + reagents.add_reagent("nutriment", 20) + +/obj/item/weapon/reagent_containers/food/snacks/orangecakeslice + name = "Orange Cake slice" + desc = "Just a slice of cake, it is enough for everyone." + icon_state = "orangecake_slice" + trash = /obj/item/trash/plate + bitesize = 2 + +/obj/item/weapon/reagent_containers/food/snacks/sliceable/limecake + name = "Lime Cake" + desc = "A cake with added lime." + icon_state = "limecake" + slice_path = /obj/item/weapon/reagent_containers/food/snacks/limecakeslice + slices_num = 5 + New() + ..() + reagents.add_reagent("nutriment", 20) + +/obj/item/weapon/reagent_containers/food/snacks/limecakeslice + name = "Lime Cake slice" + desc = "Just a slice of cake, it is enough for everyone." + icon_state = "limecake_slice" + trash = /obj/item/trash/plate + bitesize = 2 + +/obj/item/weapon/reagent_containers/food/snacks/sliceable/lemoncake + name = "Lemon Cake" + desc = "A cake with added lemon." + icon_state = "lemoncake" + slice_path = /obj/item/weapon/reagent_containers/food/snacks/lemoncakeslice + slices_num = 5 + New() + ..() + reagents.add_reagent("nutriment", 20) + +/obj/item/weapon/reagent_containers/food/snacks/lemoncakeslice + name = "Lemon Cake slice" + desc = "Just a slice of cake, it is enough for everyone." + icon_state = "lemoncake_slice" + trash = /obj/item/trash/plate + bitesize = 2 + +/obj/item/weapon/reagent_containers/food/snacks/sliceable/chocolatecake + name = "Chocolate Cake" + desc = "A cake with added chocolate" + icon_state = "chocolatecake" + slice_path = /obj/item/weapon/reagent_containers/food/snacks/chocolatecakeslice + slices_num = 5 + New() + ..() + reagents.add_reagent("nutriment", 20) + +/obj/item/weapon/reagent_containers/food/snacks/chocolatecakeslice + name = "Chocolate Cake slice" + desc = "Just a slice of cake, it is enough for everyone." + icon_state = "chocolatecake_slice" + trash = /obj/item/trash/plate + bitesize = 2 + +/obj/item/weapon/reagent_containers/food/snacks/sliceable/cheesewheel + name = "Cheese wheel" + desc = "A big wheel of delcious Cheddar." + icon_state = "cheesewheel" + slice_path = /obj/item/weapon/reagent_containers/food/snacks/cheesewedge + slices_num = 5 + New() + ..() + reagents.add_reagent("nutriment", 20) + bitesize = 2 + +/obj/item/weapon/reagent_containers/food/snacks/cheesewedge + name = "Cheese wedge" + desc = "A wedge of delicious Cheddar. The cheese wheel it was cut from can't have gone far." + icon_state = "cheesewedge" + bitesize = 2 + +/obj/item/weapon/reagent_containers/food/snacks/sliceable/birthdaycake + name = "Birthday Cake" + desc = "Happy Birthday little clown..." + icon_state = "birthdaycake" + slice_path = /obj/item/weapon/reagent_containers/food/snacks/birthdaycakeslice + slices_num = 5 + New() + ..() + reagents.add_reagent("nutriment", 20) + reagents.add_reagent("sprinkles", 10) + bitesize = 3 + +/obj/item/weapon/reagent_containers/food/snacks/birthdaycakeslice + name = "Birthday Cake slice" + desc = "A slice of your birthday" + icon_state = "birthdaycakeslice" + trash = /obj/item/trash/plate + bitesize = 2 + +/obj/item/weapon/reagent_containers/food/snacks/sliceable/bread + name = "Bread" + icon_state = "Some plain old Earthen bread." + icon_state = "bread" + slice_path = /obj/item/weapon/reagent_containers/food/snacks/breadslice + slices_num = 5 + New() + ..() + reagents.add_reagent("nutriment", 6) + bitesize = 2 + +/obj/item/weapon/reagent_containers/food/snacks/breadslice + name = "Bread slice" + desc = "A slice of home." + icon_state = "breadslice" + trash = /obj/item/trash/plate + bitesize = 2 + + +/obj/item/weapon/reagent_containers/food/snacks/sliceable/creamcheesebread + name = "Cream Cheese Bread" + desc = "Yum yum yum!" + icon_state = "creamcheesebread" + slice_path = /obj/item/weapon/reagent_containers/food/snacks/creamcheesebreadslice + slices_num = 5 + New() + ..() + reagents.add_reagent("nutriment", 20) + bitesize = 2 + +/obj/item/weapon/reagent_containers/food/snacks/creamcheesebreadslice + name = "Cream Cheese Bread slice" + desc = "A slice of yum!" + icon_state = "creamcheesebreadslice" + trash = /obj/item/trash/plate + bitesize = 2 + + +/obj/item/weapon/reagent_containers/food/snacks/watermelonslice + name = "Watermelon Slice" + desc = "A slice of watery goodness." + icon_state = "watermelonslice" + bitesize = 2 + + +/obj/item/weapon/reagent_containers/food/snacks/sliceable/applecake + name = "Apple Cake" + desc = "A cake centred with Apple" + icon_state = "applecake" + slice_path = /obj/item/weapon/reagent_containers/food/snacks/applecakeslice + slices_num = 5 + New() + ..() + reagents.add_reagent("nutriment", 15) + +/obj/item/weapon/reagent_containers/food/snacks/applecakeslice + name = "Apple Cake slice" + desc = "A slice of heavenly cake." + icon_state = "applecakeslice" + trash = /obj/item/trash/plate + bitesize = 2 + +/obj/item/weapon/reagent_containers/food/snacks/sliceable/pumpkinpie + name = "Pumpkin Pie" + desc = "A delicious treat for the autumn months." + icon_state = "pumpkinpie" + slice_path = /obj/item/weapon/reagent_containers/food/snacks/pumpkinpieslice + slices_num = 5 + New() + ..() + reagents.add_reagent("nutriment", 15) + +/obj/item/weapon/reagent_containers/food/snacks/pumpkinpieslice + name = "Pumpkin Pie slice" + desc = "A slice of pumpkin pie, with whipped cream on top. Perfection." + icon_state = "pumpkinpieslice" + trash = /obj/item/trash/plate + bitesize = 2 + + + +/////////////////////////////////////////////////PIZZA//////////////////////////////////////// + +/obj/item/weapon/reagent_containers/food/snacks/sliceable/pizza + slices_num = 6 + +/obj/item/weapon/reagent_containers/food/snacks/sliceable/pizza/margherita + name = "Margherita" + desc = "The most cheezy pizza in galaxy" + icon_state = "pizzamargherita" + slice_path = /obj/item/weapon/reagent_containers/food/snacks/margheritaslice + slices_num = 6 + New() + ..() + reagents.add_reagent("nutriment", 40) + reagents.add_reagent("tomatojuice", 6) + bitesize = 2 + +/obj/item/weapon/reagent_containers/food/snacks/margheritaslice + name = "Margherita slice" + desc = "A slice of the most cheezy pizza in galaxy" + icon_state = "pizzamargheritaslice" + bitesize = 2 + +/obj/item/weapon/reagent_containers/food/snacks/sliceable/pizza/meatpizza + name = "Meatpizza" + desc = "" //TODO: + icon_state = "meatpizza" + slice_path = /obj/item/weapon/reagent_containers/food/snacks/meatpizzaslice + slices_num = 6 + New() + ..() + reagents.add_reagent("nutriment", 50) + reagents.add_reagent("tomatojuice", 6) + bitesize = 2 + +/obj/item/weapon/reagent_containers/food/snacks/meatpizzaslice + name = "Meatpizza slice" + desc = "A slice of " //TODO: + icon_state = "meatpizzaslice" + bitesize = 2 + +/obj/item/weapon/reagent_containers/food/snacks/sliceable/pizza/mushroompizza + name = "Mushroompizza" + desc = "Very special pizza" + icon_state = "mushroompizza" + slice_path = /obj/item/weapon/reagent_containers/food/snacks/mushroompizzaslice + slices_num = 6 + New() + ..() + reagents.add_reagent("nutriment", 35) + bitesize = 2 + +/obj/item/weapon/reagent_containers/food/snacks/mushroompizzaslice + name = "Mushroompizza slice" + desc = "Maybe it is the last slice of pizza in your life." + icon_state = "mushroompizzaslice" + bitesize = 2 + +/obj/item/weapon/reagent_containers/food/snacks/sliceable/pizza/vegetablepizza + name = "Vegetable pizza" + desc = "No one of Tomatos Sapiens were harmed during making this pizza" + icon_state = "vegetablepizza" + slice_path = /obj/item/weapon/reagent_containers/food/snacks/vegetablepizzaslice + slices_num = 6 + New() + ..() + reagents.add_reagent("nutriment", 30) + reagents.add_reagent("tomatojuice", 6) + reagents.add_reagent("imidazoline", 12) + bitesize = 2 + +/obj/item/weapon/reagent_containers/food/snacks/vegetablepizzaslice + name = "Vegetable pizza slice" + desc = "A slice of the most green pizza of all pizzas not containing green ingredients " + icon_state = "vegetablepizzaslice" + bitesize = 2 + +/obj/item/pizzabox + name = "pizza box" + desc = "A box suited for pizzas." + icon = 'icons/obj/food.dmi' + icon_state = "pizzabox1" + + var/open = 0 // Is the box open? + var/ismessy = 0 // Fancy mess on the lid + var/obj/item/weapon/reagent_containers/food/snacks/sliceable/pizza/pizza // Content pizza + var/list/boxes = list() // If the boxes are stacked, they come here + var/boxtag = "" + +/obj/item/pizzabox/update_icon() + + overlays = list() + + // Set appropriate description + if( open && pizza ) + desc = "A box suited for pizzas. It appears to have a [pizza.name] inside." + else if( boxes.len > 0 ) + desc = "A pile of boxes suited for pizzas. There appears to be [boxes.len + 1] boxes in the pile." + + var/obj/item/pizzabox/topbox = boxes[boxes.len] + var/toptag = topbox.boxtag + if( toptag != "" ) + desc = "[desc] The box on top has a tag, it reads: '[toptag]'." + else + desc = "A box suited for pizzas." + + if( boxtag != "" ) + desc = "[desc] The box has a tag, it reads: '[boxtag]'." + + // Icon states and overlays + if( open ) + if( ismessy ) + icon_state = "pizzabox_messy" + else + icon_state = "pizzabox_open" + + if( pizza ) + var/image/pizzaimg = image("food.dmi", icon_state = pizza.icon_state) + pizzaimg.pixel_y = -3 + overlays += pizzaimg + + return + else + // Stupid code because byondcode sucks + var/doimgtag = 0 + if( boxes.len > 0 ) + var/obj/item/pizzabox/topbox = boxes[boxes.len] + if( topbox.boxtag != "" ) + doimgtag = 1 + else + if( boxtag != "" ) + doimgtag = 1 + + if( doimgtag ) + var/image/tagimg = image("food.dmi", icon_state = "pizzabox_tag") + tagimg.pixel_y = boxes.len * 3 + overlays += tagimg + + icon_state = "pizzabox[boxes.len+1]" + +/obj/item/pizzabox/attack_hand( mob/user as mob ) + + if( open && pizza ) + user.put_in_hands( pizza ) + + user << "\red You take the [src.pizza] out of the [src]." + src.pizza = null + update_icon() + return + + if( boxes.len > 0 ) + if( user.get_inactive_hand() != src ) + ..() + return + + var/obj/item/pizzabox/box = boxes[boxes.len] + boxes -= box + + user.put_in_hands( box ) + user << "\red You remove the topmost [src] from your hand." + box.update_icon() + update_icon() + return + ..() + +/obj/item/pizzabox/attack_self( mob/user as mob ) + + if( boxes.len > 0 ) + return + + open = !open + + if( open && pizza ) + ismessy = 1 + + update_icon() + +/obj/item/pizzabox/attackby( obj/item/I as obj, mob/user as mob ) + if( istype(I, /obj/item/pizzabox/) ) + var/obj/item/pizzabox/box = I + + if( !box.open && !src.open ) + // Make a list of all boxes to be added + var/list/boxestoadd = list() + boxestoadd += box + for(var/obj/item/pizzabox/i in box.boxes) + boxestoadd += i + + if( (boxes.len+1) + boxestoadd.len <= 5 ) + user.drop_item() + + box.loc = src + box.boxes = list() // Clear the box boxes so we don't have boxes inside boxes. - Xzibit + src.boxes.Add( boxestoadd ) + + box.update_icon() + update_icon() + + user << "\red You put the [box] ontop of the [src]!" + else + user << "\red The stack is too high!" + else + user << "\red Close the [box] first!" + + return + + if( istype(I, /obj/item/weapon/reagent_containers/food/snacks/sliceable/pizza/) ) // Long ass fucking object name + + if( src.open ) + user.drop_item() + I.loc = src + src.pizza = I + + update_icon() + + user << "\red You put the [I] in the [src]!" + else + user << "\red You try to push the [I] through the lid but it doesn't work!" + return + + if( istype(I, /obj/item/weapon/pen/) ) + + if( src.open ) + return + + var/t = input("Enter what you want to add to the tag:", "Write", null, null) as text + + var/obj/item/pizzabox/boxtotagto = src + if( boxes.len > 0 ) + boxtotagto = boxes[boxes.len] + + boxtotagto.boxtag = copytext("[boxtotagto.boxtag][t]", 1, 30) + + update_icon() + return + ..() + +/obj/item/weapon/reagent_containers/food/snacks/cracker + name = "Cracker" + desc = "It's a salted cracker." \ No newline at end of file diff --git a/code/modules/reagents/reagent_containers/food/snacks/grown.dm b/code/modules/reagents/reagent_containers/food/snacks/grown.dm new file mode 100644 index 00000000000..57d87150d00 --- /dev/null +++ b/code/modules/reagents/reagent_containers/food/snacks/grown.dm @@ -0,0 +1,925 @@ + + +// *********************************************************** +// Foods that are produced from hydroponics ~~~~~~~~~~ +// Data from the seeds carry over to these grown foods +// *********************************************************** + +//Grown foods +//Subclass so we can pass on values +/obj/item/weapon/reagent_containers/food/snacks/grown/ + var/seed = "" + var/plantname = "" + var/productname = "" + var/species = "" + var/lifespan = 0 + var/endurance = 0 + var/maturation = 0 + var/production = 0 + var/yield = 0 + var/potency = -1 + var/plant_type = 0 + icon = 'icons/obj/harvest.dmi' + New(newloc,newpotency) + if (!isnull(newpotency)) + potency = newpotency + ..() + src.pixel_x = rand(-5.0, 5) + src.pixel_y = rand(-5.0, 5) + +/obj/item/weapon/reagent_containers/food/snacks/grown/attackby(var/obj/item/O as obj, var/mob/user as mob) + ..() + if (istype(O, /obj/item/device/analyzer/plant_analyzer)) + var/msg + msg = "*---------*\n This is \a [src]\n" + switch(plant_type) + if(0) + msg += "- Plant type: Normal plant\n" + if(1) + msg += "- Plant type: Weed\n" + if(2) + msg += "- Plant type: Mushroom\n" + msg += "- Potency: [potency]\n" + msg += "- Yield: [yield]\n" + msg += "- Maturation speed: [maturation]\n" + msg += "- Production speed: [production]\n" + msg += "- Endurance: [endurance]\n" + msg += "- Healing properties: [reagents.get_reagent_amount("nutriment")]\n" + msg += "*---------*" + usr << msg + return + + if (istype(O, /obj/item/weapon/plantbag)) + var/obj/item/weapon/plantbag/S = O + if (S.mode == 1) + for (var/obj/item/weapon/reagent_containers/food/snacks/grown/G in locate(src.x,src.y,src.z)) + if (S.contents.len < S.capacity) + S.contents += G; + else + user << "\blue The plant bag is full." + return + user << "\blue You pick up all the plants." + else + if (S.contents.len < S.capacity) + S.contents += src; + else + user << "\blue The plant bag is full." + return + +/obj/item/weapon/grown/attackby(var/obj/item/O as obj, var/mob/user as mob) + ..() + if (istype(O, /obj/item/device/analyzer/plant_analyzer)) + var/msg + msg = "*---------*\n This is \a [src]\n" + switch(plant_type) + if(0) + msg += "- Plant type: Normal plant\n" + if(1) + msg += "- Plant type: Weed\n" + if(2) + msg += "- Plant type: Mushroom\n" + msg += "- Acid strength: [potency]\n" + msg += "- Yield: [yield]\n" + msg += "- Maturation speed: [maturation]\n" + msg += "- Production speed: [production]\n" + msg += "- Endurance: [endurance]\n" + msg += "*---------*" + usr << msg + return + +/obj/item/weapon/reagent_containers/food/snacks/grown/corn + seed = "/obj/item/seeds/cornseed" + name = "ear of corn" + desc = "Needs some butter!" + icon_state = "corn" + potency = 40 + trash = /obj/item/weapon/corncob + + New() + ..() + spawn(5) //So potency can be set in the proc that creates these crops + reagents.add_reagent("nutriment", 1+round((potency / 10), 1)) + bitesize = 1+round(reagents.total_volume / 2, 1) + + +/obj/item/weapon/reagent_containers/food/snacks/grown/poppy + seed = "/obj/item/seeds/poppyseed" + name = "poppy" + desc = "Long-used as a symbol of rest, peace, and death." + icon_state = "poppy" + potency = 30 + New() + ..() + spawn(5) //So potency can be set in the proc that creates these crops + reagents.add_reagent("nutriment", 1+round((potency / 20), 1)) + reagents.add_reagent("bicaridine", 1+round((potency / 10), 1)) + bitesize = 1+round(reagents.total_volume / 3, 1) + +/obj/item/weapon/reagent_containers/food/snacks/grown/harebell + seed = "obj/item/seeds/harebellseed" + name = "harebell" + desc = "\"I'll sweeten thy sad grave: thou shalt not lack the flower that's like thy face, pale primrose, nor the azured hare-bell, like thy veins; no, nor the leaf of eglantine, whom not to slander, out-sweeten’d not thy breath.\"" + icon_state = "harebell" + potency = 1 + New() + ..() + spawn(5) //So potency can be set in the proc that creates these crops + reagents.add_reagent("nutriment", 1+round((potency / 20), 1)) + bitesize = 1+round(reagents.total_volume / 3, 1) + +/obj/item/weapon/reagent_containers/food/snacks/grown/potato + seed = "/obj/item/seeds/potatoseed" + name = "potato" + desc = "Boil 'em! Mash 'em! Stick 'em in a stew!" + icon_state = "potato" + potency = 25 + New() + ..() + reagents.add_reagent("nutriment", 1+round((potency / 10), 1)) + spawn(5) //So potency can be set in the proc that creates these crops + bitesize = reagents.total_volume + +/obj/item/weapon/reagent_containers/food/snacks/grown/potato/attackby(obj/item/weapon/W as obj, mob/user as mob) + ..() + if(istype(W, /obj/item/weapon/cable_coil)) + if(W:amount >= 5) + W:amount -= 5 + if(!W:amount) del(W) + user << "You add some cable to the potato and slide it inside the battery encasing." + new /obj/item/weapon/cell/potato(user.loc) + del(src) + return + +/obj/item/weapon/reagent_containers/food/snacks/grown/grapes + seed = "/obj/item/seeds/grapeseed" + name = "bunch of grapes" + desc = "Nutritious!" + icon_state = "grapes" + New() + ..() + spawn(5) //So potency can be set in the proc that creates these crops + reagents.add_reagent("nutriment", 1+round((potency / 10), 1)) + reagents.add_reagent("sugar", 1+round((potency / 5), 1)) + bitesize = 1+round(reagents.total_volume / 2, 1) + +/obj/item/weapon/reagent_containers/food/snacks/grown/greengrapes + seed = "/obj/item/seeds/greengrapeseed" + name = "bunch of green grapes" + desc = "Nutritious!" + icon_state = "greengrapes" + potency = 25 + New() + ..() + spawn(5) //So potency can be set in the proc that creates these crops + reagents.add_reagent("nutriment", 1+round((potency / 10), 1)) + reagents.add_reagent("kelotane", 3+round((potency / 5), 1)) + bitesize = 1+round(reagents.total_volume / 2, 1) + +/obj/item/weapon/reagent_containers/food/snacks/grown/cabbage + seed = "/obj/item/seeds/cabbageseed" + name = "cabbage" + desc = "Ewwwwwwwwww. Cabbage." + icon_state = "cabbage" + potency = 25 + New() + ..() + spawn(5) //So potency can be set in the proc that creates these crops + reagents.add_reagent("nutriment", 1+round((potency / 10), 1)) + bitesize = reagents.total_volume + +/obj/item/weapon/reagent_containers/food/snacks/grown/berries + seed = "/obj/item/seeds/berryseed" + name = "bunch of berries" + desc = "Nutritious!" + icon_state = "berrypile" + New() + ..() + spawn(5) //So potency can be set in the proc that creates these crops + reagents.add_reagent("nutriment", 1+round((potency / 10), 1)) + bitesize = 1+round(reagents.total_volume / 2, 1) + +/obj/item/weapon/reagent_containers/food/snacks/grown/glowberries + seed = "/obj/item/seeds/glowberryseed" + name = "bunch of glow-berries" + desc = "Nutritious!" + var/on = 1 + var/brightness_on = 2 //luminosity when on + icon_state = "glowberrypile" + New() + ..() + spawn(5) //So potency can be set in the proc that creates these crops + reagents.add_reagent("nutriment", round((potency / 10), 1)) + reagents.add_reagent("radium", 3+round(potency / 5, 1)) + bitesize = 1+round(reagents.total_volume / 2, 1) + +/obj/item/weapon/reagent_containers/food/snacks/grown/glowberries/Del() + if(istype(loc,/mob)) + loc.sd_SetLuminosity(loc.luminosity - potency/5) + ..() + +/obj/item/weapon/reagent_containers/food/snacks/grown/glowberries/pickup(mob/user) + src.sd_SetLuminosity(0) + user.total_luminosity += potency/5 + +/obj/item/weapon/reagent_containers/food/snacks/grown/glowberries/dropped(mob/user) + user.total_luminosity -= potency/5 + src.sd_SetLuminosity(potency/5) + +/obj/item/weapon/reagent_containers/food/snacks/grown/cocoapod + seed = "/obj/item/seeds/cocoapodseed" + name = "cocoa pod" + desc = "Fattening... Mmmmm... chucklate." + icon_state = "cocoapod" + potency = 50 + New() + ..() + spawn(5) //So potency can be set in the proc that creates these crops + reagents.add_reagent("nutriment", 1+round((potency / 10), 1)) + reagents.add_reagent("coco", 4+round((potency / 5), 1)) + bitesize = 1+round(reagents.total_volume / 2, 1) + +/obj/item/weapon/reagent_containers/food/snacks/grown/sugarcane + seed = "/obj/item/seeds/sugarcaneseed" + name = "sugarcane" + desc = "Sickly sweet." + icon_state = "sugarcane" + potency = 50 + New() + ..() + spawn(5) //So potency can be set in the proc that creates these crops + reagents.add_reagent("sugar", 4+round((potency / 5), 1)) + +/obj/item/weapon/reagent_containers/food/snacks/grown/poisonberries + seed = "/obj/item/seeds/poisonberryseed" + name = "bunch of poison-berries" + desc = "Taste so good, you could die!" + icon_state = "poisonberrypile" + gender = PLURAL + potency = 15 + New() + ..() + spawn(5) //So potency can be set in the proc that creates these crops + reagents.add_reagent("nutriment", 1) + reagents.add_reagent("toxin", 3+round(potency / 5, 1)) + bitesize = 1+round(reagents.total_volume / 2, 1) + +/obj/item/weapon/reagent_containers/food/snacks/grown/deathberries + seed = "/obj/item/seeds/deathberryseed" + name = "bunch of death-berries" + desc = "Taste so good, you could die!" + icon_state = "deathberrypile" + gender = PLURAL + potency = 50 + New() + ..() + spawn(5) //So potency can be set in the proc that creates these crops + reagents.add_reagent("nutriment", 1) + reagents.add_reagent("toxin", 3+round(potency / 3, 1)) + reagents.add_reagent("lexorin", 1+round(potency / 5, 1)) + bitesize = 1+round(reagents.total_volume / 2, 1) + +/obj/item/weapon/reagent_containers/food/snacks/grown/ambrosiavulgaris + seed = "/obj/item/seeds/ambrosiavulgaris" + name = "ambrosia vulgaris branch" + desc = "This is a plant containing various healing chemicals." + icon_state = "ambrosiavulgaris" + potency = 10 + New() + ..() + spawn(5) //So potency can be set in the proc that creates these crops + reagents.add_reagent("nutriment", 1) + reagents.add_reagent("space_drugs", 1+round(potency / 8, 1)) + reagents.add_reagent("kelotane", 1+round(potency / 8, 1)) + reagents.add_reagent("bicaridine", 1+round(potency / 10, 1)) + reagents.add_reagent("toxin", 1+round(potency / 10, 1)) + bitesize = 1+round(reagents.total_volume / 2, 1) + +/obj/item/weapon/reagent_containers/food/snacks/grown/ambrosiadeus + seed = "/obj/item/seeds/ambrosiadeus" + name = "ambrosia deus branch" + desc = "Eating this makes you feel immortal!" + icon_state = "ambrosiadeus" + potency = 10 + New() + ..() + spawn(5) //So potency can be set in the proc that creates these crops + reagents.add_reagent("nutriment", 1) + reagents.add_reagent("bicaridine", 1+round(potency / 8, 1)) + reagents.add_reagent("synaptizine", 1+round(potency / 8, 1)) + reagents.add_reagent("hyperzine", 1+round(potency / 10, 1)) + reagents.add_reagent("space_drugs", 1+round(potency / 10, 1)) + bitesize = 1+round(reagents.total_volume / 2, 1) + +/obj/item/weapon/reagent_containers/food/snacks/grown/apple + seed = "/obj/item/seeds/appleseed" + name = "apple" + desc = "It's a little piece of Eden." + icon_state = "apple" + potency = 15 + New() + ..() + spawn(5) //So potency can be set in the proc that creates these crops + reagents.add_reagent("nutriment", 1+round((potency / 10), 1)) + bitesize = 1+round(reagents.total_volume / 2, 1) + +/obj/item/weapon/reagent_containers/food/snacks/grown/goldapple + seed = "/obj/item/seeds/goldappleseed" + name = "golden apple" + desc = "Emblazoned upon the apple is the word 'Kallisti'." + icon_state = "goldapple" + potency = 15 + New() + ..() + spawn(5) //So potency can be set in the proc that creates these crops + reagents.add_reagent("nutriment", 1+round((potency / 10), 1)) + reagents.add_reagent("gold", 1+round((potency / 5), 1)) + bitesize = 1+round(reagents.total_volume / 2, 1) + +/obj/item/weapon/reagent_containers/food/snacks/grown/mushroom/libertycap/attackby(var/obj/item/O as obj, var/mob/user as mob) + . = ..() + if (istype(O, /obj/item/device/analyzer/plant_analyzer)) + user << "- Mineral Content: [reagents.get_reagent_amount("gold")]%" + + +/obj/item/weapon/reagent_containers/food/snacks/grown/watermelon + seed = "/obj/item/seeds/watermelonseed" + name = "watermelon" + desc = "It's full of watery goodness." + icon_state = "watermelon" + potency = 10 + New() + ..() + spawn(5) //So potency can be set in the proc that creates these crops + reagents.add_reagent("nutriment", 1+round((potency / 6), 1)) + bitesize = 1+round(reagents.total_volume / 2, 1) + +/obj/item/weapon/reagent_containers/food/snacks/grown/pumpkin + seed = "/obj/item/seeds/pumpkinseed" + name = "pumpkin" + desc = "It's large and scary." + icon_state = "pumpkin" + potency = 10 + New() + ..() + spawn(5) //So potency can be set in the proc that creates these crops + reagents.add_reagent("nutriment", 1+round((potency / 6), 1)) + bitesize = 1+round(reagents.total_volume / 2, 1) + + +/obj/item/weapon/reagent_containers/food/snacks/grown/pumpkin/attackby(obj/item/weapon/W as obj, mob/user as mob) + ..() + if(istype(W, /obj/item/weapon/circular_saw) || istype(W, /obj/item/weapon/hatchet) || istype(W, /obj/item/weapon/twohanded/fireaxe) || istype(W, /obj/item/weapon/kitchen/utensil/knife) || istype(W, /obj/item/weapon/kitchenknife) || istype(W, /obj/item/weapon/melee/energy)) + user.show_message("You carve a face into [src]!", 1) + new /obj/item/clothing/head/pumpkinhead (user.loc) + del(src) + return + +/obj/item/weapon/reagent_containers/food/snacks/grown/lime + seed = "/obj/item/seeds/limeseed" + name = "lime" + desc = "It's so sour, your face will twist." + icon_state = "lime" + potency = 20 + New() + ..() + spawn(5) //So potency can be set in the proc that creates these crops + reagents.add_reagent("nutriment", 1+round((potency / 20), 1)) + bitesize = 1+round(reagents.total_volume / 2, 1) + +/obj/item/weapon/reagent_containers/food/snacks/grown/lemon + seed = "/obj/item/seeds/lemonseed" + name = "lemon" + desc = "When life gives you lemons, be grateful they aren't limes." + icon_state = "lemon" + potency = 20 + New() + ..() + spawn(5) //So potency can be set in the proc that creates these crops + reagents.add_reagent("nutriment", 1+round((potency / 20), 1)) + bitesize = 1+round(reagents.total_volume / 2, 1) + +/obj/item/weapon/reagent_containers/food/snacks/grown/orange + seed = "/obj/item/seeds/orangeseed" + name = "orange" + desc = "It's an tangy fruit." + icon_state = "orange" + potency = 20 + New() + ..() + spawn(5) //So potency can be set in the proc that creates these crops + reagents.add_reagent("nutriment", 1+round((potency / 20), 1)) + bitesize = 1+round(reagents.total_volume / 2, 1) + +/obj/item/weapon/reagent_containers/food/snacks/grown/whitebeet + seed = "/obj/item/seeds/whitebeetseed" + name = "white-beet" + desc = "You can't beat white-beet." + icon_state = "whitebeet" + potency = 15 + New() + ..() + spawn(5) //So potency can be set in the proc that creates these crops + reagents.add_reagent("nutriment", round((potency / 20), 1)) + reagents.add_reagent("sugar", 1+round((potency / 5), 1)) + bitesize = 1+round(reagents.total_volume / 2, 1) + +/obj/item/weapon/reagent_containers/food/snacks/grown/banana + seed = "/obj/item/seeds/bananaseed" + name = "banana" + desc = "It's an excellent prop for a clown." + icon = 'icons/obj/items.dmi' + icon_state = "banana" + item_state = "banana" + trash = /obj/item/weapon/bananapeel + + New() + ..() + spawn(5) //So potency can be set in the proc that creates these crops + reagents.add_reagent("banana", 1+round((potency / 10), 1)) + bitesize = 5 + src.pixel_x = rand(-5.0, 5) + src.pixel_y = rand(-5.0, 5) + +/obj/item/weapon/reagent_containers/food/snacks/grown/chili + seed = "/obj/item/seeds/chiliseed" + name = "chili" + desc = "It's spicy! Wait... IT'S BURNING ME!!" + icon_state = "chilipepper" + New() + ..() + spawn(5) //So potency can be set in the proc that creates these crops + reagents.add_reagent("nutriment", 1+round((potency / 25), 1)) + reagents.add_reagent("capsaicin", 3+round(potency / 5, 1)) + bitesize = 1+round(reagents.total_volume / 2, 1) + +/obj/item/weapon/reagent_containers/food/snacks/grown/chili/attackby(var/obj/item/O as obj, var/mob/user as mob) + . = ..() + if (istype(O, /obj/item/device/analyzer/plant_analyzer)) + user << "- Capsaicin: [reagents.get_reagent_amount("capsaicin")]%" + +/obj/item/weapon/reagent_containers/food/snacks/grown/eggplant + seed = "/obj/item/seeds/eggplantseed" + name = "eggplant" + desc = "Maybe there's a chicken inside?" + icon_state = "eggplant" + New() + ..() + spawn(5) //So potency can be set in the proc that creates these crops + reagents.add_reagent("nutriment", 1+round((potency / 10), 1)) + bitesize = 1+round(reagents.total_volume / 2, 1) + +/obj/item/weapon/reagent_containers/food/snacks/grown/soybeans + seed = "/obj/item/seeds/soyaseed" + name = "soybeans" + desc = "It's pretty bland, but oh the possibilities..." + gender = PLURAL + icon_state = "soybeans" + New() + ..() + spawn(5) //So potency can be set in the proc that creates these crops + reagents.add_reagent("nutriment", 1+round((potency / 20), 1)) + bitesize = 1+round(reagents.total_volume / 2, 1) + +/obj/item/weapon/reagent_containers/food/snacks/grown/tomato + seed = "/obj/item/seeds/tomatoseed" + name = "tomato" + desc = "I say to-mah-to, you say tom-mae-to." + icon_state = "tomato" + potency = 10 + New() + ..() + spawn(5) //So potency can be set in the proc that creates these crops + reagents.add_reagent("nutriment", 1+round((potency / 10), 1)) + bitesize = 1+round(reagents.total_volume / 2, 1) + + throw_impact(atom/hit_atom) + ..() + new/obj/effect/decal/cleanable/tomato_smudge(src.loc) + src.visible_message("The [src.name] has been squashed.","You hear a smack.") + del(src) + return + +/obj/item/weapon/reagent_containers/food/snacks/grown/killertomato + seed = "/obj/item/seeds/killertomatoseed" + name = "killer-tomato" + desc = "I say to-mah-to, you say tom-mae-to... OH GOD IT'S EATING MY LEGS!!" + icon_state = "killertomato" + potency = 10 + New() + ..() + spawn(5) //So potency can be set in the proc that creates these crops + reagents.add_reagent("nutriment", 1+round((potency / 10), 1)) + bitesize = 1+round(reagents.total_volume / 2, 1) + if(istype(src.loc,/mob)) + pickup(src.loc) + lifespan = 120 + endurance = 30 + maturation = 15 + production = 1 + yield = 3 + potency = 30 + plant_type = 2 + +/obj/item/weapon/reagent_containers/food/snacks/grown/killertomato/attack_self(mob/user as mob) + if(istype(user.loc,/turf/space)) + return + new /mob/living/simple_animal/tomato(user.loc) + del(src) + + user << "You plant the killer-tomato." + +/obj/item/weapon/reagent_containers/food/snacks/grown/bloodtomato + seed = "/obj/item/seeds/bloodtomatoseed" + name = "blood-tomato" + desc = "So bloody...so...very...bloody....AHHHH!!!!" + icon_state = "bloodtomato" + potency = 10 + New() + ..() + spawn(5) //So potency can be set in the proc that creates these crops + reagents.add_reagent("nutriment", 1+round((potency / 10), 1)) + reagents.add_reagent("blood", 1+round((potency / 5), 1)) + bitesize = 1+round(reagents.total_volume / 2, 1) + + throw_impact(atom/hit_atom) + ..() + new/obj/effect/decal/cleanable/blood/splatter(src.loc) + src.visible_message("The [src.name] has been squashed.","You hear a smack.") + src.reagents.reaction(get_turf(hit_atom)) + for(var/atom/A in get_turf(hit_atom)) + src.reagents.reaction(A) + del(src) + return + +/obj/item/weapon/reagent_containers/food/snacks/grown/bluetomato + seed = "/obj/item/seeds/bluetomatoseed" + name = "blue-tomato" + desc = "I say blue-mah-to, you say blue-mae-to." + icon_state = "bluetomato" + potency = 10 + New() + ..() + spawn(5) //So potency can be set in the proc that creates these crops + reagents.add_reagent("nutriment", 1+round((potency / 20), 1)) + reagents.add_reagent("lube", 1+round((potency / 5), 1)) + bitesize = 1+round(reagents.total_volume / 2, 1) + + throw_impact(atom/hit_atom) + ..() + new/obj/effect/decal/cleanable/oil(src.loc) + src.visible_message("The [src.name] has been squashed.","You hear a smack.") + src.reagents.reaction(get_turf(hit_atom)) + for(var/atom/A in get_turf(hit_atom)) + src.reagents.reaction(A) + del(src) + return + +/obj/item/weapon/reagent_containers/food/snacks/grown/bluetomato/HasEntered(AM as mob|obj) + if (istype(AM, /mob/living/carbon)) + var/mob/M = AM + if (istype(M, /mob/living/carbon/human) && (isobj(M:shoes) && M:shoes.flags&NOSLIP)) + return + + M.stop_pulling() + M << "\blue You slipped on the [name]!" + playsound(src.loc, 'sound/misc/slip.ogg', 50, 1, -3) + M.Stun(8) + M.Weaken(5) + +/obj/item/weapon/reagent_containers/food/snacks/grown/wheat + seed = "/obj/item/seeds/wheatseed" + name = "wheat" + desc = "Sigh... wheat... a-grain?" + gender = PLURAL + icon_state = "wheat" + New() + ..() + spawn(5) //So potency can be set in the proc that creates these crops + reagents.add_reagent("nutriment", 1+round((potency / 25), 1)) + bitesize = 1+round(reagents.total_volume / 2, 1) + +/obj/item/weapon/reagent_containers/food/snacks/grown/icepepper + seed = "/obj/item/seeds/icepepperseed" + name = "ice-pepper" + desc = "It's a mutant strain of chili" + icon_state = "icepepper" + potency = 20 + New() + ..() + spawn(5) //So potency can be set in the proc that creates these crops + reagents.add_reagent("nutriment", 1+round((potency / 50), 1)) + reagents.add_reagent("frostoil", 3+round(potency / 5, 1)) + bitesize = 1+round(reagents.total_volume / 2, 1) + +/obj/item/weapon/reagent_containers/food/snacks/grown/icepepper/attackby(var/obj/item/O as obj, var/mob/user as mob) + . = ..() + if (istype(O, /obj/item/device/analyzer/plant_analyzer)) + user << "- Frostoil: [reagents.get_reagent_amount("frostoil")]%" + +/obj/item/weapon/reagent_containers/food/snacks/grown/carrot + seed = "/obj/item/seeds/carrotseed" + name = "carrot" + desc = "It's good for the eyes!" + icon_state = "carrot" + potency = 10 + New() + ..() + spawn(5) //So potency can be set in the proc that creates these crops + reagents.add_reagent("nutriment", 1+round((potency / 20), 1)) + reagents.add_reagent("imidazoline", 3+round(potency / 5, 1)) + bitesize = 1+round(reagents.total_volume / 2, 1) + +/obj/item/weapon/reagent_containers/food/snacks/grown/mushroom/reishi + seed = "/obj/item/seeds/reishimycelium" + name = "reishi" + desc = "Ganoderma lucidum: A special fungus believed to help relieve stress." + icon_state = "reishi" + potency = 10 + New() + ..() + spawn(5) //So potency can be set in the proc that creates these crops + reagents.add_reagent("nutriment", 1) + reagents.add_reagent("stoxin", 3+round(potency / 3, 1)) + reagents.add_reagent("space_drugs", 1+round(potency / 25, 1)) + bitesize = 1+round(reagents.total_volume / 2, 1) + +/obj/item/weapon/reagent_containers/food/snacks/grown/mushroom/reishi/attackby(var/obj/item/O as obj, var/mob/user as mob) + . = ..() + if (istype(O, /obj/item/device/analyzer/plant_analyzer)) + user << "- Sleep Toxin: [reagents.get_reagent_amount("stoxin")]%" + user << "- Space Drugs: [reagents.get_reagent_amount("space_drugs")]%" + +/obj/item/weapon/reagent_containers/food/snacks/grown/mushroom/amanita + seed = "/obj/item/seeds/amanitamycelium" + name = "fly amanita" + desc = "Amanita Muscaria: Learn poisonous mushrooms by heart. Only pick mushrooms you know." + icon_state = "amanita" + potency = 10 + New() + ..() + spawn(5) //So potency can be set in the proc that creates these crops + reagents.add_reagent("nutriment", 1) + reagents.add_reagent("amatoxin", 3+round(potency / 3, 1)) + reagents.add_reagent("psilocybin", 1+round(potency / 25, 1)) + bitesize = 1+round(reagents.total_volume / 2, 1) + +/obj/item/weapon/reagent_containers/food/snacks/grown/mushroom/amanita/attackby(var/obj/item/O as obj, var/mob/user as mob) + . = ..() + if (istype(O, /obj/item/device/analyzer/plant_analyzer)) + user << "- Amatoxins: [reagents.get_reagent_amount("amatoxin")]%" + user << "- Psilocybin: [reagents.get_reagent_amount("psilocybin")]%" + +/obj/item/weapon/reagent_containers/food/snacks/grown/mushroom/angel + seed = "/obj/item/seeds/angelmycelium" + name = "destroying angel" + desc = "Amanita Virosa: Deadly poisonous basidiomycete fungus filled with alpha amatoxins." + icon_state = "angel" + potency = 35 + New() + ..() + spawn(5) //So potency can be set in the proc that creates these crops + reagents.add_reagent("nutriment", 1+round((potency / 50), 1)) + reagents.add_reagent("amatoxin", 13+round(potency / 3, 1)) + reagents.add_reagent("psilocybin", 1+round(potency / 25, 1)) + bitesize = 1+round(reagents.total_volume / 2, 1) + +/obj/item/weapon/reagent_containers/food/snacks/grown/mushroom/angel/attackby(var/obj/item/O as obj, var/mob/user as mob) + . = ..() + if (istype(O, /obj/item/device/analyzer/plant_analyzer)) + user << "- Amatoxins: [reagents.get_reagent_amount("amatoxin")]%" + user << "- Psilocybin: [reagents.get_reagent_amount("psilocybin")]%" + +/obj/item/weapon/reagent_containers/food/snacks/grown/mushroom/libertycap + seed = "/obj/item/seeds/libertymycelium" + name = "liberty-cap" + desc = "Psilocybe Semilanceata: Liberate yourself!" + icon_state = "libertycap" + potency = 15 + New() + ..() + spawn(5) //So potency can be set in the proc that creates these crops + reagents.add_reagent("nutriment", 1+round((potency / 50), 1)) + reagents.add_reagent("psilocybin", 3+round(potency / 5, 1)) + bitesize = 1+round(reagents.total_volume / 2, 1) + +/obj/item/weapon/reagent_containers/food/snacks/grown/mushroom/libertycap/attackby(var/obj/item/O as obj, var/mob/user as mob) + . = ..() + if (istype(O, /obj/item/device/analyzer/plant_analyzer)) + user << "- Psilocybin: [reagents.get_reagent_amount("psilocybin")]%" + +/obj/item/weapon/reagent_containers/food/snacks/grown/mushroom/plumphelmet + seed = "/obj/item/seeds/plumpmycelium" + name = "plump-helmet" + desc = "Plumus Hellmus: Plump, soft and s-so inviting~" + icon_state = "plumphelmet" + New() + ..() + spawn(5) //So potency can be set in the proc that creates these crops + reagents.add_reagent("nutriment", 2+round((potency / 10), 1)) + bitesize = 1+round(reagents.total_volume / 2, 1) + +/obj/item/weapon/reagent_containers/food/snacks/grown/mushroom/walkingmushroom + seed = "/obj/item/seeds/walkingmushroom" + name = "walking mushroom" + desc = "Plumus Locomotus: The beginning of the great walk." + icon_state = "walkingmushroom" + New() + ..() + spawn(5) //So potency can be set in the proc that creates these crops + reagents.add_reagent("nutriment", 2+round((potency / 10), 1)) + bitesize = 1+round(reagents.total_volume / 2, 1) + if(istype(src.loc,/mob)) + pickup(src.loc) + lifespan = 120 + endurance = 30 + maturation = 15 + production = 1 + yield = 3 + potency = 30 + plant_type = 2 + +/obj/item/weapon/reagent_containers/food/snacks/grown/mushroom/walkingmushroom/attack_self(mob/user as mob) + if(istype(user.loc,/turf/space)) + return + new /mob/living/simple_animal/mushroom(user.loc) + del(src) + + user << "You plant the walking mushroom." + +/obj/item/weapon/reagent_containers/food/snacks/grown/mushroom/chanterelle + seed = "/obj/item/seeds/chantermycelium" + name = "chanterelle cluster" + desc = "Cantharellus Cibarius: These jolly yellow little shrooms sure look tasty!" + icon_state = "chanterelle" + New() + ..() + spawn(5) //So potency can be set in the proc that creates these crops + reagents.add_reagent("nutriment",1+round((potency / 25), 1)) + bitesize = 1+round(reagents.total_volume / 2, 1) + +/obj/item/weapon/reagent_containers/food/snacks/grown/mushroom/glowshroom + seed = "/obj/item/seeds/glowshroom" + name = "glowshroom cluster" + desc = "Mycena Bregprox: This species of mushroom glows in the dark. Or does it?" + icon_state = "glowshroom" + New() + ..() + spawn(5) //So potency can be set in the proc that creates these crops + reagents.add_reagent("radium",1+round((potency / 20), 1)) + if(istype(src.loc,/mob)) + pickup(src.loc) + else + src.sd_SetLuminosity(potency/10) + lifespan = 120 //ten times that is the delay + endurance = 30 + maturation = 15 + production = 1 + yield = 3 + potency = 30 + plant_type = 2 + +/obj/item/weapon/reagent_containers/food/snacks/grown/mushroom/glowshroom/attack_self(mob/user as mob) + if(istype(user.loc,/turf/space)) + return + var/obj/effect/glowshroom/planted = new /obj/effect/glowshroom(user.loc) + + planted.delay = lifespan * 50 + planted.endurance = endurance + planted.yield = yield + planted.potency = potency + del(src) + + user << "You plant the glowshroom." + +/obj/item/weapon/reagent_containers/food/snacks/grown/mushroom/glowshroom/Del() + if(istype(loc,/mob)) + loc.sd_SetLuminosity(loc.luminosity - potency/10) + ..() + +/obj/item/weapon/reagent_containers/food/snacks/grown/mushroom/glowshroom/pickup(mob/user) + src.sd_SetLuminosity(0) + user.total_luminosity += potency/10 + +/obj/item/weapon/reagent_containers/food/snacks/grown/mushroom/glowshroom/dropped(mob/user) + user.total_luminosity -= potency/10 + src.sd_SetLuminosity(potency/10) + +// ************************************* +// Complex Grown Object Defines - +// Putting these at the bottom so they don't clutter the list up. -Cheridan +// ************************************* + +//This object is just a transition object. All it does is make a grass tile and delete itself. +/obj/item/weapon/reagent_containers/food/snacks/grown/grass + seed = "/obj/item/seeds/grassseed" + name = "grass" + desc = "Green and lush." + icon_state = "spawner" + potency = 20 + New() + new/obj/item/stack/tile/grass(src.loc) + spawn(5) //Workaround to keep harvesting from working weirdly. + del(src) + +//This object is just a transition object. All it does is make dosh and delete itself. -Cheridan +/obj/item/weapon/reagent_containers/food/snacks/grown/money + seed = "/obj/item/seeds/cashseed" + name = "dosh" + desc = "Green and lush." + icon_state = "spawner" + potency = 10 + New() + switch(rand(1,100))//(potency) //It wants to use the default potency instead of the new, so it was always 10. Will try to come back to this later - Cheridan + if(0 to 10) + new/obj/item/weapon/spacecash/(src.loc) + if(11 to 20) + new/obj/item/weapon/spacecash/c10(src.loc) + if(21 to 30) + new/obj/item/weapon/spacecash/c20(src.loc) + if(31 to 40) + new/obj/item/weapon/spacecash/c50(src.loc) + if(41 to 50) + new/obj/item/weapon/spacecash/c100(src.loc) + if(51 to 60) + new/obj/item/weapon/spacecash/c200(src.loc) + if(61 to 80) + new/obj/item/weapon/spacecash/c500(src.loc) + else + new/obj/item/weapon/spacecash/c1000(src.loc) + spawn(5) //Workaround to keep harvesting from working weirdly. + del(src) + +/obj/item/weapon/reagent_containers/food/snacks/grown/bluespacetomato + seed = "/obj/item/seeds/bluespacetomatoseed" + name = "blue-space tomato" + desc = "So lubricated, you might slip through space-time." + icon_state = "bluespacetomato" + potency = 20 + origin_tech = "bluespace=3" + New() + ..() + spawn(5) //So potency can be set in the proc that creates these crops + reagents.add_reagent("nutriment", 1+round((potency / 20), 1)) + reagents.add_reagent("singulo", 1+round((potency / 5), 1)) + bitesize = 1+round(reagents.total_volume / 2, 1) + + throw_impact(atom/hit_atom) + ..() + var/mob/M = usr + var/outer_teleport_radius = potency/10 //Plant potency determines radius of teleport. + var/inner_teleport_radius = potency/15 + var/list/turfs = new/list() + var/datum/effect/effect/system/spark_spread/s = new /datum/effect/effect/system/spark_spread + if(inner_teleport_radius < 1) //Wasn't potent enough, it just splats. + new/obj/effect/decal/cleanable/oil(src.loc) + src.visible_message("The [src.name] has been squashed.","You hear a smack.") + del(src) + return + for(var/turf/T in orange(M,outer_teleport_radius)) + if(T in orange(M,inner_teleport_radius)) continue + if(istype(T,/turf/space)) continue + if(T.density) continue + if(T.x>world.maxx-outer_teleport_radius || T.xworld.maxy-outer_teleport_radius || T.yThe [src.name] has been squashed, causing a distortion in space-time.","You hear a splat and a crackle.") + del(src) + return + +/obj/item/weapon/reagent_containers/food/snacks/grown/watermelon + name = "Watermelon" + icon_state = "A juicy watermelon" + icon_state = "watermelon" + slice_path = /obj/item/weapon/reagent_containers/food/snacks/watermelonslice + slices_num = 5 + New() + ..() + reagents.add_reagent("nutriment", 10) + bitesize = 2 \ No newline at end of file diff --git a/code/modules/reagents/reagent_containers/food/snacks/meat.dm b/code/modules/reagents/reagent_containers/food/snacks/meat.dm new file mode 100644 index 00000000000..cc9af086000 --- /dev/null +++ b/code/modules/reagents/reagent_containers/food/snacks/meat.dm @@ -0,0 +1,27 @@ +/obj/item/weapon/reagent_containers/food/snacks/meat + name = "meat" + desc = "A slab of meat" + icon_state = "meat" + health = 180 + New() + ..() + reagents.add_reagent("nutriment", 3) + src.bitesize = 3 + + +/obj/item/weapon/reagent_containers/food/snacks/meat/syntiflesh + name = "synthetic meat" + desc = "A synthetic slab of flesh." + +/obj/item/weapon/reagent_containers/food/snacks/meat/human + name = "-meat" + var/subjectname = "" + var/subjectjob = null + + +/obj/item/weapon/reagent_containers/food/snacks/meat/monkey + //same as plain meat + +/obj/item/weapon/reagent_containers/food/snacks/meat/corgi + name = "Corgi meat" + desc = "Tastes like... well you know..." \ No newline at end of file diff --git a/code/modules/reagents/reagent_containers/glass.dm b/code/modules/reagents/reagent_containers/glass.dm new file mode 100644 index 00000000000..7ec8325c627 --- /dev/null +++ b/code/modules/reagents/reagent_containers/glass.dm @@ -0,0 +1,231 @@ + +//////////////////////////////////////////////////////////////////////////////// +/// (Mixing)Glass. +//////////////////////////////////////////////////////////////////////////////// +/obj/item/weapon/reagent_containers/glass + name = " " + desc = " " + icon = 'icons/obj/chemical.dmi' + icon_state = "null" + item_state = "null" + amount_per_transfer_from_this = 10 + possible_transfer_amounts = list(5,10,15,25,30,50) + volume = 50 + flags = FPRINT | TABLEPASS | OPENCONTAINER + + var/list/can_be_placed_into = list( + /obj/machinery/chem_master/, + /obj/machinery/chem_dispenser/, + /obj/machinery/reagentgrinder, + /obj/structure/table, + /obj/structure/closet, + /obj/structure/sink, + /obj/item/weapon/storage, + /obj/machinery/atmospherics/unary/cryo_cell, + /obj/item/weapon/grenade/chem_grenade, + /obj/machinery/bot/medbot, + /obj/machinery/computer/pandemic, + /obj/item/weapon/secstorage/ssafe, + /obj/machinery/disposal + ) + + examine() + set src in view() + ..() + if (!(usr in view(2)) && usr!=src.loc) return + usr << "\blue It contains:" + if(reagents && reagents.reagent_list.len) + for(var/datum/reagent/R in reagents.reagent_list) + usr << "\blue [R.volume] units of [R.name]" + else + usr << "\blue Nothing." + + afterattack(obj/target, mob/user , flag) + for(var/type in src.can_be_placed_into) + if(istype(target, type)) + return + + if(ismob(target) && target.reagents && reagents.total_volume) + user << "\blue You splash the solution onto [target]." + for(var/mob/O in viewers(world.view, user)) + O.show_message(text("\red [] has been splashed with something by []!", target, user), 1) + src.reagents.reaction(target, TOUCH) + spawn(5) src.reagents.clear_reagents() + return + else if(istype(target, /obj/structure/reagent_dispensers)) //A dispenser. Transfer FROM it TO us. + + if(!target.reagents.total_volume && target.reagents) + user << "\red [target] is empty." + return + + if(reagents.total_volume >= reagents.maximum_volume) + user << "\red [src] is full." + return + + var/trans = target.reagents.trans_to(src, target:amount_per_transfer_from_this) + user << "\blue You fill [src] with [trans] units of the contents of [target]." + + else if(target.is_open_container() && target.reagents) //Something like a glass. Player probably wants to transfer TO it. + if(!reagents.total_volume) + user << "\red [src] is empty." + return + + if(target.reagents.total_volume >= target.reagents.maximum_volume) + user << "\red [target] is full." + return + + var/trans = src.reagents.trans_to(target, amount_per_transfer_from_this) + user << "\blue You transfer [trans] units of the solution to [target]." + + //Safety for dumping stuff into a ninja suit. It handles everything through attackby() and this is unnecessary. + else if(istype(target, /obj/item/clothing/suit/space/space_ninja)) + return + + else if(reagents.total_volume) + user << "\blue You splash the solution onto [target]." + src.reagents.reaction(target, TOUCH) + spawn(5) src.reagents.clear_reagents() + return + +//////////////////////////////////////////////////////////////////////////////// +/// (Mixing)Glass. END +//////////////////////////////////////////////////////////////////////////////// + + +//Glasses +/obj/item/weapon/reagent_containers/glass/bucket + desc = "It's a bucket." + name = "bucket" + icon = 'icons/obj/janitor.dmi' + icon_state = "bucket" + item_state = "bucket" + m_amt = 200 + g_amt = 0 + w_class = 3.0 + amount_per_transfer_from_this = 20 + possible_transfer_amounts = list(10,20,30,50,70) + volume = 70 + flags = FPRINT | OPENCONTAINER + + attackby(var/obj/D, mob/user as mob) + if(isprox(D)) + user << "You add [D] to [src]." + del(D) + user.put_in_hands(new /obj/item/weapon/bucket_sensor) + user.drop_from_inventory(src) + del(src) + +/* +/obj/item/weapon/reagent_containers/glass/canister //not used apparantly + desc = "It's a canister. Mainly used for transporting fuel." + name = "canister" + icon = 'icons/obj/tank.dmi' + icon_state = "canister" + item_state = "canister" + m_amt = 300 + g_amt = 0 + w_class = 4.0 + + amount_per_transfer_from_this = 20 + possible_transfer_amounts = list(10,20,30,60) + volume = 120 + flags = FPRINT +*/ + +/obj/item/weapon/reagent_containers/glass/dispenser + name = "reagent glass" + desc = "A reagent glass." + icon = 'icons/obj/chemical.dmi' + icon_state = "beaker0" + amount_per_transfer_from_this = 10 + flags = FPRINT | TABLEPASS | OPENCONTAINER + +/obj/item/weapon/reagent_containers/glass/dispenser/surfactant + name = "reagent glass (surfactant)" + icon_state = "liquid" + + New() + ..() + reagents.add_reagent("fluorosurfactant", 20) + +/obj/item/weapon/reagent_containers/glass/beaker + name = "beaker" + desc = "A beaker. Can hold up to 50 units." + icon = 'icons/obj/chemical.dmi' + icon_state = "beaker0" + item_state = "beaker" + m_amt = 0 + g_amt = 500 + + on_reagent_change() + update_icon() + + pickup(mob/user) + ..() + update_icon() + + dropped(mob/user) + ..() + update_icon() + + attack_hand() + ..() + update_icon() + + update_icon() + overlays = null + + if(reagents.total_volume) + var/image/filling = image('icons/obj/reagentfillings.dmi', src, "[icon_state]10", src.layer) + + var/percent = round((reagents.total_volume / volume) * 100) + switch(percent) + if(0 to 9) filling.icon_state = "[icon_state]-10" + if(10 to 24) filling.icon_state = "[icon_state]10" + if(25 to 49) filling.icon_state = "[icon_state]25" + if(50 to 74) filling.icon_state = "[icon_state]50" + if(75 to 79) filling.icon_state = "[icon_state]75" + if(80 to 90) filling.icon_state = "[icon_state]80" + if(91 to INFINITY) filling.icon_state = "[icon_state]100" + + filling.icon += mix_color_from_reagents(reagents.reagent_list) + overlays += filling + +/obj/item/weapon/reagent_containers/glass/beaker/large + name = "large beaker" + desc = "A large beaker. Can hold up to 100 units." + icon_state = "beakerlarge" + g_amt = 5000 + volume = 100 + amount_per_transfer_from_this = 10 + possible_transfer_amounts = list(5,10,15,25,30,50,100) + flags = FPRINT | TABLEPASS | OPENCONTAINER + +/obj/item/weapon/reagent_containers/glass/blender_jug + name = "Blender Jug" + desc = "A blender jug, part of a blender." + icon = 'icons/obj/kitchen.dmi' + icon_state = "blender_jug_e" + volume = 100 + + on_reagent_change() + switch(src.reagents.total_volume) + if(0) + icon_state = "blender_jug_e" + if(1 to 75) + icon_state = "blender_jug_h" + if(76 to 100) + icon_state = "blender_jug_f" + + + +/obj/item/weapon/reagent_containers/glass/beaker/cryoxadone + name = "beaker" + desc = "A beaker. Can hold up to 50 units." + icon = 'icons/obj/chemical.dmi' + icon_state = "beaker0" + item_state = "beaker" + + New() + ..() + reagents.add_reagent("cryoxadone", 30) \ No newline at end of file diff --git a/code/modules/reagents/reagent_containers/glass/bottle.dm b/code/modules/reagents/reagent_containers/glass/bottle.dm new file mode 100644 index 00000000000..3ba689303b5 --- /dev/null +++ b/code/modules/reagents/reagent_containers/glass/bottle.dm @@ -0,0 +1,255 @@ + +//Not to be confused with /obj/item/weapon/reagent_containers/food/drinks/bottle + +/obj/item/weapon/reagent_containers/glass/bottle + name = "bottle" + desc = "A small bottle." + icon = 'icons/obj/chemical.dmi' + icon_state = null + item_state = "atoxinbottle" + amount_per_transfer_from_this = 10 + possible_transfer_amounts = list(5,10,15,25,30) + flags = FPRINT | TABLEPASS | OPENCONTAINER + volume = 30 + + New() + ..() + if(!icon_state) + icon_state = "bottle[rand(1,20)]" + +/obj/item/weapon/reagent_containers/glass/bottle/inaprovaline + name = "inaprovaline bottle" + desc = "A small bottle. Contains inaprovaline - used to stabilize patients." + icon = 'icons/obj/chemical.dmi' + icon_state = "bottle16" + + New() + ..() + reagents.add_reagent("inaprovaline", 30) + +/obj/item/weapon/reagent_containers/glass/bottle/toxin + name = "toxin bottle" + desc = "A small bottle of toxins. Do not drink, it is poisonous." + icon = 'icons/obj/chemical.dmi' + icon_state = "bottle12" + + New() + ..() + reagents.add_reagent("toxin", 30) + +/obj/item/weapon/reagent_containers/glass/bottle/cyanide + name = "cyanide bottle" + desc = "A small bottle of cyanide. Bitter almonds?" + icon = 'icons/obj/chemical.dmi' + icon_state = "bottle12" + + New() + ..() + reagents.add_reagent("cyanide", 30) + +/obj/item/weapon/reagent_containers/glass/bottle/stoxin + name = "sleep-toxin bottle" + desc = "A small bottle of sleep toxins. Just the fumes make you sleepy." + icon = 'icons/obj/chemical.dmi' + icon_state = "bottle20" + + New() + ..() + reagents.add_reagent("stoxin", 30) + +/obj/item/weapon/reagent_containers/glass/bottle/chloralhydrate + name = "Chloral Hydrate Bottle" + desc = "A small bottle of Choral Hydrate. Mickey's Favorite!" + icon = 'icons/obj/chemical.dmi' + icon_state = "bottle20" + + New() + ..() + reagents.add_reagent("chloralhydrate", 15) //Intentionally low since it is so strong. Still enough to knock someone out. + +/obj/item/weapon/reagent_containers/glass/bottle/antitoxin + name = "anti-toxin bottle" + desc = "A small bottle of Anti-toxins. Counters poisons, and repairs damage, a wonder drug." + icon = 'icons/obj/chemical.dmi' + icon_state = "bottle17" + + New() + ..() + reagents.add_reagent("anti_toxin", 30) + +/obj/item/weapon/reagent_containers/glass/bottle/ammonia + name = "ammonia bottle" + desc = "A small bottle." + icon = 'icons/obj/chemical.dmi' + icon_state = "bottle20" + + New() + ..() + reagents.add_reagent("ammonia", 30) + +/obj/item/weapon/reagent_containers/glass/bottle/diethylamine + name = "diethylamine bottle" + desc = "A small bottle." + icon = 'icons/obj/chemical.dmi' + icon_state = "bottle17" + + New() + ..() + reagents.add_reagent("diethylamine", 30) + +/obj/item/weapon/reagent_containers/glass/bottle/flu_virion + name = "Flu virion culture bottle" + desc = "A small bottle. Contains H13N1 flu virion culture in synthblood medium." + icon = 'icons/obj/chemical.dmi' + icon_state = "bottle3" + New() + ..() + var/datum/disease/F = new /datum/disease/flu(0) + var/list/data = list("viruses"= list(F)) + reagents.add_reagent("blood", 20, data) + +/obj/item/weapon/reagent_containers/glass/bottle/pierrot_throat + name = "Pierrot's Throat culture bottle" + desc = "A small bottle. Contains H0NI<42 virion culture in synthblood medium." + icon = 'icons/obj/chemical.dmi' + icon_state = "bottle3" + New() + ..() + var/datum/disease/F = new /datum/disease/pierrot_throat(0) + var/list/data = list("viruses"= list(F)) + reagents.add_reagent("blood", 20, data) + +/obj/item/weapon/reagent_containers/glass/bottle/cold + name = "Rhinovirus culture bottle" + desc = "A small bottle. Contains XY-rhinovirus culture in synthblood medium." + icon = 'icons/obj/chemical.dmi' + icon_state = "bottle3" + New() + ..() + var/datum/disease/F = new /datum/disease/cold(0) + var/list/data = list("viruses"= list(F)) + reagents.add_reagent("blood", 20, data) + +/obj/item/weapon/reagent_containers/glass/bottle/retrovirus + name = "Retrovirus culture bottle" + desc = "A small bottle. Contains a retrovirus culture in a synthblood medium." + icon = 'icons/obj/chemical.dmi' + icon_state = "bottle3" + New() + ..() + var/datum/disease/F = new /datum/disease/dna_retrovirus(0) + var/list/data = list("viruses"= list(F)) + reagents.add_reagent("blood", 20, data) + + +/obj/item/weapon/reagent_containers/glass/bottle/gbs + name = "GBS culture bottle" + desc = "A small bottle. Contains Gravitokinetic Bipotential SADS+ culture in synthblood medium."//Or simply - General BullShit + icon = 'icons/obj/chemical.dmi' + icon_state = "bottle3" + amount_per_transfer_from_this = 5 + + New() + var/datum/reagents/R = new/datum/reagents(20) + reagents = R + R.my_atom = src + var/datum/disease/F = new /datum/disease/gbs + var/list/data = list("virus"= F) + R.add_reagent("blood", 20, data) + +/obj/item/weapon/reagent_containers/glass/bottle/fake_gbs + name = "GBS culture bottle" + desc = "A small bottle. Contains Gravitokinetic Bipotential SADS- culture in synthblood medium."//Or simply - General BullShit + icon = 'icons/obj/chemical.dmi' + icon_state = "bottle3" + New() + ..() + var/datum/disease/F = new /datum/disease/fake_gbs(0) + var/list/data = list("viruses"= list(F)) + reagents.add_reagent("blood", 20, data) +/* +/obj/item/weapon/reagent_containers/glass/bottle/rhumba_beat + name = "Rhumba Beat culture bottle" + desc = "A small bottle. Contains The Rhumba Beat culture in synthblood medium."//Or simply - General BullShit + icon = 'icons/obj/chemical.dmi' + icon_state = "bottle3" + amount_per_transfer_from_this = 5 + + New() + var/datum/reagents/R = new/datum/reagents(20) + reagents = R + R.my_atom = src + var/datum/disease/F = new /datum/disease/rhumba_beat + var/list/data = list("virus"= F) + R.add_reagent("blood", 20, data) +*/ + +/obj/item/weapon/reagent_containers/glass/bottle/brainrot + name = "Brainrot culture bottle" + desc = "A small bottle. Contains Cryptococcus Cosmosis culture in synthblood medium." + icon = 'icons/obj/chemical.dmi' + icon_state = "bottle3" + New() + ..() + var/datum/disease/F = new /datum/disease/brainrot(0) + var/list/data = list("viruses"= list(F)) + reagents.add_reagent("blood", 20, data) + +/obj/item/weapon/reagent_containers/glass/bottle/magnitis + name = "Magnitis culture bottle" + desc = "A small bottle. Contains a small dosage of Fukkos Miracos." + icon = 'icons/obj/chemical.dmi' + icon_state = "bottle3" + New() + ..() + var/datum/disease/F = new /datum/disease/magnitis(0) + var/list/data = list("viruses"= list(F)) + reagents.add_reagent("blood", 20, data) + + +/obj/item/weapon/reagent_containers/glass/bottle/wizarditis + name = "Wizarditis culture bottle" + desc = "A small bottle. Contains a sample of Rincewindus Vulgaris." + icon = 'icons/obj/chemical.dmi' + icon_state = "bottle3" + New() + ..() + var/datum/disease/F = new /datum/disease/wizarditis(0) + var/list/data = list("viruses"= list(F)) + reagents.add_reagent("blood", 20, data) + +/obj/item/weapon/reagent_containers/glass/bottle/pacid + name = "Polytrinic Acid Bottle" + desc = "A small bottle. Contains a small amount of Polytrinic Acid" + icon = 'icons/obj/chemical.dmi' + icon_state = "bottle17" + New() + ..() + reagents.add_reagent("pacid", 30) + +/obj/item/weapon/reagent_containers/glass/bottle/adminordrazine + name = "Adminordrazine Bottle" + desc = "A small bottle. Contains the liquid essence of the gods." + icon = 'icons/obj/drinks.dmi' + icon_state = "holyflask" + New() + ..() + reagents.add_reagent("adminordrazine", 30) + +/obj/item/weapon/reagent_containers/glass/bottle/capsaicin + name = "Capsaicin Bottle" + desc = "A small bottle. Contains hot sauce." + icon = 'icons/obj/chemical.dmi' + icon_state = "bottle3" + New() + ..() + reagents.add_reagent("capsaicin", 30) + +/obj/item/weapon/reagent_containers/glass/bottle/frostoil + name = "Frost Oil Bottle" + desc = "A small bottle. Contains cold sauce." + icon = 'icons/obj/chemical.dmi' + icon_state = "bottle17" + New() + ..() + reagents.add_reagent("frostoil", 30) \ No newline at end of file diff --git a/code/modules/reagents/reagent_containers/glass/bottle/robot.dm b/code/modules/reagents/reagent_containers/glass/bottle/robot.dm new file mode 100644 index 00000000000..9286e5ab03b --- /dev/null +++ b/code/modules/reagents/reagent_containers/glass/bottle/robot.dm @@ -0,0 +1,33 @@ + +/obj/item/weapon/reagent_containers/glass/bottle/robot + amount_per_transfer_from_this = 10 + possible_transfer_amounts = list(5,10,15,25,30,50,100) + flags = FPRINT | TABLEPASS | OPENCONTAINER + volume = 60 + var/reagent = "" + + +/obj/item/weapon/reagent_containers/glass/bottle/robot/inaprovaline + name = "internal inaprovaline bottle" + desc = "A small bottle. Contains inaprovaline - used to stabilize patients." + icon = 'icons/obj/chemical.dmi' + icon_state = "bottle16" + reagent = "inaprovaline" + + New() + ..() + reagents.add_reagent("inaprovaline", 60) + return + + +/obj/item/weapon/reagent_containers/glass/bottle/robot/antitoxin + name = "internal anti-toxin bottle" + desc = "A small bottle of Anti-toxins. Counters poisons, and repairs damage, a wonder drug." + icon = 'icons/obj/chemical.dmi' + icon_state = "bottle17" + reagent = "anti_toxin" + + New() + ..() + reagents.add_reagent("anti_toxin", 60) + return \ No newline at end of file diff --git a/code/modules/reagents/reagent_containers/hypospray.dm b/code/modules/reagents/reagent_containers/hypospray.dm new file mode 100644 index 00000000000..5779fea6967 --- /dev/null +++ b/code/modules/reagents/reagent_containers/hypospray.dm @@ -0,0 +1,46 @@ +//////////////////////////////////////////////////////////////////////////////// +/// HYPOSPRAY +//////////////////////////////////////////////////////////////////////////////// + +/obj/item/weapon/reagent_containers/hypospray + name = "hypospray" + desc = "The DeForest Medical Corporation hypospray is a sterile, air-needle autoinjector for rapid administration of drugs to patients." + icon = 'icons/obj/syringe.dmi' + item_state = "hypo" + icon_state = "hypo" + amount_per_transfer_from_this = 5 + volume = 30 + possible_transfer_amounts = null + flags = FPRINT | TABLEPASS | OPENCONTAINER + slot_flags = SLOT_BELT + +/obj/item/weapon/reagent_containers/hypospray/attack_paw(mob/user as mob) + return src.attack_hand(user) + + +/obj/item/weapon/reagent_containers/hypospray/New() //comment this to make hypos start off empty + ..() + reagents.add_reagent("tricordrazine", 30) + return + +/obj/item/weapon/reagent_containers/hypospray/attack(mob/M as mob, mob/user as mob) + if(!reagents.total_volume) + user << "\red The hypospray is empty." + return + if (!( istype(M, /mob) )) + return + if (reagents.total_volume) + user << "\blue You inject [M] with the hypospray." + M << "\red You feel a tiny prick!" + + M.attack_log += text("\[[time_stamp()]\] Has been injected with [src.name] by [user.name] ([user.ckey])") + user.attack_log += text("\[[time_stamp()]\] Used the [src.name] to inject [M.name] ([M.ckey])") + + log_attack("[user.name] ([user.ckey]) injected [M.name] ([M.ckey]) with [src.name] (INTENT: [uppertext(user.a_intent)])") + + + src.reagents.reaction(M, INGEST) + if(M.reagents) + var/trans = reagents.trans_to(M, amount_per_transfer_from_this) + user << "\blue [trans] units injected. [reagents.total_volume] units remaining in the hypospray." + return \ No newline at end of file diff --git a/code/modules/reagents/reagent_containers/pill.dm b/code/modules/reagents/reagent_containers/pill.dm new file mode 100644 index 00000000000..a9fb85e131c --- /dev/null +++ b/code/modules/reagents/reagent_containers/pill.dm @@ -0,0 +1,171 @@ +//////////////////////////////////////////////////////////////////////////////// +/// Pills. +//////////////////////////////////////////////////////////////////////////////// +/obj/item/weapon/reagent_containers/pill + name = "pill" + desc = "a pill." + icon = 'icons/obj/chemical.dmi' + icon_state = null + item_state = "pill" + possible_transfer_amounts = null + volume = 50 + + New() + ..() + if(!icon_state) + icon_state = "pill[rand(1,20)]" + + attackby(obj/item/weapon/W as obj, mob/user as mob) + if (istype(W, /obj/item/weapon/storage/pill_bottle)) + var/obj/item/weapon/storage/pill_bottle/P = W + if (P.mode == 1) + for (var/obj/item/weapon/reagent_containers/pill/O in locate(src.x,src.y,src.z)) + if(P.contents.len < P.storage_slots) + O.loc = P + P.orient2hud(user) + else + user << "\blue The pill bottle is full." + return + user << "\blue You pick up all the pills." + else + if (P.contents.len < P.storage_slots) + loc = P + P.orient2hud(user) + else + user << "\blue The pill bottle is full." + return + attack_self(mob/user as mob) + return + attack(mob/M as mob, mob/user as mob, def_zone) + if(M == user) + M << "\blue You swallow [src]." + M.drop_from_inventory(src) //icon update + if(reagents.total_volume) + reagents.reaction(M, INGEST) + spawn(5) + reagents.trans_to(M, reagents.total_volume) + del(src) + else + del(src) + return 1 + + else if(istype(M, /mob/living/carbon/human) ) + + for(var/mob/O in viewers(world.view, user)) + O.show_message("\red [user] attempts to force [M] to swallow [src].", 1) + + if(!do_mob(user, M)) return + + user.drop_from_inventory(src) //icon update + for(var/mob/O in viewers(world.view, user)) + O.show_message("\red [user] forces [M] to swallow [src].", 1) + + M.attack_log += text("\[[time_stamp()]\] Has been fed [src.name] by [user.name] ([user.ckey]) Reagents: [reagentlist(src)]") + user.attack_log += text("\[[time_stamp()]\] Fed [M.name] by [M.name] ([M.ckey]) Reagents: [reagentlist(src)]") + + + log_attack("[user.name] ([user.ckey]) fed [M.name] ([M.ckey]) with [src.name] (INTENT: [uppertext(user.a_intent)])") + + if(reagents.total_volume) + reagents.reaction(M, INGEST) + spawn(5) + reagents.trans_to(M, reagents.total_volume) + del(src) + else + del(src) + + return 1 + + return 0 + + afterattack(obj/target, mob/user , flag) + + if(target.is_open_container() == 1 && target.reagents) + if(!target.reagents.total_volume) + user << "\red [target] is empty. Cant dissolve pill." + return + user << "\blue You dissolve the pill in [target]" + reagents.trans_to(target, reagents.total_volume) + for(var/mob/O in viewers(2, user)) + O.show_message("\red [user] puts something in [target].", 1) + spawn(5) + del(src) + + return + +//////////////////////////////////////////////////////////////////////////////// +/// Pills. END +//////////////////////////////////////////////////////////////////////////////// + +//Pills +/obj/item/weapon/reagent_containers/pill/antitox + name = "Anti-toxins pill" + desc = "Neutralizes many common toxins." + icon_state = "pill17" + New() + ..() + reagents.add_reagent("anti_toxin", 50) + +/obj/item/weapon/reagent_containers/pill/tox + name = "Toxins pill" + desc = "Highly toxic." + icon_state = "pill5" + New() + ..() + reagents.add_reagent("toxin", 50) + +/obj/item/weapon/reagent_containers/pill/cyanide + name = "Cyanide pill" + desc = "Don't swallow this." + icon_state = "pill5" + New() + ..() + reagents.add_reagent("cyanide", 50) + +/obj/item/weapon/reagent_containers/pill/adminordrazine + name = "Adminordrazine pill" + desc = "It's magic. We don't have to explain it." + icon_state = "pill16" + New() + ..() + reagents.add_reagent("adminordrazine", 50) + +/obj/item/weapon/reagent_containers/pill/stox + name = "Sleeping pill" + desc = "Commonly used to treat insomnia." + icon_state = "pill8" + New() + ..() + reagents.add_reagent("stoxin", 30) + +/obj/item/weapon/reagent_containers/pill/kelotane + name = "Kelotane pill" + desc = "Used to treat burns." + icon_state = "pill11" + New() + ..() + reagents.add_reagent("kelotane", 30) + +/obj/item/weapon/reagent_containers/pill/inaprovaline + name = "Inaprovaline pill" + desc = "Used to stabilize patients." + icon_state = "pill20" + New() + ..() + reagents.add_reagent("inaprovaline", 30) + +/obj/item/weapon/reagent_containers/pill/dexalin + name = "Dexalin pill" + desc = "Used to treat oxygen deprivation." + icon_state = "pill16" + New() + ..() + reagents.add_reagent("dexalin", 30) + +/obj/item/weapon/reagent_containers/pill/bicaridine + name = "Bicaridine pill" + desc = "Used to treat physical injuries." + icon_state = "pill18" + New() + ..() + reagents.add_reagent("bicaridine", 30) \ No newline at end of file diff --git a/code/modules/reagents/reagent_containers/robodropper.dm b/code/modules/reagents/reagent_containers/robodropper.dm new file mode 100644 index 00000000000..e7663111950 --- /dev/null +++ b/code/modules/reagents/reagent_containers/robodropper.dm @@ -0,0 +1,88 @@ + +/obj/item/weapon/reagent_containers/robodropper + name = "Industrial Dropper" + desc = "A larger dropper. Transfers 10 units." + icon = 'icons/obj/chemical.dmi' + icon_state = "dropper0" + amount_per_transfer_from_this = 10 + possible_transfer_amounts = list(1,2,3,4,5,6,7,8,9,10) + volume = 10 + var/filled = 0 + + afterattack(obj/target, mob/user , flag) + if(!target.reagents) return + + if(filled) + + if(target.reagents.total_volume >= target.reagents.maximum_volume) + user << "\red [target] is full." + return + + if(!target.is_open_container() && !ismob(target) && !istype(target,/obj/item/weapon/reagent_containers/food)) //You can inject humans and food but you cant remove the shit. + user << "\red You cannot directly fill this object." + return + + + var/trans = 0 + + if(ismob(target)) + if(istype(target , /mob/living/carbon/human)) + var/mob/living/carbon/human/victim = target + + var/obj/item/safe_thing = null + if( victim.wear_mask ) + if ( victim.wear_mask.flags & MASKCOVERSEYES ) + safe_thing = victim.wear_mask + if( victim.head ) + if ( victim.head.flags & MASKCOVERSEYES ) + safe_thing = victim.head + if(victim.glasses) + if ( !safe_thing ) + safe_thing = victim.glasses + + if(safe_thing) + if(!safe_thing.reagents) + safe_thing.create_reagents(100) + trans = src.reagents.trans_to(safe_thing, amount_per_transfer_from_this) + + for(var/mob/O in viewers(world.view, user)) + O.show_message(text("\red [] tries to squirt something into []'s eyes, but fails!", user, target), 1) + spawn(5) + src.reagents.reaction(safe_thing, TOUCH) + + + user << "\blue You transfer [trans] units of the solution." + if (src.reagents.total_volume<=0) + filled = 0 + icon_state = "dropper[filled]" + return + + + for(var/mob/O in viewers(world.view, user)) + O.show_message(text("\red [] squirts something into []'s eyes!", user, target), 1) + src.reagents.reaction(target, TOUCH) + + trans = src.reagents.trans_to(target, amount_per_transfer_from_this) + user << "\blue You transfer [trans] units of the solution." + if (src.reagents.total_volume<=0) + filled = 0 + icon_state = "dropper[filled]" + + else + + if(!target.is_open_container() && !istype(target,/obj/structure/reagent_dispensers)) + user << "\red You cannot directly remove reagents from [target]." + return + + if(!target.reagents.total_volume) + user << "\red [target] is empty." + return + + var/trans = target.reagents.trans_to(src, amount_per_transfer_from_this) + + user << "\blue You fill the dropper with [trans] units of the solution." + + filled = 1 + icon_state = "dropper[filled]" + + return \ No newline at end of file diff --git a/code/modules/reagents/reagent_containers/spray.dm b/code/modules/reagents/reagent_containers/spray.dm new file mode 100644 index 00000000000..b62765df964 --- /dev/null +++ b/code/modules/reagents/reagent_containers/spray.dm @@ -0,0 +1,219 @@ +/obj/item/weapon/reagent_containers/spray + name = "spray bottle" + desc = "A spray bottle, with an unscrewable top." + icon = 'icons/obj/janitor.dmi' + icon_state = "cleaner" + item_state = "cleaner" + flags = TABLEPASS|OPENCONTAINER|FPRINT|USEDELAY + slot_flags = SLOT_BELT + throwforce = 3 + w_class = 2.0 + throw_speed = 2 + throw_range = 10 + amount_per_transfer_from_this = 5 + volume = 250 + possible_transfer_amounts = null + + +/obj/item/weapon/reagent_containers/spray/afterattack(atom/A as mob|obj, mob/user as mob) + if(istype(A, /obj/item/weapon/storage) || istype(A, /obj/structure/table) || istype(A, /obj/structure/rack) || istype(A, /obj/structure/closet) \ + || istype(A, /obj/item/weapon/reagent_containers) || istype(A, /obj/structure/sink)) + return + + if(istype(A, /obj/effect/proc_holder/spell)) + return + + if(istype(A, /obj/structure/reagent_dispensers)) //this block copypasted from reagent_containers/glass, for lack of a better solution + if(!A.reagents.total_volume && A.reagents) + user << "\The [A] is empty." + return + + if(reagents.total_volume >= reagents.maximum_volume) + user << "\The [src] is full." + return + + var/trans = A.reagents.trans_to(src, A:amount_per_transfer_from_this) + user << "You fill \the [src] with [trans] units of the contents of \the [A]." + return + + if(reagents.total_volume < amount_per_transfer_from_this) + user << "\The [src] is empty!" + return + + var/obj/effect/decal/D = new/obj/effect/decal(get_turf(src)) + D.create_reagents(amount_per_transfer_from_this) + reagents.trans_to(D, amount_per_transfer_from_this) + + D.name = "chemicals" + D.icon = 'icons/obj/chempuff.dmi' + + D.icon += mix_color_from_reagents(D.reagents.reagent_list) + + spawn(0) + for(var/i=0, i<3, i++) + step_towards(D,A) + D.reagents.reaction(get_turf(D)) + for(var/atom/T in get_turf(D)) + D.reagents.reaction(T) + sleep(3) + del(D) + + playsound(src.loc, 'spray2.ogg', 50, 1, -6) + + if(reagents.has_reagent("sacid")) + message_admins("[key_name_admin(user)] fired sulphuric acid from a spray bottle.") + log_game("[key_name(user)] fired sulphuric acid from a spray bottle.") + if(reagents.has_reagent("pacid")) + message_admins("[key_name_admin(user)] fired Polyacid from a spray bottle.") + log_game("[key_name(user)] fired Polyacid from a spray bottle.") + if(reagents.has_reagent("lube")) + message_admins("[key_name_admin(user)] fired Space lube from a spray bottle.") + log_game("[key_name(user)] fired Space lube from a spray bottle.") + return + + +/obj/item/weapon/reagent_containers/spray/examine() + set src in usr + ..() + for(var/datum/reagent/R in reagents.reagent_list) + usr << "[round(R.volume)] units of [R.name] left." + return + + +//space cleaner +/obj/item/weapon/reagent_containers/spray/cleaner + name = "space cleaner" + desc = "BLAM!-brand non-foaming space cleaner!" + + +/obj/item/weapon/reagent_containers/spray/cleaner/New() + ..() + reagents.add_reagent("cleaner", 250) + +//pepperspray +/obj/item/weapon/reagent_containers/spray/pepper + name = "pepperspray" + desc = "Manufactured by UhangInc, used to blind and down an opponent quickly." + icon = 'icons/obj/weapons.dmi' + icon_state = "pepperspray" + item_state = "pepperspray" + volume = 40 + amount_per_transfer_from_this = 10 + + +/obj/item/weapon/reagent_containers/spray/pepper/New() + ..() + reagents.add_reagent("condensedcapsaicin", 40) + + +//chemsprayer +/obj/item/weapon/reagent_containers/spray/chemsprayer + name = "chem sprayer" + desc = "A utility used to spray large amounts of reagent in a given area." + icon = 'icons/obj/gun.dmi' + icon_state = "chemsprayer" + item_state = "chemsprayer" + throwforce = 3 + w_class = 3.0 + volume = 600 + origin_tech = "combat=3;materials=3;engineering=3" + + +//this is a big copypasta clusterfuck, but it's still better than it used to be! +/obj/item/weapon/reagent_containers/spray/chemsprayer/afterattack(atom/A as mob|obj, mob/user as mob) + if(istype(A, /obj/item/weapon/storage) || istype(A, /obj/structure/table) || istype(A, /obj/structure/rack) || istype(A, /obj/structure/closet) \ + || istype(A, /obj/item/weapon/reagent_containers) || istype(A, /obj/structure/sink)) + return + + if(istype(A, /obj/effect/proc_holder/spell)) + return + + if(istype(A, /obj/structure/reagent_dispensers)) //this block copypasted from reagent_containers/glass, for lack of a better solution + if(!A.reagents.total_volume && A.reagents) + user << "\The [A] is empty." + return + + if(reagents.total_volume >= reagents.maximum_volume) + user << "\The [src] is full." + return + + var/trans = A.reagents.trans_to(src, A:amount_per_transfer_from_this) + user << "You fill \the [src] with [trans] units of the contents of \the [A]." + return + + if(reagents.total_volume < amount_per_transfer_from_this) + user << "\The [src] is empty!" + return + + var/Sprays[3] + for(var/i=1, i<=3, i++) // intialize sprays + if(src.reagents.total_volume < 1) break + var/obj/effect/decal/D = new/obj/effect/decal(get_turf(src)) + D.name = "chemicals" + D.icon = 'icons/obj/chempuff.dmi' + D.create_reagents(amount_per_transfer_from_this) + src.reagents.trans_to(D, amount_per_transfer_from_this) + + D.icon += mix_color_from_reagents(D.reagents.reagent_list) + + Sprays[i] = D + + var/direction = get_dir(src, A) + var/turf/T = get_turf(A) + var/turf/T1 = get_step(T,turn(direction, 90)) + var/turf/T2 = get_step(T,turn(direction, -90)) + var/list/the_targets = list(T,T1,T2) + + for(var/i=1, i<=Sprays.len, i++) + spawn() + var/obj/effect/decal/D = Sprays[i] + if(!D) continue + + // Spreads the sprays a little bit + var/turf/my_target = pick(the_targets) + the_targets -= my_target + + for(var/j=1, j<=rand(6,8), j++) + step_towards(D, my_target) + D.reagents.reaction(get_turf(D)) + for(var/atom/t in get_turf(D)) + D.reagents.reaction(t) + sleep(2) + del(D) + + playsound(src.loc, 'spray2.ogg', 50, 1, -6) + + if(reagents.has_reagent("sacid")) + message_admins("[key_name_admin(user)] fired sulphuric acid from a chem sprayer.") + log_game("[key_name(user)] fired sulphuric acid from a chem sprayer.") + if(reagents.has_reagent("pacid")) + message_admins("[key_name_admin(user)] fired Polyacid from a chem sprayer.") + log_game("[key_name(user)] fired Polyacid from a chem sprayer.") + if(reagents.has_reagent("lube")) + message_admins("[key_name_admin(user)] fired Space lube from a chem sprayer.") + log_game("[key_name(user)] fired Space lube from a chem sprayer.") + return + +// Plant-B-Gone +/obj/item/weapon/reagent_containers/spray/plantbgone // -- Skie + name = "Plant-B-Gone" + desc = "Kills those pesky weeds!" + icon = 'icons/obj/hydroponics.dmi' + icon_state = "plantbgone" + item_state = "plantbgone" + volume = 100 + + +/obj/item/weapon/reagent_containers/spray/plantbgone/New() + ..() + reagents.add_reagent("plantbgone", 100) + + +/obj/item/weapon/reagent_containers/spray/plantbgone/afterattack(atom/A as mob|obj, mob/user as mob) + if (istype(A, /obj/machinery/hydroponics)) // We are targeting hydrotray + return + + if (istype(A, /obj/effect/blob)) // blob damage in blob code + return + + ..() diff --git a/code/modules/reagents/reagent_containers/syringes.dm b/code/modules/reagents/reagent_containers/syringes.dm new file mode 100644 index 00000000000..1feb3c3e065 --- /dev/null +++ b/code/modules/reagents/reagent_containers/syringes.dm @@ -0,0 +1,376 @@ +//////////////////////////////////////////////////////////////////////////////// +/// Syringes. +//////////////////////////////////////////////////////////////////////////////// +#define SYRINGE_DRAW 0 +#define SYRINGE_INJECT 1 + +/obj/item/weapon/reagent_containers/syringe + name = "Syringe" + desc = "A syringe." + icon = 'icons/obj/syringe.dmi' + item_state = "syringe_0" + icon_state = "0" + amount_per_transfer_from_this = 5 + possible_transfer_amounts = null //list(5,10,15) + volume = 15 + var/mode = SYRINGE_DRAW + + on_reagent_change() + update_icon() + + pickup(mob/user) + ..() + update_icon() + + dropped(mob/user) + ..() + update_icon() + + attack_self(mob/user as mob) +/* + switch(mode) + if(SYRINGE_DRAW) + mode = SYRINGE_INJECT + if(SYRINGE_INJECT) + mode = SYRINGE_DRAW +*/ + mode = !mode + update_icon() + + attack_hand() + ..() + update_icon() + + attack_paw() + return attack_hand() + + attackby(obj/item/I as obj, mob/user as mob) + + return + + afterattack(obj/target, mob/user , flag) + if(!target.reagents) return + + switch(mode) + if(SYRINGE_DRAW) + + if(reagents.total_volume >= reagents.maximum_volume) + user << "\red The syringe is full." + return + + if(ismob(target))//Blood! + if(istype(target, /mob/living/carbon/metroid)) + user << "\red You are unable to locate any blood." + return + if(src.reagents.has_reagent("blood")) + user << "\red There is already a blood sample in this syringe" + return + if(istype(target, /mob/living/carbon))//maybe just add a blood reagent to all mobs. Then you can suck them dry...With hundreds of syringes. Jolly good idea. + var/amount = src.reagents.maximum_volume - src.reagents.total_volume + var/mob/living/carbon/T = target + var/datum/reagent/B = new /datum/reagent/blood + if(!T.dna) + usr << "You are unable to locate any blood. (To be specific, your target seems to be missing their DNA datum)" + return + if(NOCLONE in T.mutations) //target done been et, no more blood in him + user << "\red You are unable to locate any blood." + return + B.holder = src + B.volume = amount + //set reagent data + B.data["donor"] = T + /* + if(T.virus && T.virus.spread_type != SPECIAL) + B.data["virus"] = new T.virus.type(0) + */ + + + + for(var/datum/disease/D in T.viruses) + if(!B.data["viruses"]) + B.data["viruses"] = list() + + + B.data["viruses"] += new D.type + + + B.data["blood_DNA"] = copytext(T.dna.unique_enzymes,1,0) + if(T.resistances&&T.resistances.len) + B.data["resistances"] = T.resistances.Copy() + if(istype(target, /mob/living/carbon/human))//I wish there was some hasproperty operation... + var/mob/living/carbon/human/HT = target + B.data["blood_type"] = copytext(HT.dna.b_type,1,0) + var/list/temp_chem = list() + for(var/datum/reagent/R in target.reagents.reagent_list) + temp_chem += R.name + temp_chem[R.name] = R.volume + B.data["trace_chem"] = list2params(temp_chem) + + src.reagents.reagent_list += B + src.reagents.update_total() + src.on_reagent_change() + src.reagents.handle_reactions() + user << "\blue You take a blood sample from [target]" + for(var/mob/O in viewers(4, user)) + O.show_message("\red [user] takes a blood sample from [target].", 1) + + else //if not mob + if(!target.reagents.total_volume) + user << "\red [target] is empty." + return + + if(!target.is_open_container() && !istype(target,/obj/structure/reagent_dispensers) && !istype(target,/obj/item/metroid_core)) + user << "\red You cannot directly remove reagents from this object." + return + + var/trans = target.reagents.trans_to(src, amount_per_transfer_from_this) // transfer from, transfer to - who cares? + + user << "\blue You fill the syringe with [trans] units of the solution." + if (reagents.total_volume >= reagents.maximum_volume) + mode=!mode + update_icon() + + if(SYRINGE_INJECT) + if(!reagents.total_volume) + user << "\red The Syringe is empty." + return + if(istype(target, /obj/item/weapon/implantcase/chem)) + return + + if(!target.is_open_container() && !ismob(target) && !istype(target, /obj/item/weapon/reagent_containers/food) && !istype(target, /obj/item/metroid_core) && !istype(target, /obj/item/clothing/mask/cigarette) && !istype(target, /obj/item/weapon/cigpacket)) + user << "\red You cannot directly fill this object." + return + if(target.reagents.total_volume >= target.reagents.maximum_volume) + user << "\red [target] is full." + return + + if(istype(target, /obj/item/metroid_core)) + var/obj/item/metroid_core/core = target + core.Flush = 30 // reset flush counter + + if(ismob(target) && target != user) + for(var/mob/O in viewers(world.view, user)) + O.show_message(text("\red [] is trying to inject []!", user, target), 1) + if(!do_mob(user, target)) return + for(var/mob/O in viewers(world.view, user)) + O.show_message(text("\red [] injects [] with the syringe!", user, target), 1) + src.reagents.reaction(target, INGEST) + if(ismob(target) && target == user) + src.reagents.reaction(target, INGEST) + spawn(5) + var/trans = src.reagents.trans_to(target, amount_per_transfer_from_this) + user << "\blue You inject [trans] units of the solution. The syringe now contains [src.reagents.total_volume] units." + if (reagents.total_volume <= 0 && mode==SYRINGE_INJECT) + mode = SYRINGE_DRAW + update_icon() + + return + + update_icon() + var/rounded_vol = round(reagents.total_volume,5) + overlays = null + if(ismob(loc)) + var/injoverlay + switch(mode) + if (SYRINGE_DRAW) + injoverlay = "draw" + if (SYRINGE_INJECT) + injoverlay = "inject" + overlays += injoverlay + icon_state = "[rounded_vol]" + item_state = "syringe_[rounded_vol]" + + if(reagents.total_volume) + var/image/filling = image('icons/obj/reagentfillings.dmi', src, "syringe10", src.layer) + + switch(rounded_vol) + if(5) filling.icon_state = "syringe5" + if(10) filling.icon_state = "syringe10" + if(15) filling.icon_state = "syringe15" + + filling.icon += mix_color_from_reagents(reagents.reagent_list) + overlays += filling + + +/obj/item/weapon/reagent_containers/ld50_syringe + name = "Lethal Injection Syringe" + desc = "A syringe used for lethal injections." + icon = 'icons/obj/syringe.dmi' + item_state = "syringe_0" + icon_state = "0" + amount_per_transfer_from_this = 50 + possible_transfer_amounts = null //list(5,10,15) + volume = 50 + var/mode = SYRINGE_DRAW + + on_reagent_change() + update_icon() + + pickup(mob/user) + ..() + update_icon() + + dropped(mob/user) + ..() + update_icon() + + attack_self(mob/user as mob) + mode = !mode + update_icon() + + attack_hand() + ..() + update_icon() + + attack_paw() + return attack_hand() + + attackby(obj/item/I as obj, mob/user as mob) + + return + + afterattack(obj/target, mob/user , flag) + if(!target.reagents) return + + switch(mode) + if(SYRINGE_DRAW) + + if(reagents.total_volume >= reagents.maximum_volume) + user << "\red The syringe is full." + return + + if(ismob(target)) + if(istype(target, /mob/living/carbon))//I Do not want it to suck 50 units out of people + usr << "This needle isn't designed for drawing blood." + return + else //if not mob + if(!target.reagents.total_volume) + user << "\red [target] is empty." + return + + if(!target.is_open_container() && !istype(target,/obj/structure/reagent_dispensers)) + user << "\red You cannot directly remove reagents from this object." + return + + var/trans = target.reagents.trans_to(src, amount_per_transfer_from_this) // transfer from, transfer to - who cares? + + user << "\blue You fill the syringe with [trans] units of the solution." + if (reagents.total_volume >= reagents.maximum_volume) + mode=!mode + update_icon() + + if(SYRINGE_INJECT) + if(!reagents.total_volume) + user << "\red The Syringe is empty." + return + if(istype(target, /obj/item/weapon/implantcase/chem)) + return + if(!target.is_open_container() && !ismob(target) && !istype(target, /obj/item/weapon/reagent_containers/food)) + user << "\red You cannot directly fill this object." + return + if(target.reagents.total_volume >= target.reagents.maximum_volume) + user << "\red [target] is full." + return + + if(ismob(target) && target != user) + for(var/mob/O in viewers(world.view, user)) + O.show_message(text("\red [] is trying to inject [] with a giant syringe!", user, target), 1) + if(!do_mob(user, target, 300)) return + for(var/mob/O in viewers(world.view, user)) + O.show_message(text("\red [] injects [] with a giant syringe!", user, target), 1) + src.reagents.reaction(target, INGEST) + if(ismob(target) && target == user) + src.reagents.reaction(target, INGEST) + spawn(5) + var/trans = src.reagents.trans_to(target, amount_per_transfer_from_this) + user << "\blue You inject [trans] units of the solution. The syringe now contains [src.reagents.total_volume] units." + if (reagents.total_volume >= reagents.maximum_volume && mode==SYRINGE_INJECT) + mode = SYRINGE_DRAW + update_icon() + + return + + update_icon() + var/rounded_vol = round(reagents.total_volume,50) + if(ismob(loc)) + var/mode_t + switch(mode) + if (SYRINGE_DRAW) + mode_t = "d" + if (SYRINGE_INJECT) + mode_t = "i" + icon_state = "[mode_t][rounded_vol]" + else + icon_state = "[rounded_vol]" + item_state = "syringe_[rounded_vol]" + +//////////////////////////////////////////////////////////////////////////////// +/// Syringes. END +//////////////////////////////////////////////////////////////////////////////// + + + +/obj/item/weapon/reagent_containers/syringe/inaprovaline + name = "Syringe (inaprovaline)" + desc = "Contains inaprovaline - used to stabilize patients." + New() + ..() + reagents.add_reagent("inaprovaline", 15) + mode = SYRINGE_INJECT + update_icon() + +/obj/item/weapon/reagent_containers/syringe/antitoxin + name = "Syringe (anti-toxin)" + desc = "Contains anti-toxins." + New() + ..() + reagents.add_reagent("anti_toxin", 15) + mode = SYRINGE_INJECT + update_icon() + +/obj/item/weapon/reagent_containers/syringe/antiviral + name = "Syringe (spaceacillin)" + desc = "Contains antiviral agents." + New() + ..() + reagents.add_reagent("spaceacillin", 15) + mode = SYRINGE_INJECT + update_icon() + +/obj/item/weapon/reagent_containers/ld50_syringe/choral + New() + ..() + reagents.add_reagent("chloralhydrate", 50) + mode = SYRINGE_INJECT + update_icon() + + +//Robot syringes +//Not special in any way, code wise. They don't have added variables or procs. +/obj/item/weapon/reagent_containers/syringe/robot/antitoxin + name = "Syringe (anti-toxin)" + desc = "Contains anti-toxins." + New() + ..() + reagents.add_reagent("anti_toxin", 15) + mode = SYRINGE_INJECT + update_icon() + +/obj/item/weapon/reagent_containers/syringe/robot/inoprovaline + name = "Syringe (inoprovaline)" + desc = "Contains inaprovaline - used to stabilize patients." + New() + ..() + reagents.add_reagent("inaprovaline", 15) + mode = SYRINGE_INJECT + update_icon() + +/obj/item/weapon/reagent_containers/syringe/robot/mixed + name = "Syringe (mixed)" + desc = "Contains inaprovaline & anti-toxins." + New() + ..() + reagents.add_reagent("inaprovaline", 7) + reagents.add_reagent("anti_toxin", 8) + mode = SYRINGE_INJECT + update_icon() \ No newline at end of file diff --git a/code/modules/reagents/reagent_dispenser.dm b/code/modules/reagents/reagent_dispenser.dm new file mode 100644 index 00000000000..454395f5006 --- /dev/null +++ b/code/modules/reagents/reagent_dispenser.dm @@ -0,0 +1,153 @@ + + +/obj/structure/reagent_dispensers + name = "Dispenser" + desc = "..." + icon = 'icons/obj/objects.dmi' + icon_state = "watertank" + density = 1 + anchored = 0 + flags = FPRINT + pressure_resistance = 2*ONE_ATMOSPHERE + + var/amount_per_transfer_from_this = 10 + var/possible_transfer_amounts = list(10,25,50,100) + + attackby(obj/item/weapon/W as obj, mob/user as mob) + return + + New() + var/datum/reagents/R = new/datum/reagents(1000) + reagents = R + R.my_atom = src + if (!possible_transfer_amounts) + src.verbs -= /obj/structure/reagent_dispensers/verb/set_APTFT + ..() + + examine() + set src in view() + ..() + if (!(usr in view(2)) && usr!=src.loc) return + usr << "\blue It contains:" + if(reagents && reagents.reagent_list.len) + for(var/datum/reagent/R in reagents.reagent_list) + usr << "\blue [R.volume] units of [R.name]" + else + usr << "\blue Nothing." + + verb/set_APTFT() //set amount_per_transfer_from_this + set name = "Set transfer amount" + set category = "Object" + set src in view(1) + var/N = input("Amount per transfer from this:","[src]") as null|anything in possible_transfer_amounts + if (N) + amount_per_transfer_from_this = N + + ex_act(severity) + switch(severity) + if(1.0) + del(src) + return + if(2.0) + if (prob(50)) + new /obj/effect/effect/water(src.loc) + del(src) + return + if(3.0) + if (prob(5)) + new /obj/effect/effect/water(src.loc) + del(src) + return + else + return + + blob_act() + if(prob(50)) + new /obj/effect/effect/water(src.loc) + del(src) + + + + + + + +//Dispensers +/obj/structure/reagent_dispensers/watertank + name = "watertank" + desc = "A watertank" + icon = 'icons/obj/objects.dmi' + icon_state = "watertank" + amount_per_transfer_from_this = 10 + New() + ..() + reagents.add_reagent("water",1000) + +/obj/structure/reagent_dispensers/fueltank + name = "fueltank" + desc = "A fueltank" + icon = 'icons/obj/objects.dmi' + icon_state = "weldtank" + amount_per_transfer_from_this = 10 + New() + ..() + reagents.add_reagent("fuel",1000) + + + bullet_act(var/obj/item/projectile/Proj) + if(istype(Proj ,/obj/item/projectile/beam)||istype(Proj,/obj/item/projectile/bullet)) + explosion(src.loc,-1,0,2) + if(src) + del(src) + + + + blob_act() + explosion(src.loc,0,1,5,7,10) + if(src) + del(src) + + ex_act() + explosion(src.loc,-1,0,2) + if(src) + del(src) + +/obj/structure/reagent_dispensers/peppertank + name = "Pepper Spray Refiller" + desc = "Refill pepper spray canisters." + icon = 'icons/obj/objects.dmi' + icon_state = "peppertank" + anchored = 1 + density = 0 + amount_per_transfer_from_this = 45 + New() + ..() + reagents.add_reagent("condensedcapsaicin",1000) + + +/obj/structure/reagent_dispensers/water_cooler + name = "Water-Cooler" + desc = "A machine that dispenses water to drink" + amount_per_transfer_from_this = 5 + icon = 'icons/obj/vending.dmi' + icon_state = "water_cooler" + possible_transfer_amounts = null + anchored = 1 + New() + ..() + reagents.add_reagent("water",500) + + +/obj/structure/reagent_dispensers/beerkeg + name = "beer keg" + desc = "A beer keg" + icon = 'icons/obj/objects.dmi' + icon_state = "beertankTEMP" + amount_per_transfer_from_this = 10 + New() + ..() + reagents.add_reagent("beer",1000) + +/obj/structure/reagent_dispensers/beerkeg/blob_act() + explosion(src.loc,0,3,5,7,10) + del(src) diff --git a/code/modules/reagents/syringe_gun.dm b/code/modules/reagents/syringe_gun.dm new file mode 100644 index 00000000000..75cdf2913bd --- /dev/null +++ b/code/modules/reagents/syringe_gun.dm @@ -0,0 +1,119 @@ + + + +/obj/item/weapon/gun/syringe + name = "syringe gun" + desc = "A spring loaded rifle designed to fit syringes, designed to incapacitate unruly patients from a distance." + icon = 'icons/obj/gun.dmi' + icon_state = "syringegun" + item_state = "syringegun" + w_class = 3.0 + throw_speed = 2 + throw_range = 10 + force = 4.0 + var/list/syringes = new/list() + var/max_syringes = 1 + m_amt = 2000 + + examine() + set src in view() + ..() + if (!(usr in view(2)) && usr!=src.loc) return + usr << "\blue [syringes.len] / [max_syringes] syringes." + + attackby(obj/item/I as obj, mob/user as mob) + + if(istype(I, /obj/item/weapon/reagent_containers/syringe)) + if(syringes.len < max_syringes) + user.drop_item() + I.loc = src + syringes += I + user << "\blue You put the syringe in [src]." + user << "\blue [syringes.len] / [max_syringes] syringes." + else + usr << "\red [src] cannot hold more syringes." + + afterattack(obj/target, mob/user , flag) + if(!isturf(target.loc) || target == user) return + + if(syringes.len) + spawn(0) fire_syringe(target,user) + else + usr << "\red [src] is empty." + + proc + fire_syringe(atom/target, mob/user) + if (locate (/obj/structure/table, src.loc)) + return + else + var/turf/trg = get_turf(target) + var/obj/effect/syringe_gun_dummy/D = new/obj/effect/syringe_gun_dummy(get_turf(src)) + var/obj/item/weapon/reagent_containers/syringe/S = syringes[1] + if((!S) || (!S.reagents)) //ho boy! wot runtimes! + return + S.reagents.trans_to(D, S.reagents.total_volume) + syringes -= S + del(S) + D.icon_state = "syringeproj" + D.name = "syringe" + playsound(user.loc, 'syringeproj.ogg', 50, 1) + + for(var/i=0, i<6, i++) + if(!D) break + if(D.loc == trg) break + step_towards(D,trg) + + if(D) + for(var/mob/living/carbon/M in D.loc) + if(!istype(M,/mob/living/carbon)) continue + if(M == user) continue + //Syringe gun attack logging by Yvarov + var/R + if(D.reagents) + for(var/datum/reagent/A in D.reagents.reagent_list) + R += A.id + " (" + R += num2text(A.volume) + ")," + if (istype(M, /mob)) + M.attack_log += "\[[time_stamp()]\] [user]/[user.ckey] shot [M]/[M.ckey] with a syringegun ([R])" + user.attack_log += "\[[time_stamp()]\] [user]/[user.ckey] shot [M]/[M.ckey] with a syringegun ([R])" + log_attack("[user] ([user.ckey]) shot [M] ([M.ckey]) with a syringegun ([R])") + else + M.attack_log += "\[[time_stamp()]\] UNKNOWN SUBJECT (No longer exists) shot [M]/[M.ckey] with a syringegun ([R])" + log_attack("UNKNOWN shot [M] ([M.ckey]) with a syringegun ([R])") + if(D.reagents) + D.reagents.trans_to(M, 15) + M.take_organ_damage(5) + for(var/mob/O in viewers(world.view, D)) + O.show_message("\red [M.name] is hit by the syringe!", 1) + + del(D) + if(D) + for(var/atom/A in D.loc) + if(A == user) continue + if(A.density) del(D) + + sleep(1) + + if (D) spawn(10) del(D) + + return + +/obj/item/weapon/gun/syringe/rapidsyringe + name = "rapid syringe gun" + desc = "A modification of the syringe gun design, using a rotating cylinder to store up to four syringes." + icon_state = "rapidsyringegun" + max_syringes = 4 + + +/obj/effect/syringe_gun_dummy + name = "" + desc = "" + icon = 'icons/obj/chemical.dmi' + icon_state = "null" + anchored = 1 + density = 0 + + New() + var/datum/reagents/R = new/datum/reagents(15) + reagents = R + R.my_atom = src \ No newline at end of file