Replaces all var/const with #define

This commit is contained in:
AffectedArc07
2020-01-28 21:25:20 +00:00
parent 076ef673cd
commit c64bc93649
269 changed files with 1481 additions and 1474 deletions
+1 -1
View File
@@ -69,7 +69,7 @@
var/atom/A = thing
var/distance = max(1,get_dist(A, epicenter))
var/fraction = 0.5/(2 ** distance) //50/25/12/6... for a 200u splash, 25/12/6/3... for a 100u, 12/6/3/1 for a 50u
splash_holder.reaction(A, TOUCH, fraction)
splash_holder.reaction(A, REAGENT_TOUCH, fraction)
qdel(splash_holder)
return 1
+3 -5
View File
@@ -1,5 +1,3 @@
var/const/TOUCH = 1
var/const/INGEST = 2
#define ADDICTION_TIME 4800 //8 minutes
///////////////////////////////////////////////////////////////////////////////////
@@ -558,7 +556,7 @@ var/const/INGEST = 2
can_process = 1
return can_process
/datum/reagents/proc/reaction(atom/A, method = TOUCH, volume_modifier = 1)
/datum/reagents/proc/reaction(atom/A, method = REAGENT_TOUCH, volume_modifier = 1)
var/react_type
if(isliving(A))
react_type = "LIVING"
@@ -571,7 +569,7 @@ var/const/INGEST = 2
if(react_type == "LIVING" && ishuman(A))
var/mob/living/carbon/human/H = A
if(method == TOUCH)
if(method == REAGENT_TOUCH)
var/obj/item/organ/external/head/affecting = H.get_organ("head")
if(affecting)
if(chem_temp > H.dna.species.heat_level_1)
@@ -587,7 +585,7 @@ var/const/INGEST = 2
H.emote("scream")
H.adjust_bodytemperature(- min(max(T0C - chem_temp - 20, 5), 500))
if(method == INGEST)
if(method == REAGENT_INGEST)
if(chem_temp > H.dna.species.heat_level_1)
to_chat(H, "<span class='danger'>You scald yourself trying to consume the boiling hot substance!</span>")
H.adjustFireLoss(7)
+3 -3
View File
@@ -40,16 +40,16 @@
/datum/reagent/proc/reaction_temperature(exposed_temperature, exposed_volume) //By default we do nothing.
return
/datum/reagent/proc/reaction_mob(mob/living/M, method = TOUCH, volume) //Some reagents transfer on touch, others don't; dependent on if they penetrate the skin or not.
/datum/reagent/proc/reaction_mob(mob/living/M, method = REAGENT_TOUCH, volume) //Some reagents transfer on touch, others don't; dependent on if they penetrate the skin or not.
if(holder) //for catching rare runtimes
if(method == TOUCH && penetrates_skin)
if(method == REAGENT_TOUCH && penetrates_skin)
var/block = M.get_permeability_protection()
var/amount = round(volume * (1 - block), 0.1)
if(M.reagents)
if(amount >= 1)
M.reagents.add_reagent(id, amount)
if(method == INGEST) //Yes, even Xenos can get addicted to drugs.
if(method == REAGENT_INGEST) //Yes, even Xenos can get addicted to drugs.
var/can_become_addicted = M.reagents.reaction_check(M, src)
if(can_become_addicted)
@@ -31,8 +31,8 @@
else
to_chat(usr, "It wasn't enough...")
/datum/reagent/consumable/ethanol/reaction_mob(mob/living/M, method=TOUCH, volume)//Splashing people with ethanol isn't quite as good as fuel.
if(method == TOUCH)
/datum/reagent/consumable/ethanol/reaction_mob(mob/living/M, method=REAGENT_TOUCH, volume)//Splashing people with ethanol isn't quite as good as fuel.
if(method == REAGENT_TOUCH)
M.adjust_fire_stacks(volume / 15)
@@ -1140,8 +1140,8 @@
can_synth = FALSE
taste_description = "<span class='userdanger'>LIQUID FUCKING DEATH OH GOD WHAT THE FUCK</span>"
/datum/reagent/consumable/ethanol/dragons_breath/reaction_mob(mob/living/M, method=TOUCH, volume)
if(method == INGEST && prob(20))
/datum/reagent/consumable/ethanol/dragons_breath/reaction_mob(mob/living/M, method=REAGENT_TOUCH, volume)
if(method == REAGENT_INGEST && prob(20))
if(M.on_fire)
M.adjust_fire_stacks(6)
@@ -1197,10 +1197,10 @@
M.fakevomit()
return ..()
/datum/reagent/consumable/ethanol/synthanol/reaction_mob(mob/living/M, method=TOUCH, volume)
/datum/reagent/consumable/ethanol/synthanol/reaction_mob(mob/living/M, method=REAGENT_TOUCH, volume)
if(M.isSynthetic())
return
if(method == INGEST)
if(method == REAGENT_INGEST)
to_chat(M, pick("<span class = 'danger'>That was awful!</span>", "<span class = 'danger'>Yuck!</span>"))
/datum/reagent/consumable/ethanol/synthanol/robottears
@@ -7,7 +7,7 @@
var/message_living = null //extension to first mob sent to only living mobs i.e. silicons have no skin to be burnt
can_synth = FALSE
/datum/reagent/blob/reaction_mob(mob/living/M, method=TOUCH, volume, show_message, touch_protection)
/datum/reagent/blob/reaction_mob(mob/living/M, method=REAGENT_TOUCH, volume, show_message, touch_protection)
return round(volume * min(1.5 - touch_protection, 1), 0.1) //full touch protection means 50% volume, any prot below 0.5 means 100% volume.
/datum/reagent/blob/proc/damage_reaction(obj/structure/blob/B, damage, damage_type, damage_flag) //when the blob takes damage, do this
@@ -21,8 +21,8 @@
complementary_color = "#a15656"
message_living = ", and you feel your skin ripping and tearing off"
/datum/reagent/blob/ripping_tendrils/reaction_mob(mob/living/M, method=TOUCH, volume)
if(method == TOUCH)
/datum/reagent/blob/ripping_tendrils/reaction_mob(mob/living/M, method=REAGENT_TOUCH, volume)
if(method == REAGENT_TOUCH)
volume = ..()
M.apply_damage(0.6*volume, BRUTE)
M.adjustStaminaLoss(volume)
@@ -38,8 +38,8 @@
message = "The blob splashes you with burning oil"
message_living = ", and you feel your skin char and melt"
/datum/reagent/blob/boiling_oil/reaction_mob(mob/living/M, method=TOUCH, volume)
if(method == TOUCH)
/datum/reagent/blob/boiling_oil/reaction_mob(mob/living/M, method=REAGENT_TOUCH, volume)
if(method == REAGENT_TOUCH)
M.adjust_fire_stacks(round(volume/10))
volume = ..()
M.apply_damage(0.6*volume, BURN)
@@ -54,8 +54,8 @@
complementary_color = "#b0cd73"
message_living = ", and you feel sick and nauseated"
/datum/reagent/blob/envenomed_filaments/reaction_mob(mob/living/M, method=TOUCH, volume)
if(method == TOUCH)
/datum/reagent/blob/envenomed_filaments/reaction_mob(mob/living/M, method=REAGENT_TOUCH, volume)
if(method == REAGENT_TOUCH)
volume = ..()
M.apply_damage(0.6*volume, TOX)
M.hallucination += 0.6*volume
@@ -70,8 +70,8 @@
complementary_color = "#56ebc9"
message_living = ", and your lungs feel heavy and weak"
/datum/reagent/blob/lexorin_jelly/reaction_mob(mob/living/M, method=TOUCH, volume)
if(method == TOUCH)
/datum/reagent/blob/lexorin_jelly/reaction_mob(mob/living/M, method=REAGENT_TOUCH, volume)
if(method == REAGENT_TOUCH)
volume = ..()
M.apply_damage(0.4*volume, BRUTE)
M.apply_damage(1*volume, OXY)
@@ -86,8 +86,8 @@
complementary_color = "#ebb756"
message = "The blob pummels you"
/datum/reagent/blob/kinetic/reaction_mob(mob/living/M, method=TOUCH, volume)
if(method == TOUCH)
/datum/reagent/blob/kinetic/reaction_mob(mob/living/M, method=REAGENT_TOUCH, volume)
if(method == REAGENT_TOUCH)
volume = ..()
var/damage = rand(5, 35)/25
M.apply_damage(damage*volume, BRUTE)
@@ -101,8 +101,8 @@
message = "The blob splashes you with an icy liquid"
message_living = ", and you feel cold and tired"
/datum/reagent/blob/cryogenic_liquid/reaction_mob(mob/living/M, method=TOUCH, volume)
if(method == TOUCH)
/datum/reagent/blob/cryogenic_liquid/reaction_mob(mob/living/M, method=REAGENT_TOUCH, volume)
if(method == REAGENT_TOUCH)
volume = ..()
M.apply_damage(0.4*volume, BURN)
M.adjustStaminaLoss(volume)
@@ -117,8 +117,8 @@
complementary_color = "#a2a256"
message = "The blob slams into you, and sends you flying"
/datum/reagent/blob/b_sorium/reaction_mob(mob/living/M, method=TOUCH, volume)
if(method == TOUCH)
/datum/reagent/blob/b_sorium/reaction_mob(mob/living/M, method=REAGENT_TOUCH, volume)
if(method == REAGENT_TOUCH)
reagent_vortex(M, 1, volume)
volume = ..()
M.apply_damage(0.6*volume, BRUTE)
@@ -106,8 +106,8 @@
drink_desc = "As colorful and healthy as it is delicious."
taste_description = "citrus juice"
/datum/reagent/consumable/drink/triple_citrus/reaction_mob(mob/living/M, method=TOUCH, volume)
if(method == INGEST)
/datum/reagent/consumable/drink/triple_citrus/reaction_mob(mob/living/M, method=REAGENT_TOUCH, volume)
if(method == REAGENT_INGEST)
M.adjustToxLoss(-rand(1,2))
/datum/reagent/consumable/drink/berryjuice
@@ -397,8 +397,8 @@
to_chat(M, "<span class='userdanger'>THEY'RE GONNA GET YOU!</span>")
return ..() | update_flags
/datum/reagent/bath_salts/reaction_mob(mob/living/M, method=TOUCH, volume)
if(method == INGEST)
/datum/reagent/bath_salts/reaction_mob(mob/living/M, method=REAGENT_TOUCH, volume)
if(method == REAGENT_INGEST)
to_chat(M, "<span class = 'danger'><font face='[pick("Curlz MT", "Comic Sans MS")]' size='[rand(4,6)]'>You feel FUCKED UP!!!!!!</font></span>")
M << 'sound/effects/singlebeat.ogg'
M.emote("faint")
@@ -556,8 +556,8 @@
update_flags |= M.SetSleeping(0, FALSE)
return ..() | update_flags
/datum/reagent/fliptonium/reaction_mob(mob/living/M, method=TOUCH, volume)
if(method == INGEST || method == TOUCH)
/datum/reagent/fliptonium/reaction_mob(mob/living/M, method=REAGENT_TOUCH, volume)
if(method == REAGENT_INGEST || method == REAGENT_TOUCH)
M.SpinAnimation(speed = 12, loops = -1)
..()
@@ -187,8 +187,8 @@
M.visible_message("<span class='warning'>[M] [pick("dry heaves!","coughs!","splutters!")]</span>")
return ..()
/datum/reagent/consumable/condensedcapsaicin/reaction_mob(mob/living/M, method=TOUCH, volume)
if(method == TOUCH)
/datum/reagent/consumable/condensedcapsaicin/reaction_mob(mob/living/M, method=REAGENT_TOUCH, volume)
if(method == REAGENT_TOUCH)
if(ishuman(M))
var/mob/living/carbon/human/victim = M
var/mouth_covered = 0
@@ -548,8 +548,8 @@
color = "#c0c9a0"
taste_description = "pungency"
/datum/reagent/consumable/onion/reaction_mob(mob/living/M, method = TOUCH, volume)
if(method == TOUCH)
/datum/reagent/consumable/onion/reaction_mob(mob/living/M, method = REAGENT_TOUCH, volume)
if(method == REAGENT_TOUCH)
if(!M.is_mouth_covered() && !M.is_eyes_covered())
if(!M.get_organ_slot("eyes")) //can't blind somebody with no eyes
to_chat(M, "<span class = 'notice'>Your eye sockets feel wet.</span>")
@@ -806,8 +806,8 @@
color = "#AC7E67"
taste_description = "pepperoni"
/datum/reagent/consumable/pepperoni/reaction_mob(mob/living/M, method=TOUCH, volume)
if(method == TOUCH)
/datum/reagent/consumable/pepperoni/reaction_mob(mob/living/M, method=REAGENT_TOUCH, volume)
if(method == REAGENT_TOUCH)
if(ishuman(M))
var/mob/living/carbon/human/H = M
@@ -838,8 +838,8 @@
color = "#63DE63"
taste_description = "burned food"
/datum/reagent/questionmark/reaction_mob(mob/living/carbon/human/H, method = TOUCH, volume)
if(istype(H) && method == INGEST)
/datum/reagent/questionmark/reaction_mob(mob/living/carbon/human/H, method = REAGENT_TOUCH, volume)
if(istype(H) && method == REAGENT_INGEST)
if(H.dna.species.taste_sensitivity < TASTE_SENSITIVITY_NO_TASTE) // If you can taste it, then you know how awful it is.
H.Stun(2, FALSE)
H.Weaken(2, FALSE)
@@ -901,8 +901,8 @@
color = "#C87D28"
taste_description = "mold"
/datum/reagent/fungus/reaction_mob(mob/living/M, method=TOUCH, volume)
if(method == INGEST)
/datum/reagent/fungus/reaction_mob(mob/living/M, method=REAGENT_TOUCH, volume)
if(method == REAGENT_INGEST)
var/ranchance = rand(1,10)
if(ranchance == 1)
to_chat(M, "<span class='warning'>You feel very sick.</span>")
@@ -928,8 +928,8 @@
to_chat(M, "<span class='warning'>[spooky_message]</span>")
return ..()
/datum/reagent/ectoplasm/reaction_mob(mob/living/M, method=TOUCH, volume)
if(method == INGEST)
/datum/reagent/ectoplasm/reaction_mob(mob/living/M, method=REAGENT_TOUCH, volume)
if(method == REAGENT_INGEST)
var/spooky_eat = pick("Ugh, why did you eat that? Your mouth feels haunted. Haunted with bad flavors.", "Ugh, why did you eat that? It has the texture of ham aspic. From the 1950s. Left out in the sun.", "Ugh, why did you eat that? It tastes like a ghost fart.", "Ugh, why did you eat that? It tastes like flavor died.")
to_chat(M, "<span class='warning'>[spooky_eat]</span>")
@@ -28,8 +28,8 @@
taste_description = "antiseptic"
//makes you squeaky clean
/datum/reagent/medicine/sterilizine/reaction_mob(mob/living/M, method=TOUCH, volume)
if(method == TOUCH)
/datum/reagent/medicine/sterilizine/reaction_mob(mob/living/M, method=REAGENT_TOUCH, volume)
if(method == REAGENT_TOUCH)
M.germ_level -= min(volume*20, M.germ_level)
/datum/reagent/medicine/sterilizine/reaction_obj(obj/O, volume)
@@ -184,13 +184,13 @@
update_flags |= M.adjustFireLoss(-2*REAGENTS_EFFECT_MULTIPLIER, FALSE)
return ..() | update_flags
/datum/reagent/medicine/silver_sulfadiazine/reaction_mob(mob/living/M, method=TOUCH, volume, show_message = 1)
/datum/reagent/medicine/silver_sulfadiazine/reaction_mob(mob/living/M, method=REAGENT_TOUCH, volume, show_message = 1)
if(iscarbon(M))
if(method == TOUCH)
if(method == REAGENT_TOUCH)
M.adjustFireLoss(-volume)
if(show_message)
to_chat(M, "<span class='notice'>The silver sulfadiazine soothes your burns.</span>")
if(method == INGEST)
if(method == REAGENT_INGEST)
M.adjustToxLoss(0.5*volume)
if(show_message)
to_chat(M, "<span class='warning'>You feel sick...</span>")
@@ -211,14 +211,14 @@
update_flags |= M.adjustBruteLoss(-2*REAGENTS_EFFECT_MULTIPLIER, FALSE)
return ..() | update_flags
/datum/reagent/medicine/styptic_powder/reaction_mob(mob/living/M, method=TOUCH, volume, show_message = 1)
/datum/reagent/medicine/styptic_powder/reaction_mob(mob/living/M, method=REAGENT_TOUCH, volume, show_message = 1)
if(iscarbon(M))
if(method == TOUCH)
if(method == REAGENT_TOUCH)
M.adjustBruteLoss(-volume)
if(show_message)
to_chat(M, "<span class='notice'>The styptic powder stings like hell as it closes some of your wounds!</span>")
M.emote("scream")
if(method == INGEST)
if(method == REAGENT_INGEST)
M.adjustToxLoss(0.5*volume)
if(show_message)
to_chat(M, "<span class='warning'>You feel gross!</span>")
@@ -254,9 +254,9 @@
color = "#FFEBEB"
taste_description = "blood"
/datum/reagent/medicine/synthflesh/reaction_mob(mob/living/M, method=TOUCH, volume, show_message = 1)
/datum/reagent/medicine/synthflesh/reaction_mob(mob/living/M, method=REAGENT_TOUCH, volume, show_message = 1)
if(iscarbon(M))
if(method == TOUCH)
if(method == REAGENT_TOUCH)
M.adjustBruteLoss(-1.5*volume)
M.adjustFireLoss(-1.5*volume)
if(show_message)
@@ -689,11 +689,11 @@
update_flags |= M.adjustToxLoss(2*REAGENTS_EFFECT_MULTIPLIER, FALSE)
return ..() | update_flags
/datum/reagent/medicine/strange_reagent/reaction_mob(mob/living/M, method = TOUCH, volume)
/datum/reagent/medicine/strange_reagent/reaction_mob(mob/living/M, method = REAGENT_TOUCH, volume)
if(volume < 1)
// gotta pay to play
return ..()
if(isanimal(M) && method == TOUCH)
if(isanimal(M) && method == REAGENT_TOUCH)
var/mob/living/simple_animal/SM = M
if(SM.sentience_type != revive_type) // No reviving Ash Drakes for you
return
@@ -703,7 +703,7 @@
SM.visible_message("<span class='warning'>[SM] seems to rise from the dead!</span>")
if(iscarbon(M))
if(method == INGEST || (method == TOUCH && prob(25)))
if(method == REAGENT_INGEST || (method == REAGENT_TOUCH && prob(25)))
if(M.stat == DEAD)
if(M.getBruteLoss() + M.getFireLoss() + M.getCloneLoss() >= 150)
M.delayed_gib()
@@ -117,7 +117,7 @@
color = "#D0D0D0" // rgb: 208, 208, 208
taste_description = "sub-par bling"
/datum/reagent/silver/reaction_mob(mob/living/M, method=TOUCH, volume)
/datum/reagent/silver/reaction_mob(mob/living/M, method=REAGENT_TOUCH, volume)
if(M.has_bane(BANE_SILVER))
M.reagents.add_reagent("toxin", volume)
. = ..()
@@ -164,7 +164,7 @@
H.blood_volume += 0.8
return ..()
/datum/reagent/iron/reaction_mob(mob/living/M, method=TOUCH, volume)
/datum/reagent/iron/reaction_mob(mob/living/M, method=REAGENT_TOUCH, volume)
if(M.has_bane(BANE_IRON) && holder && holder.chem_temp < 150) //If the target is weak to cold iron, then poison them.
M.reagents.add_reagent("toxin", volume)
..()
@@ -303,7 +303,7 @@
H.dna.species.blood_color = "#[num2hex(rand(0, 255))][num2hex(rand(0, 255))][num2hex(rand(0, 255))]"
return ..()
/datum/reagent/colorful_reagent/reaction_mob(mob/living/simple_animal/M, method=TOUCH, volume)
/datum/reagent/colorful_reagent/reaction_mob(mob/living/simple_animal/M, method=REAGENT_TOUCH, volume)
if(isanimal(M))
M.color = pick(random_color_list)
..()
@@ -430,7 +430,7 @@
M.can_change_intents = TRUE
..()
/datum/reagent/love/reaction_mob(mob/living/M, method=TOUCH, volume)
/datum/reagent/love/reaction_mob(mob/living/M, method=REAGENT_TOUCH, volume)
to_chat(M, "<span class='notice'>You feel loved!</span>")
/datum/reagent/jestosterone //Formerly known as Nitrogen tungstide hypochlorite before NT fired the chemists for trying to be funny
@@ -667,13 +667,13 @@
overdose_threshold = 11 //Slightly more than one un-nozzled spraybottle.
taste_description = "sour oranges"
/datum/reagent/spraytan/reaction_mob(mob/living/M, method=TOUCH, reac_volume, show_message = 1)
/datum/reagent/spraytan/reaction_mob(mob/living/M, method=REAGENT_TOUCH, reac_volume, show_message = 1)
if(ishuman(M))
if(method == TOUCH)
if(method == REAGENT_TOUCH)
var/mob/living/carbon/human/N = M
set_skin_color(N)
if(method == INGEST)
if(method == REAGENT_INGEST)
if(show_message)
to_chat(M, "<span class='notice'>That tasted horrible.</span>")
..()
@@ -17,12 +17,12 @@
var/radius = min(max(0, volume / size_divisor), 8)
fireflash_sm(T, radius, rand(temp_fire - temp_deviance, temp_fire + temp_deviance), 500)
/datum/reagent/phlogiston/reaction_mob(mob/living/M, method = TOUCH, volume)
/datum/reagent/phlogiston/reaction_mob(mob/living/M, method = REAGENT_TOUCH, volume)
if(holder.chem_temp <= T0C - 50)
return
M.adjust_fire_stacks(mob_burning)
M.IgniteMob()
if(method == INGEST)
if(method == REAGENT_INGEST)
M.adjustFireLoss(min(max(10, volume * 2), 45))
to_chat(M, "<span class='warning'>It burns!</span>")
M.emote("scream")
@@ -66,8 +66,8 @@
T.create_reagents(volume)
T.reagents.add_reagent("napalm", volume)
/datum/reagent/napalm/reaction_mob(mob/living/M, method = TOUCH, volume)
if(method == TOUCH)
/datum/reagent/napalm/reaction_mob(mob/living/M, method = REAGENT_TOUCH, volume)
if(method == REAGENT_TOUCH)
if(M.on_fire)
M.adjust_fire_stacks(14)
M.emote("scream")
@@ -131,8 +131,8 @@
T.create_reagents(50)
T.reagents.add_reagent("fuel", volume)
/datum/reagent/fuel/reaction_mob(mob/living/M, method=TOUCH, volume)//Splashing people with welding fuel to make them easy to ignite!
if(method == TOUCH)
/datum/reagent/fuel/reaction_mob(mob/living/M, method=REAGENT_TOUCH, volume)//Splashing people with welding fuel to make them easy to ignite!
if(method == REAGENT_TOUCH)
if(M.on_fire)
M.adjust_fire_stacks(6)
@@ -161,8 +161,8 @@
C.adjustPlasma(10)
return ..() | update_flags
/datum/reagent/plasma/reaction_mob(mob/living/M, method = TOUCH, volume)//Splashing people with plasma is stronger than fuel!
if(method == TOUCH)
/datum/reagent/plasma/reaction_mob(mob/living/M, method = REAGENT_TOUCH, volume)//Splashing people with plasma is stronger than fuel!
if(method == REAGENT_TOUCH)
if(M.on_fire)
M.adjust_fire_stacks(6)
@@ -176,8 +176,8 @@
process_flags = ORGANIC | SYNTHETIC
taste_description = "rust"
/datum/reagent/thermite/reaction_mob(mob/living/M, method= TOUCH, volume)
if(method == TOUCH)
/datum/reagent/thermite/reaction_mob(mob/living/M, method= REAGENT_TOUCH, volume)
if(method == REAGENT_TOUCH)
if(M.on_fire)
M.adjust_fire_stacks(20)
@@ -240,11 +240,11 @@
var/radius = min((volume - 3) * 0.15, 3)
fireflash_sm(T, radius, 4500 + volume * 500, 350)
/datum/reagent/clf3/reaction_mob(mob/living/M, method = TOUCH, volume)
if(method == TOUCH || method == INGEST)
/datum/reagent/clf3/reaction_mob(mob/living/M, method = REAGENT_TOUCH, volume)
if(method == REAGENT_TOUCH || method == REAGENT_INGEST)
M.adjust_fire_stacks(10)
M.IgniteMob()
if(method == INGEST)
if(method == REAGENT_INGEST)
M.adjustFireLoss(min(max(15, volume * 2.5), 90))
to_chat(M, "<span class='warning'>It burns!</span>")
M.emote("scream")
@@ -346,8 +346,8 @@
holder.temperature_reagents(holder.chem_temp - 200)
..()
/datum/reagent/cryostylane/reaction_mob(mob/living/M, method = TOUCH, volume)
if(method == TOUCH)
/datum/reagent/cryostylane/reaction_mob(mob/living/M, method = REAGENT_TOUCH, volume)
if(method == REAGENT_TOUCH)
M.ExtinguishMob()
/datum/reagent/cryostylane/reaction_turf(turf/simulated/T, volume)
@@ -390,9 +390,9 @@
var/cooling_temperature = 3 // more effective than water
taste_description = "the inside of a fire extinguisher"
/datum/reagent/firefighting_foam/reaction_mob(mob/living/M, method=TOUCH, volume)
/datum/reagent/firefighting_foam/reaction_mob(mob/living/M, method=REAGENT_TOUCH, volume)
// Put out fire
if(method == TOUCH)
if(method == REAGENT_TOUCH)
M.adjust_fire_stacks(-10) // more effective than water
/datum/reagent/firefighting_foam/reaction_obj(obj/O, volume)
@@ -433,8 +433,8 @@
C.adjustPlasma(20)
return ..() | update_flags
/datum/reagent/plasma_dust/reaction_mob(mob/living/M, method=TOUCH, volume)//Splashing people with plasma dust is stronger than fuel!
if(method == TOUCH)
/datum/reagent/plasma_dust/reaction_mob(mob/living/M, method=REAGENT_TOUCH, volume)//Splashing people with plasma dust is stronger than fuel!
if(method == REAGENT_TOUCH)
M.adjust_fire_stacks(volume / 5)
return
..()
@@ -85,8 +85,8 @@
can_synth = FALSE
taste_description = "slime"
/datum/reagent/aslimetoxin/reaction_mob(mob/living/M, method=TOUCH, volume)
if(method != TOUCH)
/datum/reagent/aslimetoxin/reaction_mob(mob/living/M, method=REAGENT_TOUCH, volume)
if(method != REAGENT_TOUCH)
M.ForceContractDisease(new /datum/disease/transformation/slime(0))
@@ -165,12 +165,12 @@
taste_mult = 0.9
taste_description = "slime"
/datum/reagent/mutagen/reaction_mob(mob/living/M, method=TOUCH, volume)
/datum/reagent/mutagen/reaction_mob(mob/living/M, method=REAGENT_TOUCH, volume)
if(!..())
return
if(!M.dna)
return //No robots, AIs, aliens, Ians or other mobs should be affected by this.
if((method==TOUCH && prob(33)) || method==INGEST)
if((method==REAGENT_TOUCH && prob(33)) || method==REAGENT_INGEST)
randmutb(M)
domutcheck(M, null)
M.UpdateAppearance()
@@ -232,7 +232,7 @@
can_synth = FALSE
taste_description = "CAAAARL"
/datum/reagent/romerol/reaction_mob(mob/living/carbon/human/H, method = TOUCH, volume)
/datum/reagent/romerol/reaction_mob(mob/living/carbon/human/H, method = REAGENT_TOUCH, volume)
if(!istype(H))
return
// Silently add the zombie infection organ to be activated upon death
@@ -297,10 +297,10 @@
update_flags |= M.adjustFireLoss(1, FALSE)
return ..() | update_flags
/datum/reagent/acid/reaction_mob(mob/living/M, method = TOUCH, volume)
/datum/reagent/acid/reaction_mob(mob/living/M, method = REAGENT_TOUCH, volume)
if(ishuman(M) && !isgrey(M))
var/mob/living/carbon/human/H = M
if(method == TOUCH)
if(method == REAGENT_TOUCH)
if(volume > 25)
if(H.wear_mask)
to_chat(H, "<span class='danger'>Your [H.wear_mask] protects you from the acid!</span>")
@@ -350,10 +350,10 @@
update_flags |= M.adjustToxLoss(1*REAGENTS_EFFECT_MULTIPLIER, FALSE)
return ..() | update_flags
/datum/reagent/acid/facid/reaction_mob(mob/living/M, method = TOUCH, volume)
/datum/reagent/acid/facid/reaction_mob(mob/living/M, method = REAGENT_TOUCH, volume)
if(ishuman(M))
var/mob/living/carbon/human/H = M
if(method == TOUCH)
if(method == REAGENT_TOUCH)
if(volume > 9)
if(!H.wear_mask && !H.head)
var/obj/item/organ/external/affecting = H.get_organ("head")
@@ -473,9 +473,9 @@
overdose_threshold = 40
taste_mult = 0
/datum/reagent/histamine/reaction_mob(mob/living/M, method=TOUCH, volume) //dumping histamine on someone is VERY mean.
/datum/reagent/histamine/reaction_mob(mob/living/M, method=REAGENT_TOUCH, volume) //dumping histamine on someone is VERY mean.
if(iscarbon(M))
if(method == TOUCH)
if(method == REAGENT_TOUCH)
M.reagents.add_reagent("histamine",10)
else
to_chat(M, "<span class='danger'>You feel a burning sensation in your throat...</span>")
@@ -1030,7 +1030,7 @@
var/obj/structure/spacevine/SV = O
SV.on_chem_effect(src)
/datum/reagent/glyphosate/reaction_mob(mob/living/M, method=TOUCH, volume)
/datum/reagent/glyphosate/reaction_mob(mob/living/M, method=REAGENT_TOUCH, volume)
if(iscarbon(M))
var/mob/living/carbon/C = M
if(!C.wear_mask) // If not wearing a mask
@@ -1071,7 +1071,7 @@
O.visible_message("<span class='warning'>The ants die.</span>")
qdel(O)
/datum/reagent/pestkiller/reaction_mob(mob/living/M, method=TOUCH, volume)
/datum/reagent/pestkiller/reaction_mob(mob/living/M, method=REAGENT_TOUCH, volume)
if(iscarbon(M))
var/mob/living/carbon/C = M
if(!C.wear_mask) // If not wearing a mask
@@ -1161,12 +1161,12 @@
color = "#00FD00"
taste_description = "slime"
/datum/reagent/glowing_slurry/reaction_mob(mob/living/M, method=TOUCH, volume) //same as mutagen
/datum/reagent/glowing_slurry/reaction_mob(mob/living/M, method=REAGENT_TOUCH, volume) //same as mutagen
if(!..())
return
if(!M.dna)
return //No robots, AIs, aliens, Ians or other mobs should be affected by this.
if((method==TOUCH && prob(50)) || method==INGEST)
if((method==REAGENT_TOUCH && prob(50)) || method==REAGENT_INGEST)
randmutb(M)
domutcheck(M, null)
M.UpdateAppearance()
@@ -1201,9 +1201,9 @@
update_flags |= M.adjustBruteLoss(2, FALSE)
return ..() | update_flags
/datum/reagent/ants/reaction_mob(mob/living/M, method=TOUCH, volume) //NOT THE ANTS
/datum/reagent/ants/reaction_mob(mob/living/M, method=REAGENT_TOUCH, volume) //NOT THE ANTS
if(iscarbon(M))
if(method == TOUCH || method==INGEST)
if(method == REAGENT_TOUCH || method==REAGENT_INGEST)
to_chat(M, "<span class='warning'>OH SHIT ANTS!!!!</span>")
M.emote("scream")
M.adjustBruteLoss(4)
@@ -1235,5 +1235,5 @@
color = "#5EFF3B" //RGB: 94, 255, 59
taste_description = "decay"
/datum/reagent/gluttonytoxin/reaction_mob(mob/living/L, method=TOUCH, reac_volume)
/datum/reagent/gluttonytoxin/reaction_mob(mob/living/L, method=REAGENT_TOUCH, reac_volume)
L.ForceContractDisease(new /datum/disease/transformation/morph())
@@ -21,7 +21,7 @@
drink_desc = "The father of all refreshments."
var/water_temperature = 283.15 // As reagents don't have a temperature value, we'll just use 10 celsius.
/datum/reagent/water/reaction_mob(mob/living/M, method = TOUCH, volume)
/datum/reagent/water/reaction_mob(mob/living/M, method = REAGENT_TOUCH, volume)
M.water_act(volume, water_temperature, src, method)
/datum/reagent/water/reaction_turf(turf/T, volume)
@@ -82,7 +82,7 @@
for(var/mob/living/simple_animal/slime/M in T)
M.adjustToxLoss(rand(5, 10))
/datum/reagent/space_cleaner/reaction_mob(mob/living/M, method=TOUCH, volume)
/datum/reagent/space_cleaner/reaction_mob(mob/living/M, method=REAGENT_TOUCH, volume)
if(iscarbon(M))
var/mob/living/carbon/C = M
if(ishuman(M))
@@ -128,7 +128,7 @@
taste_description = "<span class='warning'>blood</span>"
taste_mult = 1.3
/datum/reagent/blood/reaction_mob(mob/living/M, method=TOUCH, volume)
/datum/reagent/blood/reaction_mob(mob/living/M, method=REAGENT_TOUCH, volume)
if(data && data["viruses"])
for(var/thing in data["viruses"])
var/datum/disease/D = thing
@@ -136,12 +136,12 @@
if(D.spread_flags & SPECIAL || D.spread_flags & NON_CONTAGIOUS)
continue
if(method == TOUCH)
if(method == REAGENT_TOUCH)
M.ContractDisease(D)
else //ingest, patch or inject
M.ForceContractDisease(D)
if(method == INGEST && iscarbon(M))
if(method == REAGENT_INGEST && iscarbon(M))
var/mob/living/carbon/C = M
if(C.get_blood_id() == "blood")
if((!data || !(data["blood_type"] in get_safe_blood(C.dna.blood_type))))
@@ -210,8 +210,8 @@
color = "#C81040" // rgb: 200, 16, 64
taste_description = "antibodies"
/datum/reagent/vaccine/reaction_mob(mob/living/M, method=TOUCH, volume)
if(islist(data) && (method == INGEST))
/datum/reagent/vaccine/reaction_mob(mob/living/M, method=REAGENT_TOUCH, volume)
if(islist(data) && (method == REAGENT_INGEST))
for(var/thing in M.viruses)
var/datum/disease/D = thing
if(D.GetDiseaseID() in data)
@@ -230,8 +230,8 @@
color = "#757547"
taste_description = "puke"
/datum/reagent/fishwater/reaction_mob(mob/living/M, method=TOUCH, volume)
if(method == INGEST)
/datum/reagent/fishwater/reaction_mob(mob/living/M, method=REAGENT_TOUCH, volume)
if(method == REAGENT_INGEST)
to_chat(M, "Oh god, why did you drink that?")
/datum/reagent/fishwater/on_mob_life(mob/living/M)
@@ -250,7 +250,7 @@
color = "#757547"
taste_description = "the inside of a toilet... or worse"
/datum/reagent/fishwater/toiletwater/reaction_mob(mob/living/M, method=TOUCH, volume) //For shennanigans
/datum/reagent/fishwater/toiletwater/reaction_mob(mob/living/M, method=REAGENT_TOUCH, volume) //For shennanigans
return
/datum/reagent/holywater
@@ -334,11 +334,11 @@
return ..() | update_flags
/datum/reagent/holywater/reaction_mob(mob/living/M, method=TOUCH, volume)
/datum/reagent/holywater/reaction_mob(mob/living/M, method=REAGENT_TOUCH, volume)
// Vampires have their powers weakened by holy water applied to the skin.
if(ishuman(M) && M.mind && M.mind.vampire && !M.mind.vampire.get_ability(/datum/vampire_passive/full))
var/mob/living/carbon/human/H=M
if(method == TOUCH)
if(method == REAGENT_TOUCH)
if(H.wear_mask)
to_chat(H, "<span class='warning'>Your mask protects you from the holy water!</span>")
return
@@ -306,7 +306,7 @@
if(holder && holder.my_atom)
var/turf/simulated/T = get_turf(holder.my_atom)
if(istype(T))
T.atmos_spawn_air(SPAWN_HEAT | SPAWN_TOXINS, 50)
T.atmos_spawn_air(LINDA_SPAWN_HEAT | LINDA_SPAWN_TOXINS, 50)
//Yellow
@@ -48,14 +48,14 @@
if(safe_thing)
visible_message("<span class='danger'>[user] tries to drip something into [H]'s eyes, but fails!</span>")
reagents.reaction(safe_thing, TOUCH)
reagents.reaction(safe_thing, REAGENT_TOUCH)
to_transfer = reagents.remove_any(amount_per_transfer_from_this)
to_chat(user, "<span class='notice'>You transfer [to_transfer] units of the solution.</span>")
return
visible_message("<span class='danger'>[user] drips something into [C]'s eyes!</span>")
reagents.reaction(C, TOUCH)
reagents.reaction(C, REAGENT_TOUCH)
var/list/injected = list()
for(var/datum/reagent/R in reagents.reagent_list)
@@ -137,7 +137,7 @@
var/str = english_list(virList)
add_attack_logs(user, M, "Infected with [str].")
reagents.reaction(M, INGEST, reagents.total_volume)
reagents.reaction(M, REAGENT_INGEST, reagents.total_volume)
reagents.trans_to(M, 1)
var/contained = english_list(injected)
@@ -79,7 +79,7 @@
else
M.LAssailant = user
reagents.reaction(M, TOUCH)
reagents.reaction(M, REAGENT_TOUCH)
reagents.clear_reagents()
else
if(M != user)
@@ -95,7 +95,7 @@
to_chat(user, "<span class='notice'>You swallow a gulp of [src].</span>")
var/fraction = min(5 / reagents.total_volume, 1)
reagents.reaction(M, INGEST, fraction)
reagents.reaction(M, REAGENT_INGEST, fraction)
addtimer(CALLBACK(reagents, /datum/reagents.proc/trans_to, M, 5), 5)
playsound(M.loc,'sound/items/drink.ogg', rand(10,50), 1)
else
@@ -146,7 +146,7 @@
else if(reagents.total_volume && user.a_intent == INTENT_HARM)
user.visible_message("<span class='danger'>[user] splashes the contents of [src] onto [target]!</span>", \
"<span class='notice'>You splash the contents of [src] onto [target].</span>")
reagents.reaction(target, TOUCH)
reagents.reaction(target, REAGENT_TOUCH)
reagents.clear_reagents()
/obj/item/reagent_containers/glass/attackby(obj/item/I, mob/user, params)
@@ -361,7 +361,7 @@
..()
if(slot == slot_head && reagents.total_volume)
to_chat(user, "<span class='userdanger'>[src]'s contents spill all over you!</span>")
reagents.reaction(user, TOUCH)
reagents.reaction(user, REAGENT_TOUCH)
reagents.clear_reagents()
/obj/item/reagent_containers/glass/bucket/attackby(obj/D, mob/user, params)
@@ -68,7 +68,7 @@
if(mode) // Injecting
if(reagents.total_volume)
var/fraction = min(amount_per_transfer_from_this/reagents.total_volume, 1) //The amount of reagents we'll transfer to the person
reagents.reaction(injection_target, INGEST, fraction) //React the amount we're transfering.
reagents.reaction(injection_target, REAGENT_INGEST, fraction) //React the amount we're transfering.
reagents.trans_to(injection_target, amount_per_transfer_from_this)
update_icon()
else // Drawing
@@ -6,7 +6,7 @@
item_state = "bandaid"
possible_transfer_amounts = null
volume = 40
apply_type = TOUCH
apply_type = REAGENT_TOUCH
apply_method = "apply"
transfer_efficiency = 0.5 //patches aren't as effective at getting chemicals into the bloodstream.
@@ -138,7 +138,7 @@
add_attack_logs(user, L, "Injected with [name] containing [contained], transfered [amount_per_transfer_from_this] units", reagents.harmless_helper() ? ATKLOG_ALMOSTALL : null)
var/fraction = min(amount_per_transfer_from_this / reagents.total_volume, 1)
reagents.reaction(L, INGEST, fraction)
reagents.reaction(L, REAGENT_INGEST, fraction)
reagents.trans_to(target, amount_per_transfer_from_this)
to_chat(user, "<span class='notice'>You inject [amount_per_transfer_from_this] units of the solution. The syringe now contains [reagents.total_volume] units.</span>")
if(reagents.total_volume <= 0 && mode == SYRINGE_INJECT)