Removes unused files added by accident, separates reagent files

This commit is contained in:
Kelenius
2015-04-28 11:00:56 +03:00
parent 317abc6b79
commit 948252d25b
11 changed files with 3895 additions and 5023 deletions

File diff suppressed because it is too large Load Diff

View File

@@ -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("<span class='warning'>The water sizzles as it lands on \the [T]!</span>")
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("<span class='warning'>[S]'s flesh sizzles where the water touches it!</span>", "<span class='danger'>Your flesh burns in the water!</span>")
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)

View File

@@ -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 << "<span class='notice'>The solution does nothing. Whatever this is, it isn't normal ink.</span>"
return
var/obj/item/weapon/book/affectedbook = O
affectedbook.dat = null
usr << "<span class='notice'>The solution dissolves the ink on the book.</span>"
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 << "<span class='danger'>Your [H.head] protects you from the acid.</span>"
remove_self(volume)
return
else if(removed > meltdose)
H << "<span class='danger'>Your [H.head] melts away!</span>"
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 << "<span class='danger'>Your [H.wear_mask] protects you from the acid.</span>"
remove_self(volume)
return
else if(removed > meltdose)
H << "<span class='danger'>Your [H.wear_mask] melts away!</span>"
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 << "<span class='danger'>Your [H.glasses] partially protect you from the acid!</span>"
removed /= 2
else if(removed > meltdose)
H << "<span class='danger'>Your [H.glasses] melt away!</span>"
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 << "<span class='warning'>\The [O] melts.</span>"
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"

File diff suppressed because it is too large Load Diff

View File

@@ -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 << "<span class='warning'>You lose focus...</span>"
else
if(world.time > data + ANTIDEPRESSANT_MESSAGE_DELAY)
data = world.time
M << "<span class='notice'>Your mind feels focused and undivided.</span>"
/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 << "<span class='warning'>Your mind feels a little less stable...</span>"
else
if(world.time > data + ANTIDEPRESSANT_MESSAGE_DELAY)
data = world.time
M << "<span class='notice'>Your mind feels stable... a little stable.</span>"
/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 << "<span class='warning'>Your mind feels much less stable...</span>"
else
if(world.time > data + ANTIDEPRESSANT_MESSAGE_DELAY)
data = world.time
if(prob(90))
M << "<span class='notice'>Your mind feels much more stable.</span>"
else
M << "<span class='warning'>Your mind breaks apart...</span>"
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)

View File

@@ -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"

View File

@@ -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("<span class='notice'>The fungi are completely dissolved by the solution!</span>")
/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 << "<span class='danger'>Your insides are burning!</span>"
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 << "<span class='danger'>Your flesh rapidly mutates!</span>"
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 << "<span class='danger'>Your flesh rapidly mutates!</span>"
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)