From b4b635f32d9420bca3da2126f28171907b49f3de Mon Sep 17 00:00:00 2001 From: Kelenius Date: Wed, 25 Mar 2015 19:09:10 +0300 Subject: [PATCH 1/7] Chemistry commit I messed something in the git --- baystation12.dme | 7 +- code/__HELPERS/game.dm | 28 + code/_defines/chemical_effects.dm | 7 + code/datums/recipe.dm | 4 +- code/game/dna/dna_modifier.dm | 3 +- code/game/machinery/Sleeper.dm | 4 +- code/game/machinery/bots/farmbot.dm | 7 +- code/game/machinery/bots/medbot.dm | 3 +- code/game/machinery/cryo.dm | 3 +- code/game/machinery/iv_drip.dm | 6 +- code/game/machinery/kitchen/gibber.dm | 2 +- .../mecha/equipment/tools/medical_tools.dm | 6 +- code/game/mecha/equipment/tools/tools.dm | 41 +- .../objects/effects/{ => chem}/chemsmoke.dm | 133 +- code/game/objects/effects/chem/foam.dm | 184 + code/game/objects/effects/chem/water.dm | 50 + code/game/objects/effects/decals/misc.dm | 8 +- code/game/objects/effects/effect_system.dm | 245 - code/game/objects/items/toys.dm | 16 +- .../objects/items/weapons/cigs_lighters.dm | 13 +- .../objects/items/weapons/extinguisher.dm | 87 +- .../items/weapons/grenades/chem_grenade.dm | 2 +- .../objects/items/weapons/implants/implant.dm | 2 +- .../items/weapons/implants/implantcase.dm | 2 +- code/game/objects/items/weapons/kitchen.dm | 2 +- code/game/objects/items/weapons/mop.dm | 4 +- code/game/objects/items/weapons/paint.dm | 7 +- .../objects/items/weapons/storage/fancy.dm | 8 +- code/game/objects/items/weapons/tools.dm | 2 +- .../objects/items/weapons/weldbackpack.dm | 4 +- .../crates_lockers/closets/secure/security.dm | 4 +- code/game/objects/structures/janicart.dm | 4 +- code/game/objects/structures/mop_bucket.dm | 2 +- code/modules/customitems/item_defines.dm | 6 +- .../detectivework/footprints_and_rag.dm | 3 +- code/modules/mob/living/carbon/alien/alien.dm | 4 - code/modules/mob/living/carbon/brain/life.dm | 13 +- code/modules/mob/living/carbon/breathe.dm | 10 +- code/modules/mob/living/carbon/carbon.dm | 18 +- .../mob/living/carbon/carbon_defines.dm | 3 + code/modules/mob/living/carbon/human/human.dm | 4 - .../mob/living/carbon/human/human_movement.dm | 5 +- code/modules/mob/living/carbon/human/life.dm | 17 +- .../modules/mob/living/carbon/metroid/life.dm | 12 +- .../mob/living/carbon/metroid/metroid.dm | 10 - code/modules/mob/living/carbon/monkey/life.dm | 13 +- .../mob/living/carbon/monkey/monkey.dm | 4 - code/modules/mob/living/carbon/shock.dm | 17 +- .../mob/living/silicon/robot/robot_modules.dm | 4 +- code/modules/organs/blood.dm | 21 +- code/modules/organs/organ_internal.dm | 20 +- code/modules/organs/organ_objects.dm | 4 +- code/modules/organs/pain.dm | 14 +- code/modules/paperwork/pen.dm | 4 +- .../projectiles/guns/launcher/syringe_gun.dm | 2 +- .../projectiles/guns/projectile/dartgun.dm | 4 +- code/modules/reagents/Chemistry-Colours.dm | 85 +- code/modules/reagents/Chemistry-Holder.dm | 1035 +- code/modules/reagents/Chemistry-Machinery.dm | 6 +- .../Chemistry-Reagents-Antidepressants.dm | 90 - code/modules/reagents/Chemistry-Reagents.dm | 8436 ++++++++--------- code/modules/reagents/Chemistry-Recipes.dm | 4025 ++++---- code/modules/reagents/reagent_containers.dm | 141 +- .../reagents/reagent_containers/borghydro.dm | 35 +- .../reagents/reagent_containers/dropper.dm | 103 +- .../reagents/reagent_containers/food/cans.dm | 83 +- .../reagent_containers/food/condiment.dm | 83 +- .../reagent_containers/food/drinks.dm | 143 +- .../reagent_containers/food/drinks/bottle.dm | 9 +- .../reagent_containers/food/sandwich.dm | 2 +- .../reagent_containers/food/snacks.dm | 21 +- .../reagents/reagent_containers/glass.dm | 135 +- .../reagent_containers/glass/bottle.dm | 2 +- .../reagents/reagent_containers/hypospray.dm | 31 +- .../reagents/reagent_containers/pill.dm | 55 +- .../reagent_containers/robodropper.dm | 98 - .../reagents/reagent_containers/spray.dm | 119 +- .../reagents/reagent_containers/syringes.dm | 344 +- code/modules/research/circuitprinter.dm | 2 +- code/modules/research/protolathe.dm | 2 +- .../research/xenoarchaeology/chemistry.dm | 69 - .../xenoarchaeology/machinery/coolant.dm | 17 - code/modules/surgery/other.dm | 6 +- code/modules/virus2/antibodies.dm | 4 +- code/modules/virus2/dishincubator.dm | 2 +- code/modules/virus2/effect.dm | 2 +- code/setup.dm | 16 +- maps/exodus-1.dmm | 6 +- 88 files changed, 7327 insertions(+), 8992 deletions(-) create mode 100644 code/_defines/chemical_effects.dm rename code/game/objects/effects/{ => chem}/chemsmoke.dm (57%) create mode 100644 code/game/objects/effects/chem/foam.dm create mode 100644 code/game/objects/effects/chem/water.dm delete mode 100644 code/modules/reagents/Chemistry-Reagents-Antidepressants.dm delete mode 100644 code/modules/reagents/reagent_containers/robodropper.dm diff --git a/baystation12.dme b/baystation12.dme index fbe5aba289..c7d7cff09e 100644 --- a/baystation12.dme +++ b/baystation12.dme @@ -32,6 +32,7 @@ #include "code\__HELPERS\type2type.dm" #include "code\__HELPERS\unsorted.dm" #include "code\__HELPERS\vector.dm" +#include "code\_defines\chemical_effects.dm" #include "code\_onclick\adjacent.dm" #include "code\_onclick\ai.dm" #include "code\_onclick\click.dm" @@ -504,7 +505,6 @@ #include "code\game\objects\weapons.dm" #include "code\game\objects\effects\aliens.dm" #include "code\game\objects\effects\bump_teleporter.dm" -#include "code\game\objects\effects\chemsmoke.dm" #include "code\game\objects\effects\effect_system.dm" #include "code\game\objects\effects\explosion_particles.dm" #include "code\game\objects\effects\gibs.dm" @@ -517,6 +517,9 @@ #include "code\game\objects\effects\portals.dm" #include "code\game\objects\effects\spiders.dm" #include "code\game\objects\effects\step_triggers.dm" +#include "code\game\objects\effects\chem\chemsmoke.dm" +#include "code\game\objects\effects\chem\foam.dm" +#include "code\game\objects\effects\chem\water.dm" #include "code\game\objects\effects\decals\cleanable.dm" #include "code\game\objects\effects\decals\contraband.dm" #include "code\game\objects\effects\decals\crayon.dm" @@ -1397,7 +1400,6 @@ #include "code\modules\reagents\Chemistry-Holder.dm" #include "code\modules\reagents\Chemistry-Machinery.dm" #include "code\modules\reagents\Chemistry-Readme.dm" -#include "code\modules\reagents\Chemistry-Reagents-Antidepressants.dm" #include "code\modules\reagents\Chemistry-Reagents.dm" #include "code\modules\reagents\Chemistry-Recipes.dm" #include "code\modules\reagents\reagent_containers.dm" @@ -1415,7 +1417,6 @@ #include "code\modules\reagents\reagent_containers\glass.dm" #include "code\modules\reagents\reagent_containers\hypospray.dm" #include "code\modules\reagents\reagent_containers\pill.dm" -#include "code\modules\reagents\reagent_containers\robodropper.dm" #include "code\modules\reagents\reagent_containers\spray.dm" #include "code\modules\reagents\reagent_containers\syringes.dm" #include "code\modules\reagents\reagent_containers\food\cans.dm" diff --git a/code/__HELPERS/game.dm b/code/__HELPERS/game.dm index 45618f2ffc..e185c42230 100644 --- a/code/__HELPERS/game.dm +++ b/code/__HELPERS/game.dm @@ -430,6 +430,34 @@ datum/projectile_data var/b = mixOneColor(weights, blues) return rgb(r,g,b) +/proc/mixOneColor(var/list/weight, var/list/color) + if (!weight || !color || length(weight)!=length(color)) + return 0 + + var/contents = length(weight) + var/i + + //normalize weights + var/listsum = 0 + for(i=1; i<=contents; i++) + listsum += weight[i] + for(i=1; i<=contents; i++) + weight[i] /= listsum + + //mix them + var/mixedcolor = 0 + for(i=1; i<=contents; i++) + mixedcolor += weight[i]*color[i] + mixedcolor = round(mixedcolor) + + //until someone writes a formal proof for this algorithm, let's keep this in +// if(mixedcolor<0x00 || mixedcolor>0xFF) +// return 0 + //that's not the kind of operation we are running here, nerd + mixedcolor=min(max(mixedcolor,0),255) + + return mixedcolor + /** * Gets the highest and lowest pressures from the tiles in cardinal directions * around us, then checks the difference. diff --git a/code/_defines/chemical_effects.dm b/code/_defines/chemical_effects.dm new file mode 100644 index 0000000000..6119d80cb5 --- /dev/null +++ b/code/_defines/chemical_effects.dm @@ -0,0 +1,7 @@ +#define CE_STABLE "stable" // Inaprovaline +#define CE_ANTIBIOTIC "antibiotic" // Spaceacilin +#define CE_BLOODRESTORE "bloodrestore" // Iron/nutriment +#define CE_PAINKILLER "painkiller" +#define CE_ALCOHOL "alcohol" // Liver filtering +#define CE_ALCOHOL_TOXIC "alcotoxic" // Liver damage +#define CE_SPEEDBOOST "gofast" // Hyperzine \ No newline at end of file diff --git a/code/datums/recipe.dm b/code/datums/recipe.dm index 9c72feef39..7e220141f5 100644 --- a/code/datums/recipe.dm +++ b/code/datums/recipe.dm @@ -94,7 +94,7 @@ /datum/recipe/proc/make(var/obj/container as obj) var/obj/result_obj = new result(container) for (var/obj/O in (container.contents-result_obj)) - O.reagents.trans_to(result_obj, O.reagents.total_volume) + O.reagents.trans_to_obj(result_obj, O.reagents.total_volume) del(O) container.reagents.clear_reagents() return result_obj @@ -109,7 +109,7 @@ if (O.reagents) O.reagents.del_reagent("nutriment") O.reagents.update_total() - O.reagents.trans_to(result_obj, O.reagents.total_volume) + O.reagents.trans_to_obj(result_obj, O.reagents.total_volume) del(O) container.reagents.clear_reagents() return result_obj diff --git a/code/game/dna/dna_modifier.dm b/code/game/dna/dna_modifier.dm index 53086de252..c6ca532bbc 100644 --- a/code/game/dna/dna_modifier.dm +++ b/code/game/dna/dna_modifier.dm @@ -598,8 +598,7 @@ inject_amount = 0 if (inject_amount > 50) inject_amount = 50 - connected.beaker.reagents.trans_to(connected.occupant, inject_amount) - connected.beaker.reagents.reaction(connected.occupant) + connected.beaker.reagents.trans_to_mob(connected.occupant, inject_amount, CHEM_BLOOD) return 1 // return 1 forces an update to all Nano uis attached to src //////////////////////////////////////////////////////// diff --git a/code/game/machinery/Sleeper.dm b/code/game/machinery/Sleeper.dm index 91c96fcfc9..5f2fbae56c 100644 --- a/code/game/machinery/Sleeper.dm +++ b/code/game/machinery/Sleeper.dm @@ -191,10 +191,10 @@ if(beaker.reagents.total_volume < beaker.reagents.maximum_volume) var/pumped = 0 for(var/datum/reagent/x in src.occupant.reagents.reagent_list) - src.occupant.reagents.trans_to(beaker, 3) + src.occupant.reagents.trans_to_obj(beaker, 3) pumped++ if (ishuman(src.occupant)) - src.occupant.vessel.trans_to(beaker, pumped + 1) + src.occupant.vessel.trans_to_obj(beaker, pumped + 1) src.updateUsrDialog() return diff --git a/code/game/machinery/bots/farmbot.dm b/code/game/machinery/bots/farmbot.dm index 4db416e7a6..7878b1e7a1 100644 --- a/code/game/machinery/bots/farmbot.dm +++ b/code/game/machinery/bots/farmbot.dm @@ -466,12 +466,7 @@ var splashAmount = min(70,tank.reagents.total_volume) src.visible_message("\red [src] splashes [target] with a bucket of water!") playsound(src.loc, 'sound/effects/slosh.ogg', 25, 1) - if ( prob(50) ) - tank.reagents.reaction(target, TOUCH) //splash the human! - else - tank.reagents.reaction(target.loc, TOUCH) //splash the human's roots! - spawn(5) - tank.reagents.remove_any(splashAmount) + tank.reagents.splash_mob(target, splashAmount) mode = FARMBOT_MODE_WAITING spawn(FARMBOT_EMAG_DELAY) diff --git a/code/game/machinery/bots/medbot.dm b/code/game/machinery/bots/medbot.dm index fbcb7d448e..5083ce6b97 100644 --- a/code/game/machinery/bots/medbot.dm +++ b/code/game/machinery/bots/medbot.dm @@ -428,8 +428,7 @@ spawn(30) if ((get_dist(src, src.patient) <= 1) && (src.on)) if((reagent_id == "internal_beaker") && (src.reagent_glass) && (src.reagent_glass.reagents.total_volume)) - src.reagent_glass.reagents.trans_to(src.patient,src.injection_amount) //Inject from beaker instead. - src.reagent_glass.reagents.reaction(src.patient, 2) + src.reagent_glass.reagents.trans_to_mob(src.patient, src.injection_amount, CHEM_BLOOD) //Inject from beaker instead. else src.patient.reagents.add_reagent(reagent_id,src.injection_amount) visible_message("\red [src] injects [src.patient] with the syringe!") diff --git a/code/game/machinery/cryo.dm b/code/game/machinery/cryo.dm index a9858742c9..803269a449 100644 --- a/code/game/machinery/cryo.dm +++ b/code/game/machinery/cryo.dm @@ -230,8 +230,7 @@ var/has_clonexa = occupant.reagents.get_reagent_amount("clonexadone") >= 1 var/has_cryo_medicine = has_cryo || has_clonexa if(beaker && !has_cryo_medicine) - beaker.reagents.trans_to(occupant, 1, 10) - beaker.reagents.reaction(occupant) + beaker.reagents.trans_to_mob(occupant, 1, CHEM_BLOOD, 10) /obj/machinery/atmospherics/unary/cryo_cell/proc/heat_gas_contents() if(air_contents.total_moles < 1) diff --git a/code/game/machinery/iv_drip.dm b/code/game/machinery/iv_drip.dm index 63ad92f017..99a2dc6607 100644 --- a/code/game/machinery/iv_drip.dm +++ b/code/game/machinery/iv_drip.dm @@ -32,7 +32,7 @@ if(80 to 90) filling.icon_state = "reagent80" if(91 to INFINITY) filling.icon_state = "reagent100" - filling.icon += mix_color_from_reagents(reagents.reagent_list) + filling.icon += reagents.get_color() overlays += filling /obj/machinery/iv_drip/MouseDrop(over_object, src_location, over_location) @@ -82,11 +82,11 @@ // Give blood if(mode) if(src.beaker.volume > 0) - var/transfer_amount = REAGENTS_METABOLISM + var/transfer_amount = REM if(istype(src.beaker, /obj/item/weapon/reagent_containers/blood)) // speed up transfer on blood packs transfer_amount = 4 - src.beaker.reagents.trans_to(src.attached, transfer_amount) + src.beaker.reagents.trans_to_mob(src.attached, transfer_amount, CHEM_BLOOD) update_icon() // Take blood diff --git a/code/game/machinery/kitchen/gibber.dm b/code/game/machinery/kitchen/gibber.dm index 52c1bdc380..657357542b 100644 --- a/code/game/machinery/kitchen/gibber.dm +++ b/code/game/machinery/kitchen/gibber.dm @@ -210,7 +210,7 @@ new_meat.reagents.add_reagent("nutriment",slab_nutrition) if(src.occupant.reagents) - src.occupant.reagents.trans_to(new_meat, round(occupant.reagents.total_volume/slab_count,1)) + src.occupant.reagents.trans_to_obj(new_meat, round(occupant.reagents.total_volume/slab_count,1)) src.occupant.attack_log += "\[[time_stamp()]\] Was gibbed by [user]/[user.ckey]" //One shall not simply gib a mob unnoticed! user.attack_log += "\[[time_stamp()]\] Gibbed [src.occupant]/[src.occupant.ckey]" diff --git a/code/game/mecha/equipment/tools/medical_tools.dm b/code/game/mecha/equipment/tools/medical_tools.dm index 08d6f2cca4..b25baa024d 100644 --- a/code/game/mecha/equipment/tools/medical_tools.dm +++ b/code/game/mecha/equipment/tools/medical_tools.dm @@ -439,7 +439,7 @@ var/turf/trg = get_turf(target) var/obj/item/weapon/reagent_containers/syringe/S = syringes[1] S.forceMove(get_turf(chassis)) - reagents.trans_to(S, min(S.volume, reagents.total_volume)) + reagents.trans_to_obj(S, min(S.volume, reagents.total_volume)) syringes -= S S.icon = 'icons/obj/chemical.dmi' S.icon_state = "syringeproj" @@ -458,7 +458,7 @@ if(M) S.icon_state = initial(S.icon_state) S.icon = initial(S.icon) - S.reagents.trans_to(M, S.reagents.total_volume) + S.reagents.trans_to_mob(M, S.reagents.total_volume, CHEM_BLOOD) M.take_organ_damage(2) S.visible_message(" [M] was hit by the syringe!") break @@ -587,7 +587,7 @@ if(!(D.CanPass(S,src.loc))) occupant_message("Unable to load syringe.") return 0 - S.reagents.trans_to(src, S.reagents.total_volume) + S.reagents.trans_to_obj(src, S.reagents.total_volume) S.forceMove(src) syringes += S occupant_message("Syringe loaded.") diff --git a/code/game/mecha/equipment/tools/tools.dm b/code/game/mecha/equipment/tools/tools.dm index 130d8d89c8..11cec79139 100644 --- a/code/game/mecha/equipment/tools/tools.dm +++ b/code/game/mecha/equipment/tools/tools.dm @@ -194,7 +194,7 @@ if(do_after_cooldown(target)) if( istype(target, /obj/structure/reagent_dispensers/watertank) && get_dist(chassis,target) <= 1) var/obj/o = target - var/amount = o.reagents.trans_to(src, 200) + var/amount = o.reagents.trans_to_obj(src, 200) occupant_message("\blue [amount] units transferred into internal tank.") playsound(chassis, 'sound/effects/refill.ogg', 50, 1, -6) return @@ -213,29 +213,24 @@ var/list/the_targets = list(T,T1,T2) - for(var/a=0, a<5, a++) + for(var/a = 1 to 5) spawn(0) - var/obj/effect/effect/water/W = new /obj/effect/effect/water( get_turf(chassis) ) - var/turf/my_target = pick(the_targets) - var/datum/reagents/R = new/datum/reagents(5) - if(!W) return - W.reagents = R - R.my_atom = W - if(!W || !src) return - src.reagents.trans_to(W,1) - for(var/b=0, b<5, b++) - step_towards(W,my_target) - if(!W || !W.reagents) return - W.reagents.reaction(get_turf(W)) - for(var/atom/atm in get_turf(W)) - if(!W) - return - if(!W.reagents) - break - W.reagents.reaction(atm) - if(W.loc == my_target) break - sleep(2) - W.delete() + var/obj/effect/effect/water/W = new /obj/effect/effect/water(get_turf(chassis)) + var/turf/my_target + if(a == 1) + my_target = T + else if(a == 2) + my_target = T1 + else if(a == 3) + my_target = T2 + else + my_target = pick(the_targets) + W.create_reagents(5) + if(!src) + return + reagents.trans_to_obj(W, spray_amount) + W.set_color() + W.set_up(my_target) return 1 get_equip_info() diff --git a/code/game/objects/effects/chemsmoke.dm b/code/game/objects/effects/chem/chemsmoke.dm similarity index 57% rename from code/game/objects/effects/chemsmoke.dm rename to code/game/objects/effects/chem/chemsmoke.dm index e64a84c47c..04f3b5d23d 100644 --- a/code/game/objects/effects/chemsmoke.dm +++ b/code/game/objects/effects/chem/chemsmoke.dm @@ -5,13 +5,11 @@ icon = 'icons/effects/chemsmoke.dmi' opacity = 0 time_to_live = 300 - pass_flags = PASSTABLE | PASSGRILLE | PASSGLASS //PASSGLASS is fine here, it's just so the visual effect can "flow" around glass + pass_flags = PASSTABLE | PASSGRILLE | PASSGLASS //PASSGLASS is fine here, it's just so the visual effect can "flow" around glass /obj/effect/effect/smoke/chem/New() ..() - var/datum/reagents/R = new/datum/reagents(500) - reagents = R - R.my_atom = src + create_reagents(500) return /datum/effect/effect/system/smoke_spread/chem @@ -37,21 +35,16 @@ /datum/effect/effect/system/smoke_spread/chem/New() ..() chemholder = new/obj() - var/datum/reagents/R = new/datum/reagents(500) - chemholder.reagents = R - R.my_atom = chemholder + chemholder.create_reagents(500) -//------------------------------------------ //Sets up the chem smoke effect -// // Calculates the max range smoke can travel, then gets all turfs in that view range. // Culls the selected turfs to a (roughly) circle shape, then calls smokeFlow() to make // sure the smoke can actually path to the turfs. This culls any turfs it can't reach. -//------------------------------------------ /datum/effect/effect/system/smoke_spread/chem/set_up(var/datum/reagents/carry = null, n = 10, c = 0, loca, direct) range = n * 0.3 cardinals = c - carry.copy_to(chemholder, carry.total_volume) + carry.trans_to_obj(chemholder, carry.total_volume, copy = 1) if(istype(loca, /turf/)) location = loca @@ -62,28 +55,19 @@ targetTurfs = new() - //build affected area list - for(var/turf/T in view(range, location)) - //cull turfs to circle - if(cheap_pythag(T.x - location.x, T.y - location.y) <= range) + for(var/turf/T in view(range, location)) //build affected area list + if(cheap_pythag(T.x - location.x, T.y - location.y) <= range) //cull turfs to circle targetTurfs += T - //make secondary list for reagents that affect walls - if(chemholder.reagents.has_reagent("thermite") || chemholder.reagents.has_reagent("plantbgone")) - wallList = new() + wallList = new() - //pathing check - smokeFlow(location, targetTurfs, wallList) + smokeFlow() //pathing check //set the density of the cloud - for diluting reagents - density = max(1, targetTurfs.len / 4) //clamp the cloud density minimum to 1 so it cant multiply the reagents + density = max(1, targetTurfs.len / 4) //clamp the cloud density minimum to 1 so it cant multiply the reagents //Admin messaging - var/contained = "" - for(var/reagent in carry.reagent_list) - contained += " [reagent] " - if(contained) - contained = "\[[contained]\]" + var/contained = carry.get_reagents() var/area/A = get_area(location) var/where = "[A.name] | [location.x], [location.y]" @@ -101,61 +85,27 @@ message_admins("A chemical smoke reaction has taken place in ([whereLink]). No associated key.", 0, 1) log_game("A chemical smoke reaction has taken place in ([where])[contained]. No associated key.") - -//------------------------------------------ //Runs the chem smoke effect -// // Spawns damage over time loop for each reagent held in the cloud. // Applies reagents to walls that affect walls (only thermite and plant-b-gone at the moment). // Also calculates target locations to spawn the visual smoke effect on, so the whole area // is covered fairly evenly. -//------------------------------------------ /datum/effect/effect/system/smoke_spread/chem/start() - - if(!location) //kill grenade if it somehow ends up in nullspace + if(!location) return - //reagent application - only run if there are extra reagents in the smoke - if(chemholder.reagents.reagent_list.len) - for(var/datum/reagent/R in chemholder.reagents.reagent_list) - var/proba = 100 - var/runs = 5 + if(chemholder.reagents.reagent_list.len) //reagent application - only run if there are extra reagents in the smoke + for(var/turf/T in wallList) + chemholder.reagents.touch_turf(T) + for(var/turf/T in targetTurfs) + chemholder.reagents.touch_turf(T) + for(var/atom/A in T.contents) + if(istype(A, /obj/effect/effect/smoke/chem) || istype(A, /mob)) + continue + else if(isobj(A)) + chemholder.reagents.touch_obj(A) - //dilute the reagents according to cloud density - R.volume /= density - chemholder.reagents.update_total() - - //apply wall affecting reagents to walls - if(R.id in list("thermite", "plantbgone")) - for(var/turf/T in wallList) - R.reaction_turf(T, R.volume) - - //reagents that should be applied to turfs in a random pattern - if(R.id == "carbon") - proba = 75 - else if(R.id in list("blood", "radium", "uranium")) - proba = 25 - - spawn(0) - for(var/i = 0, i < runs, i++) - for(var/turf/T in targetTurfs) - if(prob(proba)) - R.reaction_turf(T, R.volume) - for(var/atom/A in T.contents) - if(istype(A, /obj/effect/effect/smoke/chem)) //skip the item if it is chem smoke - continue - else if(istype(A, /mob)) - var/dist = cheap_pythag(T.x - location.x, T.y - location.y) - if(!dist) - dist = 1 - R.reaction_mob(A, volume = R.volume / dist) - else if(istype(A, /obj)) - R.reaction_obj(A, R.volume) - sleep(30) - - - //build smoke icon - var/color = mix_color_from_reagents(chemholder.reagents.reagent_list) + var/color = chemholder.reagents.get_color() //build smoke icon var/icon/I if(color) I = icon('icons/effects/chemsmoke.dmi') @@ -163,13 +113,9 @@ else I = icon('icons/effects/96x96.dmi', "smoke") + var/const/arcLength = 2.3559 //distance between each smoke cloud - //distance between each smoke cloud - var/const/arcLength = 2.3559 - - - //calculate positions for smoke coverage - then spawn smoke - for(var/i = 0, i < range, i++) + for(var/i = 0, i < range, i++) //calculate positions for smoke coverage - then spawn smoke var/radius = i * 1.5 if(!radius) spawn(0) @@ -194,25 +140,16 @@ spawn(0) spawnSmoke(T, I, range) -//------------------------------------------ -// Randomizes and spawns the smoke effect. -// Also handles deleting the smoke once the effect is finished. -//------------------------------------------ -/datum/effect/effect/system/smoke_spread/chem/proc/spawnSmoke(var/turf/T, var/icon/I, var/dist = 1, var/obj/effect/effect/smoke/chem/passed_smoke) - - var/obj/effect/effect/smoke/chem/smoke - if(passed_smoke) - smoke = passed_smoke - else - smoke = new(location) +/datum/effect/effect/system/smoke_spread/chem/proc/spawnSmoke(var/turf/T, var/icon/I, var/dist = 1) // Randomizes and spawns the smoke effect. Also handles deleting the smoke once the effect is finished. + var/obj/effect/effect/smoke/chem/smoke = new(location) if(chemholder.reagents.reagent_list.len) - chemholder.reagents.copy_to(smoke, chemholder.reagents.total_volume / dist, safety = 1) //copy reagents to the smoke so mob/breathe() can handle inhaling the reagents + chemholder.reagents.trans_to_obj(smoke, chemholder.reagents.total_volume / dist, copy = 1) //copy reagents to the smoke so mob/breathe() can handle inhaling the reagents smoke.icon = I smoke.layer = 6 smoke.set_dir(pick(cardinal)) - smoke.pixel_x = -32 + rand(-8,8) - smoke.pixel_y = -32 + rand(-8,8) + smoke.pixel_x = -32 + rand(-8, 8) + smoke.pixel_y = -32 + rand(-8, 8) walk_to(smoke, T) smoke.opacity = 1 //switching opacity on after the smoke has spawned, and then sleep(150+rand(0,20)) // turning it off before it is deleted results in cleaner @@ -225,21 +162,15 @@ spores.name = "cloud of [seed.seed_name] [seed.seed_noun]" ..(T, I, dist, spores) -//------------------------------------------ -// Fades out the smoke smoothly using it's alpha variable. -//------------------------------------------ -/datum/effect/effect/system/smoke_spread/chem/proc/fadeOut(var/atom/A, var/frames = 16) +/datum/effect/effect/system/smoke_spread/chem/proc/fadeOut(var/atom/A, var/frames = 16) // Fades out the smoke smoothly using it's alpha variable. var/step = A.alpha / frames for(var/i = 0, i < frames, i++) A.alpha -= step sleep(world.tick_lag) return -//------------------------------------------ -// Smoke pathfinder. Uses a flood fill method based on zones to -// quickly check what turfs the smoke (airflow) can actually reach. -//------------------------------------------ -/datum/effect/effect/system/smoke_spread/chem/proc/smokeFlow() + +/datum/effect/effect/system/smoke_spread/chem/proc/smokeFlow() // Smoke pathfinder. Uses a flood fill method based on zones to quickly check what turfs the smoke (airflow) can actually reach. var/list/pending = new() var/list/complete = new() diff --git a/code/game/objects/effects/chem/foam.dm b/code/game/objects/effects/chem/foam.dm new file mode 100644 index 0000000000..7f9a8f741a --- /dev/null +++ b/code/game/objects/effects/chem/foam.dm @@ -0,0 +1,184 @@ +// Foam +// Similar to smoke, but spreads out more +// metal foams leave behind a foamed metal wall + +/obj/effect/effect/foam + name = "foam" + icon_state = "foam" + opacity = 0 + anchored = 1 + density = 0 + layer = OBJ_LAYER + 0.9 + mouse_opacity = 0 + animate_movement = 0 + var/amount = 3 + var/expand = 1 + var/metal = 0 + +/obj/effect/effect/foam/New(var/loc, var/ismetal = 0) + ..(loc) + icon_state = "[ismetal? "m" : ""]foam" + metal = ismetal + playsound(src, 'sound/effects/bubbles2.ogg', 80, 1, -3) + spawn(3 + metal * 3) + process() + checkReagents() + spawn(120) + processing_objects.Remove(src) + sleep(30) + if(metal) + var/obj/structure/foamedmetal/M = new(src.loc) + M.metal = metal + M.updateicon() + flick("[icon_state]-disolve", src) + sleep(5) + delete() + return + +/obj/effect/effect/foam/proc/checkReagents() // transfer any reagents to the floor + if(!metal && reagents) + var/turf/T = get_turf(src) + reagents.touch_turf(T) + +/obj/effect/effect/foam/process() + if(--amount < 0) + return + + for(var/direction in cardinal) + var/turf/T = get_step(src, direction) + if(!T) + continue + + if(!T.Enter(src)) + continue + + var/obj/effect/effect/foam/F = locate() in T + if(F) + continue + + F = new(T, metal) + F.amount = amount + if(!metal) + F.create_reagents(10) + if(reagents) + for(var/datum/reagent/R in reagents.reagent_list) + F.reagents.add_reagent(R.id, 1, safety = 1) //added safety check since reagents in the foam have already had a chance to react + +/obj/effect/effect/foam/fire_act(datum/gas_mixture/air, exposed_temperature, exposed_volume) // foam disolves when heated, except metal foams + if(!metal && prob(max(0, exposed_temperature - 475))) + flick("[icon_state]-disolve", src) + + spawn(5) + delete() + +/obj/effect/effect/foam/Crossed(var/atom/movable/AM) + if(metal) + return + if(istype(AM, /mob/living)) + var/mob/living/M = AM + M.slip("the foam", 6) + +/datum/effect/effect/system/foam_spread + var/amount = 5 // the size of the foam spread. + var/list/carried_reagents // the IDs of reagents present when the foam was mixed + var/metal = 0 // 0 = foam, 1 = metalfoam, 2 = ironfoam + +/datum/effect/effect/system/foam_spread/set_up(amt=5, loca, var/datum/reagents/carry = null, var/metalfoam = 0) + amount = round(sqrt(amt / 3), 1) + if(istype(loca, /turf/)) + location = loca + else + location = get_turf(loca) + + carried_reagents = list() + metal = metalfoam + + // bit of a hack here. Foam carries along any reagent also present in the glass it is mixed with (defaults to water if none is present). Rather than actually transfer the reagents, this makes a list of the reagent ids and spawns 1 unit of that reagent when the foam disolves. + + if(carry && !metal) + for(var/datum/reagent/R in carry.reagent_list) + carried_reagents += R.id + +/datum/effect/effect/system/foam_spread/start() + spawn(0) + var/obj/effect/effect/foam/F = locate() in location + if(F) + F.amount += amount + return + + F = new(location, metal) + F.amount = amount + + if(!metal) // don't carry other chemicals if a metal foam + F.create_reagents(10) + + if(carried_reagents) + for(var/id in carried_reagents) + F.reagents.add_reagent(id, 1, safety = 1) //makes a safety call because all reagents should have already reacted anyway + else + F.reagents.add_reagent("water", 1, safety = 1) + +// wall formed by metal foams, dense and opaque, but easy to break + +/obj/structure/foamedmetal + icon = 'icons/effects/effects.dmi' + icon_state = "metalfoam" + density = 1 + opacity = 1 // changed in New() + anchored = 1 + name = "foamed metal" + desc = "A lightweight foamed metal wall." + var/metal = 1 // 1 = aluminum, 2 = iron + +/obj/structure/foamedmetal/New() + ..() + update_nearby_tiles(1) + +/obj/structure/foamedmetal/Del() + density = 0 + update_nearby_tiles(1) + ..() + +/obj/structure/foamedmetal/proc/updateicon() + if(metal == 1) + icon_state = "metalfoam" + else + icon_state = "ironfoam" + +/obj/structure/foamedmetal/ex_act(severity) + del(src) + +/obj/structure/foamedmetal/blob_act() + del(src) + +/obj/structure/foamedmetal/bullet_act() + if(metal == 1 || prob(50)) + del(src) + +/obj/structure/foamedmetal/attack_hand(var/mob/user) + if ((HULK in user.mutations) || (prob(75 - metal * 25))) + user.visible_message("[user] smashes through the foamed metal.", "You smash through the metal foam wall.") + del(src) + else + user << "You hit the metal foam but bounce off it." + return + +/obj/structure/foamedmetal/attackby(var/obj/item/I, var/mob/user) + if(istype(I, /obj/item/weapon/grab)) + var/obj/item/weapon/grab/G = I + G.affecting.loc = src.loc + visible_message("[G.assailant] smashes [G.affecting] through the foamed metal wall.") + del(I) + del(src) + return + + if(prob(I.force * 20 - metal * 25)) + user.visible_message("[user] smashes through the foamed metal.", "You smash through the foamed metal with \the [I].") + del(src) + else + user << "You hit the metal foam to no effect." + +/obj/structure/foamedmetal/CanPass(atom/movable/mover, turf/target, height=1.5, air_group = 0) + if(air_group) + return 0 + return !density \ No newline at end of file diff --git a/code/game/objects/effects/chem/water.dm b/code/game/objects/effects/chem/water.dm new file mode 100644 index 0000000000..e164b20b60 --- /dev/null +++ b/code/game/objects/effects/chem/water.dm @@ -0,0 +1,50 @@ +/obj/effect/effect/water + name = "water" + icon = 'icons/effects/effects.dmi' + icon_state = "extinguish" + mouse_opacity = 0 + +/obj/effect/effect/water/New(loc) + ..() + spawn(150) // In case whatever made it forgets to delete it + if(src) + delete() + +/obj/effect/effect/water/proc/set_color() // Call it after you move reagents to it + icon += reagents.get_color() + +/obj/effect/effect/water/proc/set_up(var/turf/target, var/step_count = 5, var/delay = 5) + if(!target) + return + for(var/i = 1 to step_count) + step_towards(src, target) + var/turf/T = get_turf(src) + reagents.touch_turf(T) + var/mob/M = locate() in T + if(M) + reagents.splash_mob(M, reagents.total_volume) + break + for(var/atom/A in T) + reagents.touch(A) + if(T == get_turf(target)) + break + sleep(delay) + sleep(10) + delete() + +/obj/effect/effect/water/Move(turf/newloc) + if(newloc.density) + return 0 + . = ..() + +/obj/effect/effect/water/Bump(atom/A) + if(reagents) + reagents.touch(A) + return ..() + +//Used by spraybottles. +/obj/effect/effect/water/chempuff + name = "chemicals" + icon = 'icons/obj/chempuff.dmi' + icon_state = "" + pass_flags = PASSTABLE | PASSGRILLE \ No newline at end of file diff --git a/code/game/objects/effects/decals/misc.dm b/code/game/objects/effects/decals/misc.dm index 7734989150..964a1301b8 100644 --- a/code/game/objects/effects/decals/misc.dm +++ b/code/game/objects/effects/decals/misc.dm @@ -11,10 +11,4 @@ /obj/effect/decal/spraystill density = 0 anchored = 1 - layer = 50 - -//Used by spraybottles. -/obj/effect/decal/chempuff - name = "chemicals" - icon = 'icons/obj/chempuff.dmi' - pass_flags = PASSTABLE | PASSGRILLE \ No newline at end of file + layer = 50 \ No newline at end of file diff --git a/code/game/objects/effects/effect_system.dm b/code/game/objects/effects/effect_system.dm index ea9af2f70f..9182204fe3 100644 --- a/code/game/objects/effects/effect_system.dm +++ b/code/game/objects/effects/effect_system.dm @@ -13,36 +13,12 @@ would spawn and follow the beaker, even if it is carried or thrown. unacidable = 1//So effect are not targeted by alien acid. pass_flags = PASSTABLE | PASSGRILLE -/obj/effect/effect/water - name = "water" - icon = 'icons/effects/effects.dmi' - icon_state = "extinguish" - var/life = 15.0 - mouse_opacity = 0 - /obj/effect/proc/delete() loc = null if(reagents) reagents.delete() return -/obj/effect/effect/water/Move(turf/newloc) - //var/turf/T = src.loc - //if (istype(T, /turf)) - // T.firelevel = 0 //TODO: FIX - if (--src.life < 1) - //SN src = null - delete() - if(newloc.density) - return 0 - .=..() - -/obj/effect/effect/water/Bump(atom/A) - if(reagents) - reagents.reaction(A) - return ..() - - /datum/effect/effect/system var/number = 3 var/cardinals = 0 @@ -482,227 +458,6 @@ steam.start() -- spawns the effect src.processing = 0 src.on = 0 - - -// Foam -// Similar to smoke, but spreads out more -// metal foams leave behind a foamed metal wall - -/obj/effect/effect/foam - name = "foam" - icon_state = "foam" - opacity = 0 - anchored = 1 - density = 0 - layer = OBJ_LAYER + 0.9 - mouse_opacity = 0 - var/amount = 3 - var/expand = 1 - animate_movement = 0 - var/metal = 0 - - -/obj/effect/effect/foam/New(loc, var/ismetal=0) - ..(loc) - icon_state = "[ismetal ? "m":""]foam" - metal = ismetal - playsound(src, 'sound/effects/bubbles2.ogg', 80, 1, -3) - spawn(3 + metal*3) - process() - checkReagents() - spawn(120) - processing_objects.Remove(src) - sleep(30) - - if(metal) - var/obj/structure/foamedmetal/M = new(src.loc) - M.metal = metal - M.updateicon() - - flick("[icon_state]-disolve", src) - sleep(5) - delete() - return - -// transfer any reagents to the floor -/obj/effect/effect/foam/proc/checkReagents() - if(!metal && reagents) - for(var/atom/A in src.loc.contents) - if(A == src) - continue - reagents.reaction(A, 1, 1) - -/obj/effect/effect/foam/process() - if(--amount < 0) - return - - - for(var/direction in cardinal) - - - var/turf/T = get_step(src,direction) - if(!T) - continue - - if(!T.Enter(src)) - continue - - var/obj/effect/effect/foam/F = locate() in T - if(F) - continue - - F = new(T, metal) - F.amount = amount - if(!metal) - F.create_reagents(10) - if (reagents) - for(var/datum/reagent/R in reagents.reagent_list) - F.reagents.add_reagent(R.id, 1, safety = 1) //added safety check since reagents in the foam have already had a chance to react - -// foam disolves when heated -// except metal foams -/obj/effect/effect/foam/fire_act(datum/gas_mixture/air, exposed_temperature, exposed_volume) - if(!metal && prob(max(0, exposed_temperature - 475))) - flick("[icon_state]-disolve", src) - - spawn(5) - delete() - - -/obj/effect/effect/foam/Crossed(var/atom/movable/AM) - if(metal) - return - if(istype(AM, /mob/living)) - var/mob/living/M = AM - M.slip("the foam",6) - -/datum/effect/effect/system/foam_spread - var/amount = 5 // the size of the foam spread. - var/list/carried_reagents // the IDs of reagents present when the foam was mixed - var/metal = 0 // 0=foam, 1=metalfoam, 2=ironfoam - - - - - set_up(amt=5, loca, var/datum/reagents/carry = null, var/metalfoam = 0) - amount = round(sqrt(amt / 3), 1) - if(istype(loca, /turf/)) - location = loca - else - location = get_turf(loca) - - carried_reagents = list() - metal = metalfoam - - - // bit of a hack here. Foam carries along any reagent also present in the glass it is mixed - // with (defaults to water if none is present). Rather than actually transfer the reagents, - // this makes a list of the reagent ids and spawns 1 unit of that reagent when the foam disolves. - - - if(carry && !metal) - for(var/datum/reagent/R in carry.reagent_list) - carried_reagents += R.id - - start() - spawn(0) - var/obj/effect/effect/foam/F = locate() in location - if(F) - F.amount += amount - return - - F = new(src.location, metal) - F.amount = amount - - if(!metal) // don't carry other chemicals if a metal foam - F.create_reagents(10) - - if(carried_reagents) - for(var/id in carried_reagents) - F.reagents.add_reagent(id, 1, null, 1) //makes a safety call because all reagents should have already reacted anyway - else - F.reagents.add_reagent("water", 1, safety = 1) - -// wall formed by metal foams -// dense and opaque, but easy to break - -/obj/structure/foamedmetal - icon = 'icons/effects/effects.dmi' - icon_state = "metalfoam" - density = 1 - opacity = 1 // changed in New() - anchored = 1 - name = "foamed metal" - desc = "A lightweight foamed metal wall." - var/metal = 1 // 1=aluminum, 2=iron - - New() - ..() - update_nearby_tiles(1) - - - - Del() - - density = 0 - update_nearby_tiles(1) - ..() - - proc/updateicon() - if(metal == 1) - icon_state = "metalfoam" - else - icon_state = "ironfoam" - - - ex_act(severity) - del(src) - - blob_act() - del(src) - - bullet_act() - if(metal==1 || prob(50)) - del(src) - - attack_hand(var/mob/user) - if ((HULK in user.mutations) || (prob(75 - metal*25))) - user << "\blue You smash through the metal foam wall." - for(var/mob/O in oviewers(user)) - if ((O.client && !( O.blinded ))) - O << "\red [user] smashes through the foamed metal." - - del(src) - else - user << "\blue You hit the metal foam but bounce off it." - return - - - attackby(var/obj/item/I, var/mob/user) - - if (istype(I, /obj/item/weapon/grab)) - var/obj/item/weapon/grab/G = I - G.affecting.loc = src.loc - for(var/mob/O in viewers(src)) - if (O.client) - O << "\red [G.assailant] smashes [G.affecting] through the foamed metal wall." - del(I) - del(src) - return - - if(prob(I.force*20 - metal*25)) - user << "\blue You smash through the foamed metal with \the [I]." - for(var/mob/O in oviewers(user)) - if ((O.client && !( O.blinded ))) - O << "\red [user] smashes through the foamed metal." - del(src) - else - user << "\blue You hit the metal foam to no effect." - - CanPass(atom/movable/mover, turf/target, height=1.5, air_group = 0) - if(air_group) return 0 - return !density - /datum/effect/effect/system/reagents_explosion var/amount // TNT equivalent var/flashing = 0 // does explosion creates flash effect? diff --git a/code/game/objects/items/toys.dm b/code/game/objects/items/toys.dm index 0baff58a85..5fbebf9b6b 100644 --- a/code/game/objects/items/toys.dm +++ b/code/game/objects/items/toys.dm @@ -48,7 +48,7 @@ /obj/item/toy/balloon/afterattack(atom/A as mob|obj, mob/user as mob, proximity) if(!proximity) return if (istype(A, /obj/structure/reagent_dispensers/watertank) && get_dist(src,A) <= 1) - A.reagents.trans_to(src, 10) + A.reagents.trans_to_obj(src, 10) user << "\blue You fill the balloon with the contents of [A]." src.desc = "A translucent balloon with some form of liquid sloshing around in it." src.update_icon() @@ -62,21 +62,21 @@ else if(O.reagents.total_volume >= 1) if(O.reagents.has_reagent("pacid", 1)) user << "The acid chews through the balloon!" - O.reagents.reaction(user) + O.reagents.splash_mob(user, reagents.total_volume) del(src) else src.desc = "A translucent balloon with some form of liquid sloshing around in it." user << "\blue You fill the balloon with the contents of [O]." - O.reagents.trans_to(src, 10) + O.reagents.trans_to_obj(src, 10) src.update_icon() return /obj/item/toy/balloon/throw_impact(atom/hit_atom) if(src.reagents.total_volume >= 1) src.visible_message("\red The [src] bursts!","You hear a pop and a splash.") - src.reagents.reaction(get_turf(hit_atom)) + src.reagents.touch_turf(get_turf(hit_atom)) for(var/atom/A in get_turf(hit_atom)) - src.reagents.reaction(A) + src.reagents.touch(A) src.icon_state = "burst" spawn(5) if(src) @@ -482,15 +482,15 @@ D.icon = 'icons/obj/chemical.dmi' D.icon_state = "chempuff" D.create_reagents(5) - src.reagents.trans_to(D, 1) + src.reagents.trans_to_obj(D, 1) playsound(src.loc, 'sound/effects/spray3.ogg', 50, 1, -6) spawn(0) for(var/i=0, i<1, i++) step_towards(D,A) - D.reagents.reaction(get_turf(D)) + D.reagents.touch_turf(get_turf(D)) for(var/atom/T in get_turf(D)) - D.reagents.reaction(T) + D.reagents.touch(T) if(ismob(T) && T:client) T:client << "\red [user] has sprayed you with water!" sleep(4) diff --git a/code/game/objects/items/weapons/cigs_lighters.dm b/code/game/objects/items/weapons/cigs_lighters.dm index 67e322496c..580033e63c 100644 --- a/code/game/objects/items/weapons/cigs_lighters.dm +++ b/code/game/objects/items/weapons/cigs_lighters.dm @@ -114,10 +114,9 @@ CIGARETTE PACKETS ARE IN FANCY.DM if(H.species.flags & IS_SYNTHETIC) return - reagents.trans_to(C, REAGENTS_METABOLISM, 0.2) // Most of it is not inhaled... balance reasons. - reagents.reaction(C) + reagents.trans_to_mob(C, REM, CHEM_INGEST, 0.2) // Most of it is not inhaled... balance reasons. else // else just remove some of the reagents - reagents.remove_any(REAGENTS_METABOLISM) + reagents.remove_any(REM) /obj/item/clothing/mask/smokable/proc/light(var/flavor_text = "[usr] lights the [name].") if(!src.lit) @@ -176,7 +175,7 @@ CIGARETTE PACKETS ARE IN FANCY.DM M.update_inv_l_hand(0) M.update_inv_r_hand(1) processing_objects.Remove(src) - + /obj/item/clothing/mask/smokable/attackby(obj/item/weapon/W as obj, mob/user as mob) ..() if(isflamesource(W)) @@ -221,7 +220,7 @@ CIGARETTE PACKETS ARE IN FANCY.DM if(istype(W, /obj/item/weapon/melee/energy/sword)) var/obj/item/weapon/melee/energy/sword/S = W if(S.active) - light("[user] swings their [W], barely missing their nose. They light their [name] in the process.") + light("[user] swings their [W], barely missing their nose. They light their [name] in the process.") return @@ -230,7 +229,7 @@ CIGARETTE PACKETS ARE IN FANCY.DM if(!proximity) return if(istype(glass)) //you can dip cigarettes into beakers - var/transfered = glass.reagents.trans_to(src, chem_volume) + var/transfered = glass.reagents.trans_to_obj(src, chem_volume) if(transfered) //if reagents were transfered, show the message user << "You dip \the [src] into \the [glass]." else //if not, either the beaker was empty, or the cigarette was full @@ -375,7 +374,7 @@ CIGARETTE PACKETS ARE IN FANCY.DM return smoketime = 1000 if(G.reagents) - G.reagents.trans_to(src, G.reagents.total_volume) + G.reagents.trans_to_obj(src, G.reagents.total_volume) name = "[G.name]-packed [initial(name)]" del(G) diff --git a/code/game/objects/items/weapons/extinguisher.dm b/code/game/objects/items/weapons/extinguisher.dm index 4408e998ce..66b08e73f1 100644 --- a/code/game/objects/items/weapons/extinguisher.dm +++ b/code/game/objects/items/weapons/extinguisher.dm @@ -31,15 +31,11 @@ w_class = 2.0 force = 3.0 max_water = 60 - spray_particles = 6 - spray_amount = 2 sprite_name = "miniFE" /obj/item/weapon/extinguisher/New() - var/datum/reagents/R = new/datum/reagents(max_water) - reagents = R - R.my_atom = src - R.add_reagent("water", max_water) + create_reagents(max_water) + reagents.add_reagent("water", max_water) /obj/item/weapon/extinguisher/examine(mob/user) if(..(user, 0)) @@ -53,19 +49,19 @@ user << "The safety is [safety ? "on" : "off"]." return -/obj/item/weapon/extinguisher/afterattack(atom/target, mob/user , flag) +/obj/item/weapon/extinguisher/afterattack(var/atom/target, var/mob/user, var/flag) //TODO; Add support for reagents in water. - if( istype(target, /obj/structure/reagent_dispensers/watertank) && get_dist(src,target) <= 1) + if( istype(target, /obj/structure/reagent_dispensers/watertank) && flag) var/obj/o = target - var/amount = o.reagents.trans_to(src, 50) - user << "\blue You fill [src] with [amount] units of the contents of [target]." + var/amount = o.reagents.trans_to_obj(src, 50) + user << "You fill [src] with [amount] units of the contents of [target]." playsound(src.loc, 'sound/effects/refill.ogg', 50, 1, -6) return if (!safety) if (src.reagents.total_volume < 1) - usr << "\red \The [src] is empty." + usr << "\The [src] is empty." return if (world.time < src.last_use + 20) @@ -77,35 +73,35 @@ var/direction = get_dir(src,target) - if(usr.buckled && isobj(usr.buckled) && !usr.buckled.anchored ) + if(user.buckled && isobj(user.buckled) && !user.buckled.anchored ) spawn(0) var/obj/structure/bed/chair/C = null - if(istype(usr.buckled, /obj/structure/bed/chair)) - C = usr.buckled - var/obj/B = usr.buckled + if(istype(user.buckled, /obj/structure/bed/chair)) + C = user.buckled + var/obj/B = user.buckled var/movementdirection = turn(direction,180) if(C) C.propelled = 4 - B.Move(get_step(usr,movementdirection), movementdirection) + B.Move(get_step(user,movementdirection), movementdirection) sleep(1) - B.Move(get_step(usr,movementdirection), movementdirection) + B.Move(get_step(user,movementdirection), movementdirection) if(C) C.propelled = 3 sleep(1) - B.Move(get_step(usr,movementdirection), movementdirection) + B.Move(get_step(user,movementdirection), movementdirection) sleep(1) - B.Move(get_step(usr,movementdirection), movementdirection) + B.Move(get_step(user,movementdirection), movementdirection) if(C) C.propelled = 2 sleep(2) - B.Move(get_step(usr,movementdirection), movementdirection) + B.Move(get_step(user,movementdirection), movementdirection) if(C) C.propelled = 1 sleep(2) - B.Move(get_step(usr,movementdirection), movementdirection) + B.Move(get_step(user,movementdirection), movementdirection) if(C) C.propelled = 0 sleep(3) - B.Move(get_step(usr,movementdirection), movementdirection) + B.Move(get_step(user,movementdirection), movementdirection) sleep(3) - B.Move(get_step(usr,movementdirection), movementdirection) + B.Move(get_step(user,movementdirection), movementdirection) sleep(3) - B.Move(get_step(usr,movementdirection), movementdirection) + B.Move(get_step(user,movementdirection), movementdirection) var/turf/T = get_turf(target) var/turf/T1 = get_step(T,turn(direction, 90)) @@ -113,33 +109,24 @@ var/list/the_targets = list(T,T1,T2) - for(var/a=0, a < spray_particles, a++) + for(var/a = 1 to spray_particles) spawn(0) - var/obj/effect/effect/water/W = new /obj/effect/effect/water( get_turf(src) ) - var/turf/my_target = pick(the_targets) - var/datum/reagents/R = new/datum/reagents(spray_amount) - if(!W) return - W.reagents = R - R.my_atom = W - if(!W || !src) return - src.reagents.trans_to(W, spray_amount) - - for(var/b=0, b<5, b++) - step_towards(W,my_target) - if(!W || !W.reagents) return - W.reagents.reaction(get_turf(W)) - for(var/atom/atm in get_turf(W)) - if(!W) - return - if(!W.reagents) - break - W.reagents.reaction(atm) - if(isliving(atm)) //For extinguishing mobs on fire - var/mob/living/M = atm - M.ExtinguishMob() - if(W.loc == my_target) break - sleep(2) - W.delete() + var/obj/effect/effect/water/W = new /obj/effect/effect/water(get_turf(src)) + var/turf/my_target + if(a == 1) + my_target = T + else if(a == 2) + my_target = T1 + else if(a == 3) + my_target = T2 + else + my_target = pick(the_targets) + W.create_reagents(spray_amount) + if(!src) + return + reagents.trans_to_obj(W, spray_amount) + W.set_color() + W.set_up(my_target) if((istype(usr.loc, /turf/space)) || (usr.lastarea.has_gravity == 0)) user.inertia_dir = get_dir(target, user) diff --git a/code/game/objects/items/weapons/grenades/chem_grenade.dm b/code/game/objects/items/weapons/grenades/chem_grenade.dm index bb440d1215..a6bf75ee3a 100644 --- a/code/game/objects/items/weapons/grenades/chem_grenade.dm +++ b/code/game/objects/items/weapons/grenades/chem_grenade.dm @@ -158,7 +158,7 @@ for(var/atom/A in view(affected_area, src.loc)) if( A == src ) continue - src.reagents.reaction(A, 1, 10) + src.reagents.touch(A) if(istype(loc, /mob/living/carbon)) //drop dat grenade if it goes off in your hand var/mob/living/carbon/C = loc diff --git a/code/game/objects/items/weapons/implants/implant.dm b/code/game/objects/items/weapons/implants/implant.dm index c7c7e762ab..a912c17e64 100644 --- a/code/game/objects/items/weapons/implants/implant.dm +++ b/code/game/objects/items/weapons/implants/implant.dm @@ -291,7 +291,7 @@ the implant may become unstable and either pre-maturely inject the subject or si activate(var/cause) if((!cause) || (!src.imp_in)) return 0 var/mob/living/carbon/R = src.imp_in - src.reagents.trans_to(R, cause) + src.reagents.trans_to_mob(R, cause, CHEM_BLOOD) R << "You hear a faint *beep*." if(!src.reagents.total_volume) R << "You hear a faint click from your chest." diff --git a/code/game/objects/items/weapons/implants/implantcase.dm b/code/game/objects/items/weapons/implants/implantcase.dm index 00ce8a7950..2c581fc85e 100644 --- a/code/game/objects/items/weapons/implants/implantcase.dm +++ b/code/game/objects/items/weapons/implants/implantcase.dm @@ -38,7 +38,7 @@ user << "\red [src] is full." else spawn(5) - I.reagents.trans_to(src.imp, 5) + I.reagents.trans_to_mob(src.imp, 5) user << "\blue You inject 5 units of the solution. The syringe now contains [I.reagents.total_volume] units." else if (istype(I, /obj/item/weapon/implanter)) var/obj/item/weapon/implanter/M = I diff --git a/code/game/objects/items/weapons/kitchen.dm b/code/game/objects/items/weapons/kitchen.dm index 66d8c6d01b..637d87d33d 100644 --- a/code/game/objects/items/weapons/kitchen.dm +++ b/code/game/objects/items/weapons/kitchen.dm @@ -49,7 +49,7 @@ return ..() if (reagents.total_volume > 0) - reagents.trans_to_ingest(M, reagents.total_volume) + reagents.trans_to_mob(M, reagents.total_volume, CHEM_INGEST) if(M == user) for(var/mob/O in viewers(M, null)) O.show_message(text("\blue [] eats some [] from \the [].", user, loaded, src), 1) diff --git a/code/game/objects/items/weapons/mop.dm b/code/game/objects/items/weapons/mop.dm index fe9945f8f0..e02fd93089 100644 --- a/code/game/objects/items/weapons/mop.dm +++ b/code/game/objects/items/weapons/mop.dm @@ -25,9 +25,7 @@ for(var/obj/effect/O in src) if(istype(O,/obj/effect/rune) || istype(O,/obj/effect/decal/cleanable) || istype(O,/obj/effect/overlay)) del(O) - source.reagents.reaction(src, TOUCH, 10) //10 is the multiplier for the reaction effect. probably needed to wet the floor properly. - source.reagents.remove_any(1) //reaction() doesn't use up the reagents - + source.reagents.trans_to_turf(src, 1, 10) //10 is the multiplier for the reaction effect. probably needed to wet the floor properly. /obj/item/weapon/mop/afterattack(atom/A, mob/user, proximity) if(!proximity) return diff --git a/code/game/objects/items/weapons/paint.dm b/code/game/objects/items/weapons/paint.dm index 77f8172f8f..602e0e7abc 100644 --- a/code/game/objects/items/weapons/paint.dm +++ b/code/game/objects/items/weapons/paint.dm @@ -20,11 +20,8 @@ var/global/list/cached_icons = list() afterattack(turf/simulated/target, mob/user, proximity) if(!proximity) return if(istype(target) && reagents.total_volume > 5) - for(var/mob/O in viewers(user)) - O.show_message("\red \The [target] has been splashed with something by [user]!", 1) - spawn(5) - reagents.reaction(target, TOUCH) - reagents.remove_any(5) + user.visible_message("\The [target] has been splashed with something by [user]!") + reagents.trans_to_turf(target, 5) else return ..() diff --git a/code/game/objects/items/weapons/storage/fancy.dm b/code/game/objects/items/weapons/storage/fancy.dm index 7af6e3b16e..1a00530932 100644 --- a/code/game/objects/items/weapons/storage/fancy.dm +++ b/code/game/objects/items/weapons/storage/fancy.dm @@ -158,7 +158,7 @@ /obj/item/weapon/storage/fancy/cigarettes/remove_from_storage(obj/item/W as obj, atom/new_location) var/obj/item/clothing/mask/smokable/cigarette/C = W if(!istype(C)) return // what - reagents.trans_to(C, (reagents.total_volume/contents.len)) + reagents.trans_to_obj(C, (reagents.total_volume/contents.len)) ..() /obj/item/weapon/storage/fancy/cigarettes/attack(mob/living/carbon/M as mob, mob/living/carbon/user as mob) @@ -167,7 +167,7 @@ if(M == user && user.zone_sel.selecting == "mouth" && contents.len > 0 && !user.wear_mask) var/obj/item/clothing/mask/smokable/cigarette/W = new /obj/item/clothing/mask/smokable/cigarette(user) - reagents.trans_to(W, (reagents.total_volume/contents.len)) + reagents.trans_to_obj(W, (reagents.total_volume/contents.len)) user.equip_to_slot_if_possible(W, slot_wear_mask) reagents.maximum_volume = 15 * contents.len contents.len-- @@ -213,7 +213,7 @@ /obj/item/weapon/storage/fancy/cigar/remove_from_storage(obj/item/W as obj, atom/new_location) var/obj/item/clothing/mask/smokable/cigarette/cigar/C = W if(!istype(C)) return - reagents.trans_to(C, (reagents.total_volume/contents.len)) + reagents.trans_to_obj(C, (reagents.total_volume/contents.len)) ..() /obj/item/weapon/storage/fancy/cigar/attack(mob/living/carbon/M as mob, mob/living/carbon/user as mob) @@ -222,7 +222,7 @@ if(M == user && user.zone_sel.selecting == "mouth" && contents.len > 0 && !user.wear_mask) var/obj/item/clothing/mask/smokable/cigarette/cigar/W = new /obj/item/clothing/mask/smokable/cigarette/cigar(user) - reagents.trans_to(W, (reagents.total_volume/contents.len)) + reagents.trans_to_obj(W, (reagents.total_volume/contents.len)) user.equip_to_slot_if_possible(W, slot_wear_mask) reagents.maximum_volume = 15 * contents.len contents.len-- diff --git a/code/game/objects/items/weapons/tools.dm b/code/game/objects/items/weapons/tools.dm index ee56415be7..42d4b4c660 100644 --- a/code/game/objects/items/weapons/tools.dm +++ b/code/game/objects/items/weapons/tools.dm @@ -247,7 +247,7 @@ /obj/item/weapon/weldingtool/afterattack(obj/O as obj, mob/user as mob, proximity) if(!proximity) return if (istype(O, /obj/structure/reagent_dispensers/fueltank) && get_dist(src,O) <= 1 && !src.welding) - O.reagents.trans_to(src, max_fuel) + O.reagents.trans_to_obj(src, max_fuel) user << "\blue Welder refueled" playsound(src.loc, 'sound/effects/refill.ogg', 50, 1, -6) return diff --git a/code/game/objects/items/weapons/weldbackpack.dm b/code/game/objects/items/weapons/weldbackpack.dm index f1c786d3e1..16b23b7880 100644 --- a/code/game/objects/items/weapons/weldbackpack.dm +++ b/code/game/objects/items/weapons/weldbackpack.dm @@ -27,7 +27,7 @@ else if(T.welding) user << "\red That was close!" - src.reagents.trans_to(W, T.max_fuel) + src.reagents.trans_to_obj(W, T.max_fuel) user << "\blue Welder refilled!" playsound(src.loc, 'sound/effects/refill.ogg', 50, 1, -6) return @@ -38,7 +38,7 @@ if(!proximity) // this replaces and improves the get_dist(src,O) <= 1 checks used previously return if (istype(O, /obj/structure/reagent_dispensers/fueltank) && src.reagents.total_volume < max_fuel) - O.reagents.trans_to(src, max_fuel) + O.reagents.trans_to_obj(src, max_fuel) user << "\blue You crack the cap off the top of the pack and fill it back up again from the tank." playsound(src.loc, 'sound/effects/refill.ogg', 50, 1, -6) return diff --git a/code/game/objects/structures/crates_lockers/closets/secure/security.dm b/code/game/objects/structures/crates_lockers/closets/secure/security.dm index 2480fff6da..37eec45239 100644 --- a/code/game/objects/structures/crates_lockers/closets/secure/security.dm +++ b/code/game/objects/structures/crates_lockers/closets/secure/security.dm @@ -286,8 +286,8 @@ New() ..() - new /obj/item/weapon/reagent_containers/ld50_syringe/choral(src) - new /obj/item/weapon/reagent_containers/ld50_syringe/choral(src) + new /obj/item/weapon/reagent_containers/syringe/ld50_syringe/choral(src) + new /obj/item/weapon/reagent_containers/syringe/ld50_syringe/choral(src) return diff --git a/code/game/objects/structures/janicart.dm b/code/game/objects/structures/janicart.dm index bd253da195..237250e3fd 100644 --- a/code/game/objects/structures/janicart.dm +++ b/code/game/objects/structures/janicart.dm @@ -39,7 +39,7 @@ if(reagents.total_volume < 1) user << "[src] is out of water!" else - reagents.trans_to(I, 5) // + reagents.trans_to_obj(I, 5) // user << "You wet [I] in [src]." playsound(loc, 'sound/effects/slosh.ogg', 25, 1) return @@ -186,7 +186,7 @@ /obj/structure/bed/chair/janicart/attackby(obj/item/I, mob/user) if(istype(I, /obj/item/weapon/mop)) if(reagents.total_volume > 1) - reagents.trans_to(I, 2) + reagents.trans_to_obj(I, 2) user << "You wet [I] in the [callme]." playsound(loc, 'sound/effects/slosh.ogg', 25, 1) else diff --git a/code/game/objects/structures/mop_bucket.dm b/code/game/objects/structures/mop_bucket.dm index ec568b8408..ace1293fc7 100644 --- a/code/game/objects/structures/mop_bucket.dm +++ b/code/game/objects/structures/mop_bucket.dm @@ -22,6 +22,6 @@ if(reagents.total_volume < 1) user << "[src] is out of water!" else - reagents.trans_to(I, 5) + reagents.trans_to_obj(I, 5) user << "You wet [I] in [src]." playsound(loc, 'sound/effects/slosh.ogg', 25, 1) diff --git a/code/modules/customitems/item_defines.dm b/code/modules/customitems/item_defines.dm index 13d1a59d5e..3d393e0967 100644 --- a/code/modules/customitems/item_defines.dm +++ b/code/modules/customitems/item_defines.dm @@ -446,10 +446,8 @@ if (M != user && user.ckey == "nerezza") //Woah now, you better be careful partner user << "\blue You don't want to contaminate the autoinjector." return - 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 [src]." + var/trans = reagents.trans_to_mob(M, amount_per_transfer_from_this, CHEM_BLOOD) + user << "\blue [trans] units injected. [reagents.total_volume] units remaining in \the [src]." return /obj/item/weapon/reagent_containers/hypospray/fluff/asher_spock_1/examine(mob/user as mob) diff --git a/code/modules/detectivework/footprints_and_rag.dm b/code/modules/detectivework/footprints_and_rag.dm index 59b97ebb7c..aedf6e4c9f 100644 --- a/code/modules/detectivework/footprints_and_rag.dm +++ b/code/modules/detectivework/footprints_and_rag.dm @@ -31,8 +31,7 @@ /obj/item/weapon/reagent_containers/glass/rag/attack(atom/target as obj|turf|area, mob/user as mob , flag) if(ismob(target) && target.reagents && reagents.total_volume) user.visible_message("\red \The [target] has been smothered with \the [src] by \the [user]!", "\red You smother \the [target] with \the [src]!", "You hear some struggling and muffled cries of surprise") - src.reagents.reaction(target, TOUCH) - spawn(5) src.reagents.clear_reagents() + reagents.trans_to_mob(target, reagents.total_volume, CHEM_INGEST) return else ..() diff --git a/code/modules/mob/living/carbon/alien/alien.dm b/code/modules/mob/living/carbon/alien/alien.dm index c9b3175eb8..7bf1842b0f 100644 --- a/code/modules/mob/living/carbon/alien/alien.dm +++ b/code/modules/mob/living/carbon/alien/alien.dm @@ -23,10 +23,6 @@ verbs += /mob/living/proc/ventcrawl verbs += /mob/living/proc/hide - var/datum/reagents/R = new/datum/reagents(100) - reagents = R - R.my_atom = src - name = "[initial(name)] ([rand(1, 1000)])" real_name = name regenerate_icons() diff --git a/code/modules/mob/living/carbon/brain/life.dm b/code/modules/mob/living/carbon/brain/life.dm index 8e8a26d883..189dfd81e7 100644 --- a/code/modules/mob/living/carbon/brain/life.dm +++ b/code/modules/mob/living/carbon/brain/life.dm @@ -105,7 +105,18 @@ proc/handle_chemicals_in_body() - if(reagents) reagents.metabolize(src) + chem_effects.Cut() + analgesic = 0 + + if(touching) + touching.metabolize(0, CHEM_TOUCH) + if(ingested) + ingested.metabolize(0, CHEM_INGEST) + if(reagents) + reagents.metabolize(0, CHEM_BLOOD) + + if(CE_PAINKILLER in chem_effects) + analgesic = chem_effects[CE_PAINKILLER] confused = max(0, confused - 1) // decrement dizziness counter, clamped to 0 diff --git a/code/modules/mob/living/carbon/breathe.dm b/code/modules/mob/living/carbon/breathe.dm index 38e1efa71b..b467b88cd2 100644 --- a/code/modules/mob/living/carbon/breathe.dm +++ b/code/modules/mob/living/carbon/breathe.dm @@ -7,7 +7,7 @@ var/datum/gas_mixture/breath = null //First, check if we can breathe at all - if(health < config.health_threshold_crit && !reagents.has_reagent("inaprovaline")) //crit aka circulatory shock + if(health < config.health_threshold_crit && !(CE_STABLE in chem_effects)) //crit aka circulatory shock losebreath++ if(losebreath>0) //Suffocating so do not take a breath @@ -65,11 +65,9 @@ for(var/obj/effect/effect/smoke/chem/smoke in view(1, src)) if(smoke.reagents.total_volume) - smoke.reagents.reaction(src, INGEST) - spawn(5) - if(smoke) - //maybe check air pressure here or something to see if breathing in smoke is even possible. - smoke.reagents.copy_to(src, 10) // I dunno, maybe the reagents enter the blood stream through the lungs? + smoke.reagents.trans_to_mob(src, 10, CHEM_INGEST, copy = 1) + //maybe check air pressure here or something to see if breathing in smoke is even possible. + // I dunno, maybe the reagents enter the blood stream through the lungs? break // If they breathe in the nasty stuff once, no need to continue checking /mob/living/carbon/proc/handle_breath(datum/gas_mixture/breath) diff --git a/code/modules/mob/living/carbon/carbon.dm b/code/modules/mob/living/carbon/carbon.dm index 6e59b4be66..6591cee647 100644 --- a/code/modules/mob/living/carbon/carbon.dm +++ b/code/modules/mob/living/carbon/carbon.dm @@ -1,3 +1,13 @@ +/mob/living/carbon/New() + create_reagents(1000) + var/datum/reagents/R1 = new/datum/reagents(1000) + var/datum/reagents/R2 = new/datum/reagents(1000) + ingested = R1 + touching = R2 + R1.my_atom = src + R2.my_atom = src + ..() + /mob/living/carbon/Life() ..() @@ -550,4 +560,10 @@ playsound(src.loc, 'sound/misc/slip.ogg', 50, 1, -3) Stun(stun_duration) Weaken(Floor(stun_duration/2)) - return 1 \ No newline at end of file + return 1 + +/mob/living/carbon/proc/add_chemical_effect(var/effect, var/magnitude = 1) + if(effect in chem_effects) + chem_effects[effect] += magnitude + else + chem_effects[effect] = magnitude diff --git a/code/modules/mob/living/carbon/carbon_defines.dm b/code/modules/mob/living/carbon/carbon_defines.dm index 55b33324fb..e617506c23 100644 --- a/code/modules/mob/living/carbon/carbon_defines.dm +++ b/code/modules/mob/living/carbon/carbon_defines.dm @@ -17,5 +17,8 @@ var/datum/surgery_status/op_stage = new/datum/surgery_status //Active emote/pose var/pose = null + var/list/chem_effects = list() + var/datum/reagents/ingested = null + var/datum/reagents/touching = null var/pulse = PULSE_NORM //current pulse level diff --git a/code/modules/mob/living/carbon/human/human.dm b/code/modules/mob/living/carbon/human/human.dm index fd8be289e9..84a7e720d3 100644 --- a/code/modules/mob/living/carbon/human/human.dm +++ b/code/modules/mob/living/carbon/human/human.dm @@ -20,10 +20,6 @@ else set_species() - var/datum/reagents/R = new/datum/reagents(1000) - reagents = R - R.my_atom = src - hud_list[HEALTH_HUD] = image('icons/mob/hud.dmi', src, "hudhealth100") hud_list[STATUS_HUD] = image('icons/mob/hud.dmi', src, "hudhealthy") hud_list[LIFE_HUD] = image('icons/mob/hud.dmi', src, "hudhealthy") diff --git a/code/modules/mob/living/carbon/human/human_movement.dm b/code/modules/mob/living/carbon/human/human_movement.dm index 155492a36b..a455edb27f 100644 --- a/code/modules/mob/living/carbon/human/human_movement.dm +++ b/code/modules/mob/living/carbon/human/human_movement.dm @@ -10,9 +10,8 @@ if(embedded_flag) handle_embedded_objects() //Moving with objects stuck in you can cause bad times. - if(reagents.has_reagent("hyperzine")) return -1 - - if(reagents.has_reagent("nuka_cola")) return -1 + if(CE_SPEEDBOOST in chem_effects) + return -1 var/health_deficiency = (100 - health) if(health_deficiency >= 40) tally += (health_deficiency / 25) diff --git a/code/modules/mob/living/carbon/human/life.dm b/code/modules/mob/living/carbon/human/life.dm index 29a1d067cb..5bcd6a178b 100644 --- a/code/modules/mob/living/carbon/human/life.dm +++ b/code/modules/mob/living/carbon/human/life.dm @@ -855,10 +855,16 @@ proc/handle_chemicals_in_body() if(reagents && !(species.flags & IS_SYNTHETIC)) //Synths don't process reagents. + chem_effects.Cut() + analgesic = 0 var/alien = 0 if(species && species.reagent_tag) alien = species.reagent_tag - reagents.metabolize(src,alien) + touching.metabolize(alien, CHEM_TOUCH) + ingested.metabolize(alien, CHEM_INGEST) + reagents.metabolize(alien, CHEM_BLOOD) + if(CE_PAINKILLER in chem_effects) + analgesic = chem_effects[CE_PAINKILLER] var/total_phoronloss = 0 for(var/obj/item/I in src) @@ -945,9 +951,6 @@ silent = 0 return 1 - // the analgesic effect wears off slowly - analgesic = max(0, analgesic - 1) - //UNCONSCIOUS. NO-ONE IS HOME if( (getOxyLoss() > 50) || (config.health_threshold_crit > health) ) Paralyse(3) @@ -1224,7 +1227,7 @@ see_invisible = SEE_INVISIBLE_LIVING if(healths) - if (analgesic) + if (analgesic > 100) healths.icon_state = "health_health_numb" else switch(hal_screwyhud) @@ -1409,7 +1412,7 @@ handle_shock() ..() if(status_flags & GODMODE) return 0 //godmode - if(analgesic || (species && species.flags & NO_PAIN)) return // analgesic avoids all traumatic shock temporarily + if(species && species.flags & NO_PAIN) return if(health < config.health_threshold_softcrit)// health 0 makes you immediately collapse shock_stage = max(shock_stage, 61) @@ -1485,7 +1488,7 @@ if(R.id in heartstopper) //To avoid using fakedeath temp = PULSE_NONE if(R.id in cheartstopper) //Conditional heart-stoppage - if(R.volume >= R.overdose) + if(R.volume >= R.overdose_blood) temp = PULSE_NONE return temp diff --git a/code/modules/mob/living/carbon/metroid/life.dm b/code/modules/mob/living/carbon/metroid/life.dm index 22b61291ef..0d5a0bbef7 100644 --- a/code/modules/mob/living/carbon/metroid/life.dm +++ b/code/modules/mob/living/carbon/metroid/life.dm @@ -82,8 +82,18 @@ return temp_change /mob/living/carbon/slime/proc/handle_chemicals_in_body() + chem_effects.Cut() + analgesic = 0 - if(reagents) reagents.metabolize(src) + if(touching) + touching.metabolize(0, CHEM_TOUCH) + if(ingested) + ingested.metabolize(0, CHEM_INGEST) + if(reagents) + reagents.metabolize(0, CHEM_BLOOD) + + if(CE_PAINKILLER in chem_effects) + analgesic = chem_effects[CE_PAINKILLER] src.updatehealth() diff --git a/code/modules/mob/living/carbon/metroid/metroid.dm b/code/modules/mob/living/carbon/metroid/metroid.dm index d6c8c226c4..8a44903f64 100644 --- a/code/modules/mob/living/carbon/metroid/metroid.dm +++ b/code/modules/mob/living/carbon/metroid/metroid.dm @@ -61,8 +61,6 @@ verbs += /mob/living/proc/ventcrawl - create_reagents(100) - src.colour = colour number = rand(1, 1000) name = "[colour] [is_adult ? "adult" : "baby"] slime ([number])" @@ -412,14 +410,6 @@ adjustToxLoss(-10) nutrition = max(nutrition, get_max_nutrition()) -/mob/living/carbon/slime/proc/apply_water(var/amount) - adjustToxLoss(15 + amount) - if (!client) - if (Target) // Like cats - Target = null - ++Discipline - return - /mob/living/carbon/slime/can_use_vents() if(Victim) return "You cannot ventcrawl while feeding." diff --git a/code/modules/mob/living/carbon/monkey/life.dm b/code/modules/mob/living/carbon/monkey/life.dm index 22a5c7f2fb..b339fc086e 100644 --- a/code/modules/mob/living/carbon/monkey/life.dm +++ b/code/modules/mob/living/carbon/monkey/life.dm @@ -304,9 +304,18 @@ adjustFireLoss(5.0*discomfort) proc/handle_chemicals_in_body() + chem_effects.Cut() + analgesic = 0 - if(reagents && reagents.reagent_list.len) - reagents.metabolize(src) + if(touching) + touching.metabolize(0, CHEM_TOUCH) + if(ingested) + ingested.metabolize(0, CHEM_INGEST) + if(reagents) + reagents.metabolize(0, CHEM_BLOOD) + + if(CE_PAINKILLER in chem_effects) + analgesic = chem_effects[CE_PAINKILLER] if (drowsyness) drowsyness-- diff --git a/code/modules/mob/living/carbon/monkey/monkey.dm b/code/modules/mob/living/carbon/monkey/monkey.dm index 07a64c5513..8cd0558e7c 100644 --- a/code/modules/mob/living/carbon/monkey/monkey.dm +++ b/code/modules/mob/living/carbon/monkey/monkey.dm @@ -47,10 +47,6 @@ verbs += /mob/living/proc/ventcrawl - var/datum/reagents/R = new/datum/reagents(1000) - reagents = R - R.my_atom = src - species = all_species[greaterform] add_language(species.language) diff --git a/code/modules/mob/living/carbon/shock.dm b/code/modules/mob/living/carbon/shock.dm index b76b7a49b7..63c742a690 100644 --- a/code/modules/mob/living/carbon/shock.dm +++ b/code/modules/mob/living/carbon/shock.dm @@ -13,24 +13,11 @@ 1.5 * src.getFireLoss() + \ 1.2 * src.getBruteLoss() + \ 1.7 * src.getCloneLoss() + \ - 2 * src.halloss + 2 * src.halloss + \ + -1 * src.analgesic - if(reagents.has_reagent("alkysine")) - src.traumatic_shock -= 10 - if(reagents.has_reagent("inaprovaline")) - src.traumatic_shock -= 25 - if(reagents.has_reagent("synaptizine")) - src.traumatic_shock -= 40 - if(reagents.has_reagent("paracetamol")) - src.traumatic_shock -= 50 - if(reagents.has_reagent("tramadol")) - src.traumatic_shock -= 80 - if(reagents.has_reagent("oxycodone")) - src.traumatic_shock -= 200 if(src.slurring) src.traumatic_shock -= 20 - if(src.analgesic) - src.traumatic_shock = 0 // broken or ripped off organs will add quite a bit of pain if(istype(src,/mob/living/carbon/human)) diff --git a/code/modules/mob/living/silicon/robot/robot_modules.dm b/code/modules/mob/living/silicon/robot/robot_modules.dm index 6add592da8..6d6428fc15 100644 --- a/code/modules/mob/living/silicon/robot/robot_modules.dm +++ b/code/modules/mob/living/silicon/robot/robot_modules.dm @@ -117,7 +117,7 @@ src.modules += new /obj/item/roller_holder(src) src.modules += new /obj/item/weapon/reagent_containers/borghypo/crisis(src) src.modules += new /obj/item/weapon/reagent_containers/glass/beaker/large(src) - src.modules += new /obj/item/weapon/reagent_containers/robodropper(src) + src.modules += new /obj/item/weapon/reagent_containers/dropper/industrial(src) src.modules += new /obj/item/weapon/reagent_containers/syringe(src) src.modules += new /obj/item/weapon/extinguisher/mini(src) src.emag = new /obj/item/weapon/reagent_containers/spray(src) @@ -321,7 +321,7 @@ M.stored_matter = 30 src.modules += M - src.modules += new /obj/item/weapon/reagent_containers/robodropper(src) + src.modules += new /obj/item/weapon/reagent_containers/dropper/industrial(src) var/obj/item/weapon/flame/lighter/zippo/L = new /obj/item/weapon/flame/lighter/zippo(src) L.lit = 1 diff --git a/code/modules/organs/blood.dm b/code/modules/organs/blood.dm index b04d631046..07fed200d8 100644 --- a/code/modules/organs/blood.dm +++ b/code/modules/organs/blood.dm @@ -55,12 +55,8 @@ var/const/BLOOD_VOLUME_SURVIVE = 122 break B.volume += 0.1 // regenerate blood VERY slowly - if (reagents.has_reagent("nutriment")) //Getting food speeds it up - B.volume += 0.4 - reagents.remove_reagent("nutriment", 0.1) - if (reagents.has_reagent("iron")) //Hematogen candy anyone? - B.volume += 0.8 - reagents.remove_reagent("iron", 0.1) + if(CE_BLOODRESTORE in chem_effects) + B.volume += chem_effects[CE_BLOODRESTORE] // Damaged heart virtually reduces the blood volume, as the blood isn't // being pumped properly anymore. @@ -200,9 +196,8 @@ var/const/BLOOD_VOLUME_SURVIVE = 122 vessel.remove_reagent("blood",amount) // Removes blood if human //Transfers blood from container ot vessels -/mob/living/carbon/proc/inject_blood(obj/item/weapon/reagent_containers/container, var/amount) - var/datum/reagent/blood/injected = get_blood(container.reagents) - if (!injected) +/mob/living/carbon/proc/inject_blood(var/datum/reagent/blood/injected, var/amount) + if (!injected || !istype(injected)) return var/list/sniffles = virus_copylist(injected.data["virus2"]) for(var/ID in sniffles) @@ -216,12 +211,8 @@ var/const/BLOOD_VOLUME_SURVIVE = 122 src.reagents.add_reagent(C, (text2num(chems[C]) / 560) * amount)//adds trace chemicals to owner's blood reagents.update_total() - container.reagents.remove_reagent("blood", amount) - -//Transfers blood from container ot vessels, respecting blood types compatability. -/mob/living/carbon/human/inject_blood(obj/item/weapon/reagent_containers/container, var/amount) - - var/datum/reagent/blood/injected = get_blood(container.reagents) +//Transfers blood from reagents to vessel, respecting blood types compatability. +/mob/living/carbon/human/inject_blood(var/datum/reagent/blood/injected, var/amount) if(species && species.flags & NO_BLOOD) reagents.add_reagent("blood", amount, injected.data) diff --git a/code/modules/organs/organ_internal.dm b/code/modules/organs/organ_internal.dm index b6154242b9..7d0782abed 100644 --- a/code/modules/organs/organ_internal.dm +++ b/code/modules/organs/organ_internal.dm @@ -208,20 +208,12 @@ if(is_broken()) filter_effect -= 2 - // Do some reagent filtering/processing. - for(var/datum/reagent/R in owner.reagents.reagent_list) - // Damaged liver means some chemicals are very dangerous - // The liver is also responsible for clearing out alcohol and toxins. - // Ethanol and all drinks are bad.K - if(istype(R, /datum/reagent/ethanol)) - if(filter_effect < 3) - owner.adjustToxLoss(0.1 * PROCESS_ACCURACY) - owner.reagents.remove_reagent(R.id, R.custom_metabolism*filter_effect) - // Can't cope with toxins at all - else if(istype(R, /datum/reagent/toxin)) - if(filter_effect < 3) - owner.adjustToxLoss(0.3 * PROCESS_ACCURACY) - owner.reagents.remove_reagent(R.id, ALCOHOL_METABOLISM*filter_effect) + // Do some reagent processing. + if(owner.chem_effects[CE_ALCOHOL_TOXIC]) + if(filter_effect < 3) + owner.adjustToxLoss(owner.chem_effects[CE_ALCOHOL_TOXIC] * 0.1 * PROCESS_ACCURACY) + else + take_damage(owner.chem_effects[CE_ALCOHOL_TOXIC] * 0.1 * PROCESS_ACCURACY, prob(1)) // Chance to warn them /datum/organ/internal/kidney name = "kidneys" diff --git a/code/modules/organs/organ_objects.dm b/code/modules/organs/organ_objects.dm index a97f1f28f5..b7c451b883 100644 --- a/code/modules/organs/organ_objects.dm +++ b/code/modules/organs/organ_objects.dm @@ -172,7 +172,7 @@ organ_data.rejecting = null var/datum/reagent/blood/organ_blood = locate(/datum/reagent/blood) in reagents.reagent_list if(!organ_blood || !organ_blood.data["blood_DNA"]) - target.vessel.trans_to(src, 5, 1, 1) + target.vessel.trans_to_obj(src, 5, 1, 1) if(target && user && organ_data.vital) user.attack_log += "\[[time_stamp()]\] removed a vital organ ([src]) from [target.name] ([target.ckey]) (INTENT: [uppertext(user.a_intent)])" @@ -265,7 +265,7 @@ O.icon_state = dead_icon ? dead_icon : icon_state // Pass over the blood. - reagents.trans_to(O, reagents.total_volume) + reagents.trans_to_obj(O, reagents.total_volume) if(fingerprints) O.fingerprints = fingerprints.Copy() if(fingerprintshidden) O.fingerprintshidden = fingerprintshidden.Copy() diff --git a/code/modules/organs/pain.dm b/code/modules/organs/pain.dm index 49cc2073df..16d0394a85 100644 --- a/code/modules/organs/pain.dm +++ b/code/modules/organs/pain.dm @@ -9,13 +9,7 @@ mob/var/next_pain_time = 0 // amount is a num from 1 to 100 mob/living/carbon/proc/pain(var/partname, var/amount, var/force, var/burning = 0) if(stat >= 2) return - if(reagents.has_reagent("paracetamol")) - return - if(reagents.has_reagent("tramadol")) - return - if(reagents.has_reagent("oxycodone")) - return - if(analgesic) + if(analgesic > 40) return if(world.time < next_pain_time && !force) return @@ -80,11 +74,7 @@ mob/living/carbon/human/proc/handle_pain() if(species && species.flags & NO_PAIN) return if(stat >= 2) return - if(reagents.has_reagent("tramadol")) - return - if(reagents.has_reagent("oxycodone")) - return - if(analgesic) + if(analgesic > 70) return var/maxdam = 0 var/datum/organ/external/damaged_organ = null diff --git a/code/modules/paperwork/pen.dm b/code/modules/paperwork/pen.dm index 18ff946cc8..1f81ea2495 100644 --- a/code/modules/paperwork/pen.dm +++ b/code/modules/paperwork/pen.dm @@ -76,7 +76,7 @@ return ..() if(reagents.total_volume) - if(M.reagents) reagents.trans_to(M, 50) //used to be 150 + if(M.reagents) reagents.trans_to_mob(M, 50, CHEM_BLOOD) //used to be 150 return @@ -99,7 +99,7 @@ if(M.can_inject(user,1)) if(reagents.total_volume) - if(M.reagents) reagents.trans_to(M, 50) + if(M.reagents) reagents.trans_to_mob(M, 50, CHEM_BLOOD) return diff --git a/code/modules/projectiles/guns/launcher/syringe_gun.dm b/code/modules/projectiles/guns/launcher/syringe_gun.dm index 75c015d579..0c42c86b05 100644 --- a/code/modules/projectiles/guns/launcher/syringe_gun.dm +++ b/code/modules/projectiles/guns/launcher/syringe_gun.dm @@ -52,7 +52,7 @@ //unfortuately we don't know where the dart will actually hit, since that's done by the parent. if(L.can_inject()) if(syringe.reagents) - syringe.reagents.trans_to(L, 15) + syringe.reagents.trans_to_mob(L, 15, CHEM_BLOOD) syringe.break_syringe(iscarbon(hit_atom)? hit_atom : null) syringe.update_icon() diff --git a/code/modules/projectiles/guns/projectile/dartgun.dm b/code/modules/projectiles/guns/projectile/dartgun.dm index a8f93b8d25..c95fbce180 100644 --- a/code/modules/projectiles/guns/projectile/dartgun.dm +++ b/code/modules/projectiles/guns/projectile/dartgun.dm @@ -17,7 +17,7 @@ if(blocked < 2 && isliving(target)) var/mob/living/L = target if(L.can_inject(target_zone=def_zone)) - reagents.trans_to(L, reagent_amount) + reagents.trans_to_mob(L, reagent_amount, CHEM_BLOOD) /obj/item/ammo_casing/chemdart name = "chemical dart" @@ -124,7 +124,7 @@ if(mixing.len) var/mix_amount = dart.reagent_amount/mixing.len for(var/obj/item/weapon/reagent_containers/glass/beaker/B in mixing) - B.reagents.trans_to(dart, mix_amount) + B.reagents.trans_to_obj(dart, mix_amount) /obj/item/weapon/gun/projectile/dartgun/attack_self(mob/user) user.set_machine(src) diff --git a/code/modules/reagents/Chemistry-Colours.dm b/code/modules/reagents/Chemistry-Colours.dm index a59147e85f..501b1ac475 100644 --- a/code/modules/reagents/Chemistry-Colours.dm +++ b/code/modules/reagents/Chemistry-Colours.dm @@ -1,66 +1,23 @@ -/proc/mix_color_from_reagents(var/list/reagent_list) - if(!reagent_list || !length(reagent_list)) - return 0 +/datum/reagents/proc/get_color() + if(!reagent_list || !reagent_list.len) + return "#ffffffff" + if(reagent_list.len == 1) // It's pretty common and saves a lot of work + var/datum/reagent/R = reagent_list[1] + return R.color - var/contents = length(reagent_list) - var/list/weight = new /list(contents) - var/list/redcolor = new /list(contents) - var/list/greencolor = new /list(contents) - var/list/bluecolor = new /list(contents) - var/i + var/list/colors = list(0, 0, 0, 0) + var/tot_w = 0 + for(var/datum/reagent/R in reagent_list) + var/hex = uppertext(R.color) + if(length(hex) == 7) + hex += "FF" + if(length(hex) != 9) // PANIC PANIC PANIC + warning("Reagent [R.id] has an incorrect color set ([R.color])") + hex = "#FFFFFFFF" + colors[1] += hex2num(copytext(hex, 2, 4)) * R.volume * R.color_weight + colors[2] += hex2num(copytext(hex, 4, 6)) * R.volume * R.color_weight + colors[3] += hex2num(copytext(hex, 6, 8)) * R.volume * R.color_weight + colors[4] += hex2num(copytext(hex, 8, 10)) * R.volume * R.color_weight + tot_w += R.volume * R.color_weight - //fill the list of weights - for(i=1; i<=contents; i++) - var/datum/reagent/re = reagent_list[i] - var/reagentweight = re.volume - if(istype(re, /datum/reagent/paint)) - reagentweight *= 20 //Paint colours a mixture twenty times as much - weight[i] = reagentweight - - - //fill the lists of colours - for(i=1; i<=contents; i++) - var/datum/reagent/re = reagent_list[i] - var/hue = re.color - if(length(hue) != 7) - return 0 - redcolor[i]=hex2num(copytext(hue,2,4)) - greencolor[i]=hex2num(copytext(hue,4,6)) - bluecolor[i]=hex2num(copytext(hue,6,8)) - - //mix all the colors - var/red = mixOneColor(weight,redcolor) - var/green = mixOneColor(weight,greencolor) - var/blue = mixOneColor(weight,bluecolor) - - //assemble all the pieces - var/finalcolor = rgb(red, green, blue) - return finalcolor - -/proc/mixOneColor(var/list/weight, var/list/color) - if (!weight || !color || length(weight)!=length(color)) - return 0 - - var/contents = length(weight) - var/i - - //normalize weights - var/listsum = 0 - for(i=1; i<=contents; i++) - listsum += weight[i] - for(i=1; i<=contents; i++) - weight[i] /= listsum - - //mix them - var/mixedcolor = 0 - for(i=1; i<=contents; i++) - mixedcolor += weight[i]*color[i] - mixedcolor = round(mixedcolor) - - //until someone writes a formal proof for this algorithm, let's keep this in -// if(mixedcolor<0x00 || mixedcolor>0xFF) -// return 0 - //that's not the kind of operation we are running here, nerd - mixedcolor=min(max(mixedcolor,0),255) - - return mixedcolor + return rgb(colors[1] / tot_w, colors[2] / tot_w, colors[3] / tot_w, colors[4] / tot_w) \ No newline at end of file diff --git a/code/modules/reagents/Chemistry-Holder.dm b/code/modules/reagents/Chemistry-Holder.dm index 6c6c194af5..d094dc65ca 100644 --- a/code/modules/reagents/Chemistry-Holder.dm +++ b/code/modules/reagents/Chemistry-Holder.dm @@ -1,659 +1,426 @@ -//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 - // It is filtered into multiple lists within a list. - // For example: - // chemical_reaction_list["phoron"] is a list of all reactions relating to phoron - - 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() - var/list/reaction_ids = list() - - if(D.required_reagents && D.required_reagents.len) - for(var/reaction in D.required_reagents) - reaction_ids += reaction - - // Create filters based on each reagent id in the required reagents list - for(var/id in reaction_ids) - if(!chemical_reactions_list[id]) - chemical_reactions_list[id] = list() - chemical_reactions_list[id] += D - break // Don't bother adding ourselves to other reagent ids, it is redundant. - - 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() - var/the_reagent = null - var/the_volume = 0 - for(var/datum/reagent/A in reagent_list) - if(A.volume > the_volume) - the_volume = A.volume - the_reagent = A - - return the_reagent - - 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) - if (!current_reagent) - continue - if (current_reagent.id == "blood" && ishuman(target)) - var/mob/living/carbon/human/H = target - H.inject_blood(my_atom, amount) - continue - var/current_reagent_transfer = current_reagent.volume * part - if(preserve_data) - trans_data = copy_data(current_reagent) - - R.add_reagent(current_reagent.id, (current_reagent_transfer * multiplier), trans_data, safety = 1) //safety checks on these so all chemicals are transferred - src.remove_reagent(current_reagent.id, current_reagent_transfer, safety = 1) // to the target container before handling reactions - - src.update_total() - R.update_total() - R.handle_reactions() - src.handle_reactions() - return amount - - trans_to_ingest(var/obj/target, var/amount=1, var/multiplier=1, var/preserve_data=1)//For items ingested. A delay is added between ingestion and addition of the reagents - if (!target ) - return - if (!target.reagents || src.total_volume<=0) - return - - /*var/datum/reagents/R = target.reagents - - var/obj/item/weapon/reagent_containers/glass/beaker/noreact/B = new /obj/item/weapon/reagent_containers/glass/beaker/noreact //temporary holder - - 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) - if (!current_reagent) - continue - //if (current_reagent.id == "blood" && ishuman(target)) - // var/mob/living/carbon/human/H = target - // H.inject_blood(my_atom, amount) - // continue - var/current_reagent_transfer = current_reagent.volume * part - if(preserve_data) - trans_data = current_reagent.data - - B.add_reagent(current_reagent.id, (current_reagent_transfer * multiplier), trans_data, safety = 1) //safety checks on these so all chemicals are transferred - src.remove_reagent(current_reagent.id, current_reagent_transfer, safety = 1) // to the target container before handling reactions - - src.update_total() - B.update_total() - B.handle_reactions() - src.handle_reactions()*/ - - var/obj/item/weapon/reagent_containers/glass/beaker/noreact/B = new /obj/item/weapon/reagent_containers/glass/beaker/noreact //temporary holder - B.volume = 1000 - - var/datum/reagents/BR = B.reagents - var/datum/reagents/R = target.reagents - - amount = min(min(amount, src.total_volume), R.maximum_volume-R.total_volume) - - src.trans_to(B, amount) - - spawn(95) - BR.reaction(target, INGEST) - spawn(5) - BR.trans_to(target, BR.total_volume) - del(B) - - return amount - - copy_to(var/obj/target, var/amount=1, var/multiplier=1, var/preserve_data=1, var/safety = 0) - 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 = copy_data(current_reagent) - R.add_reagent(current_reagent.id, (current_reagent_transfer * multiplier), trans_data, safety = 1) //safety check so all chemicals are transferred before reacting - - src.update_total() - R.update_total() - if(!safety) - 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,var/alien) - - for(var/A in reagent_list) - var/datum/reagent/R = A - if(M && R) - R.on_mob_life(M,alien) - 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/reagent/R in reagent_list) // Usually a small list - for(var/reaction in chemical_reactions_list[R.id]) // Was a big list but now it should be smaller since we filtered it with our reagent id - - if(!reaction) - continue - - var/datum/chemical_reaction/C = reaction - - //check if this recipe needs to be heated to mix - if(C.requires_heating) - if(istype(my_atom.loc, /obj/machinery/bunsen_burner)) - if(!my_atom.loc:heated) - continue - else - continue - - 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/slime_core)) - var/obj/item/slime_core/M = my_atom - - if(M.POWERFLAG == C.required_other && M.Uses > 0) // added a limit to slime cores -- Muskets requested this - matching_other = 1*/ - if(istype(my_atom, /obj/item/slime_extract)) - var/obj/item/slime_extract/M = my_atom - - if(M.Uses > 0) // added a limit to slime cores -- Muskets requested this - matching_other = 1 - - - - - if(total_matching_reagents == total_required_reagents && total_matching_catalysts == total_required_catalysts && matching_container && matching_other) - var/multiplier = min(multipliers) - var/preserved_data = null - for(var/B in C.required_reagents) - if(!preserved_data) - preserved_data = get_data(B) - remove_reagent(B, (multiplier * C.required_reagents[B]), safety = 1) - - var/created_volume = C.result_amount*multiplier - if(C.result) - feedback_add_details("chemical_reaction","[C.result]|[C.result_amount*multiplier]") - multiplier = max(multiplier, 1) //this shouldnt happen ... - if(!isnull(C.resultcolor)) //paints - add_reagent(C.result, C.result_amount*multiplier, C.resultcolor) - else - add_reagent(C.result, C.result_amount*multiplier) - set_data(C.result, preserved_data) - - //add secondary products - for(var/S in C.secondary_results) - add_reagent(S, C.result_amount * C.secondary_results[S] * multiplier) - - var/list/seen = viewers(4, get_turf(my_atom)) - for(var/mob/M in seen) - M << "\blue \icon[my_atom] The solution begins to bubble." - - /* if(istype(my_atom, /obj/item/slime_core)) - var/obj/item/slime_core/ME = my_atom - ME.Uses-- - if(ME.Uses <= 0) // give the notification that the slime core is dead - for(var/mob/M in viewers(4, get_turf(my_atom)) ) - M << "\blue \icon[my_atom] The innards begin to boil!" - */ - if(istype(my_atom, /obj/item/slime_extract)) - var/obj/item/slime_extract/ME2 = my_atom - ME2.Uses-- - if(ME2.Uses <= 0) // give the notification that the slime core is dead - for(var/mob/M in seen) - M << "\blue \icon[my_atom] The [my_atom]'s power is consumed in the reaction." - ME2.name = "used slime extract" - ME2.desc = "This extract has been used up." - - playsound(get_turf(my_atom), '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 - +/datum/reagents + var/list/datum/reagent/reagent_list = list() + var/total_volume = 0 + var/maximum_volume = 100 + var/atom/my_atom = null + var/reacting = 0 // Reacting right now + +/datum/reagents/New(var/max = 100) + maximum_volume = max + //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() + if(!D.name) + continue + chemical_reagents_list[D.id] = D + + if(!chemical_reactions_list) + //Chemical Reactions - Initialises all /datum/chemical_reaction into a list + // It is filtered into multiple lists within a list. + // For example: + // chemical_reaction_list["phoron"] is a list of all reactions relating to phoron + + 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() + var/list/reaction_ids = list() + + if(D.required_reagents && D.required_reagents.len) + for(var/reaction in D.required_reagents) + reaction_ids += reaction + + // Create filters based on each reagent id in the required reagents list + for(var/id in reaction_ids) + if(!chemical_reactions_list[id]) + chemical_reactions_list[id] = list() + chemical_reactions_list[id] += D + break // Don't bother adding ourselves to other reagent ids, it is redundant. + +/* Internal procs */ + +/datum/reagents/proc/get_free_space() // Returns free space. + return maximum_volume - total_volume + +/datum/reagents/proc/get_master_reagent() // Returns reference to the reagent with the biggest volume. + var/the_reagent = null + var/the_volume = 0 + + for(var/datum/reagent/A in reagent_list) + if(A.volume > the_volume) + the_volume = A.volume + the_reagent = A + + return the_reagent + +/datum/reagents/proc/get_master_reagent_name() // Returns the name of the reagent with the biggest volume. + var/the_name = null + var/the_volume = 0 + for(var/datum/reagent/A in reagent_list) + if(A.volume > the_volume) + the_volume = A.volume + the_name = A.name + + return the_name + +/datum/reagents/proc/get_master_reagent_id() // Returns the id of the reagent with the biggest volume. + var/the_id = null + var/the_volume = 0 + for(var/datum/reagent/A in reagent_list) + if(A.volume > the_volume) + the_volume = A.volume + the_id = A.id + + return the_id + +/datum/reagents/proc/update_total() // Updates volume. + total_volume = 0 + for(var/datum/reagent/R in reagent_list) + if(R.volume < MINIMUM_CHEMICAL_VOLUME) + del_reagent(R.id) + else + total_volume += R.volume + return + +/datum/reagents/proc/delete() + for(var/datum/reagent/R in reagent_list) + R.holder = null + if(my_atom) + my_atom.reagents = null + +/datum/reagents/proc/handle_reactions() + if(!my_atom) // No reactions in temporary holders + return + if(my_atom.flags & NOREACT) // No reactions here + return + + var/reaction_occured = 0 + do + reaction_occured = 0 + for(var/datum/reagent/R in reagent_list) + for(var/datum/chemical_reaction/C in chemical_reactions_list[R.id]) + var/reagents_suitable = 1 + for(var/B in C.required_reagents) + if(!has_reagent(B, C.required_reagents[B])) + reagents_suitable = 0 + for(var/B in C.catalysts) + if(!has_reagent(B, C.catalysts[B])) + reagents_suitable = 0 + for(var/B in C.inhibitors) + if(has_reagent(B, C.inhibitors[B])) + reagents_suitable = 0 + + if(!reagents_suitable || !C.can_happen(src)) + continue + + var/use = -1 + for(var/B in C.required_reagents) + if(use == -1) + use = get_reagent_amount(B) / C.required_reagents[B] + else + use = min(use, get_reagent_amount(B) / C.required_reagents[B]) + + var/newdata = C.send_data(src) // We need to get it before reagents are removed. See blood paint. + for(var/B in C.required_reagents) + remove_reagent(B, use * C.required_reagents[B], safety = 1) + + if(C.result) + add_reagent(C.result, C.result_amount * use, newdata) + + if(!ismob(my_atom) && C.mix_message) + var/list/seen = viewers(4, get_turf(my_atom)) + for(var/mob/M in seen) + M << "\icon[my_atom] [C.mix_message]" + playsound(get_turf(my_atom), 'sound/effects/bubbles.ogg', 80, 1) + + C.on_reaction(src, C.result_amount * use) + reaction_occured = 1 + while(reaction_occured) + update_total() + return + +/* Holder-to-chemical */ + +/datum/reagents/proc/add_reagent(var/id, var/amount, var/data = null, var/safety = 0) + if(!isnum(amount)) + return 0 + update_total() + amount = min(amount, get_free_space()) + + for(var/datum/reagent/current in reagent_list) + if(current.id == id) + current.volume += amount 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 + if(!isnull(data)) // For all we know, it could be zero or empty string and meaningful + current.mix_data(data, amount) + if(!safety) + handle_reactions() + if(my_atom) + my_atom.on_reagent_change() + return 1 + var/datum/reagent/D = chemical_reagents_list[id] + if(D) + var/datum/reagent/R = new D.type() + reagent_list += R + R.holder = src + R.volume = amount + update_total() + R.initialize_data(data) + if(!safety) + handle_reactions() + if(my_atom) + my_atom.on_reagent_change() + return 1 + else + warning("[my_atom] attempted to add a reagent called '[id]' which doesn't exist. ([usr])") + return 0 - return 0 +/datum/reagents/proc/remove_reagent(var/id, var/amount, var/safety = 0) + if(!isnum(amount)) + return 0 + for(var/datum/reagent/current in reagent_list) + if(current.id == id) + current.volume -= amount // It can go negative, but it doesn't matter + update_total() // Because this proc will delete it then + if(!safety) + handle_reactions() + if(my_atom) + my_atom.on_reagent_change() + return 1 + 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, var/safety = 0) - 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() - - // mix dem viruses - if(R.id == "blood" && reagent == "blood") - if(R.data && data) - - if(R.data["viruses"] || data["viruses"]) - - var/list/mix1 = R.data["viruses"] - var/list/mix2 = data["viruses"] - - // Stop issues with the list changing during mixing. - var/list/to_mix = list() - - for(var/datum/disease/advance/AD in mix1) - to_mix += AD - for(var/datum/disease/advance/AD in mix2) - to_mix += AD - - var/datum/disease/advance/AD = Advance_Mix(to_mix) - if(AD) - var/list/preserve = list(AD) - for(var/D in R.data["viruses"]) - if(!istype(D, /datum/disease/advance)) - preserve += D - R.data["viruses"] = preserve - if(R.id == "paint" && reagent == "paint") - if(R.color && data) - var/list/mix = new /list(2) - //fill the list - var/datum/reagent/paint/P = chemical_reagents_list["paint"] - var/datum/reagent/paint/P1 = new P.type() - P1.color = R.color - P1.volume = R.volume - amount //since we just increased that - var/datum/reagent/paint/P2 = new P.type() - P2.color = data - P2.volume = amount - mix[1] = P1 - mix[2] = P2 - R.color = mix_color_from_reagents(mix) - if(!safety) - handle_reactions() - my_atom.on_reagent_change() - return 0 - - var/datum/reagent/D = chemical_reagents_list[reagent] - if(D) - - var/datum/reagent/R = new D.type() - reagent_list += R - R.holder = src - R.volume = amount - if(reagent == "paint") - R.color = data - else - SetViruses(R, data) // Includes setting data for blood - - //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() - if(!safety) - handle_reactions() - return 0 - else - warning("[my_atom] attempted to add a reagent called '[reagent]' which doesn't exist. ([usr])") - - if(!safety) - handle_reactions() +/datum/reagents/proc/del_reagent(var/id) + for(var/datum/reagent/current in reagent_list) + if (current.id == id) + reagent_list -= current + del(current) + update_total() + if(my_atom) + my_atom.on_reagent_change() + return 0 +/datum/reagents/proc/has_reagent(var/id, var/amount = 0) + for(var/datum/reagent/current in reagent_list) + if(current.id == id) + if(current.volume >= amount) return 1 - - remove_reagent(var/reagent, var/amount, var/safety = 0)//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 - + 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 +/datum/reagents/proc/clear_reagents() + for(var/datum/reagent/current in reagent_list) + del_reagent(current.id) + return - return 0 +/datum/reagents/proc/get_reagent_amount(var/id) + for(var/datum/reagent/current in reagent_list) + if(current.id == id) + return current.volume + return 0 - get_reagents() - var/res = "" - for(var/datum/reagent/A in reagent_list) - if (res != "") res += "," - res += A.name +/datum/reagents/proc/get_data(var/id) + for(var/datum/reagent/current in reagent_list) + if(current.id == id) + return current.get_data() + return 0 - return res +/datum/reagents/proc/get_reagents() + var/res = "" + for(var/datum/reagent/current in reagent_list) + if (res != "") res += "," + res += "[current.id]([current.volume])" - remove_all_type(var/reagent_type, var/amount, var/strict = 0, var/safety = 1) // Removes all reagent of X type. @strict set to 1 determines whether the childs of the type are included. - if(!isnum(amount)) return 1 + return res - var/has_removed_reagent = 0 +/* Holder-to-holder and similar procs */ - for(var/datum/reagent/R in reagent_list) - var/matches = 0 - // Switch between how we check the reagent type - if(strict) - if(R.type == reagent_type) - matches = 1 - else - if(istype(R, reagent_type)) - matches = 1 - // We found a match, proceed to remove the reagent. Keep looping, we might find other reagents of the same type. - if(matches) - // Have our other proc handle removement - has_removed_reagent = remove_reagent(R.id, amount, safety) +/datum/reagents/proc/remove_any(var/amount = 1) // Removes up to [amount] of reagents from [src]. Returns actual amount removed. + amount = min(amount, total_volume) - return has_removed_reagent + if(!amount) + return - //two helper functions to preserve data across reactions (needed for xenoarch) - get_data(var/reagent_id) - for(var/datum/reagent/D in reagent_list) - if(D.id == reagent_id) - //world << "proffering a data-carrying reagent ([reagent_id])" - return D.data + var/part = amount / total_volume - set_data(var/reagent_id, var/new_data) - for(var/datum/reagent/D in reagent_list) - if(D.id == reagent_id) - //world << "reagent data set ([reagent_id])" - D.data = new_data + for(var/datum/reagent/current in reagent_list) + var/amount_to_remove = current.volume * part + remove_reagent(current.id, amount_to_remove, 1) - delete() - for(var/datum/reagent/R in reagent_list) - R.holder = null - if(my_atom) - my_atom.reagents = null + update_total() + handle_reactions() + return amount - copy_data(var/datum/reagent/current_reagent) - if (current_reagent.id == "paint") return current_reagent.color - if (!current_reagent || !current_reagent.data) return null - if (!istype(current_reagent.data, /list)) return current_reagent.data +/datum/reagents/proc/trans_to_holder(var/datum/reagents/target, var/amount = 1, var/multiplier = 1, var/copy = 0) // Transfers [amount] reagents from [src] to [target], multiplying them by [multiplier]. Returns actual amount removed from [src] (not amount transferred to [target]). + if(!target || !istype(target)) + return - var/list/trans_data = current_reagent.data.Copy() + amount = min(amount, total_volume, target.get_free_space() / multiplier) - // We do this so that introducing a virus to a blood sample - // doesn't automagically infect all other blood samples from - // the same donor. - // - // Technically we should probably copy all data lists, but - // that could possibly eat up a lot of memory needlessly - // if most data lists are read-only. - if (trans_data["virus2"]) - var/list/v = trans_data["virus2"] - trans_data["virus2"] = v.Copy() + if(!amount) + return - return trans_data + var/part = amount / total_volume -/////////////////////////////////////////////////////////////////////////////////// + for(var/datum/reagent/current in reagent_list) + var/amount_to_transfer = current.volume * part + target.add_reagent(current.id, amount_to_transfer * multiplier, current.get_data(), safety = 1) // We don't react until everything is in place + if(!copy) + remove_reagent(current.id, amount_to_transfer, 1) + if(!copy) + handle_reactions() + target.handle_reactions() + return amount -// Convenience proc to create a reagents holder for an atom -// Max vol is maximum volume of holder -atom/proc/create_reagents(var/max_vol) +/* Holder-to-atom and similar procs */ + +/datum/reagents/proc/touch(var/atom/target) // This picks the appropriate reaction. Reagents are not guaranteed to transfer to the target. + if(ismob(target)) + touch_mob(target) + if(isturf(target)) + touch_turf(target) + if(isobj(target)) + touch_obj(target) + return + +/datum/reagents/proc/touch_mob(var/mob/target) + if(!target || !istype(target)) + return + + for(var/datum/reagent/current in reagent_list) + current.touch_mob(target) + + update_total() + +/datum/reagents/proc/touch_turf(var/turf/target) + if(!target || !istype(target)) + return + + for(var/datum/reagent/current in reagent_list) + current.touch_turf(target) + + update_total() + +/datum/reagents/proc/touch_obj(var/obj/target) + if(!target || !istype(target)) + return + + for(var/datum/reagent/current in reagent_list) + current.touch_obj(target) + + update_total() + +/datum/reagents/proc/trans_to(var/atom/target, var/amount = 1, var/multiplier = 1, var/copy = 0) + if(ismob(target)) + //warning("[my_atom] is trying to transfer reagents to [target], which is a mob, using trans_to()") + //return trans_to_mob(target, amount, multiplier, copy) + return splash_mob(target, amount) + if(isturf(target)) + return trans_to_turf(target, amount, multiplier, copy) + if(isobj(target)) + return trans_to_obj(target, amount, multiplier, copy) + return 0 + +/datum/reagents/proc/trans_id_to(var/atom/target, var/id, var/amount = 1) + if (!target || !target.reagents) + return + + amount = min(amount, get_reagent_amount(id)) + + if(!amount) + return + + var/datum/reagents/F = new /datum/reagents(amount) + var/tmpdata = get_data(id) + F.add_reagent(id, amount, tmpdata) + remove_reagent(id, amount) + + return F.trans_to(target, amount) // Let this proc check the atom's type + +/datum/reagents/proc/splash_mob(var/mob/target, var/amount = 1, var/clothes = 1) + var/perm = 0 + var/list/L = list("head" = THERMAL_PROTECTION_HEAD, "upper_torso" = THERMAL_PROTECTION_UPPER_TORSO, "lower_torso" = THERMAL_PROTECTION_LOWER_TORSO, "legs" = THERMAL_PROTECTION_LEG_LEFT + THERMAL_PROTECTION_LEG_RIGHT, "feet" = THERMAL_PROTECTION_FOOT_LEFT + THERMAL_PROTECTION_FOOT_RIGHT, "arms" = THERMAL_PROTECTION_ARM_LEFT + THERMAL_PROTECTION_ARM_RIGHT, "hands" = THERMAL_PROTECTION_HAND_LEFT + THERMAL_PROTECTION_HAND_RIGHT) + if(clothes) + for(var/obj/item/clothing/C in target.get_equipped_items()) + if(C.permeability_coefficient == 1 || C.body_parts_covered == 0) + continue + if(C.body_parts_covered & HEAD) + L["head"] *= C.permeability_coefficient + if(C.body_parts_covered & UPPER_TORSO) + L["upper_torso"] *= C.permeability_coefficient + if(C.body_parts_covered & LOWER_TORSO) + L["lower_torso"] *= C.permeability_coefficient + if(C.body_parts_covered & LEGS) + L["legs"] *= C.permeability_coefficient + if(C.body_parts_covered & FEET) + L["feet"] *= C.permeability_coefficient + if(C.body_parts_covered & ARMS) + L["arms"] *= C.permeability_coefficient + if(C.body_parts_covered & HANDS) + L["hands"] *= C.permeability_coefficient + for(var/t in L) + perm += L[t] + return trans_to_mob(target, amount, CHEM_TOUCH, perm) + +/datum/reagents/proc/trans_to_mob(var/mob/target, var/amount = 1, var/type = CHEM_BLOOD, var/multiplier = 1, var/copy = 0) // Transfer after checking into which holder... + if(!target || !istype(target)) + return + if(iscarbon(target)) + var/mob/living/carbon/C = target + if(type == CHEM_BLOOD) + var/datum/reagents/R = C.reagents + return trans_to_holder(R, amount, multiplier, copy) + if(type == CHEM_INGEST) + var/datum/reagents/R = C.ingested + return trans_to_holder(R, amount, multiplier, copy) + if(type == CHEM_TOUCH) + var/datum/reagents/R = C.touching + return trans_to_holder(R, amount, multiplier, copy) + else + var/datum/reagents/R = new /datum/reagents(amount) + . = trans_to_holder(R, amount, multiplier, copy) + R.touch_mob(target) + +/datum/reagents/proc/trans_to_turf(var/turf/target, var/amount = 1, var/multiplier = 1, var/copy = 0) // Turfs don't have any reagents (at least, for now). Just touch it. + if(!target) + return + + var/datum/reagents/R = new /datum/reagents(maximum_volume) + . = trans_to_holder(R, amount, multiplier, copy) + R.touch_turf(target) + return + +/datum/reagents/proc/trans_to_obj(var/turf/target, var/amount = 1, var/multiplier = 1, var/copy = 0) // Objects may or may not; if they do, it's probably a beaker or something and we need to transfer properly; otherwise, just touch. + if(!target) + return + + if(!target.reagents) + var/datum/reagents/R = new /datum/reagents(maximum_volume) + . = trans_to_holder(R, amount, multiplier, copy) + R.touch_obj(target) + return + + return trans_to_holder(target.reagents, amount, multiplier, copy) + +/datum/reagents/proc/metabolize(var/alien, var/location) + if(!iscarbon(my_atom)) + return + var/mob/living/carbon/C = my_atom + if(!C || !istype(C)) + return + for(var/datum/reagent/current in reagent_list) + current.on_mob_life(C, alien, location) + update_total() + +/* Atom reagent creation - use it all the time */ + +/atom/proc/create_reagents(var/max_vol) reagents = new/datum/reagents(max_vol) - reagents.my_atom = src + reagents.my_atom = src \ No newline at end of file diff --git a/code/modules/reagents/Chemistry-Machinery.dm b/code/modules/reagents/Chemistry-Machinery.dm index 6885f82d5d..547b2ab595 100644 --- a/code/modules/reagents/Chemistry-Machinery.dm +++ b/code/modules/reagents/Chemistry-Machinery.dm @@ -189,7 +189,7 @@ P.pixel_x = rand(-7, 7) //random position P.pixel_y = rand(-7, 7) P.icon_state = "pill"+pillsprite - reagents.trans_to(P,amount_per_pill) + reagents.trans_to_obj(P,amount_per_pill) if(src.loaded_pill_bottle) if(loaded_pill_bottle.contents.len < loaded_pill_bottle.storage_slots) P.loc = loaded_pill_bottle @@ -204,11 +204,11 @@ P.pixel_x = rand(-7, 7) //random position P.pixel_y = rand(-7, 7) P.icon_state = bottlesprite - reagents.trans_to(P,60) + reagents.trans_to_obj(P,60) P.update_icon() 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) + reagents.trans_to_obj(P,50) else if(href_list["change_pill"]) #define MAX_PILL_SPRITE 20 //max icon state of the pill sprites var/dat = "" diff --git a/code/modules/reagents/Chemistry-Reagents-Antidepressants.dm b/code/modules/reagents/Chemistry-Reagents-Antidepressants.dm deleted file mode 100644 index 12ecf3a817..0000000000 --- a/code/modules/reagents/Chemistry-Reagents-Antidepressants.dm +++ /dev/null @@ -1,90 +0,0 @@ -#define ANTIDEPRESSANT_MESSAGE_DELAY 5*60*10 - -/datum/reagent/antidepressant/methylphenidate - name = "Methylphenidate" - id = "methylphenidate" - description = "Improves the ability to concentrate." - reagent_state = LIQUID - color = "#BF80BF" - custom_metabolism = 0.01 - data = 0 - - on_mob_life(var/mob/living/M as mob) - if(!M) M = holder.my_atom - if(src.volume <= 0.1) if(data != -1) - data = -1 - M << "\red You lose focus.." - else - if(world.time > data + ANTIDEPRESSANT_MESSAGE_DELAY) - data = world.time - M << "\blue Your mind feels focused and undivided." - ..() - return - -/datum/chemical_reaction/methylphenidate - name = "Methylphenidate" - id = "methylphenidate" - result = "methylphenidate" - required_reagents = list("mindbreaker" = 1, "hydrogen" = 1) - result_amount = 3 - -/datum/reagent/antidepressant/citalopram - name = "Citalopram" - id = "citalopram" - description = "Stabilizes the mind a little." - reagent_state = LIQUID - color = "#FF80FF" - custom_metabolism = 0.01 - data = 0 - - on_mob_life(var/mob/living/M as mob) - if(!M) M = holder.my_atom - if(src.volume <= 0.1) if(data != -1) - data = -1 - M << "\red Your mind feels a little less stable.." - else - if(world.time > data + ANTIDEPRESSANT_MESSAGE_DELAY) - data = world.time - M << "\blue Your mind feels stable.. a little stable." - ..() - return - -/datum/chemical_reaction/citalopram - name = "Citalopram" - id = "citalopram" - result = "citalopram" - required_reagents = list("mindbreaker" = 1, "carbon" = 1) - result_amount = 3 - - -/datum/reagent/antidepressant/paroxetine - name = "Paroxetine" - id = "paroxetine" - description = "Stabilizes the mind greatly, but has a chance of adverse effects." - reagent_state = LIQUID - color = "#FF80BF" - custom_metabolism = 0.01 - data = 0 - - on_mob_life(var/mob/living/M as mob) - if(!M) M = holder.my_atom - if(src.volume <= 0.1) if(data != -1) - data = -1 - M << "\red Your mind feels much less stable.." - else - if(world.time > data + ANTIDEPRESSANT_MESSAGE_DELAY) - data = world.time - if(prob(90)) - M << "\blue Your mind feels much more stable." - else - M << "\red Your mind breaks apart.." - M.hallucination += 200 - ..() - return - -/datum/chemical_reaction/paroxetine - name = "Paroxetine" - id = "paroxetine" - result = "paroxetine" - required_reagents = list("mindbreaker" = 1, "oxygen" = 1, "inaprovaline" = 1) - result_amount = 3 diff --git a/code/modules/reagents/Chemistry-Reagents.dm b/code/modules/reagents/Chemistry-Reagents.dm index d5a3095e49..f3c79c7aae 100644 --- a/code/modules/reagents/Chemistry-Reagents.dm +++ b/code/modules/reagents/Chemistry-Reagents.dm @@ -1,4441 +1,4119 @@ -#define SOLID 1 -#define LIQUID 2 -#define GAS 3 -#define REAGENTS_OVERDOSE 30 -#define REM REAGENTS_EFFECT_MULTIPLIER +/datum/reagent + var/name = "Reagent" + var/id = "reagent" + var/description = "A non-descript chemical." + var/datum/reagents/holder = null + var/reagent_state = SOLID + var/list/data = null + var/volume = 0 + var/metabolism = REM // This would be 0.2 normally + var/ingest_met = 0 + var/touch_met = 0 + var/dose = 0 + var/max_dose = 0 + var/overdose_blood = 0 + var/overdose_ingest = 0 + var/scannable = 0 // Shows up on health analyzers. + var/affects_dead = 0 + var/glass_icon_state = null + var/glass_name = null + var/glass_desc = null + var/glass_center_of_mass = null + var/color = "#000000" + var/color_weight = 1 -//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/proc/remove_self(var/amount) // Shortcut + holder.remove_reagent(id, amount) + +/datum/reagent/proc/touch_mob(var/mob/M) // This doesn't apply to being splashed - this is for, e.g. extinguishers and sprays. The difference is that reagent is not on the mob - it's in another object. + return + +/datum/reagent/proc/touch_obj(var/obj/O) // Acid melting, cleaner cleaning, etc + return + +/datum/reagent/proc/touch_turf(var/turf/T) // Cleaner cleaning, lube lubbing, etc, all go here + return + +/datum/reagent/proc/on_mob_life(var/mob/living/carbon/M, var/alien, var/location) // Currently, on_mob_life is called on carbons. Any interaction with non-carbon mobs (lube) will need to be done in touch_mob. + if(!istype(M)) + return + if(!affects_dead && M.stat == DEAD) + return + if((overdose_blood && (location == CHEM_BLOOD) && dose > overdose_blood) || (overdose_ingest && (location == CHEM_INGEST) && dose > overdose_ingest)) + overdose(M, alien) + var/removed = metabolism + if(ingest_met && (location == CHEM_INGEST)) + removed = ingest_met + if(touch_met && (location == CHEM_TOUCH)) + removed = touch_met + removed = min(removed, volume) + max_dose = max(volume, max_dose) + dose = min(dose + removed, max_dose) + if(removed >= (metabolism * 0.1) || removed >= 0.1) // If there's too little chemical, don't affect the mob, just remove it + affect_mob(M, alien, removed, location) + remove_self(removed) + return + +/datum/reagent/proc/affect_mob(var/mob/living/carbon/M, var/alien, var/removed, var/location) // This is the main working proc where the chemical does its magic + return + +/datum/reagent/proc/overdose(var/mob/living/carbon/M, var/alien) // Overdose effect. Doesn't happen instantly. + M.adjustToxLoss(REM) + return + +/datum/reagent/proc/initialize_data(var/newdata) // Called when the reagent is created. + if(!isnull(newdata)) + data = newdata + return + +/datum/reagent/proc/mix_data(var/newdata, var/newamount) // You have a reagent with data, and new reagent with its own data get added, how do you deal with that? + return + +/datum/reagent/proc/get_data() // Just in case you have a reagent that handles data differently. + if(data && istype(data, /list)) + return data.Copy() + else if(data) + return data + return null + +/* DEPRECATED - TODO: REMOVE EVERYWHERE */ + +/datum/reagent/proc/reaction_turf(var/turf/target) + touch_turf(target) + +/datum/reagent/proc/reaction_obj(var/obj/target) + touch_obj(target) + +/datum/reagent/proc/reaction_mob(var/mob/target) + touch_mob(target) -datum - reagent - var/name = "Reagent" - var/id = "reagent" - var/description = "" - var/datum/reagents/holder = null - var/reagent_state = SOLID - var/list/data = null - var/volume = 0 - var/nutriment_factor = 0 - var/custom_metabolism = REAGENTS_METABOLISM - var/overdose = 0 - var/overdose_dam = 1 - var/scannable = 0 //shows up on health analyzers - var/glass_icon_state = null - var/glass_name = null - var/glass_desc = null - var/glass_center_of_mass = null - //var/list/viruses = list() - var/color = "#000000" // rgb: 0, 0, 0 (does not support alpha channels - yet!) +/* REAGENTS START HERE */ - 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. +/* Core reagents - the most important ones */ - if(self.holder) //for catching rare runtimes - if(!istype(self.holder.my_atom, /obj/effect/effect/smoke/chem)) - // 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 +/datum/reagent/blood + data = new/list("donor" = null, "viruses" = null, "species" = "Human", "blood_DNA" = null, "blood_type" = null, "blood_colour" = "#A10808", "resistances" = null, "trace_chem" = null, "antibodies" = list()) + name = "Blood" + id = "blood" + reagent_state = LIQUID + metabolism = REM * 5 + color = "#C80000" - if(method == TOUCH) + glass_icon_state = "glass_red" + glass_name = "glass of tomato juice" + glass_desc = "Are you sure this is tomato juice?" - var/chance = 1 - var/block = 0 +/datum/reagent/blood/initialize_data(var/newdata) + ..() + if(data && data["blood_colour"]) + color = data["blood_colour"] + return - 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 +/datum/reagent/blood/get_data() // Just in case you have a reagent that handles data differently. + var/t = data.Copy() + if(t["virus2"]) + var/list/v = t["virus2"] + t["virus2"] = v.Copy() + return t - if(istype(C, /obj/item/clothing/head/bio_hood)) - if(prob(75)) - block = 1 +/datum/reagent/blood/mix_data(var/newdata, var/newamount) // You have a reagent with data, and new reagent with its own data get added, how do you deal with that? + if(data["viruses"] || newdata["viruses"]) + var/list/mix1 = data["viruses"] + var/list/mix2 = newdata["viruses"] + var/list/to_mix = list() // Stop issues with the list changing during mixing. + for(var/datum/disease/advance/AD in mix1) + to_mix += AD + for(var/datum/disease/advance/AD in mix2) + to_mix += AD + var/datum/disease/advance/AD = Advance_Mix(to_mix) + if(AD) + var/list/preserve = list(AD) + for(var/D in data["viruses"]) + if(!istype(D, /datum/disease/advance)) + preserve += D + data["viruses"] = preserve - chance = chance * 100 +/datum/reagent/blood/touch_turf(var/turf/simulated/T) + if(!istype(T) || volume < 3) + return + if(!data["donor"] || istype(data["donor"], /mob/living/carbon/human)) + blood_splatter(T, src, 1) + else if(istype(data["donor"], /mob/living/carbon/monkey)) + var/obj/effect/decal/cleanable/blood/B = blood_splatter(T, src, 1) + if(B) + B.blood_DNA["Non-Human DNA"] = "A+" + else if(istype(data["donor"], /mob/living/carbon/alien)) + var/obj/effect/decal/cleanable/blood/B = blood_splatter(T, src, 1) + if(B) + B.blood_DNA["UNKNOWN DNA STRUCTURE"] = "X*" - if(prob(chance) && !block) - if(M.reagents) - M.reagents.add_reagent(self.id,self.volume/2) - return 1 +/datum/reagent/blood/affect_mob(var/mob/living/carbon/M, var/alien, var/removed, var/location) + if(location == CHEM_INGEST) + if(dose > 5) + M.adjustToxLoss(removed) + if(dose > 15) + M.adjustToxLoss(removed) + if(location == CHEM_TOUCH) + if(data && data["viruses"]) + for(var/datum/disease/D in data["viruses"]) + if(D.spread_type == SPECIAL || D.spread_type == NON_CONTAGIOUS) + continue + M.contract_disease(D) + if(data && data["virus2"]) + var/list/vlist = data["virus2"] + if(vlist.len) + for(var/ID in vlist) + var/datum/disease2/disease/V = vlist[ID] + infect_virus2(M, V.getcopy()) + if(data && data["antibodies"]) + M.antibodies |= data["antibodies"] + if(location == CHEM_BLOOD) + M.inject_blood(src, volume) + remove_self(volume) - 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 +/datum/reagent/vaccine + name = "Vaccine" + id = "vaccine" + reagent_state = LIQUID + color = "#C81040" - reaction_turf(var/turf/T, var/volume) - src = null - return +/datum/reagent/vaccine/affect_mob(var/mob/living/carbon/M, var/alien, var/removed, var/location) + if(data && location == CHEM_BLOOD) + for(var/datum/disease/D in M.viruses) + if(istype(D, /datum/disease/advance)) + var/datum/disease/advance/A = D + if(A.GetDiseaseID() == data) + D.cure() + else + if(D.type == data) + D.cure() - on_mob_life(var/mob/living/M as mob, var/alien) - if(!istype(M, /mob/living)) - return //Noticed runtime errors from pacid trying to damage ghosts, this should fix. --NEO - if( (overdose > 0) && (volume >= overdose))//Overdosing, wooo - M.adjustToxLoss(overdose_dam) - holder.remove_reagent(src.id, custom_metabolism) //By default it slowly disappears. - return + M.resistances += data + return - on_move(var/mob/M) - return +#define WATER_LATENT_HEAT 19000 // How much heat is removed when applied to a hot turf, in J/unit (19000 makes 120 u of water roughly equivalent to 4L) +/datum/reagent/water + name = "Water" + id = "water" + description = "A ubiquitous chemical substance that is composed of hydrogen and oxygen." + reagent_state = LIQUID + color = "#0064C877" + metabolism = REM * 10 - // Called after add_reagents creates a new reagent. - on_new(var/data) - return + glass_icon_state = "glass_clear" + glass_name = "glass of water" + glass_desc = "The father of all refreshments." - // Called when two reagents of the same are mixing. <-- Blatant lies - on_merge(var/data) - return +/datum/reagent/water/touch_turf(var/turf/simulated/T) + if(!istype(T)) + return - on_update(var/atom/A) - return + var/datum/gas_mixture/environment = T.return_air() + var/min_temperature = T0C + 100 // 100C, the boiling point of water + var/hotspot = (locate(/obj/fire) 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 (environment && environment.temperature > min_temperature) // Abstracted as steam or something + var/removed_heat = between(0, volume * WATER_LATENT_HEAT, -environment.get_thermal_energy_change(min_temperature)) + environment.add_thermal_energy(-removed_heat) + if (prob(5)) + T.visible_message("The water sizzles as it lands on \the [T]!") + else + 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 - blood - data = new/list("donor"=null,"viruses"=null,"species"="Human","blood_DNA"=null,"blood_type"=null,"blood_colour"= "#A10808","resistances"=null,"trace_chem"=null, "antibodies" = list()) - name = "Blood" - id = "blood" - reagent_state = LIQUID - color = "#C80000" // rgb: 200, 0, 0 - - glass_icon_state = "glass_red" - glass_name = "glass of tomato juice" - glass_desc = "Are you sure this is tomato juice?" - - reaction_mob(var/mob/M, var/method=TOUCH, var/volume) - var/datum/reagent/blood/self = src - src = null - if(self.data && self.data["viruses"]) - for(var/datum/disease/D in self.data["viruses"]) - //var/datum/disease/virus = new D.type(0, D, 1) - // We don't spread. - if(D.spread_type == SPECIAL || D.spread_type == NON_CONTAGIOUS) continue - - if(method == TOUCH) - M.contract_disease(D) - else //injected - M.contract_disease(D, 1, 0) - if(self.data && self.data["virus2"] && istype(M, /mob/living/carbon))//infecting... - var/list/vlist = self.data["virus2"] - if (vlist.len) - for (var/ID in vlist) - var/datum/disease2/disease/V = vlist[ID] - - if(method == TOUCH) - infect_virus2(M,V.getcopy()) - else - infect_virus2(M,V.getcopy(),1) //injected, force infection! - if(self.data && self.data["antibodies"] && istype(M, /mob/living/carbon))//... and curing - var/mob/living/carbon/C = M - C.antibodies |= self.data["antibodies"] - - on_merge(var/data) - if(data["blood_colour"]) - color = data["blood_colour"] - return ..() - - on_update(var/atom/A) - if(data["blood_colour"]) - color = data["blood_colour"] - 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 - if(!(volume >= 3)) return - - if(!self.data["donor"] || istype(self.data["donor"], /mob/living/carbon/human)) - blood_splatter(T,self,1) - else if(istype(self.data["donor"], /mob/living/carbon/monkey)) - var/obj/effect/decal/cleanable/blood/B = blood_splatter(T,self,1) - if(B) B.blood_DNA["Non-Human DNA"] = "A+" - else if(istype(self.data["donor"], /mob/living/carbon/alien)) - var/obj/effect/decal/cleanable/blood/B = blood_splatter(T,self,1) - if(B) B.blood_DNA["UNKNOWN DNA STRUCTURE"] = "X*" - 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(istype(D, /datum/disease/advance)) - var/datum/disease/advance/A = D - if(A.GetDiseaseID() == self.data) - D.cure() - else - if(D.type == self.data) - D.cure() - - M.resistances += self.data - return - - woodpulp - name = "Wood Pulp" - id = "woodpulp" - description = "A mass of wood fibers." - reagent_state = LIQUID - color = "#B97A57" - - #define WATER_LATENT_HEAT 19000 // How much heat is removed when applied to a hot turf, in J/unit (19000 makes 120 u of water roughly equivalent to 4L) - 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 - custom_metabolism = 0.01 - - glass_icon_state = "glass_clear" - glass_name = "glass of water" - glass_desc = "The father of all refreshments." - - reaction_turf(var/turf/simulated/T, var/volume) - if (!istype(T)) return - - //If the turf is hot enough, remove some heat - var/datum/gas_mixture/environment = T.return_air() - var/min_temperature = T0C + 100 //100C, the boiling point of water - - if (environment && environment.temperature > min_temperature) //abstracted as steam or something - var/removed_heat = between(0, volume*WATER_LATENT_HEAT, -environment.get_thermal_energy_change(min_temperature)) - environment.add_thermal_energy(-removed_heat) - if (prob(5)) - T.visible_message("\red The water sizzles as it lands on \the [T]!") - - else //otherwise, the turf gets wet - 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 - - src = null - 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 - - //Put out fires. - var/hotspot = (locate(/obj/fire) in T) - if(hotspot) - del(hotspot) - if(environment) - environment.react() //react at the new temperature - - reaction_obj(var/obj/O, var/volume) - var/turf/T = get_turf(O) - var/hotspot = (locate(/obj/fire) 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() - - reaction_mob(var/mob/living/M, var/method=TOUCH, var/volume) - if (istype(M, /mob/living/carbon/slime)) - var/mob/living/carbon/slime/S = M - S.apply_water(volume) - if(method == TOUCH && isliving(M)) - M.adjust_fire_stacks(-(volume / 10)) - if(M.fire_stacks <= 0) - M.ExtinguishMob() + spawn(800) // This is terrible and needs to be changed when possible. + if(!T || !istype(T)) return - - water/holywater - name = "Holy Water" - id = "holywater" - description = "An ashen-obsidian-water mix, this solution will alter certain sections of the brain's rationality." - color = "#E0E8EF" // rgb: 224, 232, 239 - - glass_icon_state = "glass_clear" - glass_name = "glass of holy water" - glass_desc = "An ashen-obsidian-water mix, this solution will alter certain sections of the brain's rationality." - - on_mob_life(var/mob/living/M as mob) - if(ishuman(M)) - if(M.mind && cult.is_antagonist(M.mind) && prob(10)) - cult.remove_antagonist(M.mind) - holder.remove_reagent(src.id, 10 * REAGENTS_METABOLISM) //high metabolism to prevent extended uncult rolls. - 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 - overdose = REAGENTS_OVERDOSE - - reaction_turf(var/turf/simulated/T, var/volume) - if (!istype(T)) return - src = null - if(volume >= 1) - 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 - - plasticide - name = "Plasticide" - id = "plasticide" - description = "Liquid plastic, do not eat." - reagent_state = LIQUID - color = "#CF3600" // rgb: 207, 54, 0 - custom_metabolism = 0.01 - - on_mob_life(var/mob/living/M as mob) - if(!M) M = holder.my_atom - // Toxins are really weak, but without being treated, last very long. - M.adjustToxLoss(0.2) - ..() - return - - slimetoxin - name = "Mutation Toxin" - id = "mutationtoxin" - description = "A corruptive toxin produced by slimes." - reagent_state = LIQUID - color = "#13BC5E" // rgb: 19, 188, 94 - overdose = REAGENTS_OVERDOSE - - on_mob_life(var/mob/living/M as mob) - if(!M) M = holder.my_atom - if(ishuman(M)) - var/mob/living/carbon/human/human = M - if(human.species.name != "Slime") - M << "Your flesh rapidly mutates!" - human.set_species("Slime") - ..() - return - - aslimetoxin - name = "Advanced Mutation Toxin" - id = "amutationtoxin" - description = "An advanced corruptive toxin produced by slimes." - reagent_state = LIQUID - color = "#13BC5E" // rgb: 19, 188, 94 - overdose = REAGENTS_OVERDOSE - - on_mob_life(var/mob/living/M as mob) - if(!M) M = holder.my_atom - if(istype(M, /mob/living/carbon) && M.stat != DEAD) - M << "\red Your flesh rapidly mutates!" - if(M.monkeyizing) return - M.monkeyizing = 1 - M.canmove = 0 - M.icon = null - M.overlays.Cut() - M.invisibility = 101 - for(var/obj/item/W in M) - if(istype(W, /obj/item/weapon/implant)) //TODO: Carn. give implants a dropped() or something - del(W) - continue - W.layer = initial(W.layer) - W.loc = M.loc - W.dropped(M) - var/mob/living/carbon/slime/new_mob = new /mob/living/carbon/slime(M.loc) - new_mob.a_intent = "hurt" - new_mob.universal_speak = 1 - if(M.mind) - M.mind.transfer_to(new_mob) - else - new_mob.key = M.key - del(M) - ..() - return - - inaprovaline - name = "Inaprovaline" - id = "inaprovaline" - description = "Inaprovaline is a synaptic stimulant and cardiostimulant. Commonly used to stabilize patients." - reagent_state = LIQUID - color = "#00BFFF" // rgb: 200, 165, 220 - overdose = REAGENTS_OVERDOSE*2 - scannable = 1 - - on_mob_life(var/mob/living/M as mob, var/alien) - if(!M) M = holder.my_atom - - if(alien && alien == IS_VOX) - M.adjustToxLoss(REAGENTS_METABOLISM) - else - if(M.losebreath >= 10) - M.losebreath = max(10, M.losebreath-5) - - holder.remove_reagent(src.id, 0.5 * REAGENTS_METABOLISM) - 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 - overdose = REAGENTS_OVERDOSE - - 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 && !M.restrained()) - if(prob(10)) step(M, pick(cardinal)) - if(prob(7)) M.emote(pick("twitch","drool","moan","giggle")) - holder.remove_reagent(src.id, 0.5 * REAGENTS_METABOLISM) - 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 - overdose = REAGENTS_OVERDOSE - - 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.25 * REAGENTS_METABOLISM) - 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)) - var/obj/structure/window/W = O - W.apply_silicate(volume) - return - - oxygen - name = "Oxygen" - id = "oxygen" - description = "A colorless, odorless gas." - reagent_state = GAS - color = "#808080" // rgb: 128, 128, 128 - - custom_metabolism = 0.01 - - on_mob_life(var/mob/living/M as mob, var/alien) - if(M.stat == 2) return - if(alien && alien == IS_VOX) - M.adjustToxLoss(REAGENTS_METABOLISM) - holder.remove_reagent(src.id, REAGENTS_METABOLISM) //By default it slowly disappears. + if(T.wet >= 2) return - ..() - - copper - name = "Copper" - id = "copper" - description = "A highly ductile metal." - color = "#6E3B08" // rgb: 110, 59, 8 - - custom_metabolism = 0.01 - - nitrogen - name = "Nitrogen" - id = "nitrogen" - description = "A colorless, odorless, tasteless gas." - reagent_state = GAS - color = "#808080" // rgb: 128, 128, 128 - - custom_metabolism = 0.01 - - on_mob_life(var/mob/living/M as mob, var/alien) - if(M.stat == 2) return - if(alien && alien == IS_VOX) - M.adjustOxyLoss(-2*REM) - holder.remove_reagent(src.id, REAGENTS_METABOLISM) //By default it slowly disappears. - return - ..() - - hydrogen - name = "Hydrogen" - id = "hydrogen" - description = "A colorless, odorless, nonmetallic, tasteless, highly combustible diatomic gas." - reagent_state = GAS - color = "#808080" // rgb: 128, 128, 128 - - custom_metabolism = 0.01 - - 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 - - custom_metabolism = 0.01 - - mercury - name = "Mercury" - id = "mercury" - description = "A chemical element." - reagent_state = LIQUID - color = "#484848" // rgb: 72, 72, 72 - overdose = REAGENTS_OVERDOSE - - on_mob_life(var/mob/living/M as mob) - if(!M) M = holder.my_atom - if(M.canmove && !M.restrained() && istype(M.loc, /turf/space)) - step(M, pick(cardinal)) - if(prob(5)) M.emote(pick("twitch","drool","moan")) - M.adjustBrainLoss(2) - ..() - return - - sulfur - name = "Sulfur" - id = "sulfur" - description = "A chemical element with a pungent smell." - reagent_state = SOLID - color = "#BF8C00" // rgb: 191, 140, 0 - - custom_metabolism = 0.01 - - carbon - name = "Carbon" - id = "carbon" - description = "A chemical element, the builing block of life." - reagent_state = SOLID - color = "#1C1300" // rgb: 30, 20, 0 - - custom_metabolism = 0.01 - - reaction_turf(var/turf/T, var/volume) - src = null - if(!istype(T, /turf/space)) - var/obj/effect/decal/cleanable/dirt/dirtoverlay = locate(/obj/effect/decal/cleanable/dirt, T) - if (!dirtoverlay) - dirtoverlay = new/obj/effect/decal/cleanable/dirt(T) - dirtoverlay.alpha = volume*30 - else - dirtoverlay.alpha = min(dirtoverlay.alpha+volume*30, 255) - - chlorine - name = "Chlorine" - id = "chlorine" - description = "A chemical element with a characteristic odour." - reagent_state = GAS - color = "#808080" // rgb: 128, 128, 128 - overdose = REAGENTS_OVERDOSE - - on_mob_life(var/mob/living/M as mob) - if(!M) M = holder.my_atom - M.take_organ_damage(1*REM, 0) - ..() - return - - fluorine - name = "Fluorine" - id = "fluorine" - description = "A highly-reactive chemical element." - reagent_state = GAS - color = "#808080" // rgb: 128, 128, 128 - overdose = REAGENTS_OVERDOSE - - on_mob_life(var/mob/living/M as mob) - if(!M) M = holder.my_atom - M.adjustToxLoss(1*REM) - ..() - return - - sodium - name = "Sodium" - id = "sodium" - description = "A chemical element, readily reacts with water." - reagent_state = SOLID - color = "#808080" // rgb: 128, 128, 128 - - custom_metabolism = 0.01 - - phosphorus - name = "Phosphorus" - id = "phosphorus" - description = "A chemical element, the backbone of biological energy carriers." - reagent_state = SOLID - color = "#832828" // rgb: 131, 40, 40 - - custom_metabolism = 0.01 - - lithium - name = "Lithium" - id = "lithium" - description = "A chemical element, used as antidepressant." - reagent_state = SOLID - color = "#808080" // rgb: 128, 128, 128 - overdose = REAGENTS_OVERDOSE - - on_mob_life(var/mob/living/M as mob) - if(!M) M = holder.my_atom - if(M.canmove && !M.restrained() && 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 = "#FFFFFF" // rgb: 255, 255, 255 - - glass_icon_state = "iceglass" - glass_name = "glass of sugar" - glass_desc = "The organic compound commonly known as table sugar and sometimes called saccharose. This white, odorless, crystalline powder has a pleasing, sweet taste." - - on_mob_life(var/mob/living/M as mob) - M.nutrition += 1*REM - ..() - return - - - 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 - - custom_metabolism = 0.01 - - 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 - - custom_metabolism = 0.01 - - radium - name = "Radium" - id = "radium" - description = "Radium is an alkaline earth metal. It is extremely radioactive." - reagent_state = SOLID - color = "#C7C7C7" // rgb: 199,199,199 - - on_mob_life(var/mob/living/M as mob) - if(!M) M = holder.my_atom - M.apply_effect(2*REM,IRRADIATE,0) - // radium may increase your chances to cure a disease - if(istype(M,/mob/living/carbon)) // make sure to only use it on carbon mobs - var/mob/living/carbon/C = M - if(C.virus2.len) - for (var/ID in C.virus2) - var/datum/disease2/disease/V = C.virus2[ID] - if(prob(5)) - C.antibodies |= V.antigen - if(prob(50)) - M.radiation += 50 // curing it that way may kill you instead - var/absorbed - var/datum/organ/internal/diona/nutrients/rad_organ = locate() in C.internal_organs - if(rad_organ && !rad_organ.is_broken()) - absorbed = 1 - if(!absorbed) - M.adjustToxLoss(100) - ..() - return - - reaction_turf(var/turf/T, var/volume) - src = null - if(volume >= 3) - if(!istype(T, /turf/space)) - var/obj/effect/decal/cleanable/greenglow/glow = locate(/obj/effect/decal/cleanable/greenglow, T) - if(!glow) - new /obj/effect/decal/cleanable/greenglow(T) - return - - - ryetalyn - name = "Ryetalyn" - id = "ryetalyn" - description = "Ryetalyn can cure all genetic abnomalities via a catalytic process." - reagent_state = SOLID - color = "#004000" // rgb: 200, 165, 220 - overdose = REAGENTS_OVERDOSE - - on_mob_life(var/mob/living/M as mob) - if(!M) M = holder.my_atom - - var/needs_update = M.mutations.len > 0 - - M.mutations = list() - M.disabilities = 0 - M.sdisabilities = 0 - - // Might need to update appearance for hulk etc. - if(needs_update && ishuman(M)) - var/mob/living/carbon/human/H = M - H.update_mutations() - - ..() - 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(volume >= 5) - if(istype(T, /turf/simulated/wall)) - var/turf/simulated/wall/W = T - W.thermite = 1 - W.overlays += image('icons/effects/effects.dmi',icon_state = "#673910") - return - - on_mob_life(var/mob/living/M as mob) - if(!M) M = holder.my_atom - M.adjustFireLoss(1) - ..() - return - - paracetamol - name = "Paracetamol" - id = "paracetamol" - description = "Most probably know this as Tylenol, but this chemical is a mild, simple painkiller." - reagent_state = LIQUID - color = "#C8A5DC" - overdose = 60 - scannable = 1 - custom_metabolism = 0.025 // Lasts 10 minutes for 15 units - - on_mob_life(var/mob/living/M as mob) - if (volume > overdose) - M.hallucination = max(M.hallucination, 2) - ..() - return - - tramadol - name = "Tramadol" - id = "tramadol" - description = "A simple, yet effective painkiller." - reagent_state = LIQUID - color = "#CB68FC" - overdose = 30 - scannable = 1 - custom_metabolism = 0.025 // Lasts 10 minutes for 15 units - - on_mob_life(var/mob/living/M as mob) - if (volume > overdose) - M.hallucination = max(M.hallucination, 2) - ..() - return - - oxycodone - name = "Oxycodone" - id = "oxycodone" - description = "An effective and very addictive painkiller." - reagent_state = LIQUID - color = "#800080" - overdose = 20 - custom_metabolism = 0.25 // Lasts 10 minutes for 15 units - - on_mob_life(var/mob/living/M as mob) - if (volume > overdose) - M.druggy = max(M.druggy, 10) - M.hallucination = max(M.hallucination, 3) - ..() - 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*REM - ..() - return - - sterilizine - name = "Sterilizine" - id = "sterilizine" - description = "Sterilizes wounds in preparation for surgery." - reagent_state = LIQUID - color = "#C8A5DC" // rgb: 200, 165, 220 - - //makes you squeaky clean - reaction_mob(var/mob/living/M, var/method=TOUCH, var/volume) - if (method == TOUCH) - M.germ_level -= min(volume*20, M.germ_level) - - reaction_obj(var/obj/O, var/volume) - O.germ_level -= min(volume*20, O.germ_level) - - reaction_turf(var/turf/T, var/volume) - T.germ_level -= min(volume*20, T.germ_level) - - /* 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 = "#353535" - overdose = REAGENTS_OVERDOSE - - 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(volume >= 3) - if(!istype(T, /turf/space)) - var/obj/effect/decal/cleanable/greenglow/glow = locate(/obj/effect/decal/cleanable/greenglow, T) - if(!glow) - new /obj/effect/decal/cleanable/greenglow(T) - return - - 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 - overdose = REAGENTS_OVERDOSE - - glass_icon_state = "dr_gibb_glass" - glass_name = "glass of welder fuel" - glass_desc = "Unless you are an industrial tool, this is probably not safe for consumption." - - reaction_obj(var/obj/O, var/volume) - 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 - new /obj/effect/decal/cleanable/liquid_fuel(the_turf, volume) - reaction_turf(var/turf/T, var/volume) - new /obj/effect/decal/cleanable/liquid_fuel(T, volume) - return - 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)//Splashing people with welding fuel to make them easy to ignite! - if(!istype(M, /mob/living)) - return - if(method == TOUCH) - M.adjust_fire_stacks(volume / 10) - 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 - overdose = REAGENTS_OVERDOSE - - 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) - if(volume >= 1) - if(istype(T, /turf/simulated)) - var/turf/simulated/S = T - S.dirt = 0 - T.clean_blood() - for(var/obj/effect/decal/cleanable/C in T.contents) - src.reaction_obj(C, volume) - del(C) - - for(var/mob/living/carbon/slime/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) - else - H.clean_blood(1) - return - M.clean_blood() - - 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 - overdose = REAGENTS_OVERDOSE - scannable = 1 - - 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 - (40 * TEMPERATURE_DAMAGE_COEFFICIENT)) - else if(M.bodytemperature < 311) - M.bodytemperature = min(310, M.bodytemperature + (40 * TEMPERATURE_DAMAGE_COEFFICIENT)) - ..() - return - - cryptobiolin - name = "Cryptobiolin" - id = "cryptobiolin" - description = "Cryptobiolin causes confusion and dizzyness." - reagent_state = LIQUID - color = "#000055" // rgb: 200, 165, 220 - overdose = REAGENTS_OVERDOSE - - 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.5 * REAGENTS_METABOLISM) - ..() - return - - - kelotane - name = "Kelotane" - id = "kelotane" - description = "Kelotane is a drug used to treat burns." - reagent_state = LIQUID - color = "#FFA800" // rgb: 200, 165, 220 - overdose = REAGENTS_OVERDOSE - scannable = 1 - - on_mob_life(var/mob/living/M as mob) - if(M.stat == 2.0) - return - if(!M) M = holder.my_atom - //This needs a diona check but if one is added they won't be able to heal burn damage at all. - M.heal_organ_damage(0,2*REM) - ..() - 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 = "#FF8000" // rgb: 200, 165, 220 - overdose = REAGENTS_OVERDOSE/2 - scannable = 1 - - on_mob_life(var/mob/living/M as mob, var/alien) - 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 - if(!alien || alien != IS_DIONA) - M.heal_organ_damage(0,3*REM) - ..() - return - - dexalin - name = "Dexalin" - id = "dexalin" - description = "Dexalin is used in the treatment of oxygen deprivation." - reagent_state = LIQUID - color = "#0080FF" // rgb: 200, 165, 220 - overdose = REAGENTS_OVERDOSE - scannable = 1 - - on_mob_life(var/mob/living/M as mob, var/alien) - if(M.stat == 2.0) - return //See above, down and around. --Agouri - if(!M) M = holder.my_atom - - if(alien && alien == IS_VOX) - M.adjustToxLoss(2*REM) - else if(!alien || alien != IS_DIONA) - M.adjustOxyLoss(-2*REM) - - holder.remove_reagent("lexorin", 2*REM) - ..() - return - - dexalinp - name = "Dexalin Plus" - id = "dexalinp" - description = "Dexalin Plus is used in the treatment of oxygen deprivation. It is highly effective." - reagent_state = LIQUID - color = "#0040FF" // rgb: 200, 165, 220 - overdose = REAGENTS_OVERDOSE/2 - scannable = 1 - - on_mob_life(var/mob/living/M as mob, var/alien) - if(M.stat == 2.0) - return - if(!M) M = holder.my_atom - - if(alien && alien == IS_VOX) - M.adjustOxyLoss() - else if(!alien || alien != IS_DIONA) - M.adjustOxyLoss(-M.getOxyLoss()) - - holder.remove_reagent("lexorin", 2*REM) - ..() - 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 = "#8040FF" // rgb: 200, 165, 220 - scannable = 1 - - on_mob_life(var/mob/living/M as mob, var/alien) - if(M.stat == 2.0) - return - if(!M) M = holder.my_atom - if(!alien || alien != IS_DIONA) - if(M.getOxyLoss()) M.adjustOxyLoss(-1*REM) - if(M.getBruteLoss() && prob(80)) M.heal_organ_damage(1*REM,0) - if(M.getFireLoss() && prob(80)) M.heal_organ_damage(0,1*REM) - if(M.getToxLoss() && prob(80)) M.adjustToxLoss(-1*REM) - ..() - return - - anti_toxin - name = "Dylovene" - id = "anti_toxin" - description = "Dylovene is a broad-spectrum antitoxin." - reagent_state = LIQUID - color = "#00A000" // rgb: 200, 165, 220 - scannable = 1 - - on_mob_life(var/mob/living/M as mob, var/alien) - if(!M) M = holder.my_atom - if(!alien || alien != IS_DIONA) - M.reagents.remove_all_type(/datum/reagent/toxin, 1*REM, 0, 1) - M.drowsyness = max(M.drowsyness-2*REM, 0) - M.hallucination = max(0, M.hallucination - 5*REM) - M.adjustToxLoss(-2*REM) - ..() - 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 - - glass_icon_state = "golden_cup" - glass_name = "golden cup" - glass_desc = "It's magic. We don't have to explain it." - - on_mob_life(var/mob/living/carbon/M as mob) - if(!M) M = holder.my_atom ///This can even heal dead people. - M.reagents.remove_all_type(/datum/reagent/toxin, 5*REM, 0, 1) - M.setCloneLoss(0) - M.setOxyLoss(0) - M.radiation = 0 - M.heal_organ_damage(5,5) - M.adjustToxLoss(-5) - M.hallucination = 0 - M.setBrainLoss(0) - M.disabilities = 0 - M.sdisabilities = 0 - M.eye_blurry = 0 - M.eye_blind = 0 - 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 = "#99CCFF" // rgb: 200, 165, 220 - custom_metabolism = 0.01 - overdose = REAGENTS_OVERDOSE - scannable = 1 - - 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) - holder.remove_reagent("mindbreaker", 5) - M.hallucination = max(0, M.hallucination - 10) - 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 - overdose = REAGENTS_OVERDOSE - - 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*REM) - 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 = "#408000" // rgb: 200, 165, 220 - custom_metabolism = 0.05 - overdose = REAGENTS_OVERDOSE - scannable = 1 - - on_mob_life(var/mob/living/M as mob) - if(!M) M = holder.my_atom - M.radiation = max(M.radiation-3*REM,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 = "#008000" // rgb: 200, 165, 220 - custom_metabolism = 0.05 - overdose = REAGENTS_OVERDOSE - - 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*REM,0) - M.adjustToxLoss(-1*REM) - 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 = "#FFFF66" // rgb: 200, 165, 220 - custom_metabolism = 0.05 - overdose = REAGENTS_OVERDOSE - scannable = 1 - - on_mob_life(var/mob/living/M as mob) - if(!M) M = holder.my_atom - M.adjustBrainLoss(-3*REM) - ..() - return - - imidazoline - name = "Imidazoline" - id = "imidazoline" - description = "Heals eye damage" - reagent_state = LIQUID - color = "#C8A5DC" // rgb: 200, 165, 220 - overdose = REAGENTS_OVERDOSE - scannable = 1 - - 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) - if(ishuman(M)) - var/mob/living/carbon/human/H = M - var/datum/organ/internal/eyes/E = H.internal_organs_by_name["eyes"] - if(E && istype(E)) - if(E.damage > 0) - E.damage = max(E.damage - 1, 0) - ..() - return - - peridaxon - name = "Peridaxon" - id = "peridaxon" - description = "Used to encourage recovery of internal organs and nervous systems. Medicate cautiously." - reagent_state = LIQUID - color = "#561EC3" // rgb: 200, 165, 220 - overdose = 10 - scannable = 1 - - on_mob_life(var/mob/living/M as mob) - if(!M) M = holder.my_atom - if(ishuman(M)) - var/mob/living/carbon/human/H = M - - //Peridaxon heals only non-robotic organs - for(var/datum/organ/internal/I in H.internal_organs) - if((I.damage > 0) && (I.robotic != 2)) - I.damage = max(I.damage - 0.20, 0) - ..() - return - - bicaridine - name = "Bicaridine" - id = "bicaridine" - description = "Bicaridine is an analgesic medication and can be used to treat blunt trauma." - reagent_state = LIQUID - color = "#BF0000" // rgb: 200, 165, 220 - overdose = REAGENTS_OVERDOSE - scannable = 1 - - on_mob_life(var/mob/living/M as mob, var/alien) - if(M.stat == 2.0) - return - if(!M) M = holder.my_atom - if(alien != IS_DIONA) - M.heal_organ_damage(2*REM,0) - ..() - return - - hyperzine - name = "Hyperzine" - id = "hyperzine" - description = "Hyperzine is a highly effective, long lasting, muscle stimulant." - reagent_state = LIQUID - color = "#FF3300" // rgb: 200, 165, 220 - custom_metabolism = 0.03 - overdose = REAGENTS_OVERDOSE/2 - - 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")) - ..() - return - - adrenaline - name = "Adrenaline" - id = "adrenaline" - description = "Adrenaline is a hormone used as a drug to treat cardiac arrest and other cardiac dysrhythmias resulting in diminished or absent cardiac output." - 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.SetParalysis(0) - M.SetWeakened(0) - M.adjustToxLoss(rand(3)) - ..() - 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 = "#8080FF" // rgb: 200, 165, 220 - scannable = 1 - - on_mob_life(var/mob/living/M as mob) - if(!M) M = holder.my_atom - if(M.bodytemperature < 170) - M.adjustCloneLoss(-1) - M.adjustOxyLoss(-1) - M.heal_organ_damage(1,1) - M.adjustToxLoss(-1) - ..() - return - - clonexadone - name = "Clonexadone" - id = "clonexadone" - description = "A liquid compound similar to that used in the cloning process. Can be used to 'finish' the cloning process when used in conjunction with a cryo tube." - reagent_state = LIQUID - color = "#80BFFF" // rgb: 200, 165, 220 - scannable = 1 - - 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 - - rezadone - name = "Rezadone" - id = "rezadone" - description = "A powder derived from fish toxin, this substance can effectively treat genetic damage in humanoids, though excessive consumption has side effects." - reagent_state = SOLID - color = "#669900" // rgb: 102, 153, 0 - overdose = REAGENTS_OVERDOSE - scannable = 1 - - on_mob_life(var/mob/living/M as mob) - if(!M) M = holder.my_atom - if(!data) data = 1 - data++ - switch(data) - if(1 to 15) - M.adjustCloneLoss(-1) - M.heal_organ_damage(1,1) - if(15 to 35) - M.adjustCloneLoss(-2) - M.heal_organ_damage(2,1) - M.status_flags &= ~DISFIGURED - if(35 to INFINITY) - M.adjustToxLoss(1) - M.make_dizzy(5) - M.make_jittery(5) - - ..() - return - - spaceacillin - name = "Spaceacillin" - id = "spaceacillin" - description = "An all-purpose antiviral agent." - reagent_state = LIQUID - color = "#C1C1C1" // rgb: 200, 165, 220 - custom_metabolism = 0.01 - overdose = REAGENTS_OVERDOSE - scannable = 1 - - on_mob_life(var/mob/living/M as mob) - ..() - 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) - - fluorosurfactant//foam precursor - 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 - - foaming_agent// Metal foaming agent. This is lithium hydride. Add other recipes (e.g. LiH + H2O -> LiOH + H2) eventually. - 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 - - 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 = "Ultra 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 powerful oxidizer that reacts with ethanol." - reagent_state = SOLID - color = "#605048" // rgb: 96, 80, 72 - overdose = REAGENTS_OVERDOSE - - 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 - M.reagents.remove_all_type(/datum/reagent/ethanol, 1*REM, 0, 1) - ..() - return - -//////////////////////////Ground crayons///////////////////// - - - crayon_dust - name = "Crayon dust" - id = "crayon_dust" - description = "Intensely coloured powder obtained by grinding crayons." - reagent_state = LIQUID - color = "#888888" - overdose = 5 - - red - name = "Red crayon dust" - id = "crayon_dust_red" - color = "#FE191A" - - orange - name = "Orange crayon dust" - id = "crayon_dust_orange" - color = "#FFBE4F" - - yellow - name = "Yellow crayon dust" - id = "crayon_dust_yellow" - color = "#FDFE7D" - - green - name = "Green crayon dust" - id = "crayon_dust_green" - color = "#18A31A" - - blue - name = "Blue crayon dust" - id = "crayon_dust_blue" - color = "#247CFF" - - purple - name = "Purple crayon dust" - id = "crayon_dust_purple" - color = "#CC0099" - - grey //Mime - name = "Grey crayon dust" - id = "crayon_dust_grey" - color = "#808080" - - brown //Rainbow - name = "Brown crayon dust" - id = "crayon_dust_brown" - color = "#846F35" - -//////////////////////////Paint////////////////////////////// - - paint - name = "Paint" - id = "paint" - description = "This paint will stick to almost any object." - reagent_state = LIQUID - color = "#808080" - overdose = 15 - - reaction_turf(var/turf/T, var/volume) - ..() - if(istype(T) && !istype(T, /turf/space)) - T.color = color - - reaction_obj(var/obj/O, var/volume) - ..() - if(istype(O,/obj)) - O.color = color - - reaction_mob(var/mob/M, var/method=TOUCH, var/volume) - ..() - if(istype(M,/mob) && !istype(M,/mob/dead)) - //painting ghosts: not allowed - M.color = color - - -//////////////////////////Poison stuff/////////////////////// - - toxin - name = "Toxin" - id = "toxin" - description = "A toxic chemical." - reagent_state = LIQUID - color = "#CF3600" // rgb: 207, 54, 0 - var/toxpwr = 0.7 // Toxins are really weak, but without being treated, last very long. - custom_metabolism = 0.1 - - on_mob_life(var/mob/living/M as mob,var/alien) - if(!M) M = holder.my_atom - if(toxpwr) - M.adjustToxLoss(toxpwr*REM) - if(alien) ..() // Kind of a catch-all for aliens without the liver. Because this does not metabolize 'naturally', only removed by the liver. - return - - toxin/amatoxin - name = "Amatoxin" - id = "amatoxin" - description = "A powerful poison derived from certain species of mushroom." - reagent_state = LIQUID - color = "#792300" // rgb: 121, 35, 0 - toxpwr = 1 - - toxin/mutagen - name = "Unstable mutagen" - id = "mutagen" - description = "Might cause unpredictable mutations. Keep away from children." - reagent_state = LIQUID - color = "#13BC5E" // rgb: 19, 188, 94 - toxpwr = 0 - - reaction_mob(var/mob/living/carbon/M, var/method=TOUCH, var/volume) - if(!..()) return - if(!istype(M) || !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) - M.UpdateAppearance() - return - on_mob_life(var/mob/living/carbon/M) - if(!istype(M)) return - if(!M) M = holder.my_atom - M.apply_effect(10,IRRADIATE,0) - ..() - return - - toxin/phoron - name = "Phoron" - id = "phoron" - description = "Phoron in its liquid form." - reagent_state = LIQUID - color = "#9D14DB" - toxpwr = 3 - - on_mob_life(var/mob/living/M as mob) - if(!M) M = holder.my_atom - holder.remove_reagent("inaprovaline", 2*REM) - ..() - return - reaction_obj(var/obj/O, var/volume) - src = null - /*if(istype(O,/obj/item/weapon/reagent_containers/food/snacks/egg/slime)) - var/obj/item/weapon/reagent_containers/food/snacks/egg/slime/egg = O - if (egg.grown) - egg.Hatch()*/ - if((!O) || (!volume)) return 0 - var/turf/the_turf = get_turf(O) - the_turf.assume_gas("volatile_fuel", volume, T20C) - reaction_turf(var/turf/T, var/volume) - src = null - T.assume_gas("volatile_fuel", volume, T20C) - return - reaction_mob(var/mob/living/M, var/method=TOUCH, var/volume)//Splashing people with plasma is stronger than fuel! - if(!istype(M, /mob/living)) - return - if(method == TOUCH) - M.adjust_fire_stacks(volume / 5) - return - - toxin/lexorin - name = "Lexorin" - id = "lexorin" - description = "Lexorin temporarily stops respiration. Causes tissue damage." - reagent_state = LIQUID - color = "#C8A5DC" // rgb: 200, 165, 220 - toxpwr = 0 - overdose = REAGENTS_OVERDOSE - - 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*REM, 0) - if(M.losebreath < 15) - M.losebreath++ - ..() - return - - toxin/slimejelly - name = "Slime Jelly" - id = "slimejelly" - description = "A gooey semi-liquid produced from one of the deadliest lifeforms in existence. SO REAL." - reagent_state = LIQUID - color = "#801E28" // rgb: 128, 30, 40 - toxpwr = 0 - - on_mob_life(var/mob/living/M as mob) - if(prob(10)) - M << "\red Your insides are burning!" - M.adjustToxLoss(rand(20,60)*REM) - else if(prob(40)) - M.heal_organ_damage(5*REM,0) - ..() - return - - toxin/cyanide //Fast and Lethal - name = "Cyanide" - id = "cyanide" - description = "A highly toxic chemical." - reagent_state = LIQUID - color = "#CF3600" // rgb: 207, 54, 0 - toxpwr = 4 - custom_metabolism = 0.4 - - on_mob_life(var/mob/living/M as mob) - if(!M) M = holder.my_atom - M.adjustOxyLoss(4*REM) - M.sleeping += 1 - ..() - return - - toxin/minttoxin - name = "Mint Toxin" - id = "minttoxin" - description = "Useful for dealing with undesirable customers." - reagent_state = LIQUID - color = "#CF3600" // rgb: 207, 54, 0 - toxpwr = 0 - - on_mob_life(var/mob/living/M as mob) - if(!M) M = holder.my_atom - if (FAT in M.mutations) - M.gib() - ..() - return - - toxin/carpotoxin - name = "Carpotoxin" - id = "carpotoxin" - description = "A deadly neurotoxin produced by the dreaded space carp." - reagent_state = LIQUID - color = "#003333" // rgb: 0, 51, 51 - toxpwr = 2 - - toxin/zombiepowder - name = "Zombie Powder" - id = "zombiepowder" - description = "A strong neurotoxin that puts the subject into a death-like state." - reagent_state = SOLID - color = "#669900" // rgb: 102, 153, 0 - toxpwr = 0.5 - - on_mob_life(var/mob/living/carbon/M as mob) - if(!M) M = holder.my_atom - M.status_flags |= FAKEDEATH - M.adjustOxyLoss(0.5*REM) - 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 - ..() - - toxin/mindbreaker - name = "Mindbreaker Toxin" - id = "mindbreaker" - description = "A powerful hallucinogen, it can cause fatal effects in users." - reagent_state = LIQUID - color = "#B31008" // rgb: 139, 166, 233 - toxpwr = 0 - custom_metabolism = 0.05 - overdose = REAGENTS_OVERDOSE - - on_mob_life(var/mob/living/M) - if(!M) M = holder.my_atom - M.hallucination += 10 - ..() - return - - //Reagents used for plant fertilizers. - toxin/fertilizer - name = "fertilizer" - id = "fertilizer" - description = "A chemical mix good for growing plants with." - reagent_state = LIQUID - toxpwr = 0.2 //It's not THAT poisonous. - color = "#664330" // rgb: 102, 67, 48 - - toxin/fertilizer/eznutrient - name = "EZ Nutrient" - id = "eznutrient" - - toxin/fertilizer/left4zed - name = "Left-4-Zed" - id = "left4zed" - - toxin/fertilizer/robustharvest - name = "Robust Harvest" - id = "robustharvest" - - toxin/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 - toxpwr = 1 - - // Clear off wallrot fungi - reaction_turf(var/turf/T, var/volume) - if(istype(T, /turf/simulated/wall)) - var/turf/simulated/wall/W = T - if(W.rotting) - W.rotting = 0 - for(var/obj/effect/E in W) if(E.name == "Wallrot") del E - - for(var/mob/O in viewers(W, null)) - O.show_message(text("\blue The fungi are completely dissolved by the solution!"), 1) - - 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/plant)) //even a small amount is enough to kill it - del(O) - else if(istype(O,/obj/effect/plant)) + T.wet = 0 + if(T.wet_overlay) + T.overlays -= T.wet_overlay + T.wet_overlay = null + +/datum/reagent/water/touch_obj(var/obj/O) + 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() + +/datum/reagent/water/affect_mob(var/mob/living/carbon/M, var/alien, var/removed, var/location) + if(istype(M, /mob/living/carbon/slime)) + var/mob/living/carbon/slime/S = M + S.adjustToxLoss(15 * removed) // Babies have 150 health, adults have 200; So, 10 units and 13.5 + if(!S.client) + if(S.Target) // Like cats + S.Target = null + ++S.Discipline + if(dose == removed) + S.visible_message("[S]'s flesh sizzles where the water touches it!", "Your flesh burns in the water!") + if(location == CHEM_TOUCH) + var/needed = M.fire_stacks * 10 + if(volume > needed) + M.fire_stacks = 0 + M.ExtinguishMob() + remove_self(needed) + else + M.adjust_fire_stacks(-(volume / 10)) + remove_self(volume) + return + +/datum/reagent/fuel + name = "Welding fuel" + id = "fuel" + description = "Required for welders. Flamable." + reagent_state = LIQUID + color = "#660000" + + glass_icon_state = "dr_gibb_glass" + glass_name = "glass of welder fuel" + glass_desc = "Unless you are an industrial tool, this is probably not safe for consumption." + +/datum/reagent/fuel/touch_turf(var/turf/T) + new /obj/effect/decal/cleanable/liquid_fuel(T, volume) + remove_self(volume) + return + +/datum/reagent/fuel/affect_mob(var/mob/living/carbon/M, var/alien, var/removed, var/location) + if(location == CHEM_INGEST) + M.adjustToxLoss(1 * removed) + return + if(location == CHEM_BLOOD) + M.adjustToxLoss(2 * removed) + return + if(location == CHEM_TOUCH) // Splashing people with welding fuel to make them easy to ignite! + M.adjust_fire_stacks(0.1 * removed) + return + +/* Basic dispenser chemicals */ + +/datum/reagent/aluminum + name = "Aluminum" + id = "aluminum" + description = "A silvery white and ductile member of the boron group of chemical elements." + reagent_state = SOLID + color = "#A8A8A8" + +/datum/reagent/carbon + name = "Carbon" + id = "carbon" + description = "A chemical element, the builing block of life." + reagent_state = SOLID + color = "#1C1300" + +/datum/reagent/carbon/touch_turf(var/turf/T) + if(!istype(T, /turf/space)) + var/obj/effect/decal/cleanable/dirt/dirtoverlay = locate(/obj/effect/decal/cleanable/dirt, T) + if (!dirtoverlay) + dirtoverlay = new/obj/effect/decal/cleanable/dirt(T) + dirtoverlay.alpha = volume * 30 + else + dirtoverlay.alpha = min(dirtoverlay.alpha + volume * 30, 255) + +/datum/reagent/chlorine + name = "Chlorine" + id = "chlorine" + description = "A chemical element with a characteristic odour." + reagent_state = GAS + color = "#808080" + +/datum/reagent/chlorine/affect_mob(var/mob/living/carbon/M, var/alien, var/removed, var/location) + M.take_organ_damage(1*REM, 0) // State doesn't matter here + +/datum/reagent/copper + name = "Copper" + id = "copper" + description = "A highly ductile metal." + color = "#6E3B08" + +/datum/reagent/ethanol + name = "Ethanol" //Parent class for all alcoholic reagents. + id = "ethanol" + description = "A well-known alcohol with a variety of applications." + reagent_state = LIQUID + color = "#404030" + var/nutriment_factor = 0 + var/strength = 10 // This is, essentially, units between stages - the lower, the stronger. Less fine tuning, more clarity. + var/toxicity = 1 + + var/druggy = 0 + var/adj_temp = 0 + var/targ_temp = 310 + var/halluci = 0 + + glass_icon_state = "glass_clear" + glass_name = "glass of ethanol" + glass_desc = "A well-known alcohol with a variety of applications." + +/datum/reagent/ethanol/affect_mob(var/mob/living/carbon/M, var/alien, var/removed, var/location) + if(location == CHEM_TOUCH) + M.adjust_fire_stacks(removed / 15) + return + if(location == CHEM_BLOOD) + M.adjustToxLoss(removed * 2 * toxicity) + return + M.nutrition += nutriment_factor * removed + + var/strength_mod = 1 + if(alien == IS_SKRELL) + strength_mod *= 5 + if(alien == IS_DIONA) + strength_mod = 0 + + M.add_chemical_effect(CE_ALCOHOL, 1) + + if(dose / strength_mod >= strength) // Early warning + M.make_dizzy(6) // It is decreased at the speed of 3 per tick + if(dose / strength_mod >= strength * 2) // Slurring + M.slurring = max(M.slurring, 30) + if(dose / strength_mod >= strength * 3) // Confusion - walking in random directions + M.confused = max(M.confused, 20) + if(dose / strength_mod >= strength * 4) // Blurry vision + M.eye_blurry = max(M.eye_blurry, 10) + if(dose / strength_mod >= strength * 5) // Drowsyness - periodically falling asleep + M.drowsyness = max(M.drowsyness, 20) + if(dose / strength_mod >= strength * 6) // Toxic dose + M.add_chemical_effect(CE_ALCOHOL_TOXIC, toxicity) + if(dose / strength_mod >= strength * 7) // Pass out + M.paralysis = max(M.paralysis, 20) + M.sleeping = max(M.sleeping, 30) + + if(druggy != 0) + M.druggy = max(M.druggy, druggy) + + if(adj_temp > 0 && M.bodytemperature < targ_temp) // 310 is the normal bodytemp. 310.055 + M.bodytemperature = min(targ_temp, M.bodytemperature + (adj_temp * TEMPERATURE_DAMAGE_COEFFICIENT)) + if(adj_temp < 0 && M.bodytemperature > targ_temp) + M.bodytemperature = min(targ_temp, M.bodytemperature - (adj_temp * TEMPERATURE_DAMAGE_COEFFICIENT)) + + if(halluci) + M.hallucination = max(M.hallucination, halluci) + +/datum/reagent/ethanol/touch_obj(var/obj/O) + if(istype(O, /obj/item/weapon/paper)) + var/obj/item/weapon/paper/paperaffected = O + paperaffected.clearpaper() + usr << "The solution dissolves the ink on the paper." + return + if(istype(O, /obj/item/weapon/book)) + if(volume < 5) + return + if(istype(O, /obj/item/weapon/book/tome)) + usr << "The solution does nothing. Whatever this is, it isn't normal ink." + return + var/obj/item/weapon/book/affectedbook = O + affectedbook.dat = null + usr << "The solution dissolves the ink on the book." + return + +/datum/reagent/fluorine + name = "Fluorine" + id = "fluorine" + description = "A highly-reactive chemical element." + reagent_state = GAS + color = "#808080" + +/datum/reagent/fluorine/affect_mob(var/mob/living/carbon/M, var/alien, var/removed, var/location) + M.adjustToxLoss(removed) + +/datum/reagent/hydrogen + name = "Hydrogen" + id = "hydrogen" + description = "A colorless, odorless, nonmetallic, tasteless, highly combustible diatomic gas." + reagent_state = GAS + color = "#808080" + +/datum/reagent/iron + name = "Iron" + id = "iron" + description = "Pure iron is a metal." + reagent_state = SOLID + color = "#353535" + +/datum/reagent/iron/affect_mob(var/mob/living/carbon/M, var/alien, var/removed, var/location) + if(location == CHEM_INGEST && alien != IS_DIONA) + M.add_chemical_effect(CE_BLOODRESTORE, 8 * removed) + +/datum/reagent/lithium + name = "Lithium" + id = "lithium" + description = "A chemical element, used as antidepressant." + reagent_state = SOLID + color = "#808080" + +/datum/reagent/lithium/affect_mob(var/mob/living/carbon/M, var/alien, var/removed, var/location) + if(location != CHEM_TOUCH && alien != IS_DIONA) + if(M.canmove && !M.restrained() && istype(M.loc, /turf/space)) + step(M, pick(cardinal)) + if(prob(5)) + M.emote(pick("twitch", "drool", "moan")) + +/datum/reagent/mercury + name = "Mercury" + id = "mercury" + description = "A chemical element." + reagent_state = LIQUID + color = "#484848" + +/datum/reagent/mercury/affect_mob(var/mob/living/carbon/M, var/alien, var/removed, var/location) + if(location != CHEM_TOUCH && alien != IS_DIONA) + if(M.canmove && !M.restrained() && istype(M.loc, /turf/space)) + step(M, pick(cardinal)) + if(prob(5)) + M.emote(pick("twitch", "drool", "moan")) + M.adjustBrainLoss(2) + +/datum/reagent/nitrogen + name = "Nitrogen" + id = "nitrogen" + description = "A colorless, odorless, tasteless gas." + reagent_state = GAS + color = "#808080" + +/datum/reagent/nitrogen/affect_mob(var/mob/living/carbon/M, var/alien, var/removed, var/location) + if(alien == IS_VOX) + if(location == CHEM_BLOOD) + M.adjustOxyLoss(-removed * 3) + if(location == CHEM_INGEST) + M.reagents.add_reagent(id, removed, CHEM_BLOOD) + +/datum/reagent/oxygen + name = "Oxygen" + id = "oxygen" + description = "A colorless, odorless gas." + reagent_state = GAS + color = "#808080" + +/datum/reagent/oxygen/affect_mob(var/mob/living/carbon/M, var/alien, var/removed, var/location) + if(location == CHEM_TOUCH) + return + if(alien == IS_VOX) + var/effect = (location == CHEM_BLOOD ? 1.5 : 1) + M.adjustToxLoss(removed * 2 * effect) + +/datum/reagent/phosphorus + name = "Phosphorus" + id = "phosphorus" + description = "A chemical element, the backbone of biological energy carriers." + reagent_state = SOLID + color = "#832828" + +/datum/reagent/potassium + name = "Potassium" + id = "potassium" + description = "A soft, low-melting solid that can easily be cut with a knife. Reacts violently with water." + reagent_state = SOLID + color = "#A0A0A0" + +/datum/reagent/radium + name = "Radium" + id = "radium" + description = "Radium is an alkaline earth metal. It is extremely radioactive." + reagent_state = SOLID + color = "#C7C7C7" + +/datum/reagent/radium/affect_mob(var/mob/living/carbon/M, var/alien, var/removed, var/location) + M.apply_effect(10 * removed, IRRADIATE, 0) // Radium may increase your chances to cure a disease + if(location == CHEM_BLOOD) // Make sure to only use it on carbon mobs + if(M.virus2.len) + for(var/ID in M.virus2) + var/datum/disease2/disease/V = M.virus2[ID] + if(prob(5)) + M.antibodies |= V.antigen if(prob(50)) - var/obj/effect/plant/plant = O - plant.die_off() - else if(istype(O,/obj/machinery/portable_atmospherics/hydroponics)) - var/obj/machinery/portable_atmospherics/hydroponics/tray = O + M.radiation += 50 // curing it that way may kill you instead + var/absorbed = 0 + var/datum/organ/internal/diona/nutrients/rad_organ = locate() in M.internal_organs + if(rad_organ && !rad_organ.is_broken()) + absorbed = 1 + if(!absorbed) + M.adjustToxLoss(100) - if(tray.seed) - tray.health -= rand(30,50) - if(tray.pestlevel > 0) - tray.pestlevel -= 2 - if(tray.weedlevel > 0) - tray.weedlevel -= 3 - tray.toxins += 4 - tray.check_level_sanity() - tray.update_icon() +/datum/reagent/radium/touch_turf(var/turf/T) + if(volume >= 3) + if(!istype(T, /turf/space)) + var/obj/effect/decal/cleanable/greenglow/glow = locate(/obj/effect/decal/cleanable/greenglow, T) + if(!glow) + new /obj/effect/decal/cleanable/greenglow(T) + return - 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.species.flags & IS_PLANT) //plantmen take a LOT of damage - H.adjustToxLoss(50) +/datum/reagent/acid + name = "Sulphuric acid" + id = "sacid" + description = "A very corrosive mineral acid with the molecular formula H2SO4." + reagent_state = LIQUID + color = "#DB5008" + metabolism = REM * 2 + touch_met = 50 // It's acid! + var/power = 5 + var/meltdose = 10 // How much is needed to melt - toxin/stoxin - name = "Soporific" - id = "stoxin" - description = "An effective hypnotic used to treat insomnia." - reagent_state = LIQUID - color = "#009CA8" // rgb: 232, 149, 204 - toxpwr = 0 - custom_metabolism = 0.1 - overdose = REAGENTS_OVERDOSE - - on_mob_life(var/mob/living/M as mob) - if(!M) M = holder.my_atom - if(!data) data = 1 - switch(data) - if(1 to 12) - if(prob(5)) M.emote("yawn") - if(12 to 15) - M.eye_blurry = max(M.eye_blurry, 10) - if(15 to 49) - if(prob(50)) - M.Weaken(2) - M.drowsyness = max(M.drowsyness, 20) - if(50 to INFINITY) - M.sleeping = max(M.sleeping, 20) - M.drowsyness = max(M.drowsyness, 60) - data++ - ..() - return - - toxin/chloralhydrate - name = "Chloral Hydrate" - id = "chloralhydrate" - description = "A powerful sedative." - reagent_state = SOLID - color = "#000067" // rgb: 0, 0, 103 - toxpwr = 1 - custom_metabolism = 0.1 //Default 0.2 - overdose = 15 - overdose_dam = 5 - - 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 20) - M.Weaken(30) - M.eye_blurry = max(M.eye_blurry, 10) - if(20 to INFINITY) - M.sleeping = max(M.sleeping, 30) - ..() - return - - toxin/potassium_chloride - name = "Potassium Chloride" - id = "potassium_chloride" - description = "A delicious salt that stops the heart when injected into cardiac muscle." - reagent_state = SOLID - color = "#FFFFFF" // rgb: 255,255,255 - toxpwr = 0 - overdose = 30 - - on_mob_life(var/mob/living/carbon/M as mob) - var/mob/living/carbon/human/H = M - if(H.stat != 1) - if (volume >= overdose) - if(H.losebreath >= 10) - H.losebreath = max(10, H.losebreath-10) - H.adjustOxyLoss(2) - H.Weaken(10) - ..() - return - - toxin/potassium_chlorophoride - name = "Potassium Chlorophoride" - id = "potassium_chlorophoride" - description = "A specific chemical based on Potassium Chloride to stop the heart for surgery. Not safe to eat!" - reagent_state = SOLID - color = "#FFFFFF" // rgb: 255,255,255 - toxpwr = 2 - overdose = 20 - - on_mob_life(var/mob/living/carbon/M as mob) - if(ishuman(M)) - var/mob/living/carbon/human/H = M - if(H.stat != 1) - if(H.losebreath >= 10) - H.losebreath = max(10, M.losebreath-10) - H.adjustOxyLoss(2) - H.Weaken(10) - ..() - return - - toxin/beer2 //disguised as normal beer for use by emagged brobots - name = "Beer" - id = "beer2" - description = "An alcoholic beverage made from malted grains, hops, yeast, and water. The fermentation appears to be incomplete." //If the players manage to analyze this, they deserve to know something is wrong. - reagent_state = LIQUID - color = "#664300" // rgb: 102, 67, 0 - custom_metabolism = 0.15 // Sleep toxins should always be consumed pretty fast - overdose = REAGENTS_OVERDOSE/2 - - glass_icon_state = "beerglass" - glass_name = "glass of beer" - glass_desc = "A freezing pint of beer" - glass_center_of_mass = list("x"=16, "y"=8) - - 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)*REM) - data++ - ..() - return - - toxin/acid - name = "Sulphuric acid" - id = "sacid" - description = "A very corrosive mineral acid with the molecular formula H2SO4." - reagent_state = LIQUID - color = "#DB5008" // rgb: 219, 80, 8 - toxpwr = 1 - var/meltprob = 10 - - on_mob_life(var/mob/living/M as mob) - if(!M) M = holder.my_atom - M.take_organ_damage(0, 1*REM) - ..() - return - - reaction_mob(var/mob/living/M, var/method=TOUCH, var/volume)//magic numbers everywhere - if(!istype(M, /mob/living)) +/datum/reagent/acid/affect_mob(var/mob/living/carbon/M, var/alien, var/removed, var/location) + if(location == CHEM_INGEST) + M.take_organ_damage(0, removed * power) + if(location == CHEM_BLOOD) + M.take_organ_damage(0, removed * power * 2) + if(location == CHEM_TOUCH) // This is the most interesting + if(ishuman(M)) + var/mob/living/carbon/human/H = M + if(H.head) + if(H.head.unacidable) + H << "Your [H.head] protects you from the acid." + remove_self(volume) return - if(method == TOUCH) - if(ishuman(M)) - var/mob/living/carbon/human/H = M + else if(removed > meltdose) + H << "Your [H.head] melts away!" + del(H.head) + H.update_inv_head(1) + H.update_hair(1) + removed -= meltdose + if(removed <= 0) + return - if(H.head) - if(prob(meltprob) && !H.head.unacidable) - H << "Your headgear melts away but protects you from the acid!" - del(H.head) - H.update_inv_head(0) - H.update_hair(0) - else - H << "Your headgear protects you from the acid." - return + if(H.wear_mask) + if(H.wear_mask.unacidable) + H << "Your [H.wear_mask] protects you from the acid." + remove_self(volume) + return + else if(removed > meltdose) + H << "Your [H.wear_mask] melts away!" + del(H.wear_mask) + H.update_inv_wear_mask(1) + H.update_hair(1) + removed -= meltdose + if(removed <= 0) + return - if(H.wear_mask) - if(prob(meltprob) && !H.wear_mask.unacidable) - H << "Your mask melts away but protects you from the acid!" - del (H.wear_mask) - H.update_inv_wear_mask(0) - H.update_hair(0) - else - H << "Your mask protects you from the acid." - return + if(H.glasses) + if(H.glasses.unacidable) + H << "Your [H.glasses] partially protect you from the acid!" + removed /= 2 + else if(removed > meltdose) + H << "Your [H.glasses] melt away!" + del(H.glasses) + H.update_inv_glasses(1) + removed -= meltdose / 2 + if(removed <= 0) + return - if(H.glasses) //Doesn't protect you from the acid but can melt anyways! - if(prob(meltprob) && !H.glasses.unacidable) - H << "Your glasses melts away!" - del (H.glasses) - H.update_inv_glasses(0) - - else if(ismonkey(M)) - var/mob/living/carbon/monkey/MK = M - if(MK.wear_mask) - if(!MK.wear_mask.unacidable) - MK << "Your mask melts away but protects you from the acid!" - del (MK.wear_mask) - MK.update_inv_wear_mask(0) - else - MK << "Your mask protects you from the acid." - return - - if(!M.unacidable) - if(istype(M, /mob/living/carbon/human) && volume >= 10) - var/mob/living/carbon/human/H = M - var/datum/organ/external/affecting = H.get_organ("head") - if(affecting) - if(affecting.take_damage(4*toxpwr, 2*toxpwr)) - H.UpdateDamageIcon() - if(prob(meltprob)) //Applies disfigurement - if (!(H.species && (H.species.flags & NO_PAIN))) - H.emote("scream") - H.status_flags |= DISFIGURED - else - M.take_organ_damage(min(6*toxpwr, volume * toxpwr)) // uses min() and volume to make sure they aren't being sprayed in trace amounts (1 unit != insta rape) -- Doohl + if(ismonkey(M)) + var/mob/living/carbon/monkey/MK = M + if(MK.wear_mask) + if(MK.wear_mask.unacidable) + MK << "Your [MK.wear_mask] protects you from the acid!" + remove_self(volume) + return else - if(!M.unacidable) - M.take_organ_damage(min(6*toxpwr, volume * toxpwr)) - - reaction_obj(var/obj/O, var/volume) - if((istype(O,/obj/item) || istype(O,/obj/effect/plant)) && prob(meltprob * 3)) - 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) - - toxin/acid/polyacid - name = "Polytrinic acid" - id = "pacid" - description = "Polytrinic acid is a an extremely corrosive chemical substance." - reagent_state = LIQUID - color = "#8E18A9" // rgb: 142, 24, 169 - toxpwr = 2 - meltprob = 30 - -/////////////////////////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 - ..() + MK << "Your [MK.wear_mask] melts away!" + del(MK.wear_mask) + MK.update_inv_wear_mask(1) + removed -= meltdose + if(removed <= 0) return - nutriment/protein // Bad for Skrell! - name = "animal protein" - id = "protein" - color = "#440000" + if(volume < meltdose) // Not enough to melt anything + M.take_organ_damage(removed * power * 0.2) + return + if(!M.unacidable && removed > 0) + if(istype(M, /mob/living/carbon/human) && volume >= meltdose) + var/mob/living/carbon/human/H = M + var/datum/organ/external/affecting = H.get_organ("head") + if(affecting) + if(affecting.take_damage(0, removed * power * 0.1)) + H.UpdateDamageIcon() + if(prob(100 * removed / meltdose)) // Applies disfigurement + if (!(H.species && (H.species.flags & NO_PAIN))) + H.emote("scream") + H.status_flags |= DISFIGURED + else + M.take_organ_damage(0, removed * power * 0.1) // Balance. The damage is instant, so it's weaker. 10 units -> 5 damage, double for pacid. 120 units beaker could deal 60, but a) it's burn, which is not as dangerous, b) it's a one-use weapon, c) missing with it will splash it over the ground and d) clothes give some protection, so not everything will hit - on_mob_life(var/mob/living/M, var/alien) - if(alien && alien == IS_SKRELL) - M.adjustToxLoss(0.5) - M.nutrition -= nutriment_factor - ..() +/datum/reagent/acid/touch_obj(var/obj/O) + if(O.unacidable) + return + if((istype(O, /obj/item) || istype(O, /obj/effect/plant)) && (volume > meltdose)) + 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 << "\The [O] melts." + del(O) + remove_self(meltdose) // 10 units of acid will not melt EVERYTHING on the tile - nutriment/egg // Also bad for skrell. Not a child of protein because it might mess up, not sure. - name = "egg yolk" - id = "egg" - color = "#FFFFAA" +/datum/reagent/silicon + name = "Silicon" + id = "silicon" + description = "A tetravalent metalloid, silicon is less reactive than its chemical analog carbon." + reagent_state = SOLID + color = "#A8A8A8" - on_mob_life(var/mob/living/M, var/alien) - if(alien && alien == IS_SKRELL) - M.adjustToxLoss(0.5) - M.nutrition -= nutriment_factor - ..() +/datum/reagent/sodium + name = "Sodium" + id = "sodium" + description = "A chemical element, readily reacts with water." + reagent_state = SOLID + color = "#808080" - 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 - overdose = REAGENTS_OVERDOSE +/datum/reagent/sugar + name = "Sugar" + id = "sugar" + description = "The organic compound commonly known as table sugar and sometimes called saccharose. This white, odorless, crystalline powder has a pleasing, sweet taste." + reagent_state = SOLID + color = "#FFFFFF" + glass_icon_state = "iceglass" + glass_name = "glass of sugar" + glass_desc = "The organic compound commonly known as table sugar and sometimes called saccharose. This white, odorless, crystalline powder has a pleasing, sweet taste." - on_mob_life(var/mob/living/M as mob) - if(!M) M = holder.my_atom - M.nutrition = max(M.nutrition - nutriment_factor, 0) - M.overeatduration = 0 - if(M.nutrition < 0)//Prevent from going into negatives. - M.nutrition = 0 - ..() +/datum/reagent/sugar/affect_mob(var/mob/living/carbon/M, var/alien, var/removed, var/location) + if(location != CHEM_TOUCH) + M.nutrition += removed * 3 + +/datum/reagent/sulfur + name = "Sulfur" + id = "sulfur" + description = "A chemical element with a pungent smell." + reagent_state = SOLID + color = "#BF8C00" + +/datum/reagent/tungsten + name = "Tungsten" + id = "tungsten" + description = "A chemical element, and a strong oxidising agent." + reagent_state = SOLID + color = "#DCDCDC" + +/* General medicine */ + +/datum/reagent/inaprovaline + name = "Inaprovaline" + id = "inaprovaline" + description = "Inaprovaline is a synaptic stimulant and cardiostimulant. Commonly used to stabilize patients." + reagent_state = LIQUID + color = "#00BFFF" + overdose_blood = REAGENTS_OVERDOSE * 2 + overdose_ingest = REAGENTS_OVERDOSE * 4 + metabolism = REM * 0.5 + scannable = 1 + +/datum/reagent/inaprovaline/affect_mob(var/mob/living/carbon/M, var/alien, var/removed, var/location) + if(location == CHEM_TOUCH) + return + if(alien != IS_DIONA) + M.add_chemical_effect(CE_STABLE) + M.add_chemical_effect(CE_PAINKILLER, 25) + +/datum/reagent/bicaridine + name = "Bicaridine" + id = "bicaridine" + description = "Bicaridine is an analgesic medication and can be used to treat blunt trauma." + reagent_state = LIQUID + color = "#BF0000" + overdose_blood = REAGENTS_OVERDOSE + overdose_ingest = REAGENTS_OVERDOSE * 2 + scannable = 1 + +/datum/reagent/bicaridine/affect_mob(var/mob/living/carbon/M, var/alien, var/removed, var/location) + if(location == CHEM_TOUCH) + return + var/effect = (location == CHEM_BLOOD ? 1.5 : 1) + if(alien != IS_DIONA) + M.heal_organ_damage(4 * removed * effect, 0) + +/datum/reagent/kelotane + name = "Kelotane" + id = "kelotane" + description = "Kelotane is a drug used to treat burns." + reagent_state = LIQUID + color = "#FFA800" + overdose_blood = REAGENTS_OVERDOSE + overdose_ingest = REAGENTS_OVERDOSE * 2 + scannable = 1 + +/datum/reagent/kelotane/affect_mob(var/mob/living/carbon/M, var/alien, var/removed, var/location) + if(location == CHEM_TOUCH) + return + var/effect = (location == CHEM_BLOOD ? 1.5 : 1) + if(alien != IS_DIONA) + M.heal_organ_damage(0, 4 * removed * effect) + +/datum/reagent/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 = "#FF8000" + overdose_blood = REAGENTS_OVERDOSE * 0.5 + overdose_ingest = REAGENTS_OVERDOSE + scannable = 1 + +/datum/reagent/dermaline/affect_mob(var/mob/living/carbon/M, var/alien, var/removed, var/location) + if(location == CHEM_TOUCH) + return + var/effect = (location == CHEM_BLOOD ? 1.5 : 1) + if(alien != IS_DIONA) + M.heal_organ_damage(0, 8 * removed * effect) + +/datum/reagent/dylovene + name = "Dylovene" + id = "anti_toxin" + description = "Dylovene is a broad-spectrum antitoxin." + reagent_state = LIQUID + color = "#00A000" + scannable = 1 + +/datum/reagent/dylovene/affect_mob(var/mob/living/carbon/M, var/alien, var/removed, var/location) + if(location == CHEM_TOUCH) + return + var/effect = (location == CHEM_BLOOD ? 1.5 : 1) + if(alien != IS_DIONA) + M.drowsyness = max(0, M.drowsyness - 4 * removed * effect) + M.hallucination = max(0, M.hallucination - 6 * removed * effect) + M.adjustToxLoss(-4 * removed) + +/datum/reagent/dexalin + name = "Dexalin" + id = "dexalin" + description = "Dexalin is used in the treatment of oxygen deprivation." + reagent_state = LIQUID + color = "#0080FF" + overdose_blood = REAGENTS_OVERDOSE + overdose_ingest = REAGENTS_OVERDOSE * 2 + scannable = 1 + +/datum/reagent/dexalin/affect_mob(var/mob/living/carbon/M, var/alien, var/removed, var/location) + if(location == CHEM_TOUCH) + return + var/effect = (location == CHEM_BLOOD ? 1.5 : 1) + if(alien == IS_VOX) + M.adjustToxLoss(removed * 4 * effect) + else if(alien != IS_DIONA) + M.adjustOxyLoss(-10 * removed * effect) + + holder.remove_reagent("lexorin", 2 * removed, location) + +/datum/reagent/dexalinp + name = "Dexalin Plus" + id = "dexalinp" + description = "Dexalin Plus is used in the treatment of oxygen deprivation. It is highly effective." + reagent_state = LIQUID + color = "#0040FF" + overdose_blood = REAGENTS_OVERDOSE * 0.5 + overdose_ingest = REAGENTS_OVERDOSE + scannable = 1 + +/datum/reagent/dexalin/affect_mob(var/mob/living/carbon/M, var/alien, var/removed, var/location) + if(location == CHEM_TOUCH) + return + var/effect = (location == CHEM_BLOOD ? 1.5 : 1) + if(alien == IS_VOX) + M.adjustToxLoss(removed * 6 * effect) + else if(alien != IS_DIONA) + M.adjustOxyLoss(-200 * removed * effect) // So around 20 per tick under standard settings, should be enough + + holder.remove_reagent("lexorin", 3 * removed, location) + +/datum/reagent/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 = "#8040FF" + scannable = 1 + +/datum/reagent/tricordrazine/affect_mob(var/mob/living/carbon/M, var/alien, var/removed, var/location) + if(location == CHEM_TOUCH) + return + var/effect = (location == CHEM_BLOOD ? 1.5 : 1) + if(alien != IS_DIONA) + M.adjustOxyLoss(-4 * removed * effect) + M.heal_organ_damage(2 * removed * effect, 2 * removed * effect) + M.adjustToxLoss(-2 * removed * effect) + +/datum/reagent/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 = "#8080FF" + metabolism = REM * 0.5 + scannable = 1 + +/datum/reagent/cryoxadone/affect_mob(var/mob/living/carbon/M, var/alien, var/removed, var/location) + if(M.bodytemperature < 170) + M.adjustCloneLoss(-10 * removed) + M.adjustOxyLoss(-10 * removed) + M.heal_organ_damage(10 * removed, 10 * removed) + M.adjustToxLoss(-10 * removed) + +/datum/reagent/clonexadone + name = "Clonexadone" + id = "clonexadone" + description = "A liquid compound similar to that used in the cloning process. Can be used to 'finish' the cloning process when used in conjunction with a cryo tube." + reagent_state = LIQUID + color = "#80BFFF" + metabolism = REM * 0.5 + scannable = 1 + +/datum/reagent/cryoxadone/affect_mob(var/mob/living/carbon/M, var/alien, var/removed, var/location) + if(M.bodytemperature < 170) + M.adjustCloneLoss(-30 * removed) + M.adjustOxyLoss(-3 * removed) + M.heal_organ_damage(30 * removed, 30 * removed) + M.adjustToxLoss(-30 * removed) + +/* Painkillers */ + +/datum/reagent/paracetamol + name = "Paracetamol" + id = "paracetamol" + description = "Most probably know this as Tylenol, but this chemical is a mild, simple painkiller." + reagent_state = LIQUID + color = "#C8A5DC" + overdose_blood = 60 + overdose_ingest = 60 + scannable = 1 + metabolism = 0.02 + +/datum/reagent/paracetamol/affect_mob(var/mob/living/carbon/M, var/alien, var/removed, var/location) + M.add_chemical_effect(CE_PAINKILLER, 50) + +/datum/reagent/paracetamol/overdose(var/mob/living/carbon/M, var/alien) + ..() + M.hallucination = max(M.hallucination, 2) + +/datum/reagent/tramadol + name = "Tramadol" + id = "tramadol" + description = "A simple, yet effective painkiller." + reagent_state = LIQUID + color = "#CB68FC" + overdose_blood = 30 + overdose_ingest = 30 + scannable = 1 + metabolism = 0.02 + +/datum/reagent/tramadol/affect_mob(var/mob/living/carbon/M, var/alien, var/removed, var/location) + M.add_chemical_effect(CE_PAINKILLER, 80) + +/datum/reagent/tramadol/overdose(var/mob/living/carbon/M, var/alien) + ..() + M.hallucination = max(M.hallucination, 2) + +/datum/reagent/oxycodone + name = "Oxycodone" + id = "oxycodone" + description = "An effective and very addictive painkiller." + reagent_state = LIQUID + color = "#800080" + overdose_blood = 20 + overdose_ingest = 20 + metabolism = 0.02 + +/datum/reagent/tramadol/affect_mob(var/mob/living/carbon/M, var/alien, var/removed, var/location) + M.add_chemical_effect(CE_PAINKILLER, 200) + +/datum/reagent/tramadol/overdose(var/mob/living/carbon/M, var/alien) + ..() + M.druggy = max(M.druggy, 10) + M.hallucination = max(M.hallucination, 3) + +/* Other medicine */ + +/datum/reagent/synaptizine + name = "Synaptizine" + id = "synaptizine" + description = "Synaptizine is used to treat various diseases." + reagent_state = LIQUID + color = "#99CCFF" + metabolism = REM * 0.05 + overdose_blood = REAGENTS_OVERDOSE + overdose_ingest = REAGENTS_OVERDOSE + scannable = 1 + +/datum/reagent/synaptizine/affect_mob(var/mob/living/carbon/M, var/alien, var/removed, var/location) + if(location == CHEM_TOUCH || alien == IS_DIONA) + return + M.drowsyness = max(M.drowsyness - 5, 0) + M.AdjustParalysis(-1) + M.AdjustStunned(-1) + M.AdjustWeakened(-1) + holder.remove_reagent("mindbreaker", 5) + M.hallucination = max(0, M.hallucination - 10) + M.adjustToxLoss(5 * removed) // It used to be incredibly deadly due to an oversight. Not anymore! + M.add_chemical_effect(CE_PAINKILLER, 40) + +/datum/reagent/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 = "#FFFF66" + metabolism = REM * 0.25 + overdose_blood = REAGENTS_OVERDOSE + overdose_ingest = REAGENTS_OVERDOSE + scannable = 1 + +/datum/reagent/alkysine/affect_mob(var/mob/living/carbon/M, var/alien, var/removed, var/location) + if(location == CHEM_TOUCH || alien == IS_DIONA) + return + M.adjustBrainLoss(-30 * removed) + M.add_chemical_effect(CE_PAINKILLER, 10) + +/datum/reagent/imidazoline + name = "Imidazoline" + id = "imidazoline" + description = "Heals eye damage" + reagent_state = LIQUID + color = "#C8A5DC" + overdose_blood = REAGENTS_OVERDOSE + overdose_ingest = REAGENTS_OVERDOSE + scannable = 1 + +/datum/reagent/imidazoline/affect_mob(var/mob/living/carbon/M, var/alien, var/removed, var/location) + if(location == CHEM_TOUCH) + return + M.eye_blurry = max(M.eye_blurry-5, 0) + M.eye_blind = max(M.eye_blind-5, 0) + if(ishuman(M)) + var/mob/living/carbon/human/H = M + var/datum/organ/internal/eyes/E = H.internal_organs_by_name["eyes"] + if(E && istype(E)) + if(E.damage > 0) + E.damage = max(E.damage - 5 * removed, 0) + +/datum/reagent/peridaxon + name = "Peridaxon" + id = "peridaxon" + description = "Used to encourage recovery of internal organs and nervous systems. Medicate cautiously." + reagent_state = LIQUID + color = "#561EC3" + overdose_blood = 10 + overdose_ingest = 10 + scannable = 1 + +/datum/reagent/peridaxon/affect_mob(var/mob/living/carbon/M, var/alien, var/removed, var/location) + if(location != CHEM_TOUCH && ishuman(M)) + var/mob/living/carbon/human/H = M + + for(var/datum/organ/internal/I in H.internal_organs) + if((I.damage > 0) && (I.robotic != 2)) //Peridaxon heals only non-robotic organs + I.damage = max(I.damage - removed, 0) + +/datum/reagent/ryetalyn + name = "Ryetalyn" + id = "ryetalyn" + description = "Ryetalyn can cure all genetic abnomalities via a catalytic process." + reagent_state = SOLID + color = "#004000" + overdose_blood = REAGENTS_OVERDOSE + overdose_ingest = REAGENTS_OVERDOSE + +/datum/reagent/ryetalyn/affect_mob(var/mob/living/carbon/M, var/alien, var/removed, var/location) + if(location == CHEM_TOUCH) + return + var/needs_update = M.mutations.len > 0 + + M.mutations = list() + M.disabilities = 0 + M.sdisabilities = 0 + + // Might need to update appearance for hulk etc. + if(needs_update && ishuman(M)) + var/mob/living/carbon/human/H = M + H.update_mutations() + +/datum/reagent/hyperzine + name = "Hyperzine" + id = "hyperzine" + description = "Hyperzine is a highly effective, long lasting, muscle stimulant." + reagent_state = LIQUID + color = "#FF3300" + metabolism = REM * 0.15 + overdose_blood = REAGENTS_OVERDOSE * 0.5 + overdose_ingest = REAGENTS_OVERDOSE * 0.5 + +/datum/reagent/hyperzine/affect_mob(var/mob/living/carbon/M, var/alien, var/removed, var/location) + if(location == CHEM_TOUCH || alien == IS_DIONA) + return + if(prob(5)) + M.emote(pick("twitch", "blink_r", "shiver")) + M.add_chemical_effect(CE_SPEEDBOOST, 1) + +/datum/reagent/ethylredoxrazine + name = "Ethylredoxrazine" + id = "ethylredoxrazine" + description = "A powerful oxidizer that reacts with ethanol." + reagent_state = SOLID + color = "#605048" + overdose_blood = REAGENTS_OVERDOSE + overdose_ingest = REAGENTS_OVERDOSE + +/datum/reagent/ethylredoxrazine/affect_mob(var/mob/living/carbon/M, var/alien, var/removed, var/location) + if(location == CHEM_TOUCH || alien == IS_DIONA) + return + M.dizziness = 0 + M.drowsyness = 0 + M.stuttering = 0 + M.confused = 0 + if(M.ingested) + for(var/datum/reagent/R in M.ingested) + if(istype(R, /datum/reagent/ethanol)) + R.dose = max(R.dose - removed * 5, 0) + +/datum/reagent/hyronalin + name = "Hyronalin" + id = "hyronalin" + description = "Hyronalin is a medicinal drug used to counter the effect of radiation poisoning." + reagent_state = LIQUID + color = "#408000" + metabolism = REM * 0.25 + overdose_blood = REAGENTS_OVERDOSE + overdose_ingest = REAGENTS_OVERDOSE + scannable = 1 + +/datum/reagent/hyronalin/affect_mob(var/mob/living/carbon/M, var/alien, var/removed, var/location) + if(location == CHEM_TOUCH) + return + M.radiation = max(M.radiation - 30 * removed, 0) + +/datum/reagent/arithrazine + name = "Arithrazine" + id = "arithrazine" + description = "Arithrazine is an unstable medication used for the most extreme cases of radiation poisoning." + reagent_state = LIQUID + color = "#008000" + metabolism = REM * 0.25 + overdose_blood = REAGENTS_OVERDOSE + overdose_ingest = REAGENTS_OVERDOSE + scannable = 1 + +/datum/reagent/arithrazine/affect_mob(var/mob/living/carbon/M, var/alien, var/removed, var/location) + if(location == CHEM_TOUCH) + return + M.radiation = max(M.radiation - 70 * removed, 0) + M.adjustToxLoss(-10 * removed) + if(prob(60)) + M.take_organ_damage(4 * removed, 0) + +/datum/reagent/spaceacillin + name = "Spaceacillin" + id = "spaceacillin" + description = "An all-purpose antiviral agent." + reagent_state = LIQUID + color = "#C1C1C1" + metabolism = REM * 0.05 + overdose_blood = REAGENTS_OVERDOSE + overdose_ingest = REAGENTS_OVERDOSE * 2 + scannable = 1 + +/datum/reagent/sterilizine + name = "Sterilizine" + id = "sterilizine" + description = "Sterilizes wounds in preparation for surgery." + reagent_state = LIQUID + color = "#C8A5DC" + touch_met = 5 + +/datum/reagent/sterilizine/affect_mob(var/mob/living/carbon/M, var/alien, var/removed, var/location) + if(location == CHEM_TOUCH) + M.germ_level -= min(removed*20, M.germ_level) + +/datum/reagent/sterilizine/touch_obj(var/obj/O) + O.germ_level -= min(volume*20, O.germ_level) + +/datum/reagent/sterilizine/touch_turf(var/turf/T) + T.germ_level -= min(volume*20, T.germ_level) + +/datum/reagent/leporazine + name = "Leporazine" + id = "leporazine" + description = "Leporazine can be use to stabilize an individuals body temperature." + reagent_state = LIQUID + color = "#C8A5DC" + overdose_blood = REAGENTS_OVERDOSE + overdose_ingest = REAGENTS_OVERDOSE + scannable = 1 + +/datum/reagent/leporazine/affect_mob(var/mob/living/carbon/M, var/alien, var/removed, var/location) + if(location == CHEM_TOUCH) + return + if(M.bodytemperature > 310) + M.bodytemperature = max(310, M.bodytemperature - (40 * TEMPERATURE_DAMAGE_COEFFICIENT)) + else if(M.bodytemperature < 311) + M.bodytemperature = min(310, M.bodytemperature + (40 * TEMPERATURE_DAMAGE_COEFFICIENT)) + +/* Antidepressants */ + +#define ANTIDEPRESSANT_MESSAGE_DELAY 5*60*10 + +/datum/reagent/methylphenidate + name = "Methylphenidate" + id = "methylphenidate" + description = "Improves the ability to concentrate." + reagent_state = LIQUID + color = "#BF80BF" + metabolism = 0.01 + data = 0 + +/datum/reagent/methylphenidate/affect_mob(var/mob/living/carbon/M, var/alien, var/removed, var/location) + if(location == CHEM_TOUCH || alien == IS_DIONA) + return + if(volume <= 0.1 && data != -1) + data = -1 + M << "You lose focus..." + else + if(world.time > data + ANTIDEPRESSANT_MESSAGE_DELAY) + data = world.time + M << "Your mind feels focused and undivided." + +/datum/reagent/citalopram + name = "Citalopram" + id = "citalopram" + description = "Stabilizes the mind a little." + reagent_state = LIQUID + color = "#FF80FF" + metabolism = 0.01 + data = 0 + +/datum/reagent/citalopram/affect_mob(var/mob/living/carbon/M, var/alien, var/removed, var/location) + if(location == CHEM_TOUCH || alien == IS_DIONA) + return + if(volume <= 0.1 && data != -1) + data = -1 + M << "Your mind feels a little less stable..." + else + if(world.time > data + ANTIDEPRESSANT_MESSAGE_DELAY) + data = world.time + M << "Your mind feels stable... a little stable." + +/datum/reagent/paroxetine + name = "Paroxetine" + id = "paroxetine" + description = "Stabilizes the mind greatly, but has a chance of adverse effects." + reagent_state = LIQUID + color = "#FF80BF" + metabolism = 0.01 + data = 0 + +/datum/reagent/paroxetine/affect_mob(var/mob/living/carbon/M, var/alien, var/removed, var/location) + if(location == CHEM_TOUCH || alien == IS_DIONA) + return + if(volume <= 0.1 && data != -1) + data = -1 + M << "Your mind feels much less stable..." + else + if(world.time > data + ANTIDEPRESSANT_MESSAGE_DELAY) + data = world.time + if(prob(90)) + M << "Your mind feels much more stable." + else + M << "Your mind breaks apart..." + M.hallucination += 200 + +/* Toxins, poisons, venoms */ + +/datum/reagent/toxin + name = "Toxin" + id = "toxin" + description = "A toxic chemical." + reagent_state = LIQUID + color = "#CF3600" + metabolism = REM * 0.05 // 0.01 by default. They last a while and slowly kill you. + var/strength = 4 // How much damage it deals per unit + +/datum/reagent/toxin/affect_mob(var/mob/living/carbon/M, var/alien, var/removed, var/location) + if(location == CHEM_TOUCH) + return + var/effect = (location == CHEM_BLOOD ? 1.5 : 1) + if(strength && alien != IS_DIONA) + M.adjustToxLoss(strength * removed * effect) + +/datum/reagent/toxin/plasticide + name = "Plasticide" + id = "plasticide" + description = "Liquid plastic, do not eat." + reagent_state = LIQUID + color = "#CF3600" + strength = 5 + +/datum/reagent/toxin/amatoxin + name = "Amatoxin" + id = "amatoxin" + description = "A powerful poison derived from certain species of mushroom." + reagent_state = LIQUID + color = "#792300" + strength = 10 + +/datum/reagent/toxin/carpotoxin + name = "Carpotoxin" + id = "carpotoxin" + description = "A deadly neurotoxin produced by the dreaded space carp." + reagent_state = LIQUID + color = "#003333" + strength = 10 + +/datum/reagent/toxin/phoron + name = "Phoron" + id = "phoron" + description = "Phoron in its liquid form." + reagent_state = LIQUID + color = "#9D14DB" + strength = 30 + +/datum/reagent/toxin/phoron/affect_mob(var/mob/living/carbon/M, var/alien, var/removed, var/location) + ..() + if(location == CHEM_TOUCH) + M.adjust_fire_stacks(removed / 5) + +/datum/reagent/toxin/phoron/touch_turf(var/turf/simulated/T) + if(!istype(T)) + return + T.assume_gas("volatile_fuel", volume, T20C) + remove_self(volume) + +/datum/reagent/toxin/cyanide //Fast and Lethal + name = "Cyanide" + id = "cyanide" + description = "A highly toxic chemical." + reagent_state = LIQUID + color = "#CF3600" + strength = 20 + metabolism = REM * 2 + +/datum/reagent/toxin/cyanide/affect_mob(var/mob/living/carbon/M, var/alien, var/removed, var/location) + ..() + if(location != CHEM_TOUCH) + M.adjustOxyLoss(20 * removed) + M.sleeping += 1 + +/datum/reagent/toxin/potassium_chloride + name = "Potassium Chloride" + id = "potassium_chloride" + description = "A delicious salt that stops the heart when injected into cardiac muscle." + reagent_state = SOLID + color = "#FFFFFF" + strength = 0 + overdose_blood = REAGENTS_OVERDOSE + overdose_ingest = REAGENTS_OVERDOSE + +/datum/reagent/toxin/potassium_chloride/overdose(var/mob/living/carbon/M, var/alien) + ..() + if(ishuman(M)) + var/mob/living/carbon/human/H = M + if(H.stat != 1) + if(H.losebreath >= 10) + H.losebreath = max(10, H.losebreath - 10) + H.adjustOxyLoss(2) + H.Weaken(10) + +/datum/reagent/toxin/potassium_chlorophoride + name = "Potassium Chlorophoride" + id = "potassium_chlorophoride" + description = "A specific chemical based on Potassium Chloride to stop the heart for surgery. Not safe to eat!" + reagent_state = SOLID + color = "#FFFFFF" + strength = 10 + overdose_blood = 20 + overdose_ingest = 20 + +/datum/reagent/toxin/cyanide/affect_mob(var/mob/living/carbon/M, var/alien, var/removed, var/location) + ..() + if(ishuman(M)) + var/mob/living/carbon/human/H = M + if(H.stat != 1) + if(H.losebreath >= 10) + H.losebreath = max(10, M.losebreath-10) + H.adjustOxyLoss(2) + H.Weaken(10) + +/datum/reagent/toxin/zombiepowder + name = "Zombie Powder" + id = "zombiepowder" + description = "A strong neurotoxin that puts the subject into a death-like state." + reagent_state = SOLID + color = "#669900" + metabolism = REM + strength = 3 + +/datum/reagent/toxin/zombiepowder/affect_mob(var/mob/living/carbon/M, var/alien, var/removed, var/location) + ..() + if(location == CHEM_TOUCH || alien == IS_DIONA) + return + M.status_flags |= FAKEDEATH + M.adjustOxyLoss(3 * removed) + M.Weaken(10) + M.silent = max(M.silent, 10) + M.tod = worldtime2text() + +/datum/reagent/toxin/zombiepowder/Del() + if(holder && holder.my_atom && ismob(holder.my_atom)) + var/mob/M = holder.my_atom + M.status_flags &= ~FAKEDEATH + ..() + +/datum/reagent/toxin/fertilizer //Reagents used for plant fertilizers. + name = "fertilizer" + id = "fertilizer" + description = "A chemical mix good for growing plants with." + reagent_state = LIQUID + strength = 0.5 // It's not THAT poisonous. + color = "#664330" + +/datum/reagent/toxin/fertilizer/eznutrient + name = "EZ Nutrient" + id = "eznutrient" + +/datum/reagent/toxin/fertilizer/left4zed + name = "Left-4-Zed" + id = "left4zed" + +/datum/reagent/toxin/fertilizer/robustharvest + name = "Robust Harvest" + id = "robustharvest" + +/datum/reagent/toxin/plantbgone + name = "Plant-B-Gone" + id = "plantbgone" + description = "A harmful toxic mixture to kill plantlife. Do not ingest!" + reagent_state = LIQUID + color = "#49002E" + strength = 4 + +/datum/reagent/toxin/plantbgone/touch_turf(var/turf/T) + if(istype(T, /turf/simulated/wall)) + var/turf/simulated/wall/W = T + if(W.rotting) + W.rotting = 0 + for(var/obj/effect/E in W) + if(E.name == "Wallrot") + del(E) + + W.visible_message("The fungi are completely dissolved by the solution!") + +/datum/reagent/toxin/plantbgone/touch_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) + alien_weeds.healthcheck() + else if(istype(O, /obj/effect/plant)) + del(O) + +/datum/reagent/toxin/plantbgone/affect_mob(var/mob/living/carbon/M, var/alien, var/removed, var/location) + ..() + if(alien == IS_DIONA) // Regardless of the state + M.adjustToxLoss(50 * removed) + +/datum/reagent/acid/polyacid + name = "Polytrinic acid" + id = "pacid" + description = "Polytrinic acid is a an extremely corrosive chemical substance." + reagent_state = LIQUID + color = "#8E18A9" + power = 10 + meltdose = 4 + +/datum/reagent/lexorin + name = "Lexorin" + id = "lexorin" + description = "Lexorin temporarily stops respiration. Causes tissue damage." + reagent_state = LIQUID + color = "#C8A5DC" + overdose_blood = REAGENTS_OVERDOSE + overdose_ingest = REAGENTS_OVERDOSE + +/datum/reagent/lexorin/affect_mob(var/mob/living/carbon/M, var/alien, var/removed, var/location) + if(location == CHEM_TOUCH || alien == IS_DIONA) + return + M.take_organ_damage(3 * removed, 0) + if(M.losebreath < 15) + M.losebreath++ + +/datum/reagent/mutagen + name = "Unstable mutagen" + id = "mutagen" + description = "Might cause unpredictable mutations. Keep away from children." + reagent_state = LIQUID + color = "#13BC5E" + +/datum/reagent/mutagen/affect_mob(var/mob/living/carbon/M, var/alien, var/removed, var/location) + if(M.dna) + var/chance = 0 + if(location == CHEM_TOUCH) + chance = 33 + if(location == CHEM_INGEST) + chance = 67 + if(location == CHEM_BLOOD) + chance = 100 + if(prob(chance * removed * 0.1)) // Approx. one mutation per 10 injected/20 ingested/30 touching units + randmuti(M) + if(prob(98)) + randmutb(M) + else + randmutg(M) + domutcheck(M, null) + M.UpdateAppearance() + M.apply_effect(10 * removed, IRRADIATE, 0) + +/datum/reagent/slimejelly + name = "Slime Jelly" + id = "slimejelly" + description = "A gooey semi-liquid produced from one of the deadliest lifeforms in existence. SO REAL." + reagent_state = LIQUID + color = "#801E28" + +/datum/reagent/slimejelly/affect_mob(var/mob/living/carbon/M, var/alien, var/removed, var/location) + if(location == CHEM_TOUCH || alien == IS_DIONA) + return + if(prob(10)) + M << "Your insides are burning!" + M.adjustToxLoss(rand(100, 300) * removed) + else if(prob(40)) + M.heal_organ_damage(25 * removed, 0) + +/datum/reagent/soporific + name = "Soporific" + id = "stoxin" + description = "An effective hypnotic used to treat insomnia." + reagent_state = LIQUID + color = "#009CA8" + metabolism = REM * 0.5 + overdose_blood = REAGENTS_OVERDOSE + overdose_ingest = REAGENTS_OVERDOSE * 2 + +/datum/reagent/soporific/affect_mob(var/mob/living/carbon/M, var/alien, var/removed, var/location) + if(location == CHEM_TOUCH || alien == IS_DIONA) + return + if(dose < 1) + if(dose == metabolism * 2 || prob(5)) + M.emote("yawn") + else if(dose < 1.5) + M.eye_blurry = max(M.eye_blurry, 10) + else if(dose < 5) + if(prob(50)) + M.Weaken(2) + M.drowsyness = max(M.drowsyness, 20) + else + M.sleeping = max(M.sleeping, 20) + M.drowsyness = max(M.drowsyness, 60) + +/datum/reagent/chloralhydrate + name = "Chloral Hydrate" + id = "chloralhydrate" + description = "A powerful sedative." + reagent_state = SOLID + color = "#000067" + metabolism = REM * 0.5 + overdose_blood = REAGENTS_OVERDOSE * 0.5 + overdose_ingest = REAGENTS_OVERDOSE + +/datum/reagent/chloralhydrate/affect_mob(var/mob/living/carbon/M, var/alien, var/removed, var/location) + if(location == CHEM_TOUCH || alien == IS_DIONA) + return + if(dose == metabolism) + M.confused += 2 + M.drowsyness += 2 + else if(dose < 2) + M.Weaken(30) + M.eye_blurry = max(M.eye_blurry, 10) + else + M.sleeping = max(M.sleeping, 30) + + if(dose > 1) + M.adjustToxLoss(removed) + +/datum/reagent/chloralhydrate/beer2 //disguised as normal beer for use by emagged brobots + name = "Beer" + id = "beer2" + description = "An alcoholic beverage made from malted grains, hops, yeast, and water. The fermentation appears to be incomplete." //If the players manage to analyze this, they deserve to know something is wrong. + reagent_state = LIQUID + color = "#664300" // rgb: 102, 67, 0 + + glass_icon_state = "beerglass" + glass_name = "glass of beer" + glass_desc = "A freezing pint of beer" + glass_center_of_mass = list("x"=16, "y"=8) + +/* Drugs */ + +/datum/reagent/space_drugs + name = "Space drugs" + id = "space_drugs" + description = "An illegal chemical compound used as drug." + reagent_state = LIQUID + color = "#60A584" + metabolism = REM * 0.5 + overdose_blood = REAGENTS_OVERDOSE + overdose_ingest = REAGENTS_OVERDOSE * 2 + +/datum/reagent/space_drugs/affect_mob(var/mob/living/carbon/M, var/alien, var/removed, var/location) + if(location == CHEM_TOUCH || alien == IS_DIONA) + return + M.druggy = max(M.druggy, 15) + if(prob(10) && isturf(M.loc) && !istype(M.loc, /turf/space) && M.canmove && !M.restrained()) + step(M, pick(cardinal)) + if(prob(7)) + M.emote(pick("twitch", "drool", "moan", "giggle")) + +/datum/reagent/serotrotium + name = "Serotrotium" + id = "serotrotium" + description = "A chemical compound that promotes concentrated production of the serotonin neurotransmitter in humans." + reagent_state = LIQUID + color = "#202040" + metabolism = REM * 0.25 + overdose_blood = REAGENTS_OVERDOSE + overdose_ingest = REAGENTS_OVERDOSE + +/datum/reagent/serotrotium/affect_mob(var/mob/living/carbon/M, var/alien, var/removed, var/location) + if(location == CHEM_TOUCH || alien == IS_DIONA) + return + if(prob(7)) + M.emote(pick("twitch", "drool", "moan", "gasp")) + return + +/datum/reagent/cryptobiolin + name = "Cryptobiolin" + id = "cryptobiolin" + description = "Cryptobiolin causes confusion and dizzyness." + reagent_state = LIQUID + color = "#000055" + metabolism = REM * 0.5 + overdose_blood = REAGENTS_OVERDOSE + overdose_ingest = REAGENTS_OVERDOSE + +/datum/reagent/cryptobiolin/affect_mob(var/mob/living/carbon/M, var/alien, var/removed, var/location) + if(location == CHEM_TOUCH || alien == IS_DIONA) + return + M.make_dizzy(4) + M.confused = max(M.confused, 20) + +/datum/reagent/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" + overdose_blood = REAGENTS_OVERDOSE + overdose_ingest = REAGENTS_OVERDOSE + +/datum/reagent/impedrezene/affect_mob(var/mob/living/carbon/M, var/alien, var/removed, var/location) + if(location == CHEM_TOUCH || alien == IS_DIONA) + return + M.jitteriness = max(M.jitteriness - 5, 0) + if(prob(80)) + M.adjustBrainLoss(3 * removed) + if(prob(50)) + M.drowsyness = max(M.drowsyness, 3) + if(prob(10)) + M.emote("drool") + +/datum/reagent/mindbreaker + name = "Mindbreaker Toxin" + id = "mindbreaker" + description = "A powerful hallucinogen, it can cause fatal effects in users." + reagent_state = LIQUID + color = "#B31008" + metabolism = REM * 0.25 + overdose_blood = REAGENTS_OVERDOSE + overdose_ingest = REAGENTS_OVERDOSE + +/datum/reagent/mindbreaker/affect_mob(var/mob/living/carbon/M, var/alien, var/removed, var/location) + if(location == CHEM_TOUCH || alien == IS_DIONA) + return + M.hallucination = max(M.hallucination, 100) + +/datum/reagent/psilocybin + name = "Psilocybin" + id = "psilocybin" + description = "A strong psycotropic derived from certain species of mushroom." + color = "#E700E7" + overdose_blood = REAGENTS_OVERDOSE + overdose_ingest = REAGENTS_OVERDOSE + metabolism = REM * 0.5 + +/datum/reagent/psilocybin/affect_mob(var/mob/living/carbon/M, var/alien, var/removed, var/location) + if(location == CHEM_TOUCH || alien == IS_DIONA) + return + M.druggy = max(M.druggy, 30) + if(dose < 1) + M.stuttering = max(M.stuttering, 3) + M.make_dizzy(5) + if(prob(10)) + M.emote(pick("twitch", "giggle")) + else if(dose < 2) + M.stuttering = max(M.stuttering, 3) + M.make_jittery(10) + M.make_dizzy(10) + M.druggy = max(M.druggy, 35) + if(prob(20)) + M.emote(pick("twitch","giggle")) + else + M.stuttering = max(M.stuttering, 3) + M.make_jittery(20) + M.make_dizzy(20) + M.druggy = max(M.druggy, 40) + if(prob(30)) + M.emote(pick("twitch", "giggle")) + +/datum/reagent/nicotine + name = "Nicotine" + id = "nicotine" + description = "A highly addictive stimulant extracted from the tobacco plant." + reagent_state = LIQUID + color = "#181818" + +/* Transformations */ + +/datum/reagent/slimetoxin + name = "Mutation Toxin" + id = "mutationtoxin" + description = "A corruptive toxin produced by slimes." + reagent_state = LIQUID + color = "#13BC5E" + +/datum/reagent/slimetoxin/affect_mob(var/mob/living/carbon/M, var/alien, var/removed, var/location) + if(location == CHEM_BLOOD && ishuman(M)) + var/mob/living/carbon/human/H = M + if(H.species.name != "Slime") + M << "Your flesh rapidly mutates!" + H.set_species("Slime") + +/datum/reagent/aslimetoxin + name = "Advanced Mutation Toxin" + id = "amutationtoxin" + description = "An advanced corruptive toxin produced by slimes." + reagent_state = LIQUID + color = "#13BC5E" + +/datum/reagent/aslimetoxin/affect_mob(var/mob/living/carbon/M, var/alien, var/removed, var/location) // TODO: check if there's similar code anywhere else + if(location != CHEM_BLOOD || M.monkeyizing) + return + M << "Your flesh rapidly mutates!" + M.monkeyizing = 1 + M.canmove = 0 + M.icon = null + M.overlays.Cut() + M.invisibility = 101 + for(var/obj/item/W in M) + if(istype(W, /obj/item/weapon/implant)) //TODO: Carn. give implants a dropped() or something + del(W) + continue + W.layer = initial(W.layer) + W.loc = M.loc + W.dropped(M) + var/mob/living/carbon/slime/new_mob = new /mob/living/carbon/slime(M.loc) + new_mob.a_intent = "hurt" + new_mob.universal_speak = 1 + if(M.mind) + M.mind.transfer_to(new_mob) + else + new_mob.key = M.key + del(M) + +/datum/reagent/nanites + name = "Nanomachines" + id = "nanites" + description = "Microscopic construction robots." + reagent_state = LIQUID + color = "#535E66" + +/datum/reagent/nanites/affect_mob(var/mob/living/carbon/M, var/alien, var/removed, var/location) + if(location != CHEM_TOUCH || prob(10)) + M.contract_disease(new /datum/disease/robotic_transformation(0), 1) + +/datum/reagent/xenomicrobes + name = "Xenomicrobes" + id = "xenomicrobes" + description = "Microbes with an entirely alien cellular structure." + reagent_state = LIQUID + color = "#535E66" + +/datum/reagent/nanites/affect_mob(var/mob/living/carbon/M, var/alien, var/removed, var/location) + if(location != CHEM_TOUCH || prob(10)) + M.contract_disease(new /datum/disease/xeno_transformation(0), 1) + +/* Food */ + +/datum/reagent/nutriment + name = "Nutriment" + id = "nutriment" + description = "All the vitamins, minerals, and carbohydrates the body needs in pure form." + reagent_state = SOLID + metabolism = REM * 4 + var/nutriment_factor = 30 // Per unit + var/injectable = 0 + color = "#664330" + +/datum/reagent/nutriment/affect_mob(var/mob/living/carbon/M, var/alien, var/removed, var/location) + if(location == CHEM_TOUCH) + return + if(location == CHEM_BLOOD && !injectable) + M.adjustToxLoss(0.1 * removed) + return + M.heal_organ_damage(0.5 * removed, 0) + M.nutrition += nutriment_factor * removed // For hunger and fatness + M.add_chemical_effect(CE_BLOODRESTORE, 4 * removed) + +/datum/reagent/nutriment/protein // Bad for Skrell! + name = "animal protein" + id = "protein" + color = "#440000" + +/datum/reagent/nutriment/protein/affect_mob(var/mob/living/carbon/M, var/alien, var/removed, var/location) + if(alien && alien == IS_SKRELL) + M.adjustToxLoss(0.5 * removed) + return + ..() + +/datum/reagent/nutriment/egg // Also bad for skrell. Not a child of protein because it might mess up, not sure. + name = "egg yolk" + id = "egg" + color = "#FFFFAA" + +/datum/reagent/nutriment/egg/affect_mob(var/mob/living/carbon/M, var/alien, var/removed, var/location) + if(alien && alien == IS_SKRELL) + M.adjustToxLoss(0.5) + return + ..() + +/datum/reagent/nutriment/flour + name = "flour" + id = "flour" + description = "This is what you rub all over yourself to pretend to be a ghost." + reagent_state = SOLID + nutriment_factor = 1 + color = "#FFFFFF" + +/datum/reagent/nutriment/flour/touch_turf(var/turf/simulated/T) + if(!istype(T, /turf/space)) + new /obj/effect/decal/cleanable/flour(T) + +/datum/reagent/nutriment/coco + name = "Coco Powder" + id = "coco" + description = "A fatty, bitter paste made from coco beans." + reagent_state = SOLID + nutriment_factor = 5 + color = "#302000" + +/datum/reagent/nutriment/soysauce + name = "Soysauce" + id = "soysauce" + description = "A salty sauce made from the soy plant." + reagent_state = LIQUID + nutriment_factor = 2 + color = "#792300" + +/datum/reagent/nutriment/ketchup + name = "Ketchup" + id = "ketchup" + description = "Ketchup, catsup, whatever. It's tomato paste." + reagent_state = LIQUID + nutriment_factor = 5 + color = "#731008" + +/datum/reagent/nutriment/rice + name = "Rice" + id = "rice" + description = "Enjoy the great taste of nothing." + reagent_state = SOLID + nutriment_factor = 1 + color = "#FFFFFF" + +/datum/reagent/nutriment/cherryjelly + name = "Cherry Jelly" + id = "cherryjelly" + description = "Totally the best. Only to be spread on foods with excellent lateral symmetry." + reagent_state = LIQUID + nutriment_factor = 1 + color = "#801E28" + +/datum/reagent/nutriment/cornoil + name = "Corn Oil" + id = "cornoil" + description = "An oil derived from various types of corn." + reagent_state = LIQUID + nutriment_factor = 20 + color = "#302000" + +/datum/reagent/nutriment/cornoil/touch_turf(var/turf/simulated/T) + if(!istype(T)) + return + + var/hotspot = (locate(/obj/fire) 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(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) // This is terrible and needs to be changed when possible. + if(!T || !istype(T)) 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 - if(ishuman(M)) - var/mob/living/carbon/human/H = M - if(H.species && !(H.species.flags & (NO_PAIN | IS_SYNTHETIC)) ) - switch(data) - if(1 to 2) - H << "\red Your insides feel uncomfortably hot !" - if(2 to 20) - if(prob(5)) - H << "\red Your insides feel uncomfortably hot !" - if(20 to INFINITY) - H.apply_effect(2,AGONY,0) - if(prob(5)) - H.visible_message("[H] [pick("dry heaves!","coughs!","splutters!")]") - H << "\red You feel like your insides are burning !" - else if(istype(M, /mob/living/carbon/slime)) - M.bodytemperature += rand(10,25) - holder.remove_reagent("frostoil", 5) - holder.remove_reagent(src.id, FOOD_METABOLISM) - data++ - ..() + if(T.wet >= 2) return + T.wet = 0 + if(T.wet_overlay) + T.overlays -= T.wet_overlay + T.wet_overlay = null - condensedcapsaicin - name = "Condensed Capsaicin" - id = "condensedcapsaicin" - description = "A chemical agent used for self-defense and in police work." - reagent_state = LIQUID - color = "#B31008" // rgb: 179, 16, 8 +/datum/reagent/nutriment/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 + color = "#899613" - 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 ( eyes_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, 15) - victim.eye_blind = max(M.eye_blind, 5) - victim.Stun(5) - victim.Weaken(5) - //victim.Paralyse(10) - //victim.drop_item() - return - else if ( mouth_covered ) // Mouth cover is better than eye cover - victim << "\red Your [safe_thing] protects your face from the pepperspray!" - if (!(victim.species && (victim.species.flags & NO_PAIN))) - victim.emote("scream") - victim.eye_blurry = max(M.eye_blurry, 5) - return - else // Oh dear :D - if (!(victim.species && (victim.species.flags & NO_PAIN))) - victim.emote("scream") - victim << "\red You're sprayed directly in the eyes with pepperspray!" - victim.eye_blurry = max(M.eye_blurry, 25) - victim.eye_blind = max(M.eye_blind, 10) - victim.Stun(5) - victim.Weaken(5) - //victim.Paralyse(10) - //victim.drop_item() +/datum/reagent/nutriment/sprinkles + name = "Sprinkles" + id = "sprinkles" + description = "Multi-colored little bits of sugar, commonly found on donuts. Loved by cops." + nutriment_factor = 1 + color = "#FF00FF" - on_mob_life(var/mob/living/M as mob) - if(!M) - M = holder.my_atom - if(!data) - data = 1 - if(ishuman(M)) - var/mob/living/carbon/human/H = M - if(H.species && !(H.species.flags & (NO_PAIN | IS_SYNTHETIC)) ) - switch(data) - if(1) - H << "\red You feel like your insides are burning !" - if(2 to INFINITY) - H.apply_effect(4,AGONY,0) - if(prob(5)) - H.visible_message("[H] [pick("dry heaves!","coughs!","splutters!")]") - H << "\red You feel like your insides are burning !" - else if(istype(M, /mob/living/carbon/slime)) - M.bodytemperature += rand(15,30) - holder.remove_reagent("frostoil", 5) - holder.remove_reagent(src.id, FOOD_METABOLISM) - data++ - ..() +/datum/reagent/nutriment/mint + name = "Mint" + id = "mint" + description = "Also known as Mentha." + reagent_state = LIQUID + color = "#CF3600" + +/datum/reagent/lipozine // The anti-nutriment. + name = "Lipozine" + id = "lipozine" + description = "A chemical compound that causes a powerful fat-burning reaction." + reagent_state = LIQUID + color = "#BBEDA4" + overdose_blood = REAGENTS_OVERDOSE + overdose_ingest = REAGENTS_OVERDOSE + +/datum/reagent/lipozine/affect_mob(var/mob/living/carbon/M, var/alien, var/removed, var/location) + if(location == CHEM_TOUCH) + return + M.nutrition = max(M.nutrition - 10 * removed, 0) + M.overeatduration = 0 + if(M.nutrition < 0) + M.nutrition = 0 + +/* Non-food stuff like condiments */ + +/datum/reagent/sodiumchloride + name = "Table Salt" + id = "sodiumchloride" + description = "A salt made of sodium chloride. Commonly used to season food." + reagent_state = SOLID + color = "#FFFFFF" + overdose_blood = REAGENTS_OVERDOSE + overdose_ingest = REAGENTS_OVERDOSE + +/datum/reagent/blackpepper + name = "Black Pepper" + id = "blackpepper" + description = "A powder ground from peppercorns. *AAAACHOOO*" + reagent_state = SOLID + color = "#000000" + +/datum/reagent/enzyme + name = "Universal Enzyme" + id = "enzyme" + description = "A universal enzyme used in the preperation of certain chemicals and foods." + reagent_state = LIQUID + color = "#365E30" + overdose_blood = REAGENTS_OVERDOSE + overdose_ingest = REAGENTS_OVERDOSE + +/datum/reagent/frostoil + name = "Frost Oil" + id = "frostoil" + description = "A special oil that noticably chills the body. Extracted from Ice Peppers." + reagent_state = LIQUID + color = "#B31008" + +/datum/reagent/frostoil/affect_mob(var/mob/living/carbon/M, var/alien, var/removed, var/location) + if(location == CHEM_TOUCH || alien == IS_DIONA) + return + M.bodytemperature = max(M.bodytemperature - 10 * TEMPERATURE_DAMAGE_COEFFICIENT, 0) + if(prob(1)) + M.emote("shiver") + if(istype(M, /mob/living/carbon/slime)) + M.bodytemperature = max(M.bodytemperature - rand(10,20), 0) + holder.remove_reagent("capsaicin", 5) + +/datum/reagent/capsaicin + name = "Capsaicin Oil" + id = "capsaicin" + description = "This is what makes chilis hot." + reagent_state = LIQUID + color = "#B31008" + +/datum/reagent/capsaicin/affect_mob(var/mob/living/carbon/M, var/alien, var/removed, var/location) + if(location == CHEM_TOUCH || alien == IS_DIONA) + return + if(ishuman(M)) + var/mob/living/carbon/human/H = M + if(H.species && (H.species.flags & (NO_PAIN | IS_SYNTHETIC))) + return + if(dose < 5 && (dose == metabolism || prob(5))) + M << "Your insides feel uncomfortably hot!" + if(dose >= 5) + M.apply_effect(2, AGONY, 0) + if(prob(5)) + M.visible_message("[M] [pick("dry heaves!","coughs!","splutters!")]", "You feel like your insides are burning!") + if(istype(M, /mob/living/carbon/slime)) + M.bodytemperature += rand(10, 25) + holder.remove_reagent("frostoil", 5) + +/datum/reagent/condensedcapsaicin + name = "Condensed Capsaicin" + id = "condensedcapsaicin" + description = "A chemical agent used for self-defense and in police work." + reagent_state = LIQUID + touch_met = 50 // Get rid of it quickly + color = "#B31008" + +/datum/reagent/condensedcapsaicin/affect_mob(var/mob/living/carbon/M, var/alien, var/removed, var/location) + if(location == CHEM_TOUCH) + var/eyes_covered = 0 + var/mouth_covered = 0 + var/obj/item/safe_thing = null + if(istype(M, /mob/living/carbon/human)) + var/mob/living/carbon/human/H = M + if(H.species && (H.species.flags & NO_PAIN)) return - - frostoil - name = "Frost Oil" - id = "frostoil" - description = "A special oil that noticably chills the body. Extracted from Ice Peppers." - reagent_state = LIQUID - color = "#B31008" // rgb: 139, 166, 233 - - on_mob_life(var/mob/living/M as mob) - if(!M) - M = holder.my_atom - M.bodytemperature = max(M.bodytemperature - 10 * TEMPERATURE_DAMAGE_COEFFICIENT, 0) - if(prob(1)) - M.emote("shiver") - if(istype(M, /mob/living/carbon/slime)) - M.bodytemperature = max(M.bodytemperature - rand(10,20), 0) - holder.remove_reagent("capsaicin", 5) - holder.remove_reagent(src.id, FOOD_METABOLISM) - ..() + if(H.head) + if(H.head.flags & MASKCOVERSEYES) + eyes_covered = 1 + safe_thing = H.head + if(H.head.flags & MASKCOVERSMOUTH) + mouth_covered = 1 + safe_thing = H.head + if(H.wear_mask) + if(!eyes_covered && H.wear_mask.flags & MASKCOVERSEYES) + eyes_covered = 1 + safe_thing = H.wear_mask + if(!mouth_covered && H.wear_mask.flags & MASKCOVERSMOUTH) + mouth_covered = 1 + safe_thing = H.wear_mask + if(H.glasses) + if(!eyes_covered) + eyes_covered = 1 + if(!safe_thing) + safe_thing = H.glasses + if(eyes_covered && mouth_covered) + M << "Your [safe_thing] protects you from the pepperspray!" + return + else if(eyes_covered) + M << "Your [safe_thing] protect you from most of the pepperspray!" + M.eye_blurry = max(M.eye_blurry, 15) + M.eye_blind = max(M.eye_blind, 5) + M.Stun(5) + M.Weaken(5) + return + else if (mouth_covered) // Mouth cover is better than eye cover + M << "Your [safe_thing] protects your face from the pepperspray!" + M.eye_blurry = max(M.eye_blurry, 5) + return + else // Oh dear :D + M << "You're sprayed directly in the eyes with pepperspray!" + M.eye_blurry = max(M.eye_blurry, 25) + M.eye_blind = max(M.eye_blind, 10) + M.Stun(5) + M.Weaken(5) + return + else + if(ishuman(M)) + var/mob/living/carbon/human/H = M + if(H.species && (H.species.flags & (NO_PAIN | IS_SYNTHETIC))) return + if(dose == metabolism) + M << "You feel like your insides are burning!" + else + M.apply_effect(4, AGONY, 0) + if(prob(5)) + M.visible_message("[M] [pick("dry heaves!","coughs!","splutters!")]", "You feel like your insides are burning!") + if(istype(M, /mob/living/carbon/slime)) + M.bodytemperature += rand(15, 30) + holder.remove_reagent("frostoil", 5) - reaction_turf(var/turf/simulated/T, var/volume) - for(var/mob/living/carbon/slime/M in T) - M.adjustToxLoss(rand(15,30)) +/* Drinks */ - sodiumchloride - name = "Table Salt" - id = "sodiumchloride" - description = "A salt made of sodium chloride. Commonly used to season food." - reagent_state = SOLID - color = "#FFFFFF" // rgb: 255,255,255 - overdose = REAGENTS_OVERDOSE +/datum/reagent/drink + name = "Drink" + id = "drink" + description = "Uh, some kind of drink." + reagent_state = LIQUID + color = "#E78108" + var/nutrition = 0 // Per unit + var/adj_dizzy = 0 // Per tick + var/adj_drowsy = 0 + var/adj_sleepy = 0 + var/adj_temp = 0 - blackpepper - name = "Black Pepper" - id = "blackpepper" - description = "A powder ground from peppercorns. *AAAACHOOO*" - reagent_state = SOLID - // no color (ie, black) +/datum/reagent/drink/affect_mob(var/mob/living/carbon/M, var/alien, var/removed, var/location) + if(location == CHEM_BLOOD) + M.adjustToxLoss(removed) // Probably not a good idea; not very deadly though + return + if(location == CHEM_INGEST) + M.nutrition += nutrition * removed + M.dizziness = max(0, M.dizziness + adj_dizzy) + M.drowsyness = max(0, M.drowsyness + adj_drowsy) + M.sleeping = max(0, M.sleeping + adj_sleepy) + if(adj_temp > 0 && M.bodytemperature < 310) // 310 is the normal bodytemp. 310.055 + M.bodytemperature = min(310, M.bodytemperature + (adj_temp * TEMPERATURE_DAMAGE_COEFFICIENT)) + if(adj_temp < 0 && M.bodytemperature > 310) + M.bodytemperature = min(310, M.bodytemperature - (adj_temp * TEMPERATURE_DAMAGE_COEFFICIENT)) - 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 +// Juices - on_mob_life(var/mob/living/M as mob) - M.nutrition += nutriment_factor - ..() +/datum/reagent/drink/banana + name = "Banana Juice" + id = "banana" + description = "The raw essence of a banana." + color = "#C3AF00" + + glass_icon_state = "banana" + glass_name = "glass of banana juice" + glass_desc = "The raw essence of a banana. HONK!" + +/datum/reagent/drink/berryjuice + name = "Berry Juice" + id = "berryjuice" + description = "A delicious blend of several different kinds of berries." + color = "#990066" + + glass_icon_state = "berryjuice" + glass_name = "glass of berry juice" + glass_desc = "Berry juice. Or maybe it's jam. Who cares?" + +/datum/reagent/drink/carrotjuice + name = "Carrot juice" + id = "carrotjuice" + description = "It is just like a carrot but without crunching." + color = "#FF8C00" // rgb: 255, 140, 0 + + glass_icon_state = "carrotjuice" + glass_name = "glass of carrot juice" + glass_desc = "It is just like a carrot but without crunching." + +/datum/reagent/drink/carrotjuice/affect_mob(var/mob/living/carbon/M, var/alien, var/removed, var/location) + ..() + if(location == CHEM_INGEST) + M.reagents.add_reagent("imidazoline", removed * 0.2) + +/datum/reagent/drink/grapejuice + name = "Grape Juice" + id = "grapejuice" + description = "It's grrrrrape!" + color = "#863333" + + glass_icon_state = "grapejuice" + glass_name = "glass of grape juice" + glass_desc = "It's grrrrrape!" + +/datum/reagent/drink/lemonjuice + name = "Lemon Juice" + id = "lemonjuice" + description = "This juice is VERY sour." + color = "#AFAF00" + + glass_icon_state = "lemonjuice" + glass_name = "glass of lemon juice" + glass_desc = "Sour..." + +/datum/reagent/drink/limejuice + name = "Lime Juice" + id = "limejuice" + description = "The sweet-sour juice of limes." + color = "#365E30" + + glass_icon_state = "glass_green" + glass_name = "glass of lime juice" + glass_desc = "A glass of sweet-sour lime juice" + +/datum/reagent/drink/limejuice/affect_mob(var/mob/living/carbon/M, var/alien, var/removed, var/location) + ..() + if(location == CHEM_TOUCH || location == CHEM_BLOOD || alien == IS_DIONA) + return + M.adjustToxLoss(-0.5 * removed) + +/datum/reagent/drink/orangejuice + name = "Orange juice" + id = "orangejuice" + description = "Both delicious AND rich in Vitamin C, what more do you need?" + color = "#E78108" + + glass_icon_state = "glass_orange" + glass_name = "glass of orange juice" + glass_desc = "Vitamins! Yay!" + +/datum/reagent/drink/orangejuice/affect_mob(var/mob/living/carbon/M, var/alien, var/removed, var/location) + ..() + if(location == CHEM_TOUCH || location == CHEM_BLOOD || alien == IS_DIONA) + return + M.adjustOxyLoss(-2 * removed) + +/datum/reagent/toxin/poisonberryjuice // It has more in common with toxins than drinks... but it's a juice + name = "Poison Berry Juice" + id = "poisonberryjuice" + description = "A tasty juice blended from various kinds of very deadly and toxic berries." + color = "#863353" + strength = 5 + + glass_icon_state = "poisonberryjuice" + glass_name = "glass of poison berry juice" + glass_desc = "A glass of deadly juice." + +/datum/reagent/drink/potato_juice + name = "Potato Juice" + id = "potato" + description = "Juice of the potato. Bleh." + nutrition = 2 + color = "#302000" + + glass_icon_state = "glass_brown" + glass_name = "glass of potato juice" + glass_desc = "Juice from a potato. Bleh." + +/datum/reagent/drink/tomatojuice + name = "Tomato Juice" + id = "tomatojuice" + description = "Tomatoes made into juice. What a waste of big, juicy tomatoes, huh?" + color = "#731008" + + glass_icon_state = "glass_red" + glass_name = "glass of tomato juice" + glass_desc = "Are you sure this is tomato juice?" + +/datum/reagent/drink/tomatojuice/affect_mob(var/mob/living/carbon/M, var/alien, var/removed, var/location) + ..() + if(location == CHEM_TOUCH || location == CHEM_BLOOD || alien == IS_DIONA) + return + M.heal_organ_damage(0, 0.5 * removed) + +/datum/reagent/drink/watermelonjuice + name = "Watermelon Juice" + id = "watermelonjuice" + description = "Delicious juice made from watermelon." + color = "#B83333" + + glass_icon_state = "glass_red" + glass_name = "glass of watermelon juice" + glass_desc = "Delicious juice made from watermelon." + +// Everything else + +/datum/reagent/drink/milk + name = "Milk" + id = "milk" + description = "An opaque white liquid produced by the mammary glands of mammals." + color = "#DFDFDF" + + glass_icon_state = "glass_white" + glass_name = "glass of milk" + glass_desc = "White and nutritious goodness!" + +/datum/reagent/drink/milk/affect_mob(var/mob/living/carbon/M, var/alien, var/removed, var/location) + ..() + if(location == CHEM_TOUCH || location == CHEM_BLOOD || alien == IS_DIONA) + return + M.heal_organ_damage(0.5 * removed, 0) + holder.remove_reagent("capsaicin", 10 * removed) + +/datum/reagent/drink/milk/cream + name = "Cream" + id = "cream" + description = "The fatty, still liquid part of milk. Why don't you mix this with sum scotch, eh?" + color = "#DFD7AF" + + glass_icon_state = "glass_white" + glass_name = "glass of cream" + glass_desc = "Ewwww..." + +/datum/reagent/drink/milk/soymilk + name = "Soy Milk" + id = "soymilk" + description = "An opaque white liquid made from soybeans." + color = "#DFDFC7" + + glass_icon_state = "glass_white" + glass_name = "glass of soy milk" + glass_desc = "White and nutritious soy goodness!" + +/datum/reagent/drink/tea + name = "Tea" + id = "tea" + description = "Tasty black tea, it has antioxidants, it's good for you!" + color = "#101000" + adj_dizzy = -2 + adj_drowsy = -1 + adj_sleepy = -3 + adj_temp = 20 + + glass_icon_state = "bigteacup" + glass_name = "cup of tea" + glass_desc = "Tasty black tea, it has antioxidants, it's good for you!" + +/datum/reagent/drink/tea/affect_mob(var/mob/living/carbon/M, var/alien, var/removed, var/location) + ..() + if(location == CHEM_TOUCH || location == CHEM_BLOOD || alien == IS_DIONA) + return + M.adjustToxLoss(-0.5 * removed) + +/datum/reagent/drink/tea/icetea + name = "Iced Tea" + id = "icetea" + description = "No relation to a certain rap artist/ actor." + color = "#104038" // rgb: 16, 64, 56 + adj_temp = -5 + + glass_icon_state = "icedteaglass" + glass_name = "glass of iced tea" + glass_desc = "No relation to a certain rap artist/ actor." + glass_center_of_mass = list("x"=15, "y"=10) + +/datum/reagent/drink/coffee + name = "Coffee" + id = "coffee" + description = "Coffee is a brewed drink prepared from roasted seeds, commonly called coffee beans, of the coffee plant." + color = "#482000" + adj_dizzy = -5 + adj_drowsy = -3 + adj_sleepy = -2 + adj_temp = 25 + + glass_icon_state = "hot_coffee" + glass_name = "cup of coffee" + glass_desc = "Don't drop it, or you'll send scalding liquid and glass shards everywhere." + +/datum/reagent/drink/coffee/affect_mob(var/mob/living/carbon/M, var/alien, var/removed, var/location) + ..() + if(location == CHEM_TOUCH || location == CHEM_BLOOD || alien == IS_DIONA) + return + M.make_jittery(5) + if(adj_temp > 0) + holder.remove_reagent("frostoil", 10 * removed) + +/datum/reagent/drink/coffee/icecoffee + name = "Iced Coffee" + id = "icecoffee" + description = "Coffee and ice, refreshing and cool." + color = "#102838" + adj_temp = -5 + + glass_icon_state = "icedcoffeeglass" + glass_name = "glass of iced coffee" + glass_desc = "A drink to perk you up and refresh you!" + +/datum/reagent/drink/coffee/soy_latte + name = "Soy Latte" + id = "soy_latte" + description = "A nice and tasty beverage while you are reading your hippie books." + color = "#664300" + adj_temp = 5 + + glass_icon_state = "soy_latte" + glass_name = "glass of soy latte" + glass_desc = "A nice and refrshing beverage while you are reading." + glass_center_of_mass = list("x"=15, "y"=9) + +/datum/reagent/drink/coffee/soy_latte/affect_mob(var/mob/living/carbon/M, var/alien, var/removed, var/location) + ..() + M.heal_organ_damage(0.5 * removed, 0) + +/datum/reagent/drink/coffee/cafe_latte + name = "Cafe Latte" + id = "cafe_latte" + description = "A nice, strong and tasty beverage while you are reading." + color = "#664300" // rgb: 102, 67, 0 + adj_temp = 5 + + glass_icon_state = "cafe_latte" + glass_name = "glass of cafe latte" + glass_desc = "A nice, strong and refreshing beverage while you are reading." + glass_center_of_mass = list("x"=15, "y"=9) + +/datum/reagent/drink/coffee/cafe_latte/affect_mob(var/mob/living/carbon/M, var/alien, var/removed, var/location) + ..() + M.heal_organ_damage(0.5 * removed, 0) + +/datum/reagent/drink/hot_coco + name = "Hot Chocolate" + id = "hot_coco" + description = "Made with love! And cocoa beans." + reagent_state = LIQUID + color = "#403010" + nutrition = 2 + adj_temp = 5 + + glass_icon_state = "chocolateglass" + glass_name = "glass of hot chocolate" + glass_desc = "Made with love! And cocoa beans." + +/datum/reagent/drink/sodawater + name = "Soda Water" + id = "sodawater" + description = "A can of club soda. Why not make a scotch and soda?" + color = "#619494" + adj_dizzy = -5 + adj_drowsy = -3 + adj_temp = -5 + + glass_icon_state = "glass_clear" + glass_name = "glass of soda water" + glass_desc = "Soda water. Why not make a scotch and soda?" + +/datum/reagent/drink/grapesoda + name = "Grape Soda" + id = "grapesoda" + description = "Grapes made into a fine drank." + color = "#421C52" + adj_drowsy = -3 + + glass_icon_state = "gsodaglass" + glass_name = "glass of grape soda" + glass_desc = "Looks like a delicious drink!" + +/datum/reagent/drink/tonic + name = "Tonic Water" + id = "tonic" + description = "It tastes strange but at least the quinine keeps the Space Malaria at bay." + color = "#664300" + adj_dizzy = -5 + adj_drowsy = -3 + adj_sleepy = -2 + adj_temp = -5 + + glass_icon_state = "glass_clear" + glass_name = "glass of tonic water" + glass_desc = "Quinine tastes funny, but at least it'll keep that Space Malaria away." + +/datum/reagent/drink/lemonade + name = "Lemonade" + description = "Oh the nostalgia..." + id = "lemonade" + color = "#FFFF00" + adj_temp = -5 + + glass_icon_state = "lemonadeglass" + glass_name = "glass of lemonade" + glass_desc = "Oh the nostalgia..." + +/datum/reagent/drink/kiraspecial + name = "Kira Special" + description = "Long live the guy who everyone had mistaken for a girl. Baka!" + id = "kiraspecial" + color = "#CCCC99" + adj_temp = -5 + + glass_icon_state = "kiraspecial" + glass_name = "glass of Kira Special" + glass_desc = "Long live the guy who everyone had mistaken for a girl. Baka!" + glass_center_of_mass = list("x"=16, "y"=12) + +/datum/reagent/drink/brownstar + name = "Brown Star" + description = "It's not what it sounds like..." + id = "brownstar" + color = "#9F3400" + adj_temp = -2 + + glass_icon_state = "brownstar" + glass_name = "glass of Brown Star" + glass_desc = "It's not what it sounds like..." + +/datum/reagent/drink/milkshake + name = "Milkshake" + description = "Glorious brainfreezing mixture." + id = "milkshake" + color = "#AEE5E4" + adj_temp = -9 + + glass_icon_state = "milkshake" + glass_name = "glass of milkshake" + glass_desc = "Glorious brainfreezing mixture." + glass_center_of_mass = list("x"=16, "y"=7) + +/datum/reagent/drink/rewriter + name = "Rewriter" + description = "The secret of the sanctuary of the Libarian..." + id = "rewriter" + color = "#485000" + adj_temp = -5 + + glass_icon_state = "rewriter" + glass_name = "glass of Rewriter" + glass_desc = "The secret of the sanctuary of the Libarian..." + glass_center_of_mass = list("x"=16, "y"=9) + +/datum/reagent/drink/rewriter/affect_mob(var/mob/living/carbon/M, var/alien, var/removed, var/location) + ..() + M.make_jittery(5) + +/datum/reagent/drink/nuka_cola + name = "Nuka Cola" + id = "nuka_cola" + description = "Cola, cola never changes." + color = "#100800" + adj_temp = -5 + adj_sleepy = -2 + + glass_icon_state = "nuka_colaglass" + glass_name = "glass of Nuka-Cola" + glass_desc = "Don't cry, Don't raise your eye, It's only nuclear wasteland" + glass_center_of_mass = list("x"=16, "y"=6) + +/datum/reagent/drink/nuka_cola/affect_mob(var/mob/living/carbon/M, var/alien, var/removed, var/location) + ..() + M.add_chemical_effect(CE_SPEEDBOOST, 1) + M.make_jittery(20) + M.druggy = max(M.druggy, 30) + M.dizziness += 5 + M.drowsyness = 0 + +/datum/reagent/drink/grenadine + name = "Grenadine Syrup" + id = "grenadine" + description = "Made in the modern day with proper pomegranate substitute. Who uses real fruit, anyways?" + color = "#FF004F" + + glass_icon_state = "grenadineglass" + glass_name = "glass of grenadine syrup" + glass_desc = "Sweet and tangy, a bar syrup used to add color or flavor to drinks." + glass_center_of_mass = list("x"=17, "y"=6) + +/datum/reagent/drink/space_cola + name = "Space Cola" + id = "cola" + description = "A refreshing beverage." + reagent_state = LIQUID + color = "#100800" + adj_drowsy = -3 + adj_temp = -5 + + glass_icon_state = "glass_brown" + glass_name = "glass of Space Cola" + glass_desc = "A glass of refreshing Space Cola" + +/datum/reagent/drink/spacemountainwind + name = "Mountain Wind" + id = "spacemountainwind" + description = "Blows right through you like a space wind." + color = "#102000" + adj_drowsy = -7 + adj_sleepy = -1 + adj_temp = -5 + + glass_icon_state = "Space_mountain_wind_glass" + glass_name = "glass of Space Mountain Wind" + glass_desc = "Space Mountain Wind. As you know, there are no mountains in space, only wind." + +/datum/reagent/drink/dr_gibb + name = "Dr. Gibb" + id = "dr_gibb" + description = "A delicious blend of 42 different flavours" + color = "#102000" + adj_drowsy = -6 + adj_temp = -5 + + glass_icon_state = "dr_gibb_glass" + glass_name = "glass of Dr. Gibb" + glass_desc = "Dr. Gibb. Not as dangerous as the name might imply." + +/datum/reagent/drink/space_up + name = "Space-Up" + id = "space_up" + description = "Tastes like a hull breach in your mouth." + color = "#202800" + adj_temp = -8 + + glass_icon_state = "space-up_glass" + glass_name = "glass of Space-up" + glass_desc = "Space-up. It helps keep your cool." + +/datum/reagent/drink/lemon_lime + name = "Lemon Lime" + description = "A tangy substance made of 0.5% natural citrus!" + id = "lemon_lime" + color = "#878F00" + adj_temp = -8 + + glass_icon_state = "lemonlime" + glass_name = "glass of lemon lime soda" + glass_desc = "A tangy substance made of 0.5% natural citrus!" + +/datum/reagent/drink/doctor_delight + name = "The Doctor's Delight" + id = "doctorsdelight" + description = "A gulp a day keeps the MediBot away. That's probably for the best." + reagent_state = LIQUID + color = "#FF8CFF" + nutrition = 1 + + glass_icon_state = "doctorsdelightglass" + glass_name = "glass of The Doctor's Delight" + glass_desc = "A healthy mixture of juices, guaranteed to keep you healthy until the next toolboxing takes place." + glass_center_of_mass = list("x"=16, "y"=8) + +/datum/reagent/drink/doctor_delight/affect_mob(var/mob/living/carbon/M, var/alien, var/removed, var/location) + ..() + if(location == CHEM_TOUCH || location == CHEM_BLOOD || alien == IS_DIONA) + return + M.adjustOxyLoss(-4 * removed) + M.heal_organ_damage(2 * removed, 2 * removed) + M.adjustToxLoss(-2 * removed) + if(M.dizziness) + M.dizziness = max(0, M.dizziness - 15) + if(M.confused) + M.confused = max(0, M.confused - 5) + +/datum/reagent/drink/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 + nutrition = 1 + color = "#302000" + +/datum/reagent/drink/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 + color = "#302000" + nutrition = 5 + adj_temp = 5 + +/datum/reagent/drink/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 + color = "#302000" + nutrition = 5 + +/datum/reagent/drink/hell_ramen/affect_mob(var/mob/living/carbon/M, var/alien, var/removed, var/location) + ..() + if(location == CHEM_TOUCH || location == CHEM_BLOOD || alien == IS_DIONA) + return + M.bodytemperature += 10 * TEMPERATURE_DAMAGE_COEFFICIENT + +/datum/reagent/drink/ice + name = "Ice" + id = "ice" + description = "Frozen water, your dentist wouldn't like you chewing this." + reagent_state = SOLID + color = "#619494" + adj_temp = -5 + + glass_icon_state = "iceglass" + glass_name = "glass of ice" + glass_desc = "Generally, you're supposed to put something else in there too..." + +/datum/reagent/drink/nothing + name = "Nothing" + id = "nothing" + description = "Absolutely nothing." + + glass_icon_state = "nothing" + glass_name = "glass of nothing" + glass_desc = "Absolutely nothing." + +/* Alcohol */ + +// Basic + +/datum/reagent/ethanol/absinthe + name = "Absinthe" + id = "absinthe" + description = "Watch out that the Green Fairy doesn't come for you!" + color = "#33EE00" + strength = 12 + + glass_icon_state = "absintheglass" + glass_name = "glass of absinthe" + glass_desc = "Wormwood, anise, oh my." + glass_center_of_mass = list("x"=16, "y"=5) + +/datum/reagent/ethanol/ale + name = "Ale" + id = "ale" + description = "A dark alchoholic beverage made by malted barley and yeast." + color = "#664300" + strength = 50 + + glass_icon_state = "aleglass" + glass_name = "glass of ale" + glass_desc = "A freezing pint of delicious ale" + glass_center_of_mass = list("x"=16, "y"=8) + +/datum/reagent/ethanol/beer + name = "Beer" + id = "beer" + description = "An alcoholic beverage made from malted grains, hops, yeast, and water." + color = "#664300" + strength = 50 + nutriment_factor = 1 + + glass_icon_state = "beerglass" + glass_name = "glass of beer" + glass_desc = "A freezing pint of beer" + glass_center_of_mass = list("x"=16, "y"=8) + +/datum/reagent/ethanol/beer/affect_mob(var/mob/living/carbon/M, var/alien, var/removed, var/location) + ..() + if(location == CHEM_TOUCH || location == CHEM_BLOOD || alien == IS_DIONA) + return + M.jitteriness = max(M.jitteriness - 3, 0) + +/datum/reagent/ethanol/bluecuracao + name = "Blue Curacao" + id = "bluecuracao" + description = "Exotically blue, fruity drink, distilled from oranges." + color = "#0000CD" + strength = 15 + + glass_icon_state = "curacaoglass" + glass_name = "glass of blue curacao" + glass_desc = "Exotically blue, fruity drink, distilled from oranges." + glass_center_of_mass = list("x"=16, "y"=5) + +/datum/reagent/ethanol/cognac + name = "Cognac" + id = "cognac" + description = "A sweet and strongly alchoholic drink, made after numerous distillations and years of maturing. Classy as fornication." + color = "#AB3C05" + strength = 15 + + glass_icon_state = "cognacglass" + glass_name = "glass of cognac" + glass_desc = "Damn, you feel like some kind of French aristocrat just by holding this." + glass_center_of_mass = list("x"=16, "y"=6) + +/datum/reagent/ethanol/deadrum + name = "Deadrum" + id = "deadrum" + description = "Popular with the sailors. Not very popular with everyone else." + color = "#664300" + strength = 50 + + glass_icon_state = "rumglass" + glass_name = "glass of rum" + glass_desc = "Now you want to Pray for a pirate suit, don't you?" + glass_center_of_mass = list("x"=16, "y"=12) + +/datum/reagent/ethanol/deadrum/affect_mob(var/mob/living/carbon/M, var/alien, var/removed, var/location) + ..() + if(location == CHEM_TOUCH || location == CHEM_BLOOD || alien == IS_DIONA) + return + M.dizziness +=5 + +/datum/reagent/ethanol/gin + name = "Gin" + id = "gin" + description = "It's gin. In space. I say, good sir." + color = "#664300" + strength = 50 + + glass_icon_state = "ginvodkaglass" + glass_name = "glass of gin" + glass_desc = "A crystal clear glass of Griffeater gin." + glass_center_of_mass = list("x"=16, "y"=12) + +/datum/reagent/ethanol/kahlua + name = "Kahlua" + id = "kahlua" + description = "A widely known, Mexican coffee-flavoured liqueur. In production since 1936!" + color = "#664300" + strength = 15 + + glass_icon_state = "kahluaglass" + glass_name = "glass of RR coffee liquor" + glass_desc = "DAMN, THIS THING LOOKS ROBUST" + glass_center_of_mass = list("x"=15, "y"=7) + +/datum/reagent/ethanol/kahlua/affect_mob(var/mob/living/carbon/M, var/alien, var/removed, var/location) + ..() + if(location == CHEM_TOUCH || location == CHEM_BLOOD || alien == IS_DIONA) + return + 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)) + M.make_jittery(5) + +/datum/reagent/ethanol/melonliquor + name = "Melon Liquor" + id = "melonliquor" + description = "A relatively sweet and fruity 46 proof liquor." + color = "#138808" // rgb: 19, 136, 8 + strength = 50 + + glass_icon_state = "emeraldglass" + glass_name = "glass of melon liquor" + glass_desc = "A relatively sweet and fruity 46 proof liquor." + glass_center_of_mass = list("x"=16, "y"=5) + +/datum/reagent/ethanol/rum + name = "Rum" + id = "rum" + description = "Yohoho and all that." + color = "#664300" + strength = 15 + + glass_icon_state = "rumglass" + glass_name = "glass of rum" + glass_desc = "Now you want to Pray for a pirate suit, don't you?" + glass_center_of_mass = list("x"=16, "y"=12) + +/datum/reagent/ethanol/sake + name = "Sake" + id = "sake" + description = "Anime's favorite drink." + color = "#664300" + strength = 25 + + glass_icon_state = "ginvodkaglass" + glass_name = "glass of sake" + glass_desc = "A glass of sake." + glass_center_of_mass = list("x"=16, "y"=12) + +/datum/reagent/ethanol/tequilla + name = "Tequila" + id = "tequilla" + description = "A strong and mildly flavoured, mexican produced spirit. Feeling thirsty hombre?" + color = "#FFFF91" + strength = 25 + + glass_icon_state = "tequillaglass" + glass_name = "glass of Tequilla" + glass_desc = "Now all that's missing is the weird colored shades!" + glass_center_of_mass = list("x"=16, "y"=12) + +/datum/reagent/ethanol/thirteenloko + name = "Thirteen Loko" + id = "thirteenloko" + description = "A potent mixture of caffeine and alcohol." + color = "#102000" + strength = 25 + nutriment_factor = 1 + + glass_icon_state = "thirteen_loko_glass" + glass_name = "glass of Thirteen Loko" + glass_desc = "This is a glass of Thirteen Loko, it appears to be of the highest quality. The drink, not the glass." + +/datum/reagent/ethanol/thirteenloko/affect_mob(var/mob/living/carbon/M, var/alien, var/removed, var/location) + ..() + if(location == CHEM_TOUCH || location == CHEM_BLOOD || alien == IS_DIONA) + return + M.drowsyness = max(0, M.drowsyness - 7) + if (M.bodytemperature > 310) + M.bodytemperature = max(310, M.bodytemperature - (5 * TEMPERATURE_DAMAGE_COEFFICIENT)) + M.make_jittery(5) + +/datum/reagent/ethanol/vermouth + name = "Vermouth" + id = "vermouth" + description = "You suddenly feel a craving for a martini..." + color = "#91FF91" // rgb: 145, 255, 145 + strength = 15 + + glass_icon_state = "vermouthglass" + glass_name = "glass of vermouth" + glass_desc = "You wonder why you're even drinking this straight." + glass_center_of_mass = list("x"=16, "y"=12) + +/datum/reagent/ethanol/vodka + name = "Vodka" + id = "vodka" + description = "Number one drink AND fueling choice for Russians worldwide." + color = "#0064C8" // rgb: 0, 100, 200 + strength = 15 + + glass_icon_state = "ginvodkaglass" + glass_name = "glass of vodka" + glass_desc = "The glass contain wodka. Xynta." + glass_center_of_mass = list("x"=16, "y"=12) + +/datum/reagent/ethanol/vodka/affect_mob(var/mob/living/carbon/M, var/alien, var/removed, var/location) + ..() + M.radiation = max(M.radiation - 1 * removed, 0) + +/datum/reagent/ethanol/whiskey + name = "Whiskey" + id = "whiskey" + description = "A superb and well-aged single-malt whiskey. Damn." + color = "#664300" + strength = 25 + + glass_icon_state = "whiskeyglass" + glass_name = "glass of whiskey" + glass_desc = "The silky, smokey whiskey goodness inside the glass makes the drink look very classy." + glass_center_of_mass = list("x"=16, "y"=12) + +/datum/reagent/ethanol/wine + name = "Wine" + id = "wine" + description = "An premium alchoholic beverage made from distilled grape juice." + color = "#7E4043" // rgb: 126, 64, 67 + strength = 15 + + glass_icon_state = "wineglass" + glass_name = "glass of wine" + glass_desc = "A very classy looking drink." + glass_center_of_mass = list("x"=15, "y"=7) + +// Cocktails + +/datum/reagent/ethanol/acid_spit + name = "Acid Spit" + id = "acidspit" + description = "A drink for the daring, can be deadly if incorrectly prepared!" + reagent_state = LIQUID + color = "#365000" + strength = 30 + + glass_icon_state = "acidspitglass" + glass_name = "glass of Acid Spit" + glass_desc = "A drink from Nanotrasen. Made from live aliens." + glass_center_of_mass = list("x"=16, "y"=7) + +/datum/reagent/ethanol/alliescocktail + name = "Allies Cocktail" + id = "alliescocktail" + description = "A drink made from your allies, not as sweet as when made from your enemies." + color = "#664300" + strength = 25 + + glass_icon_state = "alliescocktail" + glass_name = "glass of Allies cocktail" + glass_desc = "A drink made from your allies." + glass_center_of_mass = list("x"=17, "y"=8) + +/datum/reagent/ethanol/aloe + name = "Aloe" + id = "aloe" + description = "So very, very, very good." + color = "#664300" + strength = 15 + + glass_icon_state = "aloe" + glass_name = "glass of Aloe" + glass_desc = "Very, very, very good." + glass_center_of_mass = list("x"=17, "y"=8) + +/datum/reagent/ethanol/amasec + name = "Amasec" + id = "amasec" + description = "Official drink of the NanoTrasen Gun-Club!" + reagent_state = LIQUID + color = "#664300" + strength = 25 + + glass_icon_state = "amasecglass" + glass_name = "glass of Amasec" + glass_desc = "Always handy before COMBAT!!!" + glass_center_of_mass = list("x"=16, "y"=9) + +/datum/reagent/ethanol/andalusia + name = "Andalusia" + id = "andalusia" + description = "A nice, strangely named drink." + color = "#664300" + strength = 15 + + glass_icon_state = "andalusia" + glass_name = "glass of Andalusia" + glass_desc = "A nice, strange named drink." + glass_center_of_mass = list("x"=16, "y"=9) + +/datum/reagent/ethanol/antifreeze + name = "Anti-freeze" + id = "antifreeze" + description = "Ultimate refreshment." + color = "#664300" + strength = 12 + adj_temp = 20 + targ_temp = 330 + + glass_icon_state = "antifreeze" + glass_name = "glass of Anti-freeze" + glass_desc = "The ultimate refreshment." + glass_center_of_mass = list("x"=16, "y"=8) + +/datum/reagent/ethanol/atomicbomb + name = "Atomic Bomb" + id = "atomicbomb" + description = "Nuclear proliferation never tasted so good." + reagent_state = LIQUID + color = "#666300" + strength = 10 + druggy = 50 + + glass_icon_state = "atomicbombglass" + glass_name = "glass of Atomic Bomb" + glass_desc = "Nanotrasen cannot take legal responsibility for your actions after imbibing." + glass_center_of_mass = list("x"=15, "y"=7) + +/datum/reagent/ethanol/b52 + name = "B-52" + id = "b52" + description = "Coffee, Irish Cream, and cognac. You will get bombed." + color = "#664300" + strength = 12 + + glass_icon_state = "b52glass" + glass_name = "glass of B-52" + glass_desc = "Kahlua, Irish cream, and congac. You will get bombed." + +/datum/reagent/ethanol/bahama_mama + name = "Bahama mama" + id = "bahama_mama" + description = "Tropical cocktail." + color = "#FF7F3B" + strength = 25 + + glass_icon_state = "bahama_mama" + glass_name = "glass of Bahama Mama" + glass_desc = "Tropical cocktail" + glass_center_of_mass = list("x"=16, "y"=5) + +/datum/reagent/ethanol/bananahonk + name = "Banana Mama" + id = "bananahonk" + description = "A drink from Clown Heaven." + nutriment_factor = 1 + color = "#FFFF91" + strength = 12 + + glass_icon_state = "bananahonkglass" + glass_name = "glass of Banana Honk" + glass_desc = "A drink from Banana Heaven." + glass_center_of_mass = list("x"=16, "y"=8) + +/datum/reagent/ethanol/barefoot + name = "Barefoot" + id = "barefoot" + description = "Barefoot and pregnant" + color = "#664300" + strength = 30 + + glass_icon_state = "b&p" + glass_name = "glass of Barefoot" + glass_desc = "Barefoot and pregnant" + glass_center_of_mass = list("x"=17, "y"=8) + +/datum/reagent/ethanol/beepsky_smash + name = "Beepsky Smash" + id = "beepskysmash" + description = "Deny drinking this and prepare for THE LAW." + reagent_state = LIQUID + color = "#664300" + strength = 12 + + glass_icon_state = "beepskysmashglass" + glass_name = "Beepsky Smash" + glass_desc = "Heavy, hot and strong. Just like the Iron fist of the LAW." + glass_center_of_mass = list("x"=18, "y"=10) + +/datum/reagent/ethanol/beepsky_smash/affect_mob(var/mob/living/carbon/M, var/alien, var/removed, var/location) + ..() + M.Stun(2) + +/datum/reagent/ethanol/bilk + name = "Bilk" + id = "bilk" + description = "This appears to be beer mixed with milk. Disgusting." + color = "#895C4C" + strength = 50 + nutriment_factor = 2 + + glass_icon_state = "glass_brown" + glass_name = "glass of bilk" + glass_desc = "A brew of milk and beer. For those alcoholics who fear osteoporosis." + +/datum/reagent/ethanol/black_russian + name = "Black Russian" + id = "blackrussian" + description = "For the lactose-intolerant. Still as classy as a White Russian." + color = "#360000" + strength = 15 + + glass_icon_state = "blackrussianglass" + glass_name = "glass of Black Russian" + glass_desc = "For the lactose-intolerant. Still as classy as a White Russian." + glass_center_of_mass = list("x"=16, "y"=9) + +/datum/reagent/ethanol/bloody_mary + name = "Bloody Mary" + id = "bloodymary" + description = "A strange yet pleasurable mixture made of vodka, tomato and lime juice. Or at least you THINK the red stuff is tomato juice." + color = "#664300" + strength = 15 + + glass_icon_state = "bloodymaryglass" + glass_name = "glass of Bloody Mary" + glass_desc = "Tomato juice, mixed with Vodka and a lil' bit of lime. Tastes like liquid murder." + +/datum/reagent/ethanol/booger + name = "Booger" + id = "booger" + description = "Ewww..." + color = "#8CFF8C" + strength = 30 + + glass_icon_state = "booger" + glass_name = "glass of Booger" + glass_desc = "Ewww..." + +/datum/reagent/ethanol/brave_bull + name = "Brave Bull" + id = "bravebull" + description = "It's just as effective as Dutch-Courage!" + color = "#664300" + strength = 15 + + glass_icon_state = "bravebullglass" + glass_name = "glass of Brave Bull" + glass_desc = "Tequilla and coffee liquor, brought together in a mouthwatering mixture. Drink up." + glass_center_of_mass = list("x"=15, "y"=8) + +/datum/reagent/ethanol/changelingsting + name = "Changeling Sting" + id = "changelingsting" + description = "You take a tiny sip and feel a burning sensation..." + color = "#2E6671" + strength = 10 + + glass_icon_state = "changelingsting" + glass_name = "glass of Changeling Sting" + glass_desc = "A stingy drink." + +/datum/reagent/ethanol/classicmartini + name = "Classic Martini" + id = "classicmartini" + description = "Vermouth with Gin. Not quite how 007 enjoyed it, but still delicious." + color = "#664300" + strength = 25 + + glass_icon_state = "martiniglass" + glass_name = "glass of classic martini" + glass_desc = "Damn, the bartender even stirred it, not shook it." + glass_center_of_mass = list("x"=17, "y"=8) + +/datum/reagent/ethanol/cuba_libre + name = "Cuba Libre" + id = "cubalibre" + description = "Rum, mixed with cola. Viva la revolucion." + color = "#3E1B00" + strength = 30 + + glass_icon_state = "cubalibreglass" + glass_name = "glass of Cuba Libre" + glass_desc = "A classic mix of rum and cola." + glass_center_of_mass = list("x"=16, "y"=8) + +/datum/reagent/ethanol/demonsblood + name = "Demons Blood" + id = "demonsblood" + description = "AHHHH!!!!" + color = "#820000" + strength = 15 + + glass_icon_state = "demonsblood" + glass_name = "glass of Demons' Blood" + glass_desc = "Just looking at this thing makes the hair at the back of your neck stand up." + glass_center_of_mass = list("x"=16, "y"=2) + +/datum/reagent/ethanol/devilskiss + name = "Devils Kiss" + id = "devilskiss" + description = "Creepy time!" + color = "#A68310" + strength = 15 + + glass_icon_state = "devilskiss" + glass_name = "glass of Devil's Kiss" + glass_desc = "Creepy time!" + glass_center_of_mass = list("x"=16, "y"=8) + +/datum/reagent/ethanol/driestmartini + name = "Driest Martini" + id = "driestmartini" + description = "Only for the experienced. You think you see sand floating in the glass." + nutriment_factor = 1 + color = "#2E6671" + strength = 12 + + glass_icon_state = "driestmartiniglass" + glass_name = "glass of Driest Martini" + glass_desc = "Only for the experienced. You think you see sand floating in the glass." + glass_center_of_mass = list("x"=17, "y"=8) + +/datum/reagent/ethanol/ginfizz + name = "Gin Fizz" + id = "ginfizz" + description = "Refreshingly lemony, deliciously dry." + color = "#664300" + strength = 30 + + glass_icon_state = "ginfizzglass" + glass_name = "glass of gin fizz" + glass_desc = "Refreshingly lemony, deliciously dry." + glass_center_of_mass = list("x"=16, "y"=7) + +/datum/reagent/ethanol/grog + name = "Grog" + id = "grog" + description = "Watered down rum, NanoTrasen approves!" + reagent_state = LIQUID + color = "#664300" + strength = 100 + + glass_icon_state = "grogglass" + glass_name = "glass of grog" + glass_desc = "A fine and cepa drink for Space." + +/datum/reagent/ethanol/erikasurprise + name = "Erika Surprise" + id = "erikasurprise" + description = "The surprise is, it's green!" + color = "#2E6671" + strength = 15 + + glass_icon_state = "erikasurprise" + glass_name = "glass of Erika Surprise" + glass_desc = "The surprise is, it's green!" + glass_center_of_mass = list("x"=16, "y"=9) + +/datum/reagent/ethanol/gargle_blaster + name = "Pan-Galactic Gargle Blaster" + id = "gargleblaster" + description = "Whoah, this stuff looks volatile!" + reagent_state = LIQUID + color = "#664300" + strength = 10 + + glass_icon_state = "gargleblasterglass" + glass_name = "glass of Pan-Galactic Gargle Blaster" + glass_desc = "Does... does this mean that Arthur and Ford are on the station? Oh joy." + glass_center_of_mass = list("x"=17, "y"=6) + +/datum/reagent/ethanol/gintonic + name = "Gin and Tonic" + id = "gintonic" + description = "An all time classic, mild cocktail." + color = "#664300" + strength = 50 + + glass_icon_state = "gintonicglass" + glass_name = "glass of gin and tonic" + glass_desc = "A mild but still great cocktail. Drink up, like a true Englishman." + glass_center_of_mass = list("x"=16, "y"=7) + +/datum/reagent/ethanol/goldschlager + name = "Goldschlager" + id = "goldschlager" + description = "100 proof cinnamon schnapps, made for alcoholic teen girls on spring break." + color = "#664300" + strength = 15 + + glass_icon_state = "ginvodkaglass" + glass_name = "glass of Goldschlager" + glass_desc = "100 proof that teen girls will drink anything with gold in it." + glass_center_of_mass = list("x"=16, "y"=12) + +/datum/reagent/ethanol/hippies_delight + name = "Hippies' Delight" + id = "hippiesdelight" + description = "You just don't get it maaaan." + reagent_state = LIQUID + color = "#664300" + strength = 15 + druggy = 50 + + glass_icon_state = "hippiesdelightglass" + glass_name = "glass of Hippie's Delight" + glass_desc = "A drink enjoyed by people during the 1960's." + glass_center_of_mass = list("x"=16, "y"=8) + +/datum/reagent/ethanol/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?" + color = "#664300" + strength = 25 + toxicity = 2 + + glass_icon_state = "glass_brown2" + glass_name = "glass of Hooch" + glass_desc = "You've really hit rock bottom now... your liver packed its bags and left last night." + +/datum/reagent/ethanol/iced_beer + name = "Iced Beer" + id = "iced_beer" + description = "A beer which is so cold the air around it freezes." + color = "#664300" + strength = 50 + adj_temp = -20 + targ_temp = 270 + + glass_icon_state = "iced_beerglass" + glass_name = "glass of iced beer" + glass_desc = "A beer so frosty, the air around it freezes." + glass_center_of_mass = list("x"=16, "y"=7) + +/datum/reagent/ethanol/irishcarbomb + name = "Irish Car Bomb" + id = "irishcarbomb" + description = "Mmm, tastes like chocolate cake..." + color = "#2E6671" + strength = 15 + + glass_icon_state = "irishcarbomb" + glass_name = "glass of Irish Car Bomb" + glass_desc = "An irish car bomb." + glass_center_of_mass = list("x"=16, "y"=8) + +/datum/reagent/ethanol/irishcoffee + name = "Irish Coffee" + id = "irishcoffee" + description = "Coffee, and alcohol. More fun than a Mimosa to drink in the morning." + color = "#664300" + strength = 15 + + glass_icon_state = "irishcoffeeglass" + glass_name = "glass of Irish coffee" + glass_desc = "Coffee and alcohol. More fun than a Mimosa to drink in the morning." + glass_center_of_mass = list("x"=15, "y"=10) + +/datum/reagent/ethanol/irish_cream + name = "Irish Cream" + id = "irishcream" + description = "Whiskey-imbued cream, what else would you expect from the Irish." + color = "#664300" + strength = 25 + + glass_icon_state = "irishcreamglass" + glass_name = "glass of Irish cream" + glass_desc = "It's cream, mixed with whiskey. What else would you expect from the Irish?" + glass_center_of_mass = list("x"=16, "y"=9) + +/datum/reagent/ethanol/longislandicedtea + name = "Long Island Iced Tea" + id = "longislandicedtea" + description = "The liquor cabinet, brought together in a delicious mix. Intended for middle-aged alcoholic women only." + color = "#664300" + strength = 12 + + glass_icon_state = "longislandicedteaglass" + glass_name = "glass of Long Island iced tea" + glass_desc = "The liquor cabinet, brought together in a delicious mix. Intended for middle-aged alcoholic women only." + glass_center_of_mass = list("x"=16, "y"=8) + +/datum/reagent/ethanol/manhattan + name = "Manhattan" + id = "manhattan" + description = "The Detective's undercover drink of choice. He never could stomach gin..." + color = "#664300" + strength = 15 + + glass_icon_state = "manhattanglass" + glass_name = "glass of Manhattan" + glass_desc = "The Detective's undercover drink of choice. He never could stomach gin..." + glass_center_of_mass = list("x"=17, "y"=8) + +/datum/reagent/ethanol/manhattan_proj + name = "Manhattan Project" + id = "manhattan_proj" + description = "A scientist's drink of choice, for pondering ways to blow up the station." + color = "#664300" + strength = 10 + druggy = 30 + + glass_icon_state = "proj_manhattanglass" + glass_name = "glass of Manhattan Project" + glass_desc = "A scienitst drink of choice, for thinking how to blow up the station." + glass_center_of_mass = list("x"=17, "y"=8) + +/datum/reagent/ethanol/manly_dorf + name = "The Manly Dorf" + id = "manlydorf" + description = "Beer and Ale, brought together in a delicious mix. Intended for true men only." + color = "#664300" + strength = 25 + + glass_icon_state = "manlydorfglass" + glass_name = "glass of The Manly Dorf" + glass_desc = "A manly concotion made from Ale and Beer. Intended for true men only." + +/datum/reagent/ethanol/margarita + name = "Margarita" + id = "margarita" + description = "On the rocks with salt on the rim. Arriba~!" + color = "#8CFF8C" + strength = 15 + + glass_icon_state = "margaritaglass" + glass_name = "glass of margarita" + glass_desc = "On the rocks with salt on the rim. Arriba~!" + glass_center_of_mass = list("x"=16, "y"=8) + +/datum/reagent/ethanol/mead + name = "Mead" + id = "mead" + description = "A Viking's drink, though a cheap one." + reagent_state = LIQUID + color = "#664300" + strength = 30 + nutriment_factor = 1 + + glass_icon_state = "meadglass" + glass_name = "glass of mead" + glass_desc = "A Viking's beverage, though a cheap one." + glass_center_of_mass = list("x"=17, "y"=10) + +/datum/reagent/ethanol/moonshine + name = "Moonshine" + id = "moonshine" + description = "You've really hit rock bottom now... your liver packed its bags and left last night." + color = "#664300" + strength = 12 + + glass_icon_state = "glass_clear" + glass_name = "glass of moonshine" + glass_desc = "You've really hit rock bottom now... your liver packed its bags and left last night." + +/datum/reagent/ethanol/neurotoxin + name = "Neurotoxin" + id = "neurotoxin" + description = "A strong neurotoxin that puts the subject into a death-like state." + reagent_state = LIQUID + color = "#2E2E61" + strength = 10 + + glass_icon_state = "neurotoxinglass" + glass_name = "glass of Neurotoxin" + glass_desc = "A drink that is guaranteed to knock you silly." + glass_center_of_mass = list("x"=16, "y"=8) + +/datum/reagent/ethanol/neurotoxin/affect_mob(var/mob/living/carbon/M, var/alien, var/removed, var/location) + ..() + M.Weaken(3) + +/datum/reagent/ethanol/patron + name = "Patron" + id = "patron" + description = "Tequila with silver in it, a favorite of alcoholic women in the club scene." + color = "#585840" + strength = 30 + + glass_icon_state = "patronglass" + glass_name = "glass of Patron" + glass_desc = "Drinking patron in the bar, with all the subpar ladies." + glass_center_of_mass = list("x"=7, "y"=8) + +/datum/reagent/ethanol/pwine + name = "Poison Wine" + id = "pwine" + description = "Is this even wine? Toxic! Hallucinogenic! Probably consumed in boatloads by your superiors!" + color = "#000000" + strength = 10 + druggy = 50 + halluci = 10 + + glass_icon_state = "pwineglass" + glass_name = "glass of ???" + glass_desc = "A black ichor with an oily purple sheer on top. Are you sure you should drink this?" + glass_center_of_mass = list("x"=16, "y"=5) + +/datum/reagent/ethanol/pwine/affect_mob(var/mob/living/carbon/M, var/alien, var/removed, var/location) + ..() + if(dose > 30) + M.adjustToxLoss(2 * removed) + if(dose > 60 && ishuman(M) && prob(5)) + var/mob/living/carbon/human/H = M + var/datum/organ/internal/heart/L = H.internal_organs_by_name["heart"] + if (L && istype(L)) + if(dose < 120) + L.take_damage(10 * removed, 0) + else + L.take_damage(100, 0) + +/datum/reagent/ethanol/red_mead + name = "Red Mead" + id = "red_mead" + description = "The true Viking's drink! Even though it has a strange red color." + color = "#C73C00" + strength = 30 + + glass_icon_state = "red_meadglass" + glass_name = "glass of red mead" + glass_desc = "A true Viking's beverage, though its color is strange." + glass_center_of_mass = list("x"=17, "y"=10) + +/datum/reagent/ethanol/sbiten + name = "Sbiten" + id = "sbiten" + description = "A spicy Vodka! Might be a little hot for the little guys!" + color = "#664300" + strength = 15 + adj_temp = 50 + targ_temp = 360 + + glass_icon_state = "sbitenglass" + glass_name = "glass of Sbiten" + glass_desc = "A spicy mix of Vodka and Spice. Very hot." + glass_center_of_mass = list("x"=17, "y"=8) + +/datum/reagent/ethanol/screwdrivercocktail + name = "Screwdriver" + id = "screwdrivercocktail" + description = "Vodka, mixed with plain ol' orange juice. The result is surprisingly delicious." + color = "#A68310" + strength = 15 + + glass_icon_state = "screwdriverglass" + glass_name = "glass of Screwdriver" + glass_desc = "A simple, yet superb mixture of Vodka and orange juice. Just the thing for the tired engineer." + glass_center_of_mass = list("x"=15, "y"=10) + +/datum/reagent/ethanol/silencer + name = "Silencer" + id = "silencer" + description = "A drink from Mime Heaven." + nutriment_factor = 1 + color = "#664300" + strength = 12 + + glass_icon_state = "silencerglass" + glass_name = "glass of Silencer" + glass_desc = "A drink from mime Heaven." + glass_center_of_mass = list("x"=16, "y"=9) + +/datum/reagent/ethanol/singulo + name = "Singulo" + id = "singulo" + description = "A blue-space beverage!" + color = "#2E6671" + strength = 10 + + glass_icon_state = "singulo" + glass_name = "glass of Singulo" + glass_desc = "A blue-space beverage." + glass_center_of_mass = list("x"=17, "y"=4) + +/datum/reagent/ethanol/snowwhite + name = "Snow White" + id = "snowwhite" + description = "A cold refreshment" + color = "#FFFFFF" + strength = 30 + + glass_icon_state = "snowwhite" + glass_name = "glass of Snow White" + glass_desc = "A cold refreshment." + glass_center_of_mass = list("x"=16, "y"=8) + +/datum/reagent/ethanol/suidream + name = "Sui Dream" + id = "suidream" + description = "Comprised of: White soda, blue curacao, melon liquor." + color = "#00A86B" + strength = 100 + + glass_icon_state = "sdreamglass" + glass_name = "glass of Sui Dream" + glass_desc = "A froofy, fruity, and sweet mixed drink. Understanding the name only brings shame." + glass_center_of_mass = list("x"=16, "y"=5) + +/datum/reagent/ethanol/syndicatebomb + name = "Syndicate Bomb" + id = "syndicatebomb" + description = "Tastes like terrorism!" + color = "#2E6671" + strength = 10 + + glass_icon_state = "syndicatebomb" + glass_name = "glass of Syndicate Bomb" + glass_desc = "Tastes like terrorism!" + glass_center_of_mass = list("x"=16, "y"=4) + +/datum/reagent/ethanol/tequilla_sunrise + name = "Tequila Sunrise" + id = "tequillasunrise" + description = "Tequila and orange juice. Much like a Screwdriver, only Mexican~" + color = "#FFE48C" + strength = 25 + + glass_icon_state = "tequillasunriseglass" + glass_name = "glass of Tequilla Sunrise" + glass_desc = "Oh great, now you feel nostalgic about sunrises back on Terra..." + +/datum/reagent/ethanol/threemileisland + name = "Three Mile Island Iced Tea" + id = "threemileisland" + description = "Made for a woman, strong enough for a man." + color = "#666340" + strength = 10 + druggy = 50 + + glass_icon_state = "threemileislandglass" + glass_name = "glass of Three Mile Island iced tea" + glass_desc = "A glass of this is sure to prevent a meltdown." + glass_center_of_mass = list("x"=16, "y"=2) + +/datum/reagent/ethanol/toxins_special + name = "Toxins Special" + id = "phoronspecial" + description = "This thing is ON FIRE! CALL THE DAMN SHUTTLE!" + reagent_state = LIQUID + color = "#664300" + strength = 10 + adj_temp = 15 + targ_temp = 330 + + glass_icon_state = "toxinsspecialglass" + glass_name = "glass of Toxins Special" + glass_desc = "Whoah, this thing is on FIRE" + +/datum/reagent/ethanol/vodkamartini + name = "Vodka Martini" + id = "vodkamartini" + description = "Vodka with Gin. Not quite how 007 enjoyed it, but still delicious." + color = "#664300" + strength = 12 + + glass_icon_state = "martiniglass" + glass_name = "glass of vodka martini" + glass_desc ="A bastardisation of the classic martini. Still great." + glass_center_of_mass = list("x"=17, "y"=8) + +/datum/reagent/ethanol/vodkatonic + name = "Vodka and Tonic" + id = "vodkatonic" + description = "For when a gin and tonic isn't russian enough." + color = "#0064C8" // rgb: 0, 100, 200 + strength = 15 + + glass_icon_state = "vodkatonicglass" + glass_name = "glass of vodka and tonic" + glass_desc = "For when a gin and tonic isn't Russian enough." + glass_center_of_mass = list("x"=16, "y"=7) + +/datum/reagent/ethanol/white_russian + name = "White Russian" + id = "whiterussian" + description = "That's just, like, your opinion, man..." + color = "#A68340" + strength = 15 + + glass_icon_state = "whiterussianglass" + glass_name = "glass of White Russian" + glass_desc = "A very nice looking drink. But that's just, like, your opinion, man." + glass_center_of_mass = list("x"=16, "y"=9) + +/datum/reagent/ethanol/whiskey_cola + name = "Whiskey Cola" + id = "whiskeycola" + description = "Whiskey, mixed with cola. Surprisingly refreshing." + color = "#3E1B00" + strength = 25 + + glass_icon_state = "whiskeycolaglass" + glass_name = "glass of whiskey cola" + glass_desc = "An innocent-looking mixture of cola and Whiskey. Delicious." + glass_center_of_mass = list("x"=16, "y"=9) + +/datum/reagent/ethanol/whiskeysoda + name = "Whiskey Soda" + id = "whiskeysoda" + description = "For the more refined griffon." + color = "#664300" + strength = 15 + + glass_icon_state = "whiskeysodaglass2" + glass_name = "glass of whiskey soda" + glass_desc = "Ultimate refreshment." + glass_center_of_mass = list("x"=16, "y"=9) + +/datum/reagent/ethanol/specialwhiskey // I have no idea what this is and where it comes from + name = "Special Blend Whiskey" + id = "specialwhiskey" + description = "Just when you thought regular station whiskey was good... This silky, amber goodness has to come along and ruin everything." + color = "#664300" + strength = 25 + + glass_icon_state = "whiskeyglass" + glass_name = "glass of special blend whiskey" + glass_desc = "Just when you thought regular station whiskey was good... This silky, amber goodness has to come along and ruin everything." + glass_center_of_mass = list("x"=16, "y"=12) + +/* Super secret chemicals with randomized recipes */ + +/datum/reagent/rezadone + name = "Rezadone" + id = "rezadone" + description = "A powder with almost magical properties, this substance can effectively treat genetic damage in humanoids, though excessive consumption has side effects." + reagent_state = SOLID + color = "#669900" + overdose_blood = REAGENTS_OVERDOSE + overdose_ingest = REAGENTS_OVERDOSE + scannable = 1 + +/datum/reagent/rezadone/affect_mob(var/mob/living/carbon/M, var/alien, var/removed, var/location) + M.adjustCloneLoss(-20 * removed) + M.adjustOxyLoss(-2 * removed) + M.heal_organ_damage(20 * removed, 20 * removed) + M.adjustToxLoss(-20 * removed) + if(dose > 3) + M.status_flags &= ~DISFIGURED + if(dose > 10) + M.make_dizzy(5) + M.make_jittery(5) + +/* Paint and crayons */ + +/datum/reagent/crayon_dust + name = "Crayon dust" + id = "crayon_dust" + description = "Intensely coloured powder obtained by grinding crayons." + reagent_state = LIQUID + color = "#888888" + overdose_blood = 5 + overdose_ingest = 5 + +/datum/reagent/crayon_dust/red + name = "Red crayon dust" + id = "crayon_dust_red" + color = "#FE191A" + +/datum/reagent/crayon_dust/orange + name = "Orange crayon dust" + id = "crayon_dust_orange" + color = "#FFBE4F" + +/datum/reagent/crayon_dust/yellow + name = "Yellow crayon dust" + id = "crayon_dust_yellow" + color = "#FDFE7D" + +/datum/reagent/crayon_dust/green + name = "Green crayon dust" + id = "crayon_dust_green" + color = "#18A31A" + +/datum/reagent/crayon_dust/blue + name = "Blue crayon dust" + id = "crayon_dust_blue" + color = "#247CFF" + +/datum/reagent/crayon_dust/purple + name = "Purple crayon dust" + id = "crayon_dust_purple" + color = "#CC0099" + +/datum/reagent/crayon_dust/grey //Mime + name = "Grey crayon dust" + id = "crayon_dust_grey" + color = "#808080" + +/datum/reagent/crayon_dust/brown //Rainbow + name = "Brown crayon dust" + id = "crayon_dust_brown" + color = "#846F35" + +/datum/reagent/paint + name = "Paint" + id = "paint" + description = "This paint will stick to almost any object." + reagent_state = LIQUID + color = "#808080" + overdose_blood = REAGENTS_OVERDOSE * 0.5 + overdose_ingest = REAGENTS_OVERDOSE * 0.5 + color_weight = 20 + +/datum/reagent/paint/touch_turf(var/turf/T) + if(istype(T) && !istype(T, /turf/space)) + T.color = color + +/datum/reagent/paint/touch_obj(var/obj/O) + if(istype(O)) + O.color = color + +/datum/reagent/paint/touch_mob(var/mob/M) + if(istype(M) && !istype(M, /mob/dead)) //painting ghosts: not allowed + M.color = color + +/datum/reagent/paint/affect_mob(var/mob/living/carbon/M, var/alien, var/removed, var/location) + if(location == CHEM_TOUCH) + M.color = color + +/datum/reagent/paint/get_data() + return color + +/datum/reagent/paint/initialize_data(var/newdata) + color = newdata + return + +/datum/reagent/paint/mix_data(var/newdata, var/newamount) + var/list/colors = list(0, 0, 0, 0) + var/tot_w = 0 + + var/hex1 = uppertext(color) + var/hex2 = uppertext(newdata) + if(length(hex1) == 7) + hex1 += "FF" + if(length(hex2) == 7) + hex2 += "FF" + if(length(hex1) != 9 || length(hex2) != 9) + return + colors[1] += hex2num(copytext(hex1, 2, 4)) * volume + colors[2] += hex2num(copytext(hex1, 4, 6)) * volume + colors[3] += hex2num(copytext(hex1, 6, 8)) * volume + colors[4] += hex2num(copytext(hex1, 8, 10)) * volume + tot_w += volume + colors[1] += hex2num(copytext(hex2, 2, 4)) * newamount + colors[2] += hex2num(copytext(hex2, 4, 6)) * newamount + colors[3] += hex2num(copytext(hex2, 6, 8)) * newamount + colors[4] += hex2num(copytext(hex2, 8, 10)) * newamount + tot_w += newamount + + color = rgb(colors[1] / tot_w, colors[2] / tot_w, colors[3] / tot_w, colors[4] / tot_w) + return + +/* Things that didn't fit anywhere else */ + +/datum/reagent/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" + affects_dead = 1 //This can even heal dead people. + + glass_icon_state = "golden_cup" + glass_name = "golden cup" + glass_desc = "It's magic. We don't have to explain it." + +/datum/reagent/adminordrazine/affect_mob(var/mob/living/carbon/M, var/alien, var/removed, var/location) + M.setCloneLoss(0) + M.setOxyLoss(0) + M.radiation = 0 + M.heal_organ_damage(5,5) + M.adjustToxLoss(-5) + M.hallucination = 0 + M.setBrainLoss(0) + M.disabilities = 0 + M.sdisabilities = 0 + M.eye_blurry = 0 + M.eye_blind = 0 + 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() + +/datum/reagent/gold + name = "Gold" + id = "gold" + description = "Gold is a dense, soft, shiny metal and the most malleable and ductile metal known." + reagent_state = SOLID + color = "#F7C430" + +/datum/reagent/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" + +/datum/reagent/uranium + name ="Uranium" + id = "uranium" + description = "A silvery-white metallic chemical element in the actinide series, weakly radioactive." + reagent_state = SOLID + color = "#B8B8C0" + +/datum/reagent/uranium/affect_mob(var/mob/living/carbon/M, var/alien, var/removed, var/location) + M.apply_effect(5 * removed, IRRADIATE, 0) + +/datum/reagent/uranium/touch_turf(var/turf/T) + if(volume >= 3) + if(!istype(T, /turf/space)) + var/obj/effect/decal/cleanable/greenglow/glow = locate(/obj/effect/decal/cleanable/greenglow, T) + if(!glow) + new /obj/effect/decal/cleanable/greenglow(T) + return + + +/datum/reagent/adrenaline + name = "Adrenaline" + id = "adrenaline" + description = "Adrenaline is a hormone used as a drug to treat cardiac arrest and other cardiac dysrhythmias resulting in diminished or absent cardiac output." + reagent_state = LIQUID + color = "#C8A5DC" + +/datum/reagent/adrenaline/affect_mob(var/mob/living/carbon/M, var/alien, var/removed, var/location) + if(location == CHEM_TOUCH || alien == IS_DIONA) + return + M.SetParalysis(0) + M.SetWeakened(0) + M.adjustToxLoss(rand(3)) + +/datum/reagent/water/holywater + name = "Holy Water" + id = "holywater" + description = "An ashen-obsidian-water mix, this solution will alter certain sections of the brain's rationality." + color = "#E0E8EF" + + glass_icon_state = "glass_clear" + glass_name = "glass of holy water" + glass_desc = "An ashen-obsidian-water mix, this solution will alter certain sections of the brain's rationality." + +/datum/reagent/water/holywater/affect_mob(var/mob/living/carbon/M, var/alien, var/removed, var/location) + ..() + if(ishuman(M)) // Any location + if((M.mind in ticker.mode.cult) && prob(10)) + ticker.mode.remove_cultist(M.mind) + M.visible_message("[M]'s eyes blink and become clearer.", "A cooling sensation from inside you brings you an untold calmness.") + +/datum/reagent/ammonia + name = "Ammonia" + id = "ammonia" + description = "A caustic substance commonly used in fertilizer or household cleaners." + reagent_state = GAS + color = "#404030" + +/datum/reagent/diethylamine + name = "Diethylamine" + id = "diethylamine" + description = "A secondary amine, mildly corrosive." + reagent_state = LIQUID + color = "#604030" + +/datum/reagent/fluorosurfactant // Foam precursor + name = "Fluorosurfactant" + id = "fluorosurfactant" + description = "A perfluoronated sulfonic acid that forms a foam when mixed with water." + reagent_state = LIQUID + color = "#9E6B38" + +/datum/reagent/foaming_agent // Metal foaming agent. This is lithium hydride. Add other recipes (e.g. LiH + H2O -> LiOH + H2) eventually. + 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" + +/datum/reagent/thermite + name = "Thermite" + id = "thermite" + description = "Thermite produces an aluminothermic reaction known as a thermite reaction. Can be used to melt walls." + reagent_state = SOLID + color = "#673910" + touch_met = 50 + +/datum/reagent/thermite/touch_turf(var/turf/T) + if(volume >= 5) + if(istype(T, /turf/simulated/wall)) + var/turf/simulated/wall/W = T + W.thermite = 1 + W.overlays += image('icons/effects/effects.dmi',icon_state = "#673910") + remove_self(5) + return + +/datum/reagent/thermite/affect_mob(var/mob/living/carbon/M, var/alien, var/removed, var/location) + if(location == CHEM_TOUCH) + M.adjust_fire_stacks(removed * 0.2) + return + M.adjustFireLoss(3 * removed) + +/datum/reagent/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" + touch_met = 50 + +/datum/reagent/space_cleaner/touch_obj(var/obj/O) + if(istype(O, /obj/effect/decal/cleanable)) + del(O) + else + O.clean_blood() + +/datum/reagent/space_cleaner/touch_turf(var/turf/T) + if(volume >= 1) + if(istype(T, /turf/simulated)) + var/turf/simulated/S = T + S.dirt = 0 + T.clean_blood() + + for(var/mob/living/carbon/slime/M in T) + M.adjustToxLoss(rand(5, 10)) + +/datum/reagent/space_cleaner/affect_mob(var/mob/living/carbon/M, var/alien, var/removed, var/location) + if(M.r_hand) + M.r_hand.clean_blood() + if(M.l_hand) + M.l_hand.clean_blood() + if(M.wear_mask) + if(M.wear_mask.clean_blood()) + M.update_inv_wear_mask(0) + if(ishuman(M)) + var/mob/living/carbon/human/H = M + 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) + else + H.clean_blood(1) + return + M.clean_blood() + +/datum/reagent/lube // TODO: spraying on borgs speeds them up + 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" + +/datum/reagent/lube/touch_turf(var/turf/simulated/T) + if(!istype(T)) + return + if(volume >= 1) + if(T.wet >= 2) + return + T.wet = 2 + spawn(800) + if(!T || !istype(T)) return + T.wet = 0 + if(T.wet_overlay) + T.overlays -= T.wet_overlay + T.wet_overlay = null - hot_coco // there's also drink/hot_coco for whatever reason - name = "Hot Chocolate" - id = "hot_coco" - description = "Made with love! And cocoa beans." - reagent_state = LIQUID - nutriment_factor = 2 * REAGENTS_METABOLISM - color = "#403010" // rgb: 64, 48, 16 +/datum/reagent/silicate + name = "Silicate" + id = "silicate" + description = "A compound that can be used to reinforce glass." + reagent_state = LIQUID + color = "#C7FFFF" - glass_icon_state = "chocolateglass" - glass_name = "glass of hot chocolate" - glass_desc = "Made with love! And cocoa beans." +/datum/reagent/silicate/touch_obj(var/obj/O) + if(istype(O, /obj/structure/window)) + var/obj/structure/window/W = O + W.apply_silicate(volume) + remove_self(volume) + return - 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 +/datum/reagent/glycerol + name = "Glycerol" + id = "glycerol" + description = "Glycerol is a simple polyol compound. Glycerol is sweet-tasting and of low toxicity." + reagent_state = LIQUID + color = "#808080" - psilocybin - name = "Psilocybin" - id = "psilocybin" - description = "A strong psycotropic derived from certain species of mushroom." - color = "#E700E7" // rgb: 231, 0, 231 - overdose = REAGENTS_OVERDOSE +/datum/reagent/nitroglycerin + name = "Nitroglycerin" + id = "nitroglycerin" + description = "Nitroglycerin is a heavy, colorless, oily, explosive liquid obtained by nitrating glycerol." + reagent_state = LIQUID + color = "#808080" - 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 +/datum/reagent/coolant + name = "Coolant" + id = "coolant" + description = "Industrial cooling substance." + reagent_state = LIQUID + color = "#C8A5DC" - sprinkles - name = "Sprinkles" - id = "sprinkles" - description = "Multi-colored little bits of sugar, commonly found on donuts. Loved by cops." - nutriment_factor = 1 * REAGENTS_METABOLISM - color = "#FF00FF" // rgb: 255, 0, 255 +/datum/reagent/ultraglue + name = "Ultra Glue" + id = "glue" + description = "An extremely powerful bonding agent." + color = "#FFFFCC" - 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 - */ - ..() +/* Removed xenoarcheology stuff -/* //removed because of meta bullshit. this is why we can't have nice things. - 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 +/datum/reagent/lithiumsodiumtungstate + name = "Lithium Sodium Tungstate" + id = "lithiumsodiumtungstate" + description = "A reducing agent for geological compounds." + reagent_state = LIQUID + color = "#C0C0C0" // rgb: 192, 192, 192, darker silver + +/datum/reagent/ground_rock + name = "Ground Rock" + id = "ground_rock" + description = "A fine dust made of ground up rock." + reagent_state = SOLID + color = "#A0522D" //rgb: 160, 82, 45, brown + +/datum/reagent/density_separated_sample + name = "Density separated sample" + id = "density_separated_sample" + description = "A watery paste used in chemical analysis, there are some chunks floating in it." + reagent_state = LIQUID + color = "#DEB887" //rgb: 222, 184, 135, light brown + +/datum/reagent/analysis_sample + name = "Analysis liquid" + id = "analysis_sample" + description = "A watery paste used in chemical analysis." + reagent_state = LIQUID + color = "#F5FFFA" //rgb: 245, 255, 250, almost white + +/datum/reagent/chemical_waste + name = "Chemical Waste" + id = "chemical_waste" + description = "A viscous, toxic liquid left over from many chemical processes." + reagent_state = LIQUID + color = "#ADFF2F" //rgb: 173, 255, 47, toxic green - 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/fire) 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 - overdose = REAGENTS_OVERDOSE - - 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 - - flour - name = "flour" - id = "flour" - description = "This is what you rub all over yourself to pretend to be a ghost." - reagent_state = SOLID - nutriment_factor = 1 * REAGENTS_METABOLISM - color = "#FFFFFF" // rgb: 0, 0, 0 - - on_mob_life(var/mob/living/M as mob) - M.nutrition += nutriment_factor - ..() - return - - reaction_turf(var/turf/T, var/volume) - src = null - if(!istype(T, /turf/space)) - new /obj/effect/decal/cleanable/flour(T) - - rice - name = "Rice" - id = "rice" - description = "Enjoy the great taste of nothing." - reagent_state = SOLID - nutriment_factor = 1 * REAGENTS_METABOLISM - color = "#FFFFFF" // rgb: 0, 0, 0 - - on_mob_life(var/mob/living/M as mob) - M.nutrition += nutriment_factor - ..() - return - - cherryjelly - name = "Cherry Jelly" - id = "cherryjelly" - description = "Totally the best. Only to be spread on foods with excellent lateral symmetry." - reagent_state = LIQUID - nutriment_factor = 1 * REAGENTS_METABOLISM - color = "#801E28" // rgb: 128, 30, 40 - - on_mob_life(var/mob/living/M as mob) - M.nutrition += nutriment_factor - ..() - return - -///////////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////// DRINKS BELOW, Beer is up there though, along with cola. Cap'n Pete's Cuban Spiced Rum//////////////////////////////// -///////////////////////////////////////////////////////////////////////////////////////////////////////// - - drink - name = "Drink" - id = "drink" - description = "Uh, some kind of drink." - reagent_state = LIQUID - nutriment_factor = 1 * REAGENTS_METABOLISM - color = "#E78108" // rgb: 231, 129, 8 - var/adj_dizzy = 0 - var/adj_drowsy = 0 - var/adj_sleepy = 0 - var/adj_temp = 0 - - on_mob_life(var/mob/living/M as mob) - if(!M) M = holder.my_atom - M.nutrition += nutriment_factor - holder.remove_reagent(src.id, FOOD_METABOLISM) - // Drinks should be used up faster than other reagents. - holder.remove_reagent(src.id, FOOD_METABOLISM) - if (adj_dizzy) M.dizziness = max(0,M.dizziness + adj_dizzy) - if (adj_drowsy) M.drowsyness = max(0,M.drowsyness + adj_drowsy) - if (adj_sleepy) M.sleeping = max(0,M.sleeping + adj_sleepy) - if (adj_temp) - if (M.bodytemperature < 310)//310 is the normal bodytemp. 310.055 - M.bodytemperature = min(310, M.bodytemperature + (25 * TEMPERATURE_DAMAGE_COEFFICIENT)) - - ..() - return - - drink/orangejuice - name = "Orange juice" - id = "orangejuice" - description = "Both delicious AND rich in Vitamin C, what more do you need?" - color = "#E78108" // rgb: 231, 129, 8 - - glass_icon_state = "glass_orange" - glass_name = "glass of orange juice" - glass_desc = "Vitamins! Yay!" - - on_mob_life(var/mob/living/M as mob) - ..() - if(M.getOxyLoss() && prob(30)) M.adjustOxyLoss(-1) - return - - drink/tomatojuice - name = "Tomato Juice" - id = "tomatojuice" - description = "Tomatoes made into juice. What a waste of big, juicy tomatoes, huh?" - color = "#731008" // rgb: 115, 16, 8 - - glass_icon_state = "glass_red" - glass_name = "glass of tomato juice" - glass_desc = "Are you sure this is tomato juice?" - - on_mob_life(var/mob/living/M as mob) - ..() - if(M.getFireLoss() && prob(20)) M.heal_organ_damage(0,1) - return - - drink/limejuice - name = "Lime Juice" - id = "limejuice" - description = "The sweet-sour juice of limes." - color = "#365E30" // rgb: 54, 94, 48 - - glass_icon_state = "glass_green" - glass_name = "glass of lime juice" - glass_desc = "A glass of sweet-sour lime juice" - - on_mob_life(var/mob/living/M as mob) - ..() - if(M.getToxLoss() && prob(20)) M.adjustToxLoss(-1*REM) - return - - drink/carrotjuice - name = "Carrot juice" - id = "carrotjuice" - description = "It is just like a carrot but without crunching." - color = "#FF8C00" // rgb: 255, 140, 0 - - glass_icon_state = "carrotjuice" - glass_name = "glass of carrot juice" - glass_desc = "It is just like a carrot but without crunching." - - on_mob_life(var/mob/living/M as mob) - ..() - 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 - - drink/berryjuice - name = "Berry Juice" - id = "berryjuice" - description = "A delicious blend of several different kinds of berries." - color = "#990066" // rgb: 153, 0, 102 - - glass_icon_state = "berryjuice" - glass_name = "glass of berry juice" - glass_desc = "Berry juice. Or maybe it's jam. Who cares?" - - drink/grapejuice - name = "Grape Juice" - id = "grapejuice" - description = "It's grrrrrape!" - color = "#863333" // rgb: 134, 51, 51 - - glass_icon_state = "grapejuice" - glass_name = "glass of grape juice" - glass_desc = "It's grrrrrape!" - - drink/grapesoda - name = "Grape Soda" - id = "grapesoda" - description = "Grapes made into a fine drank." - color = "#421C52" // rgb: 98, 57, 53 - adj_drowsy = -3 - - glass_icon_state = "gsodaglass" - glass_name = "glass of grape soda" - glass_desc = "Looks like a delicious drink!" - - drink/poisonberryjuice - name = "Poison Berry Juice" - id = "poisonberryjuice" - description = "A tasty juice blended from various kinds of very deadly and toxic berries." - color = "#863353" // rgb: 134, 51, 83 - - glass_icon_state = "poisonberryjuice" - glass_name = "glass of poison berry juice" - glass_desc = "A glass of deadly juice." - - on_mob_life(var/mob/living/M as mob) - ..() - M.adjustToxLoss(1) - return - - drink/watermelonjuice - name = "Watermelon Juice" - id = "watermelonjuice" - description = "Delicious juice made from watermelon." - color = "#B83333" // rgb: 184, 51, 51 - - glass_icon_state = "glass_red" - glass_name = "glass of watermelon juice" - glass_desc = "Delicious juice made from watermelon." - - drink/lemonjuice - name = "Lemon Juice" - id = "lemonjuice" - description = "This juice is VERY sour." - color = "#AFAF00" // rgb: 175, 175, 0 - - glass_icon_state = "lemonjuice" - glass_name = "glass of lemon juice" - glass_desc = "Sour..." - - drink/banana - name = "Banana Juice" - id = "banana" - description = "The raw essence of a banana." - color = "#C3AF00" // rgb: 195, 175, 0 - - glass_icon_state = "banana" - glass_name = "glass of banana juice" - glass_desc = "The raw essence of a banana. HONK!" - - drink/nothing - name = "Nothing" - id = "nothing" - description = "Absolutely nothing." - - glass_icon_state = "nothing" - glass_name = "glass of nothing" - glass_desc = "Absolutely nothing." - - drink/potato_juice - name = "Potato Juice" - id = "potato" - description = "Juice of the potato. Bleh." - nutriment_factor = 2 * FOOD_METABOLISM - color = "#302000" // rgb: 48, 32, 0 - - glass_icon_state = "glass_brown" - glass_name = "glass of potato juice" - glass_desc = "Juice from a potato. Bleh." - - drink/milk - name = "Milk" - id = "milk" - description = "An opaque white liquid produced by the mammary glands of mammals." - color = "#DFDFDF" // rgb: 223, 223, 223 - - glass_icon_state = "glass_white" - glass_name = "glass of milk" - glass_desc = "White and nutritious goodness!" - - on_mob_life(var/mob/living/M as mob) - if(M.getBruteLoss() && prob(20)) M.heal_organ_damage(1,0) - holder.remove_reagent("capsaicin", 10*REAGENTS_METABOLISM) - ..() - return - - drink/milk/soymilk - name = "Soy Milk" - id = "soymilk" - description = "An opaque white liquid made from soybeans." - color = "#DFDFC7" // rgb: 223, 223, 199 - - glass_icon_state = "glass_white" - glass_name = "glass of soy milk" - glass_desc = "White and nutritious soy goodness!" - - drink/milk/cream - name = "Cream" - id = "cream" - description = "The fatty, still liquid part of milk. Why don't you mix this with sum scotch, eh?" - color = "#DFD7AF" // rgb: 223, 215, 175 - - glass_icon_state = "glass_white" - glass_name = "glass of cream" - glass_desc = "Ewwww..." - - drink/grenadine - name = "Grenadine Syrup" - id = "grenadine" - description = "Made in the modern day with proper pomegranate substitute. Who uses real fruit, anyways?" - color = "#FF004F" // rgb: 255, 0, 79 - - glass_icon_state = "grenadineglass" - glass_name = "glass of grenadine syrup" - glass_desc = "Sweet and tangy, a bar syrup used to add color or flavor to drinks." - glass_center_of_mass = list("x"=17, "y"=6) - - drink/hot_coco - name = "Hot Chocolate" - id = "hot_coco" - description = "Made with love! And cocoa beans." - nutriment_factor = 2 * FOOD_METABOLISM - color = "#403010" // rgb: 64, 48, 16 - adj_temp = 5 - - glass_icon_state = "chocolateglass" - glass_name = "glass of hot chocolate" - glass_desc = "Made with love! And cocoa beans." - - drink/coffee - name = "Coffee" - id = "coffee" - description = "Coffee is a brewed drink prepared from roasted seeds, commonly called coffee beans, of the coffee plant." - color = "#482000" // rgb: 72, 32, 0 - adj_dizzy = -5 - adj_drowsy = -3 - adj_sleepy = -2 - adj_temp = 25 - - glass_icon_state = "hot_coffee" - glass_name = "cup of coffee" - glass_desc = "Don't drop it, or you'll send scalding liquid and glass shards everywhere." - - on_mob_life(var/mob/living/M as mob) - ..() - M.make_jittery(5) - if(adj_temp > 0) - holder.remove_reagent("frostoil", 10*REAGENTS_METABOLISM) - - holder.remove_reagent(src.id, 0.1) - - drink/coffee/icecoffee - name = "Iced Coffee" - id = "icecoffee" - description = "Coffee and ice, refreshing and cool." - color = "#102838" // rgb: 16, 40, 56 - adj_temp = -5 - - glass_icon_state = "icedcoffeeglass" - glass_name = "glass of iced coffee" - glass_desc = "A drink to perk you up and refresh you!" - - drink/coffee/soy_latte - name = "Soy Latte" - id = "soy_latte" - description = "A nice and tasty beverage while you are reading your hippie books." - color = "#664300" // rgb: 102, 67, 0 - adj_sleepy = 0 - adj_temp = 5 - - glass_icon_state = "soy_latte" - glass_name = "glass of soy latte" - glass_desc = "A nice and refrshing beverage while you are reading." - glass_center_of_mass = list("x"=15, "y"=9) - - on_mob_life(var/mob/living/M as mob) - ..() - M.sleeping = 0 - if(M.getBruteLoss() && prob(20)) M.heal_organ_damage(1,0) - return - - drink/coffee/cafe_latte - name = "Cafe Latte" - id = "cafe_latte" - description = "A nice, strong and tasty beverage while you are reading." - color = "#664300" // rgb: 102, 67, 0 - adj_sleepy = 0 - adj_temp = 5 - - glass_icon_state = "cafe_latte" - glass_name = "glass of cafe latte" - glass_desc = "A nice, strong and refreshing beverage while you are reading." - glass_center_of_mass = list("x"=15, "y"=9) - - on_mob_life(var/mob/living/M as mob) - ..() - M.sleeping = 0 - if(M.getBruteLoss() && prob(20)) M.heal_organ_damage(1,0) - return - - drink/tea - name = "Tea" - id = "tea" - description = "Tasty black tea, it has antioxidants, it's good for you!" - color = "#101000" // rgb: 16, 16, 0 - adj_dizzy = -2 - adj_drowsy = -1 - adj_sleepy = -3 - adj_temp = 20 - - glass_icon_state = "bigteacup" - glass_name = "cup of tea" - glass_desc = "Tasty black tea, it has antioxidants, it's good for you!" - - on_mob_life(var/mob/living/M as mob) - ..() - if(M.getToxLoss() && prob(20)) - M.adjustToxLoss(-1) - return - - drink/tea/icetea - name = "Iced Tea" - id = "icetea" - description = "No relation to a certain rap artist/ actor." - color = "#104038" // rgb: 16, 64, 56 - adj_temp = -5 - - glass_icon_state = "icedteaglass" - glass_name = "glass of iced tea" - glass_desc = "No relation to a certain rap artist/ actor." - glass_center_of_mass = list("x"=15, "y"=10) - - drink/cold - name = "Cold drink" - adj_temp = -5 - - drink/cold/tonic - name = "Tonic Water" - id = "tonic" - description = "It tastes strange but at least the quinine keeps the Space Malaria at bay." - color = "#664300" // rgb: 102, 67, 0 - adj_dizzy = -5 - adj_drowsy = -3 - adj_sleepy = -2 - - glass_icon_state = "glass_clear" - glass_name = "glass of tonic water" - glass_desc = "Quinine tastes funny, but at least it'll keep that Space Malaria away." - - drink/cold/sodawater - name = "Soda Water" - id = "sodawater" - description = "A can of club soda. Why not make a scotch and soda?" - color = "#619494" // rgb: 97, 148, 148 - adj_dizzy = -5 - adj_drowsy = -3 - - glass_icon_state = "glass_clear" - glass_name = "glass of soda water" - glass_desc = "Soda water. Why not make a scotch and soda?" - - drink/cold/ice - name = "Ice" - id = "ice" - description = "Frozen water, your dentist wouldn't like you chewing this." - reagent_state = SOLID - color = "#619494" // rgb: 97, 148, 148 - - glass_icon_state = "iceglass" - glass_name = "glass of ice" - glass_desc = "Generally, you're supposed to put something else in there too..." - - drink/cold/space_cola - name = "Space Cola" - id = "cola" - description = "A refreshing beverage." - reagent_state = LIQUID - color = "#100800" // rgb: 16, 8, 0 - adj_drowsy = -3 - - glass_icon_state = "glass_brown" - glass_name = "glass of Space Cola" - glass_desc = "A glass of refreshing Space Cola" - - drink/cold/nuka_cola - name = "Nuka Cola" - id = "nuka_cola" - description = "Cola, cola never changes." - color = "#100800" // rgb: 16, 8, 0 - adj_sleepy = -2 - - glass_icon_state = "nuka_colaglass" - glass_name = "glass of Nuka-Cola" - glass_desc = "Don't cry, Don't raise your eye, It's only nuclear wasteland" - glass_center_of_mass = list("x"=16, "y"=6) - - 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 - ..() - return - - drink/cold/spacemountainwind - name = "Mountain Wind" - id = "spacemountainwind" - description = "Blows right through you like a space wind." - color = "#102000" // rgb: 16, 32, 0 - adj_drowsy = -7 - adj_sleepy = -1 - - glass_icon_state = "Space_mountain_wind_glass" - glass_name = "glass of Space Mountain Wind" - glass_desc = "Space Mountain Wind. As you know, there are no mountains in space, only wind." - - drink/cold/dr_gibb - name = "Dr. Gibb" - id = "dr_gibb" - description = "A delicious blend of 42 different flavours" - color = "#102000" // rgb: 16, 32, 0 - adj_drowsy = -6 - - glass_icon_state = "dr_gibb_glass" - glass_name = "glass of Dr. Gibb" - glass_desc = "Dr. Gibb. Not as dangerous as the name might imply." - - drink/cold/space_up - name = "Space-Up" - id = "space_up" - description = "Tastes like a hull breach in your mouth." - color = "#202800" // rgb: 32, 40, 0 - adj_temp = -8 - - glass_icon_state = "space-up_glass" - glass_name = "glass of Space-up" - glass_desc = "Space-up. It helps keep your cool." - - drink/cold/lemon_lime - name = "Lemon Lime" - description = "A tangy substance made of 0.5% natural citrus!" - id = "lemon_lime" - color = "#878F00" // rgb: 135, 40, 0 - adj_temp = -8 - - glass_icon_state = "lemonlime" - glass_name = "glass of lemon lime soda" - glass_desc = "A tangy substance made of 0.5% natural citrus!" - - drink/cold/lemonade - name = "Lemonade" - description = "Oh the nostalgia..." - id = "lemonade" - color = "#FFFF00" // rgb: 255, 255, 0 - - glass_icon_state = "lemonadeglass" - glass_name = "glass of lemonade" - glass_desc = "Oh the nostalgia..." - - drink/cold/kiraspecial - name = "Kira Special" - description = "Long live the guy who everyone had mistaken for a girl. Baka!" - id = "kiraspecial" - color = "#CCCC99" // rgb: 204, 204, 153 - - glass_icon_state = "kiraspecial" - glass_name = "glass of Kira Special" - glass_desc = "Long live the guy who everyone had mistaken for a girl. Baka!" - glass_center_of_mass = list("x"=16, "y"=12) - - drink/cold/brownstar - name = "Brown Star" - description = "It's not what it sounds like..." - id = "brownstar" - color = "#9F3400" // rgb: 159, 052, 000 - adj_temp = - 2 - - glass_icon_state = "brownstar" - glass_name = "glass of Brown Star" - glass_desc = "It's not what it sounds like..." - - drink/cold/milkshake - name = "Milkshake" - description = "Glorious brainfreezing mixture." - id = "milkshake" - color = "#AEE5E4" // rgb" 174, 229, 228 - adj_temp = -9 - - glass_icon_state = "milkshake" - glass_name = "glass of milkshake" - glass_desc = "Glorious brainfreezing mixture." - glass_center_of_mass = list("x"=16, "y"=7) - - on_mob_life(var/mob/living/M as mob) - if(!M) - M = holder.my_atom - if(prob(1)) - M.emote("shiver") - M.bodytemperature = max(M.bodytemperature - 10 * TEMPERATURE_DAMAGE_COEFFICIENT, 0) - if(istype(M, /mob/living/carbon/slime)) - M.bodytemperature = max(M.bodytemperature - rand(10,20), 0) - holder.remove_reagent("capsaicin", 5) - holder.remove_reagent(src.id, FOOD_METABOLISM) - ..() - return - - drink/cold/rewriter - name = "Rewriter" - description = "The secret of the sanctuary of the Libarian..." - id = "rewriter" - color = "#485000" // rgb:72, 080, 0 - - glass_icon_state = "rewriter" - glass_name = "glass of Rewriter" - glass_desc = "The secret of the sanctuary of the Libarian..." - glass_center_of_mass = list("x"=16, "y"=9) - - on_mob_life(var/mob/living/M as mob) - ..() - M.make_jittery(5) - 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 = "#FF8CFF" // rgb: 255, 140, 255 - nutriment_factor = 1 * FOOD_METABOLISM - - glass_icon_state = "doctorsdelightglass" - glass_name = "glass of The Doctor's Delight" - glass_desc = "A healthy mixture of juices, guaranteed to keep you healthy until the next toolboxing takes place." - glass_center_of_mass = list("x"=16, "y"=8) - - on_mob_life(var/mob/living/M as mob) - M:nutrition += nutriment_factor - holder.remove_reagent(src.id, FOOD_METABOLISM) - 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 - -//////////////////////////////////////////////The ten friggen million reagents that get you drunk////////////////////////////////////////////// - - atomicbomb - name = "Atomic Bomb" - id = "atomicbomb" - description = "Nuclear proliferation never tasted so good." - reagent_state = LIQUID - color = "#666300" // rgb: 102, 99, 0 - - glass_icon_state = "atomicbombglass" - glass_name = "glass of Atomic Bomb" - glass_desc = "Nanotrasen cannot take legal responsibility for your actions after imbibing." - glass_center_of_mass = list("x"=15, "y"=7) - - 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 200) - M.sleeping += 1 - if(201 to INFINITY) - M.sleeping += 1 - M.adjustToxLoss(2) - ..() - 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 - - glass_icon_state = "gargleblasterglass" - glass_name = "glass of Pan-Galactic Gargle Blaster" - glass_desc = "Does... does this mean that Arthur and Ford are on the station? Oh joy." - glass_center_of_mass = list("x"=17, "y"=6) - - on_mob_life(var/mob/living/M as mob) - if(!data) data = 1 - data++ - M.dizziness +=6 - switch(data) - if(15 to 45) - M.stuttering = max(M.stuttering+3,0) - if(45 to 55) - if (prob(50)) - M.confused = max(M.confused+3,0) - if(55 to 200) - M.druggy = max(M.druggy, 55) - if(200 to INFINITY) - M.adjustToxLoss(2) - ..() - - 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 - - glass_icon_state = "neurotoxinglass" - glass_name = "glass of Neurotoxin" - glass_desc = "A drink that is guaranteed to knock you silly." - glass_center_of_mass = list("x"=16, "y"=8) - - on_mob_life(var/mob/living/carbon/M as mob) - if(!M) M = holder.my_atom - M.weakened = max(M.weakened, 3) - if(!data) data = 1 - data++ - M.dizziness +=6 - switch(data) - if(15 to 45) - M.stuttering = max(M.stuttering+3,0) - if(45 to 55) - if (prob(50)) - M.confused = max(M.confused+3,0) - if(55 to 200) - M.druggy = max(M.druggy, 55) - if(200 to INFINITY) - M.adjustToxLoss(2) - ..() - - hippies_delight - name = "Hippies' Delight" - id = "hippiesdelight" - description = "You just don't get it maaaan." - reagent_state = LIQUID - color = "#664300" // rgb: 102, 67, 0 - - glass_icon_state = "hippiesdelightglass" - glass_name = "glass of Hippie's Delight" - glass_desc = "A drink enjoyed by people during the 1960's." - glass_center_of_mass = list("x"=16, "y"=8) - - 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 - data++ - 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 200) - 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")) - if(200 to INFINITY) - if (!M.stuttering) M.stuttering = 1 - M.make_jittery(60) - M.make_dizzy(60) - M.druggy = max(M.druggy, 75) - if(prob(40)) M.emote(pick("twitch","giggle")) - if(prob(30)) M.adjustToxLoss(2) - holder.remove_reagent(src.id, 0.2) - ..() - return - -/*boozepwr chart -1-2 = non-toxic alcohol -3 = medium-toxic -4 = the hard stuff -5 = potent mixes -<6 = deadly toxic -*/ - - ethanol - name = "Ethanol" //Parent class for all alcoholic reagents. - id = "ethanol" - description = "A well-known alcohol with a variety of applications." - reagent_state = LIQUID - nutriment_factor = 0 //So alcohol can fill you up! If they want to. - color = "#404030" // rgb: 64, 64, 48 - var/boozepwr = 5 //higher numbers mean the booze will have an effect faster. - var/dizzy_adj = 3 - var/adj_drowsy = 0 - var/adj_sleepy = 0 - var/slurr_adj = 3 - var/confused_adj = 2 - var/slur_start = 90 //amount absorbed after which mob starts slurring - var/confused_start = 150 //amount absorbed after which mob starts confusing directions - var/blur_start = 300 //amount absorbed after which mob starts getting blurred vision - var/pass_out = 400 //amount absorbed after which mob starts passing out - - glass_icon_state = "glass_clear" - glass_name = "glass of ethanol" - glass_desc = "A well-known alcohol with a variety of applications." - - on_mob_life(var/mob/living/M as mob, var/alien) - M:nutrition += nutriment_factor - holder.remove_reagent(src.id, (alien ? FOOD_METABOLISM : ALCOHOL_METABOLISM)) // Catch-all for creatures without livers. - - if (adj_drowsy) M.drowsyness = max(0,M.drowsyness + adj_drowsy) - if (adj_sleepy) M.sleeping = max(0,M.sleeping + adj_sleepy) - - if(!src.data || (!isnum(src.data) && src.data.len)) data = 1 //if it doesn't exist we set it. if it's a list we're going to set it to 1 as well. This is to - src.data += boozepwr //avoid a runtime error associated with drinking blood mixed in drinks (demon's blood). - - var/d = data - - // make all the beverages work together - for(var/datum/reagent/ethanol/A in holder.reagent_list) - if(A != src && isnum(A.data)) d += A.data - - if(alien && alien == IS_SKRELL) //Skrell get very drunk very quickly. - d*=5 - - M.dizziness += dizzy_adj. - if(d >= slur_start && d < pass_out) - if (!M:slurring) M:slurring = 1 - M:slurring += slurr_adj - if(d >= confused_start && prob(33)) - if (!M:confused) M:confused = 1 - M.confused = max(M:confused+confused_adj,0) - if(d >= blur_start) - M.eye_blurry = max(M.eye_blurry, 10) - M:drowsyness = max(M:drowsyness, 0) - if(d >= pass_out) - M:paralysis = max(M:paralysis, 20) - M:drowsyness = max(M:drowsyness, 30) - if(ishuman(M)) - var/mob/living/carbon/human/H = M - var/datum/organ/internal/liver/L = H.internal_organs_by_name["liver"] - if (!L) - H.adjustToxLoss(5) - else if(istype(L)) - L.take_damage(0.1, 1) - H.adjustToxLoss(0.1) - ..() - 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 dissolves the ink on the paper." - if(istype(O,/obj/item/weapon/book)) - if(istype(O,/obj/item/weapon/book/tome)) - usr << "The solution does nothing. Whatever this is, it isn't normal ink." - return - if(volume >= 5) - var/obj/item/weapon/book/affectedbook = O - affectedbook.dat = null - usr << "The solution dissolves the ink on the book." - else - usr << "It wasn't enough..." - return - - reaction_mob(var/mob/living/M, var/method=TOUCH, var/volume)//Splashing people with ethanol isn't quite as good as fuel. - if(!istype(M, /mob/living)) - return - if(method == TOUCH) - M.adjust_fire_stacks(volume / 15) - return - ethanol/beer - name = "Beer" - id = "beer" - description = "An alcoholic beverage made from malted grains, hops, yeast, and water." - color = "#664300" // rgb: 102, 67, 0 - boozepwr = 1 - nutriment_factor = 1 * FOOD_METABOLISM - - glass_icon_state = "beerglass" - glass_name = "glass of beer" - glass_desc = "A freezing pint of beer" - glass_center_of_mass = list("x"=16, "y"=8) - - on_mob_life(var/mob/living/M as mob) - M:jitteriness = max(M:jitteriness-3,0) - ..() - return - - ethanol/kahlua - name = "Kahlua" - id = "kahlua" - description = "A widely known, Mexican coffee-flavoured liqueur. In production since 1936!" - color = "#664300" // rgb: 102, 67, 0 - boozepwr = 1.5 - dizzy_adj = -5 - adj_drowsy = -3 - adj_sleepy = -2 - - glass_icon_state = "kahluaglass" - glass_name = "glass of RR coffee liquor" - glass_desc = "DAMN, THIS THING LOOKS ROBUST" - glass_center_of_mass = list("x"=15, "y"=7) - - on_mob_life(var/mob/living/M as mob) - M.make_jittery(5) - ..() - return - - ethanol/whiskey - name = "Whiskey" - id = "whiskey" - description = "A superb and well-aged single-malt whiskey. Damn." - color = "#664300" // rgb: 102, 67, 0 - boozepwr = 2 - dizzy_adj = 4 - - glass_icon_state = "whiskeyglass" - glass_name = "glass of whiskey" - glass_desc = "The silky, smokey whiskey goodness inside the glass makes the drink look very classy." - glass_center_of_mass = list("x"=16, "y"=12) - - ethanol/specialwhiskey - name = "Special Blend Whiskey" - id = "specialwhiskey" - description = "Just when you thought regular station whiskey was good... This silky, amber goodness has to come along and ruin everything." - color = "#664300" // rgb: 102, 67, 0 - boozepwr = 2 - dizzy_adj = 4 - slur_start = 30 //amount absorbed after which mob starts slurring - - glass_icon_state = "whiskeyglass" - glass_name = "glass of special blend whiskey" - glass_desc = "Just when you thought regular station whiskey was good... This silky, amber goodness has to come along and ruin everything." - glass_center_of_mass = list("x"=16, "y"=12) - - ethanol/thirteenloko - name = "Thirteen Loko" - id = "thirteenloko" - description = "A potent mixture of caffeine and alcohol." - color = "#102000" // rgb: 16, 32, 0 - boozepwr = 2 - nutriment_factor = 1 * FOOD_METABOLISM - - glass_icon_state = "thirteen_loko_glass" - glass_name = "glass of Thirteen Loko" - glass_desc = "This is a glass of Thirteen Loko, it appears to be of the highest quality. The drink, not the glass." - - on_mob_life(var/mob/living/M as mob) - M:drowsyness = max(0,M:drowsyness-7) - if (M.bodytemperature > 310) - M.bodytemperature = max(310, M.bodytemperature - (5 * TEMPERATURE_DAMAGE_COEFFICIENT)) - M.make_jittery(5) - ..() - return - - ethanol/vodka - name = "Vodka" - id = "vodka" - description = "Number one drink AND fueling choice for Russians worldwide." - color = "#0064C8" // rgb: 0, 100, 200 - boozepwr = 2 - - glass_icon_state = "ginvodkaglass" - glass_name = "glass of vodka" - glass_desc = "The glass contain wodka. Xynta." - glass_center_of_mass = list("x"=16, "y"=12) - - on_mob_life(var/mob/living/M as mob) - M.radiation = max(M.radiation-1,0) - ..() - return - - ethanol/bilk - name = "Bilk" - id = "bilk" - description = "This appears to be beer mixed with milk. Disgusting." - color = "#895C4C" // rgb: 137, 92, 76 - boozepwr = 1 - nutriment_factor = 2 * FOOD_METABOLISM - - glass_icon_state = "glass_brown" - glass_name = "glass of bilk" - glass_desc = "A brew of milk and beer. For those alcoholics who fear osteoporosis." - - ethanol/threemileisland - name = "Three Mile Island Iced Tea" - id = "threemileisland" - description = "Made for a woman, strong enough for a man." - color = "#666340" // rgb: 102, 99, 64 - boozepwr = 5 - - glass_icon_state = "threemileislandglass" - glass_name = "glass of Three Mile Island iced tea" - glass_desc = "A glass of this is sure to prevent a meltdown." - glass_center_of_mass = list("x"=16, "y"=2) - - on_mob_life(var/mob/living/M as mob) - M.druggy = max(M.druggy, 50) - ..() - return - - ethanol/gin - name = "Gin" - id = "gin" - description = "It's gin. In space. I say, good sir." - color = "#664300" // rgb: 102, 67, 0 - boozepwr = 1 - dizzy_adj = 3 - - glass_icon_state = "ginvodkaglass" - glass_name = "glass of gin" - glass_desc = "A crystal clear glass of Griffeater gin." - glass_center_of_mass = list("x"=16, "y"=12) - - ethanol/tequilla - name = "Tequila" - id = "tequilla" - description = "A strong and mildly flavoured, mexican produced spirit. Feeling thirsty hombre?" - color = "#FFFF91" // rgb: 255, 255, 145 - boozepwr = 2 - - glass_icon_state = "tequillaglass" - glass_name = "glass of Tequilla" - glass_desc = "Now all that's missing is the weird colored shades!" - glass_center_of_mass = list("x"=16, "y"=12) - - ethanol/vermouth - name = "Vermouth" - id = "vermouth" - description = "You suddenly feel a craving for a martini..." - color = "#91FF91" // rgb: 145, 255, 145 - boozepwr = 1.5 - - glass_icon_state = "vermouthglass" - glass_name = "glass of vermouth" - glass_desc = "You wonder why you're even drinking this straight." - glass_center_of_mass = list("x"=16, "y"=12) - - ethanol/wine - name = "Wine" - id = "wine" - description = "An premium alchoholic beverage made from distilled grape juice." - color = "#7E4043" // rgb: 126, 64, 67 - boozepwr = 1.5 - dizzy_adj = 2 - slur_start = 65 //amount absorbed after which mob starts slurring - confused_start = 145 //amount absorbed after which mob starts confusing directions - - glass_icon_state = "wineglass" - glass_name = "glass of wine" - glass_desc = "A very classy looking drink." - glass_center_of_mass = list("x"=15, "y"=7) - - ethanol/cognac - name = "Cognac" - id = "cognac" - description = "A sweet and strongly alchoholic drink, made after numerous distillations and years of maturing. Classy as fornication." - color = "#AB3C05" // rgb: 171, 60, 5 - boozepwr = 1.5 - dizzy_adj = 4 - confused_start = 115 //amount absorbed after which mob starts confusing directions - - glass_icon_state = "cognacglass" - glass_name = "glass of cognac" - glass_desc = "Damn, you feel like some kind of French aristocrat just by holding this." - glass_center_of_mass = list("x"=16, "y"=6) - - ethanol/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?" - color = "#664300" // rgb: 102, 67, 0 - boozepwr = 2 - dizzy_adj = 6 - slurr_adj = 5 - slur_start = 35 //amount absorbed after which mob starts slurring - confused_start = 90 //amount absorbed after which mob starts confusing directions - - glass_icon_state = "glass_brown2" - glass_name = "glass of Hooch" - glass_desc = "You've really hit rock bottom now... your liver packed its bags and left last night." - - ethanol/ale - name = "Ale" - id = "ale" - description = "A dark alchoholic beverage made by malted barley and yeast." - color = "#664300" // rgb: 102, 67, 0 - boozepwr = 1 - - glass_icon_state = "aleglass" - glass_name = "glass of ale" - glass_desc = "A freezing pint of delicious ale" - glass_center_of_mass = list("x"=16, "y"=8) - - ethanol/absinthe - name = "Absinthe" - id = "absinthe" - description = "Watch out that the Green Fairy doesn't come for you!" - color = "#33EE00" // rgb: 51, 238, 0 - boozepwr = 4 - dizzy_adj = 5 - slur_start = 15 - confused_start = 30 - - glass_icon_state = "absintheglass" - glass_name = "glass of absinthe" - glass_desc = "Wormwood, anise, oh my." - glass_center_of_mass = list("x"=16, "y"=5) - - ethanol/pwine - name = "Poison Wine" - id = "pwine" - description = "Is this even wine? Toxic! Hallucinogenic! Probably consumed in boatloads by your superiors!" - color = "#000000" // rgb: 0, 0, 0 SHOCKER - boozepwr = 1 - dizzy_adj = 1 - slur_start = 1 - confused_start = 1 - - glass_icon_state = "pwineglass" - glass_name = "glass of ???" - glass_desc = "A black ichor with an oily purple sheer on top. Are you sure you should drink this?" - glass_center_of_mass = list("x"=16, "y"=5) - - 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 - data++ - switch(data) - if(1 to 25) - if (!M.stuttering) M.stuttering = 1 - M.make_dizzy(1) - M.hallucination = max(M.hallucination, 3) - if(prob(1)) M.emote(pick("twitch","giggle")) - if(25 to 75) - if (!M.stuttering) M.stuttering = 1 - M.hallucination = max(M.hallucination, 10) - M.make_jittery(2) - M.make_dizzy(2) - M.druggy = max(M.druggy, 45) - if(prob(5)) M.emote(pick("twitch","giggle")) - if (75 to 150) - if (!M.stuttering) M.stuttering = 1 - M.hallucination = max(M.hallucination, 60) - M.make_jittery(4) - M.make_dizzy(4) - M.druggy = max(M.druggy, 60) - if(prob(10)) M.emote(pick("twitch","giggle")) - if(prob(30)) M.adjustToxLoss(2) - if (150 to 300) - if (!M.stuttering) M.stuttering = 1 - M.hallucination = max(M.hallucination, 60) - M.make_jittery(4) - M.make_dizzy(4) - M.druggy = max(M.druggy, 60) - if(prob(10)) M.emote(pick("twitch","giggle")) - if(prob(30)) M.adjustToxLoss(2) - if(prob(5)) if(ishuman(M)) - var/mob/living/carbon/human/H = M - var/datum/organ/internal/heart/L = H.internal_organs_by_name["heart"] - if (L && istype(L)) - L.take_damage(5, 0) - if (300 to INFINITY) - if(ishuman(M)) - var/mob/living/carbon/human/H = M - var/datum/organ/internal/heart/L = H.internal_organs_by_name["heart"] - if (L && istype(L)) - L.take_damage(100, 0) - holder.remove_reagent(src.id, FOOD_METABOLISM) - - ethanol/rum - name = "Rum" - id = "rum" - description = "Yohoho and all that." - color = "#664300" // rgb: 102, 67, 0 - boozepwr = 1.5 - - glass_icon_state = "rumglass" - glass_name = "glass of rum" - glass_desc = "Now you want to Pray for a pirate suit, don't you?" - glass_center_of_mass = list("x"=16, "y"=12) - - ethanol/deadrum - name = "Deadrum" - id = "rum" // duplicate ids? - description = "Popular with the sailors. Not very popular with everyone else." - color = "#664300" // rgb: 102, 67, 0 - boozepwr = 1 - - glass_icon_state = "rumglass" - glass_name = "glass of rum" - glass_desc = "Now you want to Pray for a pirate suit, don't you?" - glass_center_of_mass = list("x"=16, "y"=12) - - on_mob_life(var/mob/living/M as mob) - ..() - M.dizziness +=5 - return - - ethanol/sake - name = "Sake" - id = "sake" - description = "Anime's favorite drink." - color = "#664300" // rgb: 102, 67, 0 - boozepwr = 2 - - glass_icon_state = "ginvodkaglass" - glass_name = "glass of sake" - glass_desc = "A glass of sake." - glass_center_of_mass = list("x"=16, "y"=12) - -/////////////////////////////////////////////////////////////////cocktail entities////////////////////////////////////////////// - - - ethanol/goldschlager - name = "Goldschlager" - id = "goldschlager" - description = "100 proof cinnamon schnapps, made for alcoholic teen girls on spring break." - color = "#664300" // rgb: 102, 67, 0 - boozepwr = 3 - - glass_icon_state = "ginvodkaglass" - glass_name = "glass of Goldschlager" - glass_desc = "100 proof that teen girls will drink anything with gold in it." - glass_center_of_mass = list("x"=16, "y"=12) - - ethanol/patron - name = "Patron" - id = "patron" - description = "Tequila with silver in it, a favorite of alcoholic women in the club scene." - color = "#585840" // rgb: 88, 88, 64 - boozepwr = 1.5 - - glass_icon_state = "patronglass" - glass_name = "glass of Patron" - glass_desc = "Drinking patron in the bar, with all the subpar ladies." - glass_center_of_mass = list("x"=7, "y"=8) - - ethanol/gintonic - name = "Gin and Tonic" - id = "gintonic" - description = "An all time classic, mild cocktail." - color = "#664300" // rgb: 102, 67, 0 - boozepwr = 1 - - glass_icon_state = "gintonicglass" - glass_name = "glass of gin and tonic" - glass_desc = "A mild but still great cocktail. Drink up, like a true Englishman." - glass_center_of_mass = list("x"=16, "y"=7) - - ethanol/cuba_libre - name = "Cuba Libre" - id = "cubalibre" - description = "Rum, mixed with cola. Viva la revolucion." - color = "#3E1B00" // rgb: 62, 27, 0 - boozepwr = 1.5 - - glass_icon_state = "cubalibreglass" - glass_name = "glass of Cuba Libre" - glass_desc = "A classic mix of rum and cola." - glass_center_of_mass = list("x"=16, "y"=8) - - ethanol/whiskey_cola - name = "Whiskey Cola" - id = "whiskeycola" - description = "Whiskey, mixed with cola. Surprisingly refreshing." - color = "#3E1B00" // rgb: 62, 27, 0 - boozepwr = 2 - - glass_icon_state = "whiskeycolaglass" - glass_name = "glass of whiskey cola" - glass_desc = "An innocent-looking mixture of cola and Whiskey. Delicious." - glass_center_of_mass = list("x"=16, "y"=9) - - ethanol/martini - name = "Classic Martini" - id = "martini" - description = "Vermouth with Gin. Not quite how 007 enjoyed it, but still delicious." - color = "#664300" // rgb: 102, 67, 0 - boozepwr = 2 - - glass_icon_state = "martiniglass" - glass_name = "glass of classic martini" - glass_desc = "Damn, the bartender even stirred it, not shook it." - glass_center_of_mass = list("x"=17, "y"=8) - - ethanol/vodkamartini - name = "Vodka Martini" - id = "vodkamartini" - description = "Vodka with Gin. Not quite how 007 enjoyed it, but still delicious." - color = "#664300" // rgb: 102, 67, 0 - boozepwr = 4 - - glass_icon_state = "martiniglass" - glass_name = "glass of vodka martini" - glass_desc ="A bastardisation of the classic martini. Still great." - glass_center_of_mass = list("x"=17, "y"=8) - - ethanol/white_russian - name = "White Russian" - id = "whiterussian" - description = "That's just, like, your opinion, man..." - color = "#A68340" // rgb: 166, 131, 64 - boozepwr = 3 - - glass_icon_state = "whiterussianglass" - glass_name = "glass of White Russian" - glass_desc = "A very nice looking drink. But that's just, like, your opinion, man." - glass_center_of_mass = list("x"=16, "y"=9) - - ethanol/screwdrivercocktail - name = "Screwdriver" - id = "screwdrivercocktail" - description = "Vodka, mixed with plain ol' orange juice. The result is surprisingly delicious." - color = "#A68310" // rgb: 166, 131, 16 - boozepwr = 3 - - glass_icon_state = "screwdriverglass" - glass_name = "glass of Screwdriver" - glass_desc = "A simple, yet superb mixture of Vodka and orange juice. Just the thing for the tired engineer." - glass_center_of_mass = list("x"=15, "y"=10) - - ethanol/booger - name = "Booger" - id = "booger" - description = "Ewww..." - color = "#8CFF8C" // rgb: 140, 255, 140 - boozepwr = 1.5 - - glass_icon_state = "booger" - glass_name = "glass of Booger" - glass_desc = "Ewww..." - - ethanol/bloody_mary - name = "Bloody Mary" - id = "bloodymary" - description = "A strange yet pleasurable mixture made of vodka, tomato and lime juice. Or at least you THINK the red stuff is tomato juice." - color = "#664300" // rgb: 102, 67, 0 - boozepwr = 3 - - glass_icon_state = "bloodymaryglass" - glass_name = "glass of Bloody Mary" - glass_desc = "Tomato juice, mixed with Vodka and a lil' bit of lime. Tastes like liquid murder." - - ethanol/brave_bull - name = "Brave Bull" - id = "bravebull" - description = "It's just as effective as Dutch-Courage!" - color = "#664300" // rgb: 102, 67, 0 - boozepwr = 3 - - glass_icon_state = "bravebullglass" - glass_name = "glass of Brave Bull" - glass_desc = "Tequilla and coffee liquor, brought together in a mouthwatering mixture. Drink up." - glass_center_of_mass = list("x"=15, "y"=8) - - ethanol/tequilla_sunrise - name = "Tequila Sunrise" - id = "tequillasunrise" - description = "Tequila and orange juice. Much like a Screwdriver, only Mexican~" - color = "#FFE48C" // rgb: 255, 228, 140 - boozepwr = 2 - - glass_icon_state = "tequillasunriseglass" - glass_name = "glass of Tequilla Sunrise" - glass_desc = "Oh great, now you feel nostalgic about sunrises back on Terra..." - - ethanol/toxins_special - name = "Toxins Special" - id = "phoronspecial" - description = "This thing is ON FIRE! CALL THE DAMN SHUTTLE!" - reagent_state = LIQUID - color = "#664300" // rgb: 102, 67, 0 - boozepwr = 5 - - glass_icon_state = "toxinsspecialglass" - glass_name = "glass of Toxins Special" - glass_desc = "Whoah, this thing is on FIRE" - - 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 - ..() - return - - ethanol/beepsky_smash - name = "Beepsky Smash" - id = "beepskysmash" - description = "Deny drinking this and prepare for THE LAW." - reagent_state = LIQUID - color = "#664300" // rgb: 102, 67, 0 - boozepwr = 4 - - glass_icon_state = "beepskysmashglass" - glass_name = "Beepsky Smash" - glass_desc = "Heavy, hot and strong. Just like the Iron fist of the LAW." - glass_center_of_mass = list("x"=18, "y"=10) - - on_mob_life(var/mob/living/M as mob) - M.Stun(2) - ..() - return - - ethanol/irish_cream - name = "Irish Cream" - id = "irishcream" - description = "Whiskey-imbued cream, what else would you expect from the Irish." - color = "#664300" // rgb: 102, 67, 0 - boozepwr = 2 - - glass_icon_state = "irishcreamglass" - glass_name = "glass of Irish cream" - glass_desc = "It's cream, mixed with whiskey. What else would you expect from the Irish?" - glass_center_of_mass = list("x"=16, "y"=9) - - ethanol/manly_dorf - name = "The Manly Dorf" - id = "manlydorf" - description = "Beer and Ale, brought together in a delicious mix. Intended for true men only." - color = "#664300" // rgb: 102, 67, 0 - boozepwr = 2 - - glass_icon_state = "manlydorfglass" - glass_name = "glass of The Manly Dorf" - glass_desc = "A manly concotion made from Ale and Beer. Intended for true men only." - - ethanol/longislandicedtea - name = "Long Island Iced Tea" - id = "longislandicedtea" - description = "The liquor cabinet, brought together in a delicious mix. Intended for middle-aged alcoholic women only." - color = "#664300" // rgb: 102, 67, 0 - boozepwr = 4 - - glass_icon_state = "longislandicedteaglass" - glass_name = "glass of Long Island iced tea" - glass_desc = "The liquor cabinet, brought together in a delicious mix. Intended for middle-aged alcoholic women only." - glass_center_of_mass = list("x"=16, "y"=8) - - ethanol/moonshine - name = "Moonshine" - id = "moonshine" - description = "You've really hit rock bottom now... your liver packed its bags and left last night." - color = "#664300" // rgb: 102, 67, 0 - boozepwr = 4 - - glass_icon_state = "glass_clear" - glass_name = "glass of moonshine" - glass_desc = "You've really hit rock bottom now... your liver packed its bags and left last night." - - ethanol/b52 - name = "B-52" - id = "b52" - description = "Coffee, Irish Cream, and cognac. You will get bombed." - color = "#664300" // rgb: 102, 67, 0 - boozepwr = 4 - - glass_icon_state = "b52glass" - glass_name = "glass of B-52" - glass_desc = "Kahlua, Irish cream, and congac. You will get bombed." - - ethanol/irishcoffee - name = "Irish Coffee" - id = "irishcoffee" - description = "Coffee, and alcohol. More fun than a Mimosa to drink in the morning." - color = "#664300" // rgb: 102, 67, 0 - boozepwr = 3 - - glass_icon_state = "irishcoffeeglass" - glass_name = "glass of Irish coffee" - glass_desc = "Coffee and alcohol. More fun than a Mimosa to drink in the morning." - glass_center_of_mass = list("x"=15, "y"=10) - - ethanol/margarita - name = "Margarita" - id = "margarita" - description = "On the rocks with salt on the rim. Arriba~!" - color = "#8CFF8C" // rgb: 140, 255, 140 - boozepwr = 3 - - glass_icon_state = "margaritaglass" - glass_name = "glass of margarita" - glass_desc = "On the rocks with salt on the rim. Arriba~!" - glass_center_of_mass = list("x"=16, "y"=8) - - ethanol/black_russian - name = "Black Russian" - id = "blackrussian" - description = "For the lactose-intolerant. Still as classy as a White Russian." - color = "#360000" // rgb: 54, 0, 0 - boozepwr = 3 - - glass_icon_state = "blackrussianglass" - glass_name = "glass of Black Russian" - glass_desc = "For the lactose-intolerant. Still as classy as a White Russian." - glass_center_of_mass = list("x"=16, "y"=9) - - ethanol/manhattan - name = "Manhattan" - id = "manhattan" - description = "The Detective's undercover drink of choice. He never could stomach gin..." - color = "#664300" // rgb: 102, 67, 0 - boozepwr = 3 - - glass_icon_state = "manhattanglass" - glass_name = "glass of Manhattan" - glass_desc = "The Detective's undercover drink of choice. He never could stomach gin..." - glass_center_of_mass = list("x"=17, "y"=8) - - ethanol/manhattan_proj - name = "Manhattan Project" - id = "manhattan_proj" - description = "A scientist's drink of choice, for pondering ways to blow up the station." - color = "#664300" // rgb: 102, 67, 0 - boozepwr = 5 - - glass_icon_state = "proj_manhattanglass" - glass_name = "glass of Manhattan Project" - glass_desc = "A scienitst drink of choice, for thinking how to blow up the station." - glass_center_of_mass = list("x"=17, "y"=8) - - on_mob_life(var/mob/living/M as mob) - M.druggy = max(M.druggy, 30) - ..() - return - - ethanol/whiskeysoda - name = "Whiskey Soda" - id = "whiskeysoda" - description = "For the more refined griffon." - color = "#664300" // rgb: 102, 67, 0 - boozepwr = 3 - - glass_icon_state = "whiskeysodaglass2" - glass_name = "glass of whiskey soda" - glass_desc = "Ultimate refreshment." - glass_center_of_mass = list("x"=16, "y"=9) - - ethanol/antifreeze - name = "Anti-freeze" - id = "antifreeze" - description = "Ultimate refreshment." - color = "#664300" // rgb: 102, 67, 0 - boozepwr = 4 - - glass_icon_state = "antifreeze" - glass_name = "glass of Anti-freeze" - glass_desc = "The ultimate refreshment." - glass_center_of_mass = list("x"=16, "y"=8) - - 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 - ..() - return - - ethanol/barefoot - name = "Barefoot" - id = "barefoot" - description = "Barefoot and pregnant" - color = "#664300" // rgb: 102, 67, 0 - boozepwr = 1.5 - - glass_icon_state = "b&p" - glass_name = "glass of Barefoot" - glass_desc = "Barefoot and pregnant" - glass_center_of_mass = list("x"=17, "y"=8) - - ethanol/snowwhite - name = "Snow White" - id = "snowwhite" - description = "A cold refreshment" - color = "#FFFFFF" // rgb: 255, 255, 255 - boozepwr = 1.5 - - glass_icon_state = "snowwhite" - glass_name = "glass of Snow White" - glass_desc = "A cold refreshment." - glass_center_of_mass = list("x"=16, "y"=8) - - ethanol/melonliquor - name = "Melon Liquor" - id = "melonliquor" - description = "A relatively sweet and fruity 46 proof liquor." - color = "#138808" // rgb: 19, 136, 8 - boozepwr = 1 - - glass_icon_state = "emeraldglass" - glass_name = "glass of melon liquor" - glass_desc = "A relatively sweet and fruity 46 proof liquor." - glass_center_of_mass = list("x"=16, "y"=5) - - ethanol/bluecuracao - name = "Blue Curacao" - id = "bluecuracao" - description = "Exotically blue, fruity drink, distilled from oranges." - color = "#0000CD" // rgb: 0, 0, 205 - boozepwr = 1.5 - - glass_icon_state = "curacaoglass" - glass_name = "glass of blue curacao" - glass_desc = "Exotically blue, fruity drink, distilled from oranges." - glass_center_of_mass = list("x"=16, "y"=5) - - ethanol/suidream - name = "Sui Dream" - id = "suidream" - description = "Comprised of: White soda, blue curacao, melon liquor." - color = "#00A86B" // rgb: 0, 168, 107 - boozepwr = 0.5 - - glass_icon_state = "sdreamglass" - glass_name = "glass of Sui Dream" - glass_desc = "A froofy, fruity, and sweet mixed drink. Understanding the name only brings shame." - glass_center_of_mass = list("x"=16, "y"=5) - - ethanol/demonsblood - name = "Demons Blood" - id = "demonsblood" - description = "AHHHH!!!!" - color = "#820000" // rgb: 130, 0, 0 - boozepwr = 3 - - glass_icon_state = "demonsblood" - glass_name = "glass of Demons' Blood" - glass_desc = "Just looking at this thing makes the hair at the back of your neck stand up." - glass_center_of_mass = list("x"=16, "y"=2) - - ethanol/vodkatonic - name = "Vodka and Tonic" - id = "vodkatonic" - description = "For when a gin and tonic isn't russian enough." - color = "#0064C8" // rgb: 0, 100, 200 - boozepwr = 3 - dizzy_adj = 4 - slurr_adj = 3 - - glass_icon_state = "vodkatonicglass" - glass_name = "glass of vodka and tonic" - glass_desc = "For when a gin and tonic isn't Russian enough." - glass_center_of_mass = list("x"=16, "y"=7) - - ethanol/ginfizz - name = "Gin Fizz" - id = "ginfizz" - description = "Refreshingly lemony, deliciously dry." - color = "#664300" // rgb: 102, 67, 0 - boozepwr = 1.5 - dizzy_adj = 4 - slurr_adj = 3 - - glass_icon_state = "ginfizzglass" - glass_name = "glass of gin fizz" - glass_desc = "Refreshingly lemony, deliciously dry." - glass_center_of_mass = list("x"=16, "y"=7) - - ethanol/bahama_mama - name = "Bahama mama" - id = "bahama_mama" - description = "Tropical cocktail." - color = "#FF7F3B" // rgb: 255, 127, 59 - boozepwr = 2 - - glass_icon_state = "bahama_mama" - glass_name = "glass of Bahama Mama" - glass_desc = "Tropical cocktail" - glass_center_of_mass = list("x"=16, "y"=5) - - ethanol/singulo - name = "Singulo" - id = "singulo" - description = "A blue-space beverage!" - color = "#2E6671" // rgb: 46, 102, 113 - boozepwr = 5 - dizzy_adj = 15 - slurr_adj = 15 - - glass_icon_state = "singulo" - glass_name = "glass of Singulo" - glass_desc = "A blue-space beverage." - glass_center_of_mass = list("x"=17, "y"=4) - - ethanol/sbiten - name = "Sbiten" - id = "sbiten" - description = "A spicy Vodka! Might be a little hot for the little guys!" - color = "#664300" // rgb: 102, 67, 0 - boozepwr = 3 - - glass_icon_state = "sbitenglass" - glass_name = "glass of Sbiten" - glass_desc = "A spicy mix of Vodka and Spice. Very hot." - glass_center_of_mass = list("x"=17, "y"=8) - - 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 - ..() - return - - ethanol/devilskiss - name = "Devils Kiss" - id = "devilskiss" - description = "Creepy time!" - color = "#A68310" // rgb: 166, 131, 16 - boozepwr = 3 - - glass_icon_state = "devilskiss" - glass_name = "glass of Devil's Kiss" - glass_desc = "Creepy time!" - glass_center_of_mass = list("x"=16, "y"=8) - - ethanol/red_mead - name = "Red Mead" - id = "red_mead" - description = "The true Viking's drink! Even though it has a strange red color." - color = "#C73C00" // rgb: 199, 60, 0 - boozepwr = 1.5 - - glass_icon_state = "red_meadglass" - glass_name = "glass of red mead" - glass_desc = "A true Viking's beverage, though its color is strange." - glass_center_of_mass = list("x"=17, "y"=10) - - ethanol/mead - name = "Mead" - id = "mead" - description = "A Viking's drink, though a cheap one." - reagent_state = LIQUID - color = "#664300" // rgb: 102, 67, 0 - boozepwr = 1.5 - nutriment_factor = 1 * FOOD_METABOLISM - - glass_icon_state = "meadglass" - glass_name = "glass of mead" - glass_desc = "A Viking's beverage, though a cheap one." - glass_center_of_mass = list("x"=17, "y"=10) - - ethanol/iced_beer - name = "Iced Beer" - id = "iced_beer" - description = "A beer which is so cold the air around it freezes." - color = "#664300" // rgb: 102, 67, 0 - boozepwr = 1 - - glass_icon_state = "iced_beerglass" - glass_name = "glass of iced beer" - glass_desc = "A beer so frosty, the air around it freezes." - glass_center_of_mass = list("x"=16, "y"=7) - - on_mob_life(var/mob/living/M as mob) - if(M.bodytemperature > 270) - M.bodytemperature = max(270, M.bodytemperature - (20 * TEMPERATURE_DAMAGE_COEFFICIENT)) //310 is the normal bodytemp. 310.055 - ..() - return - - ethanol/grog - name = "Grog" - id = "grog" - description = "Watered down rum, NanoTrasen approves!" - reagent_state = LIQUID - color = "#664300" // rgb: 102, 67, 0 - boozepwr = 0.5 - - glass_icon_state = "grogglass" - glass_name = "glass of grog" - glass_desc = "A fine and cepa drink for Space." - - ethanol/aloe - name = "Aloe" - id = "aloe" - description = "So very, very, very good." - color = "#664300" // rgb: 102, 67, 0 - boozepwr = 3 - - glass_icon_state = "aloe" - glass_name = "glass of Aloe" - glass_desc = "Very, very, very good." - glass_center_of_mass = list("x"=17, "y"=8) - - ethanol/andalusia - name = "Andalusia" - id = "andalusia" - description = "A nice, strangely named drink." - color = "#664300" // rgb: 102, 67, 0 - boozepwr = 3 - - glass_icon_state = "andalusia" - glass_name = "glass of Andalusia" - glass_desc = "A nice, strange named drink." - glass_center_of_mass = list("x"=16, "y"=9) - - ethanol/alliescocktail - name = "Allies Cocktail" - id = "alliescocktail" - description = "A drink made from your allies, not as sweet as when made from your enemies." - color = "#664300" // rgb: 102, 67, 0 - boozepwr = 2 - - glass_icon_state = "alliescocktail" - glass_name = "glass of Allies cocktail" - glass_desc = "A drink made from your allies." - glass_center_of_mass = list("x"=17, "y"=8) - - ethanol/acid_spit - name = "Acid Spit" - id = "acidspit" - description = "A drink for the daring, can be deadly if incorrectly prepared!" - reagent_state = LIQUID - color = "#365000" // rgb: 54, 80, 0 - boozepwr = 1.5 - - glass_icon_state = "acidspitglass" - glass_name = "glass of Acid Spit" - glass_desc = "A drink from Nanotrasen. Made from live aliens." - glass_center_of_mass = list("x"=16, "y"=7) - - ethanol/amasec - name = "Amasec" - id = "amasec" - description = "Official drink of the NanoTrasen Gun-Club!" - reagent_state = LIQUID - color = "#664300" // rgb: 102, 67, 0 - boozepwr = 2 - - glass_icon_state = "amasecglass" - glass_name = "glass of Amasec" - glass_desc = "Always handy before COMBAT!!!" - glass_center_of_mass = list("x"=16, "y"=9) - - ethanol/changelingsting - name = "Changeling Sting" - id = "changelingsting" - description = "You take a tiny sip and feel a burning sensation..." - color = "#2E6671" // rgb: 46, 102, 113 - boozepwr = 5 - - glass_icon_state = "changelingsting" - glass_name = "glass of Changeling Sting" - glass_desc = "A stingy drink." - - ethanol/irishcarbomb - name = "Irish Car Bomb" - id = "irishcarbomb" - description = "Mmm, tastes like chocolate cake..." - color = "#2E6671" // rgb: 46, 102, 113 - boozepwr = 3 - dizzy_adj = 5 - - glass_icon_state = "irishcarbomb" - glass_name = "glass of Irish Car Bomb" - glass_desc = "An irish car bomb." - glass_center_of_mass = list("x"=16, "y"=8) - - ethanol/syndicatebomb - name = "Syndicate Bomb" - id = "syndicatebomb" - description = "Tastes like terrorism!" - color = "#2E6671" // rgb: 46, 102, 113 - boozepwr = 5 - - glass_icon_state = "syndicatebomb" - glass_name = "glass of Syndicate Bomb" - glass_desc = "Tastes like terrorism!" - glass_center_of_mass = list("x"=16, "y"=4) - - ethanol/erikasurprise - name = "Erika Surprise" - id = "erikasurprise" - description = "The surprise is it's green!" - color = "#2E6671" // rgb: 46, 102, 113 - boozepwr = 3 - - glass_icon_state = "erikasurprise" - glass_name = "glass of Erika Surprise" - glass_desc = "The surprise is, it's green!" - glass_center_of_mass = list("x"=16, "y"=9) - - ethanol/driestmartini - name = "Driest Martini" - id = "driestmartini" - description = "Only for the experienced. You think you see sand floating in the glass." - nutriment_factor = 1 * FOOD_METABOLISM - color = "#2E6671" // rgb: 46, 102, 113 - boozepwr = 4 - - glass_icon_state = "driestmartiniglass" - glass_name = "glass of Driest Martini" - glass_desc = "Only for the experienced. You think you see sand floating in the glass." - glass_center_of_mass = list("x"=17, "y"=8) - - ethanol/bananahonk - name = "Banana Mama" - id = "bananahonk" - description = "A drink from Clown Heaven." - nutriment_factor = 1 * REAGENTS_METABOLISM - color = "#FFFF91" // rgb: 255, 255, 140 - boozepwr = 4 - - glass_icon_state = "bananahonkglass" - glass_name = "glass of Banana Honk" - glass_desc = "A drink from Banana Heaven." - glass_center_of_mass = list("x"=16, "y"=8) - - ethanol/silencer - name = "Silencer" - id = "silencer" - description = "A drink from Mime Heaven." - nutriment_factor = 1 * FOOD_METABOLISM - color = "#664300" // rgb: 102, 67, 0 - boozepwr = 4 - - glass_icon_state = "silencerglass" - glass_name = "glass of Silencer" - glass_desc = "A drink from mime Heaven." - glass_center_of_mass = list("x"=16, "y"=9) - - 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 - -// Undefine the alias for REAGENTS_EFFECT_MULTIPLER -#undef REM diff --git a/code/modules/reagents/Chemistry-Recipes.dm b/code/modules/reagents/Chemistry-Recipes.dm index fc8c129140..813a801ef7 100644 --- a/code/modules/reagents/Chemistry-Recipes.dm +++ b/code/modules/reagents/Chemistry-Recipes.dm @@ -1,2257 +1,1946 @@ -/////////////////////////////////////////////////////////////////////////////////// -datum - chemical_reaction - var/name = null - var/id = null - var/result = null - var/resultcolor = null //for paint - var/list/required_reagents = new/list() - var/list/required_catalysts = new/list() - - // Both of these variables are mostly going to be used with slime cores - but if you want to, you can use them for other things - var/atom/required_container = null // the container required for the reaction to happen - var/required_other = 0 // an integer required for the reaction to happen - - var/result_amount = 0 - var/secondary = 0 // set to nonzero if secondary reaction - var/list/secondary_results = list() //additional reagents produced by the reaction - var/requires_heating = 0 - - 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/datum/effect/effect/system/reagents_explosion/e = new() - e.set_up(round (created_volume/10, 1), holder.my_atom, 0, 0) - e.holder_damage(holder.my_atom) - if(isliving(holder.my_atom)) - e.amount *= 0.5 - var/mob/living/L = holder.my_atom - if(L.stat!=DEAD) - e.amount *= 0.5 - e.start() - holder.clear_reagents() - return - - emp_pulse - name = "EMP Pulse" - id = "emp_pulse" - result = null - required_reagents = list("uranium" = 1, "iron" = 1) // Yes, laugh, it's the best recipe I could think of that makes a little bit of sense - result_amount = 2 - - on_reaction(var/datum/reagents/holder, var/created_volume) - var/location = get_turf(holder.my_atom) - // 100 created volume = 4 heavy range & 7 light range. A few tiles smaller than traitor EMP grandes. - // 200 created volume = 8 heavy range & 14 light range. 4 tiles larger than traitor EMP grenades. - empulse(location, round(created_volume / 24), round(created_volume / 14), 1) - holder.clear_reagents() - return - - silicate - name = "Silicate" - id = "silicate" - result = "silicate" - required_reagents = list("aluminum" = 1, "silicon" = 1, "oxygen" = 1) - result_amount = 3 - - stoxin - name = "Soporific" - 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 = "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 - - tramadol - name = "Tramadol" - id = "tramadol" - result = "tramadol" - required_reagents = list("inaprovaline" = 1, "ethanol" = 1, "oxygen" = 1) - result_amount = 3 - - paracetamol - name = "Paracetamol" - id = "paracetamol" - result = "paracetamol" - required_reagents = list("tramadol" = 1, "sugar" = 1, "water" = 1) - result_amount = 3 - - oxycodone - name = "Oxycodone" - id = "oxycodone" - result = "oxycodone" - required_reagents = list("ethanol" = 1, "tramadol" = 1) - required_catalysts = list("phoron" = 1) - result_amount = 1 - - //cyanide - // name = "Cyanide" - // id = "cyanide" - // result = "cyanide" - // required_reagents = list("hydrogen" = 1, "carbon" = 1, "nitrogen" = 1) - // result_amount = 1 - - water //I can't believe we never had this. - name = "Water" - id = "water" - result = "water" - required_reagents = list("oxygen" = 1, "hydrogen" = 2) - 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("phoron" = 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 - - peridaxon - name = "Peridaxon" - id = "peridaxon" - result = "peridaxon" - required_reagents = list("bicaridine" = 2, "clonexadone" = 2) - required_catalysts = list("phoron" = 5) - result_amount = 2 - - virus_food - name = "Virus Food" - id = "virusfood" - result = "virusfood" - required_reagents = list("water" = 1, "milk" = 1) - result_amount = 5 - - leporazine - name = "Leporazine" - id = "leporazine" - result = "leporazine" - required_reagents = list("silicon" = 1, "copper" = 1) - required_catalysts = list("phoron" = 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, "phoron" = 0.1) - required_catalysts = list("phoron" = 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, "phoron" = 0.1) - required_catalysts = list("phoron" = 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/datum/effect/effect/system/reagents_explosion/e = new() - e.set_up(round (created_volume/2, 1), holder.my_atom, 0, 0) - e.holder_damage(holder.my_atom) - if(isliving(holder.my_atom)) - e.amount *= 0.5 - var/mob/living/L = holder.my_atom - if(L.stat!=DEAD) - e.amount *= 0.5 - 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, "phoron" = 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)) - target_tile.assume_gas("volatile_fuel", created_volume, 400+T0C) - 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 = 0.4 - secondary = 1 - on_reaction(var/datum/reagents/holder, var/created_volume) - var/location = get_turf(holder.my_atom) - var/datum/effect/effect/system/smoke_spread/chem/S = new /datum/effect/effect/system/smoke_spread/chem - S.attach(location) - S.set_up(holder, created_volume, 0, location) - playsound(location, 'sound/effects/smoke.ogg', 50, 1, -3) - spawn(0) - 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 - - potassium_chloride - name = "Potassium Chloride" - id = "potassium_chloride" - result = "potassium_chloride" - required_reagents = list("sodiumchloride" = 1, "potassium" = 1) - result_amount = 2 - - potassium_chlorophoride - name = "Potassium Chlorophoride" - id = "potassium_chlorophoride" - result = "potassium_chlorophoride" - required_reagents = list("potassium_chloride" = 1, "phoron" = 1, "chloralhydrate" = 1) - result_amount = 4 - - stoxin - name = "Soporific" - id = "stoxin" - result = "stoxin" - required_reagents = list("chloralhydrate" = 1, "sugar" = 4) - result_amount = 5 - - zombiepowder - name = "Zombie Powder" - id = "zombiepowder" - result = "zombiepowder" - required_reagents = list("carpotoxin" = 5, "stoxin" = 5, "copper" = 5) - result_amount = 2 - - rezadone - name = "Rezadone" - id = "rezadone" - result = "rezadone" - required_reagents = list("carpotoxin" = 1, "cryptobiolin" = 1, "copper" = 1) - result_amount = 3 - - mindbreaker - name = "Mindbreaker Toxin" - id = "mindbreaker" - result = "mindbreaker" - required_reagents = list("silicon" = 1, "hydrogen" = 1, "anti_toxin" = 1) - result_amount = 3 - - lipozine - name = "Lipozine" - id = "Lipozine" - result = "lipozine" - required_reagents = list("sodiumchloride" = 1, "ethanol" = 1, "radium" = 1) - result_amount = 3 - - phoronsolidification - name = "Solid Phoron" - id = "solidphoron" - result = null - required_reagents = list("iron" = 5, "frostoil" = 5, "phoron" = 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/mineral/phoron(location) - return - - plastication - name = "Plastic" - id = "solidplastic" - result = null - required_reagents = list("pacid" = 10, "plasticide" = 20) - result_amount = 1 - on_reaction(var/datum/reagents/holder) - new /obj/item/stack/sheet/mineral/plastic(get_turf(holder.my_atom),10) - return - - virus_food - name = "Virus Food" - id = "virusfood" - result = "virusfood" - required_reagents = list("water" = 5, "milk" = 5, "oxygen" = 5) - result_amount = 15 -/* - mix_virus - name = "Mix Virus" - id = "mixvirus" - result = "blood" - required_reagents = list("virusfood" = 5) - required_catalysts = list("blood") - var/level = 2 - - on_reaction(var/datum/reagents/holder, var/created_volume) - - var/datum/reagent/blood/B = locate(/datum/reagent/blood) in holder.reagent_list - if(B && B.data) - var/datum/disease/advance/D = locate(/datum/disease/advance) in B.data["viruses"] - if(D) - D.Evolve(level - rand(0, 1)) - - - mix_virus_2 - - name = "Mix Virus 2" - id = "mixvirus2" - required_reagents = list("mutagen" = 5) - level = 4 - - rem_virus - - name = "Devolve Virus" - id = "remvirus" - required_reagents = list("synaptizine" = 5) - - on_reaction(var/datum/reagents/holder, var/created_volume) - - var/datum/reagent/blood/B = locate(/datum/reagent/blood) in holder.reagent_list - if(B && B.data) - var/datum/disease/advance/D = locate(/datum/disease/advance) in B.data["viruses"] - if(D) - D.Devolve() -*/ - condensedcapsaicin - name = "Condensed Capsaicin" - id = "condensedcapsaicin" - result = "condensedcapsaicin" - required_reagents = list("capsaicin" = 2) - required_catalysts = list("phoron" = 5) - result_amount = 1 - - ketchup - name = "Ketchup" - id = "ketchup" - result = "ketchup" - required_reagents = list("tomatojuice" = 2, "water" = 1, "sugar" = 1) - result_amount = 4 - -/////////////////////////////////////////////////////////////////////////////////// - -// 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 - - -/////////////////////////////////////OLD SLIME CORE REACTIONS /////////////////////////////// -/* - slimepepper - name = "Slime Condensedcapaicin" - id = "m_condensedcapaicin" - result = "condensedcapsaicin" - required_reagents = list("sugar" = 1) - result_amount = 1 - required_container = /obj/item/slime_core - required_other = 1 - slimefrost - name = "Slime Frost Oil" - id = "m_frostoil" - result = "frostoil" - required_reagents = list("water" = 1) - result_amount = 1 - required_container = /obj/item/slime_core - required_other = 1 - slimeglycerol - name = "Slime Glycerol" - id = "m_glycerol" - result = "glycerol" - required_reagents = list("blood" = 1) - result_amount = 1 - required_container = /obj/item/slime_core - required_other = 1 - - slime_explosion - name = "Slime Explosion" - id = "m_explosion" - result = null - required_reagents = list("blood" = 1) - result_amount = 2 - required_container = /obj/item/slime_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 - slimejam - name = "Slime Jam" - id = "m_jam" - result = "slimejelly" - required_reagents = list("water" = 1) - result_amount = 1 - required_container = /obj/item/slime_core - required_other = 2 - slimesynthi - name = "Slime Synthetic Flesh" - id = "m_flesh" - result = null - required_reagents = list("sugar" = 1) - result_amount = 1 - required_container = /obj/item/slime_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 - - slimeenzyme - name = "Slime Enzyme" - id = "m_enzyme" - result = "enzyme" - required_reagents = list("blood" = 1, "water" = 1) - result_amount = 2 - required_container = /obj/item/slime_core - required_other = 3 - slimeplasma - name = "Slime Plasma" - id = "m_plasma" - result = "plasma" - required_reagents = list("sugar" = 1, "blood" = 2) - result_amount = 2 - required_container = /obj/item/slime_core - required_other = 3 - slimevirus - name = "Slime Virus" - id = "m_virus" - result = null - required_reagents = list("sugar" = 1, "sacid" = 1) - result_amount = 2 - required_container = /obj/item/slime_core - required_other = 3 - on_reaction(var/datum/reagents/holder, var/created_volume) - holder.clear_reagents() - - var/virus = pick(/datum/disease/advance/flu, /datum/disease/advance/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 - - slimeteleport - name = "Slime 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/slime_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(holder.my_atom) // the turf of origin we're travelling FROM - var/turf/TO = get_turf(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) - 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) - slimecrit - name = "Slime Crit" - id = "m_tele" - result = null - required_reagents = list("sacid" = 1, "blood" = 1) - required_catalysts = list("plasma" = 1) - result_amount = 1 - required_container = /obj/item/slime_core - required_other = 4 - on_reaction(var/datum/reagents/holder, var/created_volume) - - var/blocked = list(/mob/living/simple_animal/hostile, - /mob/living/simple_animal/hostile/pirate, - /mob/living/simple_animal/hostile/pirate/ranged, - /mob/living/simple_animal/hostile/russian, - /mob/living/simple_animal/hostile/russian/ranged, - /mob/living/simple_animal/hostile/syndicate, - /mob/living/simple_animal/hostile/syndicate/melee, - /mob/living/simple_animal/hostile/syndicate/melee/space, - /mob/living/simple_animal/hostile/syndicate/ranged, - /mob/living/simple_animal/hostile/syndicate/ranged/space, - /mob/living/simple_animal/hostile/alien/queen/large, - /mob/living/simple_animal/clown - )//exclusion list for things you don't want the reaction to create. - var/list/critters = typesof(/mob/living/simple_animal/hostile) - blocked // list of possible hostile mobs - - playsound(get_turf(holder.my_atom), 'sound/effects/phasein.ogg', 100, 1) - - for(var/mob/living/carbon/human/M in viewers(get_turf(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/mob/living/simple_animal/hostile/C = new chosen - C.loc = get_turf(holder.my_atom) - if(prob(50)) - for(var/j = 1, j <= rand(1, 3), j++) - step(C, pick(NORTH,SOUTH,EAST,WEST)) - slimebork - name = "Slime Bork" - id = "m_tele" - result = null - required_reagents = list("sugar" = 1, "water" = 1) - result_amount = 2 - required_container = /obj/item/slime_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(holder.my_atom), 'sound/effects/phasein.ogg', 100, 1) - - for(var/mob/living/carbon/human/M in viewers(get_turf(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(holder.my_atom) - if(prob(50)) - for(var/j = 1, j <= rand(1, 3), j++) - step(B, pick(NORTH,SOUTH,EAST,WEST)) - - - - slimechloral - name = "Slime Chloral" - id = "m_bunch" - result = "chloralhydrate" - required_reagents = list("blood" = 1, "water" = 2) - result_amount = 2 - required_container = /obj/item/slime_core - required_other = 5 - slimeretro - name = "Slime Retro" - id = "m_xeno" - result = null - required_reagents = list("sugar" = 1) - result_amount = 1 - required_container = /obj/item/slime_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) - slimefoam - name = "Slime Foam" - id = "m_foam" - result = null - required_reagents = list("sacid" = 1) - result_amount = 2 - required_container = /obj/item/slime_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 -*/ -/////////////////////////////////////////////NEW SLIME CORE REACTIONS///////////////////////////////////////////// +/datum/chemical_reaction + var/name = null + var/id = null + var/result = null + var/list/required_reagents = list() + var/list/catalysts = list() + var/list/inhibitors = list() + + var/result_amount = 0 + var/mix_message = "The solution begins to bubble." + +/datum/chemical_reaction/proc/can_happen(var/datum/reagents/holder) + return 1 + +/datum/chemical_reaction/proc/on_reaction(var/datum/reagents/holder, var/created_volume) + return + +/datum/chemical_reaction/proc/send_data(var/datum/reagents/T) + return null + +/* Common reactions */ + +/datum/chemical_reaction/inaprovaline + name = "Inaprovaline" + id = "inaprovaline" + result = "inaprovaline" + required_reagents = list("oxygen" = 1, "carbon" = 1, "sugar" = 1) + result_amount = 3 + +/datum/chemical_reaction/dylovene + name = "Dylovene" + id = "anti_toxin" + result = "anti_toxin" + required_reagents = list("silicon" = 1, "potassium" = 1, "nitrogen" = 1) + result_amount = 3 + +/datum/chemical_reaction/tramadol + name = "Tramadol" + id = "tramadol" + result = "tramadol" + required_reagents = list("inaprovaline" = 1, "ethanol" = 1, "oxygen" = 1) + result_amount = 3 + +/datum/chemical_reaction/paracetamol + name = "Paracetamol" + id = "paracetamol" + result = "paracetamol" + required_reagents = list("tramadol" = 1, "sugar" = 1, "water" = 1) + result_amount = 3 + +/datum/chemical_reaction/oxycodone + name = "Oxycodone" + id = "oxycodone" + result = "oxycodone" + required_reagents = list("ethanol" = 1, "tramadol" = 1) + catalysts = list("phoron" = 1) + result_amount = 1 + +/datum/chemical_reaction/sterilizine + name = "Sterilizine" + id = "sterilizine" + result = "sterilizine" + required_reagents = list("ethanol" = 1, "anti_toxin" = 1, "chlorine" = 1) + result_amount = 3 + +/datum/chemical_reaction/silicate + name = "Silicate" + id = "silicate" + result = "silicate" + required_reagents = list("aluminum" = 1, "silicon" = 1, "oxygen" = 1) + result_amount = 3 + +/datum/chemical_reaction/mutagen + name = "Unstable mutagen" + id = "mutagen" + result = "mutagen" + required_reagents = list("radium" = 1, "phosphorus" = 1, "chlorine" = 1) + result_amount = 3 + +/datum/chemical_reaction/water + name = "Water" + id = "water" + result = "water" + required_reagents = list("oxygen" = 1, "hydrogen" = 2) + result_amount = 1 + +/datum/chemical_reaction/thermite + name = "Thermite" + id = "thermite" + result = "thermite" + required_reagents = list("aluminum" = 1, "iron" = 1, "oxygen" = 1) + result_amount = 3 + +/datum/chemical_reaction/space_drugs + name = "Space Drugs" + id = "space_drugs" + result = "space_drugs" + required_reagents = list("mercury" = 1, "sugar" = 1, "lithium" = 1) + result_amount = 3 + +/datum/chemical_reaction/lube + name = "Space Lube" + id = "lube" + result = "lube" + required_reagents = list("water" = 1, "silicon" = 1, "oxygen" = 1) + result_amount = 4 + +/datum/chemical_reaction/pacid + name = "Polytrinic acid" + id = "pacid" + result = "pacid" + required_reagents = list("sacid" = 1, "chlorine" = 1, "potassium" = 1) + result_amount = 3 + +/datum/chemical_reaction/synaptizine + name = "Synaptizine" + id = "synaptizine" + result = "synaptizine" + required_reagents = list("sugar" = 1, "lithium" = 1, "water" = 1) + result_amount = 3 + +/datum/chemical_reaction/hyronalin + name = "Hyronalin" + id = "hyronalin" + result = "hyronalin" + required_reagents = list("radium" = 1, "anti_toxin" = 1) + result_amount = 2 + +/datum/chemical_reaction/arithrazine + name = "Arithrazine" + id = "arithrazine" + result = "arithrazine" + required_reagents = list("hyronalin" = 1, "hydrogen" = 1) + result_amount = 2 + +/datum/chemical_reaction/impedrezene + name = "Impedrezene" + id = "impedrezene" + result = "impedrezene" + required_reagents = list("mercury" = 1, "oxygen" = 1, "sugar" = 1) + result_amount = 2 + +/datum/chemical_reaction/kelotane + name = "Kelotane" + id = "kelotane" + result = "kelotane" + required_reagents = list("silicon" = 1, "carbon" = 1) + result_amount = 2 + +/datum/chemical_reaction/peridaxon + name = "Peridaxon" + id = "peridaxon" + result = "peridaxon" + required_reagents = list("bicaridine" = 2, "clonexadone" = 2) + catalysts = list("phoron" = 1) + result_amount = 2 + +/datum/chemical_reaction/virus_food + name = "Virus Food" + id = "virusfood" + result = "virusfood" + required_reagents = list("water" = 1, "milk" = 1) + result_amount = 5 + +/datum/chemical_reaction/leporazine + name = "Leporazine" + id = "leporazine" + result = "leporazine" + required_reagents = list("silicon" = 1, "copper" = 1) + catalysts = list("phoron" = 1) + result_amount = 2 + +/datum/chemical_reaction/cryptobiolin + name = "Cryptobiolin" + id = "cryptobiolin" + result = "cryptobiolin" + required_reagents = list("potassium" = 1, "oxygen" = 1, "sugar" = 1) + result_amount = 3 + +/datum/chemical_reaction/tricordrazine + name = "Tricordrazine" + id = "tricordrazine" + result = "tricordrazine" + required_reagents = list("inaprovaline" = 1, "anti_toxin" = 1) + result_amount = 2 + +/datum/chemical_reaction/alkysine + name = "Alkysine" + id = "alkysine" + result = "alkysine" + required_reagents = list("chlorine" = 1, "nitrogen" = 1, "anti_toxin" = 1) + result_amount = 2 + +/datum/chemical_reaction/dexalin + name = "Dexalin" + id = "dexalin" + result = "dexalin" + required_reagents = list("oxygen" = 2, "phoron" = 0.1) + catalysts = list("phoron" = 1) + inhibitors = list("water" = 1) // Messes with cryox + result_amount = 1 + +/datum/chemical_reaction/dermaline + name = "Dermaline" + id = "dermaline" + result = "dermaline" + required_reagents = list("oxygen" = 1, "phosphorus" = 1, "kelotane" = 1) + result_amount = 3 + +/datum/chemical_reaction/dexalinp + name = "Dexalin Plus" + id = "dexalinp" + result = "dexalinp" + required_reagents = list("dexalin" = 1, "carbon" = 1, "iron" = 1) + result_amount = 3 + +/datum/chemical_reaction/bicaridine + name = "Bicaridine" + id = "bicaridine" + result = "bicaridine" + required_reagents = list("inaprovaline" = 1, "carbon" = 1) + inhibitors = list("sugar" = 1) // Messes up with inaprovaline + result_amount = 2 + +/datum/chemical_reaction/metorapan + name = "Metorapan" + id = "metorapan" + result = "metorapan" + required_reagents = list("bicaridine" = 1, "iron" = 1, "nitrogen" = 1) + result_amount = 3 + +/datum/chemical_reaction/hyperzine + name = "Hyperzine" + id = "hyperzine" + result = "hyperzine" + required_reagents = list("sugar" = 1, "phosphorus" = 1, "sulfur" = 1) + result_amount = 3 + +/datum/chemical_reaction/ryetalyn + name = "Ryetalyn" + id = "ryetalyn" + result = "ryetalyn" + required_reagents = list("arithrazine" = 1, "carbon" = 1) + result_amount = 2 + +/datum/chemical_reaction/cryoxadone + name = "Cryoxadone" + id = "cryoxadone" + result = "cryoxadone" + required_reagents = list("dexalin" = 1, "water" = 1, "oxygen" = 1) + result_amount = 3 + +/datum/chemical_reaction/clonexadone + name = "Clonexadone" + id = "clonexadone" + result = "clonexadone" + required_reagents = list("cryoxadone" = 1, "sodium" = 1, "phoron" = 0.1) + catalysts = list("phoron" = 1) + result_amount = 2 + +/datum/chemical_reaction/spaceacillin + name = "Spaceacillin" + id = "spaceacillin" + result = "spaceacillin" + required_reagents = list("cryptobiolin" = 1, "inaprovaline" = 1) + result_amount = 2 + +/datum/chemical_reaction/imidazoline + name = "imidazoline" + id = "imidazoline" + result = "imidazoline" + required_reagents = list("carbon" = 1, "hydrogen" = 1, "anti_toxin" = 1) + result_amount = 2 + +/datum/chemical_reaction/ethylredoxrazine + name = "Ethylredoxrazine" + id = "ethylredoxrazine" + result = "ethylredoxrazine" + required_reagents = list("oxygen" = 1, "anti_toxin" = 1, "carbon" = 1) + result_amount = 3 + +/datum/chemical_reaction/soporific + name = "Soporific" + id = "stoxin" + result = "stoxin" + required_reagents = list("chloralhydrate" = 1, "sugar" = 4) + inhibitors = list("phosphorus") // Messes with the smoke + result_amount = 5 + +/datum/chemical_reaction/chloralhydrate + name = "Chloral Hydrate" + id = "chloralhydrate" + result = "chloralhydrate" + required_reagents = list("ethanol" = 1, "chlorine" = 3, "water" = 1) + result_amount = 1 + +/datum/chemical_reaction/potassium_chloride + name = "Potassium Chloride" + id = "potassium_chloride" + result = "potassium_chloride" + required_reagents = list("sodiumchloride" = 1, "potassium" = 1) + result_amount = 2 + +/datum/chemical_reaction/potassium_chlorophoride + name = "Potassium Chlorophoride" + id = "potassium_chlorophoride" + result = "potassium_chlorophoride" + required_reagents = list("potassium_chloride" = 1, "phoron" = 1, "chloralhydrate" = 1) + result_amount = 4 + +/datum/chemical_reaction/zombiepowder + name = "Zombie Powder" + id = "zombiepowder" + result = "zombiepowder" + required_reagents = list("carpotoxin" = 5, "stoxin" = 5, "copper" = 5) + result_amount = 2 + +/datum/chemical_reaction/mindbreaker + name = "Mindbreaker Toxin" + id = "mindbreaker" + result = "mindbreaker" + required_reagents = list("silicon" = 1, "hydrogen" = 1, "anti_toxin" = 1) + result_amount = 3 + +/datum/chemical_reaction/lipozine + name = "Lipozine" + id = "Lipozine" + result = "lipozine" + required_reagents = list("sodiumchloride" = 1, "ethanol" = 1, "radium" = 1) + result_amount = 3 + +/datum/chemical_reaction/surfactant + name = "Foam surfactant" + id = "foam surfactant" + result = "fluorosurfactant" + required_reagents = list("fluorine" = 2, "carbon" = 2, "sacid" = 1) + result_amount = 5 + +/datum/chemical_reaction/ammonia + name = "Ammonia" + id = "ammonia" + result = "ammonia" + required_reagents = list("hydrogen" = 3, "nitrogen" = 1) + result_amount = 3 + +/datum/chemical_reaction/diethylamine + name = "Diethylamine" + id = "diethylamine" + result = "diethylamine" + required_reagents = list ("ammonia" = 1, "ethanol" = 1) + result_amount = 2 + +/datum/chemical_reaction/space_cleaner + name = "Space cleaner" + id = "cleaner" + result = "cleaner" + required_reagents = list("ammonia" = 1, "water" = 1) + result_amount = 2 + +/datum/chemical_reaction/plantbgone + name = "Plant-B-Gone" + id = "plantbgone" + result = "plantbgone" + required_reagents = list("toxin" = 1, "water" = 4) + result_amount = 5 + +/datum/chemical_reaction/foaming_agent + name = "Foaming Agent" + id = "foaming_agent" + result = "foaming_agent" + required_reagents = list("lithium" = 1, "hydrogen" = 1) + result_amount = 1 + +/datum/chemical_reaction/glycerol + name = "Glycerol" + id = "glycerol" + result = "glycerol" + required_reagents = list("cornoil" = 3, "sacid" = 1) + result_amount = 1 + +/datum/chemical_reaction/sodiumchloride + name = "Sodium Chloride" + id = "sodiumchloride" + result = "sodiumchloride" + required_reagents = list("sodium" = 1, "chlorine" = 1) + result_amount = 2 + +/datum/chemical_reaction/condensedcapsaicin + name = "Condensed Capsaicin" + id = "condensedcapsaicin" + result = "condensedcapsaicin" + required_reagents = list("capsaicin" = 2) + catalysts = list("phoron" = 1) + result_amount = 1 + +/datum/chemical_reaction/coolant + name = "Coolant" + id = "coolant" + result = "coolant" + required_reagents = list("tungsten" = 1, "oxygen" = 1, "water" = 1) + result_amount = 3 + +/datum/chemical_reaction/rezadone + name = "Rezadone" + id = "rezadone" + result = "rezadone" + required_reagents = list("carpotoxin" = 1, "cryptobiolin" = 1, "copper" = 1) + result_amount = 3 + +/datum/chemical_reaction/lexorin + name = "Lexorin" + id = "lexorin" + result = "lexorin" + required_reagents = list("phoron" = 1, "hydrogen" = 1, "nitrogen" = 1) + result_amount = 3 + +/datum/chemical_reaction/methylphenidate + name = "Methylphenidate" + id = "methylphenidate" + result = "methylphenidate" + required_reagents = list("mindbreaker" = 1, "hydrogen" = 1) + result_amount = 3 + +/datum/chemical_reaction/citalopram + name = "Citalopram" + id = "citalopram" + result = "citalopram" + required_reagents = list("mindbreaker" = 1, "carbon" = 1) + result_amount = 3 + + +/datum/chemical_reaction/paroxetine + name = "Paroxetine" + id = "paroxetine" + result = "paroxetine" + required_reagents = list("mindbreaker" = 1, "oxygen" = 1, "inaprovaline" = 1) + result_amount = 3 + +/* Solidification */ + +/datum/chemical_reaction/phoronsolidification + name = "Solid Phoron" + id = "solidphoron" + result = null + required_reagents = list("iron" = 5, "frostoil" = 5, "phoron" = 20) + result_amount = 1 + +/datum/chemical_reaction/phoronsolidification/on_reaction(var/datum/reagents/holder, var/created_volume) + var/location = get_turf(holder.my_atom) + new /obj/item/stack/sheet/mineral/phoron(location) + return + +/datum/chemical_reaction/plastication + name = "Plastic" + id = "solidplastic" + result = null + required_reagents = list("pacid" = 1, "plasticide" = 2) + result_amount = 1 + +/datum/chemical_reaction/plastication/on_reaction(var/datum/reagents/holder, var/created_volume) + new /obj/item/stack/sheet/mineral/plastic(get_turf(holder.my_atom), created_volume) + return + +/* Grenade reactions */ + +/datum/chemical_reaction/explosion_potassium + name = "Explosion" + id = "explosion_potassium" + result = null + required_reagents = list("water" = 1, "potassium" = 1) + result_amount = 2 + mix_message = null + +/datum/chemical_reaction/explosion_potassium/on_reaction(var/datum/reagents/holder, var/created_volume) + var/datum/effect/effect/system/reagents_explosion/e = new() + e.set_up(round (created_volume/10, 1), holder.my_atom, 0, 0) + e.holder_damage(holder.my_atom) + if(isliving(holder.my_atom)) + e.amount *= 0.5 + var/mob/living/L = holder.my_atom + if(L.stat != DEAD) + e.amount *= 0.5 + e.start() + holder.clear_reagents() + return + +/datum/chemical_reaction/flash_powder + name = "Flash powder" + id = "flash_powder" + result = null + required_reagents = list("aluminum" = 1, "potassium" = 1, "sulfur" = 1 ) + result_amount = null + +/datum/chemical_reaction/flash_powder/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) + +/datum/chemical_reaction/emp_pulse + name = "EMP Pulse" + id = "emp_pulse" + result = null + required_reagents = list("uranium" = 1, "iron" = 1) // Yes, laugh, it's the best recipe I could think of that makes a little bit of sense + result_amount = 2 + +/datum/chemical_reaction/emp_pulse/on_reaction(var/datum/reagents/holder, var/created_volume) + var/location = get_turf(holder.my_atom) + // 100 created volume = 4 heavy range & 7 light range. A few tiles smaller than traitor EMP grandes. + // 200 created volume = 8 heavy range & 14 light range. 4 tiles larger than traitor EMP grenades. + empulse(location, round(created_volume / 24), round(created_volume / 14), 1) + holder.clear_reagents() + return + +/datum/chemical_reaction/nitroglycerin + name = "Nitroglycerin" + id = "nitroglycerin" + result = "nitroglycerin" + required_reagents = list("glycerol" = 1, "pacid" = 1, "sacid" = 1) + result_amount = 2 + +/datum/chemical_reaction/nitroglycerin/on_reaction(var/datum/reagents/holder, var/created_volume) + var/datum/effect/effect/system/reagents_explosion/e = new() + e.set_up(round (created_volume/2, 1), holder.my_atom, 0, 0) + e.holder_damage(holder.my_atom) + if(isliving(holder.my_atom)) + e.amount *= 0.5 + var/mob/living/L = holder.my_atom + if(L.stat!=DEAD) + e.amount *= 0.5 + e.start() + + holder.clear_reagents() + return + +/datum/chemical_reaction/napalm + name = "Napalm" + id = "napalm" + result = null + required_reagents = list("aluminum" = 1, "phoron" = 1, "sacid" = 1 ) + result_amount = 1 + +/datum/chemical_reaction/napalm/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)) + target_tile.assume_gas("volatile_fuel", created_volume, 400+T0C) + spawn (0) target_tile.hotspot_expose(700, 400) + holder.del_reagent("napalm") + return + +/datum/chemical_reaction/chemsmoke + name = "Chemsmoke" + id = "chemsmoke" + result = null + required_reagents = list("potassium" = 1, "sugar" = 1, "phosphorus" = 1) + result_amount = 0.4 + +/datum/chemical_reaction/chemsmoke/on_reaction(var/datum/reagents/holder, var/created_volume) + var/location = get_turf(holder.my_atom) + var/datum/effect/effect/system/smoke_spread/chem/S = new /datum/effect/effect/system/smoke_spread/chem + S.attach(location) + S.set_up(holder, created_volume, 0, location) + playsound(location, 'sound/effects/smoke.ogg', 50, 1, -3) + spawn(0) + S.start() + holder.clear_reagents() + return + +/datum/chemical_reaction/foam + name = "Foam" + id = "foam" + result = null + required_reagents = list("fluorosurfactant" = 1, "water" = 1) + result_amount = 2 + mix_message = "The solution violently bubbles!" + +/datum/chemical_reaction/foam/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 foam!" + + var/datum/effect/effect/system/foam_spread/s = new() + s.set_up(created_volume, location, holder, 0) + s.start() + holder.clear_reagents() + return + +/datum/chemical_reaction/metalfoam + name = "Metal Foam" + id = "metalfoam" + result = null + required_reagents = list("aluminum" = 3, "foaming_agent" = 1, "pacid" = 1) + result_amount = 5 + +/datum/chemical_reaction/metalfoam/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 + +/datum/chemical_reaction/ironfoam + name = "Iron Foam" + id = "ironlfoam" + result = null + required_reagents = list("iron" = 3, "foaming_agent" = 1, "pacid" = 1) + result_amount = 5 + +/datum/chemical_reaction/ironfoam/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 + +/* Paint */ + +/datum/chemical_reaction/red_paint + name = "Red paint" + id = "red_paint" + result = "paint" + required_reagents = list("plasticide" = 1, "water" = 3, "crayon_dust_red" = 1) + result_amount = 5 + +/datum/chemical_reaction/red_paint/send_data() + return "#FE191A" + +/datum/chemical_reaction/orange_paint + name = "Orange paint" + id = "orange_paint" + result = "paint" + required_reagents = list("plasticide" = 1, "water" = 3, "crayon_dust_orange" = 1) + result_amount = 5 + +/datum/chemical_reaction/orange_paint/send_data() + return "#FFBE4F" + +/datum/chemical_reaction/yellow_paint + name = "Yellow paint" + id = "yellow_paint" + result = "paint" + required_reagents = list("plasticide" = 1, "water" = 3, "crayon_dust_yellow" = 1) + result_amount = 5 + +/datum/chemical_reaction/yellow_paint/send_data() + return "#FDFE7D" + +/datum/chemical_reaction/green_paint + name = "Green paint" + id = "green_paint" + result = "paint" + required_reagents = list("plasticide" = 1, "water" = 3, "crayon_dust_green" = 1) + result_amount = 5 + +/datum/chemical_reaction/green_paint/send_data() + return "#18A31A" + +/datum/chemical_reaction/blue_paint + name = "Blue paint" + id = "blue_paint" + result = "paint" + required_reagents = list("plasticide" = 1, "water" = 3, "crayon_dust_blue" = 1) + result_amount = 5 + +/datum/chemical_reaction/blue_paint/send_data() + return "#247CFF" + +/datum/chemical_reaction/purple_paint + name = "Purple paint" + id = "purple_paint" + result = "paint" + required_reagents = list("plasticide" = 1, "water" = 3, "crayon_dust_purple" = 1) + result_amount = 5 + +/datum/chemical_reaction/purple_paint/send_data() + return "#CC0099" + +/datum/chemical_reaction/grey_paint //mime + name = "Grey paint" + id = "grey_paint" + result = "paint" + required_reagents = list("plasticide" = 1, "water" = 3, "crayon_dust_grey" = 1) + result_amount = 5 + +/datum/chemical_reaction/grey_paint/send_data() + return "#808080" + +/datum/chemical_reaction/brown_paint + name = "Brown paint" + id = "brown_paint" + result = "paint" + required_reagents = list("plasticide" = 1, "water" = 3, "crayon_dust_brown" = 1) + result_amount = 5 + +/datum/chemical_reaction/brown_paint/send_data() + return "#846F35" + +/datum/chemical_reaction/blood_paint + name = "Blood paint" + id = "blood_paint" + result = "paint" + required_reagents = list("plasticide" = 1, "water" = 3, "blood" = 2) + result_amount = 5 + +/datum/chemical_reaction/blood_paint/send_data(var/datum/reagents/T) + var/t = T.get_data("blood") + if(t && t["blood_colour"]) + return t["blood_colour"] + return "#FE191A" // Probably red + +/datum/chemical_reaction/milk_paint + name = "Milk paint" + id = "milk_paint" + result = "paint" + required_reagents = list("plasticide" = 1, "water" = 3, "milk" = 5) + result_amount = 5 + +/datum/chemical_reaction/milk_paint/send_data() + return "#F0F8FF" + +/datum/chemical_reaction/orange_juice_paint + name = "Orange juice paint" + id = "orange_juice_paint" + result = "paint" + required_reagents = list("plasticide" = 1, "water" = 3, "orangejuice" = 5) + result_amount = 5 + +/datum/chemical_reaction/orange_juice_paint/send_data() + return "#E78108" + +/datum/chemical_reaction/tomato_juice_paint + name = "Tomato juice paint" + id = "tomato_juice_paint" + result = "paint" + required_reagents = list("plasticide" = 1, "water" = 3, "tomatojuice" = 5) + result_amount = 5 + +/datum/chemical_reaction/tomato_juice_paint/send_data() + return "#731008" + +/datum/chemical_reaction/lime_juice_paint + name = "Lime juice paint" + id = "lime_juice_paint" + result = "paint" + required_reagents = list("plasticide" = 1, "water" = 3, "limejuice" = 5) + result_amount = 5 + +/datum/chemical_reaction/lime_juice_paint/send_data() + return "#365E30" + +/datum/chemical_reaction/carrot_juice_paint + name = "Carrot juice paint" + id = "carrot_juice_paint" + result = "paint" + required_reagents = list("plasticide" = 1, "water" = 3, "carrotjuice" = 5) + result_amount = 5 + +/datum/chemical_reaction/carrot_juice_paint/send_data() + return "#973800" + +/datum/chemical_reaction/berry_juice_paint + name = "Berry juice paint" + id = "berry_juice_paint" + result = "paint" + required_reagents = list("plasticide" = 1, "water" = 3, "berryjuice" = 5) + result_amount = 5 + +/datum/chemical_reaction/berry_juice_paint/send_data() + return "#990066" + +/datum/chemical_reaction/grape_juice_paint + name = "Grape juice paint" + id = "grape_juice_paint" + result = "paint" + required_reagents = list("plasticide" = 1, "water" = 3, "grapejuice" = 5) + result_amount = 5 + +/datum/chemical_reaction/grape_juice_paint/send_data() + return "#863333" + +/datum/chemical_reaction/poisonberry_juice_paint + name = "Poison berry juice paint" + id = "poisonberry_juice_paint" + result = "paint" + required_reagents = list("plasticide" = 1, "water" = 3, "poisonberryjuice" = 5) + result_amount = 5 + +/datum/chemical_reaction/poisonberry_juice_paint/send_data() + return "#863353" + +/datum/chemical_reaction/watermelon_juice_paint + name = "Watermelon juice paint" + id = "watermelon_juice_paint" + result = "paint" + required_reagents = list("plasticide" = 1, "water" = 3, "watermelonjuice" = 5) + result_amount = 5 + +/datum/chemical_reaction/watermelon_juice_paint/send_data() + return "#B83333" + +/datum/chemical_reaction/lemon_juice_paint + name = "Lemon juice paint" + id = "lemon_juice_paint" + result = "paint" + required_reagents = list("plasticide" = 1, "water" = 3, "lemonjuice" = 5) + result_amount = 5 + +/datum/chemical_reaction/lemon_juice_paint/send_data() + return "#AFAF00" + +/datum/chemical_reaction/banana_juice_paint + name = "Banana juice paint" + id = "banana_juice_paint" + result = "paint" + required_reagents = list("plasticide" = 1, "water" = 3, "banana" = 5) + result_amount = 5 + +/datum/chemical_reaction/banana_juice_paint/send_data() + return "#C3AF00" + +/datum/chemical_reaction/potato_juice_paint + name = "Potato juice paint" + id = "potato_juice_paint" + result = "paint" + required_reagents = list("plasticide" = 1, "water" = 3, "potatojuice" = 5) + result_amount = 5 + +/datum/chemical_reaction/potato_juice_paint/send_data() + return "#302000" + +/datum/chemical_reaction/carbon_paint + name = "Carbon paint" + id = "carbon_paint" + result = "paint" + required_reagents = list("plasticide" = 1, "water" = 3, "carbon" = 1) + result_amount = 5 + +/datum/chemical_reaction/carbon_paint/send_data() + return "#333333" + +/datum/chemical_reaction/aluminum_paint + name = "Aluminum paint" + id = "aluminum_paint" + result = "paint" + required_reagents = list("plasticide" = 1, "water" = 3, "aluminum" = 1) + result_amount = 5 + +/datum/chemical_reaction/aluminum_paint/send_data() + return "#F0F8FF" + +/* Slime cores */ + +/datum/chemical_reaction/slime + var/required = null + +/datum/chemical_reaction/slime/can_happen(var/datum/reagents/holder) + if(holder.my_atom && istype(holder.my_atom, required)) + var/obj/item/slime_extract/T = holder.my_atom + if(T.Uses > 0) + return 1 + return 0 + +/datum/chemical_reaction/slime/on_reaction(var/datum/reagents/holder) + var/obj/item/slime_extract/T = holder.my_atom + T.Uses-- + if(T.Uses <= 0) + T.visible_message("\icon[T]\The [T]'s power is consumed in the reaction.") + T.name = "used slime extract" + T.desc = "This extract has been used up." //Grey - slimespawn - name = "Slime Spawn" - id = "m_spawn" - result = null - required_reagents = list("phoron" = 5) - result_amount = 1 - required_container = /obj/item/slime_extract/grey - required_other = 1 - on_reaction(var/datum/reagents/holder) - for(var/mob/O in viewers(get_turf(holder.my_atom), null)) - O.show_message(text("\red Infused with phoron, the core begins to quiver and grow, and soon a new baby slime emerges from it!"), 1) - var/mob/living/carbon/slime/S = new /mob/living/carbon/slime - S.loc = get_turf(holder.my_atom) +/datum/chemical_reaction/slime/spawn + name = "Slime Spawn" + id = "m_spawn" + result = null + required_reagents = list("phoron" = 1) + result_amount = 1 + required = /obj/item/slime_extract/grey +/datum/chemical_reaction/slime/spawn/on_reaction(var/datum/reagents/holder) + holder.my_atom.visible_message("Infused with phoron, the core begins to quiver and grow, and soon a new baby slime emerges from it!") + var/mob/living/carbon/slime/S = new /mob/living/carbon/slime + S.loc = get_turf(holder.my_atom) + ..() - slimemonkey - name = "Slime Monkey" - id = "m_monkey" - result = null - required_reagents = list("blood" = 5) - result_amount = 1 - required_container = /obj/item/slime_extract/grey - required_other = 1 - on_reaction(var/datum/reagents/holder) - for(var/i = 1, i <= 3, i++) - var /obj/item/weapon/reagent_containers/food/snacks/monkeycube/M = new /obj/item/weapon/reagent_containers/food/snacks/monkeycube - M.loc = get_turf(holder.my_atom) +/datum/chemical_reaction/slime/monkey + name = "Slime Monkey" + id = "m_monkey" + result = null + required_reagents = list("blood" = 1) + result_amount = 1 + required = /obj/item/slime_extract/grey + +/datum/chemical_reaction/slime/monkey/on_reaction(var/datum/reagents/holder) + for(var/i = 1, i <= 3, i++) + var /obj/item/weapon/reagent_containers/food/snacks/monkeycube/M = new /obj/item/weapon/reagent_containers/food/snacks/monkeycube + M.loc = get_turf(holder.my_atom) + ..() //Green - slimemutate - name = "Mutation Toxin" - id = "mutationtoxin" - result = "mutationtoxin" - required_reagents = list("phoron" = 5) - result_amount = 1 - required_other = 1 - required_container = /obj/item/slime_extract/green +/datum/chemical_reaction/slime/mutate + name = "Mutation Toxin" + id = "mutationtoxin" + result = "mutationtoxin" + required_reagents = list("phoron" = 1) + result_amount = 1 + required = /obj/item/slime_extract/green //Metal - slimemetal - name = "Slime Metal" - id = "m_metal" - result = null - required_reagents = list("phoron" = 5) - result_amount = 1 - required_container = /obj/item/slime_extract/metal - required_other = 1 - on_reaction(var/datum/reagents/holder) - var/obj/item/stack/sheet/metal/M = new /obj/item/stack/sheet/metal - M.amount = 15 - M.loc = get_turf(holder.my_atom) - var/obj/item/stack/sheet/plasteel/P = new /obj/item/stack/sheet/plasteel - P.amount = 5 - P.loc = get_turf(holder.my_atom) +/datum/chemical_reaction/slime/metal + name = "Slime Metal" + id = "m_metal" + result = null + required_reagents = list("phoron" = 1) + result_amount = 1 + required = /obj/item/slime_extract/metal -//Gold - slimecrit - name = "Slime Crit" - id = "m_tele" - result = null - required_reagents = list("phoron" = 5) - result_amount = 1 - required_container = /obj/item/slime_extract/gold - required_other = 1 - on_reaction(var/datum/reagents/holder) +/datum/chemical_reaction/slime/metal/on_reaction(var/datum/reagents/holder) + var/obj/item/stack/sheet/metal/M = new /obj/item/stack/sheet/metal + M.amount = 15 + M.loc = get_turf(holder.my_atom) + var/obj/item/stack/sheet/plasteel/P = new /obj/item/stack/sheet/plasteel + P.amount = 5 + P.loc = get_turf(holder.my_atom) + ..() - /*var/blocked = list(/mob/living/simple_animal/hostile, - /mob/living/simple_animal/hostile/pirate, - /mob/living/simple_animal/hostile/pirate/ranged, - /mob/living/simple_animal/hostile/russian, - /mob/living/simple_animal/hostile/russian/ranged, - /mob/living/simple_animal/hostile/syndicate, - /mob/living/simple_animal/hostile/syndicate/melee, - /mob/living/simple_animal/hostile/syndicate/melee/space, - /mob/living/simple_animal/hostile/syndicate/ranged, - /mob/living/simple_animal/hostile/syndicate/ranged/space, - /mob/living/simple_animal/hostile/alien/queen/large, - /mob/living/simple_animal/hostile/faithless, - /mob/living/simple_animal/hostile/panther, - /mob/living/simple_animal/hostile/snake, - /mob/living/simple_animal/hostile/retaliate, - /mob/living/simple_animal/hostile/retaliate/clown - )//exclusion list for things you don't want the reaction to create. - var/list/critters = typesof(/mob/living/simple_animal/hostile) - blocked // list of possible hostile mobs - - playsound(get_turf(holder.my_atom), 'sound/effects/phasein.ogg', 100, 1) - - for(var/mob/living/carbon/human/M in viewers(get_turf(holder.my_atom), null)) - if(M:eyecheck() <= 0) - flick("e_flash", M.flash) - - for(var/i = 1, i <= 5, i++) - var/chosen = pick(critters) - var/mob/living/simple_animal/hostile/C = new chosen - C.faction = "slimesummon" - C.loc = get_turf(holder.my_atom) - if(prob(50)) - for(var/j = 1, j <= rand(1, 3), j++) - step(C, pick(NORTH,SOUTH,EAST,WEST))*/ - for(var/mob/O in viewers(get_turf(holder.my_atom), null)) - O.show_message(text("\red The slime core fizzles disappointingly,"), 1) +//Gold - removed +/datum/chemical_reaction/slime/crit + name = "Slime Crit" + id = "m_tele" + result = null + required_reagents = list("phoron" = 1) + result_amount = 1 + required = /obj/item/slime_extract/gold + mix_message = "The slime core fizzles disappointingly." //Silver - slimebork - name = "Slime Bork" - id = "m_tele2" - result = null - required_reagents = list("phoron" = 5) - result_amount = 1 - required_container = /obj/item/slime_extract/silver - required_other = 1 - on_reaction(var/datum/reagents/holder) +/datum/chemical_reaction/slime/bork + name = "Slime Bork" + id = "m_tele2" + result = null + required_reagents = list("phoron" = 1) + result_amount = 1 + required = /obj/item/slime_extract/silver - var/list/borks = typesof(/obj/item/weapon/reagent_containers/food/snacks) - /obj/item/weapon/reagent_containers/food/snacks - // BORK BORK BORK - - playsound(get_turf(holder.my_atom), 'sound/effects/phasein.ogg', 100, 1) - - for(var/mob/living/carbon/human/M in viewers(get_turf(holder.my_atom), null)) - if(M:eyecheck() <= 0) - flick("e_flash", M.flash) - - for(var/i = 1, i <= 4 + rand(1,2), i++) - var/chosen = pick(borks) - var/obj/B = new chosen - if(B) - B.loc = get_turf(holder.my_atom) - if(prob(50)) - for(var/j = 1, j <= rand(1, 3), j++) - step(B, pick(NORTH,SOUTH,EAST,WEST)) +/datum/chemical_reaction/slime/bork/on_reaction(var/datum/reagents/holder) + var/list/borks = typesof(/obj/item/weapon/reagent_containers/food/snacks) - /obj/item/weapon/reagent_containers/food/snacks + playsound(get_turf(holder.my_atom), 'sound/effects/phasein.ogg', 100, 1) + for(var/mob/living/carbon/human/M in viewers(get_turf(holder.my_atom), null)) + if(M.eyecheck() <= 0) + flick("e_flash", M.flash) + for(var/i = 1, i <= 4 + rand(1,2), i++) + var/chosen = pick(borks) + var/obj/B = new chosen + if(B) + B.loc = get_turf(holder.my_atom) + if(prob(50)) + for(var/j = 1, j <= rand(1, 3), j++) + step(B, pick(NORTH, SOUTH, EAST, WEST)) + ..() //Blue - slimefrost - name = "Slime Frost Oil" - id = "m_frostoil" - result = "frostoil" - required_reagents = list("phoron" = 5) - result_amount = 10 - required_container = /obj/item/slime_extract/blue - required_other = 1 +/datum/chemical_reaction/slime/frost + name = "Slime Frost Oil" + id = "m_frostoil" + result = "frostoil" + required_reagents = list("phoron" = 1) + result_amount = 10 + required = /obj/item/slime_extract/blue + //Dark Blue - slimefreeze - name = "Slime Freeze" - id = "m_freeze" - result = null - required_reagents = list("phoron" = 5) - result_amount = 1 - required_container = /obj/item/slime_extract/darkblue - required_other = 1 - on_reaction(var/datum/reagents/holder) - for(var/mob/O in viewers(get_turf(holder.my_atom), null)) - O.show_message(text("\red The slime extract begins to vibrate violently !"), 1) - sleep(50) - playsound(get_turf(holder.my_atom), 'sound/effects/phasein.ogg', 100, 1) - for(var/mob/living/M in range (get_turf(holder.my_atom), 7)) - M.bodytemperature -= 140 - M << "\blue You feel a chill!" +/datum/chemical_reaction/slime/freeze + name = "Slime Freeze" + id = "m_freeze" + result = null + required_reagents = list("phoron" = 1) + result_amount = 1 + required = /obj/item/slime_extract/darkblue + mix_message = "The slime extract begins to vibrate violently!" + +/datum/chemical_reaction/slime/freeze/on_reaction(var/datum/reagents/holder) + ..() + sleep(50) + playsound(get_turf(holder.my_atom), 'sound/effects/phasein.ogg', 100, 1) + for(var/mob/living/M in range (get_turf(holder.my_atom), 7)) + M.bodytemperature -= 140 + M << "You feel a chill!" //Orange - slimecasp - name = "Slime Capsaicin Oil" - id = "m_capsaicinoil" - result = "capsaicin" - required_reagents = list("blood" = 5) - result_amount = 10 - required_container = /obj/item/slime_extract/orange - required_other = 1 +/datum/chemical_reaction/slime/casp + name = "Slime Capsaicin Oil" + id = "m_capsaicinoil" + result = "capsaicin" + required_reagents = list("blood" = 1) + result_amount = 10 + required = /obj/item/slime_extract/orange - slimefire - name = "Slime fire" - id = "m_fire" - result = null - required_reagents = list("phoron" = 5) - result_amount = 1 - required_container = /obj/item/slime_extract/orange - required_other = 1 - on_reaction(var/datum/reagents/holder) - for(var/mob/O in viewers(get_turf(holder.my_atom), null)) - O.show_message(text("\red The slime extract begins to vibrate violently !"), 1) - sleep(50) - var/turf/location = get_turf(holder.my_atom.loc) - for(var/turf/simulated/floor/target_tile in range(0,location)) - target_tile.assume_gas("phoron", 25, 1400) - spawn (0) target_tile.hotspot_expose(700, 400) +/datum/chemical_reaction/slime/fire + name = "Slime fire" + id = "m_fire" + result = null + required_reagents = list("phoron" = 1) + result_amount = 1 + required = /obj/item/slime_extract/orange + mix_message = "The slime extract begins to vibrate violently!" + +/datum/chemical_reaction/slime/fire/on_reaction(var/datum/reagents/holder) + ..() + sleep(50) + var/turf/location = get_turf(holder.my_atom.loc) + for(var/turf/simulated/floor/target_tile in range(0, location)) + target_tile.assume_gas("phoron", 25, 1400) + spawn (0) + target_tile.hotspot_expose(700, 400) //Yellow - slimeoverload - name = "Slime EMP" - id = "m_emp" - result = null - required_reagents = list("blood" = 5) - result_amount = 1 - required_container = /obj/item/slime_extract/yellow - required_other = 1 - on_reaction(var/datum/reagents/holder, var/created_volume) - empulse(get_turf(holder.my_atom), 3, 7) +/datum/chemical_reaction/slime/overload + name = "Slime EMP" + id = "m_emp" + result = null + required_reagents = list("blood" = 1) + result_amount = 1 + required = /obj/item/slime_extract/yellow +/datum/chemical_reaction/slime/overload/on_reaction(var/datum/reagents/holder, var/created_volume) + ..() + empulse(get_turf(holder.my_atom), 3, 7) - slimecell - name = "Slime Powercell" - id = "m_cell" - result = null - required_reagents = list("phoron" = 5) - result_amount = 1 - required_container = /obj/item/slime_extract/yellow - required_other = 1 - on_reaction(var/datum/reagents/holder, var/created_volume) - var/obj/item/weapon/cell/slime/P = new /obj/item/weapon/cell/slime - P.loc = get_turf(holder.my_atom) +/datum/chemical_reaction/slime/cell + name = "Slime Powercell" + id = "m_cell" + result = null + required_reagents = list("phoron" = 1) + result_amount = 1 + required = /obj/item/slime_extract/yellow - slimeglow - name = "Slime Glow" - id = "m_glow" - result = null - required_reagents = list("water" = 5) - result_amount = 1 - required_container = /obj/item/slime_extract/yellow - required_other = 1 - on_reaction(var/datum/reagents/holder) - for(var/mob/O in viewers(get_turf(holder.my_atom), null)) - O.show_message(text("\red The contents of the slime core harden and begin to emit a warm, bright light."), 1) - var/obj/item/device/flashlight/slime/F = new /obj/item/device/flashlight/slime - F.loc = get_turf(holder.my_atom) +/datum/chemical_reaction/slime/cell/on_reaction(var/datum/reagents/holder, var/created_volume) + var/obj/item/weapon/cell/slime/P = new /obj/item/weapon/cell/slime + P.loc = get_turf(holder.my_atom) + +/datum/chemical_reaction/slime/glow + name = "Slime Glow" + id = "m_glow" + result = null + required_reagents = list("water" = 1) + result_amount = 1 + required = /obj/item/slime_extract/yellow + mix_message = "The contents of the slime core harden and begin to emit a warm, bright light." + +/datum/chemical_reaction/slime/glow/on_reaction(var/datum/reagents/holder, var/created_volume) + ..() + var/obj/item/device/flashlight/slime/F = new /obj/item/device/flashlight/slime + F.loc = get_turf(holder.my_atom) //Purple +/datum/chemical_reaction/slime/psteroid + name = "Slime Steroid" + id = "m_steroid" + result = null + required_reagents = list("phoron" = 1) + result_amount = 1 + required = /obj/item/slime_extract/purple - slimepsteroid - name = "Slime Steroid" - id = "m_steroid" - result = null - required_reagents = list("phoron" = 5) - result_amount = 1 - required_container = /obj/item/slime_extract/purple - required_other = 1 - on_reaction(var/datum/reagents/holder) - var/obj/item/weapon/slimesteroid/P = new /obj/item/weapon/slimesteroid - P.loc = get_turf(holder.my_atom) - - - - slimejam - name = "Slime Jam" - id = "m_jam" - result = "slimejelly" - required_reagents = list("sugar" = 5) - result_amount = 10 - required_container = /obj/item/slime_extract/purple - required_other = 1 +/datum/chemical_reaction/slime/psteroid/on_reaction(var/datum/reagents/holder, var/created_volume) + ..() + var/obj/item/weapon/slimesteroid/P = new /obj/item/weapon/slimesteroid + P.loc = get_turf(holder.my_atom) +/datum/chemical_reaction/slime/jam + name = "Slime Jam" + id = "m_jam" + result = "slimejelly" + required_reagents = list("sugar" = 1) + result_amount = 10 + required = /obj/item/slime_extract/purple //Dark Purple - slimeplasma - name = "Slime Plasma" - id = "m_plasma" - result = null - required_reagents = list("phoron" = 5) - result_amount = 1 - required_container = /obj/item/slime_extract/darkpurple - required_other = 1 - on_reaction(var/datum/reagents/holder) - var/obj/item/stack/sheet/mineral/phoron/P = new /obj/item/stack/sheet/mineral/phoron - P.amount = 10 - P.loc = get_turf(holder.my_atom) +/datum/chemical_reaction/slime/plasma + name = "Slime Plasma" + id = "m_plasma" + result = null + required_reagents = list("phoron" = 1) + result_amount = 1 + required = /obj/item/slime_extract/darkpurple + +/datum/chemical_reaction/slime/plasma/on_reaction(var/datum/reagents/holder) + ..() + var/obj/item/stack/sheet/mineral/phoron/P = new /obj/item/stack/sheet/mineral/phoron + P.amount = 10 + P.loc = get_turf(holder.my_atom) //Red - slimeglycerol - name = "Slime Glycerol" - id = "m_glycerol" - result = "glycerol" - required_reagents = list("phoron" = 5) - result_amount = 8 - required_container = /obj/item/slime_extract/red - required_other = 1 +/datum/chemical_reaction/slime/glycerol + name = "Slime Glycerol" + id = "m_glycerol" + result = "glycerol" + required_reagents = list("phoron" = 1) + result_amount = 8 + required = /obj/item/slime_extract/red +/datum/chemical_reaction/slime/bloodlust + name = "Bloodlust" + id = "m_bloodlust" + result = null + required_reagents = list("blood" = 1) + result_amount = 1 + required = /obj/item/slime_extract/red - slimebloodlust - name = "Bloodlust" - id = "m_bloodlust" - result = null - required_reagents = list("blood" = 5) - result_amount = 1 - required_container = /obj/item/slime_extract/red - required_other = 1 - on_reaction(var/datum/reagents/holder) - for(var/mob/living/carbon/slime/slime in viewers(get_turf(holder.my_atom), null)) - slime.rabid = 1 - for(var/mob/O in viewers(get_turf(holder.my_atom), null)) - O.show_message(text("\red The [slime] is driven into a frenzy!"), 1) +/datum/chemical_reaction/slime/bloodlust/on_reaction(var/datum/reagents/holder) + ..() + for(var/mob/living/carbon/slime/slime in viewers(get_turf(holder.my_atom), null)) + slime.rabid = 1 + slime.visible_message("The [slime] is driven into a frenzy!") //Pink - slimeppotion - name = "Slime Potion" - id = "m_potion" - result = null - required_reagents = list("phoron" = 5) - result_amount = 1 - required_container = /obj/item/slime_extract/pink - required_other = 1 - on_reaction(var/datum/reagents/holder) - var/obj/item/weapon/slimepotion/P = new /obj/item/weapon/slimepotion - P.loc = get_turf(holder.my_atom) +/datum/chemical_reaction/slime/ppotion + name = "Slime Potion" + id = "m_potion" + result = null + required_reagents = list("phoron" = 1) + result_amount = 1 + required = /obj/item/slime_extract/pink +/datum/chemical_reaction/slime/ppotion/on_reaction(var/datum/reagents/holder) + ..() + var/obj/item/weapon/slimepotion/P = new /obj/item/weapon/slimepotion + P.loc = get_turf(holder.my_atom) //Black - slimemutate2 - name = "Advanced Mutation Toxin" - id = "mutationtoxin2" - result = "amutationtoxin" - required_reagents = list("phoron" = 5) - result_amount = 1 - required_other = 1 - required_container = /obj/item/slime_extract/black +/datum/chemical_reaction/slime/mutate2 + name = "Advanced Mutation Toxin" + id = "mutationtoxin2" + result = "amutationtoxin" + required_reagents = list("phoron" = 1) + result_amount = 1 + required = /obj/item/slime_extract/black + +//Oil +/datum/chemical_reaction/slime/explosion + name = "Slime Explosion" + id = "m_explosion" + result = null + required_reagents = list("phoron" = 1) + result_amount = 1 + required = /obj/item/slime_extract/oil + mix_message = "The slime extract begins to vibrate violently!" + +/datum/chemical_reaction/slime/explosion/on_reaction(var/datum/reagents/holder) + ..() + sleep(50) + explosion(get_turf(holder.my_atom), 1, 3, 6) -//Oil - slimeexplosion - name = "Slime Explosion" - id = "m_explosion" - result = null - required_reagents = list("phoron" = 5) - result_amount = 1 - required_container = /obj/item/slime_extract/oil - required_other = 1 - on_reaction(var/datum/reagents/holder) - for(var/mob/O in viewers(get_turf(holder.my_atom), null)) - O.show_message(text("\red The slime extract begins to vibrate violently !"), 1) - sleep(50) - explosion(get_turf(holder.my_atom), 1 ,3, 6) //Light Pink - slimepotion2 - name = "Slime Potion 2" - id = "m_potion2" - result = null - result_amount = 1 - required_container = /obj/item/slime_extract/lightpink - required_reagents = list("phoron" = 5) - required_other = 1 - on_reaction(var/datum/reagents/holder) - var/obj/item/weapon/slimepotion2/P = new /obj/item/weapon/slimepotion2 - P.loc = get_turf(holder.my_atom) +/datum/chemical_reaction/slime/potion2 + name = "Slime Potion 2" + id = "m_potion2" + result = null + result_amount = 1 + required = /obj/item/slime_extract/lightpink + required_reagents = list("phoron" = 1) + +/datum/chemical_reaction/slime/potion2/on_reaction(var/datum/reagents/holder) + ..() + var/obj/item/weapon/slimepotion2/P = new /obj/item/weapon/slimepotion2 + P.loc = get_turf(holder.my_atom) + //Adamantine - slimegolem - name = "Slime Golem" - id = "m_golem" - result = null - required_reagents = list("phoron" = 5) - result_amount = 1 - required_container = /obj/item/slime_extract/adamantine - required_other = 1 - on_reaction(var/datum/reagents/holder) - var/obj/effect/golemrune/Z = new /obj/effect/golemrune - Z.loc = get_turf(holder.my_atom) - Z.announce_to_ghosts() +/datum/chemical_reaction/slime/golem + name = "Slime Golem" + id = "m_golem" + result = null + required_reagents = list("phoron" = 1) + result_amount = 1 + required = /obj/item/slime_extract/adamantine -//////////////////////////////////////////PAINT/////////////////////////////////////////// -//Crayon dust -> paint - red_paint - name = "Red paint" - id = "red_paint" - result = "paint" - resultcolor = "#FE191A" - required_reagents = list("plasticide" = 1, "water" = 3, "crayon_dust_red" = 1) - result_amount = 5 +/datum/chemical_reaction/slime/golem/on_reaction(var/datum/reagents/holder) + ..() + var/obj/effect/golemrune/Z = new /obj/effect/golemrune + Z.loc = get_turf(holder.my_atom) + Z.announce_to_ghosts() - orange_paint - name = "Orange paint" - id = "orange_paint" - result = "paint" - resultcolor = "#FFBE4F" - required_reagents = list("plasticide" = 1, "water" = 3, "crayon_dust_orange" = 1) - result_amount = 5 +/* Food */ - yellow_paint - name = "Yellow paint" - id = "yellow_paint" - result = "paint" - resultcolor = "#FDFE7D" - required_reagents = list("plasticide" = 1, "water" = 3, "crayon_dust_yellow" = 1) - result_amount = 5 +/datum/chemical_reaction/tofu + name = "Tofu" + id = "tofu" + result = null + required_reagents = list("soymilk" = 10) + catalysts = list("enzyme" = 1) + result_amount = 1 - green_paint - name = "Green paint" - id = "green_paint" - result = "paint" - resultcolor = "#18A31A" - required_reagents = list("plasticide" = 1, "water" = 3, "crayon_dust_green" = 1) - result_amount = 5 +/datum/chemical_reaction/tofu/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 - blue_paint - name = "Blue paint" - id = "blue_paint" - result = "paint" - resultcolor = "#247CFF" - required_reagents = list("plasticide" = 1, "water" = 3, "crayon_dust_blue" = 1) - result_amount = 5 +/datum/chemical_reaction/chocolate_bar + name = "Chocolate Bar" + id = "chocolate_bar" + result = null + required_reagents = list("soymilk" = 2, "coco" = 2, "sugar" = 2) + result_amount = 1 - purple_paint - name = "Purple paint" - id = "purple_paint" - result = "paint" - resultcolor = "#CC0099" - required_reagents = list("plasticide" = 1, "water" = 3, "crayon_dust_purple" = 1) - result_amount = 5 +/datum/chemical_reaction/chocolate_bar/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 - grey_paint //mime - name = "Grey paint" - id = "grey_paint" - result = "paint" - resultcolor = "#808080" - required_reagents = list("plasticide" = 1, "water" = 3, "crayon_dust_grey" = 1) - result_amount = 5 +/datum/chemical_reaction/chocolate_bar2 + name = "Chocolate Bar" + id = "chocolate_bar" + result = null + required_reagents = list("milk" = 2, "coco" = 2, "sugar" = 2) + result_amount = 1 - brown_paint - name = "Brown paint" - id = "brown_paint" - result = "paint" - resultcolor = "#846F35" - required_reagents = list("plasticide" = 1, "water" = 3, "crayon_dust_brown" = 1) - result_amount = 5 +/datum/chemical_reaction/chocolate_bar2/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 -//Ghetto reactions +/datum/chemical_reaction/hot_coco + name = "Hot Coco" + id = "hot_coco" + result = "hot_coco" + required_reagents = list("water" = 5, "coco" = 1) + result_amount = 5 -/* Ideally the paint should take on the blood's colour (for each of the species) - but I could not think of a way. - RKF +/datum/chemical_reaction/soysauce + name = "Soy Sauce" + id = "soysauce" + result = "soysauce" + required_reagents = list("soymilk" = 4, "sacid" = 1) + result_amount = 5 - blood_paint - name = "Blood paint" - id = "blood_paint" - result = "paint" - resultcolor = "#C80000" - required_reagents = list("plasticide" = 1, "water" = 3, "blood" = 2) - result_amount = 5 -*/ - milk_paint - name = "Milk paint" - id = "milk_paint" - result = "paint" - resultcolor = "#F0F8FF" - required_reagents = list("plasticide" = 1, "water" = 3, "milk" = 5) - result_amount = 5 +/datum/chemical_reaction/cheesewheel + name = "Cheesewheel" + id = "cheesewheel" + result = null + required_reagents = list("milk" = 40) + catalysts = list("enzyme" = 1) + result_amount = 1 - orange_juice_paint - name = "Orange juice paint" - id = "orange_juice_paint" - result = "paint" - resultcolor = "#E78108" - required_reagents = list("plasticide" = 1, "water" = 3, "orangejuice" = 5) - result_amount = 5 +/datum/chemical_reaction/cheesewheel/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 + +/datum/chemical_reaction/meatball + name = "Meatball" + id = "meatball" + result = null + required_reagents = list("protein" = 3, "flour" = 5) + result_amount = 3 + +/datum/chemical_reaction/meatball/on_reaction(var/datum/reagents/holder, var/created_volume) + new /obj/item/weapon/reagent_containers/food/snacks/meatball(get_turf(holder.my_atom)) + return + +/datum/chemical_reaction/dough + name = "Dough" + id = "dough" + result = null + required_reagents = list("egg" = 3, "flour" = 10) + result_amount = 1 + +/datum/chemical_reaction/dough/on_reaction(var/datum/reagents/holder, var/created_volume) + new /obj/item/weapon/reagent_containers/food/snacks/dough(get_turf(holder.my_atom)) + return - tomato_juice_paint - name = "Tomato juice paint" - id = "tomato_juice_paint" - result = "paint" - resultcolor = "#731008" - required_reagents = list("plasticide" = 1, "water" = 3, "tomatojuice" = 5) - result_amount = 5 +/datum/chemical_reaction/syntiflesh + name = "Syntiflesh" + id = "syntiflesh" + result = null + required_reagents = list("blood" = 5, "clonexadone" = 1) + result_amount = 1 - lime_juice_paint - name = "Lime juice paint" - id = "lime_juice_paint" - result = "paint" - resultcolor = "#365E30" - required_reagents = list("plasticide" = 1, "water" = 3, "limejuice" = 5) - result_amount = 5 +/datum/chemical_reaction/syntiflesh/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 - carrot_juice_paint - name = "Carrot juice paint" - id = "carrot_juice_paint" - result = "paint" - resultcolor = "#973800" - required_reagents = list("plasticide" = 1, "water" = 3, "carrotjuice" = 5) - result_amount = 5 +/datum/chemical_reaction/hot_ramen + name = "Hot Ramen" + id = "hot_ramen" + result = "hot_ramen" + required_reagents = list("water" = 1, "dry_ramen" = 3) + result_amount = 3 - berry_juice_paint - name = "Berry juice paint" - id = "berry_juice_paint" - result = "paint" - resultcolor = "#990066" - required_reagents = list("plasticide" = 1, "water" = 3, "berryjuice" = 5) - result_amount = 5 +/datum/chemical_reaction/hell_ramen + name = "Hell Ramen" + id = "hell_ramen" + result = "hell_ramen" + required_reagents = list("capsaicin" = 1, "hot_ramen" = 6) + result_amount = 6 - grape_juice_paint - name = "Grape juice paint" - id = "grape_juice_paint" - result = "paint" - resultcolor = "#863333" - required_reagents = list("plasticide" = 1, "water" = 3, "grapejuice" = 5) - result_amount = 5 +/* Alcohol */ - poisonberry_juice_paint - name = "Poison berry juice paint" - id = "poisonberry_juice_paint" - result = "paint" - resultcolor = "#863353" - required_reagents = list("plasticide" = 1, "water" = 3, "poisonberryjuice" = 5) - result_amount = 5 +/datum/chemical_reaction/goldschlager + name = "Goldschlager" + id = "goldschlager" + result = "goldschlager" + required_reagents = list("vodka" = 10, "gold" = 1) + result_amount = 10 - watermelon_juice_paint - name = "Watermelon juice paint" - id = "watermelon_juice_paint" - result = "paint" - resultcolor = "#B83333" - required_reagents = list("plasticide" = 1, "water" = 3, "watermelonjuice" = 5) - result_amount = 5 +/datum/chemical_reaction/patron + name = "Patron" + id = "patron" + result = "patron" + required_reagents = list("tequilla" = 10, "silver" = 1) + result_amount = 10 - lemon_juice_paint - name = "Lemon juice paint" - id = "lemon_juice_paint" - result = "paint" - resultcolor = "#AFAF00" - required_reagents = list("plasticide" = 1, "water" = 3, "lemonjuice" = 5) - result_amount = 5 +/datum/chemical_reaction/bilk + name = "Bilk" + id = "bilk" + result = "bilk" + required_reagents = list("milk" = 1, "beer" = 1) + result_amount = 2 - banana_juice_paint - name = "Banana juice paint" - id = "banana_juice_paint" - result = "paint" - resultcolor = "#C3AF00" - required_reagents = list("plasticide" = 1, "water" = 3, "banana" = 5) - result_amount = 5 +/datum/chemical_reaction/icetea + name = "Iced Tea" + id = "icetea" + result = "icetea" + required_reagents = list("ice" = 1, "tea" = 3) + result_amount = 4 - potato_juice_paint - name = "Potato juice paint" - id = "potato_juice_paint" - result = "paint" - resultcolor = "#302000" - required_reagents = list("plasticide" = 1, "water" = 3, "potatojuice" = 5) - result_amount = 5 +/datum/chemical_reaction/icecoffee + name = "Iced Coffee" + id = "icecoffee" + result = "icecoffee" + required_reagents = list("ice" = 1, "coffee" = 3) + result_amount = 4 -//Other paint +/datum/chemical_reaction/nuka_cola + name = "Nuka Cola" + id = "nuka_cola" + result = "nuka_cola" + required_reagents = list("uranium" = 1, "cola" = 6) + result_amount = 6 - carbon_paint - name = "Carbon paint" - id = "carbon_paint" - result = "paint" - resultcolor = "#333333" - required_reagents = list("plasticide" = 1, "water" = 3, "carbon" = 1) - result_amount = 5 +/datum/chemical_reaction/moonshine + name = "Moonshine" + id = "moonshine" + result = "moonshine" + required_reagents = list("nutriment" = 10) + catalysts = list("enzyme" = 1) + result_amount = 10 - aluminum_paint - name = "Aluminum paint" - id = "aluminum_paint" - result = "paint" - resultcolor = "#F0F8FF" - required_reagents = list("plasticide" = 1, "water" = 3, "aluminum" = 1) - result_amount = 5 +/datum/chemical_reaction/grenadine + name = "Grenadine Syrup" + id = "grenadine" + result = "grenadine" + required_reagents = list("berryjuice" = 10) + catalysts = list("enzyme" = 1) + result_amount = 10 -//////////////////////////////////////////FOOD MIXTURES//////////////////////////////////// +/datum/chemical_reaction/wine + name = "Wine" + id = "wine" + result = "wine" + required_reagents = list("grapejuice" = 10) + catalysts = list("enzyme" = 1) + result_amount = 10 - 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 +/datum/chemical_reaction/pwine + name = "Poison Wine" + id = "pwine" + result = "pwine" + required_reagents = list("poisonberryjuice" = 10) + catalysts = list("enzyme" = 1) + result_amount = 10 - 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 +/datum/chemical_reaction/melonliquor + name = "Melon Liquor" + id = "melonliquor" + result = "melonliquor" + required_reagents = list("watermelonjuice" = 10) + catalysts = list("enzyme" = 1) + result_amount = 10 - 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 +/datum/chemical_reaction/bluecuracao + name = "Blue Curacao" + id = "bluecuracao" + result = "bluecuracao" + required_reagents = list("orangejuice" = 10) + catalysts = list("enzyme" = 1) + result_amount = 10 - hot_coco - name = "Hot Coco" - id = "hot_coco" - result = "hot_coco" - required_reagents = list("water" = 5, "coco" = 1) - result_amount = 5 +/datum/chemical_reaction/spacebeer + name = "Space Beer" + id = "spacebeer" + result = "beer" + required_reagents = list("cornoil" = 10) + catalysts = list("enzyme" = 1) + result_amount = 10 - soysauce - name = "Soy Sauce" - id = "soysauce" - result = "soysauce" - required_reagents = list("soymilk" = 4, "sacid" = 1) - result_amount = 5 +/datum/chemical_reaction/vodka + name = "Vodka" + id = "vodka" + result = "vodka" + required_reagents = list("potato" = 10) + catalysts = list("enzyme" = 1) + result_amount = 10 - 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 +/datum/chemical_reaction/sake + name = "Sake" + id = "sake" + result = "sake" + required_reagents = list("rice" = 10) + catalysts = list("enzyme" = 1) + result_amount = 10 - meatball - name = "Meatball" - id = "meatball" - result = null - required_reagents = list("protein" = 3, "flour" = 5) - result_amount = 3 - on_reaction(var/datum/reagents/holder, var/created_volume) - new /obj/item/weapon/reagent_containers/food/snacks/meatball(get_turf(holder.my_atom)) - return +/datum/chemical_reaction/kahlua + name = "Kahlua" + id = "kahlua" + result = "kahlua" + required_reagents = list("coffee" = 5, "sugar" = 5) + catalysts = list("enzyme" = 1) + result_amount = 5 - dough - name = "Dough" - id = "dough" - result = null - required_reagents = list("egg" = 3, "flour" = 10) - result_amount = 1 - on_reaction(var/datum/reagents/holder, var/created_volume) - new /obj/item/weapon/reagent_containers/food/snacks/dough(get_turf(holder.my_atom)) - return +/datum/chemical_reaction/gin_tonic + name = "Gin and Tonic" + id = "gintonic" + result = "gintonic" + required_reagents = list("gin" = 2, "tonic" = 1) + result_amount = 3 - 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 +/datum/chemical_reaction/cuba_libre + name = "Cuba Libre" + id = "cubalibre" + result = "cubalibre" + required_reagents = list("rum" = 2, "cola" = 1) + result_amount = 3 - hot_ramen - name = "Hot Ramen" - id = "hot_ramen" - result = "hot_ramen" - required_reagents = list("water" = 1, "dry_ramen" = 3) - result_amount = 3 +/datum/chemical_reaction/classicmartini + name = "Classic Martini" + id = "classicmartini" + result = "classicmartini" + required_reagents = list("gin" = 2, "vermouth" = 1) + 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 +/datum/chemical_reaction/vodkamartini + name = "Vodka Martini" + id = "vodkamartini" + result = "vodkamartini" + required_reagents = list("vodka" = 2, "vermouth" = 1) + result_amount = 3 +/datum/chemical_reaction/white_russian + name = "White Russian" + id = "whiterussian" + result = "whiterussian" + required_reagents = list("blackrussian" = 3, "cream" = 2) + result_amount = 5 -////////////////////////////////////////// COCKTAILS ////////////////////////////////////// +/datum/chemical_reaction/whiskey_cola + name = "Whiskey Cola" + id = "whiskeycola" + result = "whiskeycola" + required_reagents = list("whiskey" = 2, "cola" = 1) + result_amount = 3 +/datum/chemical_reaction/screwdriver + name = "Screwdriver" + id = "screwdrivercocktail" + result = "screwdrivercocktail" + required_reagents = list("vodka" = 2, "orangejuice" = 1) + result_amount = 3 - goldschlager - name = "Goldschlager" - id = "goldschlager" - result = "goldschlager" - required_reagents = list("vodka" = 10, "gold" = 1) - result_amount = 10 +/datum/chemical_reaction/bloody_mary + name = "Bloody Mary" + id = "bloodymary" + result = "bloodymary" + required_reagents = list("vodka" = 1, "tomatojuice" = 2, "limejuice" = 1) + result_amount = 4 - patron - name = "Patron" - id = "patron" - result = "patron" - required_reagents = list("tequilla" = 10, "silver" = 1) - result_amount = 10 +/datum/chemical_reaction/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 - bilk - name = "Bilk" - id = "bilk" - result = "bilk" - required_reagents = list("milk" = 1, "beer" = 1) +/datum/chemical_reaction/brave_bull + name = "Brave Bull" + id = "bravebull" + result = "bravebull" + required_reagents = list("tequilla" = 2, "kahlua" = 1) + result_amount = 3 + +/datum/chemical_reaction/tequilla_sunrise + name = "Tequilla Sunrise" + id = "tequillasunrise" + result = "tequillasunrise" + required_reagents = list("tequilla" = 2, "orangejuice" = 1) + result_amount = 3 + +/datum/chemical_reaction/phoron_special + name = "Toxins Special" + id = "phoronspecial" + result = "phoronspecial" + required_reagents = list("rum" = 2, "vermouth" = 1, "phoron" = 2) + result_amount = 5 + +/datum/chemical_reaction/beepsky_smash + name = "Beepksy Smash" + id = "beepksysmash" + result = "beepskysmash" + required_reagents = list("limejuice" = 2, "whiskey" = 2, "iron" = 1) + result_amount = 4 + +/datum/chemical_reaction/doctor_delight + name = "The Doctor's Delight" + id = "doctordelight" + result = "doctorsdelight" + required_reagents = list("limejuice" = 1, "tomatojuice" = 1, "orangejuice" = 1, "cream" = 1, "tricordrazine" = 1) + result_amount = 5 + +/datum/chemical_reaction/irish_cream + name = "Irish Cream" + id = "irishcream" + result = "irishcream" + required_reagents = list("whiskey" = 2, "cream" = 1) + result_amount = 3 + +/datum/chemical_reaction/manly_dorf + name = "The Manly Dorf" + id = "manlydorf" + result = "manlydorf" + required_reagents = list ("beer" = 1, "ale" = 2) + result_amount = 3 + +/datum/chemical_reaction/hooch + name = "Hooch" + id = "hooch" + result = "hooch" + required_reagents = list ("sugar" = 1, "ethanol" = 2, "fuel" = 1) + result_amount = 3 + +/datum/chemical_reaction/irish_coffee + name = "Irish Coffee" + id = "irishcoffee" + result = "irishcoffee" + required_reagents = list("irishcream" = 1, "coffee" = 1) + result_amount = 2 + +/datum/chemical_reaction/b52 + name = "B-52" + id = "b52" + result = "b52" + required_reagents = list("irishcream" = 1, "kahlua" = 1, "cognac" = 1) + result_amount = 3 + +/datum/chemical_reaction/atomicbomb + name = "Atomic Bomb" + id = "atomicbomb" + result = "atomicbomb" + required_reagents = list("b52" = 10, "uranium" = 1) + result_amount = 10 + +/datum/chemical_reaction/margarita + name = "Margarita" + id = "margarita" + result = "margarita" + required_reagents = list("tequilla" = 2, "limejuice" = 1) + result_amount = 3 + +/datum/chemical_reaction/longislandicedtea + name = "Long Island Iced Tea" + id = "longislandicedtea" + result = "longislandicedtea" + required_reagents = list("vodka" = 1, "gin" = 1, "tequilla" = 1, "cubalibre" = 1) + result_amount = 4 + +/datum/chemical_reaction/icedtea + name = "Long Island Iced Tea" + id = "longislandicedtea" + result = "longislandicedtea" + required_reagents = list("vodka" = 1, "gin" = 1, "tequilla" = 1, "cubalibre" = 1) + result_amount = 4 + +/datum/chemical_reaction/threemileisland + name = "Three Mile Island Iced Tea" + id = "threemileisland" + result = "threemileisland" + required_reagents = list("longislandicedtea" = 10, "uranium" = 1) + result_amount = 10 + +/datum/chemical_reaction/whiskeysoda + name = "Whiskey Soda" + id = "whiskeysoda" + result = "whiskeysoda" + required_reagents = list("whiskey" = 2, "sodawater" = 1) + result_amount = 3 + +/datum/chemical_reaction/black_russian + name = "Black Russian" + id = "blackrussian" + result = "blackrussian" + required_reagents = list("vodka" = 3, "kahlua" = 2) + result_amount = 5 + +/datum/chemical_reaction/manhattan + name = "Manhattan" + id = "manhattan" + result = "manhattan" + required_reagents = list("whiskey" = 2, "vermouth" = 1) + result_amount = 3 + +/datum/chemical_reaction/manhattan_proj + name = "Manhattan Project" + id = "manhattan_proj" + result = "manhattan_proj" + required_reagents = list("manhattan" = 10, "uranium" = 1) + result_amount = 10 + +/datum/chemical_reaction/vodka_tonic + name = "Vodka and Tonic" + id = "vodkatonic" + result = "vodkatonic" + required_reagents = list("vodka" = 2, "tonic" = 1) + result_amount = 3 + +/datum/chemical_reaction/gin_fizz + name = "Gin Fizz" + id = "ginfizz" + result = "ginfizz" + required_reagents = list("gin" = 2, "sodawater" = 1, "limejuice" = 1) + result_amount = 4 + +/datum/chemical_reaction/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 + +/datum/chemical_reaction/singulo + name = "Singulo" + id = "singulo" + result = "singulo" + required_reagents = list("vodka" = 5, "radium" = 1, "wine" = 5) + result_amount = 10 + +/datum/chemical_reaction/alliescocktail + name = "Allies Cocktail" + id = "alliescocktail" + result = "alliescocktail" + required_reagents = list("classicmartini" = 1, "vodka" = 1) + result_amount = 2 + +/datum/chemical_reaction/demonsblood + name = "Demons Blood" + id = "demonsblood" + result = "demonsblood" + required_reagents = list("rum" = 1, "spacemountainwind" = 1, "blood" = 1, "dr_gibb" = 1) + result_amount = 4 + +/datum/chemical_reaction/booger + name = "Booger" + id = "booger" + result = "booger" + required_reagents = list("cream" = 1, "banana" = 1, "rum" = 1, "watermelonjuice" = 1) + result_amount = 4 + +/datum/chemical_reaction/antifreeze + name = "Anti-freeze" + id = "antifreeze" + result = "antifreeze" + required_reagents = list("vodka" = 2, "cream" = 1, "ice" = 1) + result_amount = 4 + +/datum/chemical_reaction/barefoot + name = "Barefoot" + id = "barefoot" + result = "barefoot" + required_reagents = list("berryjuice" = 1, "cream" = 1, "vermouth" = 1) + result_amount = 3 + +/datum/chemical_reaction/grapesoda + name = "Grape Soda" + id = "grapesoda" + result = "grapesoda" + required_reagents = list("grapejuice" = 2, "cola" = 1) + result_amount = 3 + +/datum/chemical_reaction/sbiten + name = "Sbiten" + id = "sbiten" + result = "sbiten" + required_reagents = list("vodka" = 10, "capsaicin" = 1) + result_amount = 10 + +/datum/chemical_reaction/red_mead + name = "Red Mead" + id = "red_mead" + result = "red_mead" + required_reagents = list("blood" = 1, "mead" = 1) + result_amount = 2 + +/datum/chemical_reaction/mead + name = "Mead" + id = "mead" + result = "mead" + required_reagents = list("sugar" = 1, "water" = 1) + catalysts = list("enzyme" = 1) + result_amount = 2 + +/datum/chemical_reaction/iced_beer + name = "Iced Beer" + id = "iced_beer" + result = "iced_beer" + required_reagents = list("beer" = 10, "frostoil" = 1) + result_amount = 10 + +/datum/chemical_reaction/iced_beer2 + name = "Iced Beer" + id = "iced_beer" + result = "iced_beer" + required_reagents = list("beer" = 5, "ice" = 1) + result_amount = 6 + +/datum/chemical_reaction/grog + name = "Grog" + id = "grog" + result = "grog" + required_reagents = list("rum" = 1, "water" = 1) + result_amount = 2 + +/datum/chemical_reaction/soy_latte + name = "Soy Latte" + id = "soy_latte" + result = "soy_latte" + required_reagents = list("coffee" = 1, "soymilk" = 1) + result_amount = 2 + +/datum/chemical_reaction/cafe_latte + name = "Cafe Latte" + id = "cafe_latte" + result = "cafe_latte" + required_reagents = list("coffee" = 1, "milk" = 1) + result_amount = 2 + +/datum/chemical_reaction/acidspit + name = "Acid Spit" + id = "acidspit" + result = "acidspit" + required_reagents = list("sacid" = 1, "wine" = 5) + result_amount = 6 + +/datum/chemical_reaction/amasec + name = "Amasec" + id = "amasec" + result = "amasec" + required_reagents = list("iron" = 1, "wine" = 5, "vodka" = 5) + result_amount = 10 + +/datum/chemical_reaction/changelingsting + name = "Changeling Sting" + id = "changelingsting" + result = "changelingsting" + required_reagents = list("screwdrivercocktail" = 1, "limejuice" = 1, "lemonjuice" = 1) + result_amount = 5 + +/datum/chemical_reaction/aloe + name = "Aloe" + id = "aloe" + result = "aloe" + required_reagents = list("cream" = 1, "whiskey" = 1, "watermelonjuice" = 1) + result_amount = 2 + +/datum/chemical_reaction/andalusia + name = "Andalusia" + id = "andalusia" + result = "andalusia" + required_reagents = list("rum" = 1, "whiskey" = 1, "lemonjuice" = 1) + result_amount = 3 + +/datum/chemical_reaction/neurotoxin + name = "Neurotoxin" + id = "neurotoxin" + result = "neurotoxin" + required_reagents = list("gargleblaster" = 1, "stoxin" = 1) + result_amount = 2 + +/datum/chemical_reaction/snowwhite + name = "Snow White" + id = "snowwhite" + result = "snowwhite" + required_reagents = list("beer" = 1, "lemon_lime" = 1) + result_amount = 2 + +/datum/chemical_reaction/irishcarbomb + name = "Irish Car Bomb" + id = "irishcarbomb" + result = "irishcarbomb" + required_reagents = list("ale" = 1, "irishcream" = 1) + result_amount = 2 + +/datum/chemical_reaction/syndicatebomb + name = "Syndicate Bomb" + id = "syndicatebomb" + result = "syndicatebomb" + required_reagents = list("beer" = 1, "whiskeycola" = 1) + result_amount = 2 + +/datum/chemical_reaction/erikasurprise + name = "Erika Surprise" + id = "erikasurprise" + result = "erikasurprise" + required_reagents = list("ale" = 1, "limejuice" = 1, "whiskey" = 1, "banana" = 1, "ice" = 1) + result_amount = 5 + +/datum/chemical_reaction/devilskiss + name = "Devils Kiss" + id = "devilskiss" + result = "devilskiss" + required_reagents = list("blood" = 1, "kahlua" = 1, "rum" = 1) + result_amount = 3 + +/datum/chemical_reaction/hippiesdelight + name = "Hippies Delight" + id = "hippiesdelight" + result = "hippiesdelight" + required_reagents = list("psilocybin" = 1, "gargleblaster" = 1) + result_amount = 2 + +/datum/chemical_reaction/bananahonk + name = "Banana Honk" + id = "bananahonk" + result = "bananahonk" + required_reagents = list("banana" = 1, "cream" = 1, "sugar" = 1) + result_amount = 3 + +/datum/chemical_reaction/silencer + name = "Silencer" + id = "silencer" + result = "silencer" + required_reagents = list("nothing" = 1, "cream" = 1, "sugar" = 1) + result_amount = 3 + +/datum/chemical_reaction/driestmartini + name = "Driest Martini" + id = "driestmartini" + result = "driestmartini" + required_reagents = list("nothing" = 1, "gin" = 1) + result_amount = 2 + +/datum/chemical_reaction/lemonade + name = "Lemonade" + id = "lemonade" + result = "lemonade" + required_reagents = list("lemonjuice" = 1, "sugar" = 1, "water" = 1) + result_amount = 3 + +/datum/chemical_reaction/kiraspecial + name = "Kira Special" + id = "kiraspecial" + result = "kiraspecial" + required_reagents = list("orangejuice" = 1, "limejuice" = 1, "sodawater" = 1) + result_amount = 2 + +/datum/chemical_reaction/brownstar + name = "Brown Star" + id = "brownstar" + result = "brownstar" + required_reagents = list("orangejuice" = 2, "cola" = 1) + result_amount = 2 + +/datum/chemical_reaction/milkshake + name = "Milkshake" + id = "milkshake" + result = "milkshake" + required_reagents = list("cream" = 1, "ice" = 2, "milk" = 2) + result_amount = 5 + +/datum/chemical_reaction/rewriter + name = "Rewriter" + id = "rewriter" + result = "rewriter" + required_reagents = list("spacemountainwind" = 1, "coffee" = 1) + result_amount = 2 + +/datum/chemical_reaction/suidream + name = "Sui Dream" + id = "suidream" + result = "suidream" + required_reagents = list("space_up" = 2, "bluecuracao" = 1, "melonliquor" = 1) + result_amount = 4 + +/* Removed xenoarcheology stuff +datum + chemical_reaction + lithiumsodiumtungstate //LiNa2WO4, not the easiest chem to mix + name = "Lithium Sodium Tungstate" + id = "lithiumsodiumtungstate" + result = "lithiumsodiumtungstate" + required_reagents = list("lithium" = 1, "sodium" = 2, "tungsten" = 1, "oxygen" = 4) + result_amount = 8 + + density_separated_liquid + name = "Density separated sample" + id = "density_separated_sample" + result = "density_separated_sample" + secondary_results = list("chemical_waste" = 1) + required_reagents = list("ground_rock" = 1, "lithiumsodiumtungstate" = 2) 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 - - grenadine - name = "Grenadine Syrup" - id = "grenadine" - result = "grenadine" - required_reagents = list("berryjuice" = 10) - required_catalysts = list("enzyme" = 5) - result_amount = 10 - - wine - name = "Wine" - id = "wine" - result = "wine" - required_reagents = list("grapejuice" = 10) - required_catalysts = list("enzyme" = 5) - result_amount = 10 - - pwine - name = "Poison Wine" - id = "pwine" - result = "pwine" - required_reagents = list("poisonberryjuice" = 10) - required_catalysts = list("enzyme" = 5) - result_amount = 10 - - melonliquor - name = "Melon Liquor" - id = "melonliquor" - result = "melonliquor" - required_reagents = list("watermelonjuice" = 10) - required_catalysts = list("enzyme" = 5) - result_amount = 10 - - bluecuracao - name = "Blue Curacao" - id = "bluecuracao" - result = "bluecuracao" - required_reagents = list("orangejuice" = 10) - required_catalysts = list("enzyme" = 5) - result_amount = 10 - - spacebeer - name = "Space Beer" - id = "spacebeer" - result = "beer" - required_reagents = list("cornoil" = 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 - sake - name = "Sake" - id = "sake" - result = "sake" - required_reagents = list("rice" = 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 - - phoron_special - name = "Toxins Special" - id = "phoronspecial" - result = "phoronspecial" - required_reagents = list("rum" = 2, "vermouth" = 1, "phoron" = 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, "tricordrazine" = 1) - result_amount = 5 - - 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 - - icedtea - 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 - - grapesoda - name = "Grape Soda" - id = "grapesoda" - result = "grapesoda" - required_reagents = list("grapejuice" = 2, "cola" = 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("screwdrivercocktail" = 1, "limejuice" = 1, "lemonjuice" = 1) - result_amount = 5 - - 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 - - lemonade - name = "Lemonade" - id = "lemonade" - result = "lemonade" - required_reagents = list("lemonjuice" = 1, "sugar" = 1, "water" = 1) - result_amount = 3 - - kiraspecial - name = "Kira Special" - id = "kiraspecial" - result = "kiraspecial" - required_reagents = list("orangejuice" = 1, "limejuice" = 1, "sodawater" = 1) - result_amount = 2 - - brownstar - name = "Brown Star" - id = "brownstar" - result = "brownstar" - required_reagents = list("orangejuice" = 2, "cola" = 1) - result_amount = 2 - - milkshake - name = "Milkshake" - id = "milkshake" - result = "milkshake" - required_reagents = list("cream" = 1, "ice" = 2, "milk" = 2) - result_amount = 5 - - rewriter - name = "Rewriter" - id = "rewriter" - result = "rewriter" - required_reagents = list("spacemountainwind" = 1, "coffee" = 1) - result_amount = 2 - - suidream - name = "Sui Dream" - id = "suidream" - result = "suidream" - required_reagents = list("space_up" = 2, "bluecuracao" = 1, "melonliquor" = 1) + analysis_liquid + name = "Analysis sample" + id = "analysis_sample" + result = "analysis_sample" + secondary_results = list("chemical_waste" = 1) + required_reagents = list("density_separated_sample" = 5) result_amount = 4 + requires_heating = 1 +*/ diff --git a/code/modules/reagents/reagent_containers.dm b/code/modules/reagents/reagent_containers.dm index 72bb60b4c6..2ac8a124a9 100644 --- a/code/modules/reagents/reagent_containers.dm +++ b/code/modules/reagents/reagent_containers.dm @@ -13,39 +13,134 @@ 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) + if(N) amount_per_transfer_from_this = N /obj/item/weapon/reagent_containers/New() ..() - if (!possible_transfer_amounts) + 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 + create_reagents(volume) /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) - if(can_operate(M)) //Checks if mob is lying down on table for surgery - if(do_surgery(M,user,src)) +/obj/item/weapon/reagent_containers/attack(mob/M as mob, mob/user as mob, def_zone) + if(can_operate(M))//Checks if mob is lying down on table for surgery + if(do_surgery(M, user, src)) return -// this prevented pills, food, and other things from being picked up by bags. -// possibly intentional, but removing it allows us to not duplicate functionality. -// -Sayu (storage conslidation) -/* -/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) +/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 +/obj/item/weapon/reagent_containers/proc/reagentlist() // For attack logs + if(reagents) + return reagents.get_reagents() + return "No reagent holder" + +/obj/item/weapon/reagent_containers/proc/standard_dispenser_refill(var/mob/user, var/obj/structure/reagent_dispensers/target) // This goes into afterattack + if(!istype(target)) + return 0 + + if(!target.reagents || !target.reagents.total_volume) + user << "[target] is empty." + return 1 + + if(reagents && !reagents.get_free_space()) + user << "[src] is full." + return 1 + + var/trans = target.reagents.trans_to_obj(src, target:amount_per_transfer_from_this) + user << "You fill [src] with [trans] units of the contents of [target]." + return 1 + +/obj/item/weapon/reagent_containers/proc/standard_splash_mob(var/mob/user, var/mob/target) // This goes into afterattack + if(!istype(target)) + return + + if(!reagents || !reagents.total_volume) + user << "[src] is empty." + return 1 + + if(target.reagents && !target.reagents.get_free_space()) + user << "[target] is full." + return 1 + + var/contained = reagentlist() + target.attack_log += text("\[[time_stamp()]\] Has been splashed with [name] by [user.name] ([user.ckey]). Reagents: [contained]") + user.attack_log += text("\[[time_stamp()]\] Used the [name] to splash [target.name] ([target.key]). Reagents: [contained]") + msg_admin_attack("[user.name] ([user.ckey]) splashed [target.name] ([target.key]) with [name]. Reagents: [contained] (INTENT: [uppertext(user.a_intent)]) (JMP)") + + user.visible_message("[target] has been splashed with something by [user]!", "You splash the solution onto [target].") + reagents.splash_mob(target, reagents.total_volume) + return 1 + +/obj/item/weapon/reagent_containers/proc/self_feed_message(var/mob/user) + user << "You eat \the [src]" + +/obj/item/weapon/reagent_containers/proc/other_feed_message_start(var/mob/user, var/mob/target) + user.visible_message("[user] is trying to feed [target] \the [src]!") + +/obj/item/weapon/reagent_containers/proc/other_feed_message_finish(var/mob/user, var/mob/target) + user.visible_message("[user] has fed [target] \the [src]!") + +/obj/item/weapon/reagent_containers/proc/feed_sound(var/mob/user) + return + +/obj/item/weapon/reagent_containers/proc/standard_feed_mob(var/mob/user, var/mob/target) // This goes into attack + if(!istype(target)) + return 0 + + if(!reagents || !reagents.total_volume) + user << "\The [src] is empty." + return 1 + + if(target == user) + if(istype(user, /mob/living/carbon/human)) + var/mob/living/carbon/human/H = user + if(H.species.flags & IS_SYNTHETIC) + H << "You have a monitor for a head, where do you think you're going to put that?" + return 1 + + self_feed_message(user) + reagents.trans_to_mob(user, amount_per_transfer_from_this, CHEM_INGEST) + feed_sound(user) + return 1 + else + if(istype(user, /mob/living/carbon/human)) + var/mob/living/carbon/human/H = target + if(H.species.flags & IS_SYNTHETIC) + H << "They have a monitor for a head, where do you think you're going to put that?" + return + + other_feed_message_start(user, target) + + if(!do_mob(user, target)) + return + + other_feed_message_finish(user, target) + + var/contained = reagentlist() + target.attack_log += text("\[[time_stamp()]\] Has been fed [name] by [user.name] ([user.ckey]). Reagents: [contained]") + user.attack_log += text("\[[time_stamp()]\] Fed [name] by [target.name] ([target.ckey]). Reagents: [contained]") + msg_admin_attack("[key_name(user)] fed [key_name(target)] with [name]. Reagents: [contained] (INTENT: [uppertext(user.a_intent)]) (JMP)") + + reagents.trans_to_mob(target, amount_per_transfer_from_this, CHEM_INGEST) + feed_sound(user) + return 1 + +/obj/item/weapon/reagent_containers/proc/standard_pour_into(var/mob/user, var/atom/target) // This goes into afterattack and yes, it's atom-level + if(!target.is_open_container() || !target.reagents) + return 0 + + if(!reagents || !reagents.total_volume) + user << "[src] is empty." + return 1 + + if(!target.reagents.get_free_space()) + user << "[target] is full." + return 1 + + var/trans = reagents.trans_to(target, amount_per_transfer_from_this) + user << "You transfer [trans] units of the solution to [target]." + return 1 diff --git a/code/modules/reagents/reagent_containers/borghydro.dm b/code/modules/reagents/reagent_containers/borghydro.dm index d82ded7bba..b8373a6aa1 100644 --- a/code/modules/reagents/reagent_containers/borghydro.dm +++ b/code/modules/reagents/reagent_containers/borghydro.dm @@ -1,4 +1,3 @@ - /obj/item/weapon/reagent_containers/borghypo name = "Cyborg Hypospray" desc = "An advanced chemical synthesizer and injection system, designed for heavy-duty medical equipment." @@ -15,7 +14,6 @@ var/list/datum/reagents/reagent_list = list() var/list/reagent_ids = list("tricordrazine", "inaprovaline", "spaceacillin") - //var/list/reagent_ids = list("dexalin", "kelotane", "bicaridine", "anti_toxin", "inaprovaline", "spaceacillin") /obj/item/weapon/reagent_containers/borghypo/surgeon reagent_ids = list("bicaridine", "inaprovaline", "dexalin") @@ -40,23 +38,15 @@ if(charge_tick < recharge_time) return 0 charge_tick = 0 - if(isrobot(src.loc)) - var/mob/living/silicon/robot/R = src.loc + if(isrobot(loc)) + var/mob/living/silicon/robot/R = loc if(R && R.cell) var/datum/reagents/RG = reagent_list[mode] if(RG.total_volume < RG.maximum_volume) //Don't recharge reagents and drain power if the storage is full. R.cell.use(charge_cost) //Take power from borg... RG.add_reagent(reagent_ids[mode], 5) //And fill hypo with reagent. - //update_icon() return 1 -// Purely for testing purposes I swear~ -/* -/obj/item/weapon/reagent_containers/borghypo/verb/add_cyanide() - set src in world - add_reagent("cyanide") -*/ - // Use this to add more chemicals for the borghypo to produce. /obj/item/weapon/reagent_containers/borghypo/proc/add_reagent(var/reagent) reagent_ids |= reagent @@ -70,19 +60,18 @@ /obj/item/weapon/reagent_containers/borghypo/attack(mob/living/M as mob, mob/user as mob) var/datum/reagents/R = reagent_list[mode] if(!R.total_volume) - user << "\red The injector is empty." + user << "The injector is empty." return - if (!(istype(M))) + if (!istype(M)) return - if (R.total_volume && M.can_inject(user,1)) - user << "\blue You inject [M] with the injector." - M << "\red You feel a tiny prick!" + if (R.total_volume && M.can_inject(user, 1)) + user << "You inject [M] with the injector." + M << "You feel a tiny prick!" - R.reaction(M, INGEST) if(M.reagents) - var/trans = R.trans_to(M, amount_per_transfer_from_this) - user << "\blue [trans] units injected. [R.total_volume] units remaining." + var/trans = R.trans_to_mob(M, amount_per_transfer_from_this, CHEM_BLOOD) + user << "[trans] units injected. [R.total_volume] units remaining." return /obj/item/weapon/reagent_containers/borghypo/attack_self(mob/user as mob) @@ -93,7 +82,7 @@ charge_tick = 0 //Prevents wasted chems/cell charge if you're cycling through modes. var/datum/reagent/R = chemical_reagents_list[reagent_ids[mode]] - user << "\blue Synthesizer is now producing '[R.name]'." + user << "Synthesizer is now producing '[R.name]'." return /obj/item/weapon/reagent_containers/borghypo/examine(mob/user) @@ -105,8 +94,8 @@ for(var/datum/reagents/RS in reagent_list) var/datum/reagent/R = locate() in RS.reagent_list if(R) - user << "\blue It currently has [R.volume] units of [R.name] stored." + user << "It currently has [R.volume] units of [R.name] stored." empty = 0 if(empty) - user << "\blue It is currently empty. Allow some time for the internal syntheszier to produce more." + user << "It is currently empty. Allow some time for the internal syntheszier to produce more." diff --git a/code/modules/reagents/reagent_containers/dropper.dm b/code/modules/reagents/reagent_containers/dropper.dm index 1cfe480ff9..c67c6ab7de 100644 --- a/code/modules/reagents/reagent_containers/dropper.dm +++ b/code/modules/reagents/reagent_containers/dropper.dm @@ -10,19 +10,18 @@ possible_transfer_amounts = list(1,2,3,4,5) w_class = 1 volume = 5 - var/filled = 0 - afterattack(obj/target, mob/user , flag) + afterattack(var/obj/target, var/mob/user, var/flag) if(!target.reagents || !flag) return - if(filled) + if(reagents.total_volume) - if(target.reagents.total_volume >= target.reagents.maximum_volume) - user << "\red [target] is full." + if(!target.reagents.get_free_space()) + user << "[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/smokable/cigarette)) //You can inject humans and food but you cant remove the shit. - user << "\red You cannot directly fill this object." + if(!target.is_open_container() && !ismob(target) && !istype(target, /obj/item/weapon/reagent_containers/food) && !istype(target, /obj/item/clothing/mask/smokable/cigarette)) //You can inject humans and food but you cant remove the shit. + user << "You cannot directly fill this object." return var/trans = 0 @@ -30,80 +29,76 @@ if(ismob(target)) var/time = 20 //2/3rds the time of a syringe - for(var/mob/O in viewers(world.view, user)) - O.show_message(text("\red [] is trying to squirt something into []'s eyes!", user, target), 1) + user.visible_message("[user] is trying to squirt something into [target]'s eyes!") - if(!do_mob(user, target, time)) return + if(!do_mob(user, target, time)) + return - if(istype(target , /mob/living/carbon/human)) + 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 ) + if(victim.wear_mask) + if (victim.wear_mask.flags & MASKCOVERSEYES) safe_thing = victim.wear_mask - if( victim.head ) - if ( victim.head.flags & MASKCOVERSEYES ) + if(victim.head) + if (victim.head.flags & MASKCOVERSEYES) safe_thing = victim.head if(victim.glasses) - if ( !safe_thing ) + 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]" + trans = reagents.trans_to_obj(safe_thing, amount_per_transfer_from_this) + user.visible_message("[user] tries to squirt something into [target]'s eyes, but fails!", "You transfer [trans] units of the solution.") 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 = reagents.trans_to_mob(target, reagents.total_volume, CHEM_INGEST) + user.visible_message("[user] squirts something into [target]'s eyes!", "You transfer [trans] units of the solution.") var/mob/living/M = target + var/contained = reagentlist() + M.attack_log += text("\[[time_stamp()]\] Has been squirted with [name] by [user.name] ([user.ckey]). Reagents: [contained]") + user.attack_log += text("\[[time_stamp()]\] Used the [name] to squirt [M.name] ([M.key]). Reagents: [contained]") + msg_admin_attack("[user.name] ([user.ckey]) squirted [M.name] ([M.key]) with [name]. Reagents: [contained] (INTENT: [uppertext(user.a_intent)]) (JMP)") + return - var/list/injected = list() - for(var/datum/reagent/R in src.reagents.reagent_list) - injected += R.name - var/contained = english_list(injected) - M.attack_log += text("\[[time_stamp()]\] Has been squirted with [src.name] by [user.name] ([user.ckey]). Reagents: [contained]") - user.attack_log += text("\[[time_stamp()]\] Used the [src.name] to squirt [M.name] ([M.key]). Reagents: [contained]") - msg_admin_attack("[user.name] ([user.ckey]) squirted [M.name] ([M.key]) with [src.name]. Reagents: [contained] (INTENT: [uppertext(user.a_intent)]) (JMP)") + else + trans = reagents.trans_to(target, amount_per_transfer_from_this) + user << "You transfer [trans] units of the solution." - 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 + else // Taking from something if(!target.is_open_container() && !istype(target,/obj/structure/reagent_dispensers)) - user << "\red You cannot directly remove reagents from [target]." + user << "You cannot directly remove reagents from [target]." return - if(!target.reagents.total_volume) - user << "\red [target] is empty." + if(!target.reagents || !target.reagents.total_volume) + user << "[target] is empty." return - var/trans = target.reagents.trans_to(src, amount_per_transfer_from_this) + var/trans = target.reagents.trans_to_obj(src, amount_per_transfer_from_this) - user << "\blue You fill the dropper with [trans] units of the solution." - - filled = 1 - icon_state = "dropper[filled]" + user << "You fill the dropper with [trans] units of the solution." return + on_reagent_change() + update_icon() + + update_icon() + if(reagents.total_volume) + icon_state = "dropper1" + else + icon_state = "dropper0" + +/obj/item/weapon/reagent_containers/dropper/industrial + name = "Industrial Dropper" + desc = "A larger dropper. Transfers 10 units." + amount_per_transfer_from_this = 10 + possible_transfer_amounts = list(1,2,3,4,5,6,7,8,9,10) + volume = 10 + //////////////////////////////////////////////////////////////////////////////// /// Droppers. END //////////////////////////////////////////////////////////////////////////////// diff --git a/code/modules/reagents/reagent_containers/food/cans.dm b/code/modules/reagents/reagent_containers/food/cans.dm index 0129423f4f..c27df37d47 100644 --- a/code/modules/reagents/reagent_containers/food/cans.dm +++ b/code/modules/reagents/reagent_containers/food/cans.dm @@ -1,104 +1,39 @@ /obj/item/weapon/reagent_containers/food/drinks/cans - var canopened = 0 + amount_per_transfer_from_this = 5 + flags = 0 attack_self(mob/user as mob) - if (canopened == 0) - playsound(src.loc,'sound/effects/canopen.ogg', rand(10,50), 1) + if (!is_open_container()) + playsound(loc,'sound/effects/canopen.ogg', rand(10,50), 1) user << "You open the drink with an audible pop!" - canopened = 1 + flags |= OPENCONTAINER else return attack(mob/M as mob, mob/user as mob, def_zone) - if (canopened == 0) + if(!is_open_container()) user << "You need to open the drink!" return - var/datum/reagents/R = src.reagents - var/fillevel = gulp_size - if(!R.total_volume || !R) - user << "\red The [src.name] is empty!" - return 0 - - if(M == user) - M << "\blue You swallow a gulp of [src]." - if(reagents.total_volume) - reagents.trans_to_ingest(M, gulp_size) - reagents.reaction(M, INGEST) - spawn(5) - reagents.trans_to(M, gulp_size) - - playsound(M.loc,'sound/items/drink.ogg', rand(10,50), 1) - return 1 - else if( istype(M, /mob/living/carbon/human) ) - if (canopened == 0) - user << "You need to open the drink!" - return - - else if (canopened == 1) - 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)]") - msg_admin_attack("[key_name(user)] fed [key_name(M)] with [src.name] Reagents: [reagentlist(src)] (INTENT: [uppertext(user.a_intent)]) (JMP)") - - if(reagents.total_volume) - reagents.trans_to_ingest(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,'sound/items/drink.ogg', rand(10,50), 1) - return 1 - - return 0 + return ..() afterattack(obj/target, mob/user, proximity) if(!proximity) return if(istype(target, /obj/structure/reagent_dispensers)) //A dispenser. Transfer FROM it TO us. - if (canopened == 0) + if(!is_open_container()) user << "You need to open the drink!" return else if(target.is_open_container()) //Something like a glass. Player probably wants to transfer TO it. - if (canopened == 0) + if(!is_open_container()) user << "You need to open the drink!" return - if (istype(target, /obj/item/weapon/reagent_containers/food/drinks/cans)) - var/obj/item/weapon/reagent_containers/food/drinks/cans/cantarget = target - if(cantarget.canopened == 0) - user << "You need to open the drink you want to pour into!" - return - return ..() -/* examine(mob/user) - if(!..(user, 1)) - return - if(!reagents || reagents.total_volume==0) - user << "\blue \The [src] is empty!" - else if (reagents.total_volume<=src.volume/4) - user << "\blue \The [src] is almost empty!" - else if (reagents.total_volume<=src.volume*0.66) - user << "\blue \The [src] is half full!" - else if (reagents.total_volume<=src.volume*0.90) - user << "\blue \The [src] is almost full!" - else - user << "\blue \The [src] is full!"*/ - - //DRINKS /obj/item/weapon/reagent_containers/food/drinks/cans/cola diff --git a/code/modules/reagents/reagent_containers/food/condiment.dm b/code/modules/reagents/reagent_containers/food/condiment.dm index f643ccca90..642507df84 100644 --- a/code/modules/reagents/reagent_containers/food/condiment.dm +++ b/code/modules/reagents/reagent_containers/food/condiment.dm @@ -15,72 +15,39 @@ center_of_mass = list("x"=16, "y"=6) 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 The [src.name] is empty!" - return 0 - - if(M == user) - M << "\blue You swallow some of contents of the [src]." - if(reagents.total_volume) - reagents.trans_to_ingest(M, 10) - - playsound(M.loc,'sound/items/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)]") - msg_admin_attack("[user.name] ([user.ckey]) fed [M.name] ([M.ckey]) with [src.name] (INTENT: [uppertext(user.a_intent)]) (JMP)") - - if(reagents.total_volume) - reagents.trans_to_ingest(M, 10) - - playsound(M.loc,'sound/items/drink.ogg', rand(10,50), 1) - return 1 - return 0 - - attackby(obj/item/I as obj, mob/user as mob) - + attackby(var/obj/item/weapon/W as obj, var/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. + attack_self(var/mob/user as mob) + return - if(!target.reagents.total_volume) - user << "\red [target] is empty." + attack(var/mob/M as mob, var/mob/user as mob, var/def_zone) + if(standard_feed_mob(user, M)) + return + + afterattack(var/obj/target, var/mob/user, var/flag) + if(standard_dispenser_refill(user, target)) + return + if(standard_pour_into(user, target)) + return + + if(istype(target, /obj/item/weapon/reagent_containers/food/snacks)) // These are not opencontainers but we can transfer to them + if(!reagents || !reagents.total_volume) + user << "There is no condiment left in \the [src]." return - if(reagents.total_volume >= reagents.maximum_volume) - user << "\red [src] is full." + if(!target.reagents.get_free_space()) + user << "You can't add more condiment to \the [target]." 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]." + var/trans = reagents.trans_to_obj(target, amount_per_transfer_from_this) + user << "You add [trans] units of the condiment to \the [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]." + feed_sound(var/mob/user) + playsound(user.loc, 'sound/items/drink.ogg', rand(10, 50), 1) + + self_feed_message(var/mob/user) + user << "You swallow some of contents of \the [src]." on_reagent_change() if(icon_state == "saltshakersmall" || icon_state == "peppermillsmall") diff --git a/code/modules/reagents/reagent_containers/food/drinks.dm b/code/modules/reagents/reagent_containers/food/drinks.dm index 58b11a61ac..a42b5156b2 100644 --- a/code/modules/reagents/reagent_containers/food/drinks.dm +++ b/code/modules/reagents/reagent_containers/food/drinks.dm @@ -7,134 +7,63 @@ icon = 'icons/obj/drinks.dmi' icon_state = null flags = 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) + amount_per_transfer_from_this = 5 volume = 50 on_reagent_change() - if (gulp_size < 5) gulp_size = 5 - else gulp_size = max(round(reagents.total_volume / 5), 5) + 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 - var/fillevel = gulp_size - - if(!R.total_volume || !R) - user << "\red The [src.name] is empty!" - return 0 - - if(M == user) - - if(istype(M,/mob/living/carbon/human)) - var/mob/living/carbon/human/H = M - if(H.species.flags & IS_SYNTHETIC) - H << "\red You have a monitor for a head, where do you think you're going to put that?" - return - - M << "\blue You swallow a gulp from \the [src]." - if(reagents.total_volume) - reagents.trans_to_ingest(M, gulp_size) - - playsound(M.loc,'sound/items/drink.ogg', rand(10,50), 1) - return 1 - else if( istype(M, /mob/living/carbon/human) ) - - var/mob/living/carbon/human/H = M - if(H.species.flags & IS_SYNTHETIC) - H << "\red They have a monitor for a head, where do you think you're going to put that?" - return - - 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)]") - msg_admin_attack("[key_name(user)] fed [key_name(M)] with [src.name] Reagents: [reagentlist(src)] (INTENT: [uppertext(user.a_intent)]) (JMP)") - - if(reagents.total_volume) - reagents.trans_to_ingest(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,'sound/items/drink.ogg', rand(10,50), 1) - return 1 + if(standard_feed_mob(user, M)) + robot_refill(user) + return return 0 - afterattack(obj/target, mob/user, proximity) if(!proximity) return - 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/datum/reagent/refill - var/datum/reagent/refillName - if(isrobot(user)) - refill = reagents.get_master_reagent_id() - refillName = reagents.get_master_reagent_name() - - 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 - var/chargeAmount = max(30,4*trans) - bro.cell.use(chargeAmount) - user << "Now synthesizing [trans] units of [refillName]..." - - - spawn(300) - reagents.add_reagent(refill, trans) - user << "Cyborg [src] refilled." + if(standard_dispenser_refill(user, target)) + return + if(standard_pour_into(user, target)) + robot_refill(user) + return return ..() + proc/robot_refill(var/mob/living/silicon/robot/user) + if(!istype(user)) + return 0 + + user.cell.use(30) + var/refill = reagents.get_master_reagent_id() + user << "Now synthesizing [amount_per_transfer_from_this] units of [refill]..." + spawn(300) + reagents.add_reagent(refill, amount_per_transfer_from_this) + user << "Cyborg [src] refilled." + + self_feed_message(var/mob/user) + user << "You swallow a gulp from \the [src]." + + feed_sound(var/mob/user) + playsound(user.loc, 'sound/items/drink.ogg', rand(10, 50), 1) + examine(mob/user) if(!..(user, 1)) return - if(!reagents || reagents.total_volume==0) - user << "\blue \The [src] is empty!" - else if (reagents.total_volume<=src.volume/4) - user << "\blue \The [src] is almost empty!" - else if (reagents.total_volume<=src.volume*0.66) - user << "\blue \The [src] is half full!" - else if (reagents.total_volume<=src.volume*0.90) - user << "\blue \The [src] is almost full!" + if(!reagents || reagents.total_volume == 0) + user << "\The [src] is empty!" + else if (reagents.total_volume <= volume * 0.25) + user << "\The [src] is almost empty!" + else if (reagents.total_volume <= volume * 0.66) + user << "\The [src] is half full!" + else if (reagents.total_volume <= volume * 0.90) + user << "\The [src] is almost full!" else - user << "\blue \The [src] is full!" + user << "\The [src] is full!" //////////////////////////////////////////////////////////////////////////////// diff --git a/code/modules/reagents/reagent_containers/food/drinks/bottle.dm b/code/modules/reagents/reagent_containers/food/drinks/bottle.dm index 52a4ba12ba..03b85848d6 100644 --- a/code/modules/reagents/reagent_containers/food/drinks/bottle.dm +++ b/code/modules/reagents/reagent_containers/food/drinks/bottle.dm @@ -1,5 +1,3 @@ - - ///////////////////////////////////////////////Alchohol bottles! -Agouri ////////////////////////// //Functionally identical to regular drinks. The only difference is that the default bottle size is 100. - Darem //Bottles now weaken and break when smashed on people's heads. - Giacom @@ -78,10 +76,9 @@ msg_admin_attack("[user.name] ([user.ckey]) attacked [target.name] ([target.ckey]) with a bottle. (INTENT: [uppertext(user.a_intent)]) (JMP)") //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) + if(reagents) + user.visible_message("The contents of the [src] splash all over [target]!") + reagents.trans_to_mob(target, reagents.total_volume) //Finally, smash the bottle. This kills (del) the bottle. src.smash(target, user) diff --git a/code/modules/reagents/reagent_containers/food/sandwich.dm b/code/modules/reagents/reagent_containers/food/sandwich.dm index 0d8e614468..224102eb0a 100644 --- a/code/modules/reagents/reagent_containers/food/sandwich.dm +++ b/code/modules/reagents/reagent_containers/food/sandwich.dm @@ -34,7 +34,7 @@ else if(istype(W,/obj/item/weapon/reagent_containers/food/snacks)) user << "\blue You layer [W] over \the [src]." var/obj/item/weapon/reagent_containers/F = W - F.reagents.trans_to(src, F.reagents.total_volume) + F.reagents.trans_to_obj(src, F.reagents.total_volume) user.drop_item() W.loc = src ingredients += W diff --git a/code/modules/reagents/reagent_containers/food/snacks.dm b/code/modules/reagents/reagent_containers/food/snacks.dm index 502a741c6b..192a4f6959 100644 --- a/code/modules/reagents/reagent_containers/food/snacks.dm +++ b/code/modules/reagents/reagent_containers/food/snacks.dm @@ -34,7 +34,6 @@ return /obj/item/weapon/reagent_containers/food/snacks/attack(mob/M as mob, mob/user as mob, def_zone) - if(!reagents.total_volume) user << "None of [src] left!" user.drop_from_inventory(src) @@ -94,15 +93,9 @@ playsound(M.loc,'sound/items/eatfood.ogg', rand(10,50), 1) if(reagents.total_volume) 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_ingest(M, bitesize) + reagents.trans_to_mob(M, bitesize, CHEM_INGEST) else - reagents.trans_to_ingest(M, reagents.total_volume) + reagents.trans_to_mob(M, reagents.total_volume, CHEM_INGEST) bitecount++ On_Consume(M) return 1 @@ -149,7 +142,7 @@ I.color = src.filling_color U.overlays += I - reagents.trans_to(U,min(reagents.total_volume,5)) + reagents.trans_to_obj(U, min(reagents.total_volume,5)) if (reagents.total_volume <= 0) del(src) @@ -188,7 +181,7 @@ 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) + reagents.trans_to_obj(slice, reagents_per_slice) del(src) return @@ -210,7 +203,7 @@ user.visible_message("[user] nibbles away at \the [src].","You nibble away at \the [src].") bitecount++ if(reagents && user.reagents) - reagents.trans_to_ingest(user, bitesize) + reagents.trans_to_mob(user, bitesize, CHEM_INGEST) spawn(5) if(!src && !user.client) user.custom_emote(1,"[pick("burps", "cries for more", "burps twice", "looks at the area where the food was")]") @@ -484,7 +477,7 @@ /obj/item/weapon/reagent_containers/food/snacks/egg/throw_impact(atom/hit_atom) ..() new/obj/effect/decal/cleanable/egg_smudge(src.loc) - src.reagents.reaction(hit_atom, TOUCH) + src.reagents.trans_to(hit_atom, reagents.total_volume) src.visible_message("\red [src.name] has been squashed.","\red You hear a smack.") del(src) @@ -2049,7 +2042,7 @@ New() ..() - reagents.add_reagent("minttoxin", 1) + reagents.add_reagent("mint", 1) bitesize = 1 /obj/item/weapon/reagent_containers/food/snacks/mushroomsoup diff --git a/code/modules/reagents/reagent_containers/glass.dm b/code/modules/reagents/reagent_containers/glass.dm index c056d4479c..20497df85c 100644 --- a/code/modules/reagents/reagent_containers/glass.dm +++ b/code/modules/reagents/reagent_containers/glass.dm @@ -41,116 +41,71 @@ /obj/machinery/sleeper, /obj/machinery/smartfridge/, /obj/machinery/biogenerator, - /obj/machinery/constructable_frame + /obj/machinery/constructable_frame, + /obj/machinery/bunsen_burner, + /obj/machinery/radiocarbon_spectrometer ) New() ..() base_name = name - examine(mob/user) + examine(var/mob/user) if(!..(user, 2)) return if(reagents && reagents.reagent_list.len) - user << "\blue It contains [src.reagents.total_volume] units of liquid." + user << "It contains [reagents.total_volume] units of liquid." else - user << "\blue It is empty." - if (!is_open_container()) - user << "\blue Airtight lid seals it completely." + user << "It is empty." + if(!is_open_container()) + user << "Airtight lid seals it completely." attack_self() ..() - if (is_open_container()) - usr << "You put the lid on \the [src]." + if(is_open_container()) + usr << "You put the lid on \the [src]." flags ^= OPENCONTAINER else - usr << "You take the lid off \the [src]." + usr << "You take the lid off \the [src]." flags |= OPENCONTAINER update_icon() - afterattack(obj/target, mob/user , flag) + afterattack(var/obj/target, var/mob/user, var/flag) - if (!is_open_container() || !flag) + if(!is_open_container() || !flag) return - for(var/type in src.can_be_placed_into) + for(var/type in 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]." - - var/mob/living/M = target - var/list/injected = list() - for(var/datum/reagent/R in src.reagents.reagent_list) - injected += R.name - var/contained = english_list(injected) - M.attack_log += text("\[[time_stamp()]\] Has been splashed with [src.name] by [user.name] ([user.ckey]). Reagents: [contained]") - user.attack_log += text("\[[time_stamp()]\] Used the [src.name] to splash [M.name] ([M.key]). Reagents: [contained]") - msg_admin_attack("[user.name] ([user.ckey]) splashed [M.name] ([M.key]) with [src.name]. Reagents: [contained] (INTENT: [uppertext(user.a_intent)]) (JMP)") - - 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() + if(standard_splash_mob(user, target)) return - else if(istype(target, /obj/structure/reagent_dispensers)) //A dispenser. Transfer FROM it TO us. - target.add_fingerprint(user) - - 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]." - - else if(istype(target, /obj/machinery/bunsen_burner)) + if(standard_dispenser_refill(user, target)) + return + if(standard_pour_into(user, target)) return - else if(istype(target, /obj/machinery/smartfridge)) - return - - else if(istype(target, /obj/machinery/radiocarbon_spectrometer)) - 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() + if(reagents.total_volume) + user << "You splash the solution onto [target]." + reagents.trans_to(target, reagents.total_volume) return attackby(obj/item/weapon/W as obj, mob/user as mob) if(istype(W, /obj/item/weapon/pen) || istype(W, /obj/item/device/flashlight/pen)) - var/tmp_label = sanitize(copytext(input(user, "Enter a label for [src.name]","Label",src.label_text), 1, MAX_NAME_LEN)) + var/tmp_label = sanitize(copytext(input(user, "Enter a label for \the [name]", "Label", label_text), 1, MAX_NAME_LEN)) if(length(tmp_label) > 10) - user << "\red The label can be at most 10 characters long." + user << "The label can be at most 10 characters long." else - user << "\blue You set the label to \"[tmp_label]\"." - src.label_text = tmp_label - src.update_name_label() + user << "You set the label to \"[tmp_label]\"." + label_text = tmp_label + update_name_label() proc/update_name_label() - if(src.label_text == "") - src.name = src.base_name + if(label_text == "") + name = base_name else - src.name = "[src.base_name] ([src.label_text])" + name = "[base_name] ([label_text])" /obj/item/weapon/reagent_containers/glass/beaker name = "beaker" @@ -195,7 +150,7 @@ if(80 to 90) filling.icon_state = "[icon_state]80" if(91 to INFINITY) filling.icon_state = "[icon_state]100" - filling.color = mix_color_from_reagents(reagents.reagent_list) + filling.color = reagents.get_color() overlays += filling if (!is_open_container()) @@ -231,7 +186,6 @@ possible_transfer_amounts = list(5,10,15,25,30,60,120,300) flags = OPENCONTAINER - /obj/item/weapon/reagent_containers/glass/beaker/vial name = "vial" desc = "A small glass vial." @@ -282,18 +236,6 @@ var/image/lid = image(icon, src, "lid_[initial(icon_state)]") overlays += lid -// vials are defined twice, what? -/* -/obj/item/weapon/reagent_containers/glass/beaker/vial - name = "vial" - desc = "Small glass vial. Looks fragile." - icon_state = "vial" - g_amt = 500 - volume = 15 - amount_per_transfer_from_this = 5 - possible_transfer_amounts = list(1,5,15) - flags = OPENCONTAINER */ - /* /obj/item/weapon/reagent_containers/glass/blender_jug name = "Blender Jug" @@ -324,21 +266,4 @@ amount_per_transfer_from_this = 20 possible_transfer_amounts = list(10,20,30,60) volume = 120 - -/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 = OPENCONTAINER - -/obj/item/weapon/reagent_containers/glass/dispenser/surfactant - name = "reagent glass (surfactant)" - icon_state = "liquid" - - New() - ..() - reagents.add_reagent("fluorosurfactant", 20) - */ diff --git a/code/modules/reagents/reagent_containers/glass/bottle.dm b/code/modules/reagents/reagent_containers/glass/bottle.dm index ab01d11eaf..cbfea73a94 100644 --- a/code/modules/reagents/reagent_containers/glass/bottle.dm +++ b/code/modules/reagents/reagent_containers/glass/bottle.dm @@ -48,7 +48,7 @@ if(80 to 90) filling.icon_state = "[icon_state]-80" if(91 to INFINITY) filling.icon_state = "[icon_state]-100" - filling.color = mix_color_from_reagents(reagents.reagent_list) + filling.color = reagents.get_color() overlays += filling if (!is_open_container()) diff --git a/code/modules/reagents/reagent_containers/hypospray.dm b/code/modules/reagents/reagent_containers/hypospray.dm index fd3557b62f..c5153510d7 100644 --- a/code/modules/reagents/reagent_containers/hypospray.dm +++ b/code/modules/reagents/reagent_containers/hypospray.dm @@ -21,27 +21,22 @@ /obj/item/weapon/reagent_containers/hypospray/attack(mob/M as mob, mob/user as mob) if(!reagents.total_volume) - user << "\red [src] is empty." + user << "[src] is empty." return - if (!( istype(M, /mob) )) + if (!istype(M)) return - if (reagents.total_volume) - user << "\blue You inject [M] with [src]." - M << "\red You feel a tiny prick!" + user << "You inject [M] with [src]." + M << "You feel a tiny prick!" - src.reagents.reaction(M, INGEST) - if(M.reagents) + if(M.reagents) - var/list/injected = list() - for(var/datum/reagent/R in src.reagents.reagent_list) - injected += R.name - var/contained = english_list(injected) - M.attack_log += text("\[[time_stamp()]\] Has been injected with [src.name] by [user.name] ([user.ckey]). Reagents: [contained]") - user.attack_log += text("\[[time_stamp()]\] Used the [src.name] to inject [M.name] ([M.key]). Reagents: [contained]") - msg_admin_attack("[user.name] ([user.ckey]) injected [M.name] ([M.key]) with [src.name]. Reagents: [contained] (INTENT: [uppertext(user.a_intent)]) (JMP)") + var/contained = reagentlist() + M.attack_log += text("\[[time_stamp()]\] Has been injected with [name] by [user.name] ([user.ckey]). Reagents: [contained]") + user.attack_log += text("\[[time_stamp()]\] Used the [name] to inject [M.name] ([M.key]). Reagents: [contained]") + msg_admin_attack("[user.name] ([user.ckey]) injected [M.name] ([M.key]) with [name]. Reagents: [contained] (INTENT: [uppertext(user.a_intent)]) (JMP)") - var/trans = reagents.trans_to(M, amount_per_transfer_from_this) - user << "\blue [trans] units injected. [reagents.total_volume] units remaining in [src]." + var/trans = reagents.trans_to_mob(M, amount_per_transfer_from_this, CHEM_BLOOD) + user << "[trans] units injected. [reagents.total_volume] units remaining in \the [src]." return @@ -76,6 +71,6 @@ /obj/item/weapon/reagent_containers/hypospray/autoinjector/examine(mob/user) ..(user) if(reagents && reagents.reagent_list.len) - user << "\blue It is currently loaded." + user << "It is currently loaded." else - user << "\blue It is spent." + user << "It is spent." diff --git a/code/modules/reagents/reagent_containers/pill.dm b/code/modules/reagents/reagent_containers/pill.dm index 804b0347be..830da0e51c 100644 --- a/code/modules/reagents/reagent_containers/pill.dm +++ b/code/modules/reagents/reagent_containers/pill.dm @@ -14,53 +14,47 @@ New() ..() if(!icon_state) - icon_state = "pill[rand(1,20)]" + icon_state = "pill[rand(1, 20)]" - attack_self(mob/user as mob) - return attack(mob/M as mob, mob/user as mob, def_zone) if(M == user) if(istype(M, /mob/living/carbon/human)) var/mob/living/carbon/human/H = M if(H.species.flags & IS_SYNTHETIC) - H << "\red You have a monitor for a head, where do you think you're going to put that?" + H << "You have a monitor for a head, where do you think you're going to put that?" return - M << "\blue You swallow [src]." + M << "You swallow \the [src]." M.drop_from_inventory(src) //icon update if(reagents.total_volume) - reagents.trans_to_ingest(M, reagents.total_volume) - del(src) - else - del(src) + reagents.trans_to_mob(M, reagents.total_volume, CHEM_INGEST) + del(src) return 1 - else if(istype(M, /mob/living/carbon/human) ) + else if(istype(M, /mob/living/carbon/human)) var/mob/living/carbon/human/H = M if(H.species.flags & IS_SYNTHETIC) - H << "\red They have a monitor for a head, where do you think you're going to put that?" + H << "They have a monitor for a head, where do you think you're going to put that?" return - for(var/mob/O in viewers(world.view, user)) - O.show_message("\red [user] attempts to force [M] to swallow [src].", 1) + user.visible_message("[user] attempts to force [M] to swallow \the [src].") - if(!do_mob(user, M)) return + 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) + user.visible_message("[user] forces [M] to swallow \the [src].") - 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)]") - msg_admin_attack("[user.name] ([user.ckey]) fed [M.name] ([M.ckey]) with [src.name] Reagents: [reagentlist(src)] (INTENT: [uppertext(user.a_intent)]) (JMP)") + var/contained = reagentlist() + M.attack_log += text("\[[time_stamp()]\] Has been fed [name] by [user.name] ([user.ckey]) Reagents: [contained]") + user.attack_log += text("\[[time_stamp()]\] Fed [name] by [M.name] ([M.ckey]) Reagents: [contained]") + msg_admin_attack("[user.name] ([user.ckey]) fed [M.name] ([M.ckey]) with [name] Reagents: [contained] (INTENT: [uppertext(user.a_intent)]) (JMP)") if(reagents.total_volume) - reagents.trans_to_ingest(M, reagents.total_volume) - del(src) - else - del(src) + reagents.trans_to_mob(M, reagents.total_volume, CHEM_INGEST) + del(src) return 1 @@ -69,21 +63,20 @@ afterattack(obj/target, mob/user, proximity) if(!proximity) return - if(target.is_open_container() != 0 && target.reagents) + if(target.is_open_container() && target.reagents) if(!target.reagents.total_volume) - user << "\red [target] is empty. Cant dissolve pill." + user << "[target] is empty. Can't dissolve \the [src]." return - user << "\blue You dissolve the pill in [target]" + user << "You dissolve \the [src] in [target]." - user.attack_log += text("\[[time_stamp()]\] Spiked \a [target] with a pill. Reagents: [reagentlist(src)]") - msg_admin_attack("[user.name] ([user.ckey]) spiked \a [target] with a pill. Reagents: [reagentlist(src)] (INTENT: [uppertext(user.a_intent)]) (JMP)") + user.attack_log += text("\[[time_stamp()]\] Spiked \a [target] with a pill. Reagents: [reagentlist()]") + msg_admin_attack("[user.name] ([user.ckey]) spiked \a [target] with a pill. Reagents: [reagentlist()] (INTENT: [uppertext(user.a_intent)]) (JMP)") reagents.trans_to(target, reagents.total_volume) for(var/mob/O in viewers(2, user)) - O.show_message("\red [user] puts something in \the [target].", 1) + O.show_message("[user] puts something in \the [target].", 1) - spawn(5) - del(src) + del(src) return diff --git a/code/modules/reagents/reagent_containers/robodropper.dm b/code/modules/reagents/reagent_containers/robodropper.dm deleted file mode 100644 index 475a29c331..0000000000 --- a/code/modules/reagents/reagent_containers/robodropper.dm +++ /dev/null @@ -1,98 +0,0 @@ - -/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) - - var/mob/M = target - var/list/injected = list() - for(var/datum/reagent/R in src.reagents.reagent_list) - injected += R.name - var/contained = english_list(injected) - M.attack_log += text("\[[time_stamp()]\] Has been squirted with [src.name] by [user.name] ([user.ckey]). Reagents: [contained]") - user.attack_log += text("\[[time_stamp()]\] Used the [src.name] to squirt [M.name] ([M.key]). Reagents: [contained]") - msg_admin_attack("[user.name] ([user.ckey]) squirted [M.name] ([M.key]) with [src.name]. Reagents: [contained] (INTENT: [uppertext(user.a_intent)]) (JMP)") - - - 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 index 1a25162526..c1fbdbf276 100644 --- a/code/modules/reagents/reagent_containers/spray.dm +++ b/code/modules/reagents/reagent_containers/spray.dm @@ -16,32 +16,21 @@ var/list/spray_sizes = list(1,3) volume = 250 - /obj/item/weapon/reagent_containers/spray/New() ..() src.verbs -= /obj/item/weapon/reagent_containers/verb/set_APTFT /obj/item/weapon/reagent_containers/spray/afterattack(atom/A as mob|obj, mob/user as mob, proximity) - if(istype(A, /obj/item/weapon/storage) || istype(A, /obj/structure/table) || istype(A, /obj/structure/closet) \ - || istype(A, /obj/item/weapon/reagent_containers) || istype(A, /obj/structure/sink) || istype(A, /obj/structure/janitorialcart)) + if(istype(A, /obj/item/weapon/storage) || istype(A, /obj/structure/table) || istype(A, /obj/structure/closet) || istype(A, /obj/item/weapon/reagent_containers) || istype(A, /obj/structure/sink) || istype(A, /obj/structure/janitorialcart)) return if(istype(A, /obj/effect/proc_holder/spell)) return - if(istype(A, /obj/structure/reagent_dispensers) && get_dist(src,A) <= 1) //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." + if(proximity) + if(standard_dispenser_refill(user, A)) 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 @@ -64,36 +53,17 @@ /obj/item/weapon/reagent_containers/spray/proc/Spray_at(atom/A as mob|obj, mob/user as mob, proximity) if (A.density && proximity) A.visible_message("[usr] sprays [A] with [src].") - var/obj/D = new/obj() - D.create_reagents(amount_per_transfer_from_this) - reagents.trans_to(D, amount_per_transfer_from_this) - D.icon += mix_color_from_reagents(D.reagents.reagent_list) - spawn(0) - D.reagents.reaction(A) - sleep(5) - del(D) + reagents.trans_to(A, amount_per_transfer_from_this) else - var/obj/effect/decal/chempuff/D = new/obj/effect/decal/chempuff(get_turf(src)) - D.create_reagents(amount_per_transfer_from_this) - reagents.trans_to(D, amount_per_transfer_from_this, 1/spray_size) - D.icon += mix_color_from_reagents(D.reagents.reagent_list) - - var/turf/A_turf = get_turf(A)//BS12 - spawn(0) - for(var/i=0, iYou adjusted the pressure nozzle. You'll now use [amount_per_transfer_from_this] units per spray." - /obj/item/weapon/reagent_containers/spray/examine(mob/user) - if(..(user, 0) && user==src.loc) - user << "[round(src.reagents.total_volume)] units left." + if(..(user, 0) && loc == user) + user << "[round(reagents.total_volume)] units left." return /obj/item/weapon/reagent_containers/spray/verb/empty() @@ -120,8 +89,7 @@ return if(isturf(usr.loc)) usr << "You empty \the [src] onto the floor." - reagents.reaction(usr.loc) - spawn(5) src.reagents.clear_reagents() + reagents.trans_to(usr.loc, reagents.total_volume) //space cleaner /obj/item/weapon/reagent_containers/spray/cleaner @@ -135,8 +103,8 @@ /obj/item/weapon/reagent_containers/spray/cleaner/New() ..() - reagents.add_reagent("cleaner", src.volume) -//pepperspray + reagents.add_reagent("cleaner", volume) + /obj/item/weapon/reagent_containers/spray/pepper name = "pepperspray" desc = "Manufactured by UhangInc, used to blind and down an opponent quickly." @@ -147,7 +115,6 @@ volume = 40 var/safety = 1 - /obj/item/weapon/reagent_containers/spray/pepper/New() ..() reagents.add_reagent("condensedcapsaicin", 40) @@ -166,7 +133,6 @@ return ..() -//water flower /obj/item/weapon/reagent_containers/spray/waterflower name = "water flower" desc = "A seemingly innocent sunflower...with a twist." @@ -181,7 +147,6 @@ ..() reagents.add_reagent("water", 10) -//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." @@ -194,47 +159,27 @@ 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/Spray_at(atom/A as mob|obj) - var/Sprays[3] - for(var/i=1, i<=3, i++) // intialize sprays - if(src.reagents.total_volume < 1) break - var/obj/effect/decal/chempuff/D = new/obj/effect/decal/chempuff(get_turf(src)) - 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/chempuff/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) + var/list/the_targets = list(T, T1, T2) + for(var/a = 1 to 3) + spawn(0) + if(reagents.total_volume < 1) break + var/obj/effect/effect/water/chempuff/D = new/obj/effect/effect/water/chempuff(get_turf(src)) + var/turf/my_target = the_targets[a] + D.create_reagents(amount_per_transfer_from_this) + if(!src) + return + reagents.trans_to_obj(D, amount_per_transfer_from_this) + D.set_color() + D.set_up(my_target, rand(6, 8), 2) return -// Plant-B-Gone -/obj/item/weapon/reagent_containers/spray/plantbgone // -- Skie +/obj/item/weapon/reagent_containers/spray/plantbgone name = "Plant-B-Gone" desc = "Kills those pesky weeds!" icon = 'icons/obj/hydroponics_machines.dmi' @@ -242,16 +187,14 @@ 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, proximity) if(!proximity) return - if (istype(A, /obj/effect/blob)) // blob damage in blob code + if(istype(A, /obj/effect/blob)) // blob damage in blob code return ..() \ No newline at end of file diff --git a/code/modules/reagents/reagent_containers/syringes.dm b/code/modules/reagents/reagent_containers/syringes.dm index 8aa34a7dca..6218d8fbac 100644 --- a/code/modules/reagents/reagent_containers/syringes.dm +++ b/code/modules/reagents/reagent_containers/syringes.dm @@ -13,12 +13,14 @@ icon_state = "0" matter = list("glass" = 150) amount_per_transfer_from_this = 5 - possible_transfer_amounts = null //list(5,10,15) + possible_transfer_amounts = null volume = 15 w_class = 1 sharp = 1 var/mode = SYRINGE_DRAW var/image/filling //holds a reference to the current filling overlay + var/visible_name = "a syringe" + var/time = 30 on_reagent_change() update_icon() @@ -47,18 +49,17 @@ update_icon() attackby(obj/item/I as obj, mob/user as mob) - return afterattack(obj/target, mob/user, proximity) - if(!proximity) return - if(!target.reagents) return - - if(mode == SYRINGE_BROKEN) - user << "\red This syringe is broken!" + if(!proximity || !target.reagents) return - if (user.a_intent == "hurt" && ismob(target)) + if(mode == SYRINGE_BROKEN) + user << "This syringe is broken!" + return + + if(user.a_intent == "hurt" && ismob(target)) if((CLUMSY in user.mutations) && prob(50)) target = user syringestab(target, user) @@ -68,86 +69,89 @@ switch(mode) if(SYRINGE_DRAW) - if(reagents.total_volume >= reagents.maximum_volume) - user << "\red The syringe is full." + if(!reagents.get_free_space()) + user << "The syringe is full." + mode = SYRINGE_INJECT return if(ismob(target))//Blood! - if(istype(target, /mob/living/carbon/slime)) - user << "\red You are unable to locate any blood." + if(reagents.has_reagent("blood")) + user << "There is already a blood sample in this syringe." 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 + if(istype(target, /mob/living/carbon)) + if(istype(target, /mob/living/carbon/slime)) + user << "You are unable to locate any blood." + return + var/amount = reagents.get_free_space() var/mob/living/carbon/T = target if(!T.dna) - usr << "You are unable to locate any blood. (To be specific, your target seems to be missing their DNA datum)" + user << "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." + user << "You are unable to locate any blood." return var/datum/reagent/B - if(istype(T,/mob/living/carbon/human)) + if(istype(T, /mob/living/carbon/human)) var/mob/living/carbon/human/H = T if(H.species && H.species.flags & NO_BLOOD) - H.reagents.trans_to(src,amount) + H.reagents.trans_to_obj(src, amount) else - B = T.take_blood(src,amount) + B = T.take_blood(src, amount) else B = T.take_blood(src,amount) if (B) - 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]" + reagents.reagent_list += B + reagents.update_total() + on_reagent_change() + reagents.handle_reactions() + user << "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) + O.show_message("[user] takes a blood sample from [target].", 1) else //if not mob if(!target.reagents.total_volume) - user << "\red [target] is empty." + user << "[target] is empty." return - if(!target.is_open_container() && !istype(target,/obj/structure/reagent_dispensers) && !istype(target,/obj/item/slime_extract)) - user << "\red You cannot directly remove reagents from this object." + if(!target.is_open_container() && !istype(target, /obj/structure/reagent_dispensers) && !istype(target, /obj/item/slime_extract)) + user << "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? + var/trans = target.reagents.trans_to_obj(src, amount_per_transfer_from_this) + user << "You fill the syringe with [trans] units of the solution." + update_icon() - user << "\blue You fill the syringe with [trans] units of the solution." - if (reagents.total_volume >= reagents.maximum_volume) - mode=!mode + if(!reagents.get_free_space()) + mode = SYRINGE_INJECT update_icon() if(SYRINGE_INJECT) if(!reagents.total_volume) - user << "\red The syringe is empty." + user << "The syringe is empty." + mode = SYRINGE_DRAW 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/slime_extract) && !istype(target, /obj/item/clothing/mask/smokable/cigarette) && !istype(target, /obj/item/weapon/storage/fancy/cigarettes)) - user << "\red You cannot directly fill this object." + user << "You cannot directly fill this object." return - if(target.reagents.total_volume >= target.reagents.maximum_volume) - user << "\red [target] is full." + if(!target.reagents.get_free_space()) + user << "[target] is full." return if(ismob(target) && target != user) - var/time = 30 //Injecting through a hardsuit takes longer due to needing to find a port. + var/injtime = time //Injecting through a hardsuit takes longer due to needing to find a port. - if(istype(target,/mob/living/carbon/human)) + if(istype(target, /mob/living/carbon/human)) var/mob/living/carbon/human/H = target if(H.wear_suit) - if(istype(H.wear_suit,/obj/item/clothing/suit/space)) - time = 60 + if(istype(H.wear_suit, /obj/item/clothing/suit/space)) + injtime = injtime * 2 else if(!H.can_inject(user, 1)) return @@ -157,55 +161,43 @@ if(!M.can_inject(user, 1)) return - for(var/mob/O in viewers(world.view, user)) - if(time == 30) - O.show_message(text("\red [] is trying to inject []!", user, target), 1) - else - O.show_message(text("\red [] begins hunting for an injection port on []'s suit!", user, target), 1) - - if(!do_mob(user, target, time)) return - - for(var/mob/O in viewers(world.view, user)) - O.show_message(text("\red [] injects [] with the syringe!", user, target), 1) - - if(istype(target,/mob/living)) - var/mob/living/M = target - var/list/injected = list() - for(var/datum/reagent/R in src.reagents.reagent_list) - injected += R.name - var/contained = english_list(injected) - M.attack_log += text("\[[time_stamp()]\] Has been injected with [src.name] by [user.name] ([user.ckey]). Reagents: [contained]") - user.attack_log += text("\[[time_stamp()]\] Used the [src.name] to inject [M.name] ([M.key]). Reagents: [contained]") - msg_admin_attack("[user.name] ([user.ckey]) injected [M.name] ([M.key]) with [src.name]. Reagents: [contained] (INTENT: [uppertext(user.a_intent)]) (JMP)") - - src.reagents.reaction(target, INGEST) - if(ismob(target) && target == user) - src.reagents.reaction(target, INGEST) - spawn(5) - var/datum/reagent/blood/B - for(var/datum/reagent/blood/d in src.reagents.reagent_list) - B = d - break - var/trans - if(B && istype(target,/mob/living/carbon)) - var/mob/living/carbon/C = target - C.inject_blood(src,5) + if(injtime == time) + user.visible_message("[user] is trying to inject [target] with [visible_name]!") else - 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() + user.visible_message("[user] begins hunting for an injection port on [target]'s suit!") + + if(!do_mob(user, target, injtime)) + return + + user.visible_message("[user] injects [target] with the syringe!") + + if(istype(target, /mob/living)) + var/mob/living/M = target + var/contained = reagentlist() + M.attack_log += text("\[[time_stamp()]\] Has been injected with [name] by [user.name] ([user.ckey]). Reagents: [contained]") + user.attack_log += text("\[[time_stamp()]\] Used the [name] to inject [M.name] ([M.key]). Reagents: [contained]") + msg_admin_attack("[user.name] ([user.ckey]) injected [M.name] ([M.key]) with [name]. Reagents: [contained] (INTENT: [uppertext(user.a_intent)]) (JMP)") + + var/trans + if(ismob(target)) + trans = reagents.trans_to_mob(target, amount_per_transfer_from_this, CHEM_BLOOD) + else + trans = reagents.trans_to(target, amount_per_transfer_from_this) + user << "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() + overlays.Cut() + if(mode == SYRINGE_BROKEN) icon_state = "broken" - overlays.Cut() return - var/rounded_vol = round(reagents.total_volume,5) - overlays.Cut() + + var/rounded_vol = round(reagents.total_volume, round(reagents.maximum_volume / 3)) if(ismob(loc)) var/injoverlay switch(mode) @@ -222,10 +214,9 @@ filling.icon_state = "syringe[rounded_vol]" - filling.color = mix_color_from_reagents(reagents.reagent_list) + filling.color = reagents.get_color() overlays += filling - proc/syringestab(mob/living/carbon/target as mob, mob/living/carbon/user as mob) user.attack_log += "\[[time_stamp()]\] Attacked [target.name] ([target.ckey]) with [src.name] (INTENT: [uppertext(user.a_intent)])" @@ -234,8 +225,10 @@ if(istype(target, /mob/living/carbon/human)) + var/mob/living/carbon/human/H = target + var/target_zone = ran_zone(check_zone(user.zone_sel.selecting, target)) - var/datum/organ/external/affecting = target:get_organ(target_zone) + var/datum/organ/external/affecting = H.get_organ(target_zone) if (!affecting) return @@ -244,160 +237,58 @@ return var/hit_area = affecting.display_name - var/mob/living/carbon/human/H = target if((user != target) && H.check_shields(7, "the [src.name]")) return - if (target != user && target.getarmor(target_zone, "melee") > 5 && prob(50)) + if (target != user && H.getarmor(target_zone, "melee") > 5 && prob(50)) for(var/mob/O in viewers(world.view, user)) O.show_message(text("\red [user] tries to stab [target] in \the [hit_area] with [src.name], but the attack is deflected by armor!"), 1) user.u_equip(src) del(src) return - for(var/mob/O in viewers(world.view, user)) - O.show_message(text("\red [user] stabs [target] in \the [hit_area] with [src.name]!"), 1) + user.visible_message("[user] stabs [target] in \the [hit_area] with [src.name]!") if(affecting.take_damage(3)) - target:UpdateDamageIcon() + H.UpdateDamageIcon() else - for(var/mob/O in viewers(world.view, user)) - O.show_message(text("\red [user] stabs [target] with [src.name]!"), 1) + user.visible_message("[user] stabs [target] with [src.name]!") target.take_organ_damage(3)// 7 is the same as crowbar punch - src.reagents.reaction(target, INGEST) var/syringestab_amount_transferred = rand(0, (reagents.total_volume - 5)) //nerfed by popular demand - src.reagents.trans_to(target, syringestab_amount_transferred) - src.break_syringe(target, user) - + reagents.trans_to_mob(target, syringestab_amount_transferred, CHEM_BLOOD) + break_syringe(target, user) + proc/break_syringe(mob/living/carbon/target, mob/living/carbon/user) - src.desc += " It is broken." - src.mode = SYRINGE_BROKEN + desc += " It is broken." + mode = SYRINGE_BROKEN if(target) - src.add_blood(target) + add_blood(target) if(user) - src.add_fingerprint(user) - src.update_icon() + add_fingerprint(user) + update_icon() - - -/obj/item/weapon/reagent_containers/ld50_syringe +/obj/item/weapon/reagent_containers/syringe/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 + visible_name = "a giant syringe" + time = 300 - on_reagent_change() - update_icon() - - pickup(mob/user) + afterattack(obj/target, mob/user, flag) + if(mode == SYRINGE_DRAW && ismob(target)) // No drawing 50 units of blood at once + user << "This needle isn't designed for drawing blood." + return + if(user.a_intent == "hurt" && ismob(target)) // No instant injecting + user << "This syringe is too big to stab someone with it." ..() - update_icon() - - dropped(mob/user) - ..() - update_icon() - - attack_self(mob/user as mob) - mode = !mode - update_icon() - - attack_hand() - ..() - update_icon() - - 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." @@ -436,40 +327,9 @@ mode = SYRINGE_INJECT update_icon() -/obj/item/weapon/reagent_containers/ld50_syringe/choral +/obj/item/weapon/reagent_containers/syringe/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/research/circuitprinter.dm b/code/modules/research/circuitprinter.dm index a16e5653a9..323f06c451 100644 --- a/code/modules/research/circuitprinter.dm +++ b/code/modules/research/circuitprinter.dm @@ -66,7 +66,7 @@ using metal and glass, it uses glass and reagents (usually sulfuric acis). /obj/machinery/r_n_d/circuit_imprinter/dismantle() for(var/obj/I in component_parts) if(istype(I, /obj/item/weapon/reagent_containers/glass/beaker)) - reagents.trans_to(I, reagents.total_volume) + reagents.trans_to_obj(I, reagents.total_volume) if(g_amount >= 3750) var/obj/item/stack/sheet/glass/G = new /obj/item/stack/sheet/glass(loc) G.amount = round(g_amount / 3750) diff --git a/code/modules/research/protolathe.dm b/code/modules/research/protolathe.dm index 22df4b82dd..d8198f7e4c 100644 --- a/code/modules/research/protolathe.dm +++ b/code/modules/research/protolathe.dm @@ -61,7 +61,7 @@ Note: Must be placed west/left of and R&D console to function. /obj/machinery/r_n_d/protolathe/dismantle() for(var/obj/I in component_parts) if(istype(I, /obj/item/weapon/reagent_containers/glass/beaker)) - reagents.trans_to(I, reagents.total_volume) + reagents.trans_to_obj(I, reagents.total_volume) if(m_amount >= 3750) var/obj/item/stack/sheet/metal/G = new /obj/item/stack/sheet/metal(loc) G.amount = round(m_amount / G.perunit) diff --git a/code/modules/research/xenoarchaeology/chemistry.dm b/code/modules/research/xenoarchaeology/chemistry.dm index f5b718dcf0..3b5448cf16 100644 --- a/code/modules/research/xenoarchaeology/chemistry.dm +++ b/code/modules/research/xenoarchaeology/chemistry.dm @@ -1,74 +1,5 @@ //chemistry stuff here so that it can be easily viewed/modified -datum - reagent - tungsten - name = "Tungsten" - id = "tungsten" - description = "A chemical element, and a strong oxidising agent." - reagent_state = SOLID - color = "#DCDCDC" // rgb: 220, 220, 220, silver - - lithiumsodiumtungstate - name = "Lithium Sodium Tungstate" - id = "lithiumsodiumtungstate" - description = "A reducing agent for geological compounds." - reagent_state = LIQUID - color = "#C0C0C0" // rgb: 192, 192, 192, darker silver - - ground_rock - name = "Ground Rock" - id = "ground_rock" - description = "A fine dust made of ground up rock." - reagent_state = SOLID - color = "#A0522D" //rgb: 160, 82, 45, brown - - density_separated_sample - name = "Density separated sample" - id = "density_separated_sample" - description = "A watery paste used in chemical analysis, there are some chunks floating in it." - reagent_state = LIQUID - color = "#DEB887" //rgb: 222, 184, 135, light brown - - analysis_sample - name = "Analysis liquid" - id = "analysis_sample" - description = "A watery paste used in chemical analysis." - reagent_state = LIQUID - color = "#F5FFFA" //rgb: 245, 255, 250, almost white - - chemical_waste - name = "Chemical Waste" - id = "chemical_waste" - description = "A viscous, toxic liquid left over from many chemical processes." - reagent_state = LIQUID - color = "#ADFF2F" //rgb: 173, 255, 47, toxic green - -datum - chemical_reaction - lithiumsodiumtungstate //LiNa2WO4, not the easiest chem to mix - name = "Lithium Sodium Tungstate" - id = "lithiumsodiumtungstate" - result = "lithiumsodiumtungstate" - required_reagents = list("lithium" = 1, "sodium" = 2, "tungsten" = 1, "oxygen" = 4) - result_amount = 8 - - density_separated_liquid - name = "Density separated sample" - id = "density_separated_sample" - result = "density_separated_sample" - secondary_results = list("chemical_waste" = 1) - required_reagents = list("ground_rock" = 1, "lithiumsodiumtungstate" = 2) - result_amount = 2 - - analysis_liquid - name = "Analysis sample" - id = "analysis_sample" - result = "analysis_sample" - secondary_results = list("chemical_waste" = 1) - required_reagents = list("density_separated_sample" = 5) - result_amount = 4 - requires_heating = 1 /obj/item/weapon/reagent_containers/glass/solution_tray name = "solution tray" diff --git a/code/modules/research/xenoarchaeology/machinery/coolant.dm b/code/modules/research/xenoarchaeology/machinery/coolant.dm index b2f2cd3d67..39a07eee29 100644 --- a/code/modules/research/xenoarchaeology/machinery/coolant.dm +++ b/code/modules/research/xenoarchaeology/machinery/coolant.dm @@ -1,20 +1,3 @@ - -datum/reagent/coolant - name = "Coolant" - id = "coolant" - description = "Industrial cooling substance." - reagent_state = LIQUID - color = "#C8A5DC" // rgb: 200, 165, 220 - -datum/chemical_reaction/coolant - name = "Coolant" - id = "coolant" - result = "coolant" - required_reagents = list("tungsten" = 1, "oxygen" = 1, "water" = 1) - result_amount = 3 - - - /obj/structure/reagent_dispensers/coolanttank name = "coolant tank" desc = "A tank of industrial coolant" diff --git a/code/modules/surgery/other.dm b/code/modules/surgery/other.dm index c954c16de6..6ad8387c3d 100644 --- a/code/modules/surgery/other.dm +++ b/code/modules/surgery/other.dm @@ -144,9 +144,8 @@ var/obj/item/weapon/reagent_containers/container = tool - var/trans = container.reagents.trans_to(target, container.amount_per_transfer_from_this) + var/trans = container.reagents.trans_to_mob(target, container.amount_per_transfer_from_this, CHEM_BLOOD) //technically it's contact, but the reagents are being applied to internal tissue if (trans > 0) - container.reagents.reaction(target, INGEST) //technically it's contact, but the reagents are being applied to internal tissue if(container.reagents.has_reagent("peridaxon")) affected.status &= ~ORGAN_DEAD @@ -162,8 +161,7 @@ var/obj/item/weapon/reagent_containers/container = tool - var/trans = container.reagents.trans_to(target, container.amount_per_transfer_from_this) - container.reagents.reaction(target, INGEST) //technically it's contact, but the reagents are being applied to internal tissue + var/trans = container.reagents.trans_to_mob(target, container.amount_per_transfer_from_this, CHEM_BLOOD) user.visible_message("\red [user]'s hand slips, applying [trans] units of the solution to the wrong place in [target]'s [affected.display_name] with the [tool]!" , \ "\red Your hand slips, applying [trans] units of the solution to the wrong place in [target]'s [affected.display_name] with the [tool]!") diff --git a/code/modules/virus2/antibodies.dm b/code/modules/virus2/antibodies.dm index e203560e6d..a340aae4dd 100644 --- a/code/modules/virus2/antibodies.dm +++ b/code/modules/virus2/antibodies.dm @@ -55,10 +55,10 @@ datum/reagent/antibodies reagent_state = LIQUID color = "#0050F0" - reaction_mob(var/mob/M, var/method=TOUCH, var/volume) + reaction_mob(var/mob/M, var/method=CHEM_TOUCH, var/volume) if(istype(M,/mob/living/carbon)) var/mob/living/carbon/C = M - if(src.data && method == INGEST) + if(src.data && method == CHEM_INGEST) //if(C.virus2) if(src.data["antibodies"] & C.virus2.antigen) // C.virus2.dead = 1 C.antibodies |= src.data["antibodies"] diff --git a/code/modules/virus2/dishincubator.dm b/code/modules/virus2/dishincubator.dm index 6882e8e622..b176dd3d5e 100644 --- a/code/modules/virus2/dishincubator.dm +++ b/code/modules/virus2/dishincubator.dm @@ -134,7 +134,7 @@ if (locate(/datum/reagent/toxin) in beaker.reagents.reagent_list) for(var/datum/reagent/toxin/T in beaker.reagents.reagent_list) - toxins += max(T.toxpwr,1) + toxins += max(T.strength,1) beaker.reagents.remove_reagent(T.id,1) nanomanager.update_uis(src) diff --git a/code/modules/virus2/effect.dm b/code/modules/virus2/effect.dm index 8b6d9f30e8..476e7d68cb 100644 --- a/code/modules/virus2/effect.dm +++ b/code/modules/virus2/effect.dm @@ -290,7 +290,7 @@ if(c_data) data = c_data else - data = pick("bicaridine", "kelotane", "dylovene", "inaprovaline", "space_drugs", "sugar", + data = pick("bicaridine", "kelotane", "anti_toxin", "inaprovaline", "space_drugs", "sugar", "tramadol", "dexalin", "cryptobiolin", "impedrezene", "hyperzine", "ethylredoxrazine", "mindbreaker", "nutriment") var/datum/reagent/R = chemical_reagents_list[data] diff --git a/code/setup.dm b/code/setup.dm index cee4313d93..a29a848301 100644 --- a/code/setup.dm +++ b/code/setup.dm @@ -94,9 +94,15 @@ #define DOOR_CRUSH_DAMAGE 10 #define HUNGER_FACTOR 0.05 // Factor of how fast mob nutrition decreases -#define REAGENTS_METABOLISM 0.2 // How many units of reagent are consumed per tick, by default. -#define REAGENTS_EFFECT_MULTIPLIER (REAGENTS_METABOLISM / 0.4) // By defining the effect multiplier this way, it'll exactly adjust - // all effects according to how they originally were with the 0.4 metabolism +#define REM 0.2 // Means 'Reagent Effect Multiplier'. This is how many units of reagent are consumed per tick +#define CHEM_TOUCH 1 +#define CHEM_INGEST 2 +#define CHEM_BLOOD 3 +#define MINIMUM_CHEMICAL_VOLUME 0.01 +#define SOLID 1 +#define LIQUID 2 +#define GAS 3 +#define REAGENTS_OVERDOSE 30 #define MINIMUM_AIR_RATIO_TO_SUSPEND 0.05 // Minimum ratio of air that must move to/from a tile to suspend group processing #define MINIMUM_AIR_TO_SUSPEND (MOLES_CELLSTANDARD * MINIMUM_AIR_RATIO_TO_SUSPEND) // Minimum amount of air that has to move before a group processing can be suspended @@ -733,10 +739,6 @@ var/list/be_special_flags = list( #define ATMOS_DEFAULT_VOLUME_MIXER 200 // L. #define ATMOS_DEFAULT_VOLUME_PIPE 70 // L. -// Reagent metabolism defines. -#define FOOD_METABOLISM 0.4 -#define ALCOHOL_METABOLISM 0.1 - // Chemistry. #define CHEM_SYNTH_ENERGY 500 // How much energy does it take to synthesize 1 unit of chemical, in Joules. diff --git a/maps/exodus-1.dmm b/maps/exodus-1.dmm index 5a598b2962..69ae485267 100644 --- a/maps/exodus-1.dmm +++ b/maps/exodus-1.dmm @@ -221,8 +221,8 @@ "aem" = (/obj/structure/cable/green{d1 = 2; d2 = 4; icon_state = "2-4"},/obj/machinery/atmospherics/pipe/simple/hidden/supply{dir = 4},/obj/structure/cable/green{d1 = 1; d2 = 4; icon_state = "1-4"},/turf/simulated/floor,/area/security/main) "aen" = (/obj/structure/cable/green{d1 = 4; d2 = 8; icon_state = "4-8"},/obj/machinery/atmospherics/pipe/simple/hidden/supply{dir = 4},/turf/simulated/floor{dir = 2; icon_state = "redcorner"},/area/security/main) "aeo" = (/obj/machinery/door/airlock/security{name = "Evidence Storage"; req_access = list(1)},/turf/simulated/floor,/area/security/brig) -"aep" = (/obj/structure/cable/green{d1 = 4; d2 = 8; icon_state = "4-8"},/obj/machinery/atmospherics/pipe/simple/hidden/scrubbers,/obj/machinery/atmospherics/pipe/simple/hidden/supply{dir = 10},/turf/simulated/floor{dir = 8; icon_state = "redcorner"},/area/security/main) -"aeq" = (/obj/structure/bed/chair/office/dark{dir = 4},/obj/structure/cable/green{d1 = 4; d2 = 8; icon_state = "4-8"},/turf/simulated/floor,/area/security/main) +"aep" = (/obj/structure/cable/green{d1 = 4; d2 = 8; icon_state = "4-8"},/obj/machinery/atmospherics/pipe/simple/hidden/scrubbers,/obj/machinery/atmospherics/pipe/simple/hidden/supply{dir = 10},/turf/simulated/floor{dir = 8; icon_state = "redcorner"},/area/security/main) +"aeq" = (/obj/structure/bed/chair/office/dark{dir = 4},/obj/structure/cable/green{d1 = 4; d2 = 8; icon_state = "4-8"},/turf/simulated/floor,/area/security/main) "aer" = (/obj/structure/table,/obj/item/weapon/folder/red,/obj/structure/cable/green{d1 = 4; d2 = 8; icon_state = "4-8"},/turf/simulated/floor,/area/security/main) "aes" = (/obj/structure/table,/obj/item/weapon/book/manual/security_space_law,/obj/structure/cable/green{d1 = 4; d2 = 8; icon_state = "4-8"},/obj/structure/cable/green{d1 = 2; d2 = 4; icon_state = "2-4"},/turf/simulated/floor,/area/security/main) "aet" = (/obj/structure/bed/chair/office/dark{dir = 8},/obj/structure/cable/green{d1 = 1; d2 = 2; icon_state = "1-2"},/obj/structure/cable/green{d1 = 2; d2 = 8; icon_state = "2-8"},/turf/simulated/floor,/area/security/main) @@ -907,7 +907,7 @@ "arw" = (/obj/structure/grille,/obj/structure/window/reinforced,/obj/structure/window/reinforced{dir = 4},/obj/structure/window/reinforced{dir = 1},/obj/structure/window/reinforced{dir = 8},/obj/structure/cable/green,/turf/simulated/floor/plating,/area/security/prison) "arx" = (/turf/simulated/wall/r_wall,/area/security/lobby) "ary" = (/obj/machinery/atmospherics/pipe/simple/hidden/supply{dir = 9},/obj/effect/decal/cleanable/blood/oil,/turf/simulated/floor/plating,/area/maintenance/security_starboard) -"arz" = (/obj/structure/closet/crate/secure{name = "FOR DISPOSAL"; req_access = list(58)},/obj/item/clothing/glasses/sunglasses/blindfold,/obj/item/clothing/mask/balaclava,/obj/effect/decal/cleanable/cobweb2,/obj/item/clothing/mask/muzzle,/obj/item/weapon/reagent_containers/ld50_syringe/choral,/obj/effect/landmark{name = "blobstart"},/turf/simulated/floor/plating,/area/maintenance/security_port) +"arz" = (/obj/structure/closet/crate/secure{name = "FOR DISPOSAL"; req_access = list(58)},/obj/item/clothing/glasses/sunglasses/blindfold,/obj/item/clothing/mask/balaclava,/obj/effect/decal/cleanable/cobweb2,/obj/item/clothing/mask/muzzle,/obj/item/weapon/reagent_containers/syringe/ld50_syringe/choral,/obj/effect/landmark{name = "blobstart"},/turf/simulated/floor/plating,/area/maintenance/security_port) "arA" = (/turf/simulated/wall/r_wall,/area/hallway/primary/fore) "arB" = (/obj/structure/cable/yellow{d2 = 4; icon_state = "0-4"},/turf/simulated/floor/plating/airless,/area/solar/fore) "arC" = (/obj/machinery/door/firedoor/border_only{dir = 2},/obj/machinery/door/airlock/maintenance{name = "Security Maintenance"; req_access = list(1)},/obj/machinery/atmospherics/pipe/simple/hidden/supply{dir = 4},/obj/machinery/atmospherics/pipe/simple/hidden/scrubbers{dir = 4},/obj/structure/cable/green{d1 = 4; d2 = 8; icon_state = "4-8"},/turf/simulated/floor/plating,/area/security/main) From 30c6646671fd0c5b1760c91157aef990ee06cce5 Mon Sep 17 00:00:00 2001 From: Kelenius Date: Sat, 28 Mar 2015 19:01:51 +0300 Subject: [PATCH 2/7] Separates affect_mob into three procs --- code/modules/mob/living/carbon/human/life.dm | 2 +- code/modules/reagents/Chemistry-Reagents.dm | 996 +++++++++--------- .../reagent_containers/food/drinks/bottle.dm | 2 +- 3 files changed, 471 insertions(+), 529 deletions(-) diff --git a/code/modules/mob/living/carbon/human/life.dm b/code/modules/mob/living/carbon/human/life.dm index 5bcd6a178b..1745477f9a 100644 --- a/code/modules/mob/living/carbon/human/life.dm +++ b/code/modules/mob/living/carbon/human/life.dm @@ -1488,7 +1488,7 @@ if(R.id in heartstopper) //To avoid using fakedeath temp = PULSE_NONE if(R.id in cheartstopper) //Conditional heart-stoppage - if(R.volume >= R.overdose_blood) + if(R.volume >= R.overdose) temp = PULSE_NONE return temp diff --git a/code/modules/reagents/Chemistry-Reagents.dm b/code/modules/reagents/Chemistry-Reagents.dm index f3c79c7aae..8f82e31f7a 100644 --- a/code/modules/reagents/Chemistry-Reagents.dm +++ b/code/modules/reagents/Chemistry-Reagents.dm @@ -11,8 +11,7 @@ var/touch_met = 0 var/dose = 0 var/max_dose = 0 - var/overdose_blood = 0 - var/overdose_ingest = 0 + var/overdose = 0 var/scannable = 0 // Shows up on health analyzers. var/affects_dead = 0 var/glass_icon_state = null @@ -39,7 +38,7 @@ return if(!affects_dead && M.stat == DEAD) return - if((overdose_blood && (location == CHEM_BLOOD) && dose > overdose_blood) || (overdose_ingest && (location == CHEM_INGEST) && dose > overdose_ingest)) + if(overdose && (location == CHEM_BLOOD)) overdose(M, alien) var/removed = metabolism if(ingest_met && (location == CHEM_INGEST)) @@ -50,11 +49,24 @@ max_dose = max(volume, max_dose) dose = min(dose + removed, max_dose) if(removed >= (metabolism * 0.1) || removed >= 0.1) // If there's too little chemical, don't affect the mob, just remove it - affect_mob(M, alien, removed, location) + switch(location) + if(CHEM_BLOOD) + affect_blood(M, alien, removed) + if(CHEM_INGEST) + affect_ingest(M, alien, removed) + if(CHEM_TOUCH) + affect_touch(M, alien, removed) remove_self(removed) return -/datum/reagent/proc/affect_mob(var/mob/living/carbon/M, var/alien, var/removed, var/location) // This is the main working proc where the chemical does its magic +/datum/reagent/proc/affect_blood(var/mob/living/carbon/M, var/alien, var/removed) + return + +/datum/reagent/proc/affect_ingest(var/mob/living/carbon/M, var/alien, var/removed) + affect_blood(M, alien, removed * 0.5) + return + +/datum/reagent/proc/affect_touch(var/mob/living/carbon/M, var/alien, var/removed) return /datum/reagent/proc/overdose(var/mob/living/carbon/M, var/alien) // Overdose effect. Doesn't happen instantly. @@ -87,7 +99,6 @@ /datum/reagent/proc/reaction_mob(var/mob/target) touch_mob(target) - /* REAGENTS START HERE */ /* Core reagents - the most important ones */ @@ -148,29 +159,30 @@ if(B) B.blood_DNA["UNKNOWN DNA STRUCTURE"] = "X*" -/datum/reagent/blood/affect_mob(var/mob/living/carbon/M, var/alien, var/removed, var/location) - if(location == CHEM_INGEST) - if(dose > 5) - M.adjustToxLoss(removed) - if(dose > 15) - M.adjustToxLoss(removed) - if(location == CHEM_TOUCH) - if(data && data["viruses"]) - for(var/datum/disease/D in data["viruses"]) - if(D.spread_type == SPECIAL || D.spread_type == NON_CONTAGIOUS) - continue - M.contract_disease(D) - if(data && data["virus2"]) - var/list/vlist = data["virus2"] - if(vlist.len) - for(var/ID in vlist) - var/datum/disease2/disease/V = vlist[ID] - infect_virus2(M, V.getcopy()) - if(data && data["antibodies"]) - M.antibodies |= data["antibodies"] - if(location == CHEM_BLOOD) - M.inject_blood(src, volume) - remove_self(volume) +/datum/reagent/blood/affect_ingest(var/mob/living/carbon/M, var/alien, var/removed, var/location) + if(dose > 5) + M.adjustToxLoss(removed) + if(dose > 15) + M.adjustToxLoss(removed) + +/datum/reagent/blood/affect_touch(var/mob/living/carbon/M, var/alien, var/removed, var/location) + if(data && data["viruses"]) + for(var/datum/disease/D in data["viruses"]) + if(D.spread_type == SPECIAL || D.spread_type == NON_CONTAGIOUS) + continue + M.contract_disease(D) + if(data && data["virus2"]) + var/list/vlist = data["virus2"] + if(vlist.len) + for(var/ID in vlist) + var/datum/disease2/disease/V = vlist[ID] + infect_virus2(M, V.getcopy()) + if(data && data["antibodies"]) + M.antibodies |= data["antibodies"] + +/datum/reagent/blood/affect_blood(var/mob/living/carbon/M, var/alien, var/removed, var/location) + M.inject_blood(src, volume) + remove_self(volume) /datum/reagent/vaccine name = "Vaccine" @@ -178,8 +190,8 @@ reagent_state = LIQUID color = "#C81040" -/datum/reagent/vaccine/affect_mob(var/mob/living/carbon/M, var/alien, var/removed, var/location) - if(data && location == CHEM_BLOOD) +/datum/reagent/vaccine/affect_blood(var/mob/living/carbon/M, var/alien, var/removed, var/location) + if(data) for(var/datum/disease/D in M.viruses) if(istype(D, /datum/disease/advance)) var/datum/disease/advance/A = D @@ -252,7 +264,7 @@ if(!cube.wrapped) cube.Expand() -/datum/reagent/water/affect_mob(var/mob/living/carbon/M, var/alien, var/removed, var/location) +/datum/reagent/water/affect_touch(var/mob/living/carbon/M, var/alien, var/removed, var/location) if(istype(M, /mob/living/carbon/slime)) var/mob/living/carbon/slime/S = M S.adjustToxLoss(15 * removed) // Babies have 150 health, adults have 200; So, 10 units and 13.5 @@ -262,16 +274,15 @@ ++S.Discipline if(dose == removed) S.visible_message("[S]'s flesh sizzles where the water touches it!", "Your flesh burns in the water!") - if(location == CHEM_TOUCH) - var/needed = M.fire_stacks * 10 - if(volume > needed) - M.fire_stacks = 0 - M.ExtinguishMob() - remove_self(needed) - else - M.adjust_fire_stacks(-(volume / 10)) - remove_self(volume) - return + var/needed = M.fire_stacks * 10 + if(volume > needed) + M.fire_stacks = 0 + M.ExtinguishMob() + remove_self(needed) + else + M.adjust_fire_stacks(-(volume / 10)) + remove_self(volume) + return /datum/reagent/fuel name = "Welding fuel" @@ -289,16 +300,11 @@ remove_self(volume) return -/datum/reagent/fuel/affect_mob(var/mob/living/carbon/M, var/alien, var/removed, var/location) - if(location == CHEM_INGEST) - M.adjustToxLoss(1 * removed) - return - if(location == CHEM_BLOOD) - M.adjustToxLoss(2 * removed) - return - if(location == CHEM_TOUCH) // Splashing people with welding fuel to make them easy to ignite! - M.adjust_fire_stacks(0.1 * removed) - return +/datum/reagent/fuel/affect_blood(var/mob/living/carbon/M, var/alien, var/removed, var/location) + M.adjustToxLoss(2 * removed) + +/datum/reagent/fuel/affect_touch(var/mob/living/carbon/M, var/alien, var/removed, var/location) // Splashing people with welding fuel to make them easy to ignite! + M.adjust_fire_stacks(0.1 * removed) /* Basic dispenser chemicals */ @@ -332,8 +338,11 @@ reagent_state = GAS color = "#808080" -/datum/reagent/chlorine/affect_mob(var/mob/living/carbon/M, var/alien, var/removed, var/location) - M.take_organ_damage(1*REM, 0) // State doesn't matter here +/datum/reagent/chlorine/affect_blood(var/mob/living/carbon/M, var/alien, var/removed, var/location) + M.take_organ_damage(1*REM, 0) + +/datum/reagent/chlorine/affect_touch(var/mob/living/carbon/M, var/alien, var/removed, var/location) + M.take_organ_damage(1*REM, 0) /datum/reagent/copper name = "Copper" @@ -360,13 +369,15 @@ glass_name = "glass of ethanol" glass_desc = "A well-known alcohol with a variety of applications." -/datum/reagent/ethanol/affect_mob(var/mob/living/carbon/M, var/alien, var/removed, var/location) - if(location == CHEM_TOUCH) - M.adjust_fire_stacks(removed / 15) - return - if(location == CHEM_BLOOD) - M.adjustToxLoss(removed * 2 * toxicity) - return +/datum/reagent/ethanol/affect_touch(var/mob/living/carbon/M, var/alien, var/removed, var/location) + M.adjust_fire_stacks(removed / 15) + return + +/datum/reagent/ethanol/affect_blood(var/mob/living/carbon/M, var/alien, var/removed, var/location) + M.adjustToxLoss(removed * 2 * toxicity) + return + +/datum/reagent/ethanol/affect_ingest(var/mob/living/carbon/M, var/alien, var/removed, var/location) M.nutrition += nutriment_factor * removed var/strength_mod = 1 @@ -428,7 +439,10 @@ reagent_state = GAS color = "#808080" -/datum/reagent/fluorine/affect_mob(var/mob/living/carbon/M, var/alien, var/removed, var/location) +/datum/reagent/fluorine/affect_blood(var/mob/living/carbon/M, var/alien, var/removed, var/location) + M.adjustToxLoss(removed) + +/datum/reagent/fluorine/affect_touch(var/mob/living/carbon/M, var/alien, var/removed, var/location) M.adjustToxLoss(removed) /datum/reagent/hydrogen @@ -445,8 +459,8 @@ reagent_state = SOLID color = "#353535" -/datum/reagent/iron/affect_mob(var/mob/living/carbon/M, var/alien, var/removed, var/location) - if(location == CHEM_INGEST && alien != IS_DIONA) +/datum/reagent/iron/affect_ingest(var/mob/living/carbon/M, var/alien, var/removed, var/location) + if(alien != IS_DIONA) M.add_chemical_effect(CE_BLOODRESTORE, 8 * removed) /datum/reagent/lithium @@ -456,8 +470,8 @@ reagent_state = SOLID color = "#808080" -/datum/reagent/lithium/affect_mob(var/mob/living/carbon/M, var/alien, var/removed, var/location) - if(location != CHEM_TOUCH && alien != IS_DIONA) +/datum/reagent/lithium/affect_blood(var/mob/living/carbon/M, var/alien, var/removed, var/location) + if(alien != IS_DIONA) if(M.canmove && !M.restrained() && istype(M.loc, /turf/space)) step(M, pick(cardinal)) if(prob(5)) @@ -470,8 +484,8 @@ reagent_state = LIQUID color = "#484848" -/datum/reagent/mercury/affect_mob(var/mob/living/carbon/M, var/alien, var/removed, var/location) - if(location != CHEM_TOUCH && alien != IS_DIONA) +/datum/reagent/mercury/affect_blood(var/mob/living/carbon/M, var/alien, var/removed, var/location) + if(alien != IS_DIONA) if(M.canmove && !M.restrained() && istype(M.loc, /turf/space)) step(M, pick(cardinal)) if(prob(5)) @@ -485,12 +499,9 @@ reagent_state = GAS color = "#808080" -/datum/reagent/nitrogen/affect_mob(var/mob/living/carbon/M, var/alien, var/removed, var/location) +/datum/reagent/nitrogen/affect_blood(var/mob/living/carbon/M, var/alien, var/removed, var/location) if(alien == IS_VOX) - if(location == CHEM_BLOOD) - M.adjustOxyLoss(-removed * 3) - if(location == CHEM_INGEST) - M.reagents.add_reagent(id, removed, CHEM_BLOOD) + M.adjustOxyLoss(-removed * 3) /datum/reagent/oxygen name = "Oxygen" @@ -499,12 +510,9 @@ reagent_state = GAS color = "#808080" -/datum/reagent/oxygen/affect_mob(var/mob/living/carbon/M, var/alien, var/removed, var/location) - if(location == CHEM_TOUCH) - return +/datum/reagent/oxygen/affect_blood(var/mob/living/carbon/M, var/alien, var/removed, var/location) if(alien == IS_VOX) - var/effect = (location == CHEM_BLOOD ? 1.5 : 1) - M.adjustToxLoss(removed * 2 * effect) + M.adjustToxLoss(removed * 3) /datum/reagent/phosphorus name = "Phosphorus" @@ -527,22 +535,21 @@ reagent_state = SOLID color = "#C7C7C7" -/datum/reagent/radium/affect_mob(var/mob/living/carbon/M, var/alien, var/removed, var/location) +/datum/reagent/radium/affect_blood(var/mob/living/carbon/M, var/alien, var/removed, var/location) M.apply_effect(10 * removed, IRRADIATE, 0) // Radium may increase your chances to cure a disease - if(location == CHEM_BLOOD) // Make sure to only use it on carbon mobs - if(M.virus2.len) - for(var/ID in M.virus2) - var/datum/disease2/disease/V = M.virus2[ID] - if(prob(5)) - M.antibodies |= V.antigen - if(prob(50)) - M.radiation += 50 // curing it that way may kill you instead - var/absorbed = 0 - var/datum/organ/internal/diona/nutrients/rad_organ = locate() in M.internal_organs - if(rad_organ && !rad_organ.is_broken()) - absorbed = 1 - if(!absorbed) - M.adjustToxLoss(100) + if(M.virus2.len) + for(var/ID in M.virus2) + var/datum/disease2/disease/V = M.virus2[ID] + if(prob(5)) + M.antibodies |= V.antigen + if(prob(50)) + M.radiation += 50 // curing it that way may kill you instead + var/absorbed = 0 + var/datum/organ/internal/diona/nutrients/rad_organ = locate() in M.internal_organs + if(rad_organ && !rad_organ.is_broken()) + absorbed = 1 + if(!absorbed) + M.adjustToxLoss(100) /datum/reagent/radium/touch_turf(var/turf/T) if(volume >= 3) @@ -563,85 +570,83 @@ var/power = 5 var/meltdose = 10 // How much is needed to melt -/datum/reagent/acid/affect_mob(var/mob/living/carbon/M, var/alien, var/removed, var/location) - if(location == CHEM_INGEST) - M.take_organ_damage(0, removed * power) - if(location == CHEM_BLOOD) - M.take_organ_damage(0, removed * power * 2) - if(location == CHEM_TOUCH) // This is the most interesting - if(ishuman(M)) - var/mob/living/carbon/human/H = M - if(H.head) - if(H.head.unacidable) - H << "Your [H.head] protects you from the acid." - remove_self(volume) - return - else if(removed > meltdose) - H << "Your [H.head] melts away!" - del(H.head) - H.update_inv_head(1) - H.update_hair(1) - removed -= meltdose - if(removed <= 0) - return +/datum/reagent/acid/affect_blood(var/mob/living/carbon/M, var/alien, var/removed, var/location) + M.take_organ_damage(0, removed * power * 2) - if(H.wear_mask) - if(H.wear_mask.unacidable) - H << "Your [H.wear_mask] protects you from the acid." - remove_self(volume) - return - else if(removed > meltdose) - H << "Your [H.wear_mask] melts away!" - del(H.wear_mask) - H.update_inv_wear_mask(1) - H.update_hair(1) - removed -= meltdose - if(removed <= 0) +/datum/reagent/acid/affect_touch(var/mob/living/carbon/M, var/alien, var/removed, var/location) // This is the most interesting + if(ishuman(M)) + var/mob/living/carbon/human/H = M + if(H.head) + if(H.head.unacidable) + H << "Your [H.head] protects you from the acid." + remove_self(volume) return - - if(H.glasses) - if(H.glasses.unacidable) - H << "Your [H.glasses] partially protect you from the acid!" - removed /= 2 - else if(removed > meltdose) - H << "Your [H.glasses] melt away!" - del(H.glasses) - H.update_inv_glasses(1) - removed -= meltdose / 2 - if(removed <= 0) - return - - if(ismonkey(M)) - var/mob/living/carbon/monkey/MK = M - if(MK.wear_mask) - if(MK.wear_mask.unacidable) - MK << "Your [MK.wear_mask] protects you from the acid!" - remove_self(volume) - return - else - MK << "Your [MK.wear_mask] melts away!" - del(MK.wear_mask) - MK.update_inv_wear_mask(1) - removed -= meltdose - if(removed <= 0) - return - - if(volume < meltdose) // Not enough to melt anything - M.take_organ_damage(removed * power * 0.2) + else if(removed > meltdose) + H << "Your [H.head] melts away!" + del(H.head) + H.update_inv_head(1) + H.update_hair(1) + removed -= meltdose + if(removed <= 0) return - if(!M.unacidable && removed > 0) - if(istype(M, /mob/living/carbon/human) && volume >= meltdose) - var/mob/living/carbon/human/H = M - var/datum/organ/external/affecting = H.get_organ("head") - if(affecting) - if(affecting.take_damage(0, removed * power * 0.1)) - H.UpdateDamageIcon() - if(prob(100 * removed / meltdose)) // Applies disfigurement - if (!(H.species && (H.species.flags & NO_PAIN))) - H.emote("scream") - H.status_flags |= DISFIGURED + + if(H.wear_mask) + if(H.wear_mask.unacidable) + H << "Your [H.wear_mask] protects you from the acid." + remove_self(volume) + return + else if(removed > meltdose) + H << "Your [H.wear_mask] melts away!" + del(H.wear_mask) + H.update_inv_wear_mask(1) + H.update_hair(1) + removed -= meltdose + if(removed <= 0) + return + + if(H.glasses) + if(H.glasses.unacidable) + H << "Your [H.glasses] partially protect you from the acid!" + removed /= 2 + else if(removed > meltdose) + H << "Your [H.glasses] melt away!" + del(H.glasses) + H.update_inv_glasses(1) + removed -= meltdose / 2 + if(removed <= 0) + return + + if(ismonkey(M)) + var/mob/living/carbon/monkey/MK = M + if(MK.wear_mask) + if(MK.wear_mask.unacidable) + MK << "Your [MK.wear_mask] protects you from the acid!" + remove_self(volume) + return else - M.take_organ_damage(0, removed * power * 0.1) // Balance. The damage is instant, so it's weaker. 10 units -> 5 damage, double for pacid. 120 units beaker could deal 60, but a) it's burn, which is not as dangerous, b) it's a one-use weapon, c) missing with it will splash it over the ground and d) clothes give some protection, so not everything will hit + MK << "Your [MK.wear_mask] melts away!" + del(MK.wear_mask) + MK.update_inv_wear_mask(1) + removed -= meltdose + if(removed <= 0) + return + + if(volume < meltdose) // Not enough to melt anything + M.take_organ_damage(removed * power * 0.2) + return + if(!M.unacidable && removed > 0) + if(istype(M, /mob/living/carbon/human) && volume >= meltdose) + var/mob/living/carbon/human/H = M + var/datum/organ/external/affecting = H.get_organ("head") + if(affecting) + if(affecting.take_damage(0, removed * power * 0.1)) + H.UpdateDamageIcon() + if(prob(100 * removed / meltdose)) // Applies disfigurement + if (!(H.species && (H.species.flags & NO_PAIN))) + H.emote("scream") + H.status_flags |= DISFIGURED + else + M.take_organ_damage(0, removed * power * 0.1) // Balance. The damage is instant, so it's weaker. 10 units -> 5 damage, double for pacid. 120 units beaker could deal 60, but a) it's burn, which is not as dangerous, b) it's a one-use weapon, c) missing with it will splash it over the ground and d) clothes give some protection, so not everything will hit /datum/reagent/acid/touch_obj(var/obj/O) if(O.unacidable) @@ -678,9 +683,8 @@ glass_name = "glass of sugar" glass_desc = "The organic compound commonly known as table sugar and sometimes called saccharose. This white, odorless, crystalline powder has a pleasing, sweet taste." -/datum/reagent/sugar/affect_mob(var/mob/living/carbon/M, var/alien, var/removed, var/location) - if(location != CHEM_TOUCH) - M.nutrition += removed * 3 +/datum/reagent/sugar/affect_blood(var/mob/living/carbon/M, var/alien, var/removed, var/location) + M.nutrition += removed * 3 /datum/reagent/sulfur name = "Sulfur" @@ -704,14 +708,11 @@ description = "Inaprovaline is a synaptic stimulant and cardiostimulant. Commonly used to stabilize patients." reagent_state = LIQUID color = "#00BFFF" - overdose_blood = REAGENTS_OVERDOSE * 2 - overdose_ingest = REAGENTS_OVERDOSE * 4 + overdose = REAGENTS_OVERDOSE * 2 metabolism = REM * 0.5 scannable = 1 -/datum/reagent/inaprovaline/affect_mob(var/mob/living/carbon/M, var/alien, var/removed, var/location) - if(location == CHEM_TOUCH) - return +/datum/reagent/inaprovaline/affect_blood(var/mob/living/carbon/M, var/alien, var/removed, var/location) if(alien != IS_DIONA) M.add_chemical_effect(CE_STABLE) M.add_chemical_effect(CE_PAINKILLER, 25) @@ -722,16 +723,12 @@ description = "Bicaridine is an analgesic medication and can be used to treat blunt trauma." reagent_state = LIQUID color = "#BF0000" - overdose_blood = REAGENTS_OVERDOSE - overdose_ingest = REAGENTS_OVERDOSE * 2 + overdose = REAGENTS_OVERDOSE scannable = 1 -/datum/reagent/bicaridine/affect_mob(var/mob/living/carbon/M, var/alien, var/removed, var/location) - if(location == CHEM_TOUCH) - return - var/effect = (location == CHEM_BLOOD ? 1.5 : 1) +/datum/reagent/bicaridine/affect_blood(var/mob/living/carbon/M, var/alien, var/removed, var/location) if(alien != IS_DIONA) - M.heal_organ_damage(4 * removed * effect, 0) + M.heal_organ_damage(6 * removed, 0) /datum/reagent/kelotane name = "Kelotane" @@ -739,16 +736,12 @@ description = "Kelotane is a drug used to treat burns." reagent_state = LIQUID color = "#FFA800" - overdose_blood = REAGENTS_OVERDOSE - overdose_ingest = REAGENTS_OVERDOSE * 2 + overdose = REAGENTS_OVERDOSE scannable = 1 -/datum/reagent/kelotane/affect_mob(var/mob/living/carbon/M, var/alien, var/removed, var/location) - if(location == CHEM_TOUCH) - return - var/effect = (location == CHEM_BLOOD ? 1.5 : 1) +/datum/reagent/kelotane/affect_blood(var/mob/living/carbon/M, var/alien, var/removed, var/location) if(alien != IS_DIONA) - M.heal_organ_damage(0, 4 * removed * effect) + M.heal_organ_damage(0, 6 * removed) /datum/reagent/dermaline name = "Dermaline" @@ -756,16 +749,12 @@ 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 = "#FF8000" - overdose_blood = REAGENTS_OVERDOSE * 0.5 - overdose_ingest = REAGENTS_OVERDOSE + overdose = REAGENTS_OVERDOSE * 0.5 scannable = 1 -/datum/reagent/dermaline/affect_mob(var/mob/living/carbon/M, var/alien, var/removed, var/location) - if(location == CHEM_TOUCH) - return - var/effect = (location == CHEM_BLOOD ? 1.5 : 1) +/datum/reagent/dermaline/affect_blood(var/mob/living/carbon/M, var/alien, var/removed, var/location) if(alien != IS_DIONA) - M.heal_organ_damage(0, 8 * removed * effect) + M.heal_organ_damage(0, 12 * removed) /datum/reagent/dylovene name = "Dylovene" @@ -775,13 +764,10 @@ color = "#00A000" scannable = 1 -/datum/reagent/dylovene/affect_mob(var/mob/living/carbon/M, var/alien, var/removed, var/location) - if(location == CHEM_TOUCH) - return - var/effect = (location == CHEM_BLOOD ? 1.5 : 1) +/datum/reagent/dylovene/affect_blood(var/mob/living/carbon/M, var/alien, var/removed, var/location) if(alien != IS_DIONA) - M.drowsyness = max(0, M.drowsyness - 4 * removed * effect) - M.hallucination = max(0, M.hallucination - 6 * removed * effect) + M.drowsyness = max(0, M.drowsyness - 6 * removed) + M.hallucination = max(0, M.hallucination - 9 * removed) M.adjustToxLoss(-4 * removed) /datum/reagent/dexalin @@ -790,20 +776,16 @@ description = "Dexalin is used in the treatment of oxygen deprivation." reagent_state = LIQUID color = "#0080FF" - overdose_blood = REAGENTS_OVERDOSE - overdose_ingest = REAGENTS_OVERDOSE * 2 + overdose = REAGENTS_OVERDOSE scannable = 1 -/datum/reagent/dexalin/affect_mob(var/mob/living/carbon/M, var/alien, var/removed, var/location) - if(location == CHEM_TOUCH) - return - var/effect = (location == CHEM_BLOOD ? 1.5 : 1) +/datum/reagent/dexalin/affect_blood(var/mob/living/carbon/M, var/alien, var/removed, var/location) if(alien == IS_VOX) - M.adjustToxLoss(removed * 4 * effect) + M.adjustToxLoss(removed * 6) else if(alien != IS_DIONA) - M.adjustOxyLoss(-10 * removed * effect) + M.adjustOxyLoss(-15 * removed) - holder.remove_reagent("lexorin", 2 * removed, location) + holder.remove_reagent("lexorin", 2 * removed) /datum/reagent/dexalinp name = "Dexalin Plus" @@ -811,20 +793,16 @@ description = "Dexalin Plus is used in the treatment of oxygen deprivation. It is highly effective." reagent_state = LIQUID color = "#0040FF" - overdose_blood = REAGENTS_OVERDOSE * 0.5 - overdose_ingest = REAGENTS_OVERDOSE + overdose = REAGENTS_OVERDOSE * 0.5 scannable = 1 -/datum/reagent/dexalin/affect_mob(var/mob/living/carbon/M, var/alien, var/removed, var/location) - if(location == CHEM_TOUCH) - return - var/effect = (location == CHEM_BLOOD ? 1.5 : 1) +/datum/reagent/dexalin/affect_blood(var/mob/living/carbon/M, var/alien, var/removed, var/location) if(alien == IS_VOX) - M.adjustToxLoss(removed * 6 * effect) + M.adjustToxLoss(removed * 9) else if(alien != IS_DIONA) - M.adjustOxyLoss(-200 * removed * effect) // So around 20 per tick under standard settings, should be enough + M.adjustOxyLoss(-300 * removed) - holder.remove_reagent("lexorin", 3 * removed, location) + holder.remove_reagent("lexorin", 3 * removed) /datum/reagent/tricordrazine name = "Tricordrazine" @@ -834,14 +812,11 @@ color = "#8040FF" scannable = 1 -/datum/reagent/tricordrazine/affect_mob(var/mob/living/carbon/M, var/alien, var/removed, var/location) - if(location == CHEM_TOUCH) - return - var/effect = (location == CHEM_BLOOD ? 1.5 : 1) +/datum/reagent/tricordrazine/affect_blood(var/mob/living/carbon/M, var/alien, var/removed, var/location) if(alien != IS_DIONA) - M.adjustOxyLoss(-4 * removed * effect) - M.heal_organ_damage(2 * removed * effect, 2 * removed * effect) - M.adjustToxLoss(-2 * removed * effect) + M.adjustOxyLoss(-6 * removed) + M.heal_organ_damage(3 * removed, 3 * removed) + M.adjustToxLoss(-3 * removed) /datum/reagent/cryoxadone name = "Cryoxadone" @@ -852,7 +827,7 @@ metabolism = REM * 0.5 scannable = 1 -/datum/reagent/cryoxadone/affect_mob(var/mob/living/carbon/M, var/alien, var/removed, var/location) +/datum/reagent/cryoxadone/affect_blood(var/mob/living/carbon/M, var/alien, var/removed, var/location) if(M.bodytemperature < 170) M.adjustCloneLoss(-10 * removed) M.adjustOxyLoss(-10 * removed) @@ -868,7 +843,7 @@ metabolism = REM * 0.5 scannable = 1 -/datum/reagent/cryoxadone/affect_mob(var/mob/living/carbon/M, var/alien, var/removed, var/location) +/datum/reagent/cryoxadone/affect_blood(var/mob/living/carbon/M, var/alien, var/removed, var/location) if(M.bodytemperature < 170) M.adjustCloneLoss(-30 * removed) M.adjustOxyLoss(-3 * removed) @@ -883,12 +858,11 @@ description = "Most probably know this as Tylenol, but this chemical is a mild, simple painkiller." reagent_state = LIQUID color = "#C8A5DC" - overdose_blood = 60 - overdose_ingest = 60 + overdose = 60 scannable = 1 metabolism = 0.02 -/datum/reagent/paracetamol/affect_mob(var/mob/living/carbon/M, var/alien, var/removed, var/location) +/datum/reagent/paracetamol/affect_blood(var/mob/living/carbon/M, var/alien, var/removed, var/location) M.add_chemical_effect(CE_PAINKILLER, 50) /datum/reagent/paracetamol/overdose(var/mob/living/carbon/M, var/alien) @@ -901,12 +875,11 @@ description = "A simple, yet effective painkiller." reagent_state = LIQUID color = "#CB68FC" - overdose_blood = 30 - overdose_ingest = 30 + overdose = 30 scannable = 1 metabolism = 0.02 -/datum/reagent/tramadol/affect_mob(var/mob/living/carbon/M, var/alien, var/removed, var/location) +/datum/reagent/tramadol/affect_blood(var/mob/living/carbon/M, var/alien, var/removed, var/location) M.add_chemical_effect(CE_PAINKILLER, 80) /datum/reagent/tramadol/overdose(var/mob/living/carbon/M, var/alien) @@ -919,14 +892,13 @@ description = "An effective and very addictive painkiller." reagent_state = LIQUID color = "#800080" - overdose_blood = 20 - overdose_ingest = 20 + overdose = 20 metabolism = 0.02 -/datum/reagent/tramadol/affect_mob(var/mob/living/carbon/M, var/alien, var/removed, var/location) +/datum/reagent/oxycodone/affect_blood(var/mob/living/carbon/M, var/alien, var/removed, var/location) M.add_chemical_effect(CE_PAINKILLER, 200) -/datum/reagent/tramadol/overdose(var/mob/living/carbon/M, var/alien) +/datum/reagent/oxycodone/overdose(var/mob/living/carbon/M, var/alien) ..() M.druggy = max(M.druggy, 10) M.hallucination = max(M.hallucination, 3) @@ -940,12 +912,11 @@ reagent_state = LIQUID color = "#99CCFF" metabolism = REM * 0.05 - overdose_blood = REAGENTS_OVERDOSE - overdose_ingest = REAGENTS_OVERDOSE + overdose = REAGENTS_OVERDOSE scannable = 1 -/datum/reagent/synaptizine/affect_mob(var/mob/living/carbon/M, var/alien, var/removed, var/location) - if(location == CHEM_TOUCH || alien == IS_DIONA) +/datum/reagent/synaptizine/affect_blood(var/mob/living/carbon/M, var/alien, var/removed, var/location) + if(alien == IS_DIONA) return M.drowsyness = max(M.drowsyness - 5, 0) M.AdjustParalysis(-1) @@ -963,12 +934,11 @@ reagent_state = LIQUID color = "#FFFF66" metabolism = REM * 0.25 - overdose_blood = REAGENTS_OVERDOSE - overdose_ingest = REAGENTS_OVERDOSE + overdose = REAGENTS_OVERDOSE scannable = 1 -/datum/reagent/alkysine/affect_mob(var/mob/living/carbon/M, var/alien, var/removed, var/location) - if(location == CHEM_TOUCH || alien == IS_DIONA) +/datum/reagent/alkysine/affect_blood(var/mob/living/carbon/M, var/alien, var/removed, var/location) + if(alien == IS_DIONA) return M.adjustBrainLoss(-30 * removed) M.add_chemical_effect(CE_PAINKILLER, 10) @@ -979,15 +949,12 @@ description = "Heals eye damage" reagent_state = LIQUID color = "#C8A5DC" - overdose_blood = REAGENTS_OVERDOSE - overdose_ingest = REAGENTS_OVERDOSE + overdose = REAGENTS_OVERDOSE scannable = 1 -/datum/reagent/imidazoline/affect_mob(var/mob/living/carbon/M, var/alien, var/removed, var/location) - if(location == CHEM_TOUCH) - return - M.eye_blurry = max(M.eye_blurry-5, 0) - M.eye_blind = max(M.eye_blind-5, 0) +/datum/reagent/imidazoline/affect_blood(var/mob/living/carbon/M, var/alien, var/removed, var/location) + M.eye_blurry = max(M.eye_blurry - 5, 0) + M.eye_blind = max(M.eye_blind - 5, 0) if(ishuman(M)) var/mob/living/carbon/human/H = M var/datum/organ/internal/eyes/E = H.internal_organs_by_name["eyes"] @@ -1001,12 +968,11 @@ description = "Used to encourage recovery of internal organs and nervous systems. Medicate cautiously." reagent_state = LIQUID color = "#561EC3" - overdose_blood = 10 - overdose_ingest = 10 + overdose = 10 scannable = 1 -/datum/reagent/peridaxon/affect_mob(var/mob/living/carbon/M, var/alien, var/removed, var/location) - if(location != CHEM_TOUCH && ishuman(M)) +/datum/reagent/peridaxon/affect_blood(var/mob/living/carbon/M, var/alien, var/removed, var/location) + if(ishuman(M)) var/mob/living/carbon/human/H = M for(var/datum/organ/internal/I in H.internal_organs) @@ -1019,12 +985,9 @@ description = "Ryetalyn can cure all genetic abnomalities via a catalytic process." reagent_state = SOLID color = "#004000" - overdose_blood = REAGENTS_OVERDOSE - overdose_ingest = REAGENTS_OVERDOSE + overdose = REAGENTS_OVERDOSE -/datum/reagent/ryetalyn/affect_mob(var/mob/living/carbon/M, var/alien, var/removed, var/location) - if(location == CHEM_TOUCH) - return +/datum/reagent/ryetalyn/affect_blood(var/mob/living/carbon/M, var/alien, var/removed, var/location) var/needs_update = M.mutations.len > 0 M.mutations = list() @@ -1043,11 +1006,10 @@ reagent_state = LIQUID color = "#FF3300" metabolism = REM * 0.15 - overdose_blood = REAGENTS_OVERDOSE * 0.5 - overdose_ingest = REAGENTS_OVERDOSE * 0.5 + overdose = REAGENTS_OVERDOSE * 0.5 -/datum/reagent/hyperzine/affect_mob(var/mob/living/carbon/M, var/alien, var/removed, var/location) - if(location == CHEM_TOUCH || alien == IS_DIONA) +/datum/reagent/hyperzine/affect_blood(var/mob/living/carbon/M, var/alien, var/removed, var/location) + if(alien == IS_DIONA) return if(prob(5)) M.emote(pick("twitch", "blink_r", "shiver")) @@ -1059,11 +1021,10 @@ description = "A powerful oxidizer that reacts with ethanol." reagent_state = SOLID color = "#605048" - overdose_blood = REAGENTS_OVERDOSE - overdose_ingest = REAGENTS_OVERDOSE + overdose = REAGENTS_OVERDOSE -/datum/reagent/ethylredoxrazine/affect_mob(var/mob/living/carbon/M, var/alien, var/removed, var/location) - if(location == CHEM_TOUCH || alien == IS_DIONA) +/datum/reagent/ethylredoxrazine/affect_blood(var/mob/living/carbon/M, var/alien, var/removed, var/location) + if(alien == IS_DIONA) return M.dizziness = 0 M.drowsyness = 0 @@ -1081,13 +1042,10 @@ reagent_state = LIQUID color = "#408000" metabolism = REM * 0.25 - overdose_blood = REAGENTS_OVERDOSE - overdose_ingest = REAGENTS_OVERDOSE + overdose = REAGENTS_OVERDOSE scannable = 1 -/datum/reagent/hyronalin/affect_mob(var/mob/living/carbon/M, var/alien, var/removed, var/location) - if(location == CHEM_TOUCH) - return +/datum/reagent/hyronalin/affect_blood(var/mob/living/carbon/M, var/alien, var/removed, var/location) M.radiation = max(M.radiation - 30 * removed, 0) /datum/reagent/arithrazine @@ -1097,13 +1055,10 @@ reagent_state = LIQUID color = "#008000" metabolism = REM * 0.25 - overdose_blood = REAGENTS_OVERDOSE - overdose_ingest = REAGENTS_OVERDOSE + overdose = REAGENTS_OVERDOSE scannable = 1 -/datum/reagent/arithrazine/affect_mob(var/mob/living/carbon/M, var/alien, var/removed, var/location) - if(location == CHEM_TOUCH) - return +/datum/reagent/arithrazine/affect_blood(var/mob/living/carbon/M, var/alien, var/removed, var/location) M.radiation = max(M.radiation - 70 * removed, 0) M.adjustToxLoss(-10 * removed) if(prob(60)) @@ -1116,8 +1071,7 @@ reagent_state = LIQUID color = "#C1C1C1" metabolism = REM * 0.05 - overdose_blood = REAGENTS_OVERDOSE - overdose_ingest = REAGENTS_OVERDOSE * 2 + overdose = REAGENTS_OVERDOSE scannable = 1 /datum/reagent/sterilizine @@ -1128,9 +1082,8 @@ color = "#C8A5DC" touch_met = 5 -/datum/reagent/sterilizine/affect_mob(var/mob/living/carbon/M, var/alien, var/removed, var/location) - if(location == CHEM_TOUCH) - M.germ_level -= min(removed*20, M.germ_level) +/datum/reagent/sterilizine/affect_touch(var/mob/living/carbon/M, var/alien, var/removed, var/location) + M.germ_level -= min(removed*20, M.germ_level) /datum/reagent/sterilizine/touch_obj(var/obj/O) O.germ_level -= min(volume*20, O.germ_level) @@ -1144,13 +1097,10 @@ description = "Leporazine can be use to stabilize an individuals body temperature." reagent_state = LIQUID color = "#C8A5DC" - overdose_blood = REAGENTS_OVERDOSE - overdose_ingest = REAGENTS_OVERDOSE + overdose = REAGENTS_OVERDOSE scannable = 1 -/datum/reagent/leporazine/affect_mob(var/mob/living/carbon/M, var/alien, var/removed, var/location) - if(location == CHEM_TOUCH) - return +/datum/reagent/leporazine/affect_blood(var/mob/living/carbon/M, var/alien, var/removed, var/location) if(M.bodytemperature > 310) M.bodytemperature = max(310, M.bodytemperature - (40 * TEMPERATURE_DAMAGE_COEFFICIENT)) else if(M.bodytemperature < 311) @@ -1169,8 +1119,8 @@ metabolism = 0.01 data = 0 -/datum/reagent/methylphenidate/affect_mob(var/mob/living/carbon/M, var/alien, var/removed, var/location) - if(location == CHEM_TOUCH || alien == IS_DIONA) +/datum/reagent/methylphenidate/affect_blood(var/mob/living/carbon/M, var/alien, var/removed, var/location) + if(alien == IS_DIONA) return if(volume <= 0.1 && data != -1) data = -1 @@ -1189,8 +1139,8 @@ metabolism = 0.01 data = 0 -/datum/reagent/citalopram/affect_mob(var/mob/living/carbon/M, var/alien, var/removed, var/location) - if(location == CHEM_TOUCH || alien == IS_DIONA) +/datum/reagent/citalopram/affect_blood(var/mob/living/carbon/M, var/alien, var/removed, var/location) + if(alien == IS_DIONA) return if(volume <= 0.1 && data != -1) data = -1 @@ -1209,8 +1159,8 @@ metabolism = 0.01 data = 0 -/datum/reagent/paroxetine/affect_mob(var/mob/living/carbon/M, var/alien, var/removed, var/location) - if(location == CHEM_TOUCH || alien == IS_DIONA) +/datum/reagent/paroxetine/affect_blood(var/mob/living/carbon/M, var/alien, var/removed, var/location) + if(alien == IS_DIONA) return if(volume <= 0.1 && data != -1) data = -1 @@ -1225,7 +1175,6 @@ M.hallucination += 200 /* Toxins, poisons, venoms */ - /datum/reagent/toxin name = "Toxin" id = "toxin" @@ -1235,12 +1184,9 @@ metabolism = REM * 0.05 // 0.01 by default. They last a while and slowly kill you. var/strength = 4 // How much damage it deals per unit -/datum/reagent/toxin/affect_mob(var/mob/living/carbon/M, var/alien, var/removed, var/location) - if(location == CHEM_TOUCH) - return - var/effect = (location == CHEM_BLOOD ? 1.5 : 1) +/datum/reagent/toxin/affect_blood(var/mob/living/carbon/M, var/alien, var/removed, var/location) if(strength && alien != IS_DIONA) - M.adjustToxLoss(strength * removed * effect) + M.adjustToxLoss(strength * removed) /datum/reagent/toxin/plasticide name = "Plasticide" @@ -1274,10 +1220,9 @@ color = "#9D14DB" strength = 30 -/datum/reagent/toxin/phoron/affect_mob(var/mob/living/carbon/M, var/alien, var/removed, var/location) +/datum/reagent/toxin/phoron/affect_touch(var/mob/living/carbon/M, var/alien, var/removed, var/location) ..() - if(location == CHEM_TOUCH) - M.adjust_fire_stacks(removed / 5) + M.adjust_fire_stacks(removed / 5) /datum/reagent/toxin/phoron/touch_turf(var/turf/simulated/T) if(!istype(T)) @@ -1294,11 +1239,10 @@ strength = 20 metabolism = REM * 2 -/datum/reagent/toxin/cyanide/affect_mob(var/mob/living/carbon/M, var/alien, var/removed, var/location) +/datum/reagent/toxin/cyanide/affect_blood(var/mob/living/carbon/M, var/alien, var/removed, var/location) ..() - if(location != CHEM_TOUCH) - M.adjustOxyLoss(20 * removed) - M.sleeping += 1 + M.adjustOxyLoss(20 * removed) + M.sleeping += 1 /datum/reagent/toxin/potassium_chloride name = "Potassium Chloride" @@ -1307,8 +1251,7 @@ reagent_state = SOLID color = "#FFFFFF" strength = 0 - overdose_blood = REAGENTS_OVERDOSE - overdose_ingest = REAGENTS_OVERDOSE + overdose = REAGENTS_OVERDOSE /datum/reagent/toxin/potassium_chloride/overdose(var/mob/living/carbon/M, var/alien) ..() @@ -1327,10 +1270,9 @@ reagent_state = SOLID color = "#FFFFFF" strength = 10 - overdose_blood = 20 - overdose_ingest = 20 + overdose = 20 -/datum/reagent/toxin/cyanide/affect_mob(var/mob/living/carbon/M, var/alien, var/removed, var/location) +/datum/reagent/toxin/potassium_chlorophoride/affect_blood(var/mob/living/carbon/M, var/alien, var/removed, var/location) ..() if(ishuman(M)) var/mob/living/carbon/human/H = M @@ -1349,9 +1291,9 @@ metabolism = REM strength = 3 -/datum/reagent/toxin/zombiepowder/affect_mob(var/mob/living/carbon/M, var/alien, var/removed, var/location) +/datum/reagent/toxin/zombiepowder/affect_blood(var/mob/living/carbon/M, var/alien, var/removed, var/location) ..() - if(location == CHEM_TOUCH || alien == IS_DIONA) + if(alien == IS_DIONA) return M.status_flags |= FAKEDEATH M.adjustOxyLoss(3 * removed) @@ -1412,9 +1354,14 @@ else if(istype(O, /obj/effect/plant)) del(O) -/datum/reagent/toxin/plantbgone/affect_mob(var/mob/living/carbon/M, var/alien, var/removed, var/location) +/datum/reagent/toxin/plantbgone/affect_blood(var/mob/living/carbon/M, var/alien, var/removed, var/location) ..() - if(alien == IS_DIONA) // Regardless of the state + if(alien == IS_DIONA) + M.adjustToxLoss(50 * removed) + +/datum/reagent/toxin/plantbgone/affect_touch(var/mob/living/carbon/M, var/alien, var/removed, var/location) + ..() + if(alien == IS_DIONA) M.adjustToxLoss(50 * removed) /datum/reagent/acid/polyacid @@ -1432,11 +1379,10 @@ description = "Lexorin temporarily stops respiration. Causes tissue damage." reagent_state = LIQUID color = "#C8A5DC" - overdose_blood = REAGENTS_OVERDOSE - overdose_ingest = REAGENTS_OVERDOSE + overdose = REAGENTS_OVERDOSE -/datum/reagent/lexorin/affect_mob(var/mob/living/carbon/M, var/alien, var/removed, var/location) - if(location == CHEM_TOUCH || alien == IS_DIONA) +/datum/reagent/lexorin/affect_blood(var/mob/living/carbon/M, var/alien, var/removed, var/location) + if(alien == IS_DIONA) return M.take_organ_damage(3 * removed, 0) if(M.losebreath < 15) @@ -1449,16 +1395,17 @@ reagent_state = LIQUID color = "#13BC5E" -/datum/reagent/mutagen/affect_mob(var/mob/living/carbon/M, var/alien, var/removed, var/location) +/datum/reagent/mutagen/affect_touch(var/mob/living/carbon/M, var/alien, var/removed, var/location) + if(prob(33)) + affect_blood(M, alien, removed) + +/datum/reagent/mutagen/affect_ingest(var/mob/living/carbon/M, var/alien, var/removed, var/location) + if(prob(67)) + affect_blood(M, alien, removed) + +/datum/reagent/mutagen/affect_blood(var/mob/living/carbon/M, var/alien, var/removed, var/location) if(M.dna) - var/chance = 0 - if(location == CHEM_TOUCH) - chance = 33 - if(location == CHEM_INGEST) - chance = 67 - if(location == CHEM_BLOOD) - chance = 100 - if(prob(chance * removed * 0.1)) // Approx. one mutation per 10 injected/20 ingested/30 touching units + if(prob(removed * 0.1)) // Approx. one mutation per 10 injected/20 ingested/30 touching units randmuti(M) if(prob(98)) randmutb(M) @@ -1475,8 +1422,8 @@ reagent_state = LIQUID color = "#801E28" -/datum/reagent/slimejelly/affect_mob(var/mob/living/carbon/M, var/alien, var/removed, var/location) - if(location == CHEM_TOUCH || alien == IS_DIONA) +/datum/reagent/slimejelly/affect_blood(var/mob/living/carbon/M, var/alien, var/removed, var/location) + if(alien == IS_DIONA) return if(prob(10)) M << "Your insides are burning!" @@ -1491,11 +1438,10 @@ reagent_state = LIQUID color = "#009CA8" metabolism = REM * 0.5 - overdose_blood = REAGENTS_OVERDOSE - overdose_ingest = REAGENTS_OVERDOSE * 2 + overdose = REAGENTS_OVERDOSE -/datum/reagent/soporific/affect_mob(var/mob/living/carbon/M, var/alien, var/removed, var/location) - if(location == CHEM_TOUCH || alien == IS_DIONA) +/datum/reagent/soporific/affect_blood(var/mob/living/carbon/M, var/alien, var/removed, var/location) + if(alien == IS_DIONA) return if(dose < 1) if(dose == metabolism * 2 || prob(5)) @@ -1517,11 +1463,10 @@ reagent_state = SOLID color = "#000067" metabolism = REM * 0.5 - overdose_blood = REAGENTS_OVERDOSE * 0.5 - overdose_ingest = REAGENTS_OVERDOSE + overdose = REAGENTS_OVERDOSE * 0.5 -/datum/reagent/chloralhydrate/affect_mob(var/mob/living/carbon/M, var/alien, var/removed, var/location) - if(location == CHEM_TOUCH || alien == IS_DIONA) +/datum/reagent/chloralhydrate/affect_blood(var/mob/living/carbon/M, var/alien, var/removed, var/location) + if(alien == IS_DIONA) return if(dose == metabolism) M.confused += 2 @@ -1540,7 +1485,7 @@ id = "beer2" description = "An alcoholic beverage made from malted grains, hops, yeast, and water. The fermentation appears to be incomplete." //If the players manage to analyze this, they deserve to know something is wrong. reagent_state = LIQUID - color = "#664300" // rgb: 102, 67, 0 + color = "#664300" glass_icon_state = "beerglass" glass_name = "glass of beer" @@ -1556,11 +1501,10 @@ reagent_state = LIQUID color = "#60A584" metabolism = REM * 0.5 - overdose_blood = REAGENTS_OVERDOSE - overdose_ingest = REAGENTS_OVERDOSE * 2 + overdose = REAGENTS_OVERDOSE -/datum/reagent/space_drugs/affect_mob(var/mob/living/carbon/M, var/alien, var/removed, var/location) - if(location == CHEM_TOUCH || alien == IS_DIONA) +/datum/reagent/space_drugs/affect_blood(var/mob/living/carbon/M, var/alien, var/removed, var/location) + if(alien == IS_DIONA) return M.druggy = max(M.druggy, 15) if(prob(10) && isturf(M.loc) && !istype(M.loc, /turf/space) && M.canmove && !M.restrained()) @@ -1575,11 +1519,10 @@ reagent_state = LIQUID color = "#202040" metabolism = REM * 0.25 - overdose_blood = REAGENTS_OVERDOSE - overdose_ingest = REAGENTS_OVERDOSE + overdose = REAGENTS_OVERDOSE -/datum/reagent/serotrotium/affect_mob(var/mob/living/carbon/M, var/alien, var/removed, var/location) - if(location == CHEM_TOUCH || alien == IS_DIONA) +/datum/reagent/serotrotium/affect_blood(var/mob/living/carbon/M, var/alien, var/removed, var/location) + if(alien == IS_DIONA) return if(prob(7)) M.emote(pick("twitch", "drool", "moan", "gasp")) @@ -1592,11 +1535,10 @@ reagent_state = LIQUID color = "#000055" metabolism = REM * 0.5 - overdose_blood = REAGENTS_OVERDOSE - overdose_ingest = REAGENTS_OVERDOSE + overdose = REAGENTS_OVERDOSE -/datum/reagent/cryptobiolin/affect_mob(var/mob/living/carbon/M, var/alien, var/removed, var/location) - if(location == CHEM_TOUCH || alien == IS_DIONA) +/datum/reagent/cryptobiolin/affect_blood(var/mob/living/carbon/M, var/alien, var/removed, var/location) + if(alien == IS_DIONA) return M.make_dizzy(4) M.confused = max(M.confused, 20) @@ -1607,11 +1549,10 @@ description = "Impedrezene is a narcotic that impedes one's ability by slowing down the higher brain cell functions." reagent_state = LIQUID color = "#C8A5DC" - overdose_blood = REAGENTS_OVERDOSE - overdose_ingest = REAGENTS_OVERDOSE + overdose = REAGENTS_OVERDOSE -/datum/reagent/impedrezene/affect_mob(var/mob/living/carbon/M, var/alien, var/removed, var/location) - if(location == CHEM_TOUCH || alien == IS_DIONA) +/datum/reagent/impedrezene/affect_blood(var/mob/living/carbon/M, var/alien, var/removed, var/location) + if(alien == IS_DIONA) return M.jitteriness = max(M.jitteriness - 5, 0) if(prob(80)) @@ -1628,11 +1569,10 @@ reagent_state = LIQUID color = "#B31008" metabolism = REM * 0.25 - overdose_blood = REAGENTS_OVERDOSE - overdose_ingest = REAGENTS_OVERDOSE + overdose = REAGENTS_OVERDOSE -/datum/reagent/mindbreaker/affect_mob(var/mob/living/carbon/M, var/alien, var/removed, var/location) - if(location == CHEM_TOUCH || alien == IS_DIONA) +/datum/reagent/mindbreaker/affect_blood(var/mob/living/carbon/M, var/alien, var/removed, var/location) + if(alien == IS_DIONA) return M.hallucination = max(M.hallucination, 100) @@ -1641,12 +1581,11 @@ id = "psilocybin" description = "A strong psycotropic derived from certain species of mushroom." color = "#E700E7" - overdose_blood = REAGENTS_OVERDOSE - overdose_ingest = REAGENTS_OVERDOSE + overdose = REAGENTS_OVERDOSE metabolism = REM * 0.5 -/datum/reagent/psilocybin/affect_mob(var/mob/living/carbon/M, var/alien, var/removed, var/location) - if(location == CHEM_TOUCH || alien == IS_DIONA) +/datum/reagent/psilocybin/affect_blood(var/mob/living/carbon/M, var/alien, var/removed, var/location) + if(alien == IS_DIONA) return M.druggy = max(M.druggy, 30) if(dose < 1) @@ -1685,8 +1624,8 @@ reagent_state = LIQUID color = "#13BC5E" -/datum/reagent/slimetoxin/affect_mob(var/mob/living/carbon/M, var/alien, var/removed, var/location) - if(location == CHEM_BLOOD && ishuman(M)) +/datum/reagent/slimetoxin/affect_blood(var/mob/living/carbon/M, var/alien, var/removed, var/location) + if(ishuman(M)) var/mob/living/carbon/human/H = M if(H.species.name != "Slime") M << "Your flesh rapidly mutates!" @@ -1699,8 +1638,8 @@ reagent_state = LIQUID color = "#13BC5E" -/datum/reagent/aslimetoxin/affect_mob(var/mob/living/carbon/M, var/alien, var/removed, var/location) // TODO: check if there's similar code anywhere else - if(location != CHEM_BLOOD || M.monkeyizing) +/datum/reagent/aslimetoxin/affect_blood(var/mob/living/carbon/M, var/alien, var/removed, var/location) // TODO: check if there's similar code anywhere else + if(M.monkeyizing) return M << "Your flesh rapidly mutates!" M.monkeyizing = 1 @@ -1731,10 +1670,13 @@ reagent_state = LIQUID color = "#535E66" -/datum/reagent/nanites/affect_mob(var/mob/living/carbon/M, var/alien, var/removed, var/location) - if(location != CHEM_TOUCH || prob(10)) +/datum/reagent/nanites/affect_touch(var/mob/living/carbon/M, var/alien, var/removed, var/location) + if(prob(10)) M.contract_disease(new /datum/disease/robotic_transformation(0), 1) +/datum/reagent/nanites/affect_blood(var/mob/living/carbon/M, var/alien, var/removed, var/location) + M.contract_disease(new /datum/disease/robotic_transformation(0), 1) + /datum/reagent/xenomicrobes name = "Xenomicrobes" id = "xenomicrobes" @@ -1742,10 +1684,13 @@ reagent_state = LIQUID color = "#535E66" -/datum/reagent/nanites/affect_mob(var/mob/living/carbon/M, var/alien, var/removed, var/location) - if(location != CHEM_TOUCH || prob(10)) +/datum/reagent/xenomicrobes/affect_touch(var/mob/living/carbon/M, var/alien, var/removed, var/location) + if(prob(10)) M.contract_disease(new /datum/disease/xeno_transformation(0), 1) +/datum/reagent/xenomicrobes/affect_blood(var/mob/living/carbon/M, var/alien, var/removed, var/location) + M.contract_disease(new /datum/disease/xeno_transformation(0), 1) + /* Food */ /datum/reagent/nutriment @@ -1758,12 +1703,13 @@ var/injectable = 0 color = "#664330" -/datum/reagent/nutriment/affect_mob(var/mob/living/carbon/M, var/alien, var/removed, var/location) - if(location == CHEM_TOUCH) - return - if(location == CHEM_BLOOD && !injectable) +/datum/reagent/nutriment/affect_blood(var/mob/living/carbon/M, var/alien, var/removed, var/location) + if(!injectable) M.adjustToxLoss(0.1 * removed) return + affect_ingest(M, alien, removed) + +/datum/reagent/nutriment/affect_ingest(var/mob/living/carbon/M, var/alien, var/removed, var/location) M.heal_organ_damage(0.5 * removed, 0) M.nutrition += nutriment_factor * removed // For hunger and fatness M.add_chemical_effect(CE_BLOODRESTORE, 4 * removed) @@ -1773,7 +1719,7 @@ id = "protein" color = "#440000" -/datum/reagent/nutriment/protein/affect_mob(var/mob/living/carbon/M, var/alien, var/removed, var/location) +/datum/reagent/nutriment/protein/affect_ingest(var/mob/living/carbon/M, var/alien, var/removed, var/location) if(alien && alien == IS_SKRELL) M.adjustToxLoss(0.5 * removed) return @@ -1784,7 +1730,7 @@ id = "egg" color = "#FFFFAA" -/datum/reagent/nutriment/egg/affect_mob(var/mob/living/carbon/M, var/alien, var/removed, var/location) +/datum/reagent/nutriment/egg/affect_ingest(var/mob/living/carbon/M, var/alien, var/removed, var/location) if(alien && alien == IS_SKRELL) M.adjustToxLoss(0.5) return @@ -1910,12 +1856,9 @@ description = "A chemical compound that causes a powerful fat-burning reaction." reagent_state = LIQUID color = "#BBEDA4" - overdose_blood = REAGENTS_OVERDOSE - overdose_ingest = REAGENTS_OVERDOSE + overdose = REAGENTS_OVERDOSE -/datum/reagent/lipozine/affect_mob(var/mob/living/carbon/M, var/alien, var/removed, var/location) - if(location == CHEM_TOUCH) - return +/datum/reagent/lipozine/affect_blood(var/mob/living/carbon/M, var/alien, var/removed, var/location) M.nutrition = max(M.nutrition - 10 * removed, 0) M.overeatduration = 0 if(M.nutrition < 0) @@ -1929,8 +1872,7 @@ description = "A salt made of sodium chloride. Commonly used to season food." reagent_state = SOLID color = "#FFFFFF" - overdose_blood = REAGENTS_OVERDOSE - overdose_ingest = REAGENTS_OVERDOSE + overdose = REAGENTS_OVERDOSE /datum/reagent/blackpepper name = "Black Pepper" @@ -1945,8 +1887,7 @@ description = "A universal enzyme used in the preperation of certain chemicals and foods." reagent_state = LIQUID color = "#365E30" - overdose_blood = REAGENTS_OVERDOSE - overdose_ingest = REAGENTS_OVERDOSE + overdose = REAGENTS_OVERDOSE /datum/reagent/frostoil name = "Frost Oil" @@ -1955,8 +1896,8 @@ reagent_state = LIQUID color = "#B31008" -/datum/reagent/frostoil/affect_mob(var/mob/living/carbon/M, var/alien, var/removed, var/location) - if(location == CHEM_TOUCH || alien == IS_DIONA) +/datum/reagent/frostoil/affect_blood(var/mob/living/carbon/M, var/alien, var/removed, var/location) + if(alien == IS_DIONA) return M.bodytemperature = max(M.bodytemperature - 10 * TEMPERATURE_DAMAGE_COEFFICIENT, 0) if(prob(1)) @@ -1972,8 +1913,8 @@ reagent_state = LIQUID color = "#B31008" -/datum/reagent/capsaicin/affect_mob(var/mob/living/carbon/M, var/alien, var/removed, var/location) - if(location == CHEM_TOUCH || alien == IS_DIONA) +/datum/reagent/capsaicin/affect_blood(var/mob/living/carbon/M, var/alien, var/removed, var/location) + if(alien == IS_DIONA) return if(ishuman(M)) var/mob/living/carbon/human/H = M @@ -1997,69 +1938,69 @@ touch_met = 50 // Get rid of it quickly color = "#B31008" -/datum/reagent/condensedcapsaicin/affect_mob(var/mob/living/carbon/M, var/alien, var/removed, var/location) - if(location == CHEM_TOUCH) - var/eyes_covered = 0 - var/mouth_covered = 0 - var/obj/item/safe_thing = null - if(istype(M, /mob/living/carbon/human)) - var/mob/living/carbon/human/H = M - if(H.species && (H.species.flags & NO_PAIN)) - return - if(H.head) - if(H.head.flags & MASKCOVERSEYES) - eyes_covered = 1 - safe_thing = H.head - if(H.head.flags & MASKCOVERSMOUTH) - mouth_covered = 1 - safe_thing = H.head - if(H.wear_mask) - if(!eyes_covered && H.wear_mask.flags & MASKCOVERSEYES) - eyes_covered = 1 - safe_thing = H.wear_mask - if(!mouth_covered && H.wear_mask.flags & MASKCOVERSMOUTH) - mouth_covered = 1 - safe_thing = H.wear_mask - if(H.glasses) - if(!eyes_covered) - eyes_covered = 1 - if(!safe_thing) - safe_thing = H.glasses - if(eyes_covered && mouth_covered) - M << "Your [safe_thing] protects you from the pepperspray!" +/datum/reagent/condensedcapsaicin/affect_touch(var/mob/living/carbon/M, var/alien, var/removed, var/location) + var/eyes_covered = 0 + var/mouth_covered = 0 + var/obj/item/safe_thing = null + if(istype(M, /mob/living/carbon/human)) + var/mob/living/carbon/human/H = M + if(H.species && (H.species.flags & NO_PAIN)) return - else if(eyes_covered) - M << "Your [safe_thing] protect you from most of the pepperspray!" - M.eye_blurry = max(M.eye_blurry, 15) - M.eye_blind = max(M.eye_blind, 5) - M.Stun(5) - M.Weaken(5) - return - else if (mouth_covered) // Mouth cover is better than eye cover - M << "Your [safe_thing] protects your face from the pepperspray!" - M.eye_blurry = max(M.eye_blurry, 5) - return - else // Oh dear :D - M << "You're sprayed directly in the eyes with pepperspray!" - M.eye_blurry = max(M.eye_blurry, 25) - M.eye_blind = max(M.eye_blind, 10) - M.Stun(5) - M.Weaken(5) + if(H.head) + if(H.head.flags & MASKCOVERSEYES) + eyes_covered = 1 + safe_thing = H.head + if(H.head.flags & MASKCOVERSMOUTH) + mouth_covered = 1 + safe_thing = H.head + if(H.wear_mask) + if(!eyes_covered && H.wear_mask.flags & MASKCOVERSEYES) + eyes_covered = 1 + safe_thing = H.wear_mask + if(!mouth_covered && H.wear_mask.flags & MASKCOVERSMOUTH) + mouth_covered = 1 + safe_thing = H.wear_mask + if(H.glasses) + if(!eyes_covered) + eyes_covered = 1 + if(!safe_thing) + safe_thing = H.glasses + if(eyes_covered && mouth_covered) + M << "Your [safe_thing] protects you from the pepperspray!" + return + else if(eyes_covered) + M << "Your [safe_thing] protect you from most of the pepperspray!" + M.eye_blurry = max(M.eye_blurry, 15) + M.eye_blind = max(M.eye_blind, 5) + M.Stun(5) + M.Weaken(5) + return + else if (mouth_covered) // Mouth cover is better than eye cover + M << "Your [safe_thing] protects your face from the pepperspray!" + M.eye_blurry = max(M.eye_blurry, 5) + return + else // Oh dear :D + M << "You're sprayed directly in the eyes with pepperspray!" + M.eye_blurry = max(M.eye_blurry, 25) + M.eye_blind = max(M.eye_blind, 10) + M.Stun(5) + M.Weaken(5) + return + +/datum/reagent/condensedcapsaicin/affect_blood(var/mob/living/carbon/M, var/alien, var/removed, var/location) + if(ishuman(M)) + var/mob/living/carbon/human/H = M + if(H.species && (H.species.flags & (NO_PAIN | IS_SYNTHETIC))) return + if(dose == metabolism) + M << "You feel like your insides are burning!" else - if(ishuman(M)) - var/mob/living/carbon/human/H = M - if(H.species && (H.species.flags & (NO_PAIN | IS_SYNTHETIC))) - return - if(dose == metabolism) - M << "You feel like your insides are burning!" - else - M.apply_effect(4, AGONY, 0) - if(prob(5)) - M.visible_message("[M] [pick("dry heaves!","coughs!","splutters!")]", "You feel like your insides are burning!") - if(istype(M, /mob/living/carbon/slime)) - M.bodytemperature += rand(15, 30) - holder.remove_reagent("frostoil", 5) + M.apply_effect(4, AGONY, 0) + if(prob(5)) + M.visible_message("[M] [pick("dry heaves!","coughs!","splutters!")]", "You feel like your insides are burning!") + if(istype(M, /mob/living/carbon/slime)) + M.bodytemperature += rand(15, 30) + holder.remove_reagent("frostoil", 5) /* Drinks */ @@ -2075,19 +2016,19 @@ var/adj_sleepy = 0 var/adj_temp = 0 -/datum/reagent/drink/affect_mob(var/mob/living/carbon/M, var/alien, var/removed, var/location) - if(location == CHEM_BLOOD) - M.adjustToxLoss(removed) // Probably not a good idea; not very deadly though - return - if(location == CHEM_INGEST) - M.nutrition += nutrition * removed - M.dizziness = max(0, M.dizziness + adj_dizzy) - M.drowsyness = max(0, M.drowsyness + adj_drowsy) - M.sleeping = max(0, M.sleeping + adj_sleepy) - if(adj_temp > 0 && M.bodytemperature < 310) // 310 is the normal bodytemp. 310.055 - M.bodytemperature = min(310, M.bodytemperature + (adj_temp * TEMPERATURE_DAMAGE_COEFFICIENT)) - if(adj_temp < 0 && M.bodytemperature > 310) - M.bodytemperature = min(310, M.bodytemperature - (adj_temp * TEMPERATURE_DAMAGE_COEFFICIENT)) +/datum/reagent/drink/affect_blood(var/mob/living/carbon/M, var/alien, var/removed, var/location) + M.adjustToxLoss(removed) // Probably not a good idea; not very deadly though + return + +/datum/reagent/drink/affect_ingest(var/mob/living/carbon/M, var/alien, var/removed, var/location) + M.nutrition += nutrition * removed + M.dizziness = max(0, M.dizziness + adj_dizzy) + M.drowsyness = max(0, M.drowsyness + adj_drowsy) + M.sleeping = max(0, M.sleeping + adj_sleepy) + if(adj_temp > 0 && M.bodytemperature < 310) // 310 is the normal bodytemp. 310.055 + M.bodytemperature = min(310, M.bodytemperature + (adj_temp * TEMPERATURE_DAMAGE_COEFFICIENT)) + if(adj_temp < 0 && M.bodytemperature > 310) + M.bodytemperature = min(310, M.bodytemperature - (adj_temp * TEMPERATURE_DAMAGE_COEFFICIENT)) // Juices @@ -2121,10 +2062,9 @@ glass_name = "glass of carrot juice" glass_desc = "It is just like a carrot but without crunching." -/datum/reagent/drink/carrotjuice/affect_mob(var/mob/living/carbon/M, var/alien, var/removed, var/location) +/datum/reagent/drink/carrotjuice/affect_ingest(var/mob/living/carbon/M, var/alien, var/removed, var/location) ..() - if(location == CHEM_INGEST) - M.reagents.add_reagent("imidazoline", removed * 0.2) + M.reagents.add_reagent("imidazoline", removed * 0.2) /datum/reagent/drink/grapejuice name = "Grape Juice" @@ -2156,9 +2096,9 @@ glass_name = "glass of lime juice" glass_desc = "A glass of sweet-sour lime juice" -/datum/reagent/drink/limejuice/affect_mob(var/mob/living/carbon/M, var/alien, var/removed, var/location) +/datum/reagent/drink/limejuice/affect_ingest(var/mob/living/carbon/M, var/alien, var/removed, var/location) ..() - if(location == CHEM_TOUCH || location == CHEM_BLOOD || alien == IS_DIONA) + if(alien == IS_DIONA) return M.adjustToxLoss(-0.5 * removed) @@ -2172,9 +2112,9 @@ glass_name = "glass of orange juice" glass_desc = "Vitamins! Yay!" -/datum/reagent/drink/orangejuice/affect_mob(var/mob/living/carbon/M, var/alien, var/removed, var/location) +/datum/reagent/drink/orangejuice/affect_ingest(var/mob/living/carbon/M, var/alien, var/removed, var/location) ..() - if(location == CHEM_TOUCH || location == CHEM_BLOOD || alien == IS_DIONA) + if(alien == IS_DIONA) return M.adjustOxyLoss(-2 * removed) @@ -2210,9 +2150,9 @@ glass_name = "glass of tomato juice" glass_desc = "Are you sure this is tomato juice?" -/datum/reagent/drink/tomatojuice/affect_mob(var/mob/living/carbon/M, var/alien, var/removed, var/location) +/datum/reagent/drink/tomatojuice/affect_ingest(var/mob/living/carbon/M, var/alien, var/removed, var/location) ..() - if(location == CHEM_TOUCH || location == CHEM_BLOOD || alien == IS_DIONA) + if(alien == IS_DIONA) return M.heal_organ_damage(0, 0.5 * removed) @@ -2238,9 +2178,9 @@ glass_name = "glass of milk" glass_desc = "White and nutritious goodness!" -/datum/reagent/drink/milk/affect_mob(var/mob/living/carbon/M, var/alien, var/removed, var/location) +/datum/reagent/drink/milk/affect_ingest(var/mob/living/carbon/M, var/alien, var/removed, var/location) ..() - if(location == CHEM_TOUCH || location == CHEM_BLOOD || alien == IS_DIONA) + if(alien == IS_DIONA) return M.heal_organ_damage(0.5 * removed, 0) holder.remove_reagent("capsaicin", 10 * removed) @@ -2279,9 +2219,9 @@ glass_name = "cup of tea" glass_desc = "Tasty black tea, it has antioxidants, it's good for you!" -/datum/reagent/drink/tea/affect_mob(var/mob/living/carbon/M, var/alien, var/removed, var/location) +/datum/reagent/drink/tea/affect_ingest(var/mob/living/carbon/M, var/alien, var/removed, var/location) ..() - if(location == CHEM_TOUCH || location == CHEM_BLOOD || alien == IS_DIONA) + if(alien == IS_DIONA) return M.adjustToxLoss(-0.5 * removed) @@ -2310,10 +2250,11 @@ glass_icon_state = "hot_coffee" glass_name = "cup of coffee" glass_desc = "Don't drop it, or you'll send scalding liquid and glass shards everywhere." + -/datum/reagent/drink/coffee/affect_mob(var/mob/living/carbon/M, var/alien, var/removed, var/location) +/datum/reagent/drink/coffee/affect_ingest(var/mob/living/carbon/M, var/alien, var/removed, var/location) ..() - if(location == CHEM_TOUCH || location == CHEM_BLOOD || alien == IS_DIONA) + if(alien == IS_DIONA) return M.make_jittery(5) if(adj_temp > 0) @@ -2342,7 +2283,7 @@ glass_desc = "A nice and refrshing beverage while you are reading." glass_center_of_mass = list("x"=15, "y"=9) -/datum/reagent/drink/coffee/soy_latte/affect_mob(var/mob/living/carbon/M, var/alien, var/removed, var/location) +/datum/reagent/drink/coffee/soy_latte/affect_ingest(var/mob/living/carbon/M, var/alien, var/removed, var/location) ..() M.heal_organ_damage(0.5 * removed, 0) @@ -2358,7 +2299,7 @@ glass_desc = "A nice, strong and refreshing beverage while you are reading." glass_center_of_mass = list("x"=15, "y"=9) -/datum/reagent/drink/coffee/cafe_latte/affect_mob(var/mob/living/carbon/M, var/alien, var/removed, var/location) +/datum/reagent/drink/coffee/cafe_latte/affect_ingest(var/mob/living/carbon/M, var/alien, var/removed, var/location) ..() M.heal_organ_damage(0.5 * removed, 0) @@ -2471,7 +2412,7 @@ glass_desc = "The secret of the sanctuary of the Libarian..." glass_center_of_mass = list("x"=16, "y"=9) -/datum/reagent/drink/rewriter/affect_mob(var/mob/living/carbon/M, var/alien, var/removed, var/location) +/datum/reagent/drink/rewriter/affect_ingest(var/mob/living/carbon/M, var/alien, var/removed, var/location) ..() M.make_jittery(5) @@ -2488,7 +2429,7 @@ glass_desc = "Don't cry, Don't raise your eye, It's only nuclear wasteland" glass_center_of_mass = list("x"=16, "y"=6) -/datum/reagent/drink/nuka_cola/affect_mob(var/mob/living/carbon/M, var/alien, var/removed, var/location) +/datum/reagent/drink/nuka_cola/affect_ingest(var/mob/living/carbon/M, var/alien, var/removed, var/location) ..() M.add_chemical_effect(CE_SPEEDBOOST, 1) M.make_jittery(20) @@ -2580,9 +2521,9 @@ glass_desc = "A healthy mixture of juices, guaranteed to keep you healthy until the next toolboxing takes place." glass_center_of_mass = list("x"=16, "y"=8) -/datum/reagent/drink/doctor_delight/affect_mob(var/mob/living/carbon/M, var/alien, var/removed, var/location) +/datum/reagent/drink/doctor_delight/affect_ingest(var/mob/living/carbon/M, var/alien, var/removed, var/location) ..() - if(location == CHEM_TOUCH || location == CHEM_BLOOD || alien == IS_DIONA) + if(alien == IS_DIONA) return M.adjustOxyLoss(-4 * removed) M.heal_organ_damage(2 * removed, 2 * removed) @@ -2617,9 +2558,9 @@ color = "#302000" nutrition = 5 -/datum/reagent/drink/hell_ramen/affect_mob(var/mob/living/carbon/M, var/alien, var/removed, var/location) +/datum/reagent/drink/hell_ramen/affect_ingest(var/mob/living/carbon/M, var/alien, var/removed, var/location) ..() - if(location == CHEM_TOUCH || location == CHEM_BLOOD || alien == IS_DIONA) + if(alien == IS_DIONA) return M.bodytemperature += 10 * TEMPERATURE_DAMAGE_COEFFICIENT @@ -2685,9 +2626,9 @@ glass_desc = "A freezing pint of beer" glass_center_of_mass = list("x"=16, "y"=8) -/datum/reagent/ethanol/beer/affect_mob(var/mob/living/carbon/M, var/alien, var/removed, var/location) +/datum/reagent/ethanol/beer/affect_ingest(var/mob/living/carbon/M, var/alien, var/removed, var/location) ..() - if(location == CHEM_TOUCH || location == CHEM_BLOOD || alien == IS_DIONA) + if(alien == IS_DIONA) return M.jitteriness = max(M.jitteriness - 3, 0) @@ -2727,9 +2668,9 @@ glass_desc = "Now you want to Pray for a pirate suit, don't you?" glass_center_of_mass = list("x"=16, "y"=12) -/datum/reagent/ethanol/deadrum/affect_mob(var/mob/living/carbon/M, var/alien, var/removed, var/location) +/datum/reagent/ethanol/deadrum/affect_ingest(var/mob/living/carbon/M, var/alien, var/removed, var/location) ..() - if(location == CHEM_TOUCH || location == CHEM_BLOOD || alien == IS_DIONA) + if(alien == IS_DIONA) return M.dizziness +=5 @@ -2757,9 +2698,9 @@ glass_desc = "DAMN, THIS THING LOOKS ROBUST" glass_center_of_mass = list("x"=15, "y"=7) -/datum/reagent/ethanol/kahlua/affect_mob(var/mob/living/carbon/M, var/alien, var/removed, var/location) +/datum/reagent/ethanol/kahlua/affect_ingest(var/mob/living/carbon/M, var/alien, var/removed, var/location) ..() - if(location == CHEM_TOUCH || location == CHEM_BLOOD || alien == IS_DIONA) + if(alien == IS_DIONA) return M.dizziness = max(0, M.dizziness - 5) M.drowsyness = max(0, M.drowsyness - 3) @@ -2828,9 +2769,9 @@ glass_name = "glass of Thirteen Loko" glass_desc = "This is a glass of Thirteen Loko, it appears to be of the highest quality. The drink, not the glass." -/datum/reagent/ethanol/thirteenloko/affect_mob(var/mob/living/carbon/M, var/alien, var/removed, var/location) +/datum/reagent/ethanol/thirteenloko/affect_ingest(var/mob/living/carbon/M, var/alien, var/removed, var/location) ..() - if(location == CHEM_TOUCH || location == CHEM_BLOOD || alien == IS_DIONA) + if(alien == IS_DIONA) return M.drowsyness = max(0, M.drowsyness - 7) if (M.bodytemperature > 310) @@ -2861,7 +2802,7 @@ glass_desc = "The glass contain wodka. Xynta." glass_center_of_mass = list("x"=16, "y"=12) -/datum/reagent/ethanol/vodka/affect_mob(var/mob/living/carbon/M, var/alien, var/removed, var/location) +/datum/reagent/ethanol/vodka/affect_ingest(var/mob/living/carbon/M, var/alien, var/removed, var/location) ..() M.radiation = max(M.radiation - 1 * removed, 0) @@ -3042,7 +2983,7 @@ glass_desc = "Heavy, hot and strong. Just like the Iron fist of the LAW." glass_center_of_mass = list("x"=18, "y"=10) -/datum/reagent/ethanol/beepsky_smash/affect_mob(var/mob/living/carbon/M, var/alien, var/removed, var/location) +/datum/reagent/ethanol/beepsky_smash/affect_ingest(var/mob/living/carbon/M, var/alien, var/removed, var/location) ..() M.Stun(2) @@ -3423,7 +3364,7 @@ glass_desc = "A drink that is guaranteed to knock you silly." glass_center_of_mass = list("x"=16, "y"=8) -/datum/reagent/ethanol/neurotoxin/affect_mob(var/mob/living/carbon/M, var/alien, var/removed, var/location) +/datum/reagent/ethanol/neurotoxin/affect_ingest(var/mob/living/carbon/M, var/alien, var/removed, var/location) ..() M.Weaken(3) @@ -3453,7 +3394,7 @@ glass_desc = "A black ichor with an oily purple sheer on top. Are you sure you should drink this?" glass_center_of_mass = list("x"=16, "y"=5) -/datum/reagent/ethanol/pwine/affect_mob(var/mob/living/carbon/M, var/alien, var/removed, var/location) +/datum/reagent/ethanol/pwine/affect_ingest(var/mob/living/carbon/M, var/alien, var/removed, var/location) ..() if(dose > 30) M.adjustToxLoss(2 * removed) @@ -3683,11 +3624,10 @@ description = "A powder with almost magical properties, this substance can effectively treat genetic damage in humanoids, though excessive consumption has side effects." reagent_state = SOLID color = "#669900" - overdose_blood = REAGENTS_OVERDOSE - overdose_ingest = REAGENTS_OVERDOSE + overdose = REAGENTS_OVERDOSE scannable = 1 -/datum/reagent/rezadone/affect_mob(var/mob/living/carbon/M, var/alien, var/removed, var/location) +/datum/reagent/rezadone/affect_blood(var/mob/living/carbon/M, var/alien, var/removed, var/location) M.adjustCloneLoss(-20 * removed) M.adjustOxyLoss(-2 * removed) M.heal_organ_damage(20 * removed, 20 * removed) @@ -3706,8 +3646,7 @@ description = "Intensely coloured powder obtained by grinding crayons." reagent_state = LIQUID color = "#888888" - overdose_blood = 5 - overdose_ingest = 5 + overdose = 5 /datum/reagent/crayon_dust/red name = "Red crayon dust" @@ -3755,8 +3694,7 @@ description = "This paint will stick to almost any object." reagent_state = LIQUID color = "#808080" - overdose_blood = REAGENTS_OVERDOSE * 0.5 - overdose_ingest = REAGENTS_OVERDOSE * 0.5 + overdose = REAGENTS_OVERDOSE * 0.5 color_weight = 20 /datum/reagent/paint/touch_turf(var/turf/T) @@ -3771,9 +3709,8 @@ if(istype(M) && !istype(M, /mob/dead)) //painting ghosts: not allowed M.color = color -/datum/reagent/paint/affect_mob(var/mob/living/carbon/M, var/alien, var/removed, var/location) - if(location == CHEM_TOUCH) - M.color = color +/datum/reagent/paint/affect_touch(var/mob/living/carbon/M, var/alien, var/removed, var/location) + M.color = color /datum/reagent/paint/get_data() return color @@ -3822,7 +3759,10 @@ glass_name = "golden cup" glass_desc = "It's magic. We don't have to explain it." -/datum/reagent/adminordrazine/affect_mob(var/mob/living/carbon/M, var/alien, var/removed, var/location) +/datum/reagent/adminordrazine/affect_touch(var/mob/living/carbon/M, var/alien, var/removed, var/location) + affect_blood(M, alien, removed) + +/datum/reagent/adminordrazine/affect_blood(var/mob/living/carbon/M, var/alien, var/removed, var/location) M.setCloneLoss(0) M.setOxyLoss(0) M.radiation = 0 @@ -3871,7 +3811,10 @@ reagent_state = SOLID color = "#B8B8C0" -/datum/reagent/uranium/affect_mob(var/mob/living/carbon/M, var/alien, var/removed, var/location) +/datum/reagent/uranium/affect_touch(var/mob/living/carbon/M, var/alien, var/removed, var/location) + affect_ingest(M, alien, removed) + +/datum/reagent/uranium/affect_blood(var/mob/living/carbon/M, var/alien, var/removed, var/location) M.apply_effect(5 * removed, IRRADIATE, 0) /datum/reagent/uranium/touch_turf(var/turf/T) @@ -3882,7 +3825,6 @@ new /obj/effect/decal/cleanable/greenglow(T) return - /datum/reagent/adrenaline name = "Adrenaline" id = "adrenaline" @@ -3890,8 +3832,8 @@ reagent_state = LIQUID color = "#C8A5DC" -/datum/reagent/adrenaline/affect_mob(var/mob/living/carbon/M, var/alien, var/removed, var/location) - if(location == CHEM_TOUCH || alien == IS_DIONA) +/datum/reagent/adrenaline/affect_blood(var/mob/living/carbon/M, var/alien, var/removed, var/location) + if(alien == IS_DIONA) return M.SetParalysis(0) M.SetWeakened(0) @@ -3907,12 +3849,11 @@ glass_name = "glass of holy water" glass_desc = "An ashen-obsidian-water mix, this solution will alter certain sections of the brain's rationality." -/datum/reagent/water/holywater/affect_mob(var/mob/living/carbon/M, var/alien, var/removed, var/location) +/datum/reagent/water/holywater/affect_ingest(var/mob/living/carbon/M, var/alien, var/removed, var/location) ..() if(ishuman(M)) // Any location - if((M.mind in ticker.mode.cult) && prob(10)) - ticker.mode.remove_cultist(M.mind) - M.visible_message("[M]'s eyes blink and become clearer.", "A cooling sensation from inside you brings you an untold calmness.") + if(M.mind && cult.is_antagonist(M.mind) && prob(10)) + cult.remove_antagonist(M.mind) /datum/reagent/ammonia name = "Ammonia" @@ -3959,10 +3900,11 @@ remove_self(5) return -/datum/reagent/thermite/affect_mob(var/mob/living/carbon/M, var/alien, var/removed, var/location) - if(location == CHEM_TOUCH) - M.adjust_fire_stacks(removed * 0.2) - return +/datum/reagent/thermite/affect_touch(var/mob/living/carbon/M, var/alien, var/removed, var/location) + M.adjust_fire_stacks(removed * 0.2) + return + +/datum/reagent/thermite/affect_blood(var/mob/living/carbon/M, var/alien, var/removed, var/location) M.adjustFireLoss(3 * removed) /datum/reagent/space_cleaner @@ -3989,7 +3931,7 @@ for(var/mob/living/carbon/slime/M in T) M.adjustToxLoss(rand(5, 10)) -/datum/reagent/space_cleaner/affect_mob(var/mob/living/carbon/M, var/alien, var/removed, var/location) +/datum/reagent/space_cleaner/affect_touch(var/mob/living/carbon/M, var/alien, var/removed, var/location) if(M.r_hand) M.r_hand.clean_blood() if(M.l_hand) diff --git a/code/modules/reagents/reagent_containers/food/drinks/bottle.dm b/code/modules/reagents/reagent_containers/food/drinks/bottle.dm index 03b85848d6..dd2f879b27 100644 --- a/code/modules/reagents/reagent_containers/food/drinks/bottle.dm +++ b/code/modules/reagents/reagent_containers/food/drinks/bottle.dm @@ -78,7 +78,7 @@ //The reagents in the bottle splash all over the target, thanks for the idea Nodrak if(reagents) user.visible_message("The contents of the [src] splash all over [target]!") - reagents.trans_to_mob(target, reagents.total_volume) + reagents.splash_mob(target, reagents.total_volume) //Finally, smash the bottle. This kills (del) the bottle. src.smash(target, user) From 502c9f1510266102557f5c930744f62ca9845452 Mon Sep 17 00:00:00 2001 From: Kelenius Date: Tue, 31 Mar 2015 18:34:59 +0300 Subject: [PATCH 3/7] Fixes missed merge leftovers in syringe.dm --- .../reagents/reagent_containers/syringes.dm | 15 +++------------ 1 file changed, 3 insertions(+), 12 deletions(-) diff --git a/code/modules/reagents/reagent_containers/syringes.dm b/code/modules/reagents/reagent_containers/syringes.dm index d7c140779f..c503d6da5f 100644 --- a/code/modules/reagents/reagent_containers/syringes.dm +++ b/code/modules/reagents/reagent_containers/syringes.dm @@ -58,8 +58,8 @@ if(mode == SYRINGE_BROKEN) user << "This syringe is broken!" return - - if(user.a_intent == I_HURT && ismob(target)) + + if(user.a_intent == I_HURT && ismob(target)) if((CLUMSY in user.mutations) && prob(50)) target = user syringestab(target, user) @@ -228,11 +228,7 @@ var/mob/living/carbon/human/H = target var/target_zone = ran_zone(check_zone(user.zone_sel.selecting, target)) -<<<<<<< HEAD - var/datum/organ/external/affecting = H.get_organ(target_zone) -======= - var/obj/item/organ/external/affecting = target:get_organ(target_zone) ->>>>>>> dev + var/obj/item/organ/external/affecting = H.get_organ(target_zone) if (!affecting || (affecting.status & ORGAN_DESTROYED) || affecting.is_stump()) user << "They are missing that limb!" @@ -260,13 +256,8 @@ target.take_organ_damage(3)// 7 is the same as crowbar punch var/syringestab_amount_transferred = rand(0, (reagents.total_volume - 5)) //nerfed by popular demand -<<<<<<< HEAD reagents.trans_to_mob(target, syringestab_amount_transferred, CHEM_BLOOD) break_syringe(target, user) -======= - src.reagents.trans_to(target, syringestab_amount_transferred) - src.break_syringe(target, user) ->>>>>>> dev proc/break_syringe(mob/living/carbon/target, mob/living/carbon/user) desc += " It is broken." From 7a3c8d2304a769651b8d34fa27a5d33a9435437c Mon Sep 17 00:00:00 2001 From: Kelenius Date: Tue, 31 Mar 2015 20:02:41 +0300 Subject: [PATCH 4/7] Makes the code compile --- code/modules/reagents/Chemistry-Reagents.dm | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/code/modules/reagents/Chemistry-Reagents.dm b/code/modules/reagents/Chemistry-Reagents.dm index 7829755035..1e1aff55a0 100644 --- a/code/modules/reagents/Chemistry-Reagents.dm +++ b/code/modules/reagents/Chemistry-Reagents.dm @@ -236,7 +236,7 @@ else if(volume >= 3) if(T.wet >= 1) - return + return T.wet = 1 if(T.wet_overlay) T.overlays -= T.wet_overlay @@ -245,10 +245,10 @@ T.overlays += T.wet_overlay spawn(800) // This is terrible and needs to be changed when possible. - if(!T || !istype(T)) + if(!T || !istype(T)) return if(T.wet >= 2) - return + return T.wet = 0 if(T.wet_overlay) T.overlays -= T.wet_overlay @@ -618,7 +618,7 @@ if(!M.unacidable && removed > 0) if(istype(M, /mob/living/carbon/human) && volume >= meltdose) var/mob/living/carbon/human/H = M - var/datum/organ/external/affecting = H.get_organ("head") + var/obj/item/organ/external/affecting = H.get_organ("head") if(affecting) if(affecting.take_damage(0, removed * power * 0.1)) H.UpdateDamageIcon() @@ -2231,7 +2231,7 @@ glass_icon_state = "hot_coffee" glass_name = "cup of coffee" glass_desc = "Don't drop it, or you'll send scalding liquid and glass shards everywhere." - + /datum/reagent/drink/coffee/affect_ingest(var/mob/living/carbon/M, var/alien, var/removed, var/location) ..() @@ -4037,5 +4037,5 @@ id = "chemical_waste" description = "A viscous, toxic liquid left over from many chemical processes." reagent_state = LIQUID - color = "#ADFF2F" //rgb: 173, 255, 47, toxic green + color = "#ADFF2F" //rgb: 173, 255, 47, toxic green */ \ No newline at end of file From 948252d25b63b5dc14d27f23215db9928a7921b0 Mon Sep 17 00:00:00 2001 From: Kelenius Date: Tue, 28 Apr 2015 11:00:56 +0300 Subject: [PATCH 5/7] Removes unused files added by accident, separates reagent files --- baystation12.dme | 6 + code/modules/mob/living/carbon/monkey/life.dm | 520 --- .../mob/living/carbon/monkey/monkey.dm | 287 -- code/modules/organs/organ_objects.dm | 275 -- code/modules/reagents/Chemistry-Reagents.dm | 3941 ----------------- .../Chemistry-Reagents-Core.dm | 198 + .../Chemistry-Reagents-Dispenser.dm | 376 ++ .../Chemistry-Reagents-Food-Drinks.dm | 1924 ++++++++ .../Chemistry-Reagents-Medicine.dm | 493 +++ .../Chemistry-Reagents-Other.dm | 382 ++ .../Chemistry-Reagents-Toxins.dm | 516 +++ 11 files changed, 3895 insertions(+), 5023 deletions(-) delete mode 100644 code/modules/mob/living/carbon/monkey/life.dm delete mode 100644 code/modules/mob/living/carbon/monkey/monkey.dm delete mode 100644 code/modules/organs/organ_objects.dm create mode 100644 code/modules/reagents/Chemistry-Reagents/Chemistry-Reagents-Core.dm create mode 100644 code/modules/reagents/Chemistry-Reagents/Chemistry-Reagents-Dispenser.dm create mode 100644 code/modules/reagents/Chemistry-Reagents/Chemistry-Reagents-Food-Drinks.dm create mode 100644 code/modules/reagents/Chemistry-Reagents/Chemistry-Reagents-Medicine.dm create mode 100644 code/modules/reagents/Chemistry-Reagents/Chemistry-Reagents-Other.dm create mode 100644 code/modules/reagents/Chemistry-Reagents/Chemistry-Reagents-Toxins.dm diff --git a/baystation12.dme b/baystation12.dme index 7c5fd96b40..5a0328e42c 100644 --- a/baystation12.dme +++ b/baystation12.dme @@ -1447,6 +1447,12 @@ #include "code\modules\reagents\Chemistry-Recipes.dm" #include "code\modules\reagents\reagent_containers.dm" #include "code\modules\reagents\reagent_dispenser.dm" +#include "code\modules\reagents\Chemistry-Reagents\Chemistry-Reagents-Core.dm" +#include "code\modules\reagents\Chemistry-Reagents\Chemistry-Reagents-Dispenser.dm" +#include "code\modules\reagents\Chemistry-Reagents\Chemistry-Reagents-Food-Drinks.dm" +#include "code\modules\reagents\Chemistry-Reagents\Chemistry-Reagents-Medicine.dm" +#include "code\modules\reagents\Chemistry-Reagents\Chemistry-Reagents-Other.dm" +#include "code\modules\reagents\Chemistry-Reagents\Chemistry-Reagents-Toxins.dm" #include "code\modules\reagents\dispenser\_defines.dm" #include "code\modules\reagents\dispenser\cartridge.dm" #include "code\modules\reagents\dispenser\cartridge_presets.dm" diff --git a/code/modules/mob/living/carbon/monkey/life.dm b/code/modules/mob/living/carbon/monkey/life.dm deleted file mode 100644 index b339fc086e..0000000000 --- a/code/modules/mob/living/carbon/monkey/life.dm +++ /dev/null @@ -1,520 +0,0 @@ -//This file was auto-corrected by findeclaration.exe on 25.5.2012 20:42:32 - -/mob/living/carbon/monkey - var/oxygen_alert = 0 - var/phoron_alert = 0 - var/fire_alert = 0 - var/pressure_alert = 0 - - var/temperature_alert = 0 - - -/mob/living/carbon/monkey/Life() - set invisibility = 0 - set background = 1 - if (monkeyizing) return - if (update_muts) - update_muts=0 - domutcheck(src,null,MUTCHK_FORCED) - ..() - - var/datum/gas_mixture/environment // Added to prevent null location errors-- TLE - if(loc) - environment = loc.return_air() - - if (stat != DEAD) - //First, resolve location and get a breath - if(air_master.current_cycle%4==2) - //Only try to take a breath every 4 seconds, unless suffocating - breathe() - - //Updates the number of stored chemicals for powers - handle_changeling() - - //Mutations and radiation - handle_mutations_and_radiation() - - //Chemicals in the body - handle_chemicals_in_body() - - //Disabilities - handle_disabilities() - - //Apparently, the person who wrote this code designed it so that - //blinded get reset each cycle and then get activated later in the - //code. Very ugly. I dont care. Moving this stuff here so its easy - //to find it. - blinded = null - - //Handle temperature/pressure differences between body and environment - if(environment) // More error checking -- TLE - handle_environment(environment) - - //Check if we're on fire - handle_fire() - - //Status updates, death etc. - handle_regular_status_updates() - update_canmove() - - if(client) - handle_regular_hud_updates() - - // Grabbing - for(var/obj/item/weapon/grab/G in src) - G.process() - - if(!client && stat == CONSCIOUS) - - if(prob(33) && canmove && isturf(loc) && !pulledby) //won't move if being pulled - - step(src, pick(cardinal)) - - if(prob(1)) - emote(pick("scratch","jump","roll","tail")) - updatehealth() - -/mob/living/carbon/monkey - - proc/handle_disabilities() - - if (disabilities & EPILEPSY) - if ((prob(1) && paralysis < 10)) - src << "\red You have a seizure!" - Paralyse(10) - if (disabilities & COUGHING) - if ((prob(5) && paralysis <= 1)) - drop_item() - spawn( 0 ) - emote("cough") - return - if (disabilities & TOURETTES) - if ((prob(10) && paralysis <= 1)) - Stun(10) - spawn( 0 ) - emote("twitch") - return - if (disabilities & NERVOUS) - if (prob(10)) - stuttering = max(10, stuttering) - - proc/handle_mutations_and_radiation() - - if(getFireLoss()) - if((COLD_RESISTANCE in mutations) || prob(50)) - switch(getFireLoss()) - if(1 to 50) - adjustFireLoss(-1) - if(51 to 100) - adjustFireLoss(-5) - - if ((HULK in mutations) && health <= 25) - mutations.Remove(HULK) - src << "\red You suddenly feel very weak." - Weaken(3) - emote("collapse") - - if (radiation) - - if (radiation > 100) - radiation = 100 - Weaken(10) - if(!lying) - src << "\red You feel weak." - emote("collapse") - - switch(radiation) - if(1 to 49) - radiation-- - if(prob(25)) - adjustToxLoss(1) - - if(50 to 74) - radiation -= 2 - adjustToxLoss(1) - if(prob(5)) - radiation -= 5 - Weaken(3) - if(!lying) - src << "\red You feel weak." - emote("collapse") - - if(75 to 100) - radiation -= 3 - adjustToxLoss(3) - if(prob(1)) - src << "\red You mutate!" - randmutb(src) - domutcheck(src,null) - emote("gasp") - - handle_breath(datum/gas_mixture/breath) - if(status_flags & GODMODE) - return - - if(!breath || (breath.total_moles == 0)) - adjustOxyLoss(7) - - oxygen_alert = max(oxygen_alert, 1) - - return 0 - - var/safe_oxygen_min = 16 // Minimum safe partial pressure of O2, in kPa - //var/safe_oxygen_max = 140 // Maximum safe partial pressure of O2, in kPa (Not used for now) - var/safe_co2_max = 10 // Yes it's an arbitrary value who cares? - var/safe_phoron_max = 0.5 - var/SA_para_min = 0.5 - var/SA_sleep_min = 5 - var/oxygen_used = 0 - var/breath_pressure = (breath.total_moles * R_IDEAL_GAS_EQUATION * breath.temperature) / BREATH_VOLUME - - //Partial pressure of the O2 in our breath - var/O2_pp = (breath.gas["oxygen"] / breath.total_moles) * breath_pressure - // Same, but for the phoron - var/Toxins_pp = (breath.gas["phoron"] / breath.total_moles) * breath_pressure - // And CO2, lets say a PP of more than 10 will be bad (It's a little less really, but eh, being passed out all round aint no fun) - var/CO2_pp = (breath.gas["carbon_dioxide"] / breath.total_moles) * breath_pressure - - if(O2_pp < safe_oxygen_min) // Too little oxygen - if(prob(20)) - spawn(0) emote("gasp") - if (O2_pp == 0) - O2_pp = 0.01 - var/ratio = safe_oxygen_min/O2_pp - adjustOxyLoss(min(5*ratio, 7)) // Don't fuck them up too fast (space only does 7 after all!) - oxygen_used = breath.gas["oxygen"] * ratio / 6 - oxygen_alert = max(oxygen_alert, 1) - /*else if (O2_pp > safe_oxygen_max) // Too much oxygen (commented this out for now, I'll deal with pressure damage elsewhere I suppose) - spawn(0) emote("cough") - var/ratio = O2_pp/safe_oxygen_max - oxyloss += 5*ratio - oxygen_used = breath.oxygen*ratio/6 - oxygen_alert = max(oxygen_alert, 1)*/ - else // We're in safe limits - adjustOxyLoss(-5) - oxygen_used = breath.gas["oxygen"] / 6 - oxygen_alert = 0 - - breath.adjust_gas("oxygen", -oxygen_used) - breath.adjust_gas("carbon_dioxide", oxygen_used) - - if(CO2_pp > safe_co2_max) - if(!co2overloadtime) // If it's the first breath with too much CO2 in it, lets start a counter, then have them pass out after 12s or so. - co2overloadtime = world.time - else if(world.time - co2overloadtime > 120) - Paralyse(3) - adjustOxyLoss(3) // Lets hurt em a little, let them know we mean business - if(world.time - co2overloadtime > 300) // They've been in here 30s now, lets start to kill them for their own good! - adjustOxyLoss(8) - if(prob(20)) // Lets give them some chance to know somethings not right though I guess. - spawn(0) emote("cough") - - else - co2overloadtime = 0 - - if(Toxins_pp > safe_phoron_max) // Too much phoron - var/ratio = (breath.gas["phoron"] / safe_phoron_max) * 10 - //adjustToxLoss(Clamp(ratio, MIN_PLASMA_DAMAGE, MAX_PLASMA_DAMAGE)) //Limit amount of damage toxin exposure can do per second - if(reagents) - reagents.add_reagent("toxin", Clamp(ratio, MIN_TOXIN_DAMAGE, MAX_TOXIN_DAMAGE)) - phoron_alert = max(phoron_alert, 1) - else - phoron_alert = 0 - - if(breath.gas["sleeping_agent"]) - var/SA_pp = (breath.gas["sleeping_agent"] / breath.total_moles) * breath_pressure - if(SA_pp > SA_para_min) // Enough to make us paralysed for a bit - Paralyse(3) // 3 gives them one second to wake up and run away a bit! - if(SA_pp > SA_sleep_min) // Enough to make us sleep as well - sleeping = max(sleeping+2, 10) - else if(SA_pp > 0.01) // There is sleeping gas in their lungs, but only a little, so give them a bit of a warning - if(prob(20)) - spawn(0) emote(pick("giggle", "laugh")) - - - if(breath.temperature > (T0C+66)) // Hot air hurts :( - if(prob(20)) - src << "\red You feel a searing heat in your lungs!" - fire_alert = max(fire_alert, 2) - else - fire_alert = 0 - - - //Temporary fixes to the alerts. - - return 1 - - proc/handle_environment(datum/gas_mixture/environment) - if(!environment) - return - - //Moved these vars here for use in the fuck-it-skip-processing check. - var/pressure = environment.return_pressure() - if(pressure < WARNING_HIGH_PRESSURE && pressure > WARNING_LOW_PRESSURE && abs(environment.temperature - 293.15) < 20 && abs(bodytemperature - 310.14) < 0.5 && environment.gas["phoron"] < MOLES_PHORON_VISIBLE) - - - //Hopefully should fix the walk-inside-still-pressure-warning issue. - if(pressure_alert) - pressure_alert = 0 - - return // Temperatures are within normal ranges, fuck all this processing. ~Ccomp - - var/environment_heat_capacity = environment.heat_capacity() - if(istype(get_turf(src), /turf/space)) - var/turf/heat_turf = get_turf(src) - environment_heat_capacity = heat_turf.heat_capacity - - if((environment.temperature > (T0C + 50)) || (environment.temperature < (T0C + 10))) - var/transfer_coefficient = 1 - - handle_temperature_damage(HEAD, environment.temperature, environment_heat_capacity*transfer_coefficient) - - if(stat==2) - bodytemperature += 0.1*(environment.temperature - bodytemperature)*environment_heat_capacity/(environment_heat_capacity + 270000) - - //Account for massive pressure differences - switch(pressure) - if(HAZARD_HIGH_PRESSURE to INFINITY) - adjustBruteLoss( min( ( (pressure / HAZARD_HIGH_PRESSURE) -1 )*PRESSURE_DAMAGE_COEFFICIENT , MAX_HIGH_PRESSURE_DAMAGE) ) - pressure_alert = 2 - if(WARNING_HIGH_PRESSURE to HAZARD_HIGH_PRESSURE) - pressure_alert = 1 - if(WARNING_LOW_PRESSURE to WARNING_HIGH_PRESSURE) - pressure_alert = 0 - if(HAZARD_LOW_PRESSURE to WARNING_LOW_PRESSURE) - pressure_alert = -1 - else - if( !(COLD_RESISTANCE in mutations) ) - adjustBruteLoss( LOW_PRESSURE_DAMAGE ) - pressure_alert = -2 - else - pressure_alert = -1 - - return - - proc/handle_temperature_damage(body_part, exposed_temperature, exposed_intensity) - if(status_flags & GODMODE) return - var/discomfort = min( abs(exposed_temperature - bodytemperature)*(exposed_intensity)/2000000, 1.0) - //adjustFireLoss(2.5*discomfort) - - if(exposed_temperature > bodytemperature) - adjustFireLoss(20.0*discomfort) - - else - adjustFireLoss(5.0*discomfort) - - proc/handle_chemicals_in_body() - chem_effects.Cut() - analgesic = 0 - - if(touching) - touching.metabolize(0, CHEM_TOUCH) - if(ingested) - ingested.metabolize(0, CHEM_INGEST) - if(reagents) - reagents.metabolize(0, CHEM_BLOOD) - - if(CE_PAINKILLER in chem_effects) - analgesic = chem_effects[CE_PAINKILLER] - - if (drowsyness) - drowsyness-- - eye_blurry = max(2, eye_blurry) - if (prob(5)) - sleeping += 1 - Paralyse(5) - - if(confused) - confused = max(0, confused - 1) - - if(resting) - dizziness = max(0, dizziness - 5) - else - dizziness = max(0, dizziness - 1) - - return //TODO: DEFERRED - - proc/handle_regular_status_updates() - - if(stat == DEAD) //DEAD. BROWN BREAD. SWIMMING WITH THE SPESS CARP - blinded = 1 - silent = 0 - else //ALIVE. LIGHTS ARE ON - updatehealth() - if(health < config.health_threshold_dead || !has_brain()) - death() - blinded = 1 - stat = DEAD - silent = 0 - return 1 - - //UNCONSCIOUS. NO-ONE IS HOME - if( (getOxyLoss() > 25) || (config.health_threshold_crit > health) ) - if( health <= 20 && prob(1) ) - spawn(0) - emote("gasp") - if(!reagents.has_reagent("inaprovaline")) - adjustOxyLoss(1) - Paralyse(3) - if(halloss > 100) - src << "You're in too much pain to keep going..." - for(var/mob/O in oviewers(src, null)) - O.show_message("[src] slumps to the ground, too weak to continue fighting.", 1) - Paralyse(10) - setHalLoss(99) - - if(paralysis) - AdjustParalysis(-1) - blinded = 1 - stat = UNCONSCIOUS - if(halloss > 0) - adjustHalLoss(-3) - else if(sleeping) - handle_dreams() - adjustHalLoss(-3) - sleeping = max(sleeping-1, 0) - blinded = 1 - stat = UNCONSCIOUS - if( prob(10) && health && !hal_crit ) - spawn(0) - emote("snore") - else if(resting) - if(halloss > 0) - adjustHalLoss(-3) - //CONSCIOUS - else - stat = CONSCIOUS - if(halloss > 0) - adjustHalLoss(-1) - - //Eyes - if(sdisabilities & BLIND) //disabled-blind, doesn't get better on its own - blinded = 1 - else if(eye_blind) //blindness, heals slowly over time - eye_blind = max(eye_blind-1,0) - blinded = 1 - else if(eye_blurry) //blurry eyes heal slowly - eye_blurry = max(eye_blurry-1, 0) - - //Ears - if(sdisabilities & DEAF) //disabled-deaf, doesn't get better on its own - ear_deaf = max(ear_deaf, 1) - else if(ear_deaf) //deafness, heals slowly over time - ear_deaf = max(ear_deaf-1, 0) - else if(ear_damage < 25) //ear damage heals slowly under this threshold. otherwise you'll need earmuffs - ear_damage = max(ear_damage-0.05, 0) - - //Other - handle_statuses() - return 1 - - - proc/handle_regular_hud_updates() - - if (stat == 2 || (XRAY in mutations)) - sight |= SEE_TURFS - sight |= SEE_MOBS - sight |= SEE_OBJS - see_in_dark = 8 - see_invisible = SEE_INVISIBLE_LEVEL_TWO - else if (stat != 2) - sight &= ~SEE_TURFS - sight &= ~SEE_MOBS - sight &= ~SEE_OBJS - see_in_dark = 2 - see_invisible = SEE_INVISIBLE_LIVING - - if (healths) - if (stat != 2) - switch(health) - if(100 to INFINITY) - healths.icon_state = "health0" - if(80 to 100) - healths.icon_state = "health1" - if(60 to 80) - healths.icon_state = "health2" - if(40 to 60) - healths.icon_state = "health3" - if(20 to 40) - healths.icon_state = "health4" - if(0 to 20) - healths.icon_state = "health5" - else - healths.icon_state = "health6" - else - healths.icon_state = "health7" - - - if(pressure) - pressure.icon_state = "pressure[pressure_alert]" - - if (toxin) toxin.icon_state = "tox[phoron_alert ? 1 : 0]" - if (oxygen) oxygen.icon_state = "oxy[oxygen_alert ? 1 : 0]" - if (fire) fire.icon_state = "fire[fire_alert ? 2 : 0]" - //NOTE: the alerts dont reset when youre out of danger. dont blame me, - //blame the person who coded them. Temporary fix added. - - if(bodytemp) - switch(bodytemperature) //310.055 optimal body temp - if(345 to INFINITY) - bodytemp.icon_state = "temp4" - if(335 to 345) - bodytemp.icon_state = "temp3" - if(327 to 335) - bodytemp.icon_state = "temp2" - if(316 to 327) - bodytemp.icon_state = "temp1" - if(300 to 316) - bodytemp.icon_state = "temp0" - if(295 to 300) - bodytemp.icon_state = "temp-1" - if(280 to 295) - bodytemp.icon_state = "temp-2" - if(260 to 280) - bodytemp.icon_state = "temp-3" - else - bodytemp.icon_state = "temp-4" - - client.screen.Remove(global_hud.blurry,global_hud.druggy,global_hud.vimpaired) - - if(blind && stat != DEAD) - if(blinded) - blind.layer = 18 - else - blind.layer = 0 - - if(disabilities & NEARSIGHTED) - client.screen += global_hud.vimpaired - - if(eye_blurry) - client.screen += global_hud.blurry - - if(druggy) - client.screen += global_hud.druggy - - if (stat != 2) - if (machine) - if (!( machine.check_eye(src) )) - reset_view(null) - else - if(client && !client.adminobs) - reset_view(null) - - return 1 - - proc/handle_random_events() - if (prob(1) && prob(2)) - spawn(0) - emote("scratch") - return - - - proc/handle_changeling() - if(mind && mind.changeling) - mind.changeling.regenerate() - -/mob/living/carbon/monkey/handle_fire() - if(..()) - return - adjustFireLoss(6) - return \ No newline at end of file diff --git a/code/modules/mob/living/carbon/monkey/monkey.dm b/code/modules/mob/living/carbon/monkey/monkey.dm deleted file mode 100644 index 8cd0558e7c..0000000000 --- a/code/modules/mob/living/carbon/monkey/monkey.dm +++ /dev/null @@ -1,287 +0,0 @@ -/mob/living/carbon/monkey - name = "monkey" - voice_name = "monkey" - speak_emote = list("chimpers") - icon_state = "monkey1" - icon = 'icons/mob/monkey.dmi' - gender = NEUTER - pass_flags = PASSTABLE - update_icon = 0 ///no need to call regenerate_icon - - var/obj/item/weapon/card/id/wear_id = null // Fix for station bounced radios -- Skie - var/greaterform = "Human" // Used when humanizing a monkey. - icon_state = "monkey1" - //var/uni_append = "12C4E2" // Small appearance modifier for different species. - var/list/uni_append = list(0x12C,0x4E2) // Same as above for DNA2. - var/update_muts = 1 // Monkey gene must be set at start. - holder_type = /obj/item/weapon/holder/monkey - -/mob/living/carbon/monkey/tajara - name = "farwa" - voice_name = "farwa" - speak_emote = list("mews") - icon_state = "tajkey1" - greaterform = "Tajara" - uni_append = list(0x0A0,0xE00) // 0A0E00 - holder_type = /obj/item/weapon/holder/monkey/farwa - -/mob/living/carbon/monkey/skrell - name = "neaera" - voice_name = "neaera" - speak_emote = list("squicks") - icon_state = "skrellkey1" - greaterform = "Skrell" - uni_append = list(0x01C,0xC92) // 01CC92 - holder_type = /obj/item/weapon/holder/monkey/neaera - -/mob/living/carbon/monkey/unathi - name = "stok" - voice_name = "stok" - speak_emote = list("hisses") - icon_state = "stokkey1" - greaterform = "Unathi" - uni_append = list(0x044,0xC5D) // 044C5D - holder_type = /obj/item/weapon/holder/monkey/stok - -/mob/living/carbon/monkey/New() - - verbs += /mob/living/proc/ventcrawl - - species = all_species[greaterform] - add_language(species.language) - - if(name == initial(name)) //To stop Pun-Pun becoming generic. - name = "[name] ([rand(1, 1000)])" - real_name = name - - if (!(dna)) - if(gender == NEUTER) - gender = pick(MALE, FEMALE) - dna = new /datum/dna( null ) - dna.real_name = real_name - dna.ResetSE() - dna.ResetUI() - //dna.uni_identity = "00600200A00E0110148FC01300B009" - //dna.SetUI(list(0x006,0x002,0x00A,0x00E,0x011,0x014,0x8FC,0x013,0x00B,0x009)) - //dna.struc_enzymes = "43359156756131E13763334D1C369012032164D4FE4CD61544B6C03F251B6C60A42821D26BA3B0FD6" - //dna.SetSE(list(0x433,0x591,0x567,0x561,0x31E,0x137,0x633,0x34D,0x1C3,0x690,0x120,0x321,0x64D,0x4FE,0x4CD,0x615,0x44B,0x6C0,0x3F2,0x51B,0x6C6,0x0A4,0x282,0x1D2,0x6BA,0x3B0,0xFD6)) - dna.unique_enzymes = md5(name) - - // We're a monkey - dna.SetSEState(MONKEYBLOCK, 1) - dna.SetSEValueRange(MONKEYBLOCK,0xDAC, 0xFFF) - // Fix gender - dna.SetUIState(DNA_UI_GENDER, gender != MALE, 1) - - // Set the blocks to uni_append, if needed. - if(uni_append.len>0) - for(var/b=1;b<=uni_append.len;b++) - dna.SetUIValue(DNA_UI_LENGTH-(uni_append.len-b),uni_append[b], 1) - dna.UpdateUI() - - update_muts=1 - - ..() - update_icons() - return - -/mob/living/carbon/monkey/movement_delay() - var/tally = 0 - if(reagents) - if(reagents.has_reagent("hyperzine")) return -1 - - if(reagents.has_reagent("nuka_cola")) return -1 - - var/health_deficiency = (100 - health) - if(health_deficiency >= 45) tally += (health_deficiency / 25) - - if (bodytemperature < 283.222) - tally += (283.222 - bodytemperature) / 10 * 1.75 - return tally+config.monkey_delay - -/mob/living/carbon/monkey/Topic(href, href_list) - ..() - if (href_list["mach_close"]) - var/t1 = text("window=[]", href_list["mach_close"]) - unset_machine() - src << browse(null, t1) - if ((href_list["item"] && !( usr.stat ) && !( usr.restrained() ) && in_range(src, usr) )) - var/obj/effect/equip_e/monkey/O = new /obj/effect/equip_e/monkey( ) - O.source = usr - O.target = src - O.item = usr.get_active_hand() - O.s_loc = usr.loc - O.t_loc = loc - O.place = href_list["item"] - requests += O - spawn( 0 ) - O.process() - return - ..() - return - -/mob/living/carbon/monkey/meteorhit(obj/O as obj) - for(var/mob/M in viewers(src, null)) - M.show_message(text("\red [] has been hit by []", src, O), 1) - if (health > 0) - var/shielded = 0 - adjustBruteLoss(30) - if ((O.icon_state == "flaming" && !( shielded ))) - adjustFireLoss(40) - health = 100 - getOxyLoss() - getToxLoss() - getFireLoss() - getBruteLoss() - return - -/mob/living/carbon/monkey/attack_hand(mob/living/carbon/human/M as mob) - - if (M.a_intent == "help" && a_intent == "help") - help_shake_act(M) - get_scooped(M) - else - if (M.a_intent == "hurt") - var/datum/unarmed_attack/attack = null - for(var/datum/unarmed_attack/u_attack in M.species.unarmed_attacks) - if(!u_attack.is_usable(M, src)) - continue - else - attack = u_attack - break - if(!attack) - return 0 - if ((prob(75) && health > 0)) - visible_message("\red [M] [pick(attack.attack_verb)] [src]!") - - playsound(loc, "punch", 25, 1, -1) - var/damage = rand(5, 10) - if (prob(40)) - damage = rand(10, 15) - if (paralysis < 5) - Paralyse(rand(10, 15)) - visible_message("\red [M] has knocked out [src]!") - - adjustBruteLoss(damage) - - M.attack_log += text("\[[time_stamp()]\] [pick(attack.attack_verb)]ed [src.name] ([src.ckey])") - src.attack_log += text("\[[time_stamp()]\] Has been [pick(attack.attack_verb)]ed by [M.name] ([M.ckey])") - msg_admin_attack("[key_name(M)] [pick(attack.attack_verb)]ed [key_name(src)]") - - updatehealth() - else - playsound(loc, 'sound/weapons/punchmiss.ogg', 25, 1, -1) - visible_message("\red [M] tried to [pick(attack.attack_verb)] [src]!") - else - if (M.a_intent == "grab") - if (M == src || anchored) - return - - var/obj/item/weapon/grab/G = new /obj/item/weapon/grab(M, src ) - - M.put_in_active_hand(G) - - G.synch() - - LAssailant = M - - playsound(loc, 'sound/weapons/thudswoosh.ogg', 50, 1, -1) - for(var/mob/O in viewers(src, null)) - O.show_message(text("\red [] has grabbed [name] passively!", M), 1) - else - if (!( paralysis )) - if (prob(25)) - Paralyse(2) - playsound(loc, 'sound/weapons/thudswoosh.ogg', 50, 1, -1) - for(var/mob/O in viewers(src, null)) - if ((O.client && !( O.blinded ))) - O.show_message(text("\red [] has pushed down [name]!", M), 1) - else - drop_item() - playsound(loc, 'sound/weapons/thudswoosh.ogg', 50, 1, -1) - for(var/mob/O in viewers(src, null)) - if ((O.client && !( O.blinded ))) - O.show_message(text("\red [] has disarmed [name]!", M), 1) - return - -/mob/living/carbon/monkey/Stat() - ..() - statpanel("Status") - stat(null, text("Intent: []", a_intent)) - stat(null, text("Move Mode: []", m_intent)) - if(client && mind) - if (client.statpanel == "Status") - if(mind.changeling) - stat("Chemical Storage", mind.changeling.chem_charges) - stat("Genetic Damage Time", mind.changeling.geneticdamage) - return - - -/mob/living/carbon/monkey/verb/removeinternal() - set name = "Remove Internals" - set category = "IC" - internal = null - return - -/mob/living/carbon/monkey/var/co2overloadtime = null -/mob/living/carbon/monkey/var/temperature_resistance = T0C+75 - -/mob/living/carbon/monkey/emp_act(severity) - if(wear_id) wear_id.emp_act(severity) - ..() - -/mob/living/carbon/monkey/ex_act(severity) - if(!blinded) - flick("flash", flash) - - switch(severity) - if(1.0) - if (stat != 2) - adjustBruteLoss(200) - health = 100 - getOxyLoss() - getToxLoss() - getFireLoss() - getBruteLoss() - if(2.0) - if (stat != 2) - adjustBruteLoss(60) - adjustFireLoss(60) - health = 100 - getOxyLoss() - getToxLoss() - getFireLoss() - getBruteLoss() - if(3.0) - if (stat != 2) - adjustBruteLoss(30) - health = 100 - getOxyLoss() - getToxLoss() - getFireLoss() - getBruteLoss() - if (prob(50)) - Paralyse(10) - else - return - -/mob/living/carbon/monkey/blob_act() - if (stat != 2) - adjustFireLoss(60) - health = 100 - getOxyLoss() - getToxLoss() - getFireLoss() - getBruteLoss() - if (prob(50)) - Paralyse(10) - if (stat == DEAD && client) - gib() - return - if (stat == DEAD && !client) - gibs(loc, viruses) - del(src) - return - -//Unless its monkey mode monkeys cant use advanced tools -/mob/living/carbon/monkey/IsAdvancedToolUser(var/silent) - if(!silent) - src << "You don't have the dexterity to use that!" - return 0 - -/mob/living/carbon/monkey/say(var/message, var/datum/language/speaking = null, var/verb="says", var/alt_name="", var/italics=0, var/message_range = world.view, var/list/used_radios = list()) - if(stat) - return - - if(copytext(message,1,2) == "*") - return emote(copytext(message,2)) - - if(stat) - return - - if(speak_emote.len) - verb = pick(speak_emote) - - message = capitalize(trim_left(message)) - - ..(message, speaking, verb, alt_name, italics, message_range, used_radios) diff --git a/code/modules/organs/organ_objects.dm b/code/modules/organs/organ_objects.dm deleted file mode 100644 index b7c451b883..0000000000 --- a/code/modules/organs/organ_objects.dm +++ /dev/null @@ -1,275 +0,0 @@ -/obj/item/organ - name = "organ" - desc = "It looks like it probably just plopped out." - icon = 'icons/obj/surgery.dmi' - icon_state = "appendix" - - health = 100 // Process() ticks before death. - - var/fresh = 3 // Squirts of blood left in it. - var/dead_icon // Icon used when the organ dies. - var/robotic // Is the limb prosthetic? - var/organ_tag // What slot does it go in? - var/organ_type = /datum/organ/internal // Used to spawn the relevant organ data when produced via a machine or spawn(). - var/datum/organ/internal/organ_data // Stores info when removed. - var/prosthetic_name = "prosthetic organ" // Flavour string for robotic organ. - var/prosthetic_icon // Icon for robotic organ. - -/obj/item/organ/attack_self(mob/user as mob) - - // Convert it to an edible form, yum yum. - if(!robotic && user.a_intent == "help" && user.zone_sel.selecting == "mouth") - bitten(user) - return - -/obj/item/organ/New() - ..() - create_reagents(5) - if(!robotic) - processing_objects += src - spawn(1) - update() - -/obj/item/organ/Del() - if(!robotic) processing_objects -= src - ..() - -/obj/item/organ/process() - - if(robotic) - processing_objects -= src - return - - // Don't process if we're in a freezer, an MMI or a stasis bag. //TODO: ambient temperature? - if(istype(loc,/obj/item/device/mmi) || istype(loc,/obj/item/bodybag/cryobag) || istype(loc,/obj/structure/closet/crate/freezer)) - return - - if(fresh && prob(40)) - fresh-- - var/datum/reagent/blood/B = locate(/datum/reagent/blood) in reagents.reagent_list - blood_splatter(src,B,1) - - health -= rand(1,3) - if(health <= 0) - die() - -/obj/item/organ/proc/die() - name = "dead [initial(name)]" - if(dead_icon) icon_state = dead_icon - health = 0 - processing_objects -= src - //TODO: Grey out the icon state. - //TODO: Inject an organ with peridaxon to make it alive again. - -/obj/item/organ/proc/roboticize() - - robotic = (organ_data && organ_data.robotic) ? organ_data.robotic : 1 - - if(prosthetic_name) - name = prosthetic_name - - if(prosthetic_icon) - icon_state = prosthetic_icon - else - //TODO: convert to greyscale. - -/obj/item/organ/proc/update() - - if(!organ_data) - organ_data = new organ_type() - - if(robotic) - organ_data.robotic = robotic - - if(organ_data.robotic >= 2) - roboticize() - -// Brain is defined in brain_item.dm. -/obj/item/organ/heart - name = "heart" - icon_state = "heart-on" - prosthetic_name = "circulatory pump" - prosthetic_icon = "heart-prosthetic" - organ_tag = "heart" - fresh = 6 // Juicy. - dead_icon = "heart-off" - organ_type = /datum/organ/internal/heart - -/obj/item/organ/lungs - name = "lungs" - icon_state = "lungs" - gender = PLURAL - prosthetic_name = "gas exchange system" - prosthetic_icon = "lungs-prosthetic" - organ_tag = "lungs" - organ_type = /datum/organ/internal/lungs - -/obj/item/organ/kidneys - name = "kidneys" - icon_state = "kidneys" - gender = PLURAL - prosthetic_name = "prosthetic kidneys" - prosthetic_icon = "kidneys-prosthetic" - organ_tag = "kidneys" - organ_type = /datum/organ/internal/kidney - -/obj/item/organ/eyes - name = "eyeballs" - icon_state = "eyes" - gender = PLURAL - prosthetic_name = "visual prosthesis" - prosthetic_icon = "eyes-prosthetic" - organ_tag = "eyes" - organ_type = /datum/organ/internal/eyes - var/eye_colour - -/obj/item/organ/liver - name = "liver" - icon_state = "liver" - prosthetic_name = "toxin filter" - prosthetic_icon = "liver-prosthetic" - organ_tag = "liver" - organ_type = /datum/organ/internal/liver - -/obj/item/organ/appendix - name = "appendix" - icon_state = "appendix" - organ_tag = "appendix" - organ_type = /datum/organ/internal/appendix - -//These are here so they can be printed out via the fabricator. -/obj/item/organ/heart/prosthetic - robotic = 2 - -/obj/item/organ/lungs/prosthetic - robotic = 2 - -/obj/item/organ/kidneys/prosthetic - robotic = 2 - -/obj/item/organ/eyes/prosthetic - robotic = 2 - -/obj/item/organ/liver/prosthetic - robotic = 2 - -/obj/item/organ/appendix - name = "appendix" - -/obj/item/organ/proc/removed(var/mob/living/carbon/human/target,var/mob/living/user) - - if(!istype(target) || !organ_data) - return - - target.internal_organs_by_name[organ_tag] = null - target.internal_organs_by_name -= organ_tag - target.internal_organs -= organ_data - - var/datum/organ/external/affected = target.get_organ(organ_data.parent_organ) - affected.internal_organs -= organ_data - - loc = target.loc - organ_data.rejecting = null - var/datum/reagent/blood/organ_blood = locate(/datum/reagent/blood) in reagents.reagent_list - if(!organ_blood || !organ_blood.data["blood_DNA"]) - target.vessel.trans_to_obj(src, 5, 1, 1) - - if(target && user && organ_data.vital) - user.attack_log += "\[[time_stamp()]\] removed a vital organ ([src]) from [target.name] ([target.ckey]) (INTENT: [uppertext(user.a_intent)])" - target.attack_log += "\[[time_stamp()]\] had a vital organ ([src]) removed by [user.name] ([user.ckey]) (INTENT: [uppertext(user.a_intent)])" - msg_admin_attack("[user.name] ([user.ckey]) removed a vital organ ([src]) from [target.name] ([target.ckey]) (INTENT: [uppertext(user.a_intent)]) (JMP)") - target.death() - -/obj/item/organ/appendix/removed(var/mob/living/target,var/mob/living/user) - - ..() - - var/inflamed = 0 - for(var/datum/disease/appendicitis/appendicitis in target.viruses) - inflamed = 1 - appendicitis.cure() - target.resistances += appendicitis - - if(inflamed) - icon_state = "appendixinflamed" - name = "inflamed appendix" - -/obj/item/organ/eyes/removed(var/mob/living/target,var/mob/living/user) - - if(!eye_colour) - eye_colour = list(0,0,0) - - ..() //Make sure target is set so we can steal their eye colour for later. - var/mob/living/carbon/human/H = target - if(istype(H)) - eye_colour = list( - H.r_eyes ? H.r_eyes : 0, - H.g_eyes ? H.g_eyes : 0, - H.b_eyes ? H.b_eyes : 0 - ) - - // Leave bloody red pits behind! - H.r_eyes = 128 - H.g_eyes = 0 - H.b_eyes = 0 - H.update_body() - -/obj/item/organ/proc/replaced(var/mob/living/carbon/human/target,var/datum/organ/external/affected) - - if(!istype(target)) return - - var/datum/reagent/blood/transplant_blood = locate(/datum/reagent/blood) in reagents.reagent_list - if(!transplant_blood) - organ_data.transplant_data = list() - organ_data.transplant_data["species"] = target.species.name - organ_data.transplant_data["blood_type"] = target.dna.b_type - organ_data.transplant_data["blood_DNA"] = target.dna.unique_enzymes - else - organ_data.transplant_data = list() - organ_data.transplant_data["species"] = transplant_blood.data["species"] - organ_data.transplant_data["blood_type"] = transplant_blood.data["blood_type"] - organ_data.transplant_data["blood_DNA"] = transplant_blood.data["blood_DNA"] - - organ_data.organ_holder = null - organ_data.owner = target - target.internal_organs |= organ_data - affected.internal_organs |= organ_data - target.internal_organs_by_name[organ_tag] = organ_data - organ_data.status |= ORGAN_CUT_AWAY - - del(src) - -/obj/item/organ/eyes/replaced(var/mob/living/carbon/human/target) - - // Apply our eye colour to the target. - if(istype(target) && eye_colour) - target.r_eyes = eye_colour[1] - target.g_eyes = eye_colour[2] - target.b_eyes = eye_colour[3] - target.update_body() - ..() - -/obj/item/organ/proc/bitten(mob/user) - - if(robotic) - return - - user << "\blue You take an experimental bite out of \the [src]." - var/datum/reagent/blood/B = locate(/datum/reagent/blood) in reagents.reagent_list - blood_splatter(src,B,1) - - - user.drop_from_inventory(src) - var/obj/item/weapon/reagent_containers/food/snacks/organ/O = new(get_turf(src)) - O.name = name - O.icon_state = dead_icon ? dead_icon : icon_state - - // Pass over the blood. - reagents.trans_to_obj(O, reagents.total_volume) - - if(fingerprints) O.fingerprints = fingerprints.Copy() - if(fingerprintshidden) O.fingerprintshidden = fingerprintshidden.Copy() - if(fingerprintslast) O.fingerprintslast = fingerprintslast - - user.put_in_active_hand(O) - del(src) \ No newline at end of file diff --git a/code/modules/reagents/Chemistry-Reagents.dm b/code/modules/reagents/Chemistry-Reagents.dm index 103db5c308..15a1398d39 100644 --- a/code/modules/reagents/Chemistry-Reagents.dm +++ b/code/modules/reagents/Chemistry-Reagents.dm @@ -102,3944 +102,3 @@ /datum/reagent/proc/reaction_mob(var/mob/target) touch_mob(target) - -/* REAGENTS START HERE */ - -/* Core reagents - the most important ones */ - -/datum/reagent/blood - data = new/list("donor" = null, "viruses" = null, "species" = "Human", "blood_DNA" = null, "blood_type" = null, "blood_colour" = "#A10808", "resistances" = null, "trace_chem" = null, "antibodies" = list()) - name = "Blood" - id = "blood" - reagent_state = LIQUID - metabolism = REM * 5 - color = "#C80000" - - glass_icon_state = "glass_red" - glass_name = "glass of tomato juice" - glass_desc = "Are you sure this is tomato juice?" - -/datum/reagent/blood/initialize_data(var/newdata) - ..() - if(data && data["blood_colour"]) - color = data["blood_colour"] - return - -/datum/reagent/blood/get_data() // Just in case you have a reagent that handles data differently. - var/t = data.Copy() - if(t["virus2"]) - var/list/v = t["virus2"] - t["virus2"] = v.Copy() - return t - -/datum/reagent/blood/mix_data(var/newdata, var/newamount) // You have a reagent with data, and new reagent with its own data get added, how do you deal with that? - if(data["viruses"] || newdata["viruses"]) - var/list/mix1 = data["viruses"] - var/list/mix2 = newdata["viruses"] - var/list/to_mix = list() // Stop issues with the list changing during mixing. - for(var/datum/disease/advance/AD in mix1) - to_mix += AD - for(var/datum/disease/advance/AD in mix2) - to_mix += AD - var/datum/disease/advance/AD = Advance_Mix(to_mix) - if(AD) - var/list/preserve = list(AD) - for(var/D in data["viruses"]) - if(!istype(D, /datum/disease/advance)) - preserve += D - data["viruses"] = preserve - -/datum/reagent/blood/touch_turf(var/turf/simulated/T) - if(!istype(T) || volume < 3) - return - if(!data["donor"] || istype(data["donor"], /mob/living/carbon/human)) - blood_splatter(T, src, 1) - else if(istype(data["donor"], /mob/living/carbon/alien)) - var/obj/effect/decal/cleanable/blood/B = blood_splatter(T, src, 1) - if(B) - B.blood_DNA["UNKNOWN DNA STRUCTURE"] = "X*" - -/datum/reagent/blood/affect_ingest(var/mob/living/carbon/M, var/alien, var/removed, var/location) - if(dose > 5) - M.adjustToxLoss(removed) - if(dose > 15) - M.adjustToxLoss(removed) - -/datum/reagent/blood/affect_touch(var/mob/living/carbon/M, var/alien, var/removed, var/location) - if(data && data["viruses"]) - for(var/datum/disease/D in data["viruses"]) - if(D.spread_type == SPECIAL || D.spread_type == NON_CONTAGIOUS) - continue - M.contract_disease(D) - if(data && data["virus2"]) - var/list/vlist = data["virus2"] - if(vlist.len) - for(var/ID in vlist) - var/datum/disease2/disease/V = vlist[ID] - infect_virus2(M, V.getcopy()) - if(data && data["antibodies"]) - M.antibodies |= data["antibodies"] - -/datum/reagent/blood/affect_blood(var/mob/living/carbon/M, var/alien, var/removed, var/location) - M.inject_blood(src, volume) - remove_self(volume) - -/datum/reagent/vaccine - name = "Vaccine" - id = "vaccine" - reagent_state = LIQUID - color = "#C81040" - -/datum/reagent/vaccine/affect_blood(var/mob/living/carbon/M, var/alien, var/removed, var/location) - if(data) - for(var/datum/disease/D in M.viruses) - if(istype(D, /datum/disease/advance)) - var/datum/disease/advance/A = D - if(A.GetDiseaseID() == data) - D.cure() - else - if(D.type == data) - D.cure() - - M.resistances += data - return - -#define WATER_LATENT_HEAT 19000 // How much heat is removed when applied to a hot turf, in J/unit (19000 makes 120 u of water roughly equivalent to 4L) -/datum/reagent/water - name = "Water" - id = "water" - description = "A ubiquitous chemical substance that is composed of hydrogen and oxygen." - reagent_state = LIQUID - color = "#0064C877" - metabolism = REM * 10 - - glass_icon_state = "glass_clear" - glass_name = "glass of water" - glass_desc = "The father of all refreshments." - -/datum/reagent/water/touch_turf(var/turf/simulated/T) - if(!istype(T)) - return - - var/datum/gas_mixture/environment = T.return_air() - var/min_temperature = T0C + 100 // 100C, the boiling point of water - - var/hotspot = (locate(/obj/fire) 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) - qdel(hotspot) - - if (environment && environment.temperature > min_temperature) // Abstracted as steam or something - var/removed_heat = between(0, volume * WATER_LATENT_HEAT, -environment.get_thermal_energy_change(min_temperature)) - environment.add_thermal_energy(-removed_heat) - if (prob(5)) - T.visible_message("The water sizzles as it lands on \the [T]!") - else - 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) // This is terrible and needs to be changed when possible. - if(!T || !istype(T)) - return - if(T.wet >= 2) - return - T.wet = 0 - if(T.wet_overlay) - T.overlays -= T.wet_overlay - T.wet_overlay = null - -/datum/reagent/water/touch_obj(var/obj/O) - 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() - -/datum/reagent/water/affect_touch(var/mob/living/carbon/M, var/alien, var/removed, var/location) - if(istype(M, /mob/living/carbon/slime)) - var/mob/living/carbon/slime/S = M - S.adjustToxLoss(15 * removed) // Babies have 150 health, adults have 200; So, 10 units and 13.5 - if(!S.client) - if(S.Target) // Like cats - S.Target = null - ++S.Discipline - if(dose == removed) - S.visible_message("[S]'s flesh sizzles where the water touches it!", "Your flesh burns in the water!") - var/needed = M.fire_stacks * 10 - if(volume > needed) - M.fire_stacks = 0 - M.ExtinguishMob() - remove_self(needed) - else - M.adjust_fire_stacks(-(volume / 10)) - remove_self(volume) - return - -/datum/reagent/fuel - name = "Welding fuel" - id = "fuel" - description = "Required for welders. Flamable." - reagent_state = LIQUID - color = "#660000" - - glass_icon_state = "dr_gibb_glass" - glass_name = "glass of welder fuel" - glass_desc = "Unless you are an industrial tool, this is probably not safe for consumption." - -/datum/reagent/fuel/touch_turf(var/turf/T) - new /obj/effect/decal/cleanable/liquid_fuel(T, volume) - remove_self(volume) - return - -/datum/reagent/fuel/affect_blood(var/mob/living/carbon/M, var/alien, var/removed, var/location) - M.adjustToxLoss(2 * removed) - -/datum/reagent/fuel/affect_touch(var/mob/living/carbon/M, var/alien, var/removed, var/location) // Splashing people with welding fuel to make them easy to ignite! - M.adjust_fire_stacks(0.1 * removed) - -/* Basic dispenser chemicals */ - -/datum/reagent/aluminum - name = "Aluminum" - id = "aluminum" - description = "A silvery white and ductile member of the boron group of chemical elements." - reagent_state = SOLID - color = "#A8A8A8" - -/datum/reagent/carbon - name = "Carbon" - id = "carbon" - description = "A chemical element, the builing block of life." - reagent_state = SOLID - color = "#1C1300" - -/datum/reagent/carbon/touch_turf(var/turf/T) - if(!istype(T, /turf/space)) - var/obj/effect/decal/cleanable/dirt/dirtoverlay = locate(/obj/effect/decal/cleanable/dirt, T) - if (!dirtoverlay) - dirtoverlay = new/obj/effect/decal/cleanable/dirt(T) - dirtoverlay.alpha = volume * 30 - else - dirtoverlay.alpha = min(dirtoverlay.alpha + volume * 30, 255) - -/datum/reagent/chlorine - name = "Chlorine" - id = "chlorine" - description = "A chemical element with a characteristic odour." - reagent_state = GAS - color = "#808080" - -/datum/reagent/chlorine/affect_blood(var/mob/living/carbon/M, var/alien, var/removed, var/location) - M.take_organ_damage(1*REM, 0) - -/datum/reagent/chlorine/affect_touch(var/mob/living/carbon/M, var/alien, var/removed, var/location) - M.take_organ_damage(1*REM, 0) - -/datum/reagent/copper - name = "Copper" - id = "copper" - description = "A highly ductile metal." - color = "#6E3B08" - -/datum/reagent/ethanol - name = "Ethanol" //Parent class for all alcoholic reagents. - id = "ethanol" - description = "A well-known alcohol with a variety of applications." - reagent_state = LIQUID - color = "#404030" - var/nutriment_factor = 0 - var/strength = 10 // This is, essentially, units between stages - the lower, the stronger. Less fine tuning, more clarity. - var/toxicity = 1 - - var/druggy = 0 - var/adj_temp = 0 - var/targ_temp = 310 - var/halluci = 0 - - glass_icon_state = "glass_clear" - glass_name = "glass of ethanol" - glass_desc = "A well-known alcohol with a variety of applications." - -/datum/reagent/ethanol/affect_touch(var/mob/living/carbon/M, var/alien, var/removed, var/location) - M.adjust_fire_stacks(removed / 15) - return - -/datum/reagent/ethanol/affect_blood(var/mob/living/carbon/M, var/alien, var/removed, var/location) - M.adjustToxLoss(removed * 2 * toxicity) - return - -/datum/reagent/ethanol/affect_ingest(var/mob/living/carbon/M, var/alien, var/removed, var/location) - M.nutrition += nutriment_factor * removed - - var/strength_mod = 1 - if(alien == IS_SKRELL) - strength_mod *= 5 - if(alien == IS_DIONA) - strength_mod = 0 - - M.add_chemical_effect(CE_ALCOHOL, 1) - - if(dose / strength_mod >= strength) // Early warning - M.make_dizzy(6) // It is decreased at the speed of 3 per tick - if(dose / strength_mod >= strength * 2) // Slurring - M.slurring = max(M.slurring, 30) - if(dose / strength_mod >= strength * 3) // Confusion - walking in random directions - M.confused = max(M.confused, 20) - if(dose / strength_mod >= strength * 4) // Blurry vision - M.eye_blurry = max(M.eye_blurry, 10) - if(dose / strength_mod >= strength * 5) // Drowsyness - periodically falling asleep - M.drowsyness = max(M.drowsyness, 20) - if(dose / strength_mod >= strength * 6) // Toxic dose - M.add_chemical_effect(CE_ALCOHOL_TOXIC, toxicity) - if(dose / strength_mod >= strength * 7) // Pass out - M.paralysis = max(M.paralysis, 20) - M.sleeping = max(M.sleeping, 30) - - if(druggy != 0) - M.druggy = max(M.druggy, druggy) - - if(adj_temp > 0 && M.bodytemperature < targ_temp) // 310 is the normal bodytemp. 310.055 - M.bodytemperature = min(targ_temp, M.bodytemperature + (adj_temp * TEMPERATURE_DAMAGE_COEFFICIENT)) - if(adj_temp < 0 && M.bodytemperature > targ_temp) - M.bodytemperature = min(targ_temp, M.bodytemperature - (adj_temp * TEMPERATURE_DAMAGE_COEFFICIENT)) - - if(halluci) - M.hallucination = max(M.hallucination, halluci) - -/datum/reagent/ethanol/touch_obj(var/obj/O) - if(istype(O, /obj/item/weapon/paper)) - var/obj/item/weapon/paper/paperaffected = O - paperaffected.clearpaper() - usr << "The solution dissolves the ink on the paper." - return - if(istype(O, /obj/item/weapon/book)) - if(volume < 5) - return - if(istype(O, /obj/item/weapon/book/tome)) - usr << "The solution does nothing. Whatever this is, it isn't normal ink." - return - var/obj/item/weapon/book/affectedbook = O - affectedbook.dat = null - usr << "The solution dissolves the ink on the book." - return - -/datum/reagent/fluorine - name = "Fluorine" - id = "fluorine" - description = "A highly-reactive chemical element." - reagent_state = GAS - color = "#808080" - -/datum/reagent/fluorine/affect_blood(var/mob/living/carbon/M, var/alien, var/removed, var/location) - M.adjustToxLoss(removed) - -/datum/reagent/fluorine/affect_touch(var/mob/living/carbon/M, var/alien, var/removed, var/location) - M.adjustToxLoss(removed) - -/datum/reagent/hydrogen - name = "Hydrogen" - id = "hydrogen" - description = "A colorless, odorless, nonmetallic, tasteless, highly combustible diatomic gas." - reagent_state = GAS - color = "#808080" - -/datum/reagent/iron - name = "Iron" - id = "iron" - description = "Pure iron is a metal." - reagent_state = SOLID - color = "#353535" - -/datum/reagent/iron/affect_ingest(var/mob/living/carbon/M, var/alien, var/removed, var/location) - if(alien != IS_DIONA) - M.add_chemical_effect(CE_BLOODRESTORE, 8 * removed) - -/datum/reagent/lithium - name = "Lithium" - id = "lithium" - description = "A chemical element, used as antidepressant." - reagent_state = SOLID - color = "#808080" - -/datum/reagent/lithium/affect_blood(var/mob/living/carbon/M, var/alien, var/removed, var/location) - if(alien != IS_DIONA) - if(M.canmove && !M.restrained() && istype(M.loc, /turf/space)) - step(M, pick(cardinal)) - if(prob(5)) - M.emote(pick("twitch", "drool", "moan")) - -/datum/reagent/mercury - name = "Mercury" - id = "mercury" - description = "A chemical element." - reagent_state = LIQUID - color = "#484848" - -/datum/reagent/mercury/affect_blood(var/mob/living/carbon/M, var/alien, var/removed, var/location) - if(alien != IS_DIONA) - if(M.canmove && !M.restrained() && istype(M.loc, /turf/space)) - step(M, pick(cardinal)) - if(prob(5)) - M.emote(pick("twitch", "drool", "moan")) - M.adjustBrainLoss(2) - -/datum/reagent/nitrogen - name = "Nitrogen" - id = "nitrogen" - description = "A colorless, odorless, tasteless gas." - reagent_state = GAS - color = "#808080" - -/datum/reagent/nitrogen/affect_blood(var/mob/living/carbon/M, var/alien, var/removed, var/location) - if(alien == IS_VOX) - M.adjustOxyLoss(-removed * 3) - -/datum/reagent/oxygen - name = "Oxygen" - id = "oxygen" - description = "A colorless, odorless gas." - reagent_state = GAS - color = "#808080" - -/datum/reagent/oxygen/affect_blood(var/mob/living/carbon/M, var/alien, var/removed, var/location) - if(alien == IS_VOX) - M.adjustToxLoss(removed * 3) - -/datum/reagent/phosphorus - name = "Phosphorus" - id = "phosphorus" - description = "A chemical element, the backbone of biological energy carriers." - reagent_state = SOLID - color = "#832828" - -/datum/reagent/potassium - name = "Potassium" - id = "potassium" - description = "A soft, low-melting solid that can easily be cut with a knife. Reacts violently with water." - reagent_state = SOLID - color = "#A0A0A0" - -/datum/reagent/radium - name = "Radium" - id = "radium" - description = "Radium is an alkaline earth metal. It is extremely radioactive." - reagent_state = SOLID - color = "#C7C7C7" - -/datum/reagent/radium/affect_blood(var/mob/living/carbon/M, var/alien, var/removed, var/location) - M.apply_effect(10 * removed, IRRADIATE, 0) // Radium may increase your chances to cure a disease - if(M.virus2.len) - for(var/ID in M.virus2) - var/datum/disease2/disease/V = M.virus2[ID] - if(prob(5)) - M.antibodies |= V.antigen - if(prob(50)) - M.radiation += 50 // curing it that way may kill you instead - var/absorbed = 0 - var/obj/item/organ/diona/nutrients/rad_organ = locate() in M.internal_organs - if(rad_organ && !rad_organ.is_broken()) - absorbed = 1 - if(!absorbed) - M.adjustToxLoss(100) - -/datum/reagent/radium/touch_turf(var/turf/T) - if(volume >= 3) - if(!istype(T, /turf/space)) - var/obj/effect/decal/cleanable/greenglow/glow = locate(/obj/effect/decal/cleanable/greenglow, T) - if(!glow) - new /obj/effect/decal/cleanable/greenglow(T) - return - -/datum/reagent/acid - name = "Sulphuric acid" - id = "sacid" - description = "A very corrosive mineral acid with the molecular formula H2SO4." - reagent_state = LIQUID - color = "#DB5008" - metabolism = REM * 2 - touch_met = 50 // It's acid! - var/power = 5 - var/meltdose = 10 // How much is needed to melt - -/datum/reagent/acid/affect_blood(var/mob/living/carbon/M, var/alien, var/removed, var/location) - M.take_organ_damage(0, removed * power * 2) - -/datum/reagent/acid/affect_touch(var/mob/living/carbon/M, var/alien, var/removed, var/location) // This is the most interesting - if(ishuman(M)) - var/mob/living/carbon/human/H = M - if(H.head) - if(H.head.unacidable) - H << "Your [H.head] protects you from the acid." - remove_self(volume) - return - else if(removed > meltdose) - H << "Your [H.head] melts away!" - qdel(H.head) - H.update_inv_head(1) - H.update_hair(1) - removed -= meltdose - if(removed <= 0) - return - - if(H.wear_mask) - if(H.wear_mask.unacidable) - H << "Your [H.wear_mask] protects you from the acid." - remove_self(volume) - return - else if(removed > meltdose) - H << "Your [H.wear_mask] melts away!" - qdel(H.wear_mask) - H.update_inv_wear_mask(1) - H.update_hair(1) - removed -= meltdose - if(removed <= 0) - return - - if(H.glasses) - if(H.glasses.unacidable) - H << "Your [H.glasses] partially protect you from the acid!" - removed /= 2 - else if(removed > meltdose) - H << "Your [H.glasses] melt away!" - qdel(H.glasses) - H.update_inv_glasses(1) - removed -= meltdose / 2 - if(removed <= 0) - return - - if(volume < meltdose) // Not enough to melt anything - M.take_organ_damage(removed * power * 0.2) - return - if(!M.unacidable && removed > 0) - if(istype(M, /mob/living/carbon/human) && volume >= meltdose) - var/mob/living/carbon/human/H = M - var/obj/item/organ/external/affecting = H.get_organ("head") - if(affecting) - if(affecting.take_damage(0, removed * power * 0.1)) - H.UpdateDamageIcon() - if(prob(100 * removed / meltdose)) // Applies disfigurement - if (!(H.species && (H.species.flags & NO_PAIN))) - H.emote("scream") - H.status_flags |= DISFIGURED - else - M.take_organ_damage(0, removed * power * 0.1) // Balance. The damage is instant, so it's weaker. 10 units -> 5 damage, double for pacid. 120 units beaker could deal 60, but a) it's burn, which is not as dangerous, b) it's a one-use weapon, c) missing with it will splash it over the ground and d) clothes give some protection, so not everything will hit - -/datum/reagent/acid/touch_obj(var/obj/O) - if(O.unacidable) - return - if((istype(O, /obj/item) || istype(O, /obj/effect/plant)) && (volume > meltdose)) - 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 << "\The [O] melts." - qdel(O) - remove_self(meltdose) // 10 units of acid will not melt EVERYTHING on the tile - -/datum/reagent/silicon - name = "Silicon" - id = "silicon" - description = "A tetravalent metalloid, silicon is less reactive than its chemical analog carbon." - reagent_state = SOLID - color = "#A8A8A8" - -/datum/reagent/sodium - name = "Sodium" - id = "sodium" - description = "A chemical element, readily reacts with water." - reagent_state = SOLID - color = "#808080" - -/datum/reagent/sugar - name = "Sugar" - id = "sugar" - description = "The organic compound commonly known as table sugar and sometimes called saccharose. This white, odorless, crystalline powder has a pleasing, sweet taste." - reagent_state = SOLID - color = "#FFFFFF" - glass_icon_state = "iceglass" - glass_name = "glass of sugar" - glass_desc = "The organic compound commonly known as table sugar and sometimes called saccharose. This white, odorless, crystalline powder has a pleasing, sweet taste." - -/datum/reagent/sugar/affect_blood(var/mob/living/carbon/M, var/alien, var/removed, var/location) - M.nutrition += removed * 3 - -/datum/reagent/sulfur - name = "Sulfur" - id = "sulfur" - description = "A chemical element with a pungent smell." - reagent_state = SOLID - color = "#BF8C00" - -/datum/reagent/tungsten - name = "Tungsten" - id = "tungsten" - description = "A chemical element, and a strong oxidising agent." - reagent_state = SOLID - color = "#DCDCDC" - -/* General medicine */ - -/datum/reagent/inaprovaline - name = "Inaprovaline" - id = "inaprovaline" - description = "Inaprovaline is a synaptic stimulant and cardiostimulant. Commonly used to stabilize patients." - reagent_state = LIQUID - color = "#00BFFF" - overdose = REAGENTS_OVERDOSE * 2 - metabolism = REM * 0.5 - scannable = 1 - -/datum/reagent/inaprovaline/affect_blood(var/mob/living/carbon/M, var/alien, var/removed, var/location) - if(alien != IS_DIONA) - M.add_chemical_effect(CE_STABLE) - M.add_chemical_effect(CE_PAINKILLER, 25) - -/datum/reagent/bicaridine - name = "Bicaridine" - id = "bicaridine" - description = "Bicaridine is an analgesic medication and can be used to treat blunt trauma." - reagent_state = LIQUID - color = "#BF0000" - overdose = REAGENTS_OVERDOSE - scannable = 1 - -/datum/reagent/bicaridine/affect_blood(var/mob/living/carbon/M, var/alien, var/removed, var/location) - if(alien != IS_DIONA) - M.heal_organ_damage(6 * removed, 0) - -/datum/reagent/kelotane - name = "Kelotane" - id = "kelotane" - description = "Kelotane is a drug used to treat burns." - reagent_state = LIQUID - color = "#FFA800" - overdose = REAGENTS_OVERDOSE - scannable = 1 - -/datum/reagent/kelotane/affect_blood(var/mob/living/carbon/M, var/alien, var/removed, var/location) - if(alien != IS_DIONA) - M.heal_organ_damage(0, 6 * removed) - -/datum/reagent/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 = "#FF8000" - overdose = REAGENTS_OVERDOSE * 0.5 - scannable = 1 - -/datum/reagent/dermaline/affect_blood(var/mob/living/carbon/M, var/alien, var/removed, var/location) - if(alien != IS_DIONA) - M.heal_organ_damage(0, 12 * removed) - -/datum/reagent/dylovene - name = "Dylovene" - id = "anti_toxin" - description = "Dylovene is a broad-spectrum antitoxin." - reagent_state = LIQUID - color = "#00A000" - scannable = 1 - -/datum/reagent/dylovene/affect_blood(var/mob/living/carbon/M, var/alien, var/removed, var/location) - if(alien != IS_DIONA) - M.drowsyness = max(0, M.drowsyness - 6 * removed) - M.hallucination = max(0, M.hallucination - 9 * removed) - M.adjustToxLoss(-4 * removed) - -/datum/reagent/dexalin - name = "Dexalin" - id = "dexalin" - description = "Dexalin is used in the treatment of oxygen deprivation." - reagent_state = LIQUID - color = "#0080FF" - overdose = REAGENTS_OVERDOSE - scannable = 1 - -/datum/reagent/dexalin/affect_blood(var/mob/living/carbon/M, var/alien, var/removed, var/location) - if(alien == IS_VOX) - M.adjustToxLoss(removed * 6) - else if(alien != IS_DIONA) - M.adjustOxyLoss(-15 * removed) - - holder.remove_reagent("lexorin", 2 * removed) - -/datum/reagent/dexalinp - name = "Dexalin Plus" - id = "dexalinp" - description = "Dexalin Plus is used in the treatment of oxygen deprivation. It is highly effective." - reagent_state = LIQUID - color = "#0040FF" - overdose = REAGENTS_OVERDOSE * 0.5 - scannable = 1 - -/datum/reagent/dexalin/affect_blood(var/mob/living/carbon/M, var/alien, var/removed, var/location) - if(alien == IS_VOX) - M.adjustToxLoss(removed * 9) - else if(alien != IS_DIONA) - M.adjustOxyLoss(-300 * removed) - - holder.remove_reagent("lexorin", 3 * removed) - -/datum/reagent/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 = "#8040FF" - scannable = 1 - -/datum/reagent/tricordrazine/affect_blood(var/mob/living/carbon/M, var/alien, var/removed, var/location) - if(alien != IS_DIONA) - M.adjustOxyLoss(-6 * removed) - M.heal_organ_damage(3 * removed, 3 * removed) - M.adjustToxLoss(-3 * removed) - -/datum/reagent/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 = "#8080FF" - metabolism = REM * 0.5 - scannable = 1 - -/datum/reagent/cryoxadone/affect_blood(var/mob/living/carbon/M, var/alien, var/removed, var/location) - if(M.bodytemperature < 170) - M.adjustCloneLoss(-10 * removed) - M.adjustOxyLoss(-10 * removed) - M.heal_organ_damage(10 * removed, 10 * removed) - M.adjustToxLoss(-10 * removed) - -/datum/reagent/clonexadone - name = "Clonexadone" - id = "clonexadone" - description = "A liquid compound similar to that used in the cloning process. Can be used to 'finish' the cloning process when used in conjunction with a cryo tube." - reagent_state = LIQUID - color = "#80BFFF" - metabolism = REM * 0.5 - scannable = 1 - -/datum/reagent/cryoxadone/affect_blood(var/mob/living/carbon/M, var/alien, var/removed, var/location) - if(M.bodytemperature < 170) - M.adjustCloneLoss(-30 * removed) - M.adjustOxyLoss(-3 * removed) - M.heal_organ_damage(30 * removed, 30 * removed) - M.adjustToxLoss(-30 * removed) - -/* Painkillers */ - -/datum/reagent/paracetamol - name = "Paracetamol" - id = "paracetamol" - description = "Most probably know this as Tylenol, but this chemical is a mild, simple painkiller." - reagent_state = LIQUID - color = "#C8A5DC" - overdose = 60 - scannable = 1 - metabolism = 0.02 - -/datum/reagent/paracetamol/affect_blood(var/mob/living/carbon/M, var/alien, var/removed, var/location) - M.add_chemical_effect(CE_PAINKILLER, 50) - -/datum/reagent/paracetamol/overdose(var/mob/living/carbon/M, var/alien) - ..() - M.hallucination = max(M.hallucination, 2) - -/datum/reagent/tramadol - name = "Tramadol" - id = "tramadol" - description = "A simple, yet effective painkiller." - reagent_state = LIQUID - color = "#CB68FC" - overdose = 30 - scannable = 1 - metabolism = 0.02 - -/datum/reagent/tramadol/affect_blood(var/mob/living/carbon/M, var/alien, var/removed, var/location) - M.add_chemical_effect(CE_PAINKILLER, 80) - -/datum/reagent/tramadol/overdose(var/mob/living/carbon/M, var/alien) - ..() - M.hallucination = max(M.hallucination, 2) - -/datum/reagent/oxycodone - name = "Oxycodone" - id = "oxycodone" - description = "An effective and very addictive painkiller." - reagent_state = LIQUID - color = "#800080" - overdose = 20 - metabolism = 0.02 - -/datum/reagent/oxycodone/affect_blood(var/mob/living/carbon/M, var/alien, var/removed, var/location) - M.add_chemical_effect(CE_PAINKILLER, 200) - -/datum/reagent/oxycodone/overdose(var/mob/living/carbon/M, var/alien) - ..() - M.druggy = max(M.druggy, 10) - M.hallucination = max(M.hallucination, 3) - -/* Other medicine */ - -/datum/reagent/synaptizine - name = "Synaptizine" - id = "synaptizine" - description = "Synaptizine is used to treat various diseases." - reagent_state = LIQUID - color = "#99CCFF" - metabolism = REM * 0.05 - overdose = REAGENTS_OVERDOSE - scannable = 1 - -/datum/reagent/synaptizine/affect_blood(var/mob/living/carbon/M, var/alien, var/removed, var/location) - if(alien == IS_DIONA) - return - M.drowsyness = max(M.drowsyness - 5, 0) - M.AdjustParalysis(-1) - M.AdjustStunned(-1) - M.AdjustWeakened(-1) - holder.remove_reagent("mindbreaker", 5) - M.hallucination = max(0, M.hallucination - 10) - M.adjustToxLoss(5 * removed) // It used to be incredibly deadly due to an oversight. Not anymore! - M.add_chemical_effect(CE_PAINKILLER, 40) - -/datum/reagent/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 = "#FFFF66" - metabolism = REM * 0.25 - overdose = REAGENTS_OVERDOSE - scannable = 1 - -/datum/reagent/alkysine/affect_blood(var/mob/living/carbon/M, var/alien, var/removed, var/location) - if(alien == IS_DIONA) - return - M.adjustBrainLoss(-30 * removed) - M.add_chemical_effect(CE_PAINKILLER, 10) - -/datum/reagent/imidazoline - name = "Imidazoline" - id = "imidazoline" - description = "Heals eye damage" - reagent_state = LIQUID - color = "#C8A5DC" - overdose = REAGENTS_OVERDOSE - scannable = 1 - -/datum/reagent/imidazoline/affect_blood(var/mob/living/carbon/M, var/alien, var/removed, var/location) - M.eye_blurry = max(M.eye_blurry - 5, 0) - M.eye_blind = max(M.eye_blind - 5, 0) - if(ishuman(M)) - var/mob/living/carbon/human/H = M - var/obj/item/organ/eyes/E = H.internal_organs_by_name["eyes"] - if(E && istype(E)) - if(E.damage > 0) - E.damage = max(E.damage - 5 * removed, 0) - -/datum/reagent/peridaxon - name = "Peridaxon" - id = "peridaxon" - description = "Used to encourage recovery of internal organs and nervous systems. Medicate cautiously." - reagent_state = LIQUID - color = "#561EC3" - overdose = 10 - scannable = 1 - -/datum/reagent/peridaxon/affect_blood(var/mob/living/carbon/M, var/alien, var/removed, var/location) - if(ishuman(M)) - var/mob/living/carbon/human/H = M - - for(var/obj/item/organ/I in H.internal_organs) - if((I.damage > 0) && (I.robotic != 2)) //Peridaxon heals only non-robotic organs - I.damage = max(I.damage - removed, 0) - -/datum/reagent/ryetalyn - name = "Ryetalyn" - id = "ryetalyn" - description = "Ryetalyn can cure all genetic abnomalities via a catalytic process." - reagent_state = SOLID - color = "#004000" - overdose = REAGENTS_OVERDOSE - -/datum/reagent/ryetalyn/affect_blood(var/mob/living/carbon/M, var/alien, var/removed, var/location) - var/needs_update = M.mutations.len > 0 - - M.mutations = list() - M.disabilities = 0 - M.sdisabilities = 0 - - // Might need to update appearance for hulk etc. - if(needs_update && ishuman(M)) - var/mob/living/carbon/human/H = M - H.update_mutations() - -/datum/reagent/hyperzine - name = "Hyperzine" - id = "hyperzine" - description = "Hyperzine is a highly effective, long lasting, muscle stimulant." - reagent_state = LIQUID - color = "#FF3300" - metabolism = REM * 0.15 - overdose = REAGENTS_OVERDOSE * 0.5 - -/datum/reagent/hyperzine/affect_blood(var/mob/living/carbon/M, var/alien, var/removed, var/location) - if(alien == IS_DIONA) - return - if(prob(5)) - M.emote(pick("twitch", "blink_r", "shiver")) - M.add_chemical_effect(CE_SPEEDBOOST, 1) - -/datum/reagent/ethylredoxrazine - name = "Ethylredoxrazine" - id = "ethylredoxrazine" - description = "A powerful oxidizer that reacts with ethanol." - reagent_state = SOLID - color = "#605048" - overdose = REAGENTS_OVERDOSE - -/datum/reagent/ethylredoxrazine/affect_blood(var/mob/living/carbon/M, var/alien, var/removed, var/location) - if(alien == IS_DIONA) - return - M.dizziness = 0 - M.drowsyness = 0 - M.stuttering = 0 - M.confused = 0 - if(M.ingested) - for(var/datum/reagent/R in M.ingested) - if(istype(R, /datum/reagent/ethanol)) - R.dose = max(R.dose - removed * 5, 0) - -/datum/reagent/hyronalin - name = "Hyronalin" - id = "hyronalin" - description = "Hyronalin is a medicinal drug used to counter the effect of radiation poisoning." - reagent_state = LIQUID - color = "#408000" - metabolism = REM * 0.25 - overdose = REAGENTS_OVERDOSE - scannable = 1 - -/datum/reagent/hyronalin/affect_blood(var/mob/living/carbon/M, var/alien, var/removed, var/location) - M.radiation = max(M.radiation - 30 * removed, 0) - -/datum/reagent/arithrazine - name = "Arithrazine" - id = "arithrazine" - description = "Arithrazine is an unstable medication used for the most extreme cases of radiation poisoning." - reagent_state = LIQUID - color = "#008000" - metabolism = REM * 0.25 - overdose = REAGENTS_OVERDOSE - scannable = 1 - -/datum/reagent/arithrazine/affect_blood(var/mob/living/carbon/M, var/alien, var/removed, var/location) - M.radiation = max(M.radiation - 70 * removed, 0) - M.adjustToxLoss(-10 * removed) - if(prob(60)) - M.take_organ_damage(4 * removed, 0) - -/datum/reagent/spaceacillin - name = "Spaceacillin" - id = "spaceacillin" - description = "An all-purpose antiviral agent." - reagent_state = LIQUID - color = "#C1C1C1" - metabolism = REM * 0.05 - overdose = REAGENTS_OVERDOSE - scannable = 1 - -/datum/reagent/sterilizine - name = "Sterilizine" - id = "sterilizine" - description = "Sterilizes wounds in preparation for surgery." - reagent_state = LIQUID - color = "#C8A5DC" - touch_met = 5 - -/datum/reagent/sterilizine/affect_touch(var/mob/living/carbon/M, var/alien, var/removed, var/location) - M.germ_level -= min(removed*20, M.germ_level) - -/datum/reagent/sterilizine/touch_obj(var/obj/O) - O.germ_level -= min(volume*20, O.germ_level) - -/datum/reagent/sterilizine/touch_turf(var/turf/T) - T.germ_level -= min(volume*20, T.germ_level) - -/datum/reagent/leporazine - name = "Leporazine" - id = "leporazine" - description = "Leporazine can be use to stabilize an individuals body temperature." - reagent_state = LIQUID - color = "#C8A5DC" - overdose = REAGENTS_OVERDOSE - scannable = 1 - -/datum/reagent/leporazine/affect_blood(var/mob/living/carbon/M, var/alien, var/removed, var/location) - if(M.bodytemperature > 310) - M.bodytemperature = max(310, M.bodytemperature - (40 * TEMPERATURE_DAMAGE_COEFFICIENT)) - else if(M.bodytemperature < 311) - M.bodytemperature = min(310, M.bodytemperature + (40 * TEMPERATURE_DAMAGE_COEFFICIENT)) - -/* Antidepressants */ - -#define ANTIDEPRESSANT_MESSAGE_DELAY 5*60*10 - -/datum/reagent/methylphenidate - name = "Methylphenidate" - id = "methylphenidate" - description = "Improves the ability to concentrate." - reagent_state = LIQUID - color = "#BF80BF" - metabolism = 0.01 - data = 0 - -/datum/reagent/methylphenidate/affect_blood(var/mob/living/carbon/M, var/alien, var/removed, var/location) - if(alien == IS_DIONA) - return - if(volume <= 0.1 && data != -1) - data = -1 - M << "You lose focus..." - else - if(world.time > data + ANTIDEPRESSANT_MESSAGE_DELAY) - data = world.time - M << "Your mind feels focused and undivided." - -/datum/reagent/citalopram - name = "Citalopram" - id = "citalopram" - description = "Stabilizes the mind a little." - reagent_state = LIQUID - color = "#FF80FF" - metabolism = 0.01 - data = 0 - -/datum/reagent/citalopram/affect_blood(var/mob/living/carbon/M, var/alien, var/removed, var/location) - if(alien == IS_DIONA) - return - if(volume <= 0.1 && data != -1) - data = -1 - M << "Your mind feels a little less stable..." - else - if(world.time > data + ANTIDEPRESSANT_MESSAGE_DELAY) - data = world.time - M << "Your mind feels stable... a little stable." - -/datum/reagent/paroxetine - name = "Paroxetine" - id = "paroxetine" - description = "Stabilizes the mind greatly, but has a chance of adverse effects." - reagent_state = LIQUID - color = "#FF80BF" - metabolism = 0.01 - data = 0 - -/datum/reagent/paroxetine/affect_blood(var/mob/living/carbon/M, var/alien, var/removed, var/location) - if(alien == IS_DIONA) - return - if(volume <= 0.1 && data != -1) - data = -1 - M << "Your mind feels much less stable..." - else - if(world.time > data + ANTIDEPRESSANT_MESSAGE_DELAY) - data = world.time - if(prob(90)) - M << "Your mind feels much more stable." - else - M << "Your mind breaks apart..." - M.hallucination += 200 - -/* Toxins, poisons, venoms */ -/datum/reagent/toxin - name = "Toxin" - id = "toxin" - description = "A toxic chemical." - reagent_state = LIQUID - color = "#CF3600" - metabolism = REM * 0.05 // 0.01 by default. They last a while and slowly kill you. - var/strength = 4 // How much damage it deals per unit - -/datum/reagent/toxin/affect_blood(var/mob/living/carbon/M, var/alien, var/removed, var/location) - if(strength && alien != IS_DIONA) - M.adjustToxLoss(strength * removed) - -/datum/reagent/toxin/plasticide - name = "Plasticide" - id = "plasticide" - description = "Liquid plastic, do not eat." - reagent_state = LIQUID - color = "#CF3600" - strength = 5 - -/datum/reagent/toxin/amatoxin - name = "Amatoxin" - id = "amatoxin" - description = "A powerful poison derived from certain species of mushroom." - reagent_state = LIQUID - color = "#792300" - strength = 10 - -/datum/reagent/toxin/carpotoxin - name = "Carpotoxin" - id = "carpotoxin" - description = "A deadly neurotoxin produced by the dreaded space carp." - reagent_state = LIQUID - color = "#003333" - strength = 10 - -/datum/reagent/toxin/phoron - name = "Phoron" - id = "phoron" - description = "Phoron in its liquid form." - reagent_state = LIQUID - color = "#9D14DB" - strength = 30 - -/datum/reagent/toxin/phoron/affect_touch(var/mob/living/carbon/M, var/alien, var/removed, var/location) - ..() - M.adjust_fire_stacks(removed / 5) - -/datum/reagent/toxin/phoron/touch_turf(var/turf/simulated/T) - if(!istype(T)) - return - T.assume_gas("volatile_fuel", volume, T20C) - remove_self(volume) - -/datum/reagent/toxin/cyanide //Fast and Lethal - name = "Cyanide" - id = "cyanide" - description = "A highly toxic chemical." - reagent_state = LIQUID - color = "#CF3600" - strength = 20 - metabolism = REM * 2 - -/datum/reagent/toxin/cyanide/affect_blood(var/mob/living/carbon/M, var/alien, var/removed, var/location) - ..() - M.adjustOxyLoss(20 * removed) - M.sleeping += 1 - -/datum/reagent/toxin/potassium_chloride - name = "Potassium Chloride" - id = "potassium_chloride" - description = "A delicious salt that stops the heart when injected into cardiac muscle." - reagent_state = SOLID - color = "#FFFFFF" - strength = 0 - overdose = REAGENTS_OVERDOSE - -/datum/reagent/toxin/potassium_chloride/overdose(var/mob/living/carbon/M, var/alien) - ..() - if(ishuman(M)) - var/mob/living/carbon/human/H = M - if(H.stat != 1) - if(H.losebreath >= 10) - H.losebreath = max(10, H.losebreath - 10) - H.adjustOxyLoss(2) - H.Weaken(10) - -/datum/reagent/toxin/potassium_chlorophoride - name = "Potassium Chlorophoride" - id = "potassium_chlorophoride" - description = "A specific chemical based on Potassium Chloride to stop the heart for surgery. Not safe to eat!" - reagent_state = SOLID - color = "#FFFFFF" - strength = 10 - overdose = 20 - -/datum/reagent/toxin/potassium_chlorophoride/affect_blood(var/mob/living/carbon/M, var/alien, var/removed, var/location) - ..() - if(ishuman(M)) - var/mob/living/carbon/human/H = M - if(H.stat != 1) - if(H.losebreath >= 10) - H.losebreath = max(10, M.losebreath-10) - H.adjustOxyLoss(2) - H.Weaken(10) - -/datum/reagent/toxin/zombiepowder - name = "Zombie Powder" - id = "zombiepowder" - description = "A strong neurotoxin that puts the subject into a death-like state." - reagent_state = SOLID - color = "#669900" - metabolism = REM - strength = 3 - -/datum/reagent/toxin/zombiepowder/affect_blood(var/mob/living/carbon/M, var/alien, var/removed, var/location) - ..() - if(alien == IS_DIONA) - return - M.status_flags |= FAKEDEATH - M.adjustOxyLoss(3 * removed) - M.Weaken(10) - M.silent = max(M.silent, 10) - M.tod = worldtime2text() - -/datum/reagent/toxin/zombiepowder/Destroy() - if(holder && holder.my_atom && ismob(holder.my_atom)) - var/mob/M = holder.my_atom - M.status_flags &= ~FAKEDEATH - ..() - -/datum/reagent/toxin/fertilizer //Reagents used for plant fertilizers. - name = "fertilizer" - id = "fertilizer" - description = "A chemical mix good for growing plants with." - reagent_state = LIQUID - strength = 0.5 // It's not THAT poisonous. - color = "#664330" - -/datum/reagent/toxin/fertilizer/eznutrient - name = "EZ Nutrient" - id = "eznutrient" - -/datum/reagent/toxin/fertilizer/left4zed - name = "Left-4-Zed" - id = "left4zed" - -/datum/reagent/toxin/fertilizer/robustharvest - name = "Robust Harvest" - id = "robustharvest" - -/datum/reagent/toxin/plantbgone - name = "Plant-B-Gone" - id = "plantbgone" - description = "A harmful toxic mixture to kill plantlife. Do not ingest!" - reagent_state = LIQUID - color = "#49002E" - strength = 4 - -/datum/reagent/toxin/plantbgone/touch_turf(var/turf/T) - if(istype(T, /turf/simulated/wall)) - var/turf/simulated/wall/W = T - if(W.rotting) - W.rotting = 0 - for(var/obj/effect/E in W) - if(E.name == "Wallrot") - qdel(E) - - W.visible_message("The fungi are completely dissolved by the solution!") - -/datum/reagent/toxin/plantbgone/touch_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) - alien_weeds.healthcheck() - else if(istype(O, /obj/effect/plant)) - qdel(O) - -/datum/reagent/toxin/plantbgone/affect_blood(var/mob/living/carbon/M, var/alien, var/removed, var/location) - ..() - if(alien == IS_DIONA) - M.adjustToxLoss(50 * removed) - -/datum/reagent/toxin/plantbgone/affect_touch(var/mob/living/carbon/M, var/alien, var/removed, var/location) - ..() - if(alien == IS_DIONA) - M.adjustToxLoss(50 * removed) - -/datum/reagent/acid/polyacid - name = "Polytrinic acid" - id = "pacid" - description = "Polytrinic acid is a an extremely corrosive chemical substance." - reagent_state = LIQUID - color = "#8E18A9" - power = 10 - meltdose = 4 - -/datum/reagent/lexorin - name = "Lexorin" - id = "lexorin" - description = "Lexorin temporarily stops respiration. Causes tissue damage." - reagent_state = LIQUID - color = "#C8A5DC" - overdose = REAGENTS_OVERDOSE - -/datum/reagent/lexorin/affect_blood(var/mob/living/carbon/M, var/alien, var/removed, var/location) - if(alien == IS_DIONA) - return - M.take_organ_damage(3 * removed, 0) - if(M.losebreath < 15) - M.losebreath++ - -/datum/reagent/mutagen - name = "Unstable mutagen" - id = "mutagen" - description = "Might cause unpredictable mutations. Keep away from children." - reagent_state = LIQUID - color = "#13BC5E" - -/datum/reagent/mutagen/affect_touch(var/mob/living/carbon/M, var/alien, var/removed, var/location) - if(prob(33)) - affect_blood(M, alien, removed) - -/datum/reagent/mutagen/affect_ingest(var/mob/living/carbon/M, var/alien, var/removed, var/location) - if(prob(67)) - affect_blood(M, alien, removed) - -/datum/reagent/mutagen/affect_blood(var/mob/living/carbon/M, var/alien, var/removed, var/location) - if(M.dna) - if(prob(removed * 0.1)) // Approx. one mutation per 10 injected/20 ingested/30 touching units - randmuti(M) - if(prob(98)) - randmutb(M) - else - randmutg(M) - domutcheck(M, null) - M.UpdateAppearance() - M.apply_effect(10 * removed, IRRADIATE, 0) - -/datum/reagent/slimejelly - name = "Slime Jelly" - id = "slimejelly" - description = "A gooey semi-liquid produced from one of the deadliest lifeforms in existence. SO REAL." - reagent_state = LIQUID - color = "#801E28" - -/datum/reagent/slimejelly/affect_blood(var/mob/living/carbon/M, var/alien, var/removed, var/location) - if(alien == IS_DIONA) - return - if(prob(10)) - M << "Your insides are burning!" - M.adjustToxLoss(rand(100, 300) * removed) - else if(prob(40)) - M.heal_organ_damage(25 * removed, 0) - -/datum/reagent/soporific - name = "Soporific" - id = "stoxin" - description = "An effective hypnotic used to treat insomnia." - reagent_state = LIQUID - color = "#009CA8" - metabolism = REM * 0.5 - overdose = REAGENTS_OVERDOSE - -/datum/reagent/soporific/affect_blood(var/mob/living/carbon/M, var/alien, var/removed, var/location) - if(alien == IS_DIONA) - return - if(dose < 1) - if(dose == metabolism * 2 || prob(5)) - M.emote("yawn") - else if(dose < 1.5) - M.eye_blurry = max(M.eye_blurry, 10) - else if(dose < 5) - if(prob(50)) - M.Weaken(2) - M.drowsyness = max(M.drowsyness, 20) - else - M.sleeping = max(M.sleeping, 20) - M.drowsyness = max(M.drowsyness, 60) - -/datum/reagent/chloralhydrate - name = "Chloral Hydrate" - id = "chloralhydrate" - description = "A powerful sedative." - reagent_state = SOLID - color = "#000067" - metabolism = REM * 0.5 - overdose = REAGENTS_OVERDOSE * 0.5 - -/datum/reagent/chloralhydrate/affect_blood(var/mob/living/carbon/M, var/alien, var/removed, var/location) - if(alien == IS_DIONA) - return - if(dose == metabolism) - M.confused += 2 - M.drowsyness += 2 - else if(dose < 2) - M.Weaken(30) - M.eye_blurry = max(M.eye_blurry, 10) - else - M.sleeping = max(M.sleeping, 30) - - if(dose > 1) - M.adjustToxLoss(removed) - -/datum/reagent/chloralhydrate/beer2 //disguised as normal beer for use by emagged brobots - name = "Beer" - id = "beer2" - description = "An alcoholic beverage made from malted grains, hops, yeast, and water. The fermentation appears to be incomplete." //If the players manage to analyze this, they deserve to know something is wrong. - reagent_state = LIQUID - color = "#664300" - - glass_icon_state = "beerglass" - glass_name = "glass of beer" - glass_desc = "A freezing pint of beer" - glass_center_of_mass = list("x"=16, "y"=8) - -/* Drugs */ - -/datum/reagent/space_drugs - name = "Space drugs" - id = "space_drugs" - description = "An illegal chemical compound used as drug." - reagent_state = LIQUID - color = "#60A584" - metabolism = REM * 0.5 - overdose = REAGENTS_OVERDOSE - -/datum/reagent/space_drugs/affect_blood(var/mob/living/carbon/M, var/alien, var/removed, var/location) - if(alien == IS_DIONA) - return - M.druggy = max(M.druggy, 15) - if(prob(10) && isturf(M.loc) && !istype(M.loc, /turf/space) && M.canmove && !M.restrained()) - step(M, pick(cardinal)) - if(prob(7)) - M.emote(pick("twitch", "drool", "moan", "giggle")) - -/datum/reagent/serotrotium - name = "Serotrotium" - id = "serotrotium" - description = "A chemical compound that promotes concentrated production of the serotonin neurotransmitter in humans." - reagent_state = LIQUID - color = "#202040" - metabolism = REM * 0.25 - overdose = REAGENTS_OVERDOSE - -/datum/reagent/serotrotium/affect_blood(var/mob/living/carbon/M, var/alien, var/removed, var/location) - if(alien == IS_DIONA) - return - if(prob(7)) - M.emote(pick("twitch", "drool", "moan", "gasp")) - return - -/datum/reagent/cryptobiolin - name = "Cryptobiolin" - id = "cryptobiolin" - description = "Cryptobiolin causes confusion and dizzyness." - reagent_state = LIQUID - color = "#000055" - metabolism = REM * 0.5 - overdose = REAGENTS_OVERDOSE - -/datum/reagent/cryptobiolin/affect_blood(var/mob/living/carbon/M, var/alien, var/removed, var/location) - if(alien == IS_DIONA) - return - M.make_dizzy(4) - M.confused = max(M.confused, 20) - -/datum/reagent/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" - overdose = REAGENTS_OVERDOSE - -/datum/reagent/impedrezene/affect_blood(var/mob/living/carbon/M, var/alien, var/removed, var/location) - if(alien == IS_DIONA) - return - M.jitteriness = max(M.jitteriness - 5, 0) - if(prob(80)) - M.adjustBrainLoss(3 * removed) - if(prob(50)) - M.drowsyness = max(M.drowsyness, 3) - if(prob(10)) - M.emote("drool") - -/datum/reagent/mindbreaker - name = "Mindbreaker Toxin" - id = "mindbreaker" - description = "A powerful hallucinogen, it can cause fatal effects in users." - reagent_state = LIQUID - color = "#B31008" - metabolism = REM * 0.25 - overdose = REAGENTS_OVERDOSE - -/datum/reagent/mindbreaker/affect_blood(var/mob/living/carbon/M, var/alien, var/removed, var/location) - if(alien == IS_DIONA) - return - M.hallucination = max(M.hallucination, 100) - -/datum/reagent/psilocybin - name = "Psilocybin" - id = "psilocybin" - description = "A strong psycotropic derived from certain species of mushroom." - color = "#E700E7" - overdose = REAGENTS_OVERDOSE - metabolism = REM * 0.5 - -/datum/reagent/psilocybin/affect_blood(var/mob/living/carbon/M, var/alien, var/removed, var/location) - if(alien == IS_DIONA) - return - M.druggy = max(M.druggy, 30) - if(dose < 1) - M.stuttering = max(M.stuttering, 3) - M.make_dizzy(5) - if(prob(10)) - M.emote(pick("twitch", "giggle")) - else if(dose < 2) - M.stuttering = max(M.stuttering, 3) - M.make_jittery(10) - M.make_dizzy(10) - M.druggy = max(M.druggy, 35) - if(prob(20)) - M.emote(pick("twitch","giggle")) - else - M.stuttering = max(M.stuttering, 3) - M.make_jittery(20) - M.make_dizzy(20) - M.druggy = max(M.druggy, 40) - if(prob(30)) - M.emote(pick("twitch", "giggle")) - -/datum/reagent/nicotine - name = "Nicotine" - id = "nicotine" - description = "A highly addictive stimulant extracted from the tobacco plant." - reagent_state = LIQUID - color = "#181818" - -/* Transformations */ - -/datum/reagent/slimetoxin - name = "Mutation Toxin" - id = "mutationtoxin" - description = "A corruptive toxin produced by slimes." - reagent_state = LIQUID - color = "#13BC5E" - -/datum/reagent/slimetoxin/affect_blood(var/mob/living/carbon/M, var/alien, var/removed, var/location) - if(ishuman(M)) - var/mob/living/carbon/human/H = M - if(H.species.name != "Slime") - M << "Your flesh rapidly mutates!" - H.set_species("Slime") - -/datum/reagent/aslimetoxin - name = "Advanced Mutation Toxin" - id = "amutationtoxin" - description = "An advanced corruptive toxin produced by slimes." - reagent_state = LIQUID - color = "#13BC5E" - -/datum/reagent/aslimetoxin/affect_blood(var/mob/living/carbon/M, var/alien, var/removed, var/location) // TODO: check if there's similar code anywhere else - if(M.monkeyizing) - return - M << "Your flesh rapidly mutates!" - M.monkeyizing = 1 - M.canmove = 0 - M.icon = null - M.overlays.Cut() - M.invisibility = 101 - for(var/obj/item/W in M) - if(istype(W, /obj/item/weapon/implant)) //TODO: Carn. give implants a dropped() or something - qdel(W) - continue - W.layer = initial(W.layer) - W.loc = M.loc - W.dropped(M) - var/mob/living/carbon/slime/new_mob = new /mob/living/carbon/slime(M.loc) - new_mob.a_intent = "hurt" - new_mob.universal_speak = 1 - if(M.mind) - M.mind.transfer_to(new_mob) - else - new_mob.key = M.key - qdel(M) - -/datum/reagent/nanites - name = "Nanomachines" - id = "nanites" - description = "Microscopic construction robots." - reagent_state = LIQUID - color = "#535E66" - -/datum/reagent/nanites/affect_touch(var/mob/living/carbon/M, var/alien, var/removed, var/location) - if(prob(10)) - M.contract_disease(new /datum/disease/robotic_transformation(0), 1) - -/datum/reagent/nanites/affect_blood(var/mob/living/carbon/M, var/alien, var/removed, var/location) - M.contract_disease(new /datum/disease/robotic_transformation(0), 1) - -/datum/reagent/xenomicrobes - name = "Xenomicrobes" - id = "xenomicrobes" - description = "Microbes with an entirely alien cellular structure." - reagent_state = LIQUID - color = "#535E66" - -/datum/reagent/xenomicrobes/affect_touch(var/mob/living/carbon/M, var/alien, var/removed, var/location) - if(prob(10)) - M.contract_disease(new /datum/disease/xeno_transformation(0), 1) - -/datum/reagent/xenomicrobes/affect_blood(var/mob/living/carbon/M, var/alien, var/removed, var/location) - M.contract_disease(new /datum/disease/xeno_transformation(0), 1) - -/* Food */ - -/datum/reagent/nutriment - name = "Nutriment" - id = "nutriment" - description = "All the vitamins, minerals, and carbohydrates the body needs in pure form." - reagent_state = SOLID - metabolism = REM * 4 - var/nutriment_factor = 30 // Per unit - var/injectable = 0 - color = "#664330" - -/datum/reagent/nutriment/affect_blood(var/mob/living/carbon/M, var/alien, var/removed, var/location) - if(!injectable) - M.adjustToxLoss(0.1 * removed) - return - affect_ingest(M, alien, removed) - -/datum/reagent/nutriment/affect_ingest(var/mob/living/carbon/M, var/alien, var/removed, var/location) - M.heal_organ_damage(0.5 * removed, 0) - M.nutrition += nutriment_factor * removed // For hunger and fatness - M.add_chemical_effect(CE_BLOODRESTORE, 4 * removed) - -/datum/reagent/nutriment/protein // Bad for Skrell! - name = "animal protein" - id = "protein" - color = "#440000" - -/datum/reagent/nutriment/protein/affect_ingest(var/mob/living/carbon/M, var/alien, var/removed, var/location) - if(alien && alien == IS_SKRELL) - M.adjustToxLoss(0.5 * removed) - return - ..() - -/datum/reagent/nutriment/egg // Also bad for skrell. Not a child of protein because it might mess up, not sure. - name = "egg yolk" - id = "egg" - color = "#FFFFAA" - -/datum/reagent/nutriment/egg/affect_ingest(var/mob/living/carbon/M, var/alien, var/removed, var/location) - if(alien && alien == IS_SKRELL) - M.adjustToxLoss(0.5) - return - ..() - -/datum/reagent/nutriment/flour - name = "flour" - id = "flour" - description = "This is what you rub all over yourself to pretend to be a ghost." - reagent_state = SOLID - nutriment_factor = 1 - color = "#FFFFFF" - -/datum/reagent/nutriment/flour/touch_turf(var/turf/simulated/T) - if(!istype(T, /turf/space)) - new /obj/effect/decal/cleanable/flour(T) - -/datum/reagent/nutriment/coco - name = "Coco Powder" - id = "coco" - description = "A fatty, bitter paste made from coco beans." - reagent_state = SOLID - nutriment_factor = 5 - color = "#302000" - -/datum/reagent/nutriment/soysauce - name = "Soysauce" - id = "soysauce" - description = "A salty sauce made from the soy plant." - reagent_state = LIQUID - nutriment_factor = 2 - color = "#792300" - -/datum/reagent/nutriment/ketchup - name = "Ketchup" - id = "ketchup" - description = "Ketchup, catsup, whatever. It's tomato paste." - reagent_state = LIQUID - nutriment_factor = 5 - color = "#731008" - -/datum/reagent/nutriment/rice - name = "Rice" - id = "rice" - description = "Enjoy the great taste of nothing." - reagent_state = SOLID - nutriment_factor = 1 - color = "#FFFFFF" - -/datum/reagent/nutriment/cherryjelly - name = "Cherry Jelly" - id = "cherryjelly" - description = "Totally the best. Only to be spread on foods with excellent lateral symmetry." - reagent_state = LIQUID - nutriment_factor = 1 - color = "#801E28" - -/datum/reagent/nutriment/cornoil - name = "Corn Oil" - id = "cornoil" - description = "An oil derived from various types of corn." - reagent_state = LIQUID - nutriment_factor = 20 - color = "#302000" - -/datum/reagent/nutriment/cornoil/touch_turf(var/turf/simulated/T) - if(!istype(T)) - return - - var/hotspot = (locate(/obj/fire) 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) - qdel(hotspot) - - 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) // This is terrible and needs to be changed when possible. - if(!T || !istype(T)) - return - if(T.wet >= 2) - return - T.wet = 0 - if(T.wet_overlay) - T.overlays -= T.wet_overlay - T.wet_overlay = null - -/datum/reagent/nutriment/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 - color = "#899613" - -/datum/reagent/nutriment/sprinkles - name = "Sprinkles" - id = "sprinkles" - description = "Multi-colored little bits of sugar, commonly found on donuts. Loved by cops." - nutriment_factor = 1 - color = "#FF00FF" - -/datum/reagent/nutriment/mint - name = "Mint" - id = "mint" - description = "Also known as Mentha." - reagent_state = LIQUID - color = "#CF3600" - -/datum/reagent/lipozine // The anti-nutriment. - name = "Lipozine" - id = "lipozine" - description = "A chemical compound that causes a powerful fat-burning reaction." - reagent_state = LIQUID - color = "#BBEDA4" - overdose = REAGENTS_OVERDOSE - -/datum/reagent/lipozine/affect_blood(var/mob/living/carbon/M, var/alien, var/removed, var/location) - M.nutrition = max(M.nutrition - 10 * removed, 0) - M.overeatduration = 0 - if(M.nutrition < 0) - M.nutrition = 0 - -/* Non-food stuff like condiments */ - -/datum/reagent/sodiumchloride - name = "Table Salt" - id = "sodiumchloride" - description = "A salt made of sodium chloride. Commonly used to season food." - reagent_state = SOLID - color = "#FFFFFF" - overdose = REAGENTS_OVERDOSE - -/datum/reagent/blackpepper - name = "Black Pepper" - id = "blackpepper" - description = "A powder ground from peppercorns. *AAAACHOOO*" - reagent_state = SOLID - color = "#000000" - -/datum/reagent/enzyme - name = "Universal Enzyme" - id = "enzyme" - description = "A universal enzyme used in the preperation of certain chemicals and foods." - reagent_state = LIQUID - color = "#365E30" - overdose = REAGENTS_OVERDOSE - -/datum/reagent/frostoil - name = "Frost Oil" - id = "frostoil" - description = "A special oil that noticably chills the body. Extracted from Ice Peppers." - reagent_state = LIQUID - color = "#B31008" - -/datum/reagent/frostoil/affect_blood(var/mob/living/carbon/M, var/alien, var/removed, var/location) - if(alien == IS_DIONA) - return - M.bodytemperature = max(M.bodytemperature - 10 * TEMPERATURE_DAMAGE_COEFFICIENT, 0) - if(prob(1)) - M.emote("shiver") - if(istype(M, /mob/living/carbon/slime)) - M.bodytemperature = max(M.bodytemperature - rand(10,20), 0) - holder.remove_reagent("capsaicin", 5) - -/datum/reagent/capsaicin - name = "Capsaicin Oil" - id = "capsaicin" - description = "This is what makes chilis hot." - reagent_state = LIQUID - color = "#B31008" - -/datum/reagent/capsaicin/affect_blood(var/mob/living/carbon/M, var/alien, var/removed, var/location) - if(alien == IS_DIONA) - return - if(ishuman(M)) - var/mob/living/carbon/human/H = M - if(H.species && (H.species.flags & (NO_PAIN | IS_SYNTHETIC))) - return - if(dose < 5 && (dose == metabolism || prob(5))) - M << "Your insides feel uncomfortably hot!" - if(dose >= 5) - M.apply_effect(2, AGONY, 0) - if(prob(5)) - M.visible_message("[M] [pick("dry heaves!","coughs!","splutters!")]", "You feel like your insides are burning!") - if(istype(M, /mob/living/carbon/slime)) - M.bodytemperature += rand(10, 25) - holder.remove_reagent("frostoil", 5) - -/datum/reagent/condensedcapsaicin - name = "Condensed Capsaicin" - id = "condensedcapsaicin" - description = "A chemical agent used for self-defense and in police work." - reagent_state = LIQUID - touch_met = 50 // Get rid of it quickly - color = "#B31008" - -/datum/reagent/condensedcapsaicin/affect_touch(var/mob/living/carbon/M, var/alien, var/removed, var/location) - var/eyes_covered = 0 - var/mouth_covered = 0 - var/obj/item/safe_thing = null - if(istype(M, /mob/living/carbon/human)) - var/mob/living/carbon/human/H = M - if(H.species && (H.species.flags & NO_PAIN)) - return - if(H.head) - if(H.head.flags & MASKCOVERSEYES) - eyes_covered = 1 - safe_thing = H.head - if(H.head.flags & MASKCOVERSMOUTH) - mouth_covered = 1 - safe_thing = H.head - if(H.wear_mask) - if(!eyes_covered && H.wear_mask.flags & MASKCOVERSEYES) - eyes_covered = 1 - safe_thing = H.wear_mask - if(!mouth_covered && H.wear_mask.flags & MASKCOVERSMOUTH) - mouth_covered = 1 - safe_thing = H.wear_mask - if(H.glasses) - if(!eyes_covered) - eyes_covered = 1 - if(!safe_thing) - safe_thing = H.glasses - if(eyes_covered && mouth_covered) - M << "Your [safe_thing] protects you from the pepperspray!" - return - else if(eyes_covered) - M << "Your [safe_thing] protect you from most of the pepperspray!" - M.eye_blurry = max(M.eye_blurry, 15) - M.eye_blind = max(M.eye_blind, 5) - M.Stun(5) - M.Weaken(5) - return - else if (mouth_covered) // Mouth cover is better than eye cover - M << "Your [safe_thing] protects your face from the pepperspray!" - M.eye_blurry = max(M.eye_blurry, 5) - return - else // Oh dear :D - M << "You're sprayed directly in the eyes with pepperspray!" - M.eye_blurry = max(M.eye_blurry, 25) - M.eye_blind = max(M.eye_blind, 10) - M.Stun(5) - M.Weaken(5) - return - -/datum/reagent/condensedcapsaicin/affect_blood(var/mob/living/carbon/M, var/alien, var/removed, var/location) - if(ishuman(M)) - var/mob/living/carbon/human/H = M - if(H.species && (H.species.flags & (NO_PAIN | IS_SYNTHETIC))) - return - if(dose == metabolism) - M << "You feel like your insides are burning!" - else - M.apply_effect(4, AGONY, 0) - if(prob(5)) - M.visible_message("[M] [pick("dry heaves!","coughs!","splutters!")]", "You feel like your insides are burning!") - if(istype(M, /mob/living/carbon/slime)) - M.bodytemperature += rand(15, 30) - holder.remove_reagent("frostoil", 5) - -/* Drinks */ - -/datum/reagent/drink - name = "Drink" - id = "drink" - description = "Uh, some kind of drink." - reagent_state = LIQUID - color = "#E78108" - var/nutrition = 0 // Per unit - var/adj_dizzy = 0 // Per tick - var/adj_drowsy = 0 - var/adj_sleepy = 0 - var/adj_temp = 0 - -/datum/reagent/drink/affect_blood(var/mob/living/carbon/M, var/alien, var/removed, var/location) - M.adjustToxLoss(removed) // Probably not a good idea; not very deadly though - return - -/datum/reagent/drink/affect_ingest(var/mob/living/carbon/M, var/alien, var/removed, var/location) - M.nutrition += nutrition * removed - M.dizziness = max(0, M.dizziness + adj_dizzy) - M.drowsyness = max(0, M.drowsyness + adj_drowsy) - M.sleeping = max(0, M.sleeping + adj_sleepy) - if(adj_temp > 0 && M.bodytemperature < 310) // 310 is the normal bodytemp. 310.055 - M.bodytemperature = min(310, M.bodytemperature + (adj_temp * TEMPERATURE_DAMAGE_COEFFICIENT)) - if(adj_temp < 0 && M.bodytemperature > 310) - M.bodytemperature = min(310, M.bodytemperature - (adj_temp * TEMPERATURE_DAMAGE_COEFFICIENT)) - -// Juices - -/datum/reagent/drink/banana - name = "Banana Juice" - id = "banana" - description = "The raw essence of a banana." - color = "#C3AF00" - - glass_icon_state = "banana" - glass_name = "glass of banana juice" - glass_desc = "The raw essence of a banana. HONK!" - -/datum/reagent/drink/berryjuice - name = "Berry Juice" - id = "berryjuice" - description = "A delicious blend of several different kinds of berries." - color = "#990066" - - glass_icon_state = "berryjuice" - glass_name = "glass of berry juice" - glass_desc = "Berry juice. Or maybe it's jam. Who cares?" - -/datum/reagent/drink/carrotjuice - name = "Carrot juice" - id = "carrotjuice" - description = "It is just like a carrot but without crunching." - color = "#FF8C00" // rgb: 255, 140, 0 - - glass_icon_state = "carrotjuice" - glass_name = "glass of carrot juice" - glass_desc = "It is just like a carrot but without crunching." - -/datum/reagent/drink/carrotjuice/affect_ingest(var/mob/living/carbon/M, var/alien, var/removed, var/location) - ..() - M.reagents.add_reagent("imidazoline", removed * 0.2) - -/datum/reagent/drink/grapejuice - name = "Grape Juice" - id = "grapejuice" - description = "It's grrrrrape!" - color = "#863333" - - glass_icon_state = "grapejuice" - glass_name = "glass of grape juice" - glass_desc = "It's grrrrrape!" - -/datum/reagent/drink/lemonjuice - name = "Lemon Juice" - id = "lemonjuice" - description = "This juice is VERY sour." - color = "#AFAF00" - - glass_icon_state = "lemonjuice" - glass_name = "glass of lemon juice" - glass_desc = "Sour..." - -/datum/reagent/drink/limejuice - name = "Lime Juice" - id = "limejuice" - description = "The sweet-sour juice of limes." - color = "#365E30" - - glass_icon_state = "glass_green" - glass_name = "glass of lime juice" - glass_desc = "A glass of sweet-sour lime juice" - -/datum/reagent/drink/limejuice/affect_ingest(var/mob/living/carbon/M, var/alien, var/removed, var/location) - ..() - if(alien == IS_DIONA) - return - M.adjustToxLoss(-0.5 * removed) - -/datum/reagent/drink/orangejuice - name = "Orange juice" - id = "orangejuice" - description = "Both delicious AND rich in Vitamin C, what more do you need?" - color = "#E78108" - - glass_icon_state = "glass_orange" - glass_name = "glass of orange juice" - glass_desc = "Vitamins! Yay!" - -/datum/reagent/drink/orangejuice/affect_ingest(var/mob/living/carbon/M, var/alien, var/removed, var/location) - ..() - if(alien == IS_DIONA) - return - M.adjustOxyLoss(-2 * removed) - -/datum/reagent/toxin/poisonberryjuice // It has more in common with toxins than drinks... but it's a juice - name = "Poison Berry Juice" - id = "poisonberryjuice" - description = "A tasty juice blended from various kinds of very deadly and toxic berries." - color = "#863353" - strength = 5 - - glass_icon_state = "poisonberryjuice" - glass_name = "glass of poison berry juice" - glass_desc = "A glass of deadly juice." - -/datum/reagent/drink/potato_juice - name = "Potato Juice" - id = "potato" - description = "Juice of the potato. Bleh." - nutrition = 2 - color = "#302000" - - glass_icon_state = "glass_brown" - glass_name = "glass of potato juice" - glass_desc = "Juice from a potato. Bleh." - -/datum/reagent/drink/tomatojuice - name = "Tomato Juice" - id = "tomatojuice" - description = "Tomatoes made into juice. What a waste of big, juicy tomatoes, huh?" - color = "#731008" - - glass_icon_state = "glass_red" - glass_name = "glass of tomato juice" - glass_desc = "Are you sure this is tomato juice?" - -/datum/reagent/drink/tomatojuice/affect_ingest(var/mob/living/carbon/M, var/alien, var/removed, var/location) - ..() - if(alien == IS_DIONA) - return - M.heal_organ_damage(0, 0.5 * removed) - -/datum/reagent/drink/watermelonjuice - name = "Watermelon Juice" - id = "watermelonjuice" - description = "Delicious juice made from watermelon." - color = "#B83333" - - glass_icon_state = "glass_red" - glass_name = "glass of watermelon juice" - glass_desc = "Delicious juice made from watermelon." - -// Everything else - -/datum/reagent/drink/milk - name = "Milk" - id = "milk" - description = "An opaque white liquid produced by the mammary glands of mammals." - color = "#DFDFDF" - - glass_icon_state = "glass_white" - glass_name = "glass of milk" - glass_desc = "White and nutritious goodness!" - -/datum/reagent/drink/milk/affect_ingest(var/mob/living/carbon/M, var/alien, var/removed, var/location) - ..() - if(alien == IS_DIONA) - return - M.heal_organ_damage(0.5 * removed, 0) - holder.remove_reagent("capsaicin", 10 * removed) - -/datum/reagent/drink/milk/cream - name = "Cream" - id = "cream" - description = "The fatty, still liquid part of milk. Why don't you mix this with sum scotch, eh?" - color = "#DFD7AF" - - glass_icon_state = "glass_white" - glass_name = "glass of cream" - glass_desc = "Ewwww..." - -/datum/reagent/drink/milk/soymilk - name = "Soy Milk" - id = "soymilk" - description = "An opaque white liquid made from soybeans." - color = "#DFDFC7" - - glass_icon_state = "glass_white" - glass_name = "glass of soy milk" - glass_desc = "White and nutritious soy goodness!" - -/datum/reagent/drink/tea - name = "Tea" - id = "tea" - description = "Tasty black tea, it has antioxidants, it's good for you!" - color = "#101000" - adj_dizzy = -2 - adj_drowsy = -1 - adj_sleepy = -3 - adj_temp = 20 - - glass_icon_state = "bigteacup" - glass_name = "cup of tea" - glass_desc = "Tasty black tea, it has antioxidants, it's good for you!" - -/datum/reagent/drink/tea/affect_ingest(var/mob/living/carbon/M, var/alien, var/removed, var/location) - ..() - if(alien == IS_DIONA) - return - M.adjustToxLoss(-0.5 * removed) - -/datum/reagent/drink/tea/icetea - name = "Iced Tea" - id = "icetea" - description = "No relation to a certain rap artist/ actor." - color = "#104038" // rgb: 16, 64, 56 - adj_temp = -5 - - glass_icon_state = "icedteaglass" - glass_name = "glass of iced tea" - glass_desc = "No relation to a certain rap artist/ actor." - glass_center_of_mass = list("x"=15, "y"=10) - -/datum/reagent/drink/coffee - name = "Coffee" - id = "coffee" - description = "Coffee is a brewed drink prepared from roasted seeds, commonly called coffee beans, of the coffee plant." - color = "#482000" - adj_dizzy = -5 - adj_drowsy = -3 - adj_sleepy = -2 - adj_temp = 25 - - glass_icon_state = "hot_coffee" - glass_name = "cup of coffee" - glass_desc = "Don't drop it, or you'll send scalding liquid and glass shards everywhere." - - -/datum/reagent/drink/coffee/affect_ingest(var/mob/living/carbon/M, var/alien, var/removed, var/location) - ..() - if(alien == IS_DIONA) - return - M.make_jittery(5) - if(adj_temp > 0) - holder.remove_reagent("frostoil", 10 * removed) - -/datum/reagent/drink/coffee/icecoffee - name = "Iced Coffee" - id = "icecoffee" - description = "Coffee and ice, refreshing and cool." - color = "#102838" - adj_temp = -5 - - glass_icon_state = "icedcoffeeglass" - glass_name = "glass of iced coffee" - glass_desc = "A drink to perk you up and refresh you!" - -/datum/reagent/drink/coffee/soy_latte - name = "Soy Latte" - id = "soy_latte" - description = "A nice and tasty beverage while you are reading your hippie books." - color = "#664300" - adj_temp = 5 - - glass_icon_state = "soy_latte" - glass_name = "glass of soy latte" - glass_desc = "A nice and refrshing beverage while you are reading." - glass_center_of_mass = list("x"=15, "y"=9) - -/datum/reagent/drink/coffee/soy_latte/affect_ingest(var/mob/living/carbon/M, var/alien, var/removed, var/location) - ..() - M.heal_organ_damage(0.5 * removed, 0) - -/datum/reagent/drink/coffee/cafe_latte - name = "Cafe Latte" - id = "cafe_latte" - description = "A nice, strong and tasty beverage while you are reading." - color = "#664300" // rgb: 102, 67, 0 - adj_temp = 5 - - glass_icon_state = "cafe_latte" - glass_name = "glass of cafe latte" - glass_desc = "A nice, strong and refreshing beverage while you are reading." - glass_center_of_mass = list("x"=15, "y"=9) - -/datum/reagent/drink/coffee/cafe_latte/affect_ingest(var/mob/living/carbon/M, var/alien, var/removed, var/location) - ..() - M.heal_organ_damage(0.5 * removed, 0) - -/datum/reagent/drink/hot_coco - name = "Hot Chocolate" - id = "hot_coco" - description = "Made with love! And cocoa beans." - reagent_state = LIQUID - color = "#403010" - nutrition = 2 - adj_temp = 5 - - glass_icon_state = "chocolateglass" - glass_name = "glass of hot chocolate" - glass_desc = "Made with love! And cocoa beans." - -/datum/reagent/drink/sodawater - name = "Soda Water" - id = "sodawater" - description = "A can of club soda. Why not make a scotch and soda?" - color = "#619494" - adj_dizzy = -5 - adj_drowsy = -3 - adj_temp = -5 - - glass_icon_state = "glass_clear" - glass_name = "glass of soda water" - glass_desc = "Soda water. Why not make a scotch and soda?" - -/datum/reagent/drink/grapesoda - name = "Grape Soda" - id = "grapesoda" - description = "Grapes made into a fine drank." - color = "#421C52" - adj_drowsy = -3 - - glass_icon_state = "gsodaglass" - glass_name = "glass of grape soda" - glass_desc = "Looks like a delicious drink!" - -/datum/reagent/drink/tonic - name = "Tonic Water" - id = "tonic" - description = "It tastes strange but at least the quinine keeps the Space Malaria at bay." - color = "#664300" - adj_dizzy = -5 - adj_drowsy = -3 - adj_sleepy = -2 - adj_temp = -5 - - glass_icon_state = "glass_clear" - glass_name = "glass of tonic water" - glass_desc = "Quinine tastes funny, but at least it'll keep that Space Malaria away." - -/datum/reagent/drink/lemonade - name = "Lemonade" - description = "Oh the nostalgia..." - id = "lemonade" - color = "#FFFF00" - adj_temp = -5 - - glass_icon_state = "lemonadeglass" - glass_name = "glass of lemonade" - glass_desc = "Oh the nostalgia..." - -/datum/reagent/drink/kiraspecial - name = "Kira Special" - description = "Long live the guy who everyone had mistaken for a girl. Baka!" - id = "kiraspecial" - color = "#CCCC99" - adj_temp = -5 - - glass_icon_state = "kiraspecial" - glass_name = "glass of Kira Special" - glass_desc = "Long live the guy who everyone had mistaken for a girl. Baka!" - glass_center_of_mass = list("x"=16, "y"=12) - -/datum/reagent/drink/brownstar - name = "Brown Star" - description = "It's not what it sounds like..." - id = "brownstar" - color = "#9F3400" - adj_temp = -2 - - glass_icon_state = "brownstar" - glass_name = "glass of Brown Star" - glass_desc = "It's not what it sounds like..." - -/datum/reagent/drink/milkshake - name = "Milkshake" - description = "Glorious brainfreezing mixture." - id = "milkshake" - color = "#AEE5E4" - adj_temp = -9 - - glass_icon_state = "milkshake" - glass_name = "glass of milkshake" - glass_desc = "Glorious brainfreezing mixture." - glass_center_of_mass = list("x"=16, "y"=7) - -/datum/reagent/drink/rewriter - name = "Rewriter" - description = "The secret of the sanctuary of the Libarian..." - id = "rewriter" - color = "#485000" - adj_temp = -5 - - glass_icon_state = "rewriter" - glass_name = "glass of Rewriter" - glass_desc = "The secret of the sanctuary of the Libarian..." - glass_center_of_mass = list("x"=16, "y"=9) - -/datum/reagent/drink/rewriter/affect_ingest(var/mob/living/carbon/M, var/alien, var/removed, var/location) - ..() - M.make_jittery(5) - -/datum/reagent/drink/nuka_cola - name = "Nuka Cola" - id = "nuka_cola" - description = "Cola, cola never changes." - color = "#100800" - adj_temp = -5 - adj_sleepy = -2 - - glass_icon_state = "nuka_colaglass" - glass_name = "glass of Nuka-Cola" - glass_desc = "Don't cry, Don't raise your eye, It's only nuclear wasteland" - glass_center_of_mass = list("x"=16, "y"=6) - -/datum/reagent/drink/nuka_cola/affect_ingest(var/mob/living/carbon/M, var/alien, var/removed, var/location) - ..() - M.add_chemical_effect(CE_SPEEDBOOST, 1) - M.make_jittery(20) - M.druggy = max(M.druggy, 30) - M.dizziness += 5 - M.drowsyness = 0 - -/datum/reagent/drink/grenadine - name = "Grenadine Syrup" - id = "grenadine" - description = "Made in the modern day with proper pomegranate substitute. Who uses real fruit, anyways?" - color = "#FF004F" - - glass_icon_state = "grenadineglass" - glass_name = "glass of grenadine syrup" - glass_desc = "Sweet and tangy, a bar syrup used to add color or flavor to drinks." - glass_center_of_mass = list("x"=17, "y"=6) - -/datum/reagent/drink/space_cola - name = "Space Cola" - id = "cola" - description = "A refreshing beverage." - reagent_state = LIQUID - color = "#100800" - adj_drowsy = -3 - adj_temp = -5 - - glass_icon_state = "glass_brown" - glass_name = "glass of Space Cola" - glass_desc = "A glass of refreshing Space Cola" - -/datum/reagent/drink/spacemountainwind - name = "Mountain Wind" - id = "spacemountainwind" - description = "Blows right through you like a space wind." - color = "#102000" - adj_drowsy = -7 - adj_sleepy = -1 - adj_temp = -5 - - glass_icon_state = "Space_mountain_wind_glass" - glass_name = "glass of Space Mountain Wind" - glass_desc = "Space Mountain Wind. As you know, there are no mountains in space, only wind." - -/datum/reagent/drink/dr_gibb - name = "Dr. Gibb" - id = "dr_gibb" - description = "A delicious blend of 42 different flavours" - color = "#102000" - adj_drowsy = -6 - adj_temp = -5 - - glass_icon_state = "dr_gibb_glass" - glass_name = "glass of Dr. Gibb" - glass_desc = "Dr. Gibb. Not as dangerous as the name might imply." - -/datum/reagent/drink/space_up - name = "Space-Up" - id = "space_up" - description = "Tastes like a hull breach in your mouth." - color = "#202800" - adj_temp = -8 - - glass_icon_state = "space-up_glass" - glass_name = "glass of Space-up" - glass_desc = "Space-up. It helps keep your cool." - -/datum/reagent/drink/lemon_lime - name = "Lemon Lime" - description = "A tangy substance made of 0.5% natural citrus!" - id = "lemon_lime" - color = "#878F00" - adj_temp = -8 - - glass_icon_state = "lemonlime" - glass_name = "glass of lemon lime soda" - glass_desc = "A tangy substance made of 0.5% natural citrus!" - -/datum/reagent/drink/doctor_delight - name = "The Doctor's Delight" - id = "doctorsdelight" - description = "A gulp a day keeps the MediBot away. That's probably for the best." - reagent_state = LIQUID - color = "#FF8CFF" - nutrition = 1 - - glass_icon_state = "doctorsdelightglass" - glass_name = "glass of The Doctor's Delight" - glass_desc = "A healthy mixture of juices, guaranteed to keep you healthy until the next toolboxing takes place." - glass_center_of_mass = list("x"=16, "y"=8) - -/datum/reagent/drink/doctor_delight/affect_ingest(var/mob/living/carbon/M, var/alien, var/removed, var/location) - ..() - if(alien == IS_DIONA) - return - M.adjustOxyLoss(-4 * removed) - M.heal_organ_damage(2 * removed, 2 * removed) - M.adjustToxLoss(-2 * removed) - if(M.dizziness) - M.dizziness = max(0, M.dizziness - 15) - if(M.confused) - M.confused = max(0, M.confused - 5) - -/datum/reagent/drink/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 - nutrition = 1 - color = "#302000" - -/datum/reagent/drink/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 - color = "#302000" - nutrition = 5 - adj_temp = 5 - -/datum/reagent/drink/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 - color = "#302000" - nutrition = 5 - -/datum/reagent/drink/hell_ramen/affect_ingest(var/mob/living/carbon/M, var/alien, var/removed, var/location) - ..() - if(alien == IS_DIONA) - return - M.bodytemperature += 10 * TEMPERATURE_DAMAGE_COEFFICIENT - -/datum/reagent/drink/ice - name = "Ice" - id = "ice" - description = "Frozen water, your dentist wouldn't like you chewing this." - reagent_state = SOLID - color = "#619494" - adj_temp = -5 - - glass_icon_state = "iceglass" - glass_name = "glass of ice" - glass_desc = "Generally, you're supposed to put something else in there too..." - -/datum/reagent/drink/nothing - name = "Nothing" - id = "nothing" - description = "Absolutely nothing." - - glass_icon_state = "nothing" - glass_name = "glass of nothing" - glass_desc = "Absolutely nothing." - -/* Alcohol */ - -// Basic - -/datum/reagent/ethanol/absinthe - name = "Absinthe" - id = "absinthe" - description = "Watch out that the Green Fairy doesn't come for you!" - color = "#33EE00" - strength = 12 - - glass_icon_state = "absintheglass" - glass_name = "glass of absinthe" - glass_desc = "Wormwood, anise, oh my." - glass_center_of_mass = list("x"=16, "y"=5) - -/datum/reagent/ethanol/ale - name = "Ale" - id = "ale" - description = "A dark alchoholic beverage made by malted barley and yeast." - color = "#664300" - strength = 50 - - glass_icon_state = "aleglass" - glass_name = "glass of ale" - glass_desc = "A freezing pint of delicious ale" - glass_center_of_mass = list("x"=16, "y"=8) - -/datum/reagent/ethanol/beer - name = "Beer" - id = "beer" - description = "An alcoholic beverage made from malted grains, hops, yeast, and water." - color = "#664300" - strength = 50 - nutriment_factor = 1 - - glass_icon_state = "beerglass" - glass_name = "glass of beer" - glass_desc = "A freezing pint of beer" - glass_center_of_mass = list("x"=16, "y"=8) - -/datum/reagent/ethanol/beer/affect_ingest(var/mob/living/carbon/M, var/alien, var/removed, var/location) - ..() - if(alien == IS_DIONA) - return - M.jitteriness = max(M.jitteriness - 3, 0) - -/datum/reagent/ethanol/bluecuracao - name = "Blue Curacao" - id = "bluecuracao" - description = "Exotically blue, fruity drink, distilled from oranges." - color = "#0000CD" - strength = 15 - - glass_icon_state = "curacaoglass" - glass_name = "glass of blue curacao" - glass_desc = "Exotically blue, fruity drink, distilled from oranges." - glass_center_of_mass = list("x"=16, "y"=5) - -/datum/reagent/ethanol/cognac - name = "Cognac" - id = "cognac" - description = "A sweet and strongly alchoholic drink, made after numerous distillations and years of maturing. Classy as fornication." - color = "#AB3C05" - strength = 15 - - glass_icon_state = "cognacglass" - glass_name = "glass of cognac" - glass_desc = "Damn, you feel like some kind of French aristocrat just by holding this." - glass_center_of_mass = list("x"=16, "y"=6) - -/datum/reagent/ethanol/deadrum - name = "Deadrum" - id = "deadrum" - description = "Popular with the sailors. Not very popular with everyone else." - color = "#664300" - strength = 50 - - glass_icon_state = "rumglass" - glass_name = "glass of rum" - glass_desc = "Now you want to Pray for a pirate suit, don't you?" - glass_center_of_mass = list("x"=16, "y"=12) - -/datum/reagent/ethanol/deadrum/affect_ingest(var/mob/living/carbon/M, var/alien, var/removed, var/location) - ..() - if(alien == IS_DIONA) - return - M.dizziness +=5 - -/datum/reagent/ethanol/gin - name = "Gin" - id = "gin" - description = "It's gin. In space. I say, good sir." - color = "#664300" - strength = 50 - - glass_icon_state = "ginvodkaglass" - glass_name = "glass of gin" - glass_desc = "A crystal clear glass of Griffeater gin." - glass_center_of_mass = list("x"=16, "y"=12) - -/datum/reagent/ethanol/kahlua - name = "Kahlua" - id = "kahlua" - description = "A widely known, Mexican coffee-flavoured liqueur. In production since 1936!" - color = "#664300" - strength = 15 - - glass_icon_state = "kahluaglass" - glass_name = "glass of RR coffee liquor" - glass_desc = "DAMN, THIS THING LOOKS ROBUST" - glass_center_of_mass = list("x"=15, "y"=7) - -/datum/reagent/ethanol/kahlua/affect_ingest(var/mob/living/carbon/M, var/alien, var/removed, var/location) - ..() - if(alien == IS_DIONA) - return - 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)) - M.make_jittery(5) - -/datum/reagent/ethanol/melonliquor - name = "Melon Liquor" - id = "melonliquor" - description = "A relatively sweet and fruity 46 proof liquor." - color = "#138808" // rgb: 19, 136, 8 - strength = 50 - - glass_icon_state = "emeraldglass" - glass_name = "glass of melon liquor" - glass_desc = "A relatively sweet and fruity 46 proof liquor." - glass_center_of_mass = list("x"=16, "y"=5) - -/datum/reagent/ethanol/rum - name = "Rum" - id = "rum" - description = "Yohoho and all that." - color = "#664300" - strength = 15 - - glass_icon_state = "rumglass" - glass_name = "glass of rum" - glass_desc = "Now you want to Pray for a pirate suit, don't you?" - glass_center_of_mass = list("x"=16, "y"=12) - -/datum/reagent/ethanol/sake - name = "Sake" - id = "sake" - description = "Anime's favorite drink." - color = "#664300" - strength = 25 - - glass_icon_state = "ginvodkaglass" - glass_name = "glass of sake" - glass_desc = "A glass of sake." - glass_center_of_mass = list("x"=16, "y"=12) - -/datum/reagent/ethanol/tequilla - name = "Tequila" - id = "tequilla" - description = "A strong and mildly flavoured, mexican produced spirit. Feeling thirsty hombre?" - color = "#FFFF91" - strength = 25 - - glass_icon_state = "tequillaglass" - glass_name = "glass of Tequilla" - glass_desc = "Now all that's missing is the weird colored shades!" - glass_center_of_mass = list("x"=16, "y"=12) - -/datum/reagent/ethanol/thirteenloko - name = "Thirteen Loko" - id = "thirteenloko" - description = "A potent mixture of caffeine and alcohol." - color = "#102000" - strength = 25 - nutriment_factor = 1 - - glass_icon_state = "thirteen_loko_glass" - glass_name = "glass of Thirteen Loko" - glass_desc = "This is a glass of Thirteen Loko, it appears to be of the highest quality. The drink, not the glass." - -/datum/reagent/ethanol/thirteenloko/affect_ingest(var/mob/living/carbon/M, var/alien, var/removed, var/location) - ..() - if(alien == IS_DIONA) - return - M.drowsyness = max(0, M.drowsyness - 7) - if (M.bodytemperature > 310) - M.bodytemperature = max(310, M.bodytemperature - (5 * TEMPERATURE_DAMAGE_COEFFICIENT)) - M.make_jittery(5) - -/datum/reagent/ethanol/vermouth - name = "Vermouth" - id = "vermouth" - description = "You suddenly feel a craving for a martini..." - color = "#91FF91" // rgb: 145, 255, 145 - strength = 15 - - glass_icon_state = "vermouthglass" - glass_name = "glass of vermouth" - glass_desc = "You wonder why you're even drinking this straight." - glass_center_of_mass = list("x"=16, "y"=12) - -/datum/reagent/ethanol/vodka - name = "Vodka" - id = "vodka" - description = "Number one drink AND fueling choice for Russians worldwide." - color = "#0064C8" // rgb: 0, 100, 200 - strength = 15 - - glass_icon_state = "ginvodkaglass" - glass_name = "glass of vodka" - glass_desc = "The glass contain wodka. Xynta." - glass_center_of_mass = list("x"=16, "y"=12) - -/datum/reagent/ethanol/vodka/affect_ingest(var/mob/living/carbon/M, var/alien, var/removed, var/location) - ..() - M.radiation = max(M.radiation - 1 * removed, 0) - -/datum/reagent/ethanol/whiskey - name = "Whiskey" - id = "whiskey" - description = "A superb and well-aged single-malt whiskey. Damn." - color = "#664300" - strength = 25 - - glass_icon_state = "whiskeyglass" - glass_name = "glass of whiskey" - glass_desc = "The silky, smokey whiskey goodness inside the glass makes the drink look very classy." - glass_center_of_mass = list("x"=16, "y"=12) - -/datum/reagent/ethanol/wine - name = "Wine" - id = "wine" - description = "An premium alchoholic beverage made from distilled grape juice." - color = "#7E4043" // rgb: 126, 64, 67 - strength = 15 - - glass_icon_state = "wineglass" - glass_name = "glass of wine" - glass_desc = "A very classy looking drink." - glass_center_of_mass = list("x"=15, "y"=7) - -// Cocktails - -/datum/reagent/ethanol/acid_spit - name = "Acid Spit" - id = "acidspit" - description = "A drink for the daring, can be deadly if incorrectly prepared!" - reagent_state = LIQUID - color = "#365000" - strength = 30 - - glass_icon_state = "acidspitglass" - glass_name = "glass of Acid Spit" - glass_desc = "A drink from Nanotrasen. Made from live aliens." - glass_center_of_mass = list("x"=16, "y"=7) - -/datum/reagent/ethanol/alliescocktail - name = "Allies Cocktail" - id = "alliescocktail" - description = "A drink made from your allies, not as sweet as when made from your enemies." - color = "#664300" - strength = 25 - - glass_icon_state = "alliescocktail" - glass_name = "glass of Allies cocktail" - glass_desc = "A drink made from your allies." - glass_center_of_mass = list("x"=17, "y"=8) - -/datum/reagent/ethanol/aloe - name = "Aloe" - id = "aloe" - description = "So very, very, very good." - color = "#664300" - strength = 15 - - glass_icon_state = "aloe" - glass_name = "glass of Aloe" - glass_desc = "Very, very, very good." - glass_center_of_mass = list("x"=17, "y"=8) - -/datum/reagent/ethanol/amasec - name = "Amasec" - id = "amasec" - description = "Official drink of the NanoTrasen Gun-Club!" - reagent_state = LIQUID - color = "#664300" - strength = 25 - - glass_icon_state = "amasecglass" - glass_name = "glass of Amasec" - glass_desc = "Always handy before COMBAT!!!" - glass_center_of_mass = list("x"=16, "y"=9) - -/datum/reagent/ethanol/andalusia - name = "Andalusia" - id = "andalusia" - description = "A nice, strangely named drink." - color = "#664300" - strength = 15 - - glass_icon_state = "andalusia" - glass_name = "glass of Andalusia" - glass_desc = "A nice, strange named drink." - glass_center_of_mass = list("x"=16, "y"=9) - -/datum/reagent/ethanol/antifreeze - name = "Anti-freeze" - id = "antifreeze" - description = "Ultimate refreshment." - color = "#664300" - strength = 12 - adj_temp = 20 - targ_temp = 330 - - glass_icon_state = "antifreeze" - glass_name = "glass of Anti-freeze" - glass_desc = "The ultimate refreshment." - glass_center_of_mass = list("x"=16, "y"=8) - -/datum/reagent/ethanol/atomicbomb - name = "Atomic Bomb" - id = "atomicbomb" - description = "Nuclear proliferation never tasted so good." - reagent_state = LIQUID - color = "#666300" - strength = 10 - druggy = 50 - - glass_icon_state = "atomicbombglass" - glass_name = "glass of Atomic Bomb" - glass_desc = "Nanotrasen cannot take legal responsibility for your actions after imbibing." - glass_center_of_mass = list("x"=15, "y"=7) - -/datum/reagent/ethanol/b52 - name = "B-52" - id = "b52" - description = "Coffee, Irish Cream, and cognac. You will get bombed." - color = "#664300" - strength = 12 - - glass_icon_state = "b52glass" - glass_name = "glass of B-52" - glass_desc = "Kahlua, Irish cream, and congac. You will get bombed." - -/datum/reagent/ethanol/bahama_mama - name = "Bahama mama" - id = "bahama_mama" - description = "Tropical cocktail." - color = "#FF7F3B" - strength = 25 - - glass_icon_state = "bahama_mama" - glass_name = "glass of Bahama Mama" - glass_desc = "Tropical cocktail" - glass_center_of_mass = list("x"=16, "y"=5) - -/datum/reagent/ethanol/bananahonk - name = "Banana Mama" - id = "bananahonk" - description = "A drink from Clown Heaven." - nutriment_factor = 1 - color = "#FFFF91" - strength = 12 - - glass_icon_state = "bananahonkglass" - glass_name = "glass of Banana Honk" - glass_desc = "A drink from Banana Heaven." - glass_center_of_mass = list("x"=16, "y"=8) - -/datum/reagent/ethanol/barefoot - name = "Barefoot" - id = "barefoot" - description = "Barefoot and pregnant" - color = "#664300" - strength = 30 - - glass_icon_state = "b&p" - glass_name = "glass of Barefoot" - glass_desc = "Barefoot and pregnant" - glass_center_of_mass = list("x"=17, "y"=8) - -/datum/reagent/ethanol/beepsky_smash - name = "Beepsky Smash" - id = "beepskysmash" - description = "Deny drinking this and prepare for THE LAW." - reagent_state = LIQUID - color = "#664300" - strength = 12 - - glass_icon_state = "beepskysmashglass" - glass_name = "Beepsky Smash" - glass_desc = "Heavy, hot and strong. Just like the Iron fist of the LAW." - glass_center_of_mass = list("x"=18, "y"=10) - -/datum/reagent/ethanol/beepsky_smash/affect_ingest(var/mob/living/carbon/M, var/alien, var/removed, var/location) - ..() - M.Stun(2) - -/datum/reagent/ethanol/bilk - name = "Bilk" - id = "bilk" - description = "This appears to be beer mixed with milk. Disgusting." - color = "#895C4C" - strength = 50 - nutriment_factor = 2 - - glass_icon_state = "glass_brown" - glass_name = "glass of bilk" - glass_desc = "A brew of milk and beer. For those alcoholics who fear osteoporosis." - -/datum/reagent/ethanol/black_russian - name = "Black Russian" - id = "blackrussian" - description = "For the lactose-intolerant. Still as classy as a White Russian." - color = "#360000" - strength = 15 - - glass_icon_state = "blackrussianglass" - glass_name = "glass of Black Russian" - glass_desc = "For the lactose-intolerant. Still as classy as a White Russian." - glass_center_of_mass = list("x"=16, "y"=9) - -/datum/reagent/ethanol/bloody_mary - name = "Bloody Mary" - id = "bloodymary" - description = "A strange yet pleasurable mixture made of vodka, tomato and lime juice. Or at least you THINK the red stuff is tomato juice." - color = "#664300" - strength = 15 - - glass_icon_state = "bloodymaryglass" - glass_name = "glass of Bloody Mary" - glass_desc = "Tomato juice, mixed with Vodka and a lil' bit of lime. Tastes like liquid murder." - -/datum/reagent/ethanol/booger - name = "Booger" - id = "booger" - description = "Ewww..." - color = "#8CFF8C" - strength = 30 - - glass_icon_state = "booger" - glass_name = "glass of Booger" - glass_desc = "Ewww..." - -/datum/reagent/ethanol/brave_bull - name = "Brave Bull" - id = "bravebull" - description = "It's just as effective as Dutch-Courage!" - color = "#664300" - strength = 15 - - glass_icon_state = "bravebullglass" - glass_name = "glass of Brave Bull" - glass_desc = "Tequilla and coffee liquor, brought together in a mouthwatering mixture. Drink up." - glass_center_of_mass = list("x"=15, "y"=8) - -/datum/reagent/ethanol/changelingsting - name = "Changeling Sting" - id = "changelingsting" - description = "You take a tiny sip and feel a burning sensation..." - color = "#2E6671" - strength = 10 - - glass_icon_state = "changelingsting" - glass_name = "glass of Changeling Sting" - glass_desc = "A stingy drink." - -/datum/reagent/ethanol/classicmartini - name = "Classic Martini" - id = "classicmartini" - description = "Vermouth with Gin. Not quite how 007 enjoyed it, but still delicious." - color = "#664300" - strength = 25 - - glass_icon_state = "martiniglass" - glass_name = "glass of classic martini" - glass_desc = "Damn, the bartender even stirred it, not shook it." - glass_center_of_mass = list("x"=17, "y"=8) - -/datum/reagent/ethanol/cuba_libre - name = "Cuba Libre" - id = "cubalibre" - description = "Rum, mixed with cola. Viva la revolucion." - color = "#3E1B00" - strength = 30 - - glass_icon_state = "cubalibreglass" - glass_name = "glass of Cuba Libre" - glass_desc = "A classic mix of rum and cola." - glass_center_of_mass = list("x"=16, "y"=8) - -/datum/reagent/ethanol/demonsblood - name = "Demons Blood" - id = "demonsblood" - description = "AHHHH!!!!" - color = "#820000" - strength = 15 - - glass_icon_state = "demonsblood" - glass_name = "glass of Demons' Blood" - glass_desc = "Just looking at this thing makes the hair at the back of your neck stand up." - glass_center_of_mass = list("x"=16, "y"=2) - -/datum/reagent/ethanol/devilskiss - name = "Devils Kiss" - id = "devilskiss" - description = "Creepy time!" - color = "#A68310" - strength = 15 - - glass_icon_state = "devilskiss" - glass_name = "glass of Devil's Kiss" - glass_desc = "Creepy time!" - glass_center_of_mass = list("x"=16, "y"=8) - -/datum/reagent/ethanol/driestmartini - name = "Driest Martini" - id = "driestmartini" - description = "Only for the experienced. You think you see sand floating in the glass." - nutriment_factor = 1 - color = "#2E6671" - strength = 12 - - glass_icon_state = "driestmartiniglass" - glass_name = "glass of Driest Martini" - glass_desc = "Only for the experienced. You think you see sand floating in the glass." - glass_center_of_mass = list("x"=17, "y"=8) - -/datum/reagent/ethanol/ginfizz - name = "Gin Fizz" - id = "ginfizz" - description = "Refreshingly lemony, deliciously dry." - color = "#664300" - strength = 30 - - glass_icon_state = "ginfizzglass" - glass_name = "glass of gin fizz" - glass_desc = "Refreshingly lemony, deliciously dry." - glass_center_of_mass = list("x"=16, "y"=7) - -/datum/reagent/ethanol/grog - name = "Grog" - id = "grog" - description = "Watered down rum, NanoTrasen approves!" - reagent_state = LIQUID - color = "#664300" - strength = 100 - - glass_icon_state = "grogglass" - glass_name = "glass of grog" - glass_desc = "A fine and cepa drink for Space." - -/datum/reagent/ethanol/erikasurprise - name = "Erika Surprise" - id = "erikasurprise" - description = "The surprise is, it's green!" - color = "#2E6671" - strength = 15 - - glass_icon_state = "erikasurprise" - glass_name = "glass of Erika Surprise" - glass_desc = "The surprise is, it's green!" - glass_center_of_mass = list("x"=16, "y"=9) - -/datum/reagent/ethanol/gargle_blaster - name = "Pan-Galactic Gargle Blaster" - id = "gargleblaster" - description = "Whoah, this stuff looks volatile!" - reagent_state = LIQUID - color = "#664300" - strength = 10 - - glass_icon_state = "gargleblasterglass" - glass_name = "glass of Pan-Galactic Gargle Blaster" - glass_desc = "Does... does this mean that Arthur and Ford are on the station? Oh joy." - glass_center_of_mass = list("x"=17, "y"=6) - -/datum/reagent/ethanol/gintonic - name = "Gin and Tonic" - id = "gintonic" - description = "An all time classic, mild cocktail." - color = "#664300" - strength = 50 - - glass_icon_state = "gintonicglass" - glass_name = "glass of gin and tonic" - glass_desc = "A mild but still great cocktail. Drink up, like a true Englishman." - glass_center_of_mass = list("x"=16, "y"=7) - -/datum/reagent/ethanol/goldschlager - name = "Goldschlager" - id = "goldschlager" - description = "100 proof cinnamon schnapps, made for alcoholic teen girls on spring break." - color = "#664300" - strength = 15 - - glass_icon_state = "ginvodkaglass" - glass_name = "glass of Goldschlager" - glass_desc = "100 proof that teen girls will drink anything with gold in it." - glass_center_of_mass = list("x"=16, "y"=12) - -/datum/reagent/ethanol/hippies_delight - name = "Hippies' Delight" - id = "hippiesdelight" - description = "You just don't get it maaaan." - reagent_state = LIQUID - color = "#664300" - strength = 15 - druggy = 50 - - glass_icon_state = "hippiesdelightglass" - glass_name = "glass of Hippie's Delight" - glass_desc = "A drink enjoyed by people during the 1960's." - glass_center_of_mass = list("x"=16, "y"=8) - -/datum/reagent/ethanol/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?" - color = "#664300" - strength = 25 - toxicity = 2 - - glass_icon_state = "glass_brown2" - glass_name = "glass of Hooch" - glass_desc = "You've really hit rock bottom now... your liver packed its bags and left last night." - -/datum/reagent/ethanol/iced_beer - name = "Iced Beer" - id = "iced_beer" - description = "A beer which is so cold the air around it freezes." - color = "#664300" - strength = 50 - adj_temp = -20 - targ_temp = 270 - - glass_icon_state = "iced_beerglass" - glass_name = "glass of iced beer" - glass_desc = "A beer so frosty, the air around it freezes." - glass_center_of_mass = list("x"=16, "y"=7) - -/datum/reagent/ethanol/irishcarbomb - name = "Irish Car Bomb" - id = "irishcarbomb" - description = "Mmm, tastes like chocolate cake..." - color = "#2E6671" - strength = 15 - - glass_icon_state = "irishcarbomb" - glass_name = "glass of Irish Car Bomb" - glass_desc = "An irish car bomb." - glass_center_of_mass = list("x"=16, "y"=8) - -/datum/reagent/ethanol/irishcoffee - name = "Irish Coffee" - id = "irishcoffee" - description = "Coffee, and alcohol. More fun than a Mimosa to drink in the morning." - color = "#664300" - strength = 15 - - glass_icon_state = "irishcoffeeglass" - glass_name = "glass of Irish coffee" - glass_desc = "Coffee and alcohol. More fun than a Mimosa to drink in the morning." - glass_center_of_mass = list("x"=15, "y"=10) - -/datum/reagent/ethanol/irish_cream - name = "Irish Cream" - id = "irishcream" - description = "Whiskey-imbued cream, what else would you expect from the Irish." - color = "#664300" - strength = 25 - - glass_icon_state = "irishcreamglass" - glass_name = "glass of Irish cream" - glass_desc = "It's cream, mixed with whiskey. What else would you expect from the Irish?" - glass_center_of_mass = list("x"=16, "y"=9) - -/datum/reagent/ethanol/longislandicedtea - name = "Long Island Iced Tea" - id = "longislandicedtea" - description = "The liquor cabinet, brought together in a delicious mix. Intended for middle-aged alcoholic women only." - color = "#664300" - strength = 12 - - glass_icon_state = "longislandicedteaglass" - glass_name = "glass of Long Island iced tea" - glass_desc = "The liquor cabinet, brought together in a delicious mix. Intended for middle-aged alcoholic women only." - glass_center_of_mass = list("x"=16, "y"=8) - -/datum/reagent/ethanol/manhattan - name = "Manhattan" - id = "manhattan" - description = "The Detective's undercover drink of choice. He never could stomach gin..." - color = "#664300" - strength = 15 - - glass_icon_state = "manhattanglass" - glass_name = "glass of Manhattan" - glass_desc = "The Detective's undercover drink of choice. He never could stomach gin..." - glass_center_of_mass = list("x"=17, "y"=8) - -/datum/reagent/ethanol/manhattan_proj - name = "Manhattan Project" - id = "manhattan_proj" - description = "A scientist's drink of choice, for pondering ways to blow up the station." - color = "#664300" - strength = 10 - druggy = 30 - - glass_icon_state = "proj_manhattanglass" - glass_name = "glass of Manhattan Project" - glass_desc = "A scienitst drink of choice, for thinking how to blow up the station." - glass_center_of_mass = list("x"=17, "y"=8) - -/datum/reagent/ethanol/manly_dorf - name = "The Manly Dorf" - id = "manlydorf" - description = "Beer and Ale, brought together in a delicious mix. Intended for true men only." - color = "#664300" - strength = 25 - - glass_icon_state = "manlydorfglass" - glass_name = "glass of The Manly Dorf" - glass_desc = "A manly concotion made from Ale and Beer. Intended for true men only." - -/datum/reagent/ethanol/margarita - name = "Margarita" - id = "margarita" - description = "On the rocks with salt on the rim. Arriba~!" - color = "#8CFF8C" - strength = 15 - - glass_icon_state = "margaritaglass" - glass_name = "glass of margarita" - glass_desc = "On the rocks with salt on the rim. Arriba~!" - glass_center_of_mass = list("x"=16, "y"=8) - -/datum/reagent/ethanol/mead - name = "Mead" - id = "mead" - description = "A Viking's drink, though a cheap one." - reagent_state = LIQUID - color = "#664300" - strength = 30 - nutriment_factor = 1 - - glass_icon_state = "meadglass" - glass_name = "glass of mead" - glass_desc = "A Viking's beverage, though a cheap one." - glass_center_of_mass = list("x"=17, "y"=10) - -/datum/reagent/ethanol/moonshine - name = "Moonshine" - id = "moonshine" - description = "You've really hit rock bottom now... your liver packed its bags and left last night." - color = "#664300" - strength = 12 - - glass_icon_state = "glass_clear" - glass_name = "glass of moonshine" - glass_desc = "You've really hit rock bottom now... your liver packed its bags and left last night." - -/datum/reagent/ethanol/neurotoxin - name = "Neurotoxin" - id = "neurotoxin" - description = "A strong neurotoxin that puts the subject into a death-like state." - reagent_state = LIQUID - color = "#2E2E61" - strength = 10 - - glass_icon_state = "neurotoxinglass" - glass_name = "glass of Neurotoxin" - glass_desc = "A drink that is guaranteed to knock you silly." - glass_center_of_mass = list("x"=16, "y"=8) - -/datum/reagent/ethanol/neurotoxin/affect_ingest(var/mob/living/carbon/M, var/alien, var/removed, var/location) - ..() - M.Weaken(3) - -/datum/reagent/ethanol/patron - name = "Patron" - id = "patron" - description = "Tequila with silver in it, a favorite of alcoholic women in the club scene." - color = "#585840" - strength = 30 - - glass_icon_state = "patronglass" - glass_name = "glass of Patron" - glass_desc = "Drinking patron in the bar, with all the subpar ladies." - glass_center_of_mass = list("x"=7, "y"=8) - -/datum/reagent/ethanol/pwine - name = "Poison Wine" - id = "pwine" - description = "Is this even wine? Toxic! Hallucinogenic! Probably consumed in boatloads by your superiors!" - color = "#000000" - strength = 10 - druggy = 50 - halluci = 10 - - glass_icon_state = "pwineglass" - glass_name = "glass of ???" - glass_desc = "A black ichor with an oily purple sheer on top. Are you sure you should drink this?" - glass_center_of_mass = list("x"=16, "y"=5) - -/datum/reagent/ethanol/pwine/affect_ingest(var/mob/living/carbon/M, var/alien, var/removed, var/location) - ..() - if(dose > 30) - M.adjustToxLoss(2 * removed) - if(dose > 60 && ishuman(M) && prob(5)) - var/mob/living/carbon/human/H = M - var/obj/item/organ/heart/L = H.internal_organs_by_name["heart"] - if (L && istype(L)) - if(dose < 120) - L.take_damage(10 * removed, 0) - else - L.take_damage(100, 0) - -/datum/reagent/ethanol/red_mead - name = "Red Mead" - id = "red_mead" - description = "The true Viking's drink! Even though it has a strange red color." - color = "#C73C00" - strength = 30 - - glass_icon_state = "red_meadglass" - glass_name = "glass of red mead" - glass_desc = "A true Viking's beverage, though its color is strange." - glass_center_of_mass = list("x"=17, "y"=10) - -/datum/reagent/ethanol/sbiten - name = "Sbiten" - id = "sbiten" - description = "A spicy Vodka! Might be a little hot for the little guys!" - color = "#664300" - strength = 15 - adj_temp = 50 - targ_temp = 360 - - glass_icon_state = "sbitenglass" - glass_name = "glass of Sbiten" - glass_desc = "A spicy mix of Vodka and Spice. Very hot." - glass_center_of_mass = list("x"=17, "y"=8) - -/datum/reagent/ethanol/screwdrivercocktail - name = "Screwdriver" - id = "screwdrivercocktail" - description = "Vodka, mixed with plain ol' orange juice. The result is surprisingly delicious." - color = "#A68310" - strength = 15 - - glass_icon_state = "screwdriverglass" - glass_name = "glass of Screwdriver" - glass_desc = "A simple, yet superb mixture of Vodka and orange juice. Just the thing for the tired engineer." - glass_center_of_mass = list("x"=15, "y"=10) - -/datum/reagent/ethanol/silencer - name = "Silencer" - id = "silencer" - description = "A drink from Mime Heaven." - nutriment_factor = 1 - color = "#664300" - strength = 12 - - glass_icon_state = "silencerglass" - glass_name = "glass of Silencer" - glass_desc = "A drink from mime Heaven." - glass_center_of_mass = list("x"=16, "y"=9) - -/datum/reagent/ethanol/singulo - name = "Singulo" - id = "singulo" - description = "A blue-space beverage!" - color = "#2E6671" - strength = 10 - - glass_icon_state = "singulo" - glass_name = "glass of Singulo" - glass_desc = "A blue-space beverage." - glass_center_of_mass = list("x"=17, "y"=4) - -/datum/reagent/ethanol/snowwhite - name = "Snow White" - id = "snowwhite" - description = "A cold refreshment" - color = "#FFFFFF" - strength = 30 - - glass_icon_state = "snowwhite" - glass_name = "glass of Snow White" - glass_desc = "A cold refreshment." - glass_center_of_mass = list("x"=16, "y"=8) - -/datum/reagent/ethanol/suidream - name = "Sui Dream" - id = "suidream" - description = "Comprised of: White soda, blue curacao, melon liquor." - color = "#00A86B" - strength = 100 - - glass_icon_state = "sdreamglass" - glass_name = "glass of Sui Dream" - glass_desc = "A froofy, fruity, and sweet mixed drink. Understanding the name only brings shame." - glass_center_of_mass = list("x"=16, "y"=5) - -/datum/reagent/ethanol/syndicatebomb - name = "Syndicate Bomb" - id = "syndicatebomb" - description = "Tastes like terrorism!" - color = "#2E6671" - strength = 10 - - glass_icon_state = "syndicatebomb" - glass_name = "glass of Syndicate Bomb" - glass_desc = "Tastes like terrorism!" - glass_center_of_mass = list("x"=16, "y"=4) - -/datum/reagent/ethanol/tequilla_sunrise - name = "Tequila Sunrise" - id = "tequillasunrise" - description = "Tequila and orange juice. Much like a Screwdriver, only Mexican~" - color = "#FFE48C" - strength = 25 - - glass_icon_state = "tequillasunriseglass" - glass_name = "glass of Tequilla Sunrise" - glass_desc = "Oh great, now you feel nostalgic about sunrises back on Terra..." - -/datum/reagent/ethanol/threemileisland - name = "Three Mile Island Iced Tea" - id = "threemileisland" - description = "Made for a woman, strong enough for a man." - color = "#666340" - strength = 10 - druggy = 50 - - glass_icon_state = "threemileislandglass" - glass_name = "glass of Three Mile Island iced tea" - glass_desc = "A glass of this is sure to prevent a meltdown." - glass_center_of_mass = list("x"=16, "y"=2) - -/datum/reagent/ethanol/toxins_special - name = "Toxins Special" - id = "phoronspecial" - description = "This thing is ON FIRE! CALL THE DAMN SHUTTLE!" - reagent_state = LIQUID - color = "#664300" - strength = 10 - adj_temp = 15 - targ_temp = 330 - - glass_icon_state = "toxinsspecialglass" - glass_name = "glass of Toxins Special" - glass_desc = "Whoah, this thing is on FIRE" - -/datum/reagent/ethanol/vodkamartini - name = "Vodka Martini" - id = "vodkamartini" - description = "Vodka with Gin. Not quite how 007 enjoyed it, but still delicious." - color = "#664300" - strength = 12 - - glass_icon_state = "martiniglass" - glass_name = "glass of vodka martini" - glass_desc ="A bastardisation of the classic martini. Still great." - glass_center_of_mass = list("x"=17, "y"=8) - -/datum/reagent/ethanol/vodkatonic - name = "Vodka and Tonic" - id = "vodkatonic" - description = "For when a gin and tonic isn't russian enough." - color = "#0064C8" // rgb: 0, 100, 200 - strength = 15 - - glass_icon_state = "vodkatonicglass" - glass_name = "glass of vodka and tonic" - glass_desc = "For when a gin and tonic isn't Russian enough." - glass_center_of_mass = list("x"=16, "y"=7) - -/datum/reagent/ethanol/white_russian - name = "White Russian" - id = "whiterussian" - description = "That's just, like, your opinion, man..." - color = "#A68340" - strength = 15 - - glass_icon_state = "whiterussianglass" - glass_name = "glass of White Russian" - glass_desc = "A very nice looking drink. But that's just, like, your opinion, man." - glass_center_of_mass = list("x"=16, "y"=9) - -/datum/reagent/ethanol/whiskey_cola - name = "Whiskey Cola" - id = "whiskeycola" - description = "Whiskey, mixed with cola. Surprisingly refreshing." - color = "#3E1B00" - strength = 25 - - glass_icon_state = "whiskeycolaglass" - glass_name = "glass of whiskey cola" - glass_desc = "An innocent-looking mixture of cola and Whiskey. Delicious." - glass_center_of_mass = list("x"=16, "y"=9) - -/datum/reagent/ethanol/whiskeysoda - name = "Whiskey Soda" - id = "whiskeysoda" - description = "For the more refined griffon." - color = "#664300" - strength = 15 - - glass_icon_state = "whiskeysodaglass2" - glass_name = "glass of whiskey soda" - glass_desc = "Ultimate refreshment." - glass_center_of_mass = list("x"=16, "y"=9) - -/datum/reagent/ethanol/specialwhiskey // I have no idea what this is and where it comes from - name = "Special Blend Whiskey" - id = "specialwhiskey" - description = "Just when you thought regular station whiskey was good... This silky, amber goodness has to come along and ruin everything." - color = "#664300" - strength = 25 - - glass_icon_state = "whiskeyglass" - glass_name = "glass of special blend whiskey" - glass_desc = "Just when you thought regular station whiskey was good... This silky, amber goodness has to come along and ruin everything." - glass_center_of_mass = list("x"=16, "y"=12) - -/* Super secret chemicals with randomized recipes */ - -/datum/reagent/rezadone - name = "Rezadone" - id = "rezadone" - description = "A powder with almost magical properties, this substance can effectively treat genetic damage in humanoids, though excessive consumption has side effects." - reagent_state = SOLID - color = "#669900" - overdose = REAGENTS_OVERDOSE - scannable = 1 - -/datum/reagent/rezadone/affect_blood(var/mob/living/carbon/M, var/alien, var/removed, var/location) - M.adjustCloneLoss(-20 * removed) - M.adjustOxyLoss(-2 * removed) - M.heal_organ_damage(20 * removed, 20 * removed) - M.adjustToxLoss(-20 * removed) - if(dose > 3) - M.status_flags &= ~DISFIGURED - if(dose > 10) - M.make_dizzy(5) - M.make_jittery(5) - -/* Paint and crayons */ - -/datum/reagent/crayon_dust - name = "Crayon dust" - id = "crayon_dust" - description = "Intensely coloured powder obtained by grinding crayons." - reagent_state = LIQUID - color = "#888888" - overdose = 5 - -/datum/reagent/crayon_dust/red - name = "Red crayon dust" - id = "crayon_dust_red" - color = "#FE191A" - -/datum/reagent/crayon_dust/orange - name = "Orange crayon dust" - id = "crayon_dust_orange" - color = "#FFBE4F" - -/datum/reagent/crayon_dust/yellow - name = "Yellow crayon dust" - id = "crayon_dust_yellow" - color = "#FDFE7D" - -/datum/reagent/crayon_dust/green - name = "Green crayon dust" - id = "crayon_dust_green" - color = "#18A31A" - -/datum/reagent/crayon_dust/blue - name = "Blue crayon dust" - id = "crayon_dust_blue" - color = "#247CFF" - -/datum/reagent/crayon_dust/purple - name = "Purple crayon dust" - id = "crayon_dust_purple" - color = "#CC0099" - -/datum/reagent/crayon_dust/grey //Mime - name = "Grey crayon dust" - id = "crayon_dust_grey" - color = "#808080" - -/datum/reagent/crayon_dust/brown //Rainbow - name = "Brown crayon dust" - id = "crayon_dust_brown" - color = "#846F35" - -/datum/reagent/paint - name = "Paint" - id = "paint" - description = "This paint will stick to almost any object." - reagent_state = LIQUID - color = "#808080" - overdose = REAGENTS_OVERDOSE * 0.5 - color_weight = 20 - -/datum/reagent/paint/touch_turf(var/turf/T) - if(istype(T) && !istype(T, /turf/space)) - T.color = color - -/datum/reagent/paint/touch_obj(var/obj/O) - if(istype(O)) - O.color = color - -/datum/reagent/paint/touch_mob(var/mob/M) - if(istype(M) && !istype(M, /mob/dead)) //painting ghosts: not allowed - M.color = color - -/datum/reagent/paint/affect_touch(var/mob/living/carbon/M, var/alien, var/removed, var/location) - M.color = color - -/datum/reagent/paint/get_data() - return color - -/datum/reagent/paint/initialize_data(var/newdata) - color = newdata - return - -/datum/reagent/paint/mix_data(var/newdata, var/newamount) - var/list/colors = list(0, 0, 0, 0) - var/tot_w = 0 - - var/hex1 = uppertext(color) - var/hex2 = uppertext(newdata) - if(length(hex1) == 7) - hex1 += "FF" - if(length(hex2) == 7) - hex2 += "FF" - if(length(hex1) != 9 || length(hex2) != 9) - return - colors[1] += hex2num(copytext(hex1, 2, 4)) * volume - colors[2] += hex2num(copytext(hex1, 4, 6)) * volume - colors[3] += hex2num(copytext(hex1, 6, 8)) * volume - colors[4] += hex2num(copytext(hex1, 8, 10)) * volume - tot_w += volume - colors[1] += hex2num(copytext(hex2, 2, 4)) * newamount - colors[2] += hex2num(copytext(hex2, 4, 6)) * newamount - colors[3] += hex2num(copytext(hex2, 6, 8)) * newamount - colors[4] += hex2num(copytext(hex2, 8, 10)) * newamount - tot_w += newamount - - color = rgb(colors[1] / tot_w, colors[2] / tot_w, colors[3] / tot_w, colors[4] / tot_w) - return - -/* Things that didn't fit anywhere else */ - -/datum/reagent/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" - affects_dead = 1 //This can even heal dead people. - - glass_icon_state = "golden_cup" - glass_name = "golden cup" - glass_desc = "It's magic. We don't have to explain it." - -/datum/reagent/adminordrazine/affect_touch(var/mob/living/carbon/M, var/alien, var/removed, var/location) - affect_blood(M, alien, removed) - -/datum/reagent/adminordrazine/affect_blood(var/mob/living/carbon/M, var/alien, var/removed, var/location) - M.setCloneLoss(0) - M.setOxyLoss(0) - M.radiation = 0 - M.heal_organ_damage(5,5) - M.adjustToxLoss(-5) - M.hallucination = 0 - M.setBrainLoss(0) - M.disabilities = 0 - M.sdisabilities = 0 - M.eye_blurry = 0 - M.eye_blind = 0 - 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() - -/datum/reagent/gold - name = "Gold" - id = "gold" - description = "Gold is a dense, soft, shiny metal and the most malleable and ductile metal known." - reagent_state = SOLID - color = "#F7C430" - -/datum/reagent/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" - -/datum/reagent/uranium - name ="Uranium" - id = "uranium" - description = "A silvery-white metallic chemical element in the actinide series, weakly radioactive." - reagent_state = SOLID - color = "#B8B8C0" - -/datum/reagent/uranium/affect_touch(var/mob/living/carbon/M, var/alien, var/removed, var/location) - affect_ingest(M, alien, removed) - -/datum/reagent/uranium/affect_blood(var/mob/living/carbon/M, var/alien, var/removed, var/location) - M.apply_effect(5 * removed, IRRADIATE, 0) - -/datum/reagent/uranium/touch_turf(var/turf/T) - if(volume >= 3) - if(!istype(T, /turf/space)) - var/obj/effect/decal/cleanable/greenglow/glow = locate(/obj/effect/decal/cleanable/greenglow, T) - if(!glow) - new /obj/effect/decal/cleanable/greenglow(T) - return - -/datum/reagent/adrenaline - name = "Adrenaline" - id = "adrenaline" - description = "Adrenaline is a hormone used as a drug to treat cardiac arrest and other cardiac dysrhythmias resulting in diminished or absent cardiac output." - reagent_state = LIQUID - color = "#C8A5DC" - -/datum/reagent/adrenaline/affect_blood(var/mob/living/carbon/M, var/alien, var/removed, var/location) - if(alien == IS_DIONA) - return - M.SetParalysis(0) - M.SetWeakened(0) - M.adjustToxLoss(rand(3)) - -/datum/reagent/water/holywater - name = "Holy Water" - id = "holywater" - description = "An ashen-obsidian-water mix, this solution will alter certain sections of the brain's rationality." - color = "#E0E8EF" - - glass_icon_state = "glass_clear" - glass_name = "glass of holy water" - glass_desc = "An ashen-obsidian-water mix, this solution will alter certain sections of the brain's rationality." - -/datum/reagent/water/holywater/affect_ingest(var/mob/living/carbon/M, var/alien, var/removed, var/location) - ..() - if(ishuman(M)) // Any location - if(M.mind && cult.is_antagonist(M.mind) && prob(10)) - cult.remove_antagonist(M.mind) - -/datum/reagent/ammonia - name = "Ammonia" - id = "ammonia" - description = "A caustic substance commonly used in fertilizer or household cleaners." - reagent_state = GAS - color = "#404030" - -/datum/reagent/diethylamine - name = "Diethylamine" - id = "diethylamine" - description = "A secondary amine, mildly corrosive." - reagent_state = LIQUID - color = "#604030" - -/datum/reagent/fluorosurfactant // Foam precursor - name = "Fluorosurfactant" - id = "fluorosurfactant" - description = "A perfluoronated sulfonic acid that forms a foam when mixed with water." - reagent_state = LIQUID - color = "#9E6B38" - -/datum/reagent/foaming_agent // Metal foaming agent. This is lithium hydride. Add other recipes (e.g. LiH + H2O -> LiOH + H2) eventually. - 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" - -/datum/reagent/thermite - name = "Thermite" - id = "thermite" - description = "Thermite produces an aluminothermic reaction known as a thermite reaction. Can be used to melt walls." - reagent_state = SOLID - color = "#673910" - touch_met = 50 - -/datum/reagent/thermite/touch_turf(var/turf/T) - if(volume >= 5) - if(istype(T, /turf/simulated/wall)) - var/turf/simulated/wall/W = T - W.thermite = 1 - W.overlays += image('icons/effects/effects.dmi',icon_state = "#673910") - remove_self(5) - return - -/datum/reagent/thermite/affect_touch(var/mob/living/carbon/M, var/alien, var/removed, var/location) - M.adjust_fire_stacks(removed * 0.2) - return - -/datum/reagent/thermite/affect_blood(var/mob/living/carbon/M, var/alien, var/removed, var/location) - M.adjustFireLoss(3 * removed) - -/datum/reagent/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" - touch_met = 50 - -/datum/reagent/space_cleaner/touch_obj(var/obj/O) - if(istype(O, /obj/effect/decal/cleanable)) - qdel(O) - else - O.clean_blood() - -/datum/reagent/space_cleaner/touch_turf(var/turf/T) - if(volume >= 1) - if(istype(T, /turf/simulated)) - var/turf/simulated/S = T - S.dirt = 0 - T.clean_blood() - - for(var/mob/living/carbon/slime/M in T) - M.adjustToxLoss(rand(5, 10)) - -/datum/reagent/space_cleaner/affect_touch(var/mob/living/carbon/M, var/alien, var/removed, var/location) - if(M.r_hand) - M.r_hand.clean_blood() - if(M.l_hand) - M.l_hand.clean_blood() - if(M.wear_mask) - if(M.wear_mask.clean_blood()) - M.update_inv_wear_mask(0) - if(ishuman(M)) - var/mob/living/carbon/human/H = M - 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) - else - H.clean_blood(1) - return - M.clean_blood() - -/datum/reagent/lube // TODO: spraying on borgs speeds them up - 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" - -/datum/reagent/lube/touch_turf(var/turf/simulated/T) - if(!istype(T)) - return - if(volume >= 1) - if(T.wet >= 2) - return - T.wet = 2 - spawn(800) - if(!T || !istype(T)) - return - T.wet = 0 - if(T.wet_overlay) - T.overlays -= T.wet_overlay - T.wet_overlay = null - -/datum/reagent/silicate - name = "Silicate" - id = "silicate" - description = "A compound that can be used to reinforce glass." - reagent_state = LIQUID - color = "#C7FFFF" - -/datum/reagent/silicate/touch_obj(var/obj/O) - if(istype(O, /obj/structure/window)) - var/obj/structure/window/W = O - W.apply_silicate(volume) - remove_self(volume) - return - -/datum/reagent/glycerol - name = "Glycerol" - id = "glycerol" - description = "Glycerol is a simple polyol compound. Glycerol is sweet-tasting and of low toxicity." - reagent_state = LIQUID - color = "#808080" - -/datum/reagent/nitroglycerin - name = "Nitroglycerin" - id = "nitroglycerin" - description = "Nitroglycerin is a heavy, colorless, oily, explosive liquid obtained by nitrating glycerol." - reagent_state = LIQUID - color = "#808080" - -/datum/reagent/coolant - name = "Coolant" - id = "coolant" - description = "Industrial cooling substance." - reagent_state = LIQUID - color = "#C8A5DC" - -/datum/reagent/ultraglue - name = "Ultra Glue" - id = "glue" - description = "An extremely powerful bonding agent." - color = "#FFFFCC" - -/* Removed xenoarcheology stuff - -/datum/reagent/lithiumsodiumtungstate - name = "Lithium Sodium Tungstate" - id = "lithiumsodiumtungstate" - description = "A reducing agent for geological compounds." - reagent_state = LIQUID - color = "#C0C0C0" // rgb: 192, 192, 192, darker silver - -/datum/reagent/ground_rock - name = "Ground Rock" - id = "ground_rock" - description = "A fine dust made of ground up rock." - reagent_state = SOLID - color = "#A0522D" //rgb: 160, 82, 45, brown - -/datum/reagent/density_separated_sample - name = "Density separated sample" - id = "density_separated_sample" - description = "A watery paste used in chemical analysis, there are some chunks floating in it." - reagent_state = LIQUID - color = "#DEB887" //rgb: 222, 184, 135, light brown - -/datum/reagent/analysis_sample - name = "Analysis liquid" - id = "analysis_sample" - description = "A watery paste used in chemical analysis." - reagent_state = LIQUID - color = "#F5FFFA" //rgb: 245, 255, 250, almost white - -/datum/reagent/chemical_waste - name = "Chemical Waste" - id = "chemical_waste" - description = "A viscous, toxic liquid left over from many chemical processes." - reagent_state = LIQUID - color = "#ADFF2F" //rgb: 173, 255, 47, toxic green -*/ \ No newline at end of file diff --git a/code/modules/reagents/Chemistry-Reagents/Chemistry-Reagents-Core.dm b/code/modules/reagents/Chemistry-Reagents/Chemistry-Reagents-Core.dm new file mode 100644 index 0000000000..cd3da656a9 --- /dev/null +++ b/code/modules/reagents/Chemistry-Reagents/Chemistry-Reagents-Core.dm @@ -0,0 +1,198 @@ +/datum/reagent/blood + data = new/list("donor" = null, "viruses" = null, "species" = "Human", "blood_DNA" = null, "blood_type" = null, "blood_colour" = "#A10808", "resistances" = null, "trace_chem" = null, "antibodies" = list()) + name = "Blood" + id = "blood" + reagent_state = LIQUID + metabolism = REM * 5 + color = "#C80000" + + glass_icon_state = "glass_red" + glass_name = "glass of tomato juice" + glass_desc = "Are you sure this is tomato juice?" + +/datum/reagent/blood/initialize_data(var/newdata) + ..() + if(data && data["blood_colour"]) + color = data["blood_colour"] + return + +/datum/reagent/blood/get_data() // Just in case you have a reagent that handles data differently. + var/t = data.Copy() + if(t["virus2"]) + var/list/v = t["virus2"] + t["virus2"] = v.Copy() + return t + +/datum/reagent/blood/mix_data(var/newdata, var/newamount) // You have a reagent with data, and new reagent with its own data get added, how do you deal with that? + if(data["viruses"] || newdata["viruses"]) + var/list/mix1 = data["viruses"] + var/list/mix2 = newdata["viruses"] + var/list/to_mix = list() // Stop issues with the list changing during mixing. + for(var/datum/disease/advance/AD in mix1) + to_mix += AD + for(var/datum/disease/advance/AD in mix2) + to_mix += AD + var/datum/disease/advance/AD = Advance_Mix(to_mix) + if(AD) + var/list/preserve = list(AD) + for(var/D in data["viruses"]) + if(!istype(D, /datum/disease/advance)) + preserve += D + data["viruses"] = preserve + +/datum/reagent/blood/touch_turf(var/turf/simulated/T) + if(!istype(T) || volume < 3) + return + if(!data["donor"] || istype(data["donor"], /mob/living/carbon/human)) + blood_splatter(T, src, 1) + else if(istype(data["donor"], /mob/living/carbon/alien)) + var/obj/effect/decal/cleanable/blood/B = blood_splatter(T, src, 1) + if(B) + B.blood_DNA["UNKNOWN DNA STRUCTURE"] = "X*" + +/datum/reagent/blood/affect_ingest(var/mob/living/carbon/M, var/alien, var/removed, var/location) + if(dose > 5) + M.adjustToxLoss(removed) + if(dose > 15) + M.adjustToxLoss(removed) + +/datum/reagent/blood/affect_touch(var/mob/living/carbon/M, var/alien, var/removed, var/location) + if(data && data["viruses"]) + for(var/datum/disease/D in data["viruses"]) + if(D.spread_type == SPECIAL || D.spread_type == NON_CONTAGIOUS) + continue + M.contract_disease(D) + if(data && data["virus2"]) + var/list/vlist = data["virus2"] + if(vlist.len) + for(var/ID in vlist) + var/datum/disease2/disease/V = vlist[ID] + infect_virus2(M, V.getcopy()) + if(data && data["antibodies"]) + M.antibodies |= data["antibodies"] + +/datum/reagent/blood/affect_blood(var/mob/living/carbon/M, var/alien, var/removed, var/location) + M.inject_blood(src, volume) + remove_self(volume) + +/datum/reagent/vaccine + name = "Vaccine" + id = "vaccine" + reagent_state = LIQUID + color = "#C81040" + +/datum/reagent/vaccine/affect_blood(var/mob/living/carbon/M, var/alien, var/removed, var/location) + if(data) + for(var/datum/disease/D in M.viruses) + if(istype(D, /datum/disease/advance)) + var/datum/disease/advance/A = D + if(A.GetDiseaseID() == data) + D.cure() + else + if(D.type == data) + D.cure() + + M.resistances += data + return + +#define WATER_LATENT_HEAT 19000 // How much heat is removed when applied to a hot turf, in J/unit (19000 makes 120 u of water roughly equivalent to 4L) +/datum/reagent/water + name = "Water" + id = "water" + description = "A ubiquitous chemical substance that is composed of hydrogen and oxygen." + reagent_state = LIQUID + color = "#0064C877" + metabolism = REM * 10 + + glass_icon_state = "glass_clear" + glass_name = "glass of water" + glass_desc = "The father of all refreshments." + +/datum/reagent/water/touch_turf(var/turf/simulated/T) + if(!istype(T)) + return + + var/datum/gas_mixture/environment = T.return_air() + var/min_temperature = T0C + 100 // 100C, the boiling point of water + + var/hotspot = (locate(/obj/fire) 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) + qdel(hotspot) + + if (environment && environment.temperature > min_temperature) // Abstracted as steam or something + var/removed_heat = between(0, volume * WATER_LATENT_HEAT, -environment.get_thermal_energy_change(min_temperature)) + environment.add_thermal_energy(-removed_heat) + if (prob(5)) + T.visible_message("The water sizzles as it lands on \the [T]!") + else + 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) // This is terrible and needs to be changed when possible. + if(!T || !istype(T)) + return + if(T.wet >= 2) + return + T.wet = 0 + if(T.wet_overlay) + T.overlays -= T.wet_overlay + T.wet_overlay = null + +/datum/reagent/water/touch_obj(var/obj/O) + 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() + +/datum/reagent/water/affect_touch(var/mob/living/carbon/M, var/alien, var/removed, var/location) + if(istype(M, /mob/living/carbon/slime)) + var/mob/living/carbon/slime/S = M + S.adjustToxLoss(15 * removed) // Babies have 150 health, adults have 200; So, 10 units and 13.5 + if(!S.client) + if(S.Target) // Like cats + S.Target = null + ++S.Discipline + if(dose == removed) + S.visible_message("[S]'s flesh sizzles where the water touches it!", "Your flesh burns in the water!") + var/needed = M.fire_stacks * 10 + if(volume > needed) + M.fire_stacks = 0 + M.ExtinguishMob() + remove_self(needed) + else + M.adjust_fire_stacks(-(volume / 10)) + remove_self(volume) + return + +/datum/reagent/fuel + name = "Welding fuel" + id = "fuel" + description = "Required for welders. Flamable." + reagent_state = LIQUID + color = "#660000" + + glass_icon_state = "dr_gibb_glass" + glass_name = "glass of welder fuel" + glass_desc = "Unless you are an industrial tool, this is probably not safe for consumption." + +/datum/reagent/fuel/touch_turf(var/turf/T) + new /obj/effect/decal/cleanable/liquid_fuel(T, volume) + remove_self(volume) + return + +/datum/reagent/fuel/affect_blood(var/mob/living/carbon/M, var/alien, var/removed, var/location) + M.adjustToxLoss(2 * removed) + +/datum/reagent/fuel/affect_touch(var/mob/living/carbon/M, var/alien, var/removed, var/location) // Splashing people with welding fuel to make them easy to ignite! + M.adjust_fire_stacks(0.1 * removed) diff --git a/code/modules/reagents/Chemistry-Reagents/Chemistry-Reagents-Dispenser.dm b/code/modules/reagents/Chemistry-Reagents/Chemistry-Reagents-Dispenser.dm new file mode 100644 index 0000000000..9d968aed78 --- /dev/null +++ b/code/modules/reagents/Chemistry-Reagents/Chemistry-Reagents-Dispenser.dm @@ -0,0 +1,376 @@ +/datum/reagent/aluminum + name = "Aluminum" + id = "aluminum" + description = "A silvery white and ductile member of the boron group of chemical elements." + reagent_state = SOLID + color = "#A8A8A8" + +/datum/reagent/carbon + name = "Carbon" + id = "carbon" + description = "A chemical element, the builing block of life." + reagent_state = SOLID + color = "#1C1300" + +/datum/reagent/carbon/touch_turf(var/turf/T) + if(!istype(T, /turf/space)) + var/obj/effect/decal/cleanable/dirt/dirtoverlay = locate(/obj/effect/decal/cleanable/dirt, T) + if (!dirtoverlay) + dirtoverlay = new/obj/effect/decal/cleanable/dirt(T) + dirtoverlay.alpha = volume * 30 + else + dirtoverlay.alpha = min(dirtoverlay.alpha + volume * 30, 255) + +/datum/reagent/chlorine + name = "Chlorine" + id = "chlorine" + description = "A chemical element with a characteristic odour." + reagent_state = GAS + color = "#808080" + +/datum/reagent/chlorine/affect_blood(var/mob/living/carbon/M, var/alien, var/removed, var/location) + M.take_organ_damage(1*REM, 0) + +/datum/reagent/chlorine/affect_touch(var/mob/living/carbon/M, var/alien, var/removed, var/location) + M.take_organ_damage(1*REM, 0) + +/datum/reagent/copper + name = "Copper" + id = "copper" + description = "A highly ductile metal." + color = "#6E3B08" + +/datum/reagent/ethanol + name = "Ethanol" //Parent class for all alcoholic reagents. + id = "ethanol" + description = "A well-known alcohol with a variety of applications." + reagent_state = LIQUID + color = "#404030" + var/nutriment_factor = 0 + var/strength = 10 // This is, essentially, units between stages - the lower, the stronger. Less fine tuning, more clarity. + var/toxicity = 1 + + var/druggy = 0 + var/adj_temp = 0 + var/targ_temp = 310 + var/halluci = 0 + + glass_icon_state = "glass_clear" + glass_name = "glass of ethanol" + glass_desc = "A well-known alcohol with a variety of applications." + +/datum/reagent/ethanol/affect_touch(var/mob/living/carbon/M, var/alien, var/removed, var/location) + M.adjust_fire_stacks(removed / 15) + return + +/datum/reagent/ethanol/affect_blood(var/mob/living/carbon/M, var/alien, var/removed, var/location) + M.adjustToxLoss(removed * 2 * toxicity) + return + +/datum/reagent/ethanol/affect_ingest(var/mob/living/carbon/M, var/alien, var/removed, var/location) + M.nutrition += nutriment_factor * removed + + var/strength_mod = 1 + if(alien == IS_SKRELL) + strength_mod *= 5 + if(alien == IS_DIONA) + strength_mod = 0 + + M.add_chemical_effect(CE_ALCOHOL, 1) + + if(dose / strength_mod >= strength) // Early warning + M.make_dizzy(6) // It is decreased at the speed of 3 per tick + if(dose / strength_mod >= strength * 2) // Slurring + M.slurring = max(M.slurring, 30) + if(dose / strength_mod >= strength * 3) // Confusion - walking in random directions + M.confused = max(M.confused, 20) + if(dose / strength_mod >= strength * 4) // Blurry vision + M.eye_blurry = max(M.eye_blurry, 10) + if(dose / strength_mod >= strength * 5) // Drowsyness - periodically falling asleep + M.drowsyness = max(M.drowsyness, 20) + if(dose / strength_mod >= strength * 6) // Toxic dose + M.add_chemical_effect(CE_ALCOHOL_TOXIC, toxicity) + if(dose / strength_mod >= strength * 7) // Pass out + M.paralysis = max(M.paralysis, 20) + M.sleeping = max(M.sleeping, 30) + + if(druggy != 0) + M.druggy = max(M.druggy, druggy) + + if(adj_temp > 0 && M.bodytemperature < targ_temp) // 310 is the normal bodytemp. 310.055 + M.bodytemperature = min(targ_temp, M.bodytemperature + (adj_temp * TEMPERATURE_DAMAGE_COEFFICIENT)) + if(adj_temp < 0 && M.bodytemperature > targ_temp) + M.bodytemperature = min(targ_temp, M.bodytemperature - (adj_temp * TEMPERATURE_DAMAGE_COEFFICIENT)) + + if(halluci) + M.hallucination = max(M.hallucination, halluci) + +/datum/reagent/ethanol/touch_obj(var/obj/O) + if(istype(O, /obj/item/weapon/paper)) + var/obj/item/weapon/paper/paperaffected = O + paperaffected.clearpaper() + usr << "The solution dissolves the ink on the paper." + return + if(istype(O, /obj/item/weapon/book)) + if(volume < 5) + return + if(istype(O, /obj/item/weapon/book/tome)) + usr << "The solution does nothing. Whatever this is, it isn't normal ink." + return + var/obj/item/weapon/book/affectedbook = O + affectedbook.dat = null + usr << "The solution dissolves the ink on the book." + return + +/datum/reagent/fluorine + name = "Fluorine" + id = "fluorine" + description = "A highly-reactive chemical element." + reagent_state = GAS + color = "#808080" + +/datum/reagent/fluorine/affect_blood(var/mob/living/carbon/M, var/alien, var/removed, var/location) + M.adjustToxLoss(removed) + +/datum/reagent/fluorine/affect_touch(var/mob/living/carbon/M, var/alien, var/removed, var/location) + M.adjustToxLoss(removed) + +/datum/reagent/hydrogen + name = "Hydrogen" + id = "hydrogen" + description = "A colorless, odorless, nonmetallic, tasteless, highly combustible diatomic gas." + reagent_state = GAS + color = "#808080" + +/datum/reagent/iron + name = "Iron" + id = "iron" + description = "Pure iron is a metal." + reagent_state = SOLID + color = "#353535" + +/datum/reagent/iron/affect_ingest(var/mob/living/carbon/M, var/alien, var/removed, var/location) + if(alien != IS_DIONA) + M.add_chemical_effect(CE_BLOODRESTORE, 8 * removed) + +/datum/reagent/lithium + name = "Lithium" + id = "lithium" + description = "A chemical element, used as antidepressant." + reagent_state = SOLID + color = "#808080" + +/datum/reagent/lithium/affect_blood(var/mob/living/carbon/M, var/alien, var/removed, var/location) + if(alien != IS_DIONA) + if(M.canmove && !M.restrained() && istype(M.loc, /turf/space)) + step(M, pick(cardinal)) + if(prob(5)) + M.emote(pick("twitch", "drool", "moan")) + +/datum/reagent/mercury + name = "Mercury" + id = "mercury" + description = "A chemical element." + reagent_state = LIQUID + color = "#484848" + +/datum/reagent/mercury/affect_blood(var/mob/living/carbon/M, var/alien, var/removed, var/location) + if(alien != IS_DIONA) + if(M.canmove && !M.restrained() && istype(M.loc, /turf/space)) + step(M, pick(cardinal)) + if(prob(5)) + M.emote(pick("twitch", "drool", "moan")) + M.adjustBrainLoss(2) + +/datum/reagent/nitrogen + name = "Nitrogen" + id = "nitrogen" + description = "A colorless, odorless, tasteless gas." + reagent_state = GAS + color = "#808080" + +/datum/reagent/nitrogen/affect_blood(var/mob/living/carbon/M, var/alien, var/removed, var/location) + if(alien == IS_VOX) + M.adjustOxyLoss(-removed * 3) + +/datum/reagent/oxygen + name = "Oxygen" + id = "oxygen" + description = "A colorless, odorless gas." + reagent_state = GAS + color = "#808080" + +/datum/reagent/oxygen/affect_blood(var/mob/living/carbon/M, var/alien, var/removed, var/location) + if(alien == IS_VOX) + M.adjustToxLoss(removed * 3) + +/datum/reagent/phosphorus + name = "Phosphorus" + id = "phosphorus" + description = "A chemical element, the backbone of biological energy carriers." + reagent_state = SOLID + color = "#832828" + +/datum/reagent/potassium + name = "Potassium" + id = "potassium" + description = "A soft, low-melting solid that can easily be cut with a knife. Reacts violently with water." + reagent_state = SOLID + color = "#A0A0A0" + +/datum/reagent/radium + name = "Radium" + id = "radium" + description = "Radium is an alkaline earth metal. It is extremely radioactive." + reagent_state = SOLID + color = "#C7C7C7" + +/datum/reagent/radium/affect_blood(var/mob/living/carbon/M, var/alien, var/removed, var/location) + M.apply_effect(10 * removed, IRRADIATE, 0) // Radium may increase your chances to cure a disease + if(M.virus2.len) + for(var/ID in M.virus2) + var/datum/disease2/disease/V = M.virus2[ID] + if(prob(5)) + M.antibodies |= V.antigen + if(prob(50)) + M.radiation += 50 // curing it that way may kill you instead + var/absorbed = 0 + var/obj/item/organ/diona/nutrients/rad_organ = locate() in M.internal_organs + if(rad_organ && !rad_organ.is_broken()) + absorbed = 1 + if(!absorbed) + M.adjustToxLoss(100) + +/datum/reagent/radium/touch_turf(var/turf/T) + if(volume >= 3) + if(!istype(T, /turf/space)) + var/obj/effect/decal/cleanable/greenglow/glow = locate(/obj/effect/decal/cleanable/greenglow, T) + if(!glow) + new /obj/effect/decal/cleanable/greenglow(T) + return + +/datum/reagent/acid + name = "Sulphuric acid" + id = "sacid" + description = "A very corrosive mineral acid with the molecular formula H2SO4." + reagent_state = LIQUID + color = "#DB5008" + metabolism = REM * 2 + touch_met = 50 // It's acid! + var/power = 5 + var/meltdose = 10 // How much is needed to melt + +/datum/reagent/acid/affect_blood(var/mob/living/carbon/M, var/alien, var/removed, var/location) + M.take_organ_damage(0, removed * power * 2) + +/datum/reagent/acid/affect_touch(var/mob/living/carbon/M, var/alien, var/removed, var/location) // This is the most interesting + if(ishuman(M)) + var/mob/living/carbon/human/H = M + if(H.head) + if(H.head.unacidable) + H << "Your [H.head] protects you from the acid." + remove_self(volume) + return + else if(removed > meltdose) + H << "Your [H.head] melts away!" + qdel(H.head) + H.update_inv_head(1) + H.update_hair(1) + removed -= meltdose + if(removed <= 0) + return + + if(H.wear_mask) + if(H.wear_mask.unacidable) + H << "Your [H.wear_mask] protects you from the acid." + remove_self(volume) + return + else if(removed > meltdose) + H << "Your [H.wear_mask] melts away!" + qdel(H.wear_mask) + H.update_inv_wear_mask(1) + H.update_hair(1) + removed -= meltdose + if(removed <= 0) + return + + if(H.glasses) + if(H.glasses.unacidable) + H << "Your [H.glasses] partially protect you from the acid!" + removed /= 2 + else if(removed > meltdose) + H << "Your [H.glasses] melt away!" + qdel(H.glasses) + H.update_inv_glasses(1) + removed -= meltdose / 2 + if(removed <= 0) + return + + if(volume < meltdose) // Not enough to melt anything + M.take_organ_damage(removed * power * 0.2) + return + if(!M.unacidable && removed > 0) + if(istype(M, /mob/living/carbon/human) && volume >= meltdose) + var/mob/living/carbon/human/H = M + var/obj/item/organ/external/affecting = H.get_organ("head") + if(affecting) + if(affecting.take_damage(0, removed * power * 0.1)) + H.UpdateDamageIcon() + if(prob(100 * removed / meltdose)) // Applies disfigurement + if (!(H.species && (H.species.flags & NO_PAIN))) + H.emote("scream") + H.status_flags |= DISFIGURED + else + M.take_organ_damage(0, removed * power * 0.1) // Balance. The damage is instant, so it's weaker. 10 units -> 5 damage, double for pacid. 120 units beaker could deal 60, but a) it's burn, which is not as dangerous, b) it's a one-use weapon, c) missing with it will splash it over the ground and d) clothes give some protection, so not everything will hit + +/datum/reagent/acid/touch_obj(var/obj/O) + if(O.unacidable) + return + if((istype(O, /obj/item) || istype(O, /obj/effect/plant)) && (volume > meltdose)) + 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 << "\The [O] melts." + qdel(O) + remove_self(meltdose) // 10 units of acid will not melt EVERYTHING on the tile + +/datum/reagent/silicon + name = "Silicon" + id = "silicon" + description = "A tetravalent metalloid, silicon is less reactive than its chemical analog carbon." + reagent_state = SOLID + color = "#A8A8A8" + +/datum/reagent/sodium + name = "Sodium" + id = "sodium" + description = "A chemical element, readily reacts with water." + reagent_state = SOLID + color = "#808080" + +/datum/reagent/sugar + name = "Sugar" + id = "sugar" + description = "The organic compound commonly known as table sugar and sometimes called saccharose. This white, odorless, crystalline powder has a pleasing, sweet taste." + reagent_state = SOLID + color = "#FFFFFF" + glass_icon_state = "iceglass" + glass_name = "glass of sugar" + glass_desc = "The organic compound commonly known as table sugar and sometimes called saccharose. This white, odorless, crystalline powder has a pleasing, sweet taste." + +/datum/reagent/sugar/affect_blood(var/mob/living/carbon/M, var/alien, var/removed, var/location) + M.nutrition += removed * 3 + +/datum/reagent/sulfur + name = "Sulfur" + id = "sulfur" + description = "A chemical element with a pungent smell." + reagent_state = SOLID + color = "#BF8C00" + +/datum/reagent/tungsten + name = "Tungsten" + id = "tungsten" + description = "A chemical element, and a strong oxidising agent." + reagent_state = SOLID + color = "#DCDCDC" diff --git a/code/modules/reagents/Chemistry-Reagents/Chemistry-Reagents-Food-Drinks.dm b/code/modules/reagents/Chemistry-Reagents/Chemistry-Reagents-Food-Drinks.dm new file mode 100644 index 0000000000..220bad857b --- /dev/null +++ b/code/modules/reagents/Chemistry-Reagents/Chemistry-Reagents-Food-Drinks.dm @@ -0,0 +1,1924 @@ +/* Food */ + +/datum/reagent/nutriment + name = "Nutriment" + id = "nutriment" + description = "All the vitamins, minerals, and carbohydrates the body needs in pure form." + reagent_state = SOLID + metabolism = REM * 4 + var/nutriment_factor = 30 // Per unit + var/injectable = 0 + color = "#664330" + +/datum/reagent/nutriment/affect_blood(var/mob/living/carbon/M, var/alien, var/removed, var/location) + if(!injectable) + M.adjustToxLoss(0.1 * removed) + return + affect_ingest(M, alien, removed) + +/datum/reagent/nutriment/affect_ingest(var/mob/living/carbon/M, var/alien, var/removed, var/location) + M.heal_organ_damage(0.5 * removed, 0) + M.nutrition += nutriment_factor * removed // For hunger and fatness + M.add_chemical_effect(CE_BLOODRESTORE, 4 * removed) + +/datum/reagent/nutriment/protein // Bad for Skrell! + name = "animal protein" + id = "protein" + color = "#440000" + +/datum/reagent/nutriment/protein/affect_ingest(var/mob/living/carbon/M, var/alien, var/removed, var/location) + if(alien && alien == IS_SKRELL) + M.adjustToxLoss(0.5 * removed) + return + ..() + +/datum/reagent/nutriment/egg // Also bad for skrell. Not a child of protein because it might mess up, not sure. + name = "egg yolk" + id = "egg" + color = "#FFFFAA" + +/datum/reagent/nutriment/egg/affect_ingest(var/mob/living/carbon/M, var/alien, var/removed, var/location) + if(alien && alien == IS_SKRELL) + M.adjustToxLoss(0.5) + return + ..() + +/datum/reagent/nutriment/flour + name = "flour" + id = "flour" + description = "This is what you rub all over yourself to pretend to be a ghost." + reagent_state = SOLID + nutriment_factor = 1 + color = "#FFFFFF" + +/datum/reagent/nutriment/flour/touch_turf(var/turf/simulated/T) + if(!istype(T, /turf/space)) + new /obj/effect/decal/cleanable/flour(T) + +/datum/reagent/nutriment/coco + name = "Coco Powder" + id = "coco" + description = "A fatty, bitter paste made from coco beans." + reagent_state = SOLID + nutriment_factor = 5 + color = "#302000" + +/datum/reagent/nutriment/soysauce + name = "Soysauce" + id = "soysauce" + description = "A salty sauce made from the soy plant." + reagent_state = LIQUID + nutriment_factor = 2 + color = "#792300" + +/datum/reagent/nutriment/ketchup + name = "Ketchup" + id = "ketchup" + description = "Ketchup, catsup, whatever. It's tomato paste." + reagent_state = LIQUID + nutriment_factor = 5 + color = "#731008" + +/datum/reagent/nutriment/rice + name = "Rice" + id = "rice" + description = "Enjoy the great taste of nothing." + reagent_state = SOLID + nutriment_factor = 1 + color = "#FFFFFF" + +/datum/reagent/nutriment/cherryjelly + name = "Cherry Jelly" + id = "cherryjelly" + description = "Totally the best. Only to be spread on foods with excellent lateral symmetry." + reagent_state = LIQUID + nutriment_factor = 1 + color = "#801E28" + +/datum/reagent/nutriment/cornoil + name = "Corn Oil" + id = "cornoil" + description = "An oil derived from various types of corn." + reagent_state = LIQUID + nutriment_factor = 20 + color = "#302000" + +/datum/reagent/nutriment/cornoil/touch_turf(var/turf/simulated/T) + if(!istype(T)) + return + + var/hotspot = (locate(/obj/fire) 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) + qdel(hotspot) + + 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) // This is terrible and needs to be changed when possible. + if(!T || !istype(T)) + return + if(T.wet >= 2) + return + T.wet = 0 + if(T.wet_overlay) + T.overlays -= T.wet_overlay + T.wet_overlay = null + +/datum/reagent/nutriment/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 + color = "#899613" + +/datum/reagent/nutriment/sprinkles + name = "Sprinkles" + id = "sprinkles" + description = "Multi-colored little bits of sugar, commonly found on donuts. Loved by cops." + nutriment_factor = 1 + color = "#FF00FF" + +/datum/reagent/nutriment/mint + name = "Mint" + id = "mint" + description = "Also known as Mentha." + reagent_state = LIQUID + color = "#CF3600" + +/datum/reagent/lipozine // The anti-nutriment. + name = "Lipozine" + id = "lipozine" + description = "A chemical compound that causes a powerful fat-burning reaction." + reagent_state = LIQUID + color = "#BBEDA4" + overdose = REAGENTS_OVERDOSE + +/datum/reagent/lipozine/affect_blood(var/mob/living/carbon/M, var/alien, var/removed, var/location) + M.nutrition = max(M.nutrition - 10 * removed, 0) + M.overeatduration = 0 + if(M.nutrition < 0) + M.nutrition = 0 + +/* Non-food stuff like condiments */ + +/datum/reagent/sodiumchloride + name = "Table Salt" + id = "sodiumchloride" + description = "A salt made of sodium chloride. Commonly used to season food." + reagent_state = SOLID + color = "#FFFFFF" + overdose = REAGENTS_OVERDOSE + +/datum/reagent/blackpepper + name = "Black Pepper" + id = "blackpepper" + description = "A powder ground from peppercorns. *AAAACHOOO*" + reagent_state = SOLID + color = "#000000" + +/datum/reagent/enzyme + name = "Universal Enzyme" + id = "enzyme" + description = "A universal enzyme used in the preperation of certain chemicals and foods." + reagent_state = LIQUID + color = "#365E30" + overdose = REAGENTS_OVERDOSE + +/datum/reagent/frostoil + name = "Frost Oil" + id = "frostoil" + description = "A special oil that noticably chills the body. Extracted from Ice Peppers." + reagent_state = LIQUID + color = "#B31008" + +/datum/reagent/frostoil/affect_blood(var/mob/living/carbon/M, var/alien, var/removed, var/location) + if(alien == IS_DIONA) + return + M.bodytemperature = max(M.bodytemperature - 10 * TEMPERATURE_DAMAGE_COEFFICIENT, 0) + if(prob(1)) + M.emote("shiver") + if(istype(M, /mob/living/carbon/slime)) + M.bodytemperature = max(M.bodytemperature - rand(10,20), 0) + holder.remove_reagent("capsaicin", 5) + +/datum/reagent/capsaicin + name = "Capsaicin Oil" + id = "capsaicin" + description = "This is what makes chilis hot." + reagent_state = LIQUID + color = "#B31008" + +/datum/reagent/capsaicin/affect_blood(var/mob/living/carbon/M, var/alien, var/removed, var/location) + if(alien == IS_DIONA) + return + if(ishuman(M)) + var/mob/living/carbon/human/H = M + if(H.species && (H.species.flags & (NO_PAIN | IS_SYNTHETIC))) + return + if(dose < 5 && (dose == metabolism || prob(5))) + M << "Your insides feel uncomfortably hot!" + if(dose >= 5) + M.apply_effect(2, AGONY, 0) + if(prob(5)) + M.visible_message("[M] [pick("dry heaves!","coughs!","splutters!")]", "You feel like your insides are burning!") + if(istype(M, /mob/living/carbon/slime)) + M.bodytemperature += rand(10, 25) + holder.remove_reagent("frostoil", 5) + +/datum/reagent/condensedcapsaicin + name = "Condensed Capsaicin" + id = "condensedcapsaicin" + description = "A chemical agent used for self-defense and in police work." + reagent_state = LIQUID + touch_met = 50 // Get rid of it quickly + color = "#B31008" + +/datum/reagent/condensedcapsaicin/affect_touch(var/mob/living/carbon/M, var/alien, var/removed, var/location) + var/eyes_covered = 0 + var/mouth_covered = 0 + var/obj/item/safe_thing = null + if(istype(M, /mob/living/carbon/human)) + var/mob/living/carbon/human/H = M + if(H.species && (H.species.flags & NO_PAIN)) + return + if(H.head) + if(H.head.flags & MASKCOVERSEYES) + eyes_covered = 1 + safe_thing = H.head + if(H.head.flags & MASKCOVERSMOUTH) + mouth_covered = 1 + safe_thing = H.head + if(H.wear_mask) + if(!eyes_covered && H.wear_mask.flags & MASKCOVERSEYES) + eyes_covered = 1 + safe_thing = H.wear_mask + if(!mouth_covered && H.wear_mask.flags & MASKCOVERSMOUTH) + mouth_covered = 1 + safe_thing = H.wear_mask + if(H.glasses) + if(!eyes_covered) + eyes_covered = 1 + if(!safe_thing) + safe_thing = H.glasses + if(eyes_covered && mouth_covered) + M << "Your [safe_thing] protects you from the pepperspray!" + return + else if(eyes_covered) + M << "Your [safe_thing] protect you from most of the pepperspray!" + M.eye_blurry = max(M.eye_blurry, 15) + M.eye_blind = max(M.eye_blind, 5) + M.Stun(5) + M.Weaken(5) + return + else if (mouth_covered) // Mouth cover is better than eye cover + M << "Your [safe_thing] protects your face from the pepperspray!" + M.eye_blurry = max(M.eye_blurry, 5) + return + else // Oh dear :D + M << "You're sprayed directly in the eyes with pepperspray!" + M.eye_blurry = max(M.eye_blurry, 25) + M.eye_blind = max(M.eye_blind, 10) + M.Stun(5) + M.Weaken(5) + return + +/datum/reagent/condensedcapsaicin/affect_blood(var/mob/living/carbon/M, var/alien, var/removed, var/location) + if(ishuman(M)) + var/mob/living/carbon/human/H = M + if(H.species && (H.species.flags & (NO_PAIN | IS_SYNTHETIC))) + return + if(dose == metabolism) + M << "You feel like your insides are burning!" + else + M.apply_effect(4, AGONY, 0) + if(prob(5)) + M.visible_message("[M] [pick("dry heaves!","coughs!","splutters!")]", "You feel like your insides are burning!") + if(istype(M, /mob/living/carbon/slime)) + M.bodytemperature += rand(15, 30) + holder.remove_reagent("frostoil", 5) + +/* Drinks */ + +/datum/reagent/drink + name = "Drink" + id = "drink" + description = "Uh, some kind of drink." + reagent_state = LIQUID + color = "#E78108" + var/nutrition = 0 // Per unit + var/adj_dizzy = 0 // Per tick + var/adj_drowsy = 0 + var/adj_sleepy = 0 + var/adj_temp = 0 + +/datum/reagent/drink/affect_blood(var/mob/living/carbon/M, var/alien, var/removed, var/location) + M.adjustToxLoss(removed) // Probably not a good idea; not very deadly though + return + +/datum/reagent/drink/affect_ingest(var/mob/living/carbon/M, var/alien, var/removed, var/location) + M.nutrition += nutrition * removed + M.dizziness = max(0, M.dizziness + adj_dizzy) + M.drowsyness = max(0, M.drowsyness + adj_drowsy) + M.sleeping = max(0, M.sleeping + adj_sleepy) + if(adj_temp > 0 && M.bodytemperature < 310) // 310 is the normal bodytemp. 310.055 + M.bodytemperature = min(310, M.bodytemperature + (adj_temp * TEMPERATURE_DAMAGE_COEFFICIENT)) + if(adj_temp < 0 && M.bodytemperature > 310) + M.bodytemperature = min(310, M.bodytemperature - (adj_temp * TEMPERATURE_DAMAGE_COEFFICIENT)) + +// Juices + +/datum/reagent/drink/banana + name = "Banana Juice" + id = "banana" + description = "The raw essence of a banana." + color = "#C3AF00" + + glass_icon_state = "banana" + glass_name = "glass of banana juice" + glass_desc = "The raw essence of a banana. HONK!" + +/datum/reagent/drink/berryjuice + name = "Berry Juice" + id = "berryjuice" + description = "A delicious blend of several different kinds of berries." + color = "#990066" + + glass_icon_state = "berryjuice" + glass_name = "glass of berry juice" + glass_desc = "Berry juice. Or maybe it's jam. Who cares?" + +/datum/reagent/drink/carrotjuice + name = "Carrot juice" + id = "carrotjuice" + description = "It is just like a carrot but without crunching." + color = "#FF8C00" // rgb: 255, 140, 0 + + glass_icon_state = "carrotjuice" + glass_name = "glass of carrot juice" + glass_desc = "It is just like a carrot but without crunching." + +/datum/reagent/drink/carrotjuice/affect_ingest(var/mob/living/carbon/M, var/alien, var/removed, var/location) + ..() + M.reagents.add_reagent("imidazoline", removed * 0.2) + +/datum/reagent/drink/grapejuice + name = "Grape Juice" + id = "grapejuice" + description = "It's grrrrrape!" + color = "#863333" + + glass_icon_state = "grapejuice" + glass_name = "glass of grape juice" + glass_desc = "It's grrrrrape!" + +/datum/reagent/drink/lemonjuice + name = "Lemon Juice" + id = "lemonjuice" + description = "This juice is VERY sour." + color = "#AFAF00" + + glass_icon_state = "lemonjuice" + glass_name = "glass of lemon juice" + glass_desc = "Sour..." + +/datum/reagent/drink/limejuice + name = "Lime Juice" + id = "limejuice" + description = "The sweet-sour juice of limes." + color = "#365E30" + + glass_icon_state = "glass_green" + glass_name = "glass of lime juice" + glass_desc = "A glass of sweet-sour lime juice" + +/datum/reagent/drink/limejuice/affect_ingest(var/mob/living/carbon/M, var/alien, var/removed, var/location) + ..() + if(alien == IS_DIONA) + return + M.adjustToxLoss(-0.5 * removed) + +/datum/reagent/drink/orangejuice + name = "Orange juice" + id = "orangejuice" + description = "Both delicious AND rich in Vitamin C, what more do you need?" + color = "#E78108" + + glass_icon_state = "glass_orange" + glass_name = "glass of orange juice" + glass_desc = "Vitamins! Yay!" + +/datum/reagent/drink/orangejuice/affect_ingest(var/mob/living/carbon/M, var/alien, var/removed, var/location) + ..() + if(alien == IS_DIONA) + return + M.adjustOxyLoss(-2 * removed) + +/datum/reagent/toxin/poisonberryjuice // It has more in common with toxins than drinks... but it's a juice + name = "Poison Berry Juice" + id = "poisonberryjuice" + description = "A tasty juice blended from various kinds of very deadly and toxic berries." + color = "#863353" + strength = 5 + + glass_icon_state = "poisonberryjuice" + glass_name = "glass of poison berry juice" + glass_desc = "A glass of deadly juice." + +/datum/reagent/drink/potato_juice + name = "Potato Juice" + id = "potato" + description = "Juice of the potato. Bleh." + nutrition = 2 + color = "#302000" + + glass_icon_state = "glass_brown" + glass_name = "glass of potato juice" + glass_desc = "Juice from a potato. Bleh." + +/datum/reagent/drink/tomatojuice + name = "Tomato Juice" + id = "tomatojuice" + description = "Tomatoes made into juice. What a waste of big, juicy tomatoes, huh?" + color = "#731008" + + glass_icon_state = "glass_red" + glass_name = "glass of tomato juice" + glass_desc = "Are you sure this is tomato juice?" + +/datum/reagent/drink/tomatojuice/affect_ingest(var/mob/living/carbon/M, var/alien, var/removed, var/location) + ..() + if(alien == IS_DIONA) + return + M.heal_organ_damage(0, 0.5 * removed) + +/datum/reagent/drink/watermelonjuice + name = "Watermelon Juice" + id = "watermelonjuice" + description = "Delicious juice made from watermelon." + color = "#B83333" + + glass_icon_state = "glass_red" + glass_name = "glass of watermelon juice" + glass_desc = "Delicious juice made from watermelon." + +// Everything else + +/datum/reagent/drink/milk + name = "Milk" + id = "milk" + description = "An opaque white liquid produced by the mammary glands of mammals." + color = "#DFDFDF" + + glass_icon_state = "glass_white" + glass_name = "glass of milk" + glass_desc = "White and nutritious goodness!" + +/datum/reagent/drink/milk/affect_ingest(var/mob/living/carbon/M, var/alien, var/removed, var/location) + ..() + if(alien == IS_DIONA) + return + M.heal_organ_damage(0.5 * removed, 0) + holder.remove_reagent("capsaicin", 10 * removed) + +/datum/reagent/drink/milk/cream + name = "Cream" + id = "cream" + description = "The fatty, still liquid part of milk. Why don't you mix this with sum scotch, eh?" + color = "#DFD7AF" + + glass_icon_state = "glass_white" + glass_name = "glass of cream" + glass_desc = "Ewwww..." + +/datum/reagent/drink/milk/soymilk + name = "Soy Milk" + id = "soymilk" + description = "An opaque white liquid made from soybeans." + color = "#DFDFC7" + + glass_icon_state = "glass_white" + glass_name = "glass of soy milk" + glass_desc = "White and nutritious soy goodness!" + +/datum/reagent/drink/tea + name = "Tea" + id = "tea" + description = "Tasty black tea, it has antioxidants, it's good for you!" + color = "#101000" + adj_dizzy = -2 + adj_drowsy = -1 + adj_sleepy = -3 + adj_temp = 20 + + glass_icon_state = "bigteacup" + glass_name = "cup of tea" + glass_desc = "Tasty black tea, it has antioxidants, it's good for you!" + +/datum/reagent/drink/tea/affect_ingest(var/mob/living/carbon/M, var/alien, var/removed, var/location) + ..() + if(alien == IS_DIONA) + return + M.adjustToxLoss(-0.5 * removed) + +/datum/reagent/drink/tea/icetea + name = "Iced Tea" + id = "icetea" + description = "No relation to a certain rap artist/ actor." + color = "#104038" // rgb: 16, 64, 56 + adj_temp = -5 + + glass_icon_state = "icedteaglass" + glass_name = "glass of iced tea" + glass_desc = "No relation to a certain rap artist/ actor." + glass_center_of_mass = list("x"=15, "y"=10) + +/datum/reagent/drink/coffee + name = "Coffee" + id = "coffee" + description = "Coffee is a brewed drink prepared from roasted seeds, commonly called coffee beans, of the coffee plant." + color = "#482000" + adj_dizzy = -5 + adj_drowsy = -3 + adj_sleepy = -2 + adj_temp = 25 + + glass_icon_state = "hot_coffee" + glass_name = "cup of coffee" + glass_desc = "Don't drop it, or you'll send scalding liquid and glass shards everywhere." + + +/datum/reagent/drink/coffee/affect_ingest(var/mob/living/carbon/M, var/alien, var/removed, var/location) + ..() + if(alien == IS_DIONA) + return + M.make_jittery(5) + if(adj_temp > 0) + holder.remove_reagent("frostoil", 10 * removed) + +/datum/reagent/drink/coffee/icecoffee + name = "Iced Coffee" + id = "icecoffee" + description = "Coffee and ice, refreshing and cool." + color = "#102838" + adj_temp = -5 + + glass_icon_state = "icedcoffeeglass" + glass_name = "glass of iced coffee" + glass_desc = "A drink to perk you up and refresh you!" + +/datum/reagent/drink/coffee/soy_latte + name = "Soy Latte" + id = "soy_latte" + description = "A nice and tasty beverage while you are reading your hippie books." + color = "#664300" + adj_temp = 5 + + glass_icon_state = "soy_latte" + glass_name = "glass of soy latte" + glass_desc = "A nice and refrshing beverage while you are reading." + glass_center_of_mass = list("x"=15, "y"=9) + +/datum/reagent/drink/coffee/soy_latte/affect_ingest(var/mob/living/carbon/M, var/alien, var/removed, var/location) + ..() + M.heal_organ_damage(0.5 * removed, 0) + +/datum/reagent/drink/coffee/cafe_latte + name = "Cafe Latte" + id = "cafe_latte" + description = "A nice, strong and tasty beverage while you are reading." + color = "#664300" // rgb: 102, 67, 0 + adj_temp = 5 + + glass_icon_state = "cafe_latte" + glass_name = "glass of cafe latte" + glass_desc = "A nice, strong and refreshing beverage while you are reading." + glass_center_of_mass = list("x"=15, "y"=9) + +/datum/reagent/drink/coffee/cafe_latte/affect_ingest(var/mob/living/carbon/M, var/alien, var/removed, var/location) + ..() + M.heal_organ_damage(0.5 * removed, 0) + +/datum/reagent/drink/hot_coco + name = "Hot Chocolate" + id = "hot_coco" + description = "Made with love! And cocoa beans." + reagent_state = LIQUID + color = "#403010" + nutrition = 2 + adj_temp = 5 + + glass_icon_state = "chocolateglass" + glass_name = "glass of hot chocolate" + glass_desc = "Made with love! And cocoa beans." + +/datum/reagent/drink/sodawater + name = "Soda Water" + id = "sodawater" + description = "A can of club soda. Why not make a scotch and soda?" + color = "#619494" + adj_dizzy = -5 + adj_drowsy = -3 + adj_temp = -5 + + glass_icon_state = "glass_clear" + glass_name = "glass of soda water" + glass_desc = "Soda water. Why not make a scotch and soda?" + +/datum/reagent/drink/grapesoda + name = "Grape Soda" + id = "grapesoda" + description = "Grapes made into a fine drank." + color = "#421C52" + adj_drowsy = -3 + + glass_icon_state = "gsodaglass" + glass_name = "glass of grape soda" + glass_desc = "Looks like a delicious drink!" + +/datum/reagent/drink/tonic + name = "Tonic Water" + id = "tonic" + description = "It tastes strange but at least the quinine keeps the Space Malaria at bay." + color = "#664300" + adj_dizzy = -5 + adj_drowsy = -3 + adj_sleepy = -2 + adj_temp = -5 + + glass_icon_state = "glass_clear" + glass_name = "glass of tonic water" + glass_desc = "Quinine tastes funny, but at least it'll keep that Space Malaria away." + +/datum/reagent/drink/lemonade + name = "Lemonade" + description = "Oh the nostalgia..." + id = "lemonade" + color = "#FFFF00" + adj_temp = -5 + + glass_icon_state = "lemonadeglass" + glass_name = "glass of lemonade" + glass_desc = "Oh the nostalgia..." + +/datum/reagent/drink/kiraspecial + name = "Kira Special" + description = "Long live the guy who everyone had mistaken for a girl. Baka!" + id = "kiraspecial" + color = "#CCCC99" + adj_temp = -5 + + glass_icon_state = "kiraspecial" + glass_name = "glass of Kira Special" + glass_desc = "Long live the guy who everyone had mistaken for a girl. Baka!" + glass_center_of_mass = list("x"=16, "y"=12) + +/datum/reagent/drink/brownstar + name = "Brown Star" + description = "It's not what it sounds like..." + id = "brownstar" + color = "#9F3400" + adj_temp = -2 + + glass_icon_state = "brownstar" + glass_name = "glass of Brown Star" + glass_desc = "It's not what it sounds like..." + +/datum/reagent/drink/milkshake + name = "Milkshake" + description = "Glorious brainfreezing mixture." + id = "milkshake" + color = "#AEE5E4" + adj_temp = -9 + + glass_icon_state = "milkshake" + glass_name = "glass of milkshake" + glass_desc = "Glorious brainfreezing mixture." + glass_center_of_mass = list("x"=16, "y"=7) + +/datum/reagent/drink/rewriter + name = "Rewriter" + description = "The secret of the sanctuary of the Libarian..." + id = "rewriter" + color = "#485000" + adj_temp = -5 + + glass_icon_state = "rewriter" + glass_name = "glass of Rewriter" + glass_desc = "The secret of the sanctuary of the Libarian..." + glass_center_of_mass = list("x"=16, "y"=9) + +/datum/reagent/drink/rewriter/affect_ingest(var/mob/living/carbon/M, var/alien, var/removed, var/location) + ..() + M.make_jittery(5) + +/datum/reagent/drink/nuka_cola + name = "Nuka Cola" + id = "nuka_cola" + description = "Cola, cola never changes." + color = "#100800" + adj_temp = -5 + adj_sleepy = -2 + + glass_icon_state = "nuka_colaglass" + glass_name = "glass of Nuka-Cola" + glass_desc = "Don't cry, Don't raise your eye, It's only nuclear wasteland" + glass_center_of_mass = list("x"=16, "y"=6) + +/datum/reagent/drink/nuka_cola/affect_ingest(var/mob/living/carbon/M, var/alien, var/removed, var/location) + ..() + M.add_chemical_effect(CE_SPEEDBOOST, 1) + M.make_jittery(20) + M.druggy = max(M.druggy, 30) + M.dizziness += 5 + M.drowsyness = 0 + +/datum/reagent/drink/grenadine + name = "Grenadine Syrup" + id = "grenadine" + description = "Made in the modern day with proper pomegranate substitute. Who uses real fruit, anyways?" + color = "#FF004F" + + glass_icon_state = "grenadineglass" + glass_name = "glass of grenadine syrup" + glass_desc = "Sweet and tangy, a bar syrup used to add color or flavor to drinks." + glass_center_of_mass = list("x"=17, "y"=6) + +/datum/reagent/drink/space_cola + name = "Space Cola" + id = "cola" + description = "A refreshing beverage." + reagent_state = LIQUID + color = "#100800" + adj_drowsy = -3 + adj_temp = -5 + + glass_icon_state = "glass_brown" + glass_name = "glass of Space Cola" + glass_desc = "A glass of refreshing Space Cola" + +/datum/reagent/drink/spacemountainwind + name = "Mountain Wind" + id = "spacemountainwind" + description = "Blows right through you like a space wind." + color = "#102000" + adj_drowsy = -7 + adj_sleepy = -1 + adj_temp = -5 + + glass_icon_state = "Space_mountain_wind_glass" + glass_name = "glass of Space Mountain Wind" + glass_desc = "Space Mountain Wind. As you know, there are no mountains in space, only wind." + +/datum/reagent/drink/dr_gibb + name = "Dr. Gibb" + id = "dr_gibb" + description = "A delicious blend of 42 different flavours" + color = "#102000" + adj_drowsy = -6 + adj_temp = -5 + + glass_icon_state = "dr_gibb_glass" + glass_name = "glass of Dr. Gibb" + glass_desc = "Dr. Gibb. Not as dangerous as the name might imply." + +/datum/reagent/drink/space_up + name = "Space-Up" + id = "space_up" + description = "Tastes like a hull breach in your mouth." + color = "#202800" + adj_temp = -8 + + glass_icon_state = "space-up_glass" + glass_name = "glass of Space-up" + glass_desc = "Space-up. It helps keep your cool." + +/datum/reagent/drink/lemon_lime + name = "Lemon Lime" + description = "A tangy substance made of 0.5% natural citrus!" + id = "lemon_lime" + color = "#878F00" + adj_temp = -8 + + glass_icon_state = "lemonlime" + glass_name = "glass of lemon lime soda" + glass_desc = "A tangy substance made of 0.5% natural citrus!" + +/datum/reagent/drink/doctor_delight + name = "The Doctor's Delight" + id = "doctorsdelight" + description = "A gulp a day keeps the MediBot away. That's probably for the best." + reagent_state = LIQUID + color = "#FF8CFF" + nutrition = 1 + + glass_icon_state = "doctorsdelightglass" + glass_name = "glass of The Doctor's Delight" + glass_desc = "A healthy mixture of juices, guaranteed to keep you healthy until the next toolboxing takes place." + glass_center_of_mass = list("x"=16, "y"=8) + +/datum/reagent/drink/doctor_delight/affect_ingest(var/mob/living/carbon/M, var/alien, var/removed, var/location) + ..() + if(alien == IS_DIONA) + return + M.adjustOxyLoss(-4 * removed) + M.heal_organ_damage(2 * removed, 2 * removed) + M.adjustToxLoss(-2 * removed) + if(M.dizziness) + M.dizziness = max(0, M.dizziness - 15) + if(M.confused) + M.confused = max(0, M.confused - 5) + +/datum/reagent/drink/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 + nutrition = 1 + color = "#302000" + +/datum/reagent/drink/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 + color = "#302000" + nutrition = 5 + adj_temp = 5 + +/datum/reagent/drink/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 + color = "#302000" + nutrition = 5 + +/datum/reagent/drink/hell_ramen/affect_ingest(var/mob/living/carbon/M, var/alien, var/removed, var/location) + ..() + if(alien == IS_DIONA) + return + M.bodytemperature += 10 * TEMPERATURE_DAMAGE_COEFFICIENT + +/datum/reagent/drink/ice + name = "Ice" + id = "ice" + description = "Frozen water, your dentist wouldn't like you chewing this." + reagent_state = SOLID + color = "#619494" + adj_temp = -5 + + glass_icon_state = "iceglass" + glass_name = "glass of ice" + glass_desc = "Generally, you're supposed to put something else in there too..." + +/datum/reagent/drink/nothing + name = "Nothing" + id = "nothing" + description = "Absolutely nothing." + + glass_icon_state = "nothing" + glass_name = "glass of nothing" + glass_desc = "Absolutely nothing." + +/* Alcohol */ + +// Basic + +/datum/reagent/ethanol/absinthe + name = "Absinthe" + id = "absinthe" + description = "Watch out that the Green Fairy doesn't come for you!" + color = "#33EE00" + strength = 12 + + glass_icon_state = "absintheglass" + glass_name = "glass of absinthe" + glass_desc = "Wormwood, anise, oh my." + glass_center_of_mass = list("x"=16, "y"=5) + +/datum/reagent/ethanol/ale + name = "Ale" + id = "ale" + description = "A dark alchoholic beverage made by malted barley and yeast." + color = "#664300" + strength = 50 + + glass_icon_state = "aleglass" + glass_name = "glass of ale" + glass_desc = "A freezing pint of delicious ale" + glass_center_of_mass = list("x"=16, "y"=8) + +/datum/reagent/ethanol/beer + name = "Beer" + id = "beer" + description = "An alcoholic beverage made from malted grains, hops, yeast, and water." + color = "#664300" + strength = 50 + nutriment_factor = 1 + + glass_icon_state = "beerglass" + glass_name = "glass of beer" + glass_desc = "A freezing pint of beer" + glass_center_of_mass = list("x"=16, "y"=8) + +/datum/reagent/ethanol/beer/affect_ingest(var/mob/living/carbon/M, var/alien, var/removed, var/location) + ..() + if(alien == IS_DIONA) + return + M.jitteriness = max(M.jitteriness - 3, 0) + +/datum/reagent/ethanol/bluecuracao + name = "Blue Curacao" + id = "bluecuracao" + description = "Exotically blue, fruity drink, distilled from oranges." + color = "#0000CD" + strength = 15 + + glass_icon_state = "curacaoglass" + glass_name = "glass of blue curacao" + glass_desc = "Exotically blue, fruity drink, distilled from oranges." + glass_center_of_mass = list("x"=16, "y"=5) + +/datum/reagent/ethanol/cognac + name = "Cognac" + id = "cognac" + description = "A sweet and strongly alchoholic drink, made after numerous distillations and years of maturing. Classy as fornication." + color = "#AB3C05" + strength = 15 + + glass_icon_state = "cognacglass" + glass_name = "glass of cognac" + glass_desc = "Damn, you feel like some kind of French aristocrat just by holding this." + glass_center_of_mass = list("x"=16, "y"=6) + +/datum/reagent/ethanol/deadrum + name = "Deadrum" + id = "deadrum" + description = "Popular with the sailors. Not very popular with everyone else." + color = "#664300" + strength = 50 + + glass_icon_state = "rumglass" + glass_name = "glass of rum" + glass_desc = "Now you want to Pray for a pirate suit, don't you?" + glass_center_of_mass = list("x"=16, "y"=12) + +/datum/reagent/ethanol/deadrum/affect_ingest(var/mob/living/carbon/M, var/alien, var/removed, var/location) + ..() + if(alien == IS_DIONA) + return + M.dizziness +=5 + +/datum/reagent/ethanol/gin + name = "Gin" + id = "gin" + description = "It's gin. In space. I say, good sir." + color = "#664300" + strength = 50 + + glass_icon_state = "ginvodkaglass" + glass_name = "glass of gin" + glass_desc = "A crystal clear glass of Griffeater gin." + glass_center_of_mass = list("x"=16, "y"=12) + +/datum/reagent/ethanol/kahlua + name = "Kahlua" + id = "kahlua" + description = "A widely known, Mexican coffee-flavoured liqueur. In production since 1936!" + color = "#664300" + strength = 15 + + glass_icon_state = "kahluaglass" + glass_name = "glass of RR coffee liquor" + glass_desc = "DAMN, THIS THING LOOKS ROBUST" + glass_center_of_mass = list("x"=15, "y"=7) + +/datum/reagent/ethanol/kahlua/affect_ingest(var/mob/living/carbon/M, var/alien, var/removed, var/location) + ..() + if(alien == IS_DIONA) + return + 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)) + M.make_jittery(5) + +/datum/reagent/ethanol/melonliquor + name = "Melon Liquor" + id = "melonliquor" + description = "A relatively sweet and fruity 46 proof liquor." + color = "#138808" // rgb: 19, 136, 8 + strength = 50 + + glass_icon_state = "emeraldglass" + glass_name = "glass of melon liquor" + glass_desc = "A relatively sweet and fruity 46 proof liquor." + glass_center_of_mass = list("x"=16, "y"=5) + +/datum/reagent/ethanol/rum + name = "Rum" + id = "rum" + description = "Yohoho and all that." + color = "#664300" + strength = 15 + + glass_icon_state = "rumglass" + glass_name = "glass of rum" + glass_desc = "Now you want to Pray for a pirate suit, don't you?" + glass_center_of_mass = list("x"=16, "y"=12) + +/datum/reagent/ethanol/sake + name = "Sake" + id = "sake" + description = "Anime's favorite drink." + color = "#664300" + strength = 25 + + glass_icon_state = "ginvodkaglass" + glass_name = "glass of sake" + glass_desc = "A glass of sake." + glass_center_of_mass = list("x"=16, "y"=12) + +/datum/reagent/ethanol/tequilla + name = "Tequila" + id = "tequilla" + description = "A strong and mildly flavoured, mexican produced spirit. Feeling thirsty hombre?" + color = "#FFFF91" + strength = 25 + + glass_icon_state = "tequillaglass" + glass_name = "glass of Tequilla" + glass_desc = "Now all that's missing is the weird colored shades!" + glass_center_of_mass = list("x"=16, "y"=12) + +/datum/reagent/ethanol/thirteenloko + name = "Thirteen Loko" + id = "thirteenloko" + description = "A potent mixture of caffeine and alcohol." + color = "#102000" + strength = 25 + nutriment_factor = 1 + + glass_icon_state = "thirteen_loko_glass" + glass_name = "glass of Thirteen Loko" + glass_desc = "This is a glass of Thirteen Loko, it appears to be of the highest quality. The drink, not the glass." + +/datum/reagent/ethanol/thirteenloko/affect_ingest(var/mob/living/carbon/M, var/alien, var/removed, var/location) + ..() + if(alien == IS_DIONA) + return + M.drowsyness = max(0, M.drowsyness - 7) + if (M.bodytemperature > 310) + M.bodytemperature = max(310, M.bodytemperature - (5 * TEMPERATURE_DAMAGE_COEFFICIENT)) + M.make_jittery(5) + +/datum/reagent/ethanol/vermouth + name = "Vermouth" + id = "vermouth" + description = "You suddenly feel a craving for a martini..." + color = "#91FF91" // rgb: 145, 255, 145 + strength = 15 + + glass_icon_state = "vermouthglass" + glass_name = "glass of vermouth" + glass_desc = "You wonder why you're even drinking this straight." + glass_center_of_mass = list("x"=16, "y"=12) + +/datum/reagent/ethanol/vodka + name = "Vodka" + id = "vodka" + description = "Number one drink AND fueling choice for Russians worldwide." + color = "#0064C8" // rgb: 0, 100, 200 + strength = 15 + + glass_icon_state = "ginvodkaglass" + glass_name = "glass of vodka" + glass_desc = "The glass contain wodka. Xynta." + glass_center_of_mass = list("x"=16, "y"=12) + +/datum/reagent/ethanol/vodka/affect_ingest(var/mob/living/carbon/M, var/alien, var/removed, var/location) + ..() + M.radiation = max(M.radiation - 1 * removed, 0) + +/datum/reagent/ethanol/whiskey + name = "Whiskey" + id = "whiskey" + description = "A superb and well-aged single-malt whiskey. Damn." + color = "#664300" + strength = 25 + + glass_icon_state = "whiskeyglass" + glass_name = "glass of whiskey" + glass_desc = "The silky, smokey whiskey goodness inside the glass makes the drink look very classy." + glass_center_of_mass = list("x"=16, "y"=12) + +/datum/reagent/ethanol/wine + name = "Wine" + id = "wine" + description = "An premium alchoholic beverage made from distilled grape juice." + color = "#7E4043" // rgb: 126, 64, 67 + strength = 15 + + glass_icon_state = "wineglass" + glass_name = "glass of wine" + glass_desc = "A very classy looking drink." + glass_center_of_mass = list("x"=15, "y"=7) + +// Cocktails + +/datum/reagent/ethanol/acid_spit + name = "Acid Spit" + id = "acidspit" + description = "A drink for the daring, can be deadly if incorrectly prepared!" + reagent_state = LIQUID + color = "#365000" + strength = 30 + + glass_icon_state = "acidspitglass" + glass_name = "glass of Acid Spit" + glass_desc = "A drink from Nanotrasen. Made from live aliens." + glass_center_of_mass = list("x"=16, "y"=7) + +/datum/reagent/ethanol/alliescocktail + name = "Allies Cocktail" + id = "alliescocktail" + description = "A drink made from your allies, not as sweet as when made from your enemies." + color = "#664300" + strength = 25 + + glass_icon_state = "alliescocktail" + glass_name = "glass of Allies cocktail" + glass_desc = "A drink made from your allies." + glass_center_of_mass = list("x"=17, "y"=8) + +/datum/reagent/ethanol/aloe + name = "Aloe" + id = "aloe" + description = "So very, very, very good." + color = "#664300" + strength = 15 + + glass_icon_state = "aloe" + glass_name = "glass of Aloe" + glass_desc = "Very, very, very good." + glass_center_of_mass = list("x"=17, "y"=8) + +/datum/reagent/ethanol/amasec + name = "Amasec" + id = "amasec" + description = "Official drink of the NanoTrasen Gun-Club!" + reagent_state = LIQUID + color = "#664300" + strength = 25 + + glass_icon_state = "amasecglass" + glass_name = "glass of Amasec" + glass_desc = "Always handy before COMBAT!!!" + glass_center_of_mass = list("x"=16, "y"=9) + +/datum/reagent/ethanol/andalusia + name = "Andalusia" + id = "andalusia" + description = "A nice, strangely named drink." + color = "#664300" + strength = 15 + + glass_icon_state = "andalusia" + glass_name = "glass of Andalusia" + glass_desc = "A nice, strange named drink." + glass_center_of_mass = list("x"=16, "y"=9) + +/datum/reagent/ethanol/antifreeze + name = "Anti-freeze" + id = "antifreeze" + description = "Ultimate refreshment." + color = "#664300" + strength = 12 + adj_temp = 20 + targ_temp = 330 + + glass_icon_state = "antifreeze" + glass_name = "glass of Anti-freeze" + glass_desc = "The ultimate refreshment." + glass_center_of_mass = list("x"=16, "y"=8) + +/datum/reagent/ethanol/atomicbomb + name = "Atomic Bomb" + id = "atomicbomb" + description = "Nuclear proliferation never tasted so good." + reagent_state = LIQUID + color = "#666300" + strength = 10 + druggy = 50 + + glass_icon_state = "atomicbombglass" + glass_name = "glass of Atomic Bomb" + glass_desc = "Nanotrasen cannot take legal responsibility for your actions after imbibing." + glass_center_of_mass = list("x"=15, "y"=7) + +/datum/reagent/ethanol/b52 + name = "B-52" + id = "b52" + description = "Coffee, Irish Cream, and cognac. You will get bombed." + color = "#664300" + strength = 12 + + glass_icon_state = "b52glass" + glass_name = "glass of B-52" + glass_desc = "Kahlua, Irish cream, and congac. You will get bombed." + +/datum/reagent/ethanol/bahama_mama + name = "Bahama mama" + id = "bahama_mama" + description = "Tropical cocktail." + color = "#FF7F3B" + strength = 25 + + glass_icon_state = "bahama_mama" + glass_name = "glass of Bahama Mama" + glass_desc = "Tropical cocktail" + glass_center_of_mass = list("x"=16, "y"=5) + +/datum/reagent/ethanol/bananahonk + name = "Banana Mama" + id = "bananahonk" + description = "A drink from Clown Heaven." + nutriment_factor = 1 + color = "#FFFF91" + strength = 12 + + glass_icon_state = "bananahonkglass" + glass_name = "glass of Banana Honk" + glass_desc = "A drink from Banana Heaven." + glass_center_of_mass = list("x"=16, "y"=8) + +/datum/reagent/ethanol/barefoot + name = "Barefoot" + id = "barefoot" + description = "Barefoot and pregnant" + color = "#664300" + strength = 30 + + glass_icon_state = "b&p" + glass_name = "glass of Barefoot" + glass_desc = "Barefoot and pregnant" + glass_center_of_mass = list("x"=17, "y"=8) + +/datum/reagent/ethanol/beepsky_smash + name = "Beepsky Smash" + id = "beepskysmash" + description = "Deny drinking this and prepare for THE LAW." + reagent_state = LIQUID + color = "#664300" + strength = 12 + + glass_icon_state = "beepskysmashglass" + glass_name = "Beepsky Smash" + glass_desc = "Heavy, hot and strong. Just like the Iron fist of the LAW." + glass_center_of_mass = list("x"=18, "y"=10) + +/datum/reagent/ethanol/beepsky_smash/affect_ingest(var/mob/living/carbon/M, var/alien, var/removed, var/location) + ..() + M.Stun(2) + +/datum/reagent/ethanol/bilk + name = "Bilk" + id = "bilk" + description = "This appears to be beer mixed with milk. Disgusting." + color = "#895C4C" + strength = 50 + nutriment_factor = 2 + + glass_icon_state = "glass_brown" + glass_name = "glass of bilk" + glass_desc = "A brew of milk and beer. For those alcoholics who fear osteoporosis." + +/datum/reagent/ethanol/black_russian + name = "Black Russian" + id = "blackrussian" + description = "For the lactose-intolerant. Still as classy as a White Russian." + color = "#360000" + strength = 15 + + glass_icon_state = "blackrussianglass" + glass_name = "glass of Black Russian" + glass_desc = "For the lactose-intolerant. Still as classy as a White Russian." + glass_center_of_mass = list("x"=16, "y"=9) + +/datum/reagent/ethanol/bloody_mary + name = "Bloody Mary" + id = "bloodymary" + description = "A strange yet pleasurable mixture made of vodka, tomato and lime juice. Or at least you THINK the red stuff is tomato juice." + color = "#664300" + strength = 15 + + glass_icon_state = "bloodymaryglass" + glass_name = "glass of Bloody Mary" + glass_desc = "Tomato juice, mixed with Vodka and a lil' bit of lime. Tastes like liquid murder." + +/datum/reagent/ethanol/booger + name = "Booger" + id = "booger" + description = "Ewww..." + color = "#8CFF8C" + strength = 30 + + glass_icon_state = "booger" + glass_name = "glass of Booger" + glass_desc = "Ewww..." + +/datum/reagent/ethanol/brave_bull + name = "Brave Bull" + id = "bravebull" + description = "It's just as effective as Dutch-Courage!" + color = "#664300" + strength = 15 + + glass_icon_state = "bravebullglass" + glass_name = "glass of Brave Bull" + glass_desc = "Tequilla and coffee liquor, brought together in a mouthwatering mixture. Drink up." + glass_center_of_mass = list("x"=15, "y"=8) + +/datum/reagent/ethanol/changelingsting + name = "Changeling Sting" + id = "changelingsting" + description = "You take a tiny sip and feel a burning sensation..." + color = "#2E6671" + strength = 10 + + glass_icon_state = "changelingsting" + glass_name = "glass of Changeling Sting" + glass_desc = "A stingy drink." + +/datum/reagent/ethanol/classicmartini + name = "Classic Martini" + id = "classicmartini" + description = "Vermouth with Gin. Not quite how 007 enjoyed it, but still delicious." + color = "#664300" + strength = 25 + + glass_icon_state = "martiniglass" + glass_name = "glass of classic martini" + glass_desc = "Damn, the bartender even stirred it, not shook it." + glass_center_of_mass = list("x"=17, "y"=8) + +/datum/reagent/ethanol/cuba_libre + name = "Cuba Libre" + id = "cubalibre" + description = "Rum, mixed with cola. Viva la revolucion." + color = "#3E1B00" + strength = 30 + + glass_icon_state = "cubalibreglass" + glass_name = "glass of Cuba Libre" + glass_desc = "A classic mix of rum and cola." + glass_center_of_mass = list("x"=16, "y"=8) + +/datum/reagent/ethanol/demonsblood + name = "Demons Blood" + id = "demonsblood" + description = "AHHHH!!!!" + color = "#820000" + strength = 15 + + glass_icon_state = "demonsblood" + glass_name = "glass of Demons' Blood" + glass_desc = "Just looking at this thing makes the hair at the back of your neck stand up." + glass_center_of_mass = list("x"=16, "y"=2) + +/datum/reagent/ethanol/devilskiss + name = "Devils Kiss" + id = "devilskiss" + description = "Creepy time!" + color = "#A68310" + strength = 15 + + glass_icon_state = "devilskiss" + glass_name = "glass of Devil's Kiss" + glass_desc = "Creepy time!" + glass_center_of_mass = list("x"=16, "y"=8) + +/datum/reagent/ethanol/driestmartini + name = "Driest Martini" + id = "driestmartini" + description = "Only for the experienced. You think you see sand floating in the glass." + nutriment_factor = 1 + color = "#2E6671" + strength = 12 + + glass_icon_state = "driestmartiniglass" + glass_name = "glass of Driest Martini" + glass_desc = "Only for the experienced. You think you see sand floating in the glass." + glass_center_of_mass = list("x"=17, "y"=8) + +/datum/reagent/ethanol/ginfizz + name = "Gin Fizz" + id = "ginfizz" + description = "Refreshingly lemony, deliciously dry." + color = "#664300" + strength = 30 + + glass_icon_state = "ginfizzglass" + glass_name = "glass of gin fizz" + glass_desc = "Refreshingly lemony, deliciously dry." + glass_center_of_mass = list("x"=16, "y"=7) + +/datum/reagent/ethanol/grog + name = "Grog" + id = "grog" + description = "Watered down rum, NanoTrasen approves!" + reagent_state = LIQUID + color = "#664300" + strength = 100 + + glass_icon_state = "grogglass" + glass_name = "glass of grog" + glass_desc = "A fine and cepa drink for Space." + +/datum/reagent/ethanol/erikasurprise + name = "Erika Surprise" + id = "erikasurprise" + description = "The surprise is, it's green!" + color = "#2E6671" + strength = 15 + + glass_icon_state = "erikasurprise" + glass_name = "glass of Erika Surprise" + glass_desc = "The surprise is, it's green!" + glass_center_of_mass = list("x"=16, "y"=9) + +/datum/reagent/ethanol/gargle_blaster + name = "Pan-Galactic Gargle Blaster" + id = "gargleblaster" + description = "Whoah, this stuff looks volatile!" + reagent_state = LIQUID + color = "#664300" + strength = 10 + + glass_icon_state = "gargleblasterglass" + glass_name = "glass of Pan-Galactic Gargle Blaster" + glass_desc = "Does... does this mean that Arthur and Ford are on the station? Oh joy." + glass_center_of_mass = list("x"=17, "y"=6) + +/datum/reagent/ethanol/gintonic + name = "Gin and Tonic" + id = "gintonic" + description = "An all time classic, mild cocktail." + color = "#664300" + strength = 50 + + glass_icon_state = "gintonicglass" + glass_name = "glass of gin and tonic" + glass_desc = "A mild but still great cocktail. Drink up, like a true Englishman." + glass_center_of_mass = list("x"=16, "y"=7) + +/datum/reagent/ethanol/goldschlager + name = "Goldschlager" + id = "goldschlager" + description = "100 proof cinnamon schnapps, made for alcoholic teen girls on spring break." + color = "#664300" + strength = 15 + + glass_icon_state = "ginvodkaglass" + glass_name = "glass of Goldschlager" + glass_desc = "100 proof that teen girls will drink anything with gold in it." + glass_center_of_mass = list("x"=16, "y"=12) + +/datum/reagent/ethanol/hippies_delight + name = "Hippies' Delight" + id = "hippiesdelight" + description = "You just don't get it maaaan." + reagent_state = LIQUID + color = "#664300" + strength = 15 + druggy = 50 + + glass_icon_state = "hippiesdelightglass" + glass_name = "glass of Hippie's Delight" + glass_desc = "A drink enjoyed by people during the 1960's." + glass_center_of_mass = list("x"=16, "y"=8) + +/datum/reagent/ethanol/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?" + color = "#664300" + strength = 25 + toxicity = 2 + + glass_icon_state = "glass_brown2" + glass_name = "glass of Hooch" + glass_desc = "You've really hit rock bottom now... your liver packed its bags and left last night." + +/datum/reagent/ethanol/iced_beer + name = "Iced Beer" + id = "iced_beer" + description = "A beer which is so cold the air around it freezes." + color = "#664300" + strength = 50 + adj_temp = -20 + targ_temp = 270 + + glass_icon_state = "iced_beerglass" + glass_name = "glass of iced beer" + glass_desc = "A beer so frosty, the air around it freezes." + glass_center_of_mass = list("x"=16, "y"=7) + +/datum/reagent/ethanol/irishcarbomb + name = "Irish Car Bomb" + id = "irishcarbomb" + description = "Mmm, tastes like chocolate cake..." + color = "#2E6671" + strength = 15 + + glass_icon_state = "irishcarbomb" + glass_name = "glass of Irish Car Bomb" + glass_desc = "An irish car bomb." + glass_center_of_mass = list("x"=16, "y"=8) + +/datum/reagent/ethanol/irishcoffee + name = "Irish Coffee" + id = "irishcoffee" + description = "Coffee, and alcohol. More fun than a Mimosa to drink in the morning." + color = "#664300" + strength = 15 + + glass_icon_state = "irishcoffeeglass" + glass_name = "glass of Irish coffee" + glass_desc = "Coffee and alcohol. More fun than a Mimosa to drink in the morning." + glass_center_of_mass = list("x"=15, "y"=10) + +/datum/reagent/ethanol/irish_cream + name = "Irish Cream" + id = "irishcream" + description = "Whiskey-imbued cream, what else would you expect from the Irish." + color = "#664300" + strength = 25 + + glass_icon_state = "irishcreamglass" + glass_name = "glass of Irish cream" + glass_desc = "It's cream, mixed with whiskey. What else would you expect from the Irish?" + glass_center_of_mass = list("x"=16, "y"=9) + +/datum/reagent/ethanol/longislandicedtea + name = "Long Island Iced Tea" + id = "longislandicedtea" + description = "The liquor cabinet, brought together in a delicious mix. Intended for middle-aged alcoholic women only." + color = "#664300" + strength = 12 + + glass_icon_state = "longislandicedteaglass" + glass_name = "glass of Long Island iced tea" + glass_desc = "The liquor cabinet, brought together in a delicious mix. Intended for middle-aged alcoholic women only." + glass_center_of_mass = list("x"=16, "y"=8) + +/datum/reagent/ethanol/manhattan + name = "Manhattan" + id = "manhattan" + description = "The Detective's undercover drink of choice. He never could stomach gin..." + color = "#664300" + strength = 15 + + glass_icon_state = "manhattanglass" + glass_name = "glass of Manhattan" + glass_desc = "The Detective's undercover drink of choice. He never could stomach gin..." + glass_center_of_mass = list("x"=17, "y"=8) + +/datum/reagent/ethanol/manhattan_proj + name = "Manhattan Project" + id = "manhattan_proj" + description = "A scientist's drink of choice, for pondering ways to blow up the station." + color = "#664300" + strength = 10 + druggy = 30 + + glass_icon_state = "proj_manhattanglass" + glass_name = "glass of Manhattan Project" + glass_desc = "A scienitst drink of choice, for thinking how to blow up the station." + glass_center_of_mass = list("x"=17, "y"=8) + +/datum/reagent/ethanol/manly_dorf + name = "The Manly Dorf" + id = "manlydorf" + description = "Beer and Ale, brought together in a delicious mix. Intended for true men only." + color = "#664300" + strength = 25 + + glass_icon_state = "manlydorfglass" + glass_name = "glass of The Manly Dorf" + glass_desc = "A manly concotion made from Ale and Beer. Intended for true men only." + +/datum/reagent/ethanol/margarita + name = "Margarita" + id = "margarita" + description = "On the rocks with salt on the rim. Arriba~!" + color = "#8CFF8C" + strength = 15 + + glass_icon_state = "margaritaglass" + glass_name = "glass of margarita" + glass_desc = "On the rocks with salt on the rim. Arriba~!" + glass_center_of_mass = list("x"=16, "y"=8) + +/datum/reagent/ethanol/mead + name = "Mead" + id = "mead" + description = "A Viking's drink, though a cheap one." + reagent_state = LIQUID + color = "#664300" + strength = 30 + nutriment_factor = 1 + + glass_icon_state = "meadglass" + glass_name = "glass of mead" + glass_desc = "A Viking's beverage, though a cheap one." + glass_center_of_mass = list("x"=17, "y"=10) + +/datum/reagent/ethanol/moonshine + name = "Moonshine" + id = "moonshine" + description = "You've really hit rock bottom now... your liver packed its bags and left last night." + color = "#664300" + strength = 12 + + glass_icon_state = "glass_clear" + glass_name = "glass of moonshine" + glass_desc = "You've really hit rock bottom now... your liver packed its bags and left last night." + +/datum/reagent/ethanol/neurotoxin + name = "Neurotoxin" + id = "neurotoxin" + description = "A strong neurotoxin that puts the subject into a death-like state." + reagent_state = LIQUID + color = "#2E2E61" + strength = 10 + + glass_icon_state = "neurotoxinglass" + glass_name = "glass of Neurotoxin" + glass_desc = "A drink that is guaranteed to knock you silly." + glass_center_of_mass = list("x"=16, "y"=8) + +/datum/reagent/ethanol/neurotoxin/affect_ingest(var/mob/living/carbon/M, var/alien, var/removed, var/location) + ..() + M.Weaken(3) + +/datum/reagent/ethanol/patron + name = "Patron" + id = "patron" + description = "Tequila with silver in it, a favorite of alcoholic women in the club scene." + color = "#585840" + strength = 30 + + glass_icon_state = "patronglass" + glass_name = "glass of Patron" + glass_desc = "Drinking patron in the bar, with all the subpar ladies." + glass_center_of_mass = list("x"=7, "y"=8) + +/datum/reagent/ethanol/pwine + name = "Poison Wine" + id = "pwine" + description = "Is this even wine? Toxic! Hallucinogenic! Probably consumed in boatloads by your superiors!" + color = "#000000" + strength = 10 + druggy = 50 + halluci = 10 + + glass_icon_state = "pwineglass" + glass_name = "glass of ???" + glass_desc = "A black ichor with an oily purple sheer on top. Are you sure you should drink this?" + glass_center_of_mass = list("x"=16, "y"=5) + +/datum/reagent/ethanol/pwine/affect_ingest(var/mob/living/carbon/M, var/alien, var/removed, var/location) + ..() + if(dose > 30) + M.adjustToxLoss(2 * removed) + if(dose > 60 && ishuman(M) && prob(5)) + var/mob/living/carbon/human/H = M + var/obj/item/organ/heart/L = H.internal_organs_by_name["heart"] + if (L && istype(L)) + if(dose < 120) + L.take_damage(10 * removed, 0) + else + L.take_damage(100, 0) + +/datum/reagent/ethanol/red_mead + name = "Red Mead" + id = "red_mead" + description = "The true Viking's drink! Even though it has a strange red color." + color = "#C73C00" + strength = 30 + + glass_icon_state = "red_meadglass" + glass_name = "glass of red mead" + glass_desc = "A true Viking's beverage, though its color is strange." + glass_center_of_mass = list("x"=17, "y"=10) + +/datum/reagent/ethanol/sbiten + name = "Sbiten" + id = "sbiten" + description = "A spicy Vodka! Might be a little hot for the little guys!" + color = "#664300" + strength = 15 + adj_temp = 50 + targ_temp = 360 + + glass_icon_state = "sbitenglass" + glass_name = "glass of Sbiten" + glass_desc = "A spicy mix of Vodka and Spice. Very hot." + glass_center_of_mass = list("x"=17, "y"=8) + +/datum/reagent/ethanol/screwdrivercocktail + name = "Screwdriver" + id = "screwdrivercocktail" + description = "Vodka, mixed with plain ol' orange juice. The result is surprisingly delicious." + color = "#A68310" + strength = 15 + + glass_icon_state = "screwdriverglass" + glass_name = "glass of Screwdriver" + glass_desc = "A simple, yet superb mixture of Vodka and orange juice. Just the thing for the tired engineer." + glass_center_of_mass = list("x"=15, "y"=10) + +/datum/reagent/ethanol/silencer + name = "Silencer" + id = "silencer" + description = "A drink from Mime Heaven." + nutriment_factor = 1 + color = "#664300" + strength = 12 + + glass_icon_state = "silencerglass" + glass_name = "glass of Silencer" + glass_desc = "A drink from mime Heaven." + glass_center_of_mass = list("x"=16, "y"=9) + +/datum/reagent/ethanol/singulo + name = "Singulo" + id = "singulo" + description = "A blue-space beverage!" + color = "#2E6671" + strength = 10 + + glass_icon_state = "singulo" + glass_name = "glass of Singulo" + glass_desc = "A blue-space beverage." + glass_center_of_mass = list("x"=17, "y"=4) + +/datum/reagent/ethanol/snowwhite + name = "Snow White" + id = "snowwhite" + description = "A cold refreshment" + color = "#FFFFFF" + strength = 30 + + glass_icon_state = "snowwhite" + glass_name = "glass of Snow White" + glass_desc = "A cold refreshment." + glass_center_of_mass = list("x"=16, "y"=8) + +/datum/reagent/ethanol/suidream + name = "Sui Dream" + id = "suidream" + description = "Comprised of: White soda, blue curacao, melon liquor." + color = "#00A86B" + strength = 100 + + glass_icon_state = "sdreamglass" + glass_name = "glass of Sui Dream" + glass_desc = "A froofy, fruity, and sweet mixed drink. Understanding the name only brings shame." + glass_center_of_mass = list("x"=16, "y"=5) + +/datum/reagent/ethanol/syndicatebomb + name = "Syndicate Bomb" + id = "syndicatebomb" + description = "Tastes like terrorism!" + color = "#2E6671" + strength = 10 + + glass_icon_state = "syndicatebomb" + glass_name = "glass of Syndicate Bomb" + glass_desc = "Tastes like terrorism!" + glass_center_of_mass = list("x"=16, "y"=4) + +/datum/reagent/ethanol/tequilla_sunrise + name = "Tequila Sunrise" + id = "tequillasunrise" + description = "Tequila and orange juice. Much like a Screwdriver, only Mexican~" + color = "#FFE48C" + strength = 25 + + glass_icon_state = "tequillasunriseglass" + glass_name = "glass of Tequilla Sunrise" + glass_desc = "Oh great, now you feel nostalgic about sunrises back on Terra..." + +/datum/reagent/ethanol/threemileisland + name = "Three Mile Island Iced Tea" + id = "threemileisland" + description = "Made for a woman, strong enough for a man." + color = "#666340" + strength = 10 + druggy = 50 + + glass_icon_state = "threemileislandglass" + glass_name = "glass of Three Mile Island iced tea" + glass_desc = "A glass of this is sure to prevent a meltdown." + glass_center_of_mass = list("x"=16, "y"=2) + +/datum/reagent/ethanol/toxins_special + name = "Toxins Special" + id = "phoronspecial" + description = "This thing is ON FIRE! CALL THE DAMN SHUTTLE!" + reagent_state = LIQUID + color = "#664300" + strength = 10 + adj_temp = 15 + targ_temp = 330 + + glass_icon_state = "toxinsspecialglass" + glass_name = "glass of Toxins Special" + glass_desc = "Whoah, this thing is on FIRE" + +/datum/reagent/ethanol/vodkamartini + name = "Vodka Martini" + id = "vodkamartini" + description = "Vodka with Gin. Not quite how 007 enjoyed it, but still delicious." + color = "#664300" + strength = 12 + + glass_icon_state = "martiniglass" + glass_name = "glass of vodka martini" + glass_desc ="A bastardisation of the classic martini. Still great." + glass_center_of_mass = list("x"=17, "y"=8) + +/datum/reagent/ethanol/vodkatonic + name = "Vodka and Tonic" + id = "vodkatonic" + description = "For when a gin and tonic isn't russian enough." + color = "#0064C8" // rgb: 0, 100, 200 + strength = 15 + + glass_icon_state = "vodkatonicglass" + glass_name = "glass of vodka and tonic" + glass_desc = "For when a gin and tonic isn't Russian enough." + glass_center_of_mass = list("x"=16, "y"=7) + +/datum/reagent/ethanol/white_russian + name = "White Russian" + id = "whiterussian" + description = "That's just, like, your opinion, man..." + color = "#A68340" + strength = 15 + + glass_icon_state = "whiterussianglass" + glass_name = "glass of White Russian" + glass_desc = "A very nice looking drink. But that's just, like, your opinion, man." + glass_center_of_mass = list("x"=16, "y"=9) + +/datum/reagent/ethanol/whiskey_cola + name = "Whiskey Cola" + id = "whiskeycola" + description = "Whiskey, mixed with cola. Surprisingly refreshing." + color = "#3E1B00" + strength = 25 + + glass_icon_state = "whiskeycolaglass" + glass_name = "glass of whiskey cola" + glass_desc = "An innocent-looking mixture of cola and Whiskey. Delicious." + glass_center_of_mass = list("x"=16, "y"=9) + +/datum/reagent/ethanol/whiskeysoda + name = "Whiskey Soda" + id = "whiskeysoda" + description = "For the more refined griffon." + color = "#664300" + strength = 15 + + glass_icon_state = "whiskeysodaglass2" + glass_name = "glass of whiskey soda" + glass_desc = "Ultimate refreshment." + glass_center_of_mass = list("x"=16, "y"=9) + +/datum/reagent/ethanol/specialwhiskey // I have no idea what this is and where it comes from + name = "Special Blend Whiskey" + id = "specialwhiskey" + description = "Just when you thought regular station whiskey was good... This silky, amber goodness has to come along and ruin everything." + color = "#664300" + strength = 25 + + glass_icon_state = "whiskeyglass" + glass_name = "glass of special blend whiskey" + glass_desc = "Just when you thought regular station whiskey was good... This silky, amber goodness has to come along and ruin everything." + glass_center_of_mass = list("x"=16, "y"=12) diff --git a/code/modules/reagents/Chemistry-Reagents/Chemistry-Reagents-Medicine.dm b/code/modules/reagents/Chemistry-Reagents/Chemistry-Reagents-Medicine.dm new file mode 100644 index 0000000000..8a5396cc51 --- /dev/null +++ b/code/modules/reagents/Chemistry-Reagents/Chemistry-Reagents-Medicine.dm @@ -0,0 +1,493 @@ +/* General medicine */ + +/datum/reagent/inaprovaline + name = "Inaprovaline" + id = "inaprovaline" + description = "Inaprovaline is a synaptic stimulant and cardiostimulant. Commonly used to stabilize patients." + reagent_state = LIQUID + color = "#00BFFF" + overdose = REAGENTS_OVERDOSE * 2 + metabolism = REM * 0.5 + scannable = 1 + +/datum/reagent/inaprovaline/affect_blood(var/mob/living/carbon/M, var/alien, var/removed, var/location) + if(alien != IS_DIONA) + M.add_chemical_effect(CE_STABLE) + M.add_chemical_effect(CE_PAINKILLER, 25) + +/datum/reagent/bicaridine + name = "Bicaridine" + id = "bicaridine" + description = "Bicaridine is an analgesic medication and can be used to treat blunt trauma." + reagent_state = LIQUID + color = "#BF0000" + overdose = REAGENTS_OVERDOSE + scannable = 1 + +/datum/reagent/bicaridine/affect_blood(var/mob/living/carbon/M, var/alien, var/removed, var/location) + if(alien != IS_DIONA) + M.heal_organ_damage(6 * removed, 0) + +/datum/reagent/kelotane + name = "Kelotane" + id = "kelotane" + description = "Kelotane is a drug used to treat burns." + reagent_state = LIQUID + color = "#FFA800" + overdose = REAGENTS_OVERDOSE + scannable = 1 + +/datum/reagent/kelotane/affect_blood(var/mob/living/carbon/M, var/alien, var/removed, var/location) + if(alien != IS_DIONA) + M.heal_organ_damage(0, 6 * removed) + +/datum/reagent/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 = "#FF8000" + overdose = REAGENTS_OVERDOSE * 0.5 + scannable = 1 + +/datum/reagent/dermaline/affect_blood(var/mob/living/carbon/M, var/alien, var/removed, var/location) + if(alien != IS_DIONA) + M.heal_organ_damage(0, 12 * removed) + +/datum/reagent/dylovene + name = "Dylovene" + id = "anti_toxin" + description = "Dylovene is a broad-spectrum antitoxin." + reagent_state = LIQUID + color = "#00A000" + scannable = 1 + +/datum/reagent/dylovene/affect_blood(var/mob/living/carbon/M, var/alien, var/removed, var/location) + if(alien != IS_DIONA) + M.drowsyness = max(0, M.drowsyness - 6 * removed) + M.hallucination = max(0, M.hallucination - 9 * removed) + M.adjustToxLoss(-4 * removed) + +/datum/reagent/dexalin + name = "Dexalin" + id = "dexalin" + description = "Dexalin is used in the treatment of oxygen deprivation." + reagent_state = LIQUID + color = "#0080FF" + overdose = REAGENTS_OVERDOSE + scannable = 1 + +/datum/reagent/dexalin/affect_blood(var/mob/living/carbon/M, var/alien, var/removed, var/location) + if(alien == IS_VOX) + M.adjustToxLoss(removed * 6) + else if(alien != IS_DIONA) + M.adjustOxyLoss(-15 * removed) + + holder.remove_reagent("lexorin", 2 * removed) + +/datum/reagent/dexalinp + name = "Dexalin Plus" + id = "dexalinp" + description = "Dexalin Plus is used in the treatment of oxygen deprivation. It is highly effective." + reagent_state = LIQUID + color = "#0040FF" + overdose = REAGENTS_OVERDOSE * 0.5 + scannable = 1 + +/datum/reagent/dexalin/affect_blood(var/mob/living/carbon/M, var/alien, var/removed, var/location) + if(alien == IS_VOX) + M.adjustToxLoss(removed * 9) + else if(alien != IS_DIONA) + M.adjustOxyLoss(-300 * removed) + + holder.remove_reagent("lexorin", 3 * removed) + +/datum/reagent/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 = "#8040FF" + scannable = 1 + +/datum/reagent/tricordrazine/affect_blood(var/mob/living/carbon/M, var/alien, var/removed, var/location) + if(alien != IS_DIONA) + M.adjustOxyLoss(-6 * removed) + M.heal_organ_damage(3 * removed, 3 * removed) + M.adjustToxLoss(-3 * removed) + +/datum/reagent/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 = "#8080FF" + metabolism = REM * 0.5 + scannable = 1 + +/datum/reagent/cryoxadone/affect_blood(var/mob/living/carbon/M, var/alien, var/removed, var/location) + if(M.bodytemperature < 170) + M.adjustCloneLoss(-10 * removed) + M.adjustOxyLoss(-10 * removed) + M.heal_organ_damage(10 * removed, 10 * removed) + M.adjustToxLoss(-10 * removed) + +/datum/reagent/clonexadone + name = "Clonexadone" + id = "clonexadone" + description = "A liquid compound similar to that used in the cloning process. Can be used to 'finish' the cloning process when used in conjunction with a cryo tube." + reagent_state = LIQUID + color = "#80BFFF" + metabolism = REM * 0.5 + scannable = 1 + +/datum/reagent/cryoxadone/affect_blood(var/mob/living/carbon/M, var/alien, var/removed, var/location) + if(M.bodytemperature < 170) + M.adjustCloneLoss(-30 * removed) + M.adjustOxyLoss(-3 * removed) + M.heal_organ_damage(30 * removed, 30 * removed) + M.adjustToxLoss(-30 * removed) + +/* Painkillers */ + +/datum/reagent/paracetamol + name = "Paracetamol" + id = "paracetamol" + description = "Most probably know this as Tylenol, but this chemical is a mild, simple painkiller." + reagent_state = LIQUID + color = "#C8A5DC" + overdose = 60 + scannable = 1 + metabolism = 0.02 + +/datum/reagent/paracetamol/affect_blood(var/mob/living/carbon/M, var/alien, var/removed, var/location) + M.add_chemical_effect(CE_PAINKILLER, 50) + +/datum/reagent/paracetamol/overdose(var/mob/living/carbon/M, var/alien) + ..() + M.hallucination = max(M.hallucination, 2) + +/datum/reagent/tramadol + name = "Tramadol" + id = "tramadol" + description = "A simple, yet effective painkiller." + reagent_state = LIQUID + color = "#CB68FC" + overdose = 30 + scannable = 1 + metabolism = 0.02 + +/datum/reagent/tramadol/affect_blood(var/mob/living/carbon/M, var/alien, var/removed, var/location) + M.add_chemical_effect(CE_PAINKILLER, 80) + +/datum/reagent/tramadol/overdose(var/mob/living/carbon/M, var/alien) + ..() + M.hallucination = max(M.hallucination, 2) + +/datum/reagent/oxycodone + name = "Oxycodone" + id = "oxycodone" + description = "An effective and very addictive painkiller." + reagent_state = LIQUID + color = "#800080" + overdose = 20 + metabolism = 0.02 + +/datum/reagent/oxycodone/affect_blood(var/mob/living/carbon/M, var/alien, var/removed, var/location) + M.add_chemical_effect(CE_PAINKILLER, 200) + +/datum/reagent/oxycodone/overdose(var/mob/living/carbon/M, var/alien) + ..() + M.druggy = max(M.druggy, 10) + M.hallucination = max(M.hallucination, 3) + +/* Other medicine */ + +/datum/reagent/synaptizine + name = "Synaptizine" + id = "synaptizine" + description = "Synaptizine is used to treat various diseases." + reagent_state = LIQUID + color = "#99CCFF" + metabolism = REM * 0.05 + overdose = REAGENTS_OVERDOSE + scannable = 1 + +/datum/reagent/synaptizine/affect_blood(var/mob/living/carbon/M, var/alien, var/removed, var/location) + if(alien == IS_DIONA) + return + M.drowsyness = max(M.drowsyness - 5, 0) + M.AdjustParalysis(-1) + M.AdjustStunned(-1) + M.AdjustWeakened(-1) + holder.remove_reagent("mindbreaker", 5) + M.hallucination = max(0, M.hallucination - 10) + M.adjustToxLoss(5 * removed) // It used to be incredibly deadly due to an oversight. Not anymore! + M.add_chemical_effect(CE_PAINKILLER, 40) + +/datum/reagent/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 = "#FFFF66" + metabolism = REM * 0.25 + overdose = REAGENTS_OVERDOSE + scannable = 1 + +/datum/reagent/alkysine/affect_blood(var/mob/living/carbon/M, var/alien, var/removed, var/location) + if(alien == IS_DIONA) + return + M.adjustBrainLoss(-30 * removed) + M.add_chemical_effect(CE_PAINKILLER, 10) + +/datum/reagent/imidazoline + name = "Imidazoline" + id = "imidazoline" + description = "Heals eye damage" + reagent_state = LIQUID + color = "#C8A5DC" + overdose = REAGENTS_OVERDOSE + scannable = 1 + +/datum/reagent/imidazoline/affect_blood(var/mob/living/carbon/M, var/alien, var/removed, var/location) + M.eye_blurry = max(M.eye_blurry - 5, 0) + M.eye_blind = max(M.eye_blind - 5, 0) + if(ishuman(M)) + var/mob/living/carbon/human/H = M + var/obj/item/organ/eyes/E = H.internal_organs_by_name["eyes"] + if(E && istype(E)) + if(E.damage > 0) + E.damage = max(E.damage - 5 * removed, 0) + +/datum/reagent/peridaxon + name = "Peridaxon" + id = "peridaxon" + description = "Used to encourage recovery of internal organs and nervous systems. Medicate cautiously." + reagent_state = LIQUID + color = "#561EC3" + overdose = 10 + scannable = 1 + +/datum/reagent/peridaxon/affect_blood(var/mob/living/carbon/M, var/alien, var/removed, var/location) + if(ishuman(M)) + var/mob/living/carbon/human/H = M + + for(var/obj/item/organ/I in H.internal_organs) + if((I.damage > 0) && (I.robotic != 2)) //Peridaxon heals only non-robotic organs + I.damage = max(I.damage - removed, 0) + +/datum/reagent/ryetalyn + name = "Ryetalyn" + id = "ryetalyn" + description = "Ryetalyn can cure all genetic abnomalities via a catalytic process." + reagent_state = SOLID + color = "#004000" + overdose = REAGENTS_OVERDOSE + +/datum/reagent/ryetalyn/affect_blood(var/mob/living/carbon/M, var/alien, var/removed, var/location) + var/needs_update = M.mutations.len > 0 + + M.mutations = list() + M.disabilities = 0 + M.sdisabilities = 0 + + // Might need to update appearance for hulk etc. + if(needs_update && ishuman(M)) + var/mob/living/carbon/human/H = M + H.update_mutations() + +/datum/reagent/hyperzine + name = "Hyperzine" + id = "hyperzine" + description = "Hyperzine is a highly effective, long lasting, muscle stimulant." + reagent_state = LIQUID + color = "#FF3300" + metabolism = REM * 0.15 + overdose = REAGENTS_OVERDOSE * 0.5 + +/datum/reagent/hyperzine/affect_blood(var/mob/living/carbon/M, var/alien, var/removed, var/location) + if(alien == IS_DIONA) + return + if(prob(5)) + M.emote(pick("twitch", "blink_r", "shiver")) + M.add_chemical_effect(CE_SPEEDBOOST, 1) + +/datum/reagent/ethylredoxrazine + name = "Ethylredoxrazine" + id = "ethylredoxrazine" + description = "A powerful oxidizer that reacts with ethanol." + reagent_state = SOLID + color = "#605048" + overdose = REAGENTS_OVERDOSE + +/datum/reagent/ethylredoxrazine/affect_blood(var/mob/living/carbon/M, var/alien, var/removed, var/location) + if(alien == IS_DIONA) + return + M.dizziness = 0 + M.drowsyness = 0 + M.stuttering = 0 + M.confused = 0 + if(M.ingested) + for(var/datum/reagent/R in M.ingested) + if(istype(R, /datum/reagent/ethanol)) + R.dose = max(R.dose - removed * 5, 0) + +/datum/reagent/hyronalin + name = "Hyronalin" + id = "hyronalin" + description = "Hyronalin is a medicinal drug used to counter the effect of radiation poisoning." + reagent_state = LIQUID + color = "#408000" + metabolism = REM * 0.25 + overdose = REAGENTS_OVERDOSE + scannable = 1 + +/datum/reagent/hyronalin/affect_blood(var/mob/living/carbon/M, var/alien, var/removed, var/location) + M.radiation = max(M.radiation - 30 * removed, 0) + +/datum/reagent/arithrazine + name = "Arithrazine" + id = "arithrazine" + description = "Arithrazine is an unstable medication used for the most extreme cases of radiation poisoning." + reagent_state = LIQUID + color = "#008000" + metabolism = REM * 0.25 + overdose = REAGENTS_OVERDOSE + scannable = 1 + +/datum/reagent/arithrazine/affect_blood(var/mob/living/carbon/M, var/alien, var/removed, var/location) + M.radiation = max(M.radiation - 70 * removed, 0) + M.adjustToxLoss(-10 * removed) + if(prob(60)) + M.take_organ_damage(4 * removed, 0) + +/datum/reagent/spaceacillin + name = "Spaceacillin" + id = "spaceacillin" + description = "An all-purpose antiviral agent." + reagent_state = LIQUID + color = "#C1C1C1" + metabolism = REM * 0.05 + overdose = REAGENTS_OVERDOSE + scannable = 1 + +/datum/reagent/sterilizine + name = "Sterilizine" + id = "sterilizine" + description = "Sterilizes wounds in preparation for surgery." + reagent_state = LIQUID + color = "#C8A5DC" + touch_met = 5 + +/datum/reagent/sterilizine/affect_touch(var/mob/living/carbon/M, var/alien, var/removed, var/location) + M.germ_level -= min(removed*20, M.germ_level) + +/datum/reagent/sterilizine/touch_obj(var/obj/O) + O.germ_level -= min(volume*20, O.germ_level) + +/datum/reagent/sterilizine/touch_turf(var/turf/T) + T.germ_level -= min(volume*20, T.germ_level) + +/datum/reagent/leporazine + name = "Leporazine" + id = "leporazine" + description = "Leporazine can be use to stabilize an individuals body temperature." + reagent_state = LIQUID + color = "#C8A5DC" + overdose = REAGENTS_OVERDOSE + scannable = 1 + +/datum/reagent/leporazine/affect_blood(var/mob/living/carbon/M, var/alien, var/removed, var/location) + if(M.bodytemperature > 310) + M.bodytemperature = max(310, M.bodytemperature - (40 * TEMPERATURE_DAMAGE_COEFFICIENT)) + else if(M.bodytemperature < 311) + M.bodytemperature = min(310, M.bodytemperature + (40 * TEMPERATURE_DAMAGE_COEFFICIENT)) + +/* Antidepressants */ + +#define ANTIDEPRESSANT_MESSAGE_DELAY 5*60*10 + +/datum/reagent/methylphenidate + name = "Methylphenidate" + id = "methylphenidate" + description = "Improves the ability to concentrate." + reagent_state = LIQUID + color = "#BF80BF" + metabolism = 0.01 + data = 0 + +/datum/reagent/methylphenidate/affect_blood(var/mob/living/carbon/M, var/alien, var/removed, var/location) + if(alien == IS_DIONA) + return + if(volume <= 0.1 && data != -1) + data = -1 + M << "You lose focus..." + else + if(world.time > data + ANTIDEPRESSANT_MESSAGE_DELAY) + data = world.time + M << "Your mind feels focused and undivided." + +/datum/reagent/citalopram + name = "Citalopram" + id = "citalopram" + description = "Stabilizes the mind a little." + reagent_state = LIQUID + color = "#FF80FF" + metabolism = 0.01 + data = 0 + +/datum/reagent/citalopram/affect_blood(var/mob/living/carbon/M, var/alien, var/removed, var/location) + if(alien == IS_DIONA) + return + if(volume <= 0.1 && data != -1) + data = -1 + M << "Your mind feels a little less stable..." + else + if(world.time > data + ANTIDEPRESSANT_MESSAGE_DELAY) + data = world.time + M << "Your mind feels stable... a little stable." + +/datum/reagent/paroxetine + name = "Paroxetine" + id = "paroxetine" + description = "Stabilizes the mind greatly, but has a chance of adverse effects." + reagent_state = LIQUID + color = "#FF80BF" + metabolism = 0.01 + data = 0 + +/datum/reagent/paroxetine/affect_blood(var/mob/living/carbon/M, var/alien, var/removed, var/location) + if(alien == IS_DIONA) + return + if(volume <= 0.1 && data != -1) + data = -1 + M << "Your mind feels much less stable..." + else + if(world.time > data + ANTIDEPRESSANT_MESSAGE_DELAY) + data = world.time + if(prob(90)) + M << "Your mind feels much more stable." + else + M << "Your mind breaks apart..." + M.hallucination += 200 + +/datum/reagent/rezadone + name = "Rezadone" + id = "rezadone" + description = "A powder with almost magical properties, this substance can effectively treat genetic damage in humanoids, though excessive consumption has side effects." + reagent_state = SOLID + color = "#669900" + overdose = REAGENTS_OVERDOSE + scannable = 1 + +/datum/reagent/rezadone/affect_blood(var/mob/living/carbon/M, var/alien, var/removed, var/location) + M.adjustCloneLoss(-20 * removed) + M.adjustOxyLoss(-2 * removed) + M.heal_organ_damage(20 * removed, 20 * removed) + M.adjustToxLoss(-20 * removed) + if(dose > 3) + M.status_flags &= ~DISFIGURED + if(dose > 10) + M.make_dizzy(5) + M.make_jittery(5) diff --git a/code/modules/reagents/Chemistry-Reagents/Chemistry-Reagents-Other.dm b/code/modules/reagents/Chemistry-Reagents/Chemistry-Reagents-Other.dm new file mode 100644 index 0000000000..442a75803f --- /dev/null +++ b/code/modules/reagents/Chemistry-Reagents/Chemistry-Reagents-Other.dm @@ -0,0 +1,382 @@ +/* Paint and crayons */ + +/datum/reagent/crayon_dust + name = "Crayon dust" + id = "crayon_dust" + description = "Intensely coloured powder obtained by grinding crayons." + reagent_state = LIQUID + color = "#888888" + overdose = 5 + +/datum/reagent/crayon_dust/red + name = "Red crayon dust" + id = "crayon_dust_red" + color = "#FE191A" + +/datum/reagent/crayon_dust/orange + name = "Orange crayon dust" + id = "crayon_dust_orange" + color = "#FFBE4F" + +/datum/reagent/crayon_dust/yellow + name = "Yellow crayon dust" + id = "crayon_dust_yellow" + color = "#FDFE7D" + +/datum/reagent/crayon_dust/green + name = "Green crayon dust" + id = "crayon_dust_green" + color = "#18A31A" + +/datum/reagent/crayon_dust/blue + name = "Blue crayon dust" + id = "crayon_dust_blue" + color = "#247CFF" + +/datum/reagent/crayon_dust/purple + name = "Purple crayon dust" + id = "crayon_dust_purple" + color = "#CC0099" + +/datum/reagent/crayon_dust/grey //Mime + name = "Grey crayon dust" + id = "crayon_dust_grey" + color = "#808080" + +/datum/reagent/crayon_dust/brown //Rainbow + name = "Brown crayon dust" + id = "crayon_dust_brown" + color = "#846F35" + +/datum/reagent/paint + name = "Paint" + id = "paint" + description = "This paint will stick to almost any object." + reagent_state = LIQUID + color = "#808080" + overdose = REAGENTS_OVERDOSE * 0.5 + color_weight = 20 + +/datum/reagent/paint/touch_turf(var/turf/T) + if(istype(T) && !istype(T, /turf/space)) + T.color = color + +/datum/reagent/paint/touch_obj(var/obj/O) + if(istype(O)) + O.color = color + +/datum/reagent/paint/touch_mob(var/mob/M) + if(istype(M) && !istype(M, /mob/dead)) //painting ghosts: not allowed + M.color = color + +/datum/reagent/paint/affect_touch(var/mob/living/carbon/M, var/alien, var/removed, var/location) + M.color = color + +/datum/reagent/paint/get_data() + return color + +/datum/reagent/paint/initialize_data(var/newdata) + color = newdata + return + +/datum/reagent/paint/mix_data(var/newdata, var/newamount) + var/list/colors = list(0, 0, 0, 0) + var/tot_w = 0 + + var/hex1 = uppertext(color) + var/hex2 = uppertext(newdata) + if(length(hex1) == 7) + hex1 += "FF" + if(length(hex2) == 7) + hex2 += "FF" + if(length(hex1) != 9 || length(hex2) != 9) + return + colors[1] += hex2num(copytext(hex1, 2, 4)) * volume + colors[2] += hex2num(copytext(hex1, 4, 6)) * volume + colors[3] += hex2num(copytext(hex1, 6, 8)) * volume + colors[4] += hex2num(copytext(hex1, 8, 10)) * volume + tot_w += volume + colors[1] += hex2num(copytext(hex2, 2, 4)) * newamount + colors[2] += hex2num(copytext(hex2, 4, 6)) * newamount + colors[3] += hex2num(copytext(hex2, 6, 8)) * newamount + colors[4] += hex2num(copytext(hex2, 8, 10)) * newamount + tot_w += newamount + + color = rgb(colors[1] / tot_w, colors[2] / tot_w, colors[3] / tot_w, colors[4] / tot_w) + return + +/* Things that didn't fit anywhere else */ + +/datum/reagent/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" + affects_dead = 1 //This can even heal dead people. + + glass_icon_state = "golden_cup" + glass_name = "golden cup" + glass_desc = "It's magic. We don't have to explain it." + +/datum/reagent/adminordrazine/affect_touch(var/mob/living/carbon/M, var/alien, var/removed, var/location) + affect_blood(M, alien, removed) + +/datum/reagent/adminordrazine/affect_blood(var/mob/living/carbon/M, var/alien, var/removed, var/location) + M.setCloneLoss(0) + M.setOxyLoss(0) + M.radiation = 0 + M.heal_organ_damage(5,5) + M.adjustToxLoss(-5) + M.hallucination = 0 + M.setBrainLoss(0) + M.disabilities = 0 + M.sdisabilities = 0 + M.eye_blurry = 0 + M.eye_blind = 0 + 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() + +/datum/reagent/gold + name = "Gold" + id = "gold" + description = "Gold is a dense, soft, shiny metal and the most malleable and ductile metal known." + reagent_state = SOLID + color = "#F7C430" + +/datum/reagent/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" + +/datum/reagent/uranium + name ="Uranium" + id = "uranium" + description = "A silvery-white metallic chemical element in the actinide series, weakly radioactive." + reagent_state = SOLID + color = "#B8B8C0" + +/datum/reagent/uranium/affect_touch(var/mob/living/carbon/M, var/alien, var/removed, var/location) + affect_ingest(M, alien, removed) + +/datum/reagent/uranium/affect_blood(var/mob/living/carbon/M, var/alien, var/removed, var/location) + M.apply_effect(5 * removed, IRRADIATE, 0) + +/datum/reagent/uranium/touch_turf(var/turf/T) + if(volume >= 3) + if(!istype(T, /turf/space)) + var/obj/effect/decal/cleanable/greenglow/glow = locate(/obj/effect/decal/cleanable/greenglow, T) + if(!glow) + new /obj/effect/decal/cleanable/greenglow(T) + return + +/datum/reagent/adrenaline + name = "Adrenaline" + id = "adrenaline" + description = "Adrenaline is a hormone used as a drug to treat cardiac arrest and other cardiac dysrhythmias resulting in diminished or absent cardiac output." + reagent_state = LIQUID + color = "#C8A5DC" + +/datum/reagent/adrenaline/affect_blood(var/mob/living/carbon/M, var/alien, var/removed, var/location) + if(alien == IS_DIONA) + return + M.SetParalysis(0) + M.SetWeakened(0) + M.adjustToxLoss(rand(3)) + +/datum/reagent/water/holywater + name = "Holy Water" + id = "holywater" + description = "An ashen-obsidian-water mix, this solution will alter certain sections of the brain's rationality." + color = "#E0E8EF" + + glass_icon_state = "glass_clear" + glass_name = "glass of holy water" + glass_desc = "An ashen-obsidian-water mix, this solution will alter certain sections of the brain's rationality." + +/datum/reagent/water/holywater/affect_ingest(var/mob/living/carbon/M, var/alien, var/removed, var/location) + ..() + if(ishuman(M)) // Any location + if(M.mind && cult.is_antagonist(M.mind) && prob(10)) + cult.remove_antagonist(M.mind) + +/datum/reagent/ammonia + name = "Ammonia" + id = "ammonia" + description = "A caustic substance commonly used in fertilizer or household cleaners." + reagent_state = GAS + color = "#404030" + +/datum/reagent/diethylamine + name = "Diethylamine" + id = "diethylamine" + description = "A secondary amine, mildly corrosive." + reagent_state = LIQUID + color = "#604030" + +/datum/reagent/fluorosurfactant // Foam precursor + name = "Fluorosurfactant" + id = "fluorosurfactant" + description = "A perfluoronated sulfonic acid that forms a foam when mixed with water." + reagent_state = LIQUID + color = "#9E6B38" + +/datum/reagent/foaming_agent // Metal foaming agent. This is lithium hydride. Add other recipes (e.g. LiH + H2O -> LiOH + H2) eventually. + 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" + +/datum/reagent/thermite + name = "Thermite" + id = "thermite" + description = "Thermite produces an aluminothermic reaction known as a thermite reaction. Can be used to melt walls." + reagent_state = SOLID + color = "#673910" + touch_met = 50 + +/datum/reagent/thermite/touch_turf(var/turf/T) + if(volume >= 5) + if(istype(T, /turf/simulated/wall)) + var/turf/simulated/wall/W = T + W.thermite = 1 + W.overlays += image('icons/effects/effects.dmi',icon_state = "#673910") + remove_self(5) + return + +/datum/reagent/thermite/affect_touch(var/mob/living/carbon/M, var/alien, var/removed, var/location) + M.adjust_fire_stacks(removed * 0.2) + return + +/datum/reagent/thermite/affect_blood(var/mob/living/carbon/M, var/alien, var/removed, var/location) + M.adjustFireLoss(3 * removed) + +/datum/reagent/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" + touch_met = 50 + +/datum/reagent/space_cleaner/touch_obj(var/obj/O) + if(istype(O, /obj/effect/decal/cleanable)) + qdel(O) + else + O.clean_blood() + +/datum/reagent/space_cleaner/touch_turf(var/turf/T) + if(volume >= 1) + if(istype(T, /turf/simulated)) + var/turf/simulated/S = T + S.dirt = 0 + T.clean_blood() + + for(var/mob/living/carbon/slime/M in T) + M.adjustToxLoss(rand(5, 10)) + +/datum/reagent/space_cleaner/affect_touch(var/mob/living/carbon/M, var/alien, var/removed, var/location) + if(M.r_hand) + M.r_hand.clean_blood() + if(M.l_hand) + M.l_hand.clean_blood() + if(M.wear_mask) + if(M.wear_mask.clean_blood()) + M.update_inv_wear_mask(0) + if(ishuman(M)) + var/mob/living/carbon/human/H = M + 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) + else + H.clean_blood(1) + return + M.clean_blood() + +/datum/reagent/lube // TODO: spraying on borgs speeds them up + 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" + +/datum/reagent/lube/touch_turf(var/turf/simulated/T) + if(!istype(T)) + return + if(volume >= 1) + if(T.wet >= 2) + return + T.wet = 2 + spawn(800) + if(!T || !istype(T)) + return + T.wet = 0 + if(T.wet_overlay) + T.overlays -= T.wet_overlay + T.wet_overlay = null + +/datum/reagent/silicate + name = "Silicate" + id = "silicate" + description = "A compound that can be used to reinforce glass." + reagent_state = LIQUID + color = "#C7FFFF" + +/datum/reagent/silicate/touch_obj(var/obj/O) + if(istype(O, /obj/structure/window)) + var/obj/structure/window/W = O + W.apply_silicate(volume) + remove_self(volume) + return + +/datum/reagent/glycerol + name = "Glycerol" + id = "glycerol" + description = "Glycerol is a simple polyol compound. Glycerol is sweet-tasting and of low toxicity." + reagent_state = LIQUID + color = "#808080" + +/datum/reagent/nitroglycerin + name = "Nitroglycerin" + id = "nitroglycerin" + description = "Nitroglycerin is a heavy, colorless, oily, explosive liquid obtained by nitrating glycerol." + reagent_state = LIQUID + color = "#808080" + +/datum/reagent/coolant + name = "Coolant" + id = "coolant" + description = "Industrial cooling substance." + reagent_state = LIQUID + color = "#C8A5DC" + +/datum/reagent/ultraglue + name = "Ultra Glue" + id = "glue" + description = "An extremely powerful bonding agent." + color = "#FFFFCC" diff --git a/code/modules/reagents/Chemistry-Reagents/Chemistry-Reagents-Toxins.dm b/code/modules/reagents/Chemistry-Reagents/Chemistry-Reagents-Toxins.dm new file mode 100644 index 0000000000..a2ec160c17 --- /dev/null +++ b/code/modules/reagents/Chemistry-Reagents/Chemistry-Reagents-Toxins.dm @@ -0,0 +1,516 @@ +/* Toxins, poisons, venoms */ +/datum/reagent/toxin + name = "Toxin" + id = "toxin" + description = "A toxic chemical." + reagent_state = LIQUID + color = "#CF3600" + metabolism = REM * 0.05 // 0.01 by default. They last a while and slowly kill you. + var/strength = 4 // How much damage it deals per unit + +/datum/reagent/toxin/affect_blood(var/mob/living/carbon/M, var/alien, var/removed, var/location) + if(strength && alien != IS_DIONA) + M.adjustToxLoss(strength * removed) + +/datum/reagent/toxin/plasticide + name = "Plasticide" + id = "plasticide" + description = "Liquid plastic, do not eat." + reagent_state = LIQUID + color = "#CF3600" + strength = 5 + +/datum/reagent/toxin/amatoxin + name = "Amatoxin" + id = "amatoxin" + description = "A powerful poison derived from certain species of mushroom." + reagent_state = LIQUID + color = "#792300" + strength = 10 + +/datum/reagent/toxin/carpotoxin + name = "Carpotoxin" + id = "carpotoxin" + description = "A deadly neurotoxin produced by the dreaded space carp." + reagent_state = LIQUID + color = "#003333" + strength = 10 + +/datum/reagent/toxin/phoron + name = "Phoron" + id = "phoron" + description = "Phoron in its liquid form." + reagent_state = LIQUID + color = "#9D14DB" + strength = 30 + +/datum/reagent/toxin/phoron/affect_touch(var/mob/living/carbon/M, var/alien, var/removed, var/location) + ..() + M.adjust_fire_stacks(removed / 5) + +/datum/reagent/toxin/phoron/touch_turf(var/turf/simulated/T) + if(!istype(T)) + return + T.assume_gas("volatile_fuel", volume, T20C) + remove_self(volume) + +/datum/reagent/toxin/cyanide //Fast and Lethal + name = "Cyanide" + id = "cyanide" + description = "A highly toxic chemical." + reagent_state = LIQUID + color = "#CF3600" + strength = 20 + metabolism = REM * 2 + +/datum/reagent/toxin/cyanide/affect_blood(var/mob/living/carbon/M, var/alien, var/removed, var/location) + ..() + M.adjustOxyLoss(20 * removed) + M.sleeping += 1 + +/datum/reagent/toxin/potassium_chloride + name = "Potassium Chloride" + id = "potassium_chloride" + description = "A delicious salt that stops the heart when injected into cardiac muscle." + reagent_state = SOLID + color = "#FFFFFF" + strength = 0 + overdose = REAGENTS_OVERDOSE + +/datum/reagent/toxin/potassium_chloride/overdose(var/mob/living/carbon/M, var/alien) + ..() + if(ishuman(M)) + var/mob/living/carbon/human/H = M + if(H.stat != 1) + if(H.losebreath >= 10) + H.losebreath = max(10, H.losebreath - 10) + H.adjustOxyLoss(2) + H.Weaken(10) + +/datum/reagent/toxin/potassium_chlorophoride + name = "Potassium Chlorophoride" + id = "potassium_chlorophoride" + description = "A specific chemical based on Potassium Chloride to stop the heart for surgery. Not safe to eat!" + reagent_state = SOLID + color = "#FFFFFF" + strength = 10 + overdose = 20 + +/datum/reagent/toxin/potassium_chlorophoride/affect_blood(var/mob/living/carbon/M, var/alien, var/removed, var/location) + ..() + if(ishuman(M)) + var/mob/living/carbon/human/H = M + if(H.stat != 1) + if(H.losebreath >= 10) + H.losebreath = max(10, M.losebreath-10) + H.adjustOxyLoss(2) + H.Weaken(10) + +/datum/reagent/toxin/zombiepowder + name = "Zombie Powder" + id = "zombiepowder" + description = "A strong neurotoxin that puts the subject into a death-like state." + reagent_state = SOLID + color = "#669900" + metabolism = REM + strength = 3 + +/datum/reagent/toxin/zombiepowder/affect_blood(var/mob/living/carbon/M, var/alien, var/removed, var/location) + ..() + if(alien == IS_DIONA) + return + M.status_flags |= FAKEDEATH + M.adjustOxyLoss(3 * removed) + M.Weaken(10) + M.silent = max(M.silent, 10) + M.tod = worldtime2text() + +/datum/reagent/toxin/zombiepowder/Destroy() + if(holder && holder.my_atom && ismob(holder.my_atom)) + var/mob/M = holder.my_atom + M.status_flags &= ~FAKEDEATH + ..() + +/datum/reagent/toxin/fertilizer //Reagents used for plant fertilizers. + name = "fertilizer" + id = "fertilizer" + description = "A chemical mix good for growing plants with." + reagent_state = LIQUID + strength = 0.5 // It's not THAT poisonous. + color = "#664330" + +/datum/reagent/toxin/fertilizer/eznutrient + name = "EZ Nutrient" + id = "eznutrient" + +/datum/reagent/toxin/fertilizer/left4zed + name = "Left-4-Zed" + id = "left4zed" + +/datum/reagent/toxin/fertilizer/robustharvest + name = "Robust Harvest" + id = "robustharvest" + +/datum/reagent/toxin/plantbgone + name = "Plant-B-Gone" + id = "plantbgone" + description = "A harmful toxic mixture to kill plantlife. Do not ingest!" + reagent_state = LIQUID + color = "#49002E" + strength = 4 + +/datum/reagent/toxin/plantbgone/touch_turf(var/turf/T) + if(istype(T, /turf/simulated/wall)) + var/turf/simulated/wall/W = T + if(W.rotting) + W.rotting = 0 + for(var/obj/effect/E in W) + if(E.name == "Wallrot") + qdel(E) + + W.visible_message("The fungi are completely dissolved by the solution!") + +/datum/reagent/toxin/plantbgone/touch_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) + alien_weeds.healthcheck() + else if(istype(O, /obj/effect/plant)) + qdel(O) + +/datum/reagent/toxin/plantbgone/affect_blood(var/mob/living/carbon/M, var/alien, var/removed, var/location) + ..() + if(alien == IS_DIONA) + M.adjustToxLoss(50 * removed) + +/datum/reagent/toxin/plantbgone/affect_touch(var/mob/living/carbon/M, var/alien, var/removed, var/location) + ..() + if(alien == IS_DIONA) + M.adjustToxLoss(50 * removed) + +/datum/reagent/acid/polyacid + name = "Polytrinic acid" + id = "pacid" + description = "Polytrinic acid is a an extremely corrosive chemical substance." + reagent_state = LIQUID + color = "#8E18A9" + power = 10 + meltdose = 4 + +/datum/reagent/lexorin + name = "Lexorin" + id = "lexorin" + description = "Lexorin temporarily stops respiration. Causes tissue damage." + reagent_state = LIQUID + color = "#C8A5DC" + overdose = REAGENTS_OVERDOSE + +/datum/reagent/lexorin/affect_blood(var/mob/living/carbon/M, var/alien, var/removed, var/location) + if(alien == IS_DIONA) + return + M.take_organ_damage(3 * removed, 0) + if(M.losebreath < 15) + M.losebreath++ + +/datum/reagent/mutagen + name = "Unstable mutagen" + id = "mutagen" + description = "Might cause unpredictable mutations. Keep away from children." + reagent_state = LIQUID + color = "#13BC5E" + +/datum/reagent/mutagen/affect_touch(var/mob/living/carbon/M, var/alien, var/removed, var/location) + if(prob(33)) + affect_blood(M, alien, removed) + +/datum/reagent/mutagen/affect_ingest(var/mob/living/carbon/M, var/alien, var/removed, var/location) + if(prob(67)) + affect_blood(M, alien, removed) + +/datum/reagent/mutagen/affect_blood(var/mob/living/carbon/M, var/alien, var/removed, var/location) + if(M.dna) + if(prob(removed * 0.1)) // Approx. one mutation per 10 injected/20 ingested/30 touching units + randmuti(M) + if(prob(98)) + randmutb(M) + else + randmutg(M) + domutcheck(M, null) + M.UpdateAppearance() + M.apply_effect(10 * removed, IRRADIATE, 0) + +/datum/reagent/slimejelly + name = "Slime Jelly" + id = "slimejelly" + description = "A gooey semi-liquid produced from one of the deadliest lifeforms in existence. SO REAL." + reagent_state = LIQUID + color = "#801E28" + +/datum/reagent/slimejelly/affect_blood(var/mob/living/carbon/M, var/alien, var/removed, var/location) + if(alien == IS_DIONA) + return + if(prob(10)) + M << "Your insides are burning!" + M.adjustToxLoss(rand(100, 300) * removed) + else if(prob(40)) + M.heal_organ_damage(25 * removed, 0) + +/datum/reagent/soporific + name = "Soporific" + id = "stoxin" + description = "An effective hypnotic used to treat insomnia." + reagent_state = LIQUID + color = "#009CA8" + metabolism = REM * 0.5 + overdose = REAGENTS_OVERDOSE + +/datum/reagent/soporific/affect_blood(var/mob/living/carbon/M, var/alien, var/removed, var/location) + if(alien == IS_DIONA) + return + if(dose < 1) + if(dose == metabolism * 2 || prob(5)) + M.emote("yawn") + else if(dose < 1.5) + M.eye_blurry = max(M.eye_blurry, 10) + else if(dose < 5) + if(prob(50)) + M.Weaken(2) + M.drowsyness = max(M.drowsyness, 20) + else + M.sleeping = max(M.sleeping, 20) + M.drowsyness = max(M.drowsyness, 60) + +/datum/reagent/chloralhydrate + name = "Chloral Hydrate" + id = "chloralhydrate" + description = "A powerful sedative." + reagent_state = SOLID + color = "#000067" + metabolism = REM * 0.5 + overdose = REAGENTS_OVERDOSE * 0.5 + +/datum/reagent/chloralhydrate/affect_blood(var/mob/living/carbon/M, var/alien, var/removed, var/location) + if(alien == IS_DIONA) + return + if(dose == metabolism) + M.confused += 2 + M.drowsyness += 2 + else if(dose < 2) + M.Weaken(30) + M.eye_blurry = max(M.eye_blurry, 10) + else + M.sleeping = max(M.sleeping, 30) + + if(dose > 1) + M.adjustToxLoss(removed) + +/datum/reagent/chloralhydrate/beer2 //disguised as normal beer for use by emagged brobots + name = "Beer" + id = "beer2" + description = "An alcoholic beverage made from malted grains, hops, yeast, and water. The fermentation appears to be incomplete." //If the players manage to analyze this, they deserve to know something is wrong. + reagent_state = LIQUID + color = "#664300" + + glass_icon_state = "beerglass" + glass_name = "glass of beer" + glass_desc = "A freezing pint of beer" + glass_center_of_mass = list("x"=16, "y"=8) + +/* Drugs */ + +/datum/reagent/space_drugs + name = "Space drugs" + id = "space_drugs" + description = "An illegal chemical compound used as drug." + reagent_state = LIQUID + color = "#60A584" + metabolism = REM * 0.5 + overdose = REAGENTS_OVERDOSE + +/datum/reagent/space_drugs/affect_blood(var/mob/living/carbon/M, var/alien, var/removed, var/location) + if(alien == IS_DIONA) + return + M.druggy = max(M.druggy, 15) + if(prob(10) && isturf(M.loc) && !istype(M.loc, /turf/space) && M.canmove && !M.restrained()) + step(M, pick(cardinal)) + if(prob(7)) + M.emote(pick("twitch", "drool", "moan", "giggle")) + +/datum/reagent/serotrotium + name = "Serotrotium" + id = "serotrotium" + description = "A chemical compound that promotes concentrated production of the serotonin neurotransmitter in humans." + reagent_state = LIQUID + color = "#202040" + metabolism = REM * 0.25 + overdose = REAGENTS_OVERDOSE + +/datum/reagent/serotrotium/affect_blood(var/mob/living/carbon/M, var/alien, var/removed, var/location) + if(alien == IS_DIONA) + return + if(prob(7)) + M.emote(pick("twitch", "drool", "moan", "gasp")) + return + +/datum/reagent/cryptobiolin + name = "Cryptobiolin" + id = "cryptobiolin" + description = "Cryptobiolin causes confusion and dizzyness." + reagent_state = LIQUID + color = "#000055" + metabolism = REM * 0.5 + overdose = REAGENTS_OVERDOSE + +/datum/reagent/cryptobiolin/affect_blood(var/mob/living/carbon/M, var/alien, var/removed, var/location) + if(alien == IS_DIONA) + return + M.make_dizzy(4) + M.confused = max(M.confused, 20) + +/datum/reagent/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" + overdose = REAGENTS_OVERDOSE + +/datum/reagent/impedrezene/affect_blood(var/mob/living/carbon/M, var/alien, var/removed, var/location) + if(alien == IS_DIONA) + return + M.jitteriness = max(M.jitteriness - 5, 0) + if(prob(80)) + M.adjustBrainLoss(3 * removed) + if(prob(50)) + M.drowsyness = max(M.drowsyness, 3) + if(prob(10)) + M.emote("drool") + +/datum/reagent/mindbreaker + name = "Mindbreaker Toxin" + id = "mindbreaker" + description = "A powerful hallucinogen, it can cause fatal effects in users." + reagent_state = LIQUID + color = "#B31008" + metabolism = REM * 0.25 + overdose = REAGENTS_OVERDOSE + +/datum/reagent/mindbreaker/affect_blood(var/mob/living/carbon/M, var/alien, var/removed, var/location) + if(alien == IS_DIONA) + return + M.hallucination = max(M.hallucination, 100) + +/datum/reagent/psilocybin + name = "Psilocybin" + id = "psilocybin" + description = "A strong psycotropic derived from certain species of mushroom." + color = "#E700E7" + overdose = REAGENTS_OVERDOSE + metabolism = REM * 0.5 + +/datum/reagent/psilocybin/affect_blood(var/mob/living/carbon/M, var/alien, var/removed, var/location) + if(alien == IS_DIONA) + return + M.druggy = max(M.druggy, 30) + if(dose < 1) + M.stuttering = max(M.stuttering, 3) + M.make_dizzy(5) + if(prob(10)) + M.emote(pick("twitch", "giggle")) + else if(dose < 2) + M.stuttering = max(M.stuttering, 3) + M.make_jittery(10) + M.make_dizzy(10) + M.druggy = max(M.druggy, 35) + if(prob(20)) + M.emote(pick("twitch","giggle")) + else + M.stuttering = max(M.stuttering, 3) + M.make_jittery(20) + M.make_dizzy(20) + M.druggy = max(M.druggy, 40) + if(prob(30)) + M.emote(pick("twitch", "giggle")) + +/datum/reagent/nicotine + name = "Nicotine" + id = "nicotine" + description = "A highly addictive stimulant extracted from the tobacco plant." + reagent_state = LIQUID + color = "#181818" + +/* Transformations */ + +/datum/reagent/slimetoxin + name = "Mutation Toxin" + id = "mutationtoxin" + description = "A corruptive toxin produced by slimes." + reagent_state = LIQUID + color = "#13BC5E" + +/datum/reagent/slimetoxin/affect_blood(var/mob/living/carbon/M, var/alien, var/removed, var/location) + if(ishuman(M)) + var/mob/living/carbon/human/H = M + if(H.species.name != "Slime") + M << "Your flesh rapidly mutates!" + H.set_species("Slime") + +/datum/reagent/aslimetoxin + name = "Advanced Mutation Toxin" + id = "amutationtoxin" + description = "An advanced corruptive toxin produced by slimes." + reagent_state = LIQUID + color = "#13BC5E" + +/datum/reagent/aslimetoxin/affect_blood(var/mob/living/carbon/M, var/alien, var/removed, var/location) // TODO: check if there's similar code anywhere else + if(M.monkeyizing) + return + M << "Your flesh rapidly mutates!" + M.monkeyizing = 1 + M.canmove = 0 + M.icon = null + M.overlays.Cut() + M.invisibility = 101 + for(var/obj/item/W in M) + if(istype(W, /obj/item/weapon/implant)) //TODO: Carn. give implants a dropped() or something + qdel(W) + continue + W.layer = initial(W.layer) + W.loc = M.loc + W.dropped(M) + var/mob/living/carbon/slime/new_mob = new /mob/living/carbon/slime(M.loc) + new_mob.a_intent = "hurt" + new_mob.universal_speak = 1 + if(M.mind) + M.mind.transfer_to(new_mob) + else + new_mob.key = M.key + qdel(M) + +/datum/reagent/nanites + name = "Nanomachines" + id = "nanites" + description = "Microscopic construction robots." + reagent_state = LIQUID + color = "#535E66" + +/datum/reagent/nanites/affect_touch(var/mob/living/carbon/M, var/alien, var/removed, var/location) + if(prob(10)) + M.contract_disease(new /datum/disease/robotic_transformation(0), 1) + +/datum/reagent/nanites/affect_blood(var/mob/living/carbon/M, var/alien, var/removed, var/location) + M.contract_disease(new /datum/disease/robotic_transformation(0), 1) + +/datum/reagent/xenomicrobes + name = "Xenomicrobes" + id = "xenomicrobes" + description = "Microbes with an entirely alien cellular structure." + reagent_state = LIQUID + color = "#535E66" + +/datum/reagent/xenomicrobes/affect_touch(var/mob/living/carbon/M, var/alien, var/removed, var/location) + if(prob(10)) + M.contract_disease(new /datum/disease/xeno_transformation(0), 1) + +/datum/reagent/xenomicrobes/affect_blood(var/mob/living/carbon/M, var/alien, var/removed, var/location) + M.contract_disease(new /datum/disease/xeno_transformation(0), 1) From 80467f8fa6c375ce253c9677e784706a4716f445 Mon Sep 17 00:00:00 2001 From: Kelenius Date: Tue, 5 May 2015 12:01:02 +0300 Subject: [PATCH 6/7] Removes metorapan reaction --- code/modules/reagents/Chemistry-Recipes.dm | 7 ------- 1 file changed, 7 deletions(-) diff --git a/code/modules/reagents/Chemistry-Recipes.dm b/code/modules/reagents/Chemistry-Recipes.dm index b64e0f4a1c..2912a392cb 100644 --- a/code/modules/reagents/Chemistry-Recipes.dm +++ b/code/modules/reagents/Chemistry-Recipes.dm @@ -222,13 +222,6 @@ inhibitors = list("sugar" = 1) // Messes up with inaprovaline result_amount = 2 -/datum/chemical_reaction/metorapan - name = "Metorapan" - id = "metorapan" - result = "metorapan" - required_reagents = list("bicaridine" = 1, "iron" = 1, "nitrogen" = 1) - result_amount = 3 - /datum/chemical_reaction/hyperzine name = "Hyperzine" id = "hyperzine" From fedd0342a0aa0f683be8f2d5b6aba00d450d81c2 Mon Sep 17 00:00:00 2001 From: Kelenius Date: Sat, 9 May 2015 12:03:22 +0300 Subject: [PATCH 7/7] Minor chem fixes --- baystation12.int | 2 +- .../Chemistry-Reagents-Core.dm | 14 ++-- .../Chemistry-Reagents-Dispenser.dm | 32 ++++---- .../Chemistry-Reagents-Food-Drinks.dm | 76 +++++++++++-------- .../Chemistry-Reagents-Medicine.dm | 56 +++++++------- .../Chemistry-Reagents-Other.dm | 20 ++--- .../Chemistry-Reagents-Toxins.dm | 52 ++++++------- 7 files changed, 131 insertions(+), 121 deletions(-) diff --git a/baystation12.int b/baystation12.int index adadb82f7f..b82874fded 100644 --- a/baystation12.int +++ b/baystation12.int @@ -1,6 +1,6 @@ // BEGIN_INTERNALS /* -AUTO_FILE_DIR: OFF MAP_ICON_TYPE: 0 +AUTO_FILE_DIR: OFF */ // END_INTERNALS diff --git a/code/modules/reagents/Chemistry-Reagents/Chemistry-Reagents-Core.dm b/code/modules/reagents/Chemistry-Reagents/Chemistry-Reagents-Core.dm index cd3da656a9..d957e88a4c 100644 --- a/code/modules/reagents/Chemistry-Reagents/Chemistry-Reagents-Core.dm +++ b/code/modules/reagents/Chemistry-Reagents/Chemistry-Reagents-Core.dm @@ -50,13 +50,13 @@ if(B) B.blood_DNA["UNKNOWN DNA STRUCTURE"] = "X*" -/datum/reagent/blood/affect_ingest(var/mob/living/carbon/M, var/alien, var/removed, var/location) +/datum/reagent/blood/affect_ingest(var/mob/living/carbon/M, var/alien, var/removed) if(dose > 5) M.adjustToxLoss(removed) if(dose > 15) M.adjustToxLoss(removed) -/datum/reagent/blood/affect_touch(var/mob/living/carbon/M, var/alien, var/removed, var/location) +/datum/reagent/blood/affect_touch(var/mob/living/carbon/M, var/alien, var/removed) if(data && data["viruses"]) for(var/datum/disease/D in data["viruses"]) if(D.spread_type == SPECIAL || D.spread_type == NON_CONTAGIOUS) @@ -71,7 +71,7 @@ if(data && data["antibodies"]) M.antibodies |= data["antibodies"] -/datum/reagent/blood/affect_blood(var/mob/living/carbon/M, var/alien, var/removed, var/location) +/datum/reagent/blood/affect_blood(var/mob/living/carbon/M, var/alien, var/removed) M.inject_blood(src, volume) remove_self(volume) @@ -81,7 +81,7 @@ reagent_state = LIQUID color = "#C81040" -/datum/reagent/vaccine/affect_blood(var/mob/living/carbon/M, var/alien, var/removed, var/location) +/datum/reagent/vaccine/affect_blood(var/mob/living/carbon/M, var/alien, var/removed) if(data) for(var/datum/disease/D in M.viruses) if(istype(D, /datum/disease/advance)) @@ -155,7 +155,7 @@ if(!cube.wrapped) cube.Expand() -/datum/reagent/water/affect_touch(var/mob/living/carbon/M, var/alien, var/removed, var/location) +/datum/reagent/water/affect_touch(var/mob/living/carbon/M, var/alien, var/removed) if(istype(M, /mob/living/carbon/slime)) var/mob/living/carbon/slime/S = M S.adjustToxLoss(15 * removed) // Babies have 150 health, adults have 200; So, 10 units and 13.5 @@ -191,8 +191,8 @@ remove_self(volume) return -/datum/reagent/fuel/affect_blood(var/mob/living/carbon/M, var/alien, var/removed, var/location) +/datum/reagent/fuel/affect_blood(var/mob/living/carbon/M, var/alien, var/removed) M.adjustToxLoss(2 * removed) -/datum/reagent/fuel/affect_touch(var/mob/living/carbon/M, var/alien, var/removed, var/location) // Splashing people with welding fuel to make them easy to ignite! +/datum/reagent/fuel/affect_touch(var/mob/living/carbon/M, var/alien, var/removed) // Splashing people with welding fuel to make them easy to ignite! M.adjust_fire_stacks(0.1 * removed) diff --git a/code/modules/reagents/Chemistry-Reagents/Chemistry-Reagents-Dispenser.dm b/code/modules/reagents/Chemistry-Reagents/Chemistry-Reagents-Dispenser.dm index 9d968aed78..2d742bd01e 100644 --- a/code/modules/reagents/Chemistry-Reagents/Chemistry-Reagents-Dispenser.dm +++ b/code/modules/reagents/Chemistry-Reagents/Chemistry-Reagents-Dispenser.dm @@ -28,10 +28,10 @@ reagent_state = GAS color = "#808080" -/datum/reagent/chlorine/affect_blood(var/mob/living/carbon/M, var/alien, var/removed, var/location) +/datum/reagent/chlorine/affect_blood(var/mob/living/carbon/M, var/alien, var/removed) M.take_organ_damage(1*REM, 0) -/datum/reagent/chlorine/affect_touch(var/mob/living/carbon/M, var/alien, var/removed, var/location) +/datum/reagent/chlorine/affect_touch(var/mob/living/carbon/M, var/alien, var/removed) M.take_organ_damage(1*REM, 0) /datum/reagent/copper @@ -59,15 +59,15 @@ glass_name = "glass of ethanol" glass_desc = "A well-known alcohol with a variety of applications." -/datum/reagent/ethanol/affect_touch(var/mob/living/carbon/M, var/alien, var/removed, var/location) +/datum/reagent/ethanol/affect_touch(var/mob/living/carbon/M, var/alien, var/removed) M.adjust_fire_stacks(removed / 15) return -/datum/reagent/ethanol/affect_blood(var/mob/living/carbon/M, var/alien, var/removed, var/location) +/datum/reagent/ethanol/affect_blood(var/mob/living/carbon/M, var/alien, var/removed) M.adjustToxLoss(removed * 2 * toxicity) return -/datum/reagent/ethanol/affect_ingest(var/mob/living/carbon/M, var/alien, var/removed, var/location) +/datum/reagent/ethanol/affect_ingest(var/mob/living/carbon/M, var/alien, var/removed) M.nutrition += nutriment_factor * removed var/strength_mod = 1 @@ -129,10 +129,10 @@ reagent_state = GAS color = "#808080" -/datum/reagent/fluorine/affect_blood(var/mob/living/carbon/M, var/alien, var/removed, var/location) +/datum/reagent/fluorine/affect_blood(var/mob/living/carbon/M, var/alien, var/removed) M.adjustToxLoss(removed) -/datum/reagent/fluorine/affect_touch(var/mob/living/carbon/M, var/alien, var/removed, var/location) +/datum/reagent/fluorine/affect_touch(var/mob/living/carbon/M, var/alien, var/removed) M.adjustToxLoss(removed) /datum/reagent/hydrogen @@ -149,7 +149,7 @@ reagent_state = SOLID color = "#353535" -/datum/reagent/iron/affect_ingest(var/mob/living/carbon/M, var/alien, var/removed, var/location) +/datum/reagent/iron/affect_ingest(var/mob/living/carbon/M, var/alien, var/removed) if(alien != IS_DIONA) M.add_chemical_effect(CE_BLOODRESTORE, 8 * removed) @@ -160,7 +160,7 @@ reagent_state = SOLID color = "#808080" -/datum/reagent/lithium/affect_blood(var/mob/living/carbon/M, var/alien, var/removed, var/location) +/datum/reagent/lithium/affect_blood(var/mob/living/carbon/M, var/alien, var/removed) if(alien != IS_DIONA) if(M.canmove && !M.restrained() && istype(M.loc, /turf/space)) step(M, pick(cardinal)) @@ -174,7 +174,7 @@ reagent_state = LIQUID color = "#484848" -/datum/reagent/mercury/affect_blood(var/mob/living/carbon/M, var/alien, var/removed, var/location) +/datum/reagent/mercury/affect_blood(var/mob/living/carbon/M, var/alien, var/removed) if(alien != IS_DIONA) if(M.canmove && !M.restrained() && istype(M.loc, /turf/space)) step(M, pick(cardinal)) @@ -189,7 +189,7 @@ reagent_state = GAS color = "#808080" -/datum/reagent/nitrogen/affect_blood(var/mob/living/carbon/M, var/alien, var/removed, var/location) +/datum/reagent/nitrogen/affect_blood(var/mob/living/carbon/M, var/alien, var/removed) if(alien == IS_VOX) M.adjustOxyLoss(-removed * 3) @@ -200,7 +200,7 @@ reagent_state = GAS color = "#808080" -/datum/reagent/oxygen/affect_blood(var/mob/living/carbon/M, var/alien, var/removed, var/location) +/datum/reagent/oxygen/affect_blood(var/mob/living/carbon/M, var/alien, var/removed) if(alien == IS_VOX) M.adjustToxLoss(removed * 3) @@ -225,7 +225,7 @@ reagent_state = SOLID color = "#C7C7C7" -/datum/reagent/radium/affect_blood(var/mob/living/carbon/M, var/alien, var/removed, var/location) +/datum/reagent/radium/affect_blood(var/mob/living/carbon/M, var/alien, var/removed) M.apply_effect(10 * removed, IRRADIATE, 0) // Radium may increase your chances to cure a disease if(M.virus2.len) for(var/ID in M.virus2) @@ -260,10 +260,10 @@ var/power = 5 var/meltdose = 10 // How much is needed to melt -/datum/reagent/acid/affect_blood(var/mob/living/carbon/M, var/alien, var/removed, var/location) +/datum/reagent/acid/affect_blood(var/mob/living/carbon/M, var/alien, var/removed) M.take_organ_damage(0, removed * power * 2) -/datum/reagent/acid/affect_touch(var/mob/living/carbon/M, var/alien, var/removed, var/location) // This is the most interesting +/datum/reagent/acid/affect_touch(var/mob/living/carbon/M, var/alien, var/removed) // This is the most interesting if(ishuman(M)) var/mob/living/carbon/human/H = M if(H.head) @@ -358,7 +358,7 @@ glass_name = "glass of sugar" glass_desc = "The organic compound commonly known as table sugar and sometimes called saccharose. This white, odorless, crystalline powder has a pleasing, sweet taste." -/datum/reagent/sugar/affect_blood(var/mob/living/carbon/M, var/alien, var/removed, var/location) +/datum/reagent/sugar/affect_blood(var/mob/living/carbon/M, var/alien, var/removed) M.nutrition += removed * 3 /datum/reagent/sulfur diff --git a/code/modules/reagents/Chemistry-Reagents/Chemistry-Reagents-Food-Drinks.dm b/code/modules/reagents/Chemistry-Reagents/Chemistry-Reagents-Food-Drinks.dm index d9b90f3de4..97db6ceab5 100644 --- a/code/modules/reagents/Chemistry-Reagents/Chemistry-Reagents-Food-Drinks.dm +++ b/code/modules/reagents/Chemistry-Reagents/Chemistry-Reagents-Food-Drinks.dm @@ -10,13 +10,13 @@ var/injectable = 0 color = "#664330" -/datum/reagent/nutriment/affect_blood(var/mob/living/carbon/M, var/alien, var/removed, var/location) +/datum/reagent/nutriment/affect_blood(var/mob/living/carbon/M, var/alien, var/removed) if(!injectable) M.adjustToxLoss(0.1 * removed) return affect_ingest(M, alien, removed) -/datum/reagent/nutriment/affect_ingest(var/mob/living/carbon/M, var/alien, var/removed, var/location) +/datum/reagent/nutriment/affect_ingest(var/mob/living/carbon/M, var/alien, var/removed) M.heal_organ_damage(0.5 * removed, 0) M.nutrition += nutriment_factor * removed // For hunger and fatness M.add_chemical_effect(CE_BLOODRESTORE, 4 * removed) @@ -26,7 +26,7 @@ id = "protein" color = "#440000" -/datum/reagent/nutriment/protein/affect_ingest(var/mob/living/carbon/M, var/alien, var/removed, var/location) +/datum/reagent/nutriment/protein/affect_ingest(var/mob/living/carbon/M, var/alien, var/removed) if(alien && alien == IS_SKRELL) M.adjustToxLoss(0.5 * removed) return @@ -37,9 +37,9 @@ id = "egg" color = "#FFFFAA" -/datum/reagent/nutriment/egg/affect_ingest(var/mob/living/carbon/M, var/alien, var/removed, var/location) +/datum/reagent/nutriment/egg/affect_ingest(var/mob/living/carbon/M, var/alien, var/removed) if(alien && alien == IS_SKRELL) - M.adjustToxLoss(0.5) + M.adjustToxLoss(0.5 * removed) return ..() @@ -165,7 +165,7 @@ color = "#BBEDA4" overdose = REAGENTS_OVERDOSE -/datum/reagent/lipozine/affect_blood(var/mob/living/carbon/M, var/alien, var/removed, var/location) +/datum/reagent/lipozine/affect_blood(var/mob/living/carbon/M, var/alien, var/removed) M.nutrition = max(M.nutrition - 10 * removed, 0) M.overeatduration = 0 if(M.nutrition < 0) @@ -203,7 +203,7 @@ reagent_state = LIQUID color = "#B31008" -/datum/reagent/frostoil/affect_blood(var/mob/living/carbon/M, var/alien, var/removed, var/location) +/datum/reagent/frostoil/affect_blood(var/mob/living/carbon/M, var/alien, var/removed) if(alien == IS_DIONA) return M.bodytemperature = max(M.bodytemperature - 10 * TEMPERATURE_DAMAGE_COEFFICIENT, 0) @@ -220,7 +220,12 @@ reagent_state = LIQUID color = "#B31008" -/datum/reagent/capsaicin/affect_blood(var/mob/living/carbon/M, var/alien, var/removed, var/location) +/datum/reagent/capsaicin/affect_blood(var/mob/living/carbon/M, var/alien, var/removed) + if(alien == IS_DIONA) + return + M.adjustToxLoss(0.5 * removed) + +/datum/reagent/capsaicin/affect_ingest(var/mob/living/carbon/M, var/alien, var/removed) if(alien == IS_DIONA) return if(ishuman(M)) @@ -245,7 +250,12 @@ touch_met = 50 // Get rid of it quickly color = "#B31008" -/datum/reagent/condensedcapsaicin/affect_touch(var/mob/living/carbon/M, var/alien, var/removed, var/location) +/datum/reagent/condensedcapsaicin/affect_blood(var/mob/living/carbon/M, var/alien, var/removed) + if(alien == IS_DIONA) + return + M.adjustToxLoss(0.5 * removed) + +/datum/reagent/condensedcapsaicin/affect_touch(var/mob/living/carbon/M, var/alien, var/removed) var/eyes_covered = 0 var/mouth_covered = 0 var/obj/item/safe_thing = null @@ -294,7 +304,7 @@ M.Weaken(5) return -/datum/reagent/condensedcapsaicin/affect_blood(var/mob/living/carbon/M, var/alien, var/removed, var/location) +/datum/reagent/condensedcapsaicin/affect_ingest(var/mob/living/carbon/M, var/alien, var/removed) if(ishuman(M)) var/mob/living/carbon/human/H = M if(H.species && (H.species.flags & (NO_PAIN | IS_SYNTHETIC))) @@ -323,11 +333,11 @@ var/adj_sleepy = 0 var/adj_temp = 0 -/datum/reagent/drink/affect_blood(var/mob/living/carbon/M, var/alien, var/removed, var/location) +/datum/reagent/drink/affect_blood(var/mob/living/carbon/M, var/alien, var/removed) M.adjustToxLoss(removed) // Probably not a good idea; not very deadly though return -/datum/reagent/drink/affect_ingest(var/mob/living/carbon/M, var/alien, var/removed, var/location) +/datum/reagent/drink/affect_ingest(var/mob/living/carbon/M, var/alien, var/removed) M.nutrition += nutrition * removed M.dizziness = max(0, M.dizziness + adj_dizzy) M.drowsyness = max(0, M.drowsyness + adj_drowsy) @@ -369,7 +379,7 @@ glass_name = "glass of carrot juice" glass_desc = "It is just like a carrot but without crunching." -/datum/reagent/drink/carrotjuice/affect_ingest(var/mob/living/carbon/M, var/alien, var/removed, var/location) +/datum/reagent/drink/carrotjuice/affect_ingest(var/mob/living/carbon/M, var/alien, var/removed) ..() M.reagents.add_reagent("imidazoline", removed * 0.2) @@ -403,7 +413,7 @@ glass_name = "glass of lime juice" glass_desc = "A glass of sweet-sour lime juice" -/datum/reagent/drink/limejuice/affect_ingest(var/mob/living/carbon/M, var/alien, var/removed, var/location) +/datum/reagent/drink/limejuice/affect_ingest(var/mob/living/carbon/M, var/alien, var/removed) ..() if(alien == IS_DIONA) return @@ -419,7 +429,7 @@ glass_name = "glass of orange juice" glass_desc = "Vitamins! Yay!" -/datum/reagent/drink/orangejuice/affect_ingest(var/mob/living/carbon/M, var/alien, var/removed, var/location) +/datum/reagent/drink/orangejuice/affect_ingest(var/mob/living/carbon/M, var/alien, var/removed) ..() if(alien == IS_DIONA) return @@ -457,7 +467,7 @@ glass_name = "glass of tomato juice" glass_desc = "Are you sure this is tomato juice?" -/datum/reagent/drink/tomatojuice/affect_ingest(var/mob/living/carbon/M, var/alien, var/removed, var/location) +/datum/reagent/drink/tomatojuice/affect_ingest(var/mob/living/carbon/M, var/alien, var/removed) ..() if(alien == IS_DIONA) return @@ -485,7 +495,7 @@ glass_name = "glass of milk" glass_desc = "White and nutritious goodness!" -/datum/reagent/drink/milk/affect_ingest(var/mob/living/carbon/M, var/alien, var/removed, var/location) +/datum/reagent/drink/milk/affect_ingest(var/mob/living/carbon/M, var/alien, var/removed) ..() if(alien == IS_DIONA) return @@ -526,7 +536,7 @@ glass_name = "cup of tea" glass_desc = "Tasty black tea, it has antioxidants, it's good for you!" -/datum/reagent/drink/tea/affect_ingest(var/mob/living/carbon/M, var/alien, var/removed, var/location) +/datum/reagent/drink/tea/affect_ingest(var/mob/living/carbon/M, var/alien, var/removed) ..() if(alien == IS_DIONA) return @@ -558,7 +568,7 @@ glass_name = "cup of coffee" glass_desc = "Don't drop it, or you'll send scalding liquid and glass shards everywhere." -/datum/reagent/drink/coffee/affect_ingest(var/mob/living/carbon/M, var/alien, var/removed, var/location) +/datum/reagent/drink/coffee/affect_ingest(var/mob/living/carbon/M, var/alien, var/removed) ..() if(alien == IS_DIONA) return @@ -589,7 +599,7 @@ glass_desc = "A nice and refrshing beverage while you are reading." glass_center_of_mass = list("x"=15, "y"=9) -/datum/reagent/drink/coffee/soy_latte/affect_ingest(var/mob/living/carbon/M, var/alien, var/removed, var/location) +/datum/reagent/drink/coffee/soy_latte/affect_ingest(var/mob/living/carbon/M, var/alien, var/removed) ..() M.heal_organ_damage(0.5 * removed, 0) @@ -605,7 +615,7 @@ glass_desc = "A nice, strong and refreshing beverage while you are reading." glass_center_of_mass = list("x"=15, "y"=9) -/datum/reagent/drink/coffee/cafe_latte/affect_ingest(var/mob/living/carbon/M, var/alien, var/removed, var/location) +/datum/reagent/drink/coffee/cafe_latte/affect_ingest(var/mob/living/carbon/M, var/alien, var/removed) ..() M.heal_organ_damage(0.5 * removed, 0) @@ -718,7 +728,7 @@ glass_desc = "The secret of the sanctuary of the Libarian..." glass_center_of_mass = list("x"=16, "y"=9) -/datum/reagent/drink/rewriter/affect_ingest(var/mob/living/carbon/M, var/alien, var/removed, var/location) +/datum/reagent/drink/rewriter/affect_ingest(var/mob/living/carbon/M, var/alien, var/removed) ..() M.make_jittery(5) @@ -735,7 +745,7 @@ glass_desc = "Don't cry, Don't raise your eye, It's only nuclear wasteland" glass_center_of_mass = list("x"=16, "y"=6) -/datum/reagent/drink/nuka_cola/affect_ingest(var/mob/living/carbon/M, var/alien, var/removed, var/location) +/datum/reagent/drink/nuka_cola/affect_ingest(var/mob/living/carbon/M, var/alien, var/removed) ..() M.add_chemical_effect(CE_SPEEDBOOST, 1) M.make_jittery(20) @@ -827,7 +837,7 @@ glass_desc = "A healthy mixture of juices, guaranteed to keep you healthy until the next toolboxing takes place." glass_center_of_mass = list("x"=16, "y"=8) -/datum/reagent/drink/doctor_delight/affect_ingest(var/mob/living/carbon/M, var/alien, var/removed, var/location) +/datum/reagent/drink/doctor_delight/affect_ingest(var/mob/living/carbon/M, var/alien, var/removed) ..() if(alien == IS_DIONA) return @@ -864,7 +874,7 @@ color = "#302000" nutrition = 5 -/datum/reagent/drink/hell_ramen/affect_ingest(var/mob/living/carbon/M, var/alien, var/removed, var/location) +/datum/reagent/drink/hell_ramen/affect_ingest(var/mob/living/carbon/M, var/alien, var/removed) ..() if(alien == IS_DIONA) return @@ -932,7 +942,7 @@ glass_desc = "A freezing pint of beer" glass_center_of_mass = list("x"=16, "y"=8) -/datum/reagent/ethanol/beer/affect_ingest(var/mob/living/carbon/M, var/alien, var/removed, var/location) +/datum/reagent/ethanol/beer/affect_ingest(var/mob/living/carbon/M, var/alien, var/removed) ..() if(alien == IS_DIONA) return @@ -974,7 +984,7 @@ glass_desc = "Now you want to Pray for a pirate suit, don't you?" glass_center_of_mass = list("x"=16, "y"=12) -/datum/reagent/ethanol/deadrum/affect_ingest(var/mob/living/carbon/M, var/alien, var/removed, var/location) +/datum/reagent/ethanol/deadrum/affect_ingest(var/mob/living/carbon/M, var/alien, var/removed) ..() if(alien == IS_DIONA) return @@ -1004,7 +1014,7 @@ glass_desc = "DAMN, THIS THING LOOKS ROBUST" glass_center_of_mass = list("x"=15, "y"=7) -/datum/reagent/ethanol/kahlua/affect_ingest(var/mob/living/carbon/M, var/alien, var/removed, var/location) +/datum/reagent/ethanol/kahlua/affect_ingest(var/mob/living/carbon/M, var/alien, var/removed) ..() if(alien == IS_DIONA) return @@ -1075,7 +1085,7 @@ glass_name = "glass of Thirteen Loko" glass_desc = "This is a glass of Thirteen Loko, it appears to be of the highest quality. The drink, not the glass." -/datum/reagent/ethanol/thirteenloko/affect_ingest(var/mob/living/carbon/M, var/alien, var/removed, var/location) +/datum/reagent/ethanol/thirteenloko/affect_ingest(var/mob/living/carbon/M, var/alien, var/removed) ..() if(alien == IS_DIONA) return @@ -1108,7 +1118,7 @@ glass_desc = "The glass contain wodka. Xynta." glass_center_of_mass = list("x"=16, "y"=12) -/datum/reagent/ethanol/vodka/affect_ingest(var/mob/living/carbon/M, var/alien, var/removed, var/location) +/datum/reagent/ethanol/vodka/affect_ingest(var/mob/living/carbon/M, var/alien, var/removed) ..() M.radiation = max(M.radiation - 1 * removed, 0) @@ -1289,7 +1299,7 @@ glass_desc = "Heavy, hot and strong. Just like the Iron fist of the LAW." glass_center_of_mass = list("x"=18, "y"=10) -/datum/reagent/ethanol/beepsky_smash/affect_ingest(var/mob/living/carbon/M, var/alien, var/removed, var/location) +/datum/reagent/ethanol/beepsky_smash/affect_ingest(var/mob/living/carbon/M, var/alien, var/removed) ..() M.Stun(2) @@ -1670,7 +1680,7 @@ glass_desc = "A drink that is guaranteed to knock you silly." glass_center_of_mass = list("x"=16, "y"=8) -/datum/reagent/ethanol/neurotoxin/affect_ingest(var/mob/living/carbon/M, var/alien, var/removed, var/location) +/datum/reagent/ethanol/neurotoxin/affect_ingest(var/mob/living/carbon/M, var/alien, var/removed) ..() M.Weaken(3) @@ -1700,7 +1710,7 @@ glass_desc = "A black ichor with an oily purple sheer on top. Are you sure you should drink this?" glass_center_of_mass = list("x"=16, "y"=5) -/datum/reagent/ethanol/pwine/affect_ingest(var/mob/living/carbon/M, var/alien, var/removed, var/location) +/datum/reagent/ethanol/pwine/affect_ingest(var/mob/living/carbon/M, var/alien, var/removed) ..() if(dose > 30) M.adjustToxLoss(2 * removed) diff --git a/code/modules/reagents/Chemistry-Reagents/Chemistry-Reagents-Medicine.dm b/code/modules/reagents/Chemistry-Reagents/Chemistry-Reagents-Medicine.dm index dc26aa58e3..c17178ae63 100644 --- a/code/modules/reagents/Chemistry-Reagents/Chemistry-Reagents-Medicine.dm +++ b/code/modules/reagents/Chemistry-Reagents/Chemistry-Reagents-Medicine.dm @@ -10,7 +10,7 @@ metabolism = REM * 0.5 scannable = 1 -/datum/reagent/inaprovaline/affect_blood(var/mob/living/carbon/M, var/alien, var/removed, var/location) +/datum/reagent/inaprovaline/affect_blood(var/mob/living/carbon/M, var/alien, var/removed) if(alien != IS_DIONA) M.add_chemical_effect(CE_STABLE) M.add_chemical_effect(CE_PAINKILLER, 25) @@ -24,7 +24,7 @@ overdose = REAGENTS_OVERDOSE scannable = 1 -/datum/reagent/bicaridine/affect_blood(var/mob/living/carbon/M, var/alien, var/removed, var/location) +/datum/reagent/bicaridine/affect_blood(var/mob/living/carbon/M, var/alien, var/removed) if(alien != IS_DIONA) M.heal_organ_damage(6 * removed, 0) @@ -37,7 +37,7 @@ overdose = REAGENTS_OVERDOSE scannable = 1 -/datum/reagent/kelotane/affect_blood(var/mob/living/carbon/M, var/alien, var/removed, var/location) +/datum/reagent/kelotane/affect_blood(var/mob/living/carbon/M, var/alien, var/removed) if(alien != IS_DIONA) M.heal_organ_damage(0, 6 * removed) @@ -50,7 +50,7 @@ overdose = REAGENTS_OVERDOSE * 0.5 scannable = 1 -/datum/reagent/dermaline/affect_blood(var/mob/living/carbon/M, var/alien, var/removed, var/location) +/datum/reagent/dermaline/affect_blood(var/mob/living/carbon/M, var/alien, var/removed) if(alien != IS_DIONA) M.heal_organ_damage(0, 12 * removed) @@ -62,7 +62,7 @@ color = "#00A000" scannable = 1 -/datum/reagent/dylovene/affect_blood(var/mob/living/carbon/M, var/alien, var/removed, var/location) +/datum/reagent/dylovene/affect_blood(var/mob/living/carbon/M, var/alien, var/removed) if(alien != IS_DIONA) M.drowsyness = max(0, M.drowsyness - 6 * removed) M.hallucination = max(0, M.hallucination - 9 * removed) @@ -77,7 +77,7 @@ overdose = REAGENTS_OVERDOSE scannable = 1 -/datum/reagent/dexalin/affect_blood(var/mob/living/carbon/M, var/alien, var/removed, var/location) +/datum/reagent/dexalin/affect_blood(var/mob/living/carbon/M, var/alien, var/removed) if(alien == IS_VOX) M.adjustToxLoss(removed * 6) else if(alien != IS_DIONA) @@ -94,7 +94,7 @@ overdose = REAGENTS_OVERDOSE * 0.5 scannable = 1 -/datum/reagent/dexalinp/affect_blood(var/mob/living/carbon/M, var/alien, var/removed, var/location) +/datum/reagent/dexalinp/affect_blood(var/mob/living/carbon/M, var/alien, var/removed) if(alien == IS_VOX) M.adjustToxLoss(removed * 9) else if(alien != IS_DIONA) @@ -110,7 +110,7 @@ color = "#8040FF" scannable = 1 -/datum/reagent/tricordrazine/affect_blood(var/mob/living/carbon/M, var/alien, var/removed, var/location) +/datum/reagent/tricordrazine/affect_blood(var/mob/living/carbon/M, var/alien, var/removed) if(alien != IS_DIONA) M.adjustOxyLoss(-6 * removed) M.heal_organ_damage(3 * removed, 3 * removed) @@ -125,7 +125,7 @@ metabolism = REM * 0.5 scannable = 1 -/datum/reagent/cryoxadone/affect_blood(var/mob/living/carbon/M, var/alien, var/removed, var/location) +/datum/reagent/cryoxadone/affect_blood(var/mob/living/carbon/M, var/alien, var/removed) if(M.bodytemperature < 170) M.adjustCloneLoss(-10 * removed) M.adjustOxyLoss(-10 * removed) @@ -141,7 +141,7 @@ metabolism = REM * 0.5 scannable = 1 -/datum/reagent/cryoxadone/affect_blood(var/mob/living/carbon/M, var/alien, var/removed, var/location) +/datum/reagent/cryoxadone/affect_blood(var/mob/living/carbon/M, var/alien, var/removed) if(M.bodytemperature < 170) M.adjustCloneLoss(-30 * removed) M.adjustOxyLoss(-3 * removed) @@ -160,7 +160,7 @@ scannable = 1 metabolism = 0.02 -/datum/reagent/paracetamol/affect_blood(var/mob/living/carbon/M, var/alien, var/removed, var/location) +/datum/reagent/paracetamol/affect_blood(var/mob/living/carbon/M, var/alien, var/removed) M.add_chemical_effect(CE_PAINKILLER, 50) /datum/reagent/paracetamol/overdose(var/mob/living/carbon/M, var/alien) @@ -177,7 +177,7 @@ scannable = 1 metabolism = 0.02 -/datum/reagent/tramadol/affect_blood(var/mob/living/carbon/M, var/alien, var/removed, var/location) +/datum/reagent/tramadol/affect_blood(var/mob/living/carbon/M, var/alien, var/removed) M.add_chemical_effect(CE_PAINKILLER, 80) /datum/reagent/tramadol/overdose(var/mob/living/carbon/M, var/alien) @@ -193,7 +193,7 @@ overdose = 20 metabolism = 0.02 -/datum/reagent/oxycodone/affect_blood(var/mob/living/carbon/M, var/alien, var/removed, var/location) +/datum/reagent/oxycodone/affect_blood(var/mob/living/carbon/M, var/alien, var/removed) M.add_chemical_effect(CE_PAINKILLER, 200) /datum/reagent/oxycodone/overdose(var/mob/living/carbon/M, var/alien) @@ -213,7 +213,7 @@ overdose = REAGENTS_OVERDOSE scannable = 1 -/datum/reagent/synaptizine/affect_blood(var/mob/living/carbon/M, var/alien, var/removed, var/location) +/datum/reagent/synaptizine/affect_blood(var/mob/living/carbon/M, var/alien, var/removed) if(alien == IS_DIONA) return M.drowsyness = max(M.drowsyness - 5, 0) @@ -235,7 +235,7 @@ overdose = REAGENTS_OVERDOSE scannable = 1 -/datum/reagent/alkysine/affect_blood(var/mob/living/carbon/M, var/alien, var/removed, var/location) +/datum/reagent/alkysine/affect_blood(var/mob/living/carbon/M, var/alien, var/removed) if(alien == IS_DIONA) return M.adjustBrainLoss(-30 * removed) @@ -250,7 +250,7 @@ overdose = REAGENTS_OVERDOSE scannable = 1 -/datum/reagent/imidazoline/affect_blood(var/mob/living/carbon/M, var/alien, var/removed, var/location) +/datum/reagent/imidazoline/affect_blood(var/mob/living/carbon/M, var/alien, var/removed) M.eye_blurry = max(M.eye_blurry - 5, 0) M.eye_blind = max(M.eye_blind - 5, 0) if(ishuman(M)) @@ -269,7 +269,7 @@ overdose = 10 scannable = 1 -/datum/reagent/peridaxon/affect_blood(var/mob/living/carbon/M, var/alien, var/removed, var/location) +/datum/reagent/peridaxon/affect_blood(var/mob/living/carbon/M, var/alien, var/removed) if(ishuman(M)) var/mob/living/carbon/human/H = M @@ -285,7 +285,7 @@ color = "#004000" overdose = REAGENTS_OVERDOSE -/datum/reagent/ryetalyn/affect_blood(var/mob/living/carbon/M, var/alien, var/removed, var/location) +/datum/reagent/ryetalyn/affect_blood(var/mob/living/carbon/M, var/alien, var/removed) var/needs_update = M.mutations.len > 0 M.mutations = list() @@ -306,7 +306,7 @@ metabolism = REM * 0.15 overdose = REAGENTS_OVERDOSE * 0.5 -/datum/reagent/hyperzine/affect_blood(var/mob/living/carbon/M, var/alien, var/removed, var/location) +/datum/reagent/hyperzine/affect_blood(var/mob/living/carbon/M, var/alien, var/removed) if(alien == IS_DIONA) return if(prob(5)) @@ -321,7 +321,7 @@ color = "#605048" overdose = REAGENTS_OVERDOSE -/datum/reagent/ethylredoxrazine/affect_blood(var/mob/living/carbon/M, var/alien, var/removed, var/location) +/datum/reagent/ethylredoxrazine/affect_blood(var/mob/living/carbon/M, var/alien, var/removed) if(alien == IS_DIONA) return M.dizziness = 0 @@ -343,7 +343,7 @@ overdose = REAGENTS_OVERDOSE scannable = 1 -/datum/reagent/hyronalin/affect_blood(var/mob/living/carbon/M, var/alien, var/removed, var/location) +/datum/reagent/hyronalin/affect_blood(var/mob/living/carbon/M, var/alien, var/removed) M.radiation = max(M.radiation - 30 * removed, 0) /datum/reagent/arithrazine @@ -356,7 +356,7 @@ overdose = REAGENTS_OVERDOSE scannable = 1 -/datum/reagent/arithrazine/affect_blood(var/mob/living/carbon/M, var/alien, var/removed, var/location) +/datum/reagent/arithrazine/affect_blood(var/mob/living/carbon/M, var/alien, var/removed) M.radiation = max(M.radiation - 70 * removed, 0) M.adjustToxLoss(-10 * removed) if(prob(60)) @@ -380,7 +380,7 @@ color = "#C8A5DC" touch_met = 5 -/datum/reagent/sterilizine/affect_touch(var/mob/living/carbon/M, var/alien, var/removed, var/location) +/datum/reagent/sterilizine/affect_touch(var/mob/living/carbon/M, var/alien, var/removed) M.germ_level -= min(removed*20, M.germ_level) /datum/reagent/sterilizine/touch_obj(var/obj/O) @@ -398,7 +398,7 @@ overdose = REAGENTS_OVERDOSE scannable = 1 -/datum/reagent/leporazine/affect_blood(var/mob/living/carbon/M, var/alien, var/removed, var/location) +/datum/reagent/leporazine/affect_blood(var/mob/living/carbon/M, var/alien, var/removed) if(M.bodytemperature > 310) M.bodytemperature = max(310, M.bodytemperature - (40 * TEMPERATURE_DAMAGE_COEFFICIENT)) else if(M.bodytemperature < 311) @@ -417,7 +417,7 @@ metabolism = 0.01 data = 0 -/datum/reagent/methylphenidate/affect_blood(var/mob/living/carbon/M, var/alien, var/removed, var/location) +/datum/reagent/methylphenidate/affect_blood(var/mob/living/carbon/M, var/alien, var/removed) if(alien == IS_DIONA) return if(volume <= 0.1 && data != -1) @@ -437,7 +437,7 @@ metabolism = 0.01 data = 0 -/datum/reagent/citalopram/affect_blood(var/mob/living/carbon/M, var/alien, var/removed, var/location) +/datum/reagent/citalopram/affect_blood(var/mob/living/carbon/M, var/alien, var/removed) if(alien == IS_DIONA) return if(volume <= 0.1 && data != -1) @@ -457,7 +457,7 @@ metabolism = 0.01 data = 0 -/datum/reagent/paroxetine/affect_blood(var/mob/living/carbon/M, var/alien, var/removed, var/location) +/datum/reagent/paroxetine/affect_blood(var/mob/living/carbon/M, var/alien, var/removed) if(alien == IS_DIONA) return if(volume <= 0.1 && data != -1) @@ -481,7 +481,7 @@ overdose = REAGENTS_OVERDOSE scannable = 1 -/datum/reagent/rezadone/affect_blood(var/mob/living/carbon/M, var/alien, var/removed, var/location) +/datum/reagent/rezadone/affect_blood(var/mob/living/carbon/M, var/alien, var/removed) M.adjustCloneLoss(-20 * removed) M.adjustOxyLoss(-2 * removed) M.heal_organ_damage(20 * removed, 20 * removed) diff --git a/code/modules/reagents/Chemistry-Reagents/Chemistry-Reagents-Other.dm b/code/modules/reagents/Chemistry-Reagents/Chemistry-Reagents-Other.dm index 97e361e56b..0b57ef9372 100644 --- a/code/modules/reagents/Chemistry-Reagents/Chemistry-Reagents-Other.dm +++ b/code/modules/reagents/Chemistry-Reagents/Chemistry-Reagents-Other.dm @@ -69,7 +69,7 @@ if(istype(M) && !istype(M, /mob/dead)) //painting ghosts: not allowed M.color = color -/datum/reagent/paint/affect_touch(var/mob/living/carbon/M, var/alien, var/removed, var/location) +/datum/reagent/paint/affect_touch(var/mob/living/carbon/M, var/alien, var/removed) M.color = color /datum/reagent/paint/get_data() @@ -119,10 +119,10 @@ glass_name = "golden cup" glass_desc = "It's magic. We don't have to explain it." -/datum/reagent/adminordrazine/affect_touch(var/mob/living/carbon/M, var/alien, var/removed, var/location) +/datum/reagent/adminordrazine/affect_touch(var/mob/living/carbon/M, var/alien, var/removed) affect_blood(M, alien, removed) -/datum/reagent/adminordrazine/affect_blood(var/mob/living/carbon/M, var/alien, var/removed, var/location) +/datum/reagent/adminordrazine/affect_blood(var/mob/living/carbon/M, var/alien, var/removed) M.setCloneLoss(0) M.setOxyLoss(0) M.radiation = 0 @@ -171,10 +171,10 @@ reagent_state = SOLID color = "#B8B8C0" -/datum/reagent/uranium/affect_touch(var/mob/living/carbon/M, var/alien, var/removed, var/location) +/datum/reagent/uranium/affect_touch(var/mob/living/carbon/M, var/alien, var/removed) affect_ingest(M, alien, removed) -/datum/reagent/uranium/affect_blood(var/mob/living/carbon/M, var/alien, var/removed, var/location) +/datum/reagent/uranium/affect_blood(var/mob/living/carbon/M, var/alien, var/removed) M.apply_effect(5 * removed, IRRADIATE, 0) /datum/reagent/uranium/touch_turf(var/turf/T) @@ -192,7 +192,7 @@ reagent_state = LIQUID color = "#C8A5DC" -/datum/reagent/adrenaline/affect_blood(var/mob/living/carbon/M, var/alien, var/removed, var/location) +/datum/reagent/adrenaline/affect_blood(var/mob/living/carbon/M, var/alien, var/removed) if(alien == IS_DIONA) return M.SetParalysis(0) @@ -209,7 +209,7 @@ glass_name = "glass of holy water" glass_desc = "An ashen-obsidian-water mix, this solution will alter certain sections of the brain's rationality." -/datum/reagent/water/holywater/affect_ingest(var/mob/living/carbon/M, var/alien, var/removed, var/location) +/datum/reagent/water/holywater/affect_ingest(var/mob/living/carbon/M, var/alien, var/removed) ..() if(ishuman(M)) // Any location if(M.mind && cult.is_antagonist(M.mind) && prob(10)) @@ -265,11 +265,11 @@ remove_self(5) return -/datum/reagent/thermite/affect_touch(var/mob/living/carbon/M, var/alien, var/removed, var/location) +/datum/reagent/thermite/affect_touch(var/mob/living/carbon/M, var/alien, var/removed) M.adjust_fire_stacks(removed * 0.2) return -/datum/reagent/thermite/affect_blood(var/mob/living/carbon/M, var/alien, var/removed, var/location) +/datum/reagent/thermite/affect_blood(var/mob/living/carbon/M, var/alien, var/removed) M.adjustFireLoss(3 * removed) /datum/reagent/space_cleaner @@ -296,7 +296,7 @@ for(var/mob/living/carbon/slime/M in T) M.adjustToxLoss(rand(5, 10)) -/datum/reagent/space_cleaner/affect_touch(var/mob/living/carbon/M, var/alien, var/removed, var/location) +/datum/reagent/space_cleaner/affect_touch(var/mob/living/carbon/M, var/alien, var/removed) if(M.r_hand) M.r_hand.clean_blood() if(M.l_hand) diff --git a/code/modules/reagents/Chemistry-Reagents/Chemistry-Reagents-Toxins.dm b/code/modules/reagents/Chemistry-Reagents/Chemistry-Reagents-Toxins.dm index 46bf3698f2..f74be65409 100644 --- a/code/modules/reagents/Chemistry-Reagents/Chemistry-Reagents-Toxins.dm +++ b/code/modules/reagents/Chemistry-Reagents/Chemistry-Reagents-Toxins.dm @@ -9,7 +9,7 @@ metabolism = REM * 0.05 // 0.01 by default. They last a while and slowly kill you. var/strength = 4 // How much damage it deals per unit -/datum/reagent/toxin/affect_blood(var/mob/living/carbon/M, var/alien, var/removed, var/location) +/datum/reagent/toxin/affect_blood(var/mob/living/carbon/M, var/alien, var/removed) if(strength && alien != IS_DIONA) M.adjustToxLoss(strength * removed) @@ -45,7 +45,7 @@ color = "#9D14DB" strength = 30 -/datum/reagent/toxin/phoron/affect_touch(var/mob/living/carbon/M, var/alien, var/removed, var/location) +/datum/reagent/toxin/phoron/affect_touch(var/mob/living/carbon/M, var/alien, var/removed) ..() M.adjust_fire_stacks(removed / 5) @@ -64,7 +64,7 @@ strength = 20 metabolism = REM * 2 -/datum/reagent/toxin/cyanide/affect_blood(var/mob/living/carbon/M, var/alien, var/removed, var/location) +/datum/reagent/toxin/cyanide/affect_blood(var/mob/living/carbon/M, var/alien, var/removed) ..() M.adjustOxyLoss(20 * removed) M.sleeping += 1 @@ -97,7 +97,7 @@ strength = 10 overdose = 20 -/datum/reagent/toxin/potassium_chlorophoride/affect_blood(var/mob/living/carbon/M, var/alien, var/removed, var/location) +/datum/reagent/toxin/potassium_chlorophoride/affect_blood(var/mob/living/carbon/M, var/alien, var/removed) ..() if(ishuman(M)) var/mob/living/carbon/human/H = M @@ -116,7 +116,7 @@ metabolism = REM strength = 3 -/datum/reagent/toxin/zombiepowder/affect_blood(var/mob/living/carbon/M, var/alien, var/removed, var/location) +/datum/reagent/toxin/zombiepowder/affect_blood(var/mob/living/carbon/M, var/alien, var/removed) ..() if(alien == IS_DIONA) return @@ -179,12 +179,12 @@ else if(istype(O, /obj/effect/plant)) qdel(O) -/datum/reagent/toxin/plantbgone/affect_blood(var/mob/living/carbon/M, var/alien, var/removed, var/location) +/datum/reagent/toxin/plantbgone/affect_blood(var/mob/living/carbon/M, var/alien, var/removed) ..() if(alien == IS_DIONA) M.adjustToxLoss(50 * removed) -/datum/reagent/toxin/plantbgone/affect_touch(var/mob/living/carbon/M, var/alien, var/removed, var/location) +/datum/reagent/toxin/plantbgone/affect_touch(var/mob/living/carbon/M, var/alien, var/removed) ..() if(alien == IS_DIONA) M.adjustToxLoss(50 * removed) @@ -206,7 +206,7 @@ color = "#C8A5DC" overdose = REAGENTS_OVERDOSE -/datum/reagent/lexorin/affect_blood(var/mob/living/carbon/M, var/alien, var/removed, var/location) +/datum/reagent/lexorin/affect_blood(var/mob/living/carbon/M, var/alien, var/removed) if(alien == IS_DIONA) return M.take_organ_damage(3 * removed, 0) @@ -220,15 +220,15 @@ reagent_state = LIQUID color = "#13BC5E" -/datum/reagent/mutagen/affect_touch(var/mob/living/carbon/M, var/alien, var/removed, var/location) +/datum/reagent/mutagen/affect_touch(var/mob/living/carbon/M, var/alien, var/removed) if(prob(33)) affect_blood(M, alien, removed) -/datum/reagent/mutagen/affect_ingest(var/mob/living/carbon/M, var/alien, var/removed, var/location) +/datum/reagent/mutagen/affect_ingest(var/mob/living/carbon/M, var/alien, var/removed) if(prob(67)) affect_blood(M, alien, removed) -/datum/reagent/mutagen/affect_blood(var/mob/living/carbon/M, var/alien, var/removed, var/location) +/datum/reagent/mutagen/affect_blood(var/mob/living/carbon/M, var/alien, var/removed) if(M.dna) if(prob(removed * 0.1)) // Approx. one mutation per 10 injected/20 ingested/30 touching units randmuti(M) @@ -247,7 +247,7 @@ reagent_state = LIQUID color = "#801E28" -/datum/reagent/slimejelly/affect_blood(var/mob/living/carbon/M, var/alien, var/removed, var/location) +/datum/reagent/slimejelly/affect_blood(var/mob/living/carbon/M, var/alien, var/removed) if(alien == IS_DIONA) return if(prob(10)) @@ -265,7 +265,7 @@ metabolism = REM * 0.5 overdose = REAGENTS_OVERDOSE -/datum/reagent/soporific/affect_blood(var/mob/living/carbon/M, var/alien, var/removed, var/location) +/datum/reagent/soporific/affect_blood(var/mob/living/carbon/M, var/alien, var/removed) if(alien == IS_DIONA) return if(dose < 1) @@ -290,7 +290,7 @@ metabolism = REM * 0.5 overdose = REAGENTS_OVERDOSE * 0.5 -/datum/reagent/chloralhydrate/affect_blood(var/mob/living/carbon/M, var/alien, var/removed, var/location) +/datum/reagent/chloralhydrate/affect_blood(var/mob/living/carbon/M, var/alien, var/removed) if(alien == IS_DIONA) return if(dose == metabolism) @@ -328,7 +328,7 @@ metabolism = REM * 0.5 overdose = REAGENTS_OVERDOSE -/datum/reagent/space_drugs/affect_blood(var/mob/living/carbon/M, var/alien, var/removed, var/location) +/datum/reagent/space_drugs/affect_blood(var/mob/living/carbon/M, var/alien, var/removed) if(alien == IS_DIONA) return M.druggy = max(M.druggy, 15) @@ -346,7 +346,7 @@ metabolism = REM * 0.25 overdose = REAGENTS_OVERDOSE -/datum/reagent/serotrotium/affect_blood(var/mob/living/carbon/M, var/alien, var/removed, var/location) +/datum/reagent/serotrotium/affect_blood(var/mob/living/carbon/M, var/alien, var/removed) if(alien == IS_DIONA) return if(prob(7)) @@ -362,7 +362,7 @@ metabolism = REM * 0.5 overdose = REAGENTS_OVERDOSE -/datum/reagent/cryptobiolin/affect_blood(var/mob/living/carbon/M, var/alien, var/removed, var/location) +/datum/reagent/cryptobiolin/affect_blood(var/mob/living/carbon/M, var/alien, var/removed) if(alien == IS_DIONA) return M.make_dizzy(4) @@ -376,7 +376,7 @@ color = "#C8A5DC" overdose = REAGENTS_OVERDOSE -/datum/reagent/impedrezene/affect_blood(var/mob/living/carbon/M, var/alien, var/removed, var/location) +/datum/reagent/impedrezene/affect_blood(var/mob/living/carbon/M, var/alien, var/removed) if(alien == IS_DIONA) return M.jitteriness = max(M.jitteriness - 5, 0) @@ -396,7 +396,7 @@ metabolism = REM * 0.25 overdose = REAGENTS_OVERDOSE -/datum/reagent/mindbreaker/affect_blood(var/mob/living/carbon/M, var/alien, var/removed, var/location) +/datum/reagent/mindbreaker/affect_blood(var/mob/living/carbon/M, var/alien, var/removed) if(alien == IS_DIONA) return M.hallucination = max(M.hallucination, 100) @@ -409,7 +409,7 @@ overdose = REAGENTS_OVERDOSE metabolism = REM * 0.5 -/datum/reagent/psilocybin/affect_blood(var/mob/living/carbon/M, var/alien, var/removed, var/location) +/datum/reagent/psilocybin/affect_blood(var/mob/living/carbon/M, var/alien, var/removed) if(alien == IS_DIONA) return M.druggy = max(M.druggy, 30) @@ -449,7 +449,7 @@ reagent_state = LIQUID color = "#13BC5E" -/datum/reagent/slimetoxin/affect_blood(var/mob/living/carbon/M, var/alien, var/removed, var/location) +/datum/reagent/slimetoxin/affect_blood(var/mob/living/carbon/M, var/alien, var/removed) if(ishuman(M)) var/mob/living/carbon/human/H = M if(H.species.name != "Slime") @@ -463,7 +463,7 @@ reagent_state = LIQUID color = "#13BC5E" -/datum/reagent/aslimetoxin/affect_blood(var/mob/living/carbon/M, var/alien, var/removed, var/location) // TODO: check if there's similar code anywhere else +/datum/reagent/aslimetoxin/affect_blood(var/mob/living/carbon/M, var/alien, var/removed) // TODO: check if there's similar code anywhere else if(M.monkeyizing) return M << "Your flesh rapidly mutates!" @@ -495,11 +495,11 @@ reagent_state = LIQUID color = "#535E66" -/datum/reagent/nanites/affect_touch(var/mob/living/carbon/M, var/alien, var/removed, var/location) +/datum/reagent/nanites/affect_touch(var/mob/living/carbon/M, var/alien, var/removed) if(prob(10)) M.contract_disease(new /datum/disease/robotic_transformation(0), 1) -/datum/reagent/nanites/affect_blood(var/mob/living/carbon/M, var/alien, var/removed, var/location) +/datum/reagent/nanites/affect_blood(var/mob/living/carbon/M, var/alien, var/removed) M.contract_disease(new /datum/disease/robotic_transformation(0), 1) /datum/reagent/xenomicrobes @@ -509,9 +509,9 @@ reagent_state = LIQUID color = "#535E66" -/datum/reagent/xenomicrobes/affect_touch(var/mob/living/carbon/M, var/alien, var/removed, var/location) +/datum/reagent/xenomicrobes/affect_touch(var/mob/living/carbon/M, var/alien, var/removed) if(prob(10)) M.contract_disease(new /datum/disease/xeno_transformation(0), 1) -/datum/reagent/xenomicrobes/affect_blood(var/mob/living/carbon/M, var/alien, var/removed, var/location) +/datum/reagent/xenomicrobes/affect_blood(var/mob/living/carbon/M, var/alien, var/removed) M.contract_disease(new /datum/disease/xeno_transformation(0), 1)