Merge branch 'master' into Dwarf
This commit is contained in:
@@ -53,7 +53,7 @@
|
||||
var/list/datum/reagent/addiction_list = new/list()
|
||||
var/reagents_holder_flags
|
||||
|
||||
/datum/reagents/New(maximum=100)
|
||||
/datum/reagents/New(maximum=100, new_flags)
|
||||
maximum_volume = maximum
|
||||
|
||||
//I dislike having these here but map-objects are initialised before world/New() is called. >_>
|
||||
@@ -62,6 +62,8 @@
|
||||
if(!GLOB.chemical_reactions_list)
|
||||
build_chemical_reactions_list()
|
||||
|
||||
reagents_holder_flags = new_flags
|
||||
|
||||
/datum/reagents/Destroy()
|
||||
. = ..()
|
||||
var/list/cached_reagents = reagent_list
|
||||
@@ -311,13 +313,6 @@
|
||||
C.update_stamina()
|
||||
update_total()
|
||||
|
||||
|
||||
/datum/reagents/proc/set_reacting(react = TRUE)
|
||||
if(react)
|
||||
reagents_holder_flags &= ~(REAGENT_NOREACT)
|
||||
else
|
||||
reagents_holder_flags |= REAGENT_NOREACT
|
||||
|
||||
/datum/reagents/proc/conditional_update_move(atom/A, Running = 0)
|
||||
var/list/cached_reagents = reagent_list
|
||||
for(var/reagent in cached_reagents)
|
||||
@@ -333,11 +328,11 @@
|
||||
update_total()
|
||||
|
||||
/datum/reagents/proc/handle_reactions()
|
||||
if(reagents_holder_flags & NO_REACT)
|
||||
return //Yup, no reactions here. No siree.
|
||||
var/list/cached_reagents = reagent_list
|
||||
var/list/cached_reactions = GLOB.chemical_reactions_list
|
||||
var/datum/cached_my_atom = my_atom
|
||||
if(reagents_holder_flags & REAGENT_NOREACT)
|
||||
return //Yup, no reactions here. No siree.
|
||||
|
||||
var/reaction_occurred = 0
|
||||
do
|
||||
@@ -555,7 +550,7 @@
|
||||
if(!D)
|
||||
WARNING("[my_atom] attempted to add a reagent called '[reagent]' which doesn't exist. ([usr])")
|
||||
return FALSE
|
||||
|
||||
|
||||
update_total()
|
||||
var/cached_total = total_volume
|
||||
if(cached_total + amount > maximum_volume)
|
||||
@@ -599,9 +594,9 @@
|
||||
if(data)
|
||||
R.data = data
|
||||
R.on_new(data)
|
||||
|
||||
|
||||
if(isliving(my_atom))
|
||||
R.on_mob_add(my_atom) //Must occur befor it could posibly run on_mob_delete
|
||||
R.on_mob_add(my_atom) //Must occur befor it could posibly run on_mob_delete
|
||||
update_total()
|
||||
if(my_atom)
|
||||
my_atom.on_reagent_change(ADD_REAGENT)
|
||||
@@ -800,10 +795,10 @@
|
||||
|
||||
// Convenience proc to create a reagents holder for an atom
|
||||
// Max vol is maximum volume of holder
|
||||
/atom/proc/create_reagents(max_vol)
|
||||
/atom/proc/create_reagents(max_vol, flags)
|
||||
if(reagents)
|
||||
qdel(reagents)
|
||||
reagents = new/datum/reagents(max_vol)
|
||||
reagents = new/datum/reagents(max_vol, flags)
|
||||
reagents.my_atom = src
|
||||
|
||||
/proc/get_random_reagent_id() // Returns a random reagent ID minus blacklisted reagents
|
||||
|
||||
@@ -9,7 +9,6 @@
|
||||
interaction_flags_machine = INTERACT_MACHINE_OPEN | INTERACT_MACHINE_ALLOW_SILICON | INTERACT_MACHINE_OFFLINE
|
||||
resistance_flags = FIRE_PROOF | ACID_PROOF
|
||||
circuit = /obj/item/circuitboard/machine/chem_dispenser
|
||||
var/cell_type = /obj/item/stock_parts/cell/high
|
||||
var/obj/item/stock_parts/cell/cell
|
||||
var/powerefficiency = 0.1
|
||||
var/amount = 30
|
||||
@@ -79,7 +78,6 @@
|
||||
|
||||
/obj/machinery/chem_dispenser/Initialize()
|
||||
. = ..()
|
||||
cell = new cell_type
|
||||
dispensable_reagents = sortList(dispensable_reagents)
|
||||
update_icon()
|
||||
|
||||
|
||||
@@ -230,7 +230,7 @@ By default, all atom have a reagents var - but its empty. if you want to use an
|
||||
'pouring' our reagents into something else.
|
||||
|
||||
atom/proc/is_open_container()
|
||||
Checks obj/var/container_type & OPENCONTAINER.
|
||||
Checks atom/var/reagents.reagents_holder_flags & OPENCONTAINER.
|
||||
If this returns 1 , you can use syringes, beakers etc
|
||||
to manipulate the contents of this object.
|
||||
If it's 0, you'll need to write your own custom reagent
|
||||
|
||||
@@ -37,7 +37,7 @@ All effects don't start immediately, but rather get worse over time; the rate is
|
||||
/datum/reagent/consumable/ethanol/on_mob_life(mob/living/carbon/C)
|
||||
if(C.drunkenness < volume * boozepwr * ALCOHOL_THRESHOLD_MODIFIER)
|
||||
var/booze_power = boozepwr
|
||||
if(C.has_trait(TRAIT_ALCOHOL_TOLERANCE)) //we're an accomplished drinker
|
||||
if(HAS_TRAIT(C, TRAIT_ALCOHOL_TOLERANCE)) //we're an accomplished drinker
|
||||
booze_power *= 0.7
|
||||
C.drunkenness = max((C.drunkenness + (sqrt(volume) * booze_power * ALCOHOL_RATE)), 0) //Volume, power, and server alcohol rate effect how quickly one gets drunk
|
||||
var/obj/item/organ/liver/L = C.getorganslot(ORGAN_SLOT_LIVER)
|
||||
@@ -129,7 +129,7 @@ All effects don't start immediately, but rather get worse over time; the rate is
|
||||
M.dizziness = max(0,M.dizziness-5)
|
||||
M.drowsyness = max(0,M.drowsyness-3)
|
||||
M.AdjustSleeping(-40, FALSE)
|
||||
if(!M.has_trait(TRAIT_ALCOHOL_TOLERANCE))
|
||||
if(!HAS_TRAIT(M, TRAIT_ALCOHOL_TOLERANCE))
|
||||
M.Jitter(5)
|
||||
..()
|
||||
. = 1
|
||||
@@ -165,7 +165,7 @@ All effects don't start immediately, but rather get worse over time; the rate is
|
||||
M.drowsyness = max(0,M.drowsyness-7)
|
||||
M.AdjustSleeping(-40)
|
||||
M.adjust_bodytemperature(-5 * TEMPERATURE_DAMAGE_COEFFICIENT, BODYTEMP_NORMAL)
|
||||
if(!M.has_trait(TRAIT_ALCOHOL_TOLERANCE))
|
||||
if(!HAS_TRAIT(M, TRAIT_ALCOHOL_TOLERANCE))
|
||||
M.Jitter(5)
|
||||
return ..()
|
||||
|
||||
@@ -186,7 +186,7 @@ All effects don't start immediately, but rather get worse over time; the rate is
|
||||
to_chat(M, "<span class='notice'>[pick("You have a really bad headache.", "Your eyes hurt.", "You find it hard to stay still.", "You feel your heart practically beating out of your chest.")]</span>")
|
||||
|
||||
if(prob(5) && iscarbon(M))
|
||||
if(M.has_trait(TRAIT_BLIND))
|
||||
if(HAS_TRAIT(M, TRAIT_BLIND))
|
||||
var/obj/item/organ/eyes/eye = M.getorganslot(ORGAN_SLOT_EYES)
|
||||
if(istype(eye))
|
||||
eye.Remove(M)
|
||||
@@ -364,7 +364,7 @@ All effects don't start immediately, but rather get worse over time; the rate is
|
||||
shot_glass_icon_state = "shotglassgreen"
|
||||
|
||||
/datum/reagent/consumable/ethanol/absinthe/on_mob_life(mob/living/carbon/M)
|
||||
if(prob(10) && !M.has_trait(TRAIT_ALCOHOL_TOLERANCE))
|
||||
if(prob(10) && !HAS_TRAIT(M, TRAIT_ALCOHOL_TOLERANCE))
|
||||
M.hallucination += 4 //Reference to the urban myth
|
||||
..()
|
||||
|
||||
@@ -640,7 +640,7 @@ All effects don't start immediately, but rather get worse over time; the rate is
|
||||
glass_desc = "Heavy, hot and strong. Just like the Iron fist of the LAW."
|
||||
|
||||
/datum/reagent/consumable/ethanol/beepsky_smash/on_mob_life(mob/living/carbon/M)
|
||||
if(M.has_trait(TRAIT_ALCOHOL_TOLERANCE))
|
||||
if(HAS_TRAIT(M, TRAIT_ALCOHOL_TOLERANCE))
|
||||
M.Stun(30, 0) //this realistically does nothing to prevent chainstunning but will cause them to recover faster once it's out of their system
|
||||
else
|
||||
M.Stun(40, 0)
|
||||
@@ -674,7 +674,7 @@ All effects don't start immediately, but rather get worse over time; the rate is
|
||||
/datum/reagent/consumable/ethanol/manly_dorf/on_mob_add(mob/living/M)
|
||||
if(ishuman(M))
|
||||
var/mob/living/carbon/human/H = M
|
||||
if(H.dna.check_mutation(DWARFISM) || H.has_trait(TRAIT_ALCOHOL_TOLERANCE))
|
||||
if(H.dna.check_mutation(DWARFISM) || HAS_TRAIT(H, TRAIT_ALCOHOL_TOLERANCE))
|
||||
to_chat(H, "<span class='notice'>Now THAT is MANLY!</span>")
|
||||
boozepwr = 5 //We've had worse in the mines
|
||||
dorf_mode = TRUE
|
||||
@@ -1274,7 +1274,7 @@ All effects don't start immediately, but rather get worse over time; the rate is
|
||||
|
||||
/datum/reagent/consumable/ethanol/atomicbomb/on_mob_life(mob/living/carbon/M)
|
||||
M.set_drugginess(50)
|
||||
if(!M.has_trait(TRAIT_ALCOHOL_TOLERANCE))
|
||||
if(!HAS_TRAIT(M, TRAIT_ALCOHOL_TOLERANCE))
|
||||
M.confused = max(M.confused+2,0)
|
||||
M.Dizzy(10)
|
||||
M.slurring = max(M.slurring,50)
|
||||
|
||||
@@ -392,10 +392,10 @@
|
||||
|
||||
/datum/reagent/consumable/nuka_cola/on_mob_add(mob/living/L)
|
||||
..()
|
||||
L.add_trait(TRAIT_GOTTAGOFAST, id)
|
||||
ADD_TRAIT(L, TRAIT_GOTTAGOFAST, id)
|
||||
|
||||
/datum/reagent/consumable/nuka_cola/on_mob_delete(mob/living/L)
|
||||
L.remove_trait(TRAIT_GOTTAGOFAST, id)
|
||||
REMOVE_TRAIT(L, TRAIT_GOTTAGOFAST, id)
|
||||
..()
|
||||
|
||||
/datum/reagent/consumable/nuka_cola/on_mob_life(mob/living/carbon/M)
|
||||
|
||||
@@ -164,13 +164,16 @@
|
||||
overdose_threshold = 20
|
||||
addiction_threshold = 10
|
||||
metabolization_rate = 0.75 * REAGENTS_METABOLISM
|
||||
var/brain_damage = TRUE
|
||||
var/jitter = TRUE
|
||||
var/confusion = TRUE
|
||||
|
||||
/datum/reagent/drug/methamphetamine/on_mob_add(mob/living/L)
|
||||
..()
|
||||
L.add_trait(TRAIT_IGNORESLOWDOWN, id)
|
||||
L.ignore_slowdown(id)
|
||||
|
||||
/datum/reagent/drug/methamphetamine/on_mob_delete(mob/living/L)
|
||||
L.remove_trait(TRAIT_IGNORESLOWDOWN, id)
|
||||
L.unignore_slowdown(id)
|
||||
..()
|
||||
|
||||
/datum/reagent/drug/methamphetamine/on_mob_life(mob/living/carbon/M)
|
||||
@@ -181,10 +184,10 @@
|
||||
M.AdjustKnockdown(-40, 0)
|
||||
M.AdjustUnconscious(-40, 0)
|
||||
M.adjustStaminaLoss(-7.5 * REM, 0)
|
||||
M.Jitter(2)
|
||||
M.adjustBrainLoss(rand(1,4))
|
||||
if(prob(30))
|
||||
M.confused = max(1, M.confused)
|
||||
if(jitter)
|
||||
M.Jitter(2)
|
||||
if(brain_damage)
|
||||
M.adjustBrainLoss(rand(1,4))
|
||||
M.heal_overall_damage(2, 2)
|
||||
if(prob(5))
|
||||
M.emote(pick("twitch", "shiver"))
|
||||
@@ -240,6 +243,14 @@
|
||||
..()
|
||||
. = 1
|
||||
|
||||
/datum/reagent/drug/methamphetamine/changeling
|
||||
id = "changelingmeth"
|
||||
name = "Changeling Adrenaline"
|
||||
addiction_threshold = 35
|
||||
overdose_threshold = 35
|
||||
jitter = FALSE
|
||||
brain_damage = FALSE
|
||||
|
||||
/datum/reagent/drug/bath_salts
|
||||
name = "Bath Salts"
|
||||
id = "bath_salts"
|
||||
@@ -253,16 +264,16 @@
|
||||
|
||||
/datum/reagent/drug/bath_salts/on_mob_add(mob/living/L)
|
||||
..()
|
||||
L.add_trait(TRAIT_STUNIMMUNE, id)
|
||||
L.add_trait(TRAIT_SLEEPIMMUNE, id)
|
||||
ADD_TRAIT(L, TRAIT_STUNIMMUNE, id)
|
||||
ADD_TRAIT(L, TRAIT_SLEEPIMMUNE, id)
|
||||
if(iscarbon(L))
|
||||
var/mob/living/carbon/C = L
|
||||
rage = new()
|
||||
C.gain_trauma(rage, TRAUMA_RESILIENCE_ABSOLUTE)
|
||||
|
||||
/datum/reagent/drug/bath_salts/on_mob_delete(mob/living/L)
|
||||
L.remove_trait(TRAIT_STUNIMMUNE, id)
|
||||
L.remove_trait(TRAIT_SLEEPIMMUNE, id)
|
||||
REMOVE_TRAIT(L, TRAIT_STUNIMMUNE, id)
|
||||
REMOVE_TRAIT(L, TRAIT_SLEEPIMMUNE, id)
|
||||
if(rage)
|
||||
QDEL_NULL(rage)
|
||||
..()
|
||||
@@ -372,7 +383,7 @@
|
||||
|
||||
/datum/reagent/drug/skooma/on_mob_add(mob/living/L)
|
||||
. = ..()
|
||||
L.add_trait(TRAIT_GOTTAGOFAST, id)
|
||||
ADD_TRAIT(L, TRAIT_GOTTAGOFAST, id)
|
||||
L.next_move_modifier *= 2
|
||||
if(ishuman(L))
|
||||
var/mob/living/carbon/human/H = L
|
||||
@@ -383,7 +394,7 @@
|
||||
|
||||
/datum/reagent/drug/skooma/on_mob_delete(mob/living/L)
|
||||
. = ..()
|
||||
L.remove_trait(TRAIT_GOTTAGOFAST, id)
|
||||
REMOVE_TRAIT(L, TRAIT_GOTTAGOFAST, id)
|
||||
L.next_move_modifier *= 0.5
|
||||
if(ishuman(L))
|
||||
var/mob/living/carbon/human/H = L
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
|
||||
/datum/reagent/consumable/reaction_mob(mob/living/M, method=TOUCH, reac_volume)
|
||||
if(method == INGEST)
|
||||
if (quality && !M.has_trait(TRAIT_AGEUSIA))
|
||||
if (quality && !HAS_TRAIT(M, TRAIT_AGEUSIA))
|
||||
switch(quality)
|
||||
if (DRINK_NICE)
|
||||
SEND_SIGNAL(M, COMSIG_ADD_MOOD_EVENT, "quality_drink", /datum/mood_event/quality_nice)
|
||||
|
||||
@@ -44,7 +44,7 @@
|
||||
M.adjustToxLoss(-5, 0, TRUE)
|
||||
M.hallucination = 0
|
||||
M.setBrainLoss(0)
|
||||
M.remove_all_traits()
|
||||
REMOVE_TRAITS_NOT_IN(M, list(SPECIES_TRAIT, ROUNDSTART_TRAIT, ORGAN_TRAIT))
|
||||
M.set_blurriness(0)
|
||||
M.set_blindness(0)
|
||||
M.SetKnockdown(0, 0)
|
||||
@@ -136,7 +136,7 @@
|
||||
M.adjustFireLoss(-power, 0)
|
||||
M.adjustToxLoss(-power, 0, TRUE) //heals TOXINLOVERs
|
||||
M.adjustCloneLoss(-power, 0)
|
||||
M.remove_trait(TRAIT_DISFIGURED, TRAIT_GENERIC) //fixes common causes for disfiguration
|
||||
REMOVE_TRAIT(M, TRAIT_DISFIGURED, TRAIT_GENERIC) //fixes common causes for disfiguration
|
||||
. = 1
|
||||
metabolization_rate = REAGENTS_METABOLISM * (0.00001 * (M.bodytemperature ** 2) + 0.5)
|
||||
..()
|
||||
@@ -152,7 +152,7 @@
|
||||
/datum/reagent/medicine/clonexadone/on_mob_life(mob/living/carbon/M)
|
||||
if(M.bodytemperature < T0C)
|
||||
M.adjustCloneLoss(0.00006 * (M.bodytemperature ** 2) - 6, 0)
|
||||
M.remove_trait(TRAIT_DISFIGURED, TRAIT_GENERIC)
|
||||
REMOVE_TRAIT(M, TRAIT_DISFIGURED, TRAIT_GENERIC)
|
||||
. = 1
|
||||
metabolization_rate = REAGENTS_METABOLISM * (0.000015 * (M.bodytemperature ** 2) + 0.75)
|
||||
..()
|
||||
@@ -182,7 +182,7 @@
|
||||
M.adjustFireLoss(-1.5 * power, 0)
|
||||
M.adjustToxLoss(-power, 0, TRUE)
|
||||
M.adjustCloneLoss(-power, 0)
|
||||
M.remove_trait(TRAIT_DISFIGURED, TRAIT_GENERIC)
|
||||
REMOVE_TRAIT(M, TRAIT_DISFIGURED, TRAIT_GENERIC)
|
||||
. = 1
|
||||
..()
|
||||
|
||||
@@ -198,7 +198,7 @@
|
||||
/datum/reagent/medicine/rezadone/on_mob_life(mob/living/carbon/M)
|
||||
M.setCloneLoss(0) //Rezadone is almost never used in favor of cryoxadone. Hopefully this will change that.
|
||||
M.heal_bodypart_damage(1,1)
|
||||
M.remove_trait(TRAIT_DISFIGURED, TRAIT_GENERIC)
|
||||
REMOVE_TRAIT(M, TRAIT_DISFIGURED, TRAIT_GENERIC)
|
||||
..()
|
||||
. = 1
|
||||
|
||||
@@ -632,10 +632,10 @@
|
||||
|
||||
/datum/reagent/medicine/morphine/on_mob_add(mob/living/L)
|
||||
..()
|
||||
L.add_trait(TRAIT_IGNORESLOWDOWN, id)
|
||||
L.ignore_slowdown(id)
|
||||
|
||||
/datum/reagent/medicine/morphine/on_mob_delete(mob/living/L)
|
||||
L.remove_trait(TRAIT_IGNORESLOWDOWN, id)
|
||||
L.unignore_slowdown(id)
|
||||
..()
|
||||
|
||||
/datum/reagent/medicine/morphine/on_mob_life(mob/living/carbon/M)
|
||||
@@ -702,14 +702,14 @@
|
||||
var/obj/item/organ/eyes/eyes = M.getorganslot(ORGAN_SLOT_EYES)
|
||||
if (!eyes)
|
||||
return
|
||||
if(M.has_trait(TRAIT_BLIND, EYE_DAMAGE))
|
||||
if(HAS_TRAIT_FROM(M, TRAIT_BLIND, EYE_DAMAGE))
|
||||
if(prob(20))
|
||||
to_chat(M, "<span class='warning'>Your vision slowly returns...</span>")
|
||||
M.cure_blind(EYE_DAMAGE)
|
||||
M.cure_nearsighted(EYE_DAMAGE)
|
||||
M.blur_eyes(35)
|
||||
|
||||
else if(M.has_trait(TRAIT_NEARSIGHT, EYE_DAMAGE))
|
||||
else if(HAS_TRAIT_FROM(M, TRAIT_NEARSIGHT, EYE_DAMAGE))
|
||||
to_chat(M, "<span class='warning'>The blackness in your peripheral vision fades.</span>")
|
||||
M.cure_nearsighted(EYE_DAMAGE)
|
||||
M.blur_eyes(10)
|
||||
@@ -800,7 +800,7 @@
|
||||
M.visible_message("<span class='warning'>[M]'s body convulses a bit, and then falls still once more.</span>")
|
||||
return
|
||||
M.visible_message("<span class='warning'>[M]'s body convulses a bit.</span>")
|
||||
if(!M.suiciding && !(M.has_trait(TRAIT_NOCLONE)) && !M.hellbound)
|
||||
if(!M.suiciding && !(HAS_TRAIT(M, TRAIT_NOCLONE)) && !M.hellbound)
|
||||
if(!M)
|
||||
return
|
||||
if(M.notify_ghost_cloning(source = M))
|
||||
@@ -877,10 +877,10 @@
|
||||
|
||||
/datum/reagent/medicine/stimulants/on_mob_add(mob/living/L)
|
||||
..()
|
||||
L.add_trait(TRAIT_GOTTAGOFAST, id)
|
||||
ADD_TRAIT(L, TRAIT_GOTTAGOFAST, id)
|
||||
|
||||
/datum/reagent/medicine/stimulants/on_mob_delete(mob/living/L)
|
||||
L.remove_trait(TRAIT_GOTTAGOFAST, id)
|
||||
REMOVE_TRAIT(L, TRAIT_GOTTAGOFAST, id)
|
||||
..()
|
||||
|
||||
/datum/reagent/medicine/stimulants/on_mob_life(mob/living/carbon/M)
|
||||
@@ -1171,6 +1171,7 @@
|
||||
M.AdjustUnconscious(-20, 0)
|
||||
M.AdjustStun(-20, 0)
|
||||
M.AdjustKnockdown(-20, 0)
|
||||
M.AdjustSleeping(-20, 0)
|
||||
M.adjustStaminaLoss(-30, 0)
|
||||
..()
|
||||
return TRUE
|
||||
@@ -1189,10 +1190,10 @@
|
||||
|
||||
/datum/reagent/medicine/changelinghaste/on_mob_add(mob/living/L)
|
||||
..()
|
||||
L.add_trait(TRAIT_GOTTAGOREALLYFAST, id)
|
||||
ADD_TRAIT(L, TRAIT_GOTTAGOREALLYFAST, id)
|
||||
|
||||
/datum/reagent/medicine/changelinghaste/on_mob_delete(mob/living/L)
|
||||
L.remove_trait(TRAIT_GOTTAGOREALLYFAST, id)
|
||||
REMOVE_TRAIT(L, TRAIT_GOTTAGOREALLYFAST, id)
|
||||
..()
|
||||
|
||||
/datum/reagent/medicine/changelinghaste/on_mob_life(mob/living/carbon/M)
|
||||
@@ -1211,10 +1212,10 @@
|
||||
|
||||
/datum/reagent/medicine/corazone/on_mob_add(mob/living/M)
|
||||
..()
|
||||
M.add_trait(TRAIT_STABLEHEART, id)
|
||||
ADD_TRAIT(M, TRAIT_STABLEHEART, id)
|
||||
|
||||
/datum/reagent/medicine/corazone/on_mob_delete(mob/living/M)
|
||||
M.remove_trait(TRAIT_STABLEHEART, id)
|
||||
REMOVE_TRAIT(M, TRAIT_STABLEHEART, id)
|
||||
..()
|
||||
|
||||
/datum/reagent/medicine/muscle_stimulant
|
||||
@@ -1224,11 +1225,11 @@
|
||||
|
||||
/datum/reagent/medicine/muscle_stimulant/on_mob_add(mob/living/M)
|
||||
. = ..()
|
||||
M.add_trait(TRAIT_IGNORESLOWDOWN, id)
|
||||
M.ignore_slowdown(id)
|
||||
|
||||
/datum/reagent/medicine/muscle_stimulant/on_mob_delete(mob/living/M)
|
||||
. = ..()
|
||||
M.remove_trait(TRAIT_IGNORESLOWDOWN, id)
|
||||
M.unignore_slowdown(id)
|
||||
|
||||
/datum/reagent/medicine/modafinil
|
||||
name = "Modafinil"
|
||||
@@ -1242,11 +1243,11 @@
|
||||
var/overdose_progress = 0 // to track overdose progress
|
||||
|
||||
/datum/reagent/medicine/modafinil/on_mob_add(mob/living/M)
|
||||
M.add_trait(TRAIT_SLEEPIMMUNE, id)
|
||||
ADD_TRAIT(M, TRAIT_SLEEPIMMUNE, id)
|
||||
..()
|
||||
|
||||
/datum/reagent/medicine/modafinil/on_mob_delete(mob/living/M)
|
||||
M.remove_trait(TRAIT_SLEEPIMMUNE, id)
|
||||
REMOVE_TRAIT(M, TRAIT_SLEEPIMMUNE, id)
|
||||
..()
|
||||
|
||||
/datum/reagent/medicine/modafinil/on_mob_life(mob/living/carbon/M)
|
||||
|
||||
@@ -198,10 +198,10 @@
|
||||
|
||||
/datum/reagent/water/holywater/on_mob_add(mob/living/L)
|
||||
..()
|
||||
L.add_trait(TRAIT_HOLY, id)
|
||||
ADD_TRAIT(L, TRAIT_HOLY, id)
|
||||
|
||||
/datum/reagent/water/holywater/on_mob_delete(mob/living/L)
|
||||
L.remove_trait(TRAIT_HOLY, id)
|
||||
REMOVE_TRAIT(L, TRAIT_HOLY, id)
|
||||
..()
|
||||
|
||||
/datum/reagent/water/holywater/reaction_mob(mob/living/M, method=TOUCH, reac_volume)
|
||||
@@ -1243,12 +1243,12 @@
|
||||
|
||||
/datum/reagent/stimulum/on_mob_add(mob/living/L)
|
||||
..()
|
||||
L.add_trait(TRAIT_STUNIMMUNE, id)
|
||||
L.add_trait(TRAIT_SLEEPIMMUNE, id)
|
||||
ADD_TRAIT(L, TRAIT_STUNIMMUNE, id)
|
||||
ADD_TRAIT(L, TRAIT_SLEEPIMMUNE, id)
|
||||
|
||||
/datum/reagent/stimulum/on_mob_delete(mob/living/L)
|
||||
L.remove_trait(TRAIT_STUNIMMUNE, id)
|
||||
L.remove_trait(TRAIT_SLEEPIMMUNE, id)
|
||||
REMOVE_TRAIT(L, TRAIT_STUNIMMUNE, id)
|
||||
REMOVE_TRAIT(L, TRAIT_SLEEPIMMUNE, id)
|
||||
..()
|
||||
|
||||
/datum/reagent/stimulum/on_mob_life(mob/living/carbon/M)
|
||||
@@ -1268,10 +1268,10 @@
|
||||
|
||||
/datum/reagent/nitryl/on_mob_add(mob/living/L)
|
||||
..()
|
||||
L.add_trait(TRAIT_GOTTAGOFAST, id)
|
||||
ADD_TRAIT(L, TRAIT_GOTTAGOFAST, id)
|
||||
|
||||
/datum/reagent/nitryl/on_mob_delete(mob/living/L)
|
||||
L.remove_trait(TRAIT_GOTTAGOFAST, id)
|
||||
REMOVE_TRAIT(L, TRAIT_GOTTAGOFAST, id)
|
||||
..()
|
||||
|
||||
/////////////////////////Coloured Crayon Powder////////////////////////////
|
||||
@@ -1779,10 +1779,10 @@
|
||||
|
||||
/datum/reagent/pax/on_mob_add(mob/living/L)
|
||||
..()
|
||||
L.add_trait(TRAIT_PACIFISM, id)
|
||||
ADD_TRAIT(L, TRAIT_PACIFISM, id)
|
||||
|
||||
/datum/reagent/pax/on_mob_delete(mob/living/L)
|
||||
L.remove_trait(TRAIT_PACIFISM, id)
|
||||
REMOVE_TRAIT(L, TRAIT_PACIFISM, id)
|
||||
..()
|
||||
|
||||
/datum/reagent/bz_metabolites
|
||||
@@ -1795,11 +1795,11 @@
|
||||
|
||||
/datum/reagent/bz_metabolites/on_mob_add(mob/living/L)
|
||||
..()
|
||||
L.add_trait(CHANGELING_HIVEMIND_MUTE, id)
|
||||
ADD_TRAIT(L, CHANGELING_HIVEMIND_MUTE, id)
|
||||
|
||||
/datum/reagent/bz_metabolites/on_mob_delete(mob/living/L)
|
||||
..()
|
||||
L.remove_trait(CHANGELING_HIVEMIND_MUTE, id)
|
||||
REMOVE_TRAIT(L, CHANGELING_HIVEMIND_MUTE, id)
|
||||
|
||||
/datum/reagent/bz_metabolites/on_mob_life(mob/living/L)
|
||||
if(L.mind)
|
||||
|
||||
@@ -97,7 +97,7 @@
|
||||
/datum/reagent/toxin/lexorin/on_mob_life(mob/living/carbon/C)
|
||||
. = TRUE
|
||||
|
||||
if(C.has_trait(TRAIT_NOBREATH))
|
||||
if(HAS_TRAIT(C, TRAIT_NOBREATH))
|
||||
. = FALSE
|
||||
|
||||
if(.)
|
||||
@@ -135,7 +135,7 @@
|
||||
taste_description = "mint"
|
||||
|
||||
/datum/reagent/toxin/minttoxin/on_mob_life(mob/living/carbon/M)
|
||||
if(M.has_trait(TRAIT_FAT))
|
||||
if(HAS_TRAIT(M, TRAIT_FAT))
|
||||
M.gib()
|
||||
return ..()
|
||||
|
||||
@@ -180,10 +180,10 @@
|
||||
|
||||
/datum/reagent/toxin/ghoulpowder/on_mob_add(mob/living/L)
|
||||
..()
|
||||
L.add_trait(TRAIT_FAKEDEATH, id)
|
||||
ADD_TRAIT(L, TRAIT_FAKEDEATH, id)
|
||||
|
||||
/datum/reagent/toxin/ghoulpowder/on_mob_delete(mob/living/L)
|
||||
L.remove_trait(TRAIT_FAKEDEATH, id)
|
||||
REMOVE_TRAIT(L, TRAIT_FAKEDEATH, id)
|
||||
..()
|
||||
|
||||
/datum/reagent/toxin/ghoulpowder/on_mob_life(mob/living/carbon/M)
|
||||
@@ -883,7 +883,7 @@
|
||||
taste_description = "stillness"
|
||||
|
||||
/datum/reagent/toxin/mimesbane/on_mob_add(mob/living/L)
|
||||
L.add_trait(TRAIT_EMOTEMUTE, id)
|
||||
ADD_TRAIT(L, TRAIT_EMOTEMUTE, id)
|
||||
|
||||
/datum/reagent/toxin/mimesbane/on_mob_delete(mob/living/L)
|
||||
L.remove_trait(TRAIT_EMOTEMUTE, id)
|
||||
REMOVE_TRAIT(L, TRAIT_EMOTEMUTE, id)
|
||||
|
||||
@@ -7,6 +7,7 @@
|
||||
var/amount_per_transfer_from_this = 5
|
||||
var/list/possible_transfer_amounts = list(5,10,15,20,25,30)
|
||||
var/volume = 30
|
||||
var/reagent_flags
|
||||
var/list/list_reagents = null
|
||||
var/spawned_disease = null
|
||||
var/disease_amount = 20
|
||||
@@ -16,7 +17,7 @@
|
||||
. = ..()
|
||||
if(isnum(vol) && vol > 0)
|
||||
volume = vol
|
||||
create_reagents(volume)
|
||||
create_reagents(volume, reagent_flags)
|
||||
if(spawned_disease)
|
||||
var/datum/disease/F = new spawned_disease()
|
||||
var/list/data = list("viruses"= list(F))
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
amount_per_transfer_from_this = 5
|
||||
possible_transfer_amounts = list(1, 2, 3, 4, 5)
|
||||
volume = 5
|
||||
container_type = TRANSPARENT
|
||||
reagent_flags = TRANSPARENT
|
||||
|
||||
/obj/item/reagent_containers/dropper/afterattack(obj/target, mob/user , proximity)
|
||||
. = ..()
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
amount_per_transfer_from_this = 10
|
||||
possible_transfer_amounts = list(5, 10, 15, 20, 25, 30, 50)
|
||||
volume = 50
|
||||
container_type = OPENCONTAINER
|
||||
reagent_flags = OPENCONTAINER
|
||||
spillable = TRUE
|
||||
resistance_flags = ACID_PROOF
|
||||
|
||||
@@ -194,13 +194,10 @@
|
||||
reactions. Can hold up to 50 units."
|
||||
icon_state = "beakernoreact"
|
||||
materials = list(MAT_METAL=3000)
|
||||
reagent_flags = OPENCONTAINER | NO_REACT
|
||||
volume = 50
|
||||
amount_per_transfer_from_this = 10
|
||||
|
||||
/obj/item/reagent_containers/glass/beaker/noreact/Initialize()
|
||||
. = ..()
|
||||
reagents.set_reacting(FALSE)
|
||||
|
||||
/obj/item/reagent_containers/glass/beaker/bluespace
|
||||
name = "bluespace beaker"
|
||||
desc = "A bluespace beaker, powered by experimental bluespace technology \
|
||||
@@ -291,11 +288,11 @@
|
||||
to_chat(user, "<span class='userdanger'>[src]'s contents spill all over you!</span>")
|
||||
reagents.reaction(user, TOUCH)
|
||||
reagents.clear_reagents()
|
||||
container_type = NONE
|
||||
reagent_flags = NONE
|
||||
|
||||
/obj/item/reagent_containers/glass/bucket/dropped(mob/user)
|
||||
. = ..()
|
||||
container_type = initial(container_type)
|
||||
reagent_flags = initial(reagent_flags)
|
||||
|
||||
/obj/item/reagent_containers/glass/bucket/equip_to_best_slot(var/mob/M)
|
||||
if(reagents.total_volume) //If there is water in a bucket, don't quick equip it to the head
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
volume = 30
|
||||
possible_transfer_amounts = list()
|
||||
resistance_flags = ACID_PROOF
|
||||
container_type = OPENCONTAINER
|
||||
reagent_flags = OPENCONTAINER
|
||||
slot_flags = ITEM_SLOT_BELT
|
||||
var/ignore_flags = 0
|
||||
var/infinite = FALSE
|
||||
@@ -73,7 +73,7 @@
|
||||
desc = "A modified air-needle autoinjector with a small single-use reservoir. It contains an experimental serum."
|
||||
icon_state = "combat_hypo"
|
||||
volume = 5
|
||||
container_type = NONE
|
||||
reagent_flags = NONE
|
||||
list_reagents = list("magillitis" = 5)
|
||||
|
||||
//MediPens
|
||||
@@ -88,7 +88,7 @@
|
||||
amount_per_transfer_from_this = 10
|
||||
volume = 10
|
||||
ignore_flags = 1 //so you can medipen through hardsuits
|
||||
container_type = DRAWABLE
|
||||
reagent_flags = DRAWABLE
|
||||
flags_1 = null
|
||||
list_reagents = list("epinephrine" = 10)
|
||||
|
||||
@@ -103,7 +103,7 @@
|
||||
..()
|
||||
if(!iscyborg(user))
|
||||
reagents.maximum_volume = 0 //Makes them useless afterwards
|
||||
container_type = NONE
|
||||
reagent_flags = NONE
|
||||
update_icon()
|
||||
addtimer(CALLBACK(src, .proc/cyborg_recharge, user), 80)
|
||||
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
righthand_file = 'icons/mob/inhands/equipment/hydroponics_righthand.dmi'
|
||||
item_flags = NOBLUDGEON
|
||||
obj_flags = UNIQUE_RENAME
|
||||
container_type = OPENCONTAINER
|
||||
reagent_flags = OPENCONTAINER
|
||||
slot_flags = ITEM_SLOT_BELT
|
||||
throwforce = 0
|
||||
w_class = WEIGHT_CLASS_SMALL
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
lefthand_file = 'icons/mob/inhands/equipment/custodial_lefthand.dmi'
|
||||
righthand_file = 'icons/mob/inhands/equipment/custodial_righthand.dmi'
|
||||
item_flags = NOBLUDGEON
|
||||
container_type = OPENCONTAINER
|
||||
reagent_flags = OPENCONTAINER
|
||||
slot_flags = ITEM_SLOT_BELT
|
||||
throwforce = 0
|
||||
w_class = WEIGHT_CLASS_SMALL
|
||||
@@ -224,7 +224,7 @@
|
||||
return
|
||||
|
||||
/obj/item/reagent_containers/spray/waterflower/cyborg
|
||||
container_type = NONE
|
||||
reagent_flags = NONE
|
||||
volume = 100
|
||||
list_reagents = list("water" = 100)
|
||||
var/generate_amount = 5
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
var/busy = FALSE // needed for delayed drawing of blood
|
||||
var/proj_piercing = 0 //does it pierce through thick clothes when shot with syringe gun
|
||||
materials = list(MAT_METAL=10, MAT_GLASS=20)
|
||||
container_type = TRANSPARENT
|
||||
reagent_flags = TRANSPARENT
|
||||
|
||||
/obj/item/reagent_containers/syringe/Initialize()
|
||||
. = ..()
|
||||
@@ -249,10 +249,7 @@
|
||||
name = "cryo syringe"
|
||||
desc = "An advanced syringe that stops reagents inside from reacting. It can hold up to 20 units."
|
||||
volume = 20
|
||||
|
||||
/obj/item/reagent_containers/syringe/noreact/Initialize()
|
||||
. = ..()
|
||||
reagents.set_reacting(FALSE)
|
||||
reagent_flags = TRANSPARENT | NO_REACT
|
||||
|
||||
/obj/item/reagent_containers/syringe/piercing
|
||||
name = "piercing syringe"
|
||||
|
||||
@@ -5,7 +5,6 @@
|
||||
icon_state = "water"
|
||||
density = TRUE
|
||||
anchored = FALSE
|
||||
container_type = DRAINABLE | AMOUNT_VISIBLE
|
||||
pressure_resistance = 2*ONE_ATMOSPHERE
|
||||
max_integrity = 300
|
||||
var/tank_volume = 1000 //In units, how much the dispenser can hold
|
||||
@@ -24,7 +23,7 @@
|
||||
return ..()
|
||||
|
||||
/obj/structure/reagent_dispensers/Initialize()
|
||||
create_reagents(tank_volume)
|
||||
create_reagents(tank_volume, DRAINABLE | AMOUNT_VISIBLE)
|
||||
reagents.add_reagent(reagent_id, tank_volume)
|
||||
. = ..()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user