mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-25 21:19:00 +01:00
Merge pull request #1370 from FalseIncarnate/master
Synthetic Reagent Processing and Synth Drugs
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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
|
||||
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 << "<span class='notice'>[high_message]</span>"
|
||||
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("<span class = 'danger'>[M]'s hands flip out and flail everywhere!</span>")
|
||||
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 << "<span class='notice'>[high_message]</span>"
|
||||
..()
|
||||
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 << "<span class='danger'>You experience a violent electrical discharge!</span>"
|
||||
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 << "<span class='danger'>Your casing feels loose...</span>"
|
||||
..()
|
||||
return
|
||||
/datum/reagent/surge/addiction_act_stage3(var/mob/living/M as mob)
|
||||
if(prob(25))
|
||||
M << "<span class='danger'>Your casing starts to come apart...</span>"
|
||||
M.adjustBruteLoss(3*REM)
|
||||
..()
|
||||
return
|
||||
|
||||
/datum/reagent/surge/addiction_act_stage4(var/mob/living/carbon/human/M as mob)
|
||||
if(prob(25))
|
||||
M << "<span class='userdanger'>Your exposed wiring begins corroding!</span>"
|
||||
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."
|
||||
|
||||
@@ -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))
|
||||
|
||||
@@ -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."
|
||||
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."
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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"
|
||||
|
||||
@@ -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))
|
||||
|
||||
Reference in New Issue
Block a user