diff --git a/code/__DEFINES/mob.dm b/code/__DEFINES/mob.dm
index 75a11f33acc..88f1bc3eeda 100644
--- a/code/__DEFINES/mob.dm
+++ b/code/__DEFINES/mob.dm
@@ -54,11 +54,10 @@
#define GETPULSE_HAND 0 //less accurate (hand)
#define GETPULSE_TOOL 1 //more accurate (med scanner, sleeper, etc)
-//Some on_mob_life() procs check for alien races.
-#define IS_DIONA 1
-#define IS_VOX 2
-#define IS_SKRELL 3
-#define IS_UNATHI 4
+//Reagent Metabolization flags, defines the type of reagents that affect this mob
+#define PROCESS_ORG 1 //Only processes reagents with "ORGANIC" or "ORGANIC | SYNTHETIC"
+#define PROCESS_SYN 2 //Only processes reagents with "SYNTHETIC" or "ORGANIC | SYNTHETIC"
+#define PROCESS_DUO 4 //Only processes reagents with "ORGANIC | SYNTHETIC"
#define HUMAN_STRIP_DELAY 40 //takes 40ds = 4s to strip someone.
#define ALIEN_SELECT_AFK_BUFFER 1 // How many minutes that a person can be AFK before not being allowed to be an alien.
@@ -74,4 +73,8 @@
#define REAGENTS_EFFECT_MULTIPLIER REAGENTS_METABOLISM / 0.4
// Factor of how fast mob nutrition decreases
-#define HUNGER_FACTOR 0.1
\ No newline at end of file
+#define HUNGER_FACTOR 0.1
+
+// Reagent type flags, defines the types of mobs this reagent will affect
+#define ORGANIC 1
+#define SYNTHETIC 2
diff --git a/code/game/machinery/poolcontroller.dm b/code/game/machinery/poolcontroller.dm
index ce63b3f82e2..a1acb1814ff 100644
--- a/code/game/machinery/poolcontroller.dm
+++ b/code/game/machinery/poolcontroller.dm
@@ -77,8 +77,8 @@
var/mob/living/carbon/human/drownee = M //Typecast them as human.
if(drownee.stat == DEAD) //Check stat, if they are dead, ignore them.
continue
- if(drownee && drownee.lying && !drownee.internal && !(drownee.species.flags & NO_BREATHE) && !(drownee.species.reagent_tag == IS_SKRELL) && !(NO_BREATH in drownee.mutations))
- //Establish that there is a mob, the mob is lying down, has no internals, species does breathe, is not a skrell, and does not have NO_BREATHE
+ if(drownee && drownee.lying && !drownee.internal && !(drownee.species.flags & NO_BREATHE) && !(drownee.species.name == "Skrell" || drownee.species.name =="Neara") && !(NO_BREATH in drownee.mutations))
+ //Establish that there is a mob, the mob is lying down, has no internals, species does breathe, is not a skrell/neara, and does not have NO_BREATHE
if(drownee.stat != CONSCIOUS) //Mob is in critical.
drownee.adjustOxyLoss(9) //Kill em quickly.
drownee << "You're quickly drowning!" //inform them that they are fucked.
diff --git a/code/modules/mob/living/carbon/human/life.dm b/code/modules/mob/living/carbon/human/life.dm
index ab942f7f6de..9a8dd644d5a 100644
--- a/code/modules/mob/living/carbon/human/life.dm
+++ b/code/modules/mob/living/carbon/human/life.dm
@@ -744,11 +744,8 @@ var/global/list/brutefireloss_overlays = list("1" = image("icon" = 'icons/mob/sc
proc/handle_chemicals_in_body()
- if(reagents) //Synths don't process reagents. // fuck you they do now - Iamgoofball
- var/alien = 0
- if(species && species.reagent_tag)
- alien = species.reagent_tag
- reagents.metabolize(src,alien)
+ if(reagents)
+ reagents.metabolize(src)
if(status_flags & GODMODE) return 0 //godmode
diff --git a/code/modules/mob/living/carbon/human/species/apollo.dm b/code/modules/mob/living/carbon/human/species/apollo.dm
index 409944cd048..3acc2e08a90 100644
--- a/code/modules/mob/living/carbon/human/species/apollo.dm
+++ b/code/modules/mob/living/carbon/human/species/apollo.dm
@@ -37,6 +37,7 @@
flags = IS_WHITELISTED | HAS_LIPS | HAS_UNDERWEAR | NO_BREATHE | HAS_SKIN_COLOR | NO_SCAN | NO_SCAN | HIVEMIND
dietflags = DIET_HERB //bees feed off nectar, so bee people feed off plants too
+ reagent_tag = PROCESS_ORG
base_color = "#704300"
flesh_color = "#704300"
blood_color = "#FFFF99"
@@ -90,6 +91,7 @@
flags = IS_WHITELISTED | NO_BREATHE | NO_BLOOD | NO_PAIN | HAS_LIPS | NO_SCAN
dietflags = DIET_OMNI //still human at their core, so they maintain their eating habits and diet
+ reagent_tag = PROCESS_ORG
has_organ = list(
"heart" = /obj/item/organ/heart,
"crystalized brain" = /obj/item/organ/brain/crystal,
diff --git a/code/modules/mob/living/carbon/human/species/golem.dm b/code/modules/mob/living/carbon/human/species/golem.dm
index d067870f381..cfc0eb08207 100644
--- a/code/modules/mob/living/carbon/human/species/golem.dm
+++ b/code/modules/mob/living/carbon/human/species/golem.dm
@@ -7,6 +7,7 @@
default_language = "Galactic Common"
flags = NO_BREATHE | NO_PAIN | NO_BLOOD | NO_SCAN
dietflags = DIET_OMNI //golems can eat anything because they are magic or something
+ reagent_tag = PROCESS_ORG
blood_color = "#515573"
flesh_color = "#137E8F"
diff --git a/code/modules/mob/living/carbon/human/species/monkey.dm b/code/modules/mob/living/carbon/human/species/monkey.dm
index 5a2446f6e2f..7c3dbd46108 100644
--- a/code/modules/mob/living/carbon/human/species/monkey.dm
+++ b/code/modules/mob/living/carbon/human/species/monkey.dm
@@ -19,6 +19,7 @@
tail = "chimptail"
bodyflags = FEET_PADDED | HAS_TAIL
+ reagent_tag = PROCESS_ORG
//unarmed_types = list(/datum/unarmed_attack/bite, /datum/unarmed_attack/claws)
//inherent_verbs = list(/mob/living/proc/ventcrawl)
@@ -60,6 +61,7 @@ datum/species/monkey/get_random_name(var/gender)
flesh_color = "#AFA59E"
base_color = "#333333"
tail = "farwatail"
+ reagent_tag = PROCESS_ORG
/datum/species/monkey/vulpkanin
@@ -73,6 +75,7 @@ datum/species/monkey/get_random_name(var/gender)
flesh_color = "#966464"
base_color = "#BE8264"
tail = "wolpintail"
+ reagent_tag = PROCESS_ORG
/datum/species/monkey/skrell
@@ -85,7 +88,7 @@ datum/species/monkey/get_random_name(var/gender)
default_language = "Neara"
flesh_color = "#8CD7A3"
blood_color = "#1D2CBF"
- reagent_tag = IS_SKRELL
+ reagent_tag = PROCESS_ORG
tail = null
bodyflags = FEET_PADDED
@@ -102,6 +105,6 @@ datum/species/monkey/get_random_name(var/gender)
default_language = "Stok"
flesh_color = "#34AF10"
base_color = "#066000"
- reagent_tag = IS_UNATHI
+ reagent_tag = PROCESS_ORG
bodyflags = FEET_CLAWS | HAS_TAIL
diff --git a/code/modules/mob/living/carbon/human/species/plasmaman.dm b/code/modules/mob/living/carbon/human/species/plasmaman.dm
index 851b970e8fe..890a5c3102b 100644
--- a/code/modules/mob/living/carbon/human/species/plasmaman.dm
+++ b/code/modules/mob/living/carbon/human/species/plasmaman.dm
@@ -7,6 +7,7 @@
flags = IS_WHITELISTED | NO_BLOOD
dietflags = DIET_OMNI
+ reagent_tag = PROCESS_ORG
//default_mutations=list(SKELETON) // This screws things up
diff --git a/code/modules/mob/living/carbon/human/species/shadow.dm b/code/modules/mob/living/carbon/human/species/shadow.dm
index 8b36b05b18e..cd0b03fc745 100644
--- a/code/modules/mob/living/carbon/human/species/shadow.dm
+++ b/code/modules/mob/living/carbon/human/species/shadow.dm
@@ -19,6 +19,7 @@
flags = NO_BLOOD | NO_BREATHE | NO_SCAN
bodyflags = FEET_NOSLIP
dietflags = DIET_OMNI //the mutation process allowed you to now digest all foods regardless of initial race
+ reagent_tag = PROCESS_ORG
/datum/species/shadow/handle_death(var/mob/living/carbon/human/H)
H.dust()
\ No newline at end of file
diff --git a/code/modules/mob/living/carbon/human/species/station.dm b/code/modules/mob/living/carbon/human/species/station.dm
index cfe4d3eea09..cf8f0204d00 100644
--- a/code/modules/mob/living/carbon/human/species/station.dm
+++ b/code/modules/mob/living/carbon/human/species/station.dm
@@ -15,6 +15,8 @@
interests, rampant cyber and bio-augmentation and secretive factions make life on most human \
worlds tumultous at best."
+ reagent_tag = PROCESS_ORG
+
/datum/species/unathi
name = "Unathi"
icobase = 'icons/mob/human_races/r_lizard.dmi'
@@ -48,7 +50,7 @@
flesh_color = "#34AF10"
- reagent_tag = IS_UNATHI
+ reagent_tag = PROCESS_ORG
base_color = "#066000"
/datum/species/unathi/handle_death(var/mob/living/carbon/human/H)
@@ -87,6 +89,7 @@
bodyflags = FEET_PADDED | HAS_TAIL | HAS_SKIN_COLOR | TAIL_WAGGING
dietflags = DIET_OMNI
+ reagent_tag = PROCESS_ORG
flesh_color = "#AFA59E"
base_color = "#333333"
@@ -116,6 +119,7 @@
bodyflags = FEET_PADDED | HAS_TAIL | HAS_SKIN_COLOR | TAIL_WAGGING
dietflags = DIET_OMNI
+ reagent_tag = PROCESS_ORG
flesh_color = "#966464"
base_color = "#BE8264"
@@ -145,7 +149,7 @@
flesh_color = "#8CD7A3"
blood_color = "#1D2CBF"
- reagent_tag = IS_SKRELL
+ reagent_tag = PROCESS_ORG
/datum/species/vox
name = "Vox"
@@ -185,7 +189,7 @@
blood_color = "#2299FC"
flesh_color = "#808D11"
- reagent_tag = IS_VOX
+ reagent_tag = PROCESS_ORG
makeName(var/gender,var/mob/living/carbon/human/H=null)
var/sounds = rand(2,8)
@@ -239,7 +243,7 @@
blood_color = "#2299FC"
flesh_color = "#808D11"
- reagent_tag = IS_VOX
+ reagent_tag = PROCESS_ORG
tail = "armalis_tail"
icon_template = 'icons/mob/human_races/r_armalis.dmi'
@@ -270,7 +274,7 @@
dietflags = DIET_HERB
blood_color = "#FB9800"
-
+ reagent_tag = PROCESS_ORG
/datum/species/slime
name = "Slime People"
@@ -286,6 +290,7 @@
bloodflags = BLOOD_SLIME
dietflags = DIET_CARN
+ reagent_tag = PROCESS_ORG
//ventcrawler = 1 //ventcrawling commented out
has_organ = list(
@@ -310,6 +315,7 @@
flags = IS_WHITELISTED | HAS_LIPS | HAS_UNDERWEAR | CAN_BE_FAT
dietflags = DIET_HERB
+ reagent_tag = PROCESS_ORG
blood_color = "#A200FF"
/datum/species/grey/handle_dna(var/mob/living/carbon/C, var/remove)
@@ -363,7 +369,7 @@
blood_color = "#004400"
flesh_color = "#907E4A"
- reagent_tag = IS_DIONA
+ reagent_tag = PROCESS_ORG
has_organ = list(
"nutrient channel" = /obj/item/organ/diona/nutrients,
@@ -445,6 +451,7 @@
dietflags = 0 //IPCs can't eat, so no diet
blood_color = "#1F181F"
flesh_color = "#AAAAAA"
+ reagent_tag = PROCESS_SYN
/datum/species/machine/handle_death(var/mob/living/carbon/human/H)
H.emote("deathgasp")
diff --git a/code/modules/mob/living/silicon/robot/component.dm b/code/modules/mob/living/silicon/robot/component.dm
index 948040fb1a6..25b6cddc1c7 100644
--- a/code/modules/mob/living/silicon/robot/component.dm
+++ b/code/modules/mob/living/silicon/robot/component.dm
@@ -202,9 +202,15 @@
user.visible_message(" [user] has analyzed [M]'s components."," You have analyzed [M]'s components.")
var/BU = M.getFireLoss() > 50 ? "[M.getFireLoss()]" : M.getFireLoss()
var/BR = M.getBruteLoss() > 50 ? "[M.getBruteLoss()]" : M.getBruteLoss()
+ var/TX = M.getToxLoss() > 50 ? "[M.getToxLoss()]" : M.getToxLoss()
+
user.show_message("\blue Analyzing Results for [M]:\n\t Overall Status: [M.stat > 1 ? "fully disabled" : "[M.health - M.halloss]% functional"]")
- user.show_message("\t Key: Electronics/Brute", 1)
- user.show_message("\t Damage Specifics: [BU] - [BR]")
+ if (ishuman(M) && (M:species.flags & IS_SYNTHETIC))
+ user.show_message("\t Key: Electronics/Brute/Residue", 1)
+ user.show_message("\t Damage Specifics: [BU] - [BR] - [TX]")
+ else
+ user.show_message("\t Key: Electronics/Brute", 1)
+ user.show_message("\t Damage Specifics: [BU] - [BR]")
if(M.tod && M.stat == DEAD)
user.show_message("\blue Time of Disable: [M.tod]")
@@ -238,6 +244,12 @@
(org.burn_dam > 0) ? "[org.burn_dam]" :0),1)
else
user.show_message("\blue \t Components are OK.",1)
+ if (M.getBrainLoss() >= 100 || istype(M, /mob/living/carbon/human) && M:brain_op_stage == 4.0)
+ user.show_message("\red Subject posibrain is unresponsive. System shutdown imminent.")
+ else if (M.getBrainLoss() >= 60)
+ user.show_message("\red Severe posibrain damage detected. Heavy corrosion present.")
+ else if (M.getBrainLoss() >= 10)
+ user.show_message("\red Significant posibrain damage detected. Moderate corrosion present.")
user.show_message("\blue Operating Temperature: [M.bodytemperature-T0C]°C ([M.bodytemperature*1.8-459.67]°F)", 1)
diff --git a/code/modules/organs/pain.dm b/code/modules/organs/pain.dm
index a712f543a88..d48592f64d9 100644
--- a/code/modules/organs/pain.dm
+++ b/code/modules/organs/pain.dm
@@ -77,7 +77,24 @@ mob/living/carbon/human/proc/custom_pain(var/message, var/flash_strength)
mob/living/carbon/human/proc/handle_pain()
// not when sleeping
- if(species && species.flags & NO_PAIN) return
+ if(species && species.flags & NO_PAIN)
+ //While IPCs don't feel pain, they will notice their gears gunking up with residue (toxins)
+ if(species && species.flags & IS_SYNTHETIC)
+ var/toxDamageMessage = null
+ var/toxMessageProb = 1
+ switch(getToxLoss())
+ if(25 to 50)
+ toxMessageProb = 1
+ toxDamageMessage = "Your servos seem to be working harder."
+ if(50 to 75)
+ toxMessageProb = 2
+ toxDamageMessage = "Your joints seem to stick randomly."
+ if(75 to INFINITY)
+ toxMessageProb = 5
+ toxDamageMessage = "Your motors seem to slip; it really grinds your gears!"
+ if(toxDamageMessage && prob(toxMessageProb))
+ src.custom_pain(toxDamageMessage, getToxLoss() >= 15)
+ return
if(stat >= 2) return
if(reagents.has_reagent("morphine"))
diff --git a/code/modules/reagents/Chemistry-Holder.dm b/code/modules/reagents/Chemistry-Holder.dm
index 722c75da1c6..91392283ac5 100644
--- a/code/modules/reagents/Chemistry-Holder.dm
+++ b/code/modules/reagents/Chemistry-Holder.dm
@@ -404,6 +404,27 @@ datum
del_reagent(R.id)
return 0
+ reaction_check(var/mob/M, var/datum/reagent/R)
+ var/can_process = 0
+ if(!istype(M, /mob/living)) //Non-living mobs can't metabolize reagents, so don't bother trying (runtime safety check)
+ return can_process
+ if(ishuman(M))
+ var/mob/living/carbon/human/H = M
+ //Check if this mob's species is set and can process this type of reagent
+ if(H.species && H.species.reagent_tag)
+ if((R.process_flags & SYNTHETIC) && (H.species.reagent_tag & PROCESS_SYN)) //SYNTHETIC-oriented reagents require PROCESS_SYN
+ can_process = 1
+ if((R.process_flags & ORGANIC) && (H.species.reagent_tag & PROCESS_ORG)) //ORGANIC-oriented reagents require PROCESS_ORG
+ can_process = 1
+ //Species with PROCESS_DUO are only affected by reagents that affect both organics and synthetics, like acid and hellwater
+ if((R.process_flags & ORGANIC) && (R.process_flags & SYNTHETIC) && (H.species.reagent_tag & PROCESS_DUO))
+ can_process = 1
+ //We'll assume that non-human mobs lack the ability to process synthetic-oriented reagents (adjust this if we need to change that assumption)
+ else
+ if(R.process_flags != SYNTHETIC)
+ can_process = 1
+ return can_process
+
reaction(var/atom/A, var/method=TOUCH, var/volume_modifier=0)
switch(method)
@@ -412,7 +433,11 @@ datum
if(ismob(A))
spawn(0)
if(!R) return
- else R.reaction_mob(A, TOUCH, R.volume+volume_modifier)
+ var/check = reaction_check(A, R)
+ if(!check)
+ continue
+ else
+ R.reaction_mob(A, TOUCH, R.volume+volume_modifier)
if(isturf(A))
spawn(0)
if(!R) return
@@ -426,7 +451,11 @@ datum
if(ismob(A) && R)
spawn(0)
if(!R) return
- else R.reaction_mob(A, INGEST, R.volume+volume_modifier)
+ var/check = reaction_check(A, R)
+ if(!check)
+ continue
+ else
+ R.reaction_mob(A, INGEST, R.volume+volume_modifier)
if(isturf(A) && R)
spawn(0)
if(!R) return
diff --git a/code/modules/reagents/Chemistry-Reagents.dm b/code/modules/reagents/Chemistry-Reagents.dm
index 2887f3bd35c..fab92027cc9 100644
--- a/code/modules/reagents/Chemistry-Reagents.dm
+++ b/code/modules/reagents/Chemistry-Reagents.dm
@@ -7,10 +7,6 @@
//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.
-//Some on_mob_life() procs check for alien races.
-#define IS_DIONA 1
-#define IS_VOX 2
-// ^ fuck this shit holy fuck - Iamgoofball
datum
reagent
var/name = "Reagent"
@@ -26,6 +22,9 @@ datum
var/color = "#000000" // rgb: 0, 0, 0 (does not support alpha channels - yet!)
var/shock_reduction = 0
var/penetrates_skin = 0 //Whether or not a reagent penetrates the skin
+ //Processing flags, defines the type of mobs the reagent will affect
+ //By default, all reagents will ONLY affect organics, not synthetics. Re-define in the reagent's definition if the reagent is meant to affect synths
+ var/process_flags = ORGANIC
proc
reaction_mob(var/mob/M, var/method=TOUCH, var/volume) //Some reagents transfer on touch, others don't; dependent on if they penetrate the skin or not.
if(!istype(M, /mob/living)) return 0
@@ -303,6 +302,7 @@ datum
name = "Hell Water"
id = "hell_water"
description = "YOUR FLESH! IT BURNS!"
+ process_flags = ORGANIC | SYNTHETIC //Admin-bus has no brakes! KILL THEM ALL.
on_mob_life(var/mob/living/M as mob)
M.fire_stacks = min(5,M.fire_stacks + 3)
@@ -467,6 +467,7 @@ datum
description = "A ubiquitous chemical substance that is composed of hydrogen and oxygen."
reagent_state = LIQUID
color = "#0064C8" // rgb: 0, 100, 200
+ process_flags = ORGANIC | SYNTHETIC
on_mob_life(var/mob/living/M as mob)
if(ishuman(M))
@@ -582,10 +583,12 @@ datum
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.
- return
+ if(ishuman(M))
+ var/mob/living/carbon/human/H = M
+ if(H.species && (H.species.name == "Vox" || H.species.name =="Vox Armalis"))
+ M.adjustToxLoss(REAGENTS_METABOLISM)
+ holder.remove_reagent(src.id, REAGENTS_METABOLISM) //By default it slowly disappears.
+ return
..()
copper
@@ -605,10 +608,12 @@ datum
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
+ if(ishuman(M))
+ var/mob/living/carbon/human/H = M
+ if(H.species && (H.species.name == "Vox" || H.species.name =="Vox Armalis"))
+ M.adjustOxyLoss(-2*REM)
+ holder.remove_reagent(src.id, REAGENTS_METABOLISM) //By default it slowly disappears.
+ return
..()
hydrogen
@@ -671,6 +676,7 @@ datum
reagent_state = GAS
color = "#808080" // rgb: 128, 128, 128
penetrates_skin = 1
+ process_flags = ORGANIC | SYNTHETIC
on_mob_life(var/mob/living/M as mob)
if(!M) M = holder.my_atom
@@ -685,6 +691,7 @@ datum
reagent_state = GAS
color = "#6A6054"
penetrates_skin = 1
+ process_flags = ORGANIC | SYNTHETIC
on_mob_life(var/mob/living/M as mob)
@@ -758,6 +765,7 @@ datum
description = "A strong mineral acid with the molecular formula H2SO4."
reagent_state = LIQUID
color = "#00D72B"
+ process_flags = ORGANIC | SYNTHETIC
on_mob_life(var/mob/living/M as mob)
if(!M) M = holder.my_atom
@@ -881,6 +889,7 @@ datum
description = "Thermite produces an aluminothermic reaction known as a thermite reaction. Can be used to melt walls."
reagent_state = SOLID
color = "#673910" // rgb: 103, 57, 16
+ process_flags = ORGANIC | SYNTHETIC
reaction_turf(var/turf/T, var/volume)
src = null
@@ -1199,6 +1208,7 @@ datum
description = "It's magic. We don't have to explain it."
reagent_state = LIQUID
color = "#C8A5DC" // rgb: 200, 165, 220
+ process_flags = ORGANIC | SYNTHETIC //Adminbuse knows no bounds!
on_mob_life(var/mob/living/carbon/M as mob)
if(!M) M = holder.my_atom ///This can even heal dead people.
@@ -1697,6 +1707,7 @@ datum
description = "A special oil that noticably chills the body. Extraced from Icepeppers."
reagent_state = LIQUID
color = "#B31008" // rgb: 139, 166, 233
+ process_flags = ORGANIC | SYNTHETIC
on_mob_life(var/mob/living/M as mob)
if(!M) M = holder.my_atom
@@ -2500,8 +2511,10 @@ datum
d/=sober_str
- if(alien && alien == IS_SKRELL) //Skrell get very drunk very quickly.
- d*=5
+ if(ishuman(M))
+ var/mob/living/carbon/human/H = M
+ if(H.species && (H.species.name == "Skrell" || H.species.name =="Neara")) //Skrell and Neara get very drunk very quickly.
+ d*=5
M.dizziness += dizzy_adj.
if(d >= slur_start && d < pass_out)
diff --git a/code/modules/reagents/newchem/drugs.dm b/code/modules/reagents/newchem/drugs.dm
index e8009abbe60..82d945c5403 100644
--- a/code/modules/reagents/newchem/drugs.dm
+++ b/code/modules/reagents/newchem/drugs.dm
@@ -4,7 +4,7 @@
#define REM REAGENTS_EFFECT_MULTIPLIER
-datum/reagent/nicotine
+/datum/reagent/nicotine
name = "Nicotine"
id = "nicotine"
description = "Slightly reduces stun times. If overdosed it will deal toxin and oxygen damage."
@@ -13,7 +13,7 @@ datum/reagent/nicotine
overdose_threshold = 35
addiction_threshold = 30
-datum/reagent/nicotine/on_mob_life(var/mob/living/M as mob)
+/datum/reagent/nicotine/on_mob_life(var/mob/living/M as mob)
if(!M) M = holder.my_atom
var/smoke_message = pick("You can just feel your lungs dying!", "You feel relaxed.", "You feel calmed.", "You feel the lung cancer forming.", "You feel the money you wasted.", "You feel like a space cowboy.", "You feel rugged.")
if(prob(5))
@@ -26,7 +26,7 @@ datum/reagent/nicotine/on_mob_life(var/mob/living/M as mob)
..()
return
-datum/reagent/nicotine/overdose_process(var/mob/living/M as mob)
+/datum/reagent/nicotine/overdose_process(var/mob/living/M as mob)
if(prob(20))
M << "You feel like you smoked too much."
M.adjustToxLoss(1*REM)
@@ -34,7 +34,7 @@ datum/reagent/nicotine/overdose_process(var/mob/living/M as mob)
..()
return
-datum/reagent/crank
+/datum/reagent/crank
name = "Crank"
id = "crank"
description = "Reduces stun times by about 200%. If overdosed or addicted it will deal significant Toxin, Brute and Brain damage."
@@ -43,7 +43,7 @@ datum/reagent/crank
overdose_threshold = 20
addiction_threshold = 10
-datum/reagent/crank/on_mob_life(var/mob/living/M as mob)
+/datum/reagent/crank/on_mob_life(var/mob/living/M as mob)
if(!M) M = holder.my_atom
var/high_message = pick("You feel jittery.", "You feel like you gotta go fast.", "You feel like you need to step it up.")
if(prob(5))
@@ -53,26 +53,26 @@ datum/reagent/crank/on_mob_life(var/mob/living/M as mob)
M.AdjustWeakened(-2)
..()
return
-datum/reagent/crank/overdose_process(var/mob/living/M as mob)
+/datum/reagent/crank/overdose_process(var/mob/living/M as mob)
M.adjustBrainLoss(rand(1,10)*REM)
M.adjustToxLoss(rand(1,10)*REM)
M.adjustBruteLoss(rand(1,10)*REM)
..()
return
-datum/reagent/crank/addiction_act_stage1(var/mob/living/M as mob)
+/datum/reagent/crank/addiction_act_stage1(var/mob/living/M as mob)
M.adjustBrainLoss(rand(1,10)*REM)
..()
return
-datum/reagent/crank/addiction_act_stage2(var/mob/living/M as mob)
+/datum/reagent/crank/addiction_act_stage2(var/mob/living/M as mob)
M.adjustToxLoss(rand(1,10)*REM)
..()
return
-datum/reagent/crank/addiction_act_stage3(var/mob/living/M as mob)
+/datum/reagent/crank/addiction_act_stage3(var/mob/living/M as mob)
M.adjustBruteLoss(rand(1,10)*REM)
..()
return
-datum/reagent/crank/addiction_act_stage4(var/mob/living/M as mob)
+/datum/reagent/crank/addiction_act_stage4(var/mob/living/M as mob)
M.adjustBrainLoss(rand(1,10)*REM)
M.adjustToxLoss(rand(1,10)*REM)
M.adjustBruteLoss(rand(1,10)*REM)
@@ -397,6 +397,7 @@ datum/reagent/crank/addiction_act_stage4(var/mob/living/M as mob)
color = "#A42964"
metabolization_rate = 0.2
overdose_threshold = 15
+ process_flags = ORGANIC | SYNTHETIC //Flipping for everyone!
/datum/chemical_reaction/fliptonium
name = "fliptonium"
@@ -406,7 +407,7 @@ datum/reagent/crank/addiction_act_stage4(var/mob/living/M as mob)
result_amount = 4
mix_message = "The mixture swirls around excitedly!"
-datum/reagent/fliptonium/reaction_mob(var/mob/M, var/method=TOUCH, var/volume)
+/datum/reagent/fliptonium/reaction_mob(var/mob/M, var/method=TOUCH, var/volume)
if(!istype(M, /mob/living))
return
if(method == INGEST || method == TOUCH)
@@ -437,10 +438,10 @@ datum/reagent/fliptonium/reaction_mob(var/mob/M, var/method=TOUCH, var/volume)
..()
return
-datum/reagent/fliptonium/reagent_deleted(var/mob/living/M as mob)
+/datum/reagent/fliptonium/reagent_deleted(var/mob/living/M as mob)
M.SpinAnimation(speed = 12, loops = -1)
-datum/reagent/fliptonium/overdose_process(var/mob/living/M as mob)
+/datum/reagent/fliptonium/overdose_process(var/mob/living/M as mob)
if(volume > 15)
if(prob(5))
switch(pick(1, 2, 3))
@@ -457,4 +458,173 @@ datum/reagent/fliptonium/overdose_process(var/mob/living/M as mob)
M.drop_r_hand()
M.adjustToxLoss(1)
..()
- return
\ No newline at end of file
+ return
+
+//////////////////////////////
+// Synth-Drugs //
+//////////////////////////////
+
+//Ultra-Lube: Meth
+/datum/reagent/lube/ultra
+ name = "Ultra-Lube"
+ id = "ultralube"
+ description = "Ultra-Lube is an enhanced lubricant which induces effect similar to Methamphetamine in synthetic users by drastically reducing internal friction and increasing cooling capabilities."
+ reagent_state = LIQUID
+ color = "#1BB1FF"
+
+ process_flags = SYNTHETIC
+ overdose_threshold = 20
+ addiction_threshold = 10
+ metabolization_rate = 0.6
+
+/datum/chemical_reaction/lube/ultra
+ name = "Ultra-Lube"
+ id = "ultralube"
+ result = "ultralube"
+ required_reagents = list("lube" = 2, "formaldehyde" = 1, "cryostylane" = 1)
+ result_amount = 2
+ mix_message = "The mixture darkens and appears to partially vaporize into a chilling aerosol."
+
+/datum/reagent/lube/ultra/on_mob_life(var/mob/living/M as mob)
+ if(!M) M = holder.my_atom
+ var/high_message = pick("You feel your servos whir!", "You feel like you need to go faster.", "You feel like you were just overclocked!")
+ if(prob(1))
+ if(prob(1))
+ high_message = "0100011101001111010101000101010001000001010001110100111101000110010000010101001101010100!"
+ if(prob(5))
+ M << "[high_message]"
+ M.AdjustParalysis(-2)
+ M.AdjustStunned(-2)
+ M.AdjustWeakened(-2)
+ M.adjustStaminaLoss(-2)
+ M.status_flags |= GOTTAGOREALLYFAST
+ M.Jitter(3)
+ M.adjustBrainLoss(0.5)
+ if(prob(5))
+ M.emote(pick("twitch", "shiver"))
+ ..()
+ return
+
+/datum/reagent/lube/ultra/overdose_process(var/mob/living/M as mob)
+ if(prob(20))
+ M.emote("ping")
+ if(prob(33))
+ M.visible_message("[M]'s hands flip out and flail everywhere!")
+ var/obj/item/I = M.get_active_hand()
+ if(I)
+ M.drop_item()
+ ..()
+ if(prob(50))
+ M.adjustToxLoss(10)
+ M.adjustBrainLoss(pick(0.5, 0.6, 0.7, 0.8, 0.9, 1))
+ return
+
+/datum/reagent/lube/ultra/addiction_act_stage1(var/mob/living/M as mob)
+ M.Jitter(5)
+ if(prob(20))
+ M.emote(pick("twitch","buzz","moan"))
+ ..()
+ return
+
+/datum/reagent/lube/ultra/addiction_act_stage2(var/mob/living/M as mob)
+ M.Jitter(10)
+ M.Dizzy(10)
+ if(prob(30))
+ M.emote(pick("twitch","buzz","moan"))
+ ..()
+ return
+
+/datum/reagent/lube/ultra/addiction_act_stage3(var/mob/living/M as mob)
+ M.Jitter(15)
+ M.Dizzy(15)
+ if(prob(40))
+ M.emote(pick("twitch","buzz","moan"))
+ ..()
+ return
+
+/datum/reagent/lube/ultra/addiction_act_stage4(var/mob/living/carbon/human/M as mob)
+ M.Jitter(20)
+ M.Dizzy(20)
+ M.adjustToxLoss(5)
+ if(prob(50))
+ M.emote(pick("twitch","buzz","moan"))
+ ..()
+ return
+
+//Surge: Krokodil
+/datum/reagent/surge
+ name = "Surge"
+ id = "surge"
+ description = "A sketchy superconducting gel that overloads processors, causing an effect reportedly similar to opiates in synthetic units."
+ reagent_state = LIQUID
+ color = "#6DD16D"
+
+ process_flags = SYNTHETIC
+ overdose_threshold = 20
+ addiction_threshold = 15
+
+
+/datum/reagent/surge/on_mob_life(var/mob/living/M as mob)
+ if(!M) M = holder.my_atom
+ M.druggy = max(M.druggy, 15)
+ var/high_message = pick("You feel calm.", "You feel collected.", "You feel like you need to relax.")
+ if(prob(1))
+ if(prob(1))
+ high_message = "01010100010100100100000101001110010100110100001101000101010011100100010001000101010011100100001101000101."
+ if(prob(5))
+ M << "[high_message]"
+ ..()
+ return
+
+/datum/reagent/surge/overdose_process(var/mob/living/M as mob)
+ //Hit them with the same effects as an electrode!
+ M.Stun(5)
+ M.Weaken(5)
+ M.Jitter(20)
+ M.apply_effect(STUTTER, 5)
+ if(prob(10))
+ M << "You experience a violent electrical discharge!"
+ playsound(get_turf(M), 'sound/effects/eleczap.ogg', 75, 1)
+ //Lightning effect for electrical discharge visualization
+ var/icon/I=new('icons/obj/zap.dmi',"lightningend")
+ I.Turn(-135)
+ var/obj/effect/overlay/beam/B = new(get_turf(M))
+ B.pixel_x = rand(-20, 0)
+ B.pixel_y = rand(-20, 0)
+ B.icon = I
+ M.adjustFireLoss(rand(1,5)*REM)
+ M.adjustBruteLoss(rand(1,5)*REM)
+ ..()
+ return
+
+/datum/reagent/surge/addiction_act_stage1(var/mob/living/M as mob)
+ M.adjustBrainLoss(rand(1,5)*REM)
+ M.adjustToxLoss(rand(1,5)*REM)
+ ..()
+ return
+/datum/reagent/surge/addiction_act_stage2(var/mob/living/M as mob)
+ if(prob(25))
+ M << "Your casing feels loose..."
+ ..()
+ return
+/datum/reagent/surge/addiction_act_stage3(var/mob/living/M as mob)
+ if(prob(25))
+ M << "Your casing starts to come apart..."
+ M.adjustBruteLoss(3*REM)
+ ..()
+ return
+
+/datum/reagent/surge/addiction_act_stage4(var/mob/living/carbon/human/M as mob)
+ if(prob(25))
+ M << "Your exposed wiring begins corroding!"
+ M.adjustFireLoss(5*REM)
+ ..()
+ return
+
+/datum/chemical_reaction/surge
+ name = "Surge"
+ id = "surge"
+ result = "surge"
+ required_reagents = list("thermite" = 3, "uranium" = 1, "fluorosurfactant" = 1, "sacid" = 1)
+ result_amount = 6
+ mix_message = "The mixture congeals into a metallic green gel that crackles with electrical activity."
diff --git a/code/modules/reagents/newchem/food.dm b/code/modules/reagents/newchem/food.dm
index 42b259c0ea7..39f2a5b6234 100644
--- a/code/modules/reagents/newchem/food.dm
+++ b/code/modules/reagents/newchem/food.dm
@@ -337,6 +337,7 @@ datum/reagent/greenvomit/reaction_turf(var/turf/T, var/volume)
description = "A bizarre gelatinous substance supposedly derived from ghosts."
reagent_state = LIQUID
color = "#8EAE7B"
+ process_flags = ORGANIC | SYNTHETIC //Because apparently ghosts in the shell
datum/reagent/ectoplasm/reaction_mob(var/mob/M, var/method=TOUCH, var/volume)
if(!istype(M, /mob/living))
diff --git a/code/modules/reagents/newchem/medicine.dm b/code/modules/reagents/newchem/medicine.dm
index defbb6246ab..a27dfd98a45 100644
--- a/code/modules/reagents/newchem/medicine.dm
+++ b/code/modules/reagents/newchem/medicine.dm
@@ -911,4 +911,71 @@ datum/reagent/haloperidol/on_mob_life(var/mob/living/M as mob)
result = "haloperidol"
required_reagents = list("chlorine" = 1, "fluorine" = 1, "aluminum" = 1, "potass_iodide" = 1, "oil" = 1)
result_amount = 4
- mix_message = "The chemicals mix into an odd pink slush."
\ No newline at end of file
+ mix_message = "The chemicals mix into an odd pink slush."
+
+//////////////////////////////
+// Synth-Meds //
+//////////////////////////////
+
+//Degreaser: Anti-toxin / Lube Remover
+/datum/reagent/degreaser
+ name = "Degreaser"
+ id = "degreaser"
+ description = "An industrial degreaser which can be used to clean residual build-up from machinery and surfaces."
+ reagent_state = LIQUID
+ color = "#CC7A00"
+ process_flags = SYNTHETIC
+
+/datum/chemical_reaction/degreaser
+ name = "Degreaser"
+ id = "degreaser"
+ result = "degreaser"
+ required_reagents = list("oil" = 1, "sterilizine" = 1)
+ result_amount = 2
+
+/datum/reagent/degreaser/reaction_turf(var/turf/simulated/T, var/volume)
+ if (!istype(T)) return
+ src = null
+ if(volume >= 1)
+ if(T.wet >= 2) //Clears lube! Fight back against the slipping, and WIN!
+ T.wet = 0
+ if(T.wet_overlay)
+ T.overlays -= T.wet_overlay
+ T.wet_overlay = null
+ return
+
+/datum/reagent/degreaser/on_mob_life(var/mob/living/M as mob)
+ if(!M) M = holder.my_atom
+ M.adjustToxLoss(-1.5*REM)
+ for(var/datum/reagent/R in M.reagents.reagent_list)
+ if(R != src)
+ if(R.id == "ultralube" || R.id == "lube")
+ //Flushes lube and ultra-lube even faster than other chems
+ M.reagents.remove_reagent(R.id, 5)
+ else
+ M.reagents.remove_reagent(R.id,1)
+ ..()
+ return
+
+//Liquid Solder: Mannitol
+/datum/reagent/liquid_solder
+ name = "Liquid Solder"
+ id = "liquid_solder"
+ description = "A solution formulated to clean and repair damaged connections in posibrains while in use."
+ reagent_state = LIQUID
+ color = "#D7B395"
+ process_flags = SYNTHETIC
+
+/datum/reagent/liquid_solder/on_mob_life(mob/living/M as mob)
+ M.adjustBrainLoss(-3)
+ ..()
+ return
+
+/datum/chemical_reaction/liquid_solder
+ name = "Liquid Solder"
+ id = "liquid_solder"
+ result = "liquid_solder"
+ required_reagents = list("ethanol" = 1, "copper" = 1, "silver" = 1)
+ result_amount = 3
+ required_temp = 370
+ mix_message = "The solution gently swirls with a metallic sheen."
diff --git a/code/modules/reagents/newchem/newchem_procs.dm b/code/modules/reagents/newchem/newchem_procs.dm
index 43b750b87e6..edeed358cf0 100644
--- a/code/modules/reagents/newchem/newchem_procs.dm
+++ b/code/modules/reagents/newchem/newchem_procs.dm
@@ -11,10 +11,35 @@ datum/reagents
datum/reagents/proc/metabolize(var/mob/M)
if(M)
+ if(!istype(M, /mob/living)) //Non-living mobs can't metabolize reagents, so don't bother trying (runtime safety check)
+ return
chem_temp = M.bodytemperature
handle_reactions()
for(var/A in reagent_list)
var/datum/reagent/R = A
+ if(ishuman(M))
+ var/mob/living/carbon/human/H = M
+ //Check if this mob's species is set and can process this type of reagent
+ var/can_process = 0
+ //If we somehow avoided getting a species or reagent_tag set, we'll assume we aren't meant to process ANY reagents (CODERS: SET YOUR SPECIES AND TAG!)
+ if(H.species && H.species.reagent_tag)
+ if((R.process_flags & SYNTHETIC) && (H.species.reagent_tag & PROCESS_SYN)) //SYNTHETIC-oriented reagents require PROCESS_SYN
+ can_process = 1
+ if((R.process_flags & ORGANIC) && (H.species.reagent_tag & PROCESS_ORG)) //ORGANIC-oriented reagents require PROCESS_ORG
+ can_process = 1
+ //Species with PROCESS_DUO are only affected by reagents that affect both organics and synthetics, like acid and hellwater
+ if((R.process_flags & ORGANIC) && (R.process_flags & SYNTHETIC) && (H.species.reagent_tag & PROCESS_DUO))
+ can_process = 1
+ //If the mob can't process it, remove the reagent at it's normal rate without doing any addictions, overdoses, or on_mob_life() for the reagent
+ if(can_process == 0)
+ R.holder.remove_reagent(R.id, R.metabolization_rate)
+ continue
+ //We'll assume that non-human mobs lack the ability to process synthetic-oriented reagents (adjust this if we need to change that assumption)
+ else
+ if(R.process_flags == SYNTHETIC)
+ R.holder.remove_reagent(R.id, R.metabolization_rate)
+ continue
+ //If you got this far, that means we can process whatever reagent this iteration is for. Handle things normally from here.
if(M && R)
if(R.volume >= R.overdose_threshold && !R.overdosed && R.overdose_threshold > 0)
R.overdosed = 1
diff --git a/code/modules/reagents/newchem/pyro.dm b/code/modules/reagents/newchem/pyro.dm
index afeb62ef652..4dbb2c9ee82 100644
--- a/code/modules/reagents/newchem/pyro.dm
+++ b/code/modules/reagents/newchem/pyro.dm
@@ -26,6 +26,7 @@
reagent_state = LIQUID
color = "#FF0000"
metabolization_rate = 4
+ process_flags = ORGANIC | SYNTHETIC
/datum/chemical_reaction/clf3
name = "Chlorine Trifluoride"
@@ -413,6 +414,7 @@ datum/reagent/blackpowder/reaction_turf(var/turf/T, var/volume) //oh shit
description = "Catches you on fire and makes you ignite."
reagent_state = LIQUID
color = "#FF9999"
+ process_flags = ORGANIC | SYNTHETIC
/datum/chemical_reaction/phlogiston
name = "phlogiston"
@@ -443,6 +445,7 @@ datum/reagent/blackpowder/reaction_turf(var/turf/T, var/volume) //oh shit
description = "Very flammable."
reagent_state = LIQUID
color = "#FF9999"
+ process_flags = ORGANIC | SYNTHETIC
/datum/reagent/napalm/on_mob_life(var/mob/living/M as mob)
if(!M) M = holder.my_atom
@@ -467,6 +470,7 @@ datum/reagent/cryostylane
id = "cryostylane"
description = "Comes into existence at 20K. As long as there is sufficient oxygen for it to react with, Cryostylane slowly cools all other reagents in the mob down to 0K."
color = "#B2B2FF" // rgb: 139, 166, 233
+ process_flags = ORGANIC | SYNTHETIC
/datum/chemical_reaction/cryostylane
name = "cryostylane"
@@ -500,6 +504,7 @@ datum/reagent/pyrosium
id = "pyrosium"
description = "Comes into existence at 20K. As long as there is sufficient oxygen for it to react with, Pyrosium slowly cools all other reagents in the mob down to 0K."
color = "#B20000" // rgb: 139, 166, 233
+ process_flags = ORGANIC | SYNTHETIC
/datum/chemical_reaction/pyrosium
name = "pyrosium"
diff --git a/code/modules/reagents/newchem/toxins.dm b/code/modules/reagents/newchem/toxins.dm
index 410aa5be2e2..f7b7d3c3977 100644
--- a/code/modules/reagents/newchem/toxins.dm
+++ b/code/modules/reagents/newchem/toxins.dm
@@ -226,6 +226,7 @@ datum/reagent/facid
description = "Fluorosulfuric acid is a an extremely corrosive super-acid."
reagent_state = LIQUID
color = "#4141D2"
+ process_flags = ORGANIC | SYNTHETIC
datum/reagent/facid/reaction_mob(var/mob/living/M, var/method=TOUCH, var/volume)
if(!istype(M, /mob/living))
@@ -720,6 +721,7 @@ datum/reagent/ants
description = "A sample of a lost breed of Space Ants (formicidae bastardium tyrannus), they are well-known for ravaging the living shit out of pretty much anything."
reagent_state = SOLID
color = "#993333"
+ process_flags = ORGANIC | SYNTHETIC
datum/reagent/ants/reaction_mob(var/mob/living/M as mob, var/method=TOUCH, var/volume) //NOT THE ANTS
if(iscarbon(M))