Merge branch 'master' of https://github.com/Citadel-Station-13/Citadel-Station-13 into Ghommie-cit28
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
#define CHEMICAL_QUANTISATION_LEVEL 0.0001
|
||||
|
||||
/proc/build_chemical_reagent_list()
|
||||
//Chemical Reagents - Initialises all /datum/reagent into a list indexed by reagent id
|
||||
@@ -53,10 +54,16 @@
|
||||
var/maximum_volume = 100
|
||||
var/atom/my_atom = null
|
||||
var/chem_temp = 150
|
||||
var/pH = REAGENT_NORMAL_PH//Potential of hydrogen. Edited on adding new reagents, deleting reagents, and during fermi reactions.
|
||||
var/overallPurity = 1
|
||||
var/last_tick = 1
|
||||
var/addiction_tick = 1
|
||||
var/list/datum/reagent/addiction_list = new/list()
|
||||
var/reagents_holder_flags
|
||||
var/targetVol = 0 //the target volume, i.e. the total amount that can be created during a fermichem reaction.
|
||||
var/reactedVol = 0 //how much of the reagent is reacted during a fermireaction
|
||||
var/fermiIsReacting = FALSE //that prevents multiple reactions from occurring (i.e. add_reagent calls to process_reactions(), this stops any extra reactions.)
|
||||
var/fermiReactID = null //ID of the chem being made during a fermireaction, kept here so it's cache isn't lost between loops/procs.
|
||||
|
||||
/datum/reagents/New(maximum=100, new_flags)
|
||||
maximum_volume = maximum
|
||||
@@ -89,7 +96,7 @@
|
||||
var/list/data = list()
|
||||
for(var/r in reagent_list) //no reagents will be left behind
|
||||
var/datum/reagent/R = r
|
||||
data += "[R.id] ([round(R.volume, 0.1)]u)"
|
||||
data += "[R.id] ([round(R.volume, CHEMICAL_QUANTISATION_LEVEL)]u)"
|
||||
//Using IDs because SOME chemicals (I'm looking at you, chlorhydrate-beer) have the same names as other chemicals.
|
||||
return english_list(data)
|
||||
|
||||
@@ -121,11 +128,13 @@
|
||||
|
||||
/datum/reagents/proc/remove_all(amount = 1)
|
||||
var/list/cached_reagents = reagent_list
|
||||
if((total_volume - amount) <= 0)//Because this can result in 0, I don't want it to crash.
|
||||
pH = 7
|
||||
if(total_volume > 0)
|
||||
var/part = amount / total_volume
|
||||
for(var/reagent in cached_reagents)
|
||||
var/datum/reagent/R = reagent
|
||||
remove_reagent(R.id, R.volume * part)
|
||||
remove_reagent(R.id, R.volume * part, ignore_pH = TRUE)
|
||||
|
||||
update_total()
|
||||
handle_reactions()
|
||||
@@ -189,8 +198,11 @@
|
||||
var/transfer_amount = T.volume * part
|
||||
if(preserve_data)
|
||||
trans_data = copy_data(T)
|
||||
R.add_reagent(T.id, transfer_amount * multiplier, trans_data, chem_temp, no_react = 1) //we only handle reaction after every reagent has been transfered.
|
||||
remove_reagent(T.id, transfer_amount)
|
||||
|
||||
|
||||
R.add_reagent(T.id, transfer_amount * multiplier, trans_data, chem_temp, T.purity, pH, no_react = TRUE, ignore_pH = TRUE) //we only handle reaction after every reagent has been transfered.
|
||||
|
||||
remove_reagent(T.id, transfer_amount, ignore_pH = TRUE)
|
||||
|
||||
update_total()
|
||||
R.update_total()
|
||||
@@ -249,7 +261,8 @@
|
||||
if(current_reagent.id == reagent)
|
||||
if(preserve_data)
|
||||
trans_data = current_reagent.data
|
||||
R.add_reagent(current_reagent.id, amount, trans_data, src.chem_temp)
|
||||
R.add_reagent(current_reagent.id, amount, trans_data, chem_temp, current_reagent.purity, pH, no_react = TRUE)
|
||||
|
||||
remove_reagent(current_reagent.id, amount, 1)
|
||||
break
|
||||
|
||||
@@ -350,14 +363,21 @@
|
||||
R.on_update (A)
|
||||
update_total()
|
||||
|
||||
/datum/reagents/proc/handle_reactions()
|
||||
|
||||
/datum/reagents/proc/handle_reactions()//HERE EDIT HERE THE MAIN REACTION
|
||||
if(fermiIsReacting == TRUE)
|
||||
return
|
||||
|
||||
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
|
||||
|
||||
var/reaction_occurred = 0
|
||||
var/reaction_occurred = 0 // checks if reaction, binary variable
|
||||
var/continue_reacting = FALSE //Helps keep track what kind of reaction is occuring; standard or fermi.
|
||||
|
||||
do
|
||||
var/list/possible_reactions = list()
|
||||
reaction_occurred = 0
|
||||
@@ -382,6 +402,7 @@
|
||||
var/has_special_react = C.special_react
|
||||
var/can_special_react = 0
|
||||
|
||||
|
||||
for(var/B in cached_required_reagents)
|
||||
if(!has_reagent(B, cached_required_reagents[B]))
|
||||
break
|
||||
@@ -402,7 +423,7 @@
|
||||
if(!C.required_other)
|
||||
matching_other = 1
|
||||
|
||||
else if(istype(cached_my_atom, /obj/item/slime_extract))
|
||||
else if(istype(cached_my_atom, /obj/item/slime_extract))//if the object is a slime_extract.
|
||||
var/obj/item/slime_extract/M = cached_my_atom
|
||||
|
||||
if(M.Uses > 0) // added a limit to slime cores -- Muskets requested this
|
||||
@@ -413,7 +434,7 @@
|
||||
if(!C.required_other)
|
||||
matching_other = 1
|
||||
|
||||
if(required_temp == 0 || (is_cold_recipe && chem_temp <= required_temp) || (!is_cold_recipe && chem_temp >= required_temp))
|
||||
if(required_temp == 0 || (is_cold_recipe && chem_temp <= required_temp) || (!is_cold_recipe && chem_temp >= required_temp))//Temperature check!!
|
||||
meets_temp_requirement = 1
|
||||
|
||||
if(!has_special_react || C.check_special_react(src))
|
||||
@@ -427,53 +448,268 @@
|
||||
//select the reaction with the most extreme temperature requirements
|
||||
for(var/V in possible_reactions)
|
||||
var/datum/chemical_reaction/competitor = V
|
||||
if(selected_reaction.is_cold_recipe) //if there are no recipe conflicts, everything in possible_reactions will have this same value for is_cold_reaction. warranty void if assumption not met.
|
||||
if(selected_reaction.is_cold_recipe)
|
||||
if(competitor.required_temp <= selected_reaction.required_temp)
|
||||
selected_reaction = competitor
|
||||
else
|
||||
if(competitor.required_temp >= selected_reaction.required_temp)
|
||||
if(competitor.required_temp >= selected_reaction.required_temp) //will return with the hotter reacting first.
|
||||
selected_reaction = competitor
|
||||
var/list/cached_required_reagents = selected_reaction.required_reagents
|
||||
var/list/cached_results = selected_reaction.results
|
||||
var/list/cached_required_reagents = selected_reaction.required_reagents//update reagents list
|
||||
var/list/cached_results = selected_reaction.results//resultant chemical list
|
||||
var/special_react_result = selected_reaction.check_special_react(src)
|
||||
var/list/multiplier = INFINITY
|
||||
for(var/B in cached_required_reagents)
|
||||
multiplier = min(multiplier, round(get_reagent_amount(B) / cached_required_reagents[B]))
|
||||
|
||||
for(var/B in cached_required_reagents)
|
||||
remove_reagent(B, (multiplier * cached_required_reagents[B]), safety = 1)
|
||||
//Splits reactions into two types; FermiChem is advanced reaction mechanics, Other is default reaction.
|
||||
//FermiChem relies on two additional properties; pH and impurity
|
||||
//Temperature plays into a larger role too.
|
||||
var/datum/chemical_reaction/C = selected_reaction
|
||||
|
||||
for(var/P in selected_reaction.results)
|
||||
multiplier = max(multiplier, 1) //this shouldnt happen ...
|
||||
SSblackbox.record_feedback("tally", "chemical_reaction", cached_results[P]*multiplier, P)
|
||||
add_reagent(P, cached_results[P]*multiplier, null, chem_temp)
|
||||
if (C.FermiChem == TRUE && !continue_reacting)
|
||||
if (chem_temp > C.ExplodeTemp) //This is first to ensure explosions.
|
||||
var/datum/chemical_reaction/fermi/Ferm = selected_reaction
|
||||
fermiIsReacting = FALSE
|
||||
SSblackbox.record_feedback("tally", "fermi_chem", 1, ("[Ferm] explosion"))
|
||||
Ferm.FermiExplode(src, my_atom, volume = total_volume, temp = chem_temp, pH = pH)
|
||||
return 0
|
||||
|
||||
var/list/seen = viewers(4, get_turf(my_atom))
|
||||
var/iconhtml = icon2html(cached_my_atom, seen)
|
||||
if(cached_my_atom)
|
||||
if(!ismob(cached_my_atom)) // No bubbling mobs
|
||||
if(selected_reaction.mix_sound)
|
||||
playsound(get_turf(cached_my_atom), selected_reaction.mix_sound, 80, 1)
|
||||
for(var/B in cached_required_reagents)
|
||||
multiplier = min(multiplier, round((get_reagent_amount(B) / cached_required_reagents[B]), CHEMICAL_QUANTISATION_LEVEL))
|
||||
for(var/P in selected_reaction.results)
|
||||
targetVol = cached_results[P]*multiplier
|
||||
|
||||
for(var/mob/M in seen)
|
||||
to_chat(M, "<span class='notice'>[iconhtml] [selected_reaction.mix_message]</span>")
|
||||
if( (chem_temp <= C.ExplodeTemp) && (chem_temp >= C.OptimalTempMin))
|
||||
if( (pH >= (C.OptimalpHMin - C.ReactpHLim)) && (pH <= (C.OptimalpHMax + C.ReactpHLim)) )//To prevent pointless reactions
|
||||
|
||||
if (fermiIsReacting == TRUE)
|
||||
return 0
|
||||
else
|
||||
START_PROCESSING(SSprocessing, src)
|
||||
selected_reaction.on_reaction(src, my_atom, multiplier)
|
||||
fermiIsReacting = TRUE
|
||||
fermiReactID = selected_reaction
|
||||
reaction_occurred = 1
|
||||
|
||||
else //It's a little bit of a confusing nest, but esstentially we check if it's a fermireaction, then temperature, then pH. If this is true, the remainer of this handler is run.
|
||||
return 0 //If pH is out of range
|
||||
else
|
||||
return 0 //If not hot enough
|
||||
|
||||
//Standard reaction mechanics:
|
||||
else
|
||||
if (C.FermiChem == TRUE)//Just to make sure
|
||||
return 0
|
||||
|
||||
for(var/B in cached_required_reagents) //
|
||||
multiplier = min(multiplier, round((get_reagent_amount(B) / cached_required_reagents[B]), CHEMICAL_QUANTISATION_LEVEL))
|
||||
|
||||
for(var/B in cached_required_reagents)
|
||||
remove_reagent(B, (multiplier * cached_required_reagents[B]), safety = 1, ignore_pH = TRUE)
|
||||
|
||||
for(var/P in selected_reaction.results)
|
||||
multiplier = max(multiplier, 1) //this shouldnt happen ...
|
||||
SSblackbox.record_feedback("tally", "chemical_reaction", cached_results[P]*multiplier, P)//log
|
||||
add_reagent(P, cached_results[P]*multiplier, null, chem_temp)
|
||||
|
||||
|
||||
var/list/seen = viewers(4, get_turf(my_atom))//Sound and sight checkers
|
||||
var/iconhtml = icon2html(cached_my_atom, seen)
|
||||
if(cached_my_atom)
|
||||
if(!ismob(cached_my_atom)) // No bubbling mobs
|
||||
if(selected_reaction.mix_sound)
|
||||
playsound(get_turf(cached_my_atom), selected_reaction.mix_sound, 80, 1)
|
||||
|
||||
if(istype(cached_my_atom, /obj/item/slime_extract))
|
||||
var/obj/item/slime_extract/ME2 = my_atom
|
||||
ME2.Uses--
|
||||
if(ME2.Uses <= 0) // give the notification that the slime core is dead
|
||||
for(var/mob/M in seen)
|
||||
to_chat(M, "<span class='notice'>[iconhtml] \The [my_atom]'s power is consumed in the reaction.</span>")
|
||||
ME2.name = "used slime extract"
|
||||
ME2.desc = "This extract has been used up."
|
||||
to_chat(M, "<span class='notice'>[iconhtml] [selected_reaction.mix_message]</span>")
|
||||
|
||||
selected_reaction.on_reaction(src, multiplier, special_react_result)
|
||||
reaction_occurred = 1
|
||||
if(istype(cached_my_atom, /obj/item/slime_extract))//if there's an extract and it's used up.
|
||||
var/obj/item/slime_extract/ME2 = my_atom
|
||||
ME2.Uses--
|
||||
if(ME2.Uses <= 0) // give the notification that the slime core is dead
|
||||
for(var/mob/M in seen)
|
||||
to_chat(M, "<span class='notice'>[iconhtml] \The [my_atom]'s power is consumed in the reaction.</span>")
|
||||
ME2.name = "used slime extract"
|
||||
ME2.desc = "This extract has been used up."
|
||||
|
||||
selected_reaction.on_reaction(src, multiplier, special_react_result)
|
||||
reaction_occurred = 1
|
||||
continue_reacting = TRUE
|
||||
|
||||
while(reaction_occurred)
|
||||
update_total()
|
||||
return 0
|
||||
|
||||
/datum/reagents/process()
|
||||
var/datum/chemical_reaction/fermi/C = fermiReactID
|
||||
|
||||
var/list/cached_required_reagents = C.required_reagents//update reagents list
|
||||
var/list/cached_results = C.results//resultant chemical list
|
||||
var/multiplier = INFINITY
|
||||
|
||||
for(var/B in cached_required_reagents) //
|
||||
multiplier = min(multiplier, round((get_reagent_amount(B) / cached_required_reagents[B]), 0.001))
|
||||
if (multiplier == 0)
|
||||
fermiEnd()
|
||||
return
|
||||
for(var/P in cached_results)
|
||||
targetVol = cached_results[P]*multiplier
|
||||
|
||||
if (fermiIsReacting == FALSE)
|
||||
CRASH("Fermi has refused to stop reacting even though we asked her nicely.")
|
||||
|
||||
if (chem_temp > C.OptimalTempMin && fermiIsReacting == TRUE)//To prevent pointless reactions
|
||||
if( (pH >= (C.OptimalpHMin - C.ReactpHLim)) && (pH <= (C.OptimalpHMax + C.ReactpHLim)) )
|
||||
if (reactedVol < targetVol)
|
||||
reactedVol = fermiReact(fermiReactID, chem_temp, pH, reactedVol, targetVol, cached_required_reagents, cached_results, multiplier)
|
||||
else//Volume is used up
|
||||
fermiEnd()
|
||||
return
|
||||
else//pH is out of range
|
||||
fermiEnd()
|
||||
return
|
||||
else//Temperature is too low, or reaction has stopped.
|
||||
fermiEnd()
|
||||
return
|
||||
|
||||
/datum/reagents/proc/fermiEnd()
|
||||
var/datum/chemical_reaction/fermi/C = fermiReactID
|
||||
STOP_PROCESSING(SSprocessing, src)
|
||||
fermiIsReacting = FALSE
|
||||
reactedVol = 0
|
||||
targetVol = 0
|
||||
//pH check, handled at the end to reduce calls.
|
||||
if(istype(my_atom, /obj/item/reagent_containers))
|
||||
var/obj/item/reagent_containers/RC = my_atom
|
||||
RC.pH_check()
|
||||
C.FermiFinish(src, my_atom)
|
||||
handle_reactions()
|
||||
update_total()
|
||||
//Reaction sounds and words
|
||||
playsound(get_turf(my_atom), C.mix_sound, 80, 1)
|
||||
var/list/seen = viewers(5, get_turf(my_atom))
|
||||
var/iconhtml = icon2html(my_atom, seen)
|
||||
for(var/mob/M in seen)
|
||||
to_chat(M, "<span class='notice'>[iconhtml] [C.mix_message]</span>")
|
||||
|
||||
/datum/reagents/proc/fermiReact(selected_reaction, cached_temp, cached_pH, reactedVol, targetVol, cached_required_reagents, cached_results, multiplier)
|
||||
var/datum/chemical_reaction/fermi/C = selected_reaction
|
||||
var/deltaT = 0
|
||||
var/deltapH = 0
|
||||
var/stepChemAmmount = 0
|
||||
|
||||
//get purity from combined beaker reactant purities HERE.
|
||||
var/purity = 1
|
||||
|
||||
//Begin checks
|
||||
//For now, purity is handled elsewhere (on add)
|
||||
//Calculate DeltapH (Deviation of pH from optimal)
|
||||
//Lower range
|
||||
if (cached_pH < C.OptimalpHMin)
|
||||
if (cached_pH < (C.OptimalpHMin - C.ReactpHLim))
|
||||
deltapH = 0
|
||||
return//If outside pH range, no reaction
|
||||
else
|
||||
deltapH = (((cached_pH - (C.OptimalpHMin - C.ReactpHLim))**C.CurveSharppH)/((C.ReactpHLim**C.CurveSharppH)))
|
||||
//Upper range
|
||||
else if (cached_pH > C.OptimalpHMax)
|
||||
if (cached_pH > (C.OptimalpHMax + C.ReactpHLim))
|
||||
deltapH = 0
|
||||
return //If outside pH range, no reaction
|
||||
else
|
||||
deltapH = (((- cached_pH + (C.OptimalpHMax + C.ReactpHLim))**C.CurveSharppH)/(C.ReactpHLim**C.CurveSharppH))//Reverse - to + to prevent math operation failures.
|
||||
//Within mid range
|
||||
else if (cached_pH >= C.OptimalpHMin && cached_pH <= C.OptimalpHMax)
|
||||
deltapH = 1
|
||||
//This should never proc:
|
||||
else
|
||||
WARNING("[my_atom] attempted to determine FermiChem pH for '[C.id]' which broke for some reason! ([usr])")
|
||||
|
||||
//Calculate DeltaT (Deviation of T from optimal)
|
||||
if (cached_temp < C.OptimalTempMax && cached_temp >= C.OptimalTempMin)
|
||||
deltaT = (((cached_temp - C.OptimalTempMin)**C.CurveSharpT)/((C.OptimalTempMax - C.OptimalTempMin)**C.CurveSharpT))
|
||||
else if (cached_temp >= C.OptimalTempMax)
|
||||
deltaT = 1
|
||||
else
|
||||
deltaT = 0
|
||||
|
||||
purity = (deltapH)//set purity equal to pH offset
|
||||
|
||||
//Then adjust purity of result with reagent purity.
|
||||
purity *= reactant_purity(C)
|
||||
|
||||
var/removeChemAmmount //remove factor
|
||||
var/addChemAmmount //add factor
|
||||
//ONLY WORKS FOR ONE PRODUCT AT THE MOMENT
|
||||
//Calculate how much product to make and how much reactant to remove factors..
|
||||
for(var/P in cached_results)
|
||||
//stepChemAmmount = CLAMP(((deltaT * multiplier), 0, ((targetVol - reactedVol)/cached_results[P])) //used to have multipler, now it does
|
||||
stepChemAmmount = (multiplier*cached_results[P])
|
||||
if (stepChemAmmount >= C.RateUpLim)
|
||||
stepChemAmmount = (C.RateUpLim)
|
||||
addChemAmmount = deltaT * stepChemAmmount
|
||||
if (addChemAmmount >= (targetVol - reactedVol))
|
||||
addChemAmmount = (targetVol - reactedVol)
|
||||
if (addChemAmmount < CHEMICAL_QUANTISATION_LEVEL)
|
||||
addChemAmmount = CHEMICAL_QUANTISATION_LEVEL
|
||||
removeChemAmmount = (addChemAmmount/cached_results[P])
|
||||
//This is kept for future bugtesters.
|
||||
//message_admins("Reaction vars: PreReacted: [reactedVol] of [targetVol]. deltaT [deltaT], multiplier [multiplier], Step [stepChemAmmount], uncapped Step [deltaT*(multiplier*cached_results[P])], addChemAmmount [addChemAmmount], removeFactor [removeChemAmmount] Pfactor [cached_results[P]], adding [addChemAmmount]")
|
||||
|
||||
//remove reactants
|
||||
for(var/B in cached_required_reagents)
|
||||
remove_reagent(B, (removeChemAmmount * cached_required_reagents[B]), safety = 1, ignore_pH = TRUE)
|
||||
|
||||
//add product
|
||||
var/TotalStep = 0
|
||||
for(var/P in cached_results)
|
||||
SSblackbox.record_feedback("tally", "chemical_reaction", addChemAmmount, P)//log
|
||||
SSblackbox.record_feedback("tally", "fermi_chem", addChemAmmount, P)
|
||||
add_reagent(P, (addChemAmmount), null, cached_temp, purity)//add reagent function!! I THINK I can do this:
|
||||
TotalStep += addChemAmmount//for multiple products
|
||||
//Above should reduce yeild based on holder purity.
|
||||
//Purity Check
|
||||
for(var/datum/reagent/R in my_atom.reagents.reagent_list)
|
||||
if(P == R.id)
|
||||
if (R.purity < C.PurityMin)//If purity is below the min, blow it up.
|
||||
fermiIsReacting = FALSE
|
||||
SSblackbox.record_feedback("tally", "fermi_chem", 1, ("[P] explosion"))
|
||||
C.FermiExplode(src, my_atom, (reactedVol+targetVol), cached_temp, pH)
|
||||
STOP_PROCESSING(SSprocessing, src)
|
||||
return 0
|
||||
|
||||
C.FermiCreate(src)//proc that calls when step is done
|
||||
|
||||
//Apply pH changes and thermal output of reaction to beaker
|
||||
chem_temp = round(cached_temp + (C.ThermicConstant * addChemAmmount))
|
||||
pH += (C.HIonRelease * addChemAmmount)
|
||||
//keep track of the current reacted amount
|
||||
reactedVol = reactedVol + addChemAmmount
|
||||
|
||||
//Check extremes
|
||||
if (chem_temp > C.ExplodeTemp)
|
||||
//go to explode proc
|
||||
fermiIsReacting = FALSE
|
||||
SSblackbox.record_feedback("tally", "fermi_chem", 1, ("[C] explosions"))
|
||||
C.FermiExplode(src, my_atom, (reactedVol+targetVol), chem_temp, pH)
|
||||
STOP_PROCESSING(SSprocessing, src)
|
||||
return
|
||||
|
||||
//Make sure things are limited.
|
||||
pH = CLAMP(pH, 0, 14)
|
||||
|
||||
//return said amount to compare for next step.
|
||||
return (reactedVol)
|
||||
|
||||
//Currently calculates it irrespective of required reagents at the start
|
||||
/datum/reagents/proc/reactant_purity(var/datum/chemical_reaction/fermi/C, holder)
|
||||
var/list/cached_reagents = reagent_list
|
||||
var/i = 0
|
||||
var/cachedPurity
|
||||
for(var/datum/reagent/R in my_atom.reagents.reagent_list)
|
||||
if (R in cached_reagents)
|
||||
cachedPurity += R.purity
|
||||
i++
|
||||
return cachedPurity/i
|
||||
|
||||
/datum/reagents/proc/isolate_reagent(reagent)
|
||||
var/list/cached_reagents = reagent_list
|
||||
for(var/_reagent in cached_reagents)
|
||||
@@ -505,7 +741,7 @@
|
||||
total_volume = 0
|
||||
for(var/reagent in cached_reagents)
|
||||
var/datum/reagent/R = reagent
|
||||
if(R.volume < 0.1)
|
||||
if(R.volume < CHEMICAL_QUANTISATION_LEVEL)
|
||||
del_reagent(R.id)
|
||||
else
|
||||
total_volume += R.volume
|
||||
@@ -517,6 +753,7 @@
|
||||
for(var/reagent in cached_reagents)
|
||||
var/datum/reagent/R = reagent
|
||||
del_reagent(R.id)
|
||||
pH = REAGENT_NORMAL_PH
|
||||
return 0
|
||||
|
||||
/datum/reagents/proc/reaction(atom/A, method = TOUCH, volume_modifier = 1, show_message = 1)
|
||||
@@ -563,13 +800,17 @@
|
||||
|
||||
/datum/reagents/proc/adjust_thermal_energy(J, min_temp = 2.7, max_temp = 1000)
|
||||
var/S = specific_heat()
|
||||
chem_temp = CLAMP(chem_temp + (J / (S * total_volume)), 2.7, 1000)
|
||||
chem_temp = CLAMP(chem_temp + (J / (S * total_volume)), min_temp, max_temp)
|
||||
if(istype(my_atom, /obj/item/reagent_containers))
|
||||
var/obj/item/reagent_containers/RC = my_atom
|
||||
RC.temp_check()
|
||||
|
||||
/datum/reagents/proc/add_reagent(reagent, amount, list/data=null, reagtemp = 300, other_purity = 1, other_pH, no_react = 0, ignore_pH = FALSE)
|
||||
|
||||
/datum/reagents/proc/add_reagent(reagent, amount, list/data=null, reagtemp = 300, no_react = 0)
|
||||
if(!isnum(amount) || !amount)
|
||||
return FALSE
|
||||
|
||||
if(amount <= 0)
|
||||
if(amount <= CHEMICAL_QUANTISATION_LEVEL)//To prevent small ammount problems.
|
||||
return FALSE
|
||||
|
||||
var/datum/reagent/D = GLOB.chemical_reagents_list[reagent]
|
||||
@@ -577,6 +818,23 @@
|
||||
WARNING("[my_atom] attempted to add a reagent called '[reagent]' which doesn't exist. ([usr])")
|
||||
return FALSE
|
||||
|
||||
if (D.id == "water" && no_react == FALSE && !istype(my_atom, /obj/item/reagent_containers/food)) //Do like an otter, add acid to water, but also don't blow up botany.
|
||||
if (pH <= 2)
|
||||
SSblackbox.record_feedback("tally", "fermi_chem", 1, "water-acid explosions")
|
||||
var/datum/effect_system/smoke_spread/chem/s = new
|
||||
var/turf/T = get_turf(my_atom)
|
||||
var/datum/reagents/R = new/datum/reagents(3000)
|
||||
R.add_reagent("fermiAcid", amount)
|
||||
for (var/datum/reagent/reagentgas in reagent_list)
|
||||
R.add_reagent(reagentgas, amount/5)
|
||||
remove_reagent(reagentgas, amount/5)
|
||||
s.set_up(R, CLAMP(amount/10, 0, 2), T)
|
||||
s.start()
|
||||
return FALSE
|
||||
|
||||
if(!pH)
|
||||
other_pH = D.pH
|
||||
|
||||
update_total()
|
||||
var/cached_total = total_volume
|
||||
if(cached_total + amount > maximum_volume)
|
||||
@@ -587,6 +845,10 @@
|
||||
var/cached_temp = chem_temp
|
||||
var/list/cached_reagents = reagent_list
|
||||
|
||||
var/cached_pH = pH
|
||||
|
||||
|
||||
|
||||
//Equalize temperature - Not using specific_heat() because the new chemical isn't in yet.
|
||||
var/specific_heat = 0
|
||||
var/thermal_energy = 0
|
||||
@@ -597,32 +859,55 @@
|
||||
specific_heat += D.specific_heat * (amount / new_total)
|
||||
thermal_energy += D.specific_heat * amount * reagtemp
|
||||
chem_temp = thermal_energy / (specific_heat * new_total)
|
||||
////
|
||||
|
||||
//cacluate reagent based pH shift.
|
||||
if(ignore_pH == TRUE)
|
||||
pH = ((cached_pH * cached_total)+(other_pH * amount))/(cached_total + amount)//should be right
|
||||
else
|
||||
pH = ((cached_pH * cached_total)+(D.pH * amount))/(cached_total + amount)//should be right
|
||||
if(istype(my_atom, /obj/item/reagent_containers/))
|
||||
var/obj/item/reagent_containers/RC = my_atom
|
||||
RC.pH_check()//checks beaker resilience
|
||||
|
||||
//add the reagent to the existing if it exists
|
||||
for(var/A in cached_reagents)
|
||||
var/datum/reagent/R = A
|
||||
if (R.id == reagent)
|
||||
if (R.id == reagent) //IF MERGING
|
||||
//Add amount and equalize purity
|
||||
R.volume += amount
|
||||
R.purity = ((R.purity * R.volume) + (other_purity * amount)) /((R.volume + amount)) //This should add the purity to the product
|
||||
|
||||
update_total()
|
||||
if(my_atom)
|
||||
my_atom.on_reagent_change(ADD_REAGENT)
|
||||
R.on_merge(data, amount)
|
||||
if(isliving(my_atom))
|
||||
if(R.OnMobMergeCheck == TRUE)//Forces on_mob_add proc when a chem is merged
|
||||
R.on_mob_add(my_atom, amount)
|
||||
//else
|
||||
// R.on_merge(data, amount, my_atom, other_purity)
|
||||
R.on_merge(data, amount, my_atom, other_purity)
|
||||
if(!no_react)
|
||||
handle_reactions()
|
||||
|
||||
return TRUE
|
||||
|
||||
|
||||
//otherwise make a new one
|
||||
var/datum/reagent/R = new D.type(data)
|
||||
cached_reagents += R
|
||||
R.holder = src
|
||||
R.volume = amount
|
||||
R.purity = other_purity
|
||||
R.loc = get_turf(my_atom)
|
||||
if(data)
|
||||
R.data = data
|
||||
R.on_new(data)
|
||||
if(R.addProc == TRUE)//Allows on new without data overhead.
|
||||
R.on_new(pH) //Add more as desired.
|
||||
|
||||
|
||||
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, amount)
|
||||
update_total()
|
||||
if(my_atom)
|
||||
my_atom.on_reagent_change(ADD_REAGENT)
|
||||
@@ -630,12 +915,13 @@
|
||||
handle_reactions()
|
||||
return TRUE
|
||||
|
||||
|
||||
/datum/reagents/proc/add_reagent_list(list/list_reagents, list/data=null) // Like add_reagent but you can enter a list. Format it like this: list("toxin" = 10, "beer" = 15)
|
||||
for(var/r_id in list_reagents)
|
||||
var/amt = list_reagents[r_id]
|
||||
add_reagent(r_id, amt, data)
|
||||
|
||||
/datum/reagents/proc/remove_reagent(reagent, amount, safety)//Added a safety check for the trans_id_to
|
||||
/datum/reagents/proc/remove_reagent(reagent, amount, safety, ignore_pH = FALSE)//Added a safety check for the trans_id_to
|
||||
|
||||
if(isnull(amount))
|
||||
amount = 0
|
||||
@@ -653,6 +939,15 @@
|
||||
for(var/A in cached_reagents)
|
||||
var/datum/reagent/R = A
|
||||
if (R.id == reagent)
|
||||
if((total_volume - amount) <= 0)//Because this can result in 0, I don't want it to crash.
|
||||
pH = 7
|
||||
//In practice this is really confusing and players feel like it randomly melts their beakers, but I'm not sure how else to handle it. We'll see how it goes and I can remove this if it confuses people.
|
||||
else if (ignore_pH == FALSE)
|
||||
//if (((pH > R.pH) && (pH <= 7)) || ((pH < R.pH) && (pH >= 7)))
|
||||
pH = (((pH - R.pH) / total_volume) * amount) + pH
|
||||
if(istype(my_atom, /obj/item/reagent_containers/))
|
||||
var/obj/item/reagent_containers/RC = my_atom
|
||||
RC.pH_check()//checks beaker resilience)
|
||||
//clamp the removal amount to be between current reagent amount
|
||||
//and zero, to prevent removing more than the holder has stored
|
||||
amount = CLAMP(amount, 0, R.volume)
|
||||
@@ -674,7 +969,7 @@
|
||||
if(!amount)
|
||||
return R
|
||||
else
|
||||
if(R.volume >= amount)
|
||||
if(round(R.volume, CHEMICAL_QUANTISATION_LEVEL) >= amount)
|
||||
return R
|
||||
else
|
||||
return 0
|
||||
@@ -686,7 +981,7 @@
|
||||
for(var/_reagent in cached_reagents)
|
||||
var/datum/reagent/R = _reagent
|
||||
if (R.id == reagent)
|
||||
return R.volume
|
||||
return round(R.volume, CHEMICAL_QUANTISATION_LEVEL)
|
||||
|
||||
return 0
|
||||
|
||||
|
||||
@@ -191,10 +191,16 @@
|
||||
data["beakerCurrentVolume"] = beakerCurrentVolume
|
||||
data["beakerMaxVolume"] = beaker.volume
|
||||
data["beakerTransferAmounts"] = beaker.possible_transfer_amounts
|
||||
data["beakerCurrentpH"] = beaker.reagents.pH
|
||||
//pH accuracy
|
||||
for(var/obj/item/stock_parts/capacitor/C in component_parts)
|
||||
data["partRating"]= 10**(C.rating-1)
|
||||
|
||||
else
|
||||
data["beakerCurrentVolume"] = null
|
||||
data["beakerMaxVolume"] = null
|
||||
data["beakerTransferAmounts"] = null
|
||||
data["beakerCurrentpH"] = null
|
||||
|
||||
var/chemicals[0]
|
||||
var/recipes[0]
|
||||
|
||||
@@ -97,13 +97,21 @@
|
||||
data["isBeakerLoaded"] = beaker ? 1 : 0
|
||||
|
||||
data["currentTemp"] = beaker ? beaker.reagents.chem_temp : null
|
||||
data["currentpH"] = beaker ? beaker.reagents.pH : null
|
||||
data["beakerCurrentVolume"] = beaker ? beaker.reagents.total_volume : null
|
||||
data["beakerMaxVolume"] = beaker ? beaker.volume : null
|
||||
//purity and pH accuracy
|
||||
for(var/obj/item/stock_parts/micro_laser/M in component_parts)
|
||||
data["partRating"]= 10**(M.rating-1)
|
||||
if(M.rating == 4)
|
||||
data["showPurity"] = 1
|
||||
else
|
||||
data["showPurity"] = 0
|
||||
|
||||
var beakerContents[0]
|
||||
if(beaker)
|
||||
for(var/datum/reagent/R in beaker.reagents.reagent_list)
|
||||
beakerContents.Add(list(list("name" = R.name, "volume" = R.volume))) // list in a list because Byond merges the first list...
|
||||
beakerContents.Add(list(list("name" = R.name, "volume" = R.volume, "purity" = R.purity))) // list in a list because Byond merges the first list...
|
||||
data["beakerContents"] = beakerContents
|
||||
return data
|
||||
|
||||
|
||||
@@ -21,6 +21,7 @@
|
||||
var/analyzeVars[0]
|
||||
var/useramount = 30 // Last used amount
|
||||
var/list/pillStyles
|
||||
var/fermianalyze //Give more detail on fermireactions on analysis
|
||||
|
||||
/obj/machinery/chem_master/Initialize()
|
||||
create_reagents(100)
|
||||
@@ -102,12 +103,9 @@
|
||||
updateUsrDialog()
|
||||
update_icon()
|
||||
else if(!condi && istype(I, /obj/item/storage/pill_bottle))
|
||||
if(bottle)
|
||||
to_chat(user, "<span class='warning'>A pill bottle is already loaded into [src]!</span>")
|
||||
return
|
||||
if(!user.transferItemToLoc(I, src))
|
||||
return
|
||||
bottle = I
|
||||
replace_pillbottle(user, I)
|
||||
to_chat(user, "<span class='notice'>You add [I] into the dispenser slot.</span>")
|
||||
updateUsrDialog()
|
||||
else
|
||||
@@ -131,12 +129,23 @@
|
||||
update_icon()
|
||||
return TRUE
|
||||
|
||||
/obj/machinery/chem_master/on_deconstruction()
|
||||
replace_beaker(usr)
|
||||
/obj/machinery/chem_master/proc/replace_pillbottle(mob/living/user, obj/item/storage/pill_bottle/new_bottle)
|
||||
if(bottle)
|
||||
bottle.forceMove(drop_location())
|
||||
adjust_item_drop_location(bottle)
|
||||
if(user && Adjacent(user) && !issiliconoradminghost(user))
|
||||
user.put_in_hands(beaker)
|
||||
else
|
||||
adjust_item_drop_location(bottle)
|
||||
if(new_bottle)
|
||||
bottle = new_bottle
|
||||
else
|
||||
bottle = null
|
||||
update_icon()
|
||||
return TRUE
|
||||
|
||||
/obj/machinery/chem_master/on_deconstruction()
|
||||
replace_beaker(usr)
|
||||
replace_pillbottle(usr)
|
||||
return ..()
|
||||
|
||||
/obj/machinery/chem_master/ui_interact(mob/user, ui_key = "main", datum/tgui/ui = null, force_open = FALSE, \
|
||||
@@ -162,6 +171,7 @@
|
||||
data["condi"] = condi
|
||||
data["screen"] = screen
|
||||
data["analyzeVars"] = analyzeVars
|
||||
data["fermianalyze"] = fermianalyze
|
||||
data["chosenPillStyle"] = chosenPillStyle
|
||||
data["isPillBottleLoaded"] = bottle ? 1 : 0
|
||||
if(bottle)
|
||||
@@ -195,22 +205,21 @@
|
||||
. = TRUE
|
||||
|
||||
if("ejectp")
|
||||
if(bottle)
|
||||
bottle.forceMove(drop_location())
|
||||
adjust_item_drop_location(bottle)
|
||||
bottle = null
|
||||
. = TRUE
|
||||
replace_pillbottle(usr)
|
||||
. = TRUE
|
||||
|
||||
if("transferToBuffer")
|
||||
if(beaker)
|
||||
var/id = params["id"]
|
||||
var/amount = text2num(params["amount"])
|
||||
if (amount > 0)
|
||||
end_fermi_reaction()
|
||||
beaker.reagents.trans_id_to(src, id, amount)
|
||||
. = TRUE
|
||||
else if (amount == -1) // -1 means custom amount
|
||||
useramount = input("Enter the Amount you want to transfer:", name, useramount) as num|null
|
||||
if (useramount > 0)
|
||||
end_fermi_reaction()
|
||||
beaker.reagents.trans_id_to(src, id, useramount)
|
||||
. = TRUE
|
||||
|
||||
@@ -245,14 +254,14 @@
|
||||
if(!name || !reagents.total_volume || !src || QDELETED(src) || !usr.canUseTopic(src, !issilicon(usr)))
|
||||
return
|
||||
var/obj/item/reagent_containers/pill/P
|
||||
var/target_loc = drop_location()
|
||||
var/target_loc = bottle ? bottle : drop_location()
|
||||
var/drop_threshold = INFINITY
|
||||
if(bottle)
|
||||
GET_COMPONENT_FROM(STRB, /datum/component/storage, bottle)
|
||||
if(STRB)
|
||||
drop_threshold = STRB.max_items - bottle.contents.len
|
||||
|
||||
for(var/i = 0; i < amount; i++)
|
||||
for(var/i in 1 to amount)
|
||||
if(i < drop_threshold)
|
||||
P = new(target_loc)
|
||||
else
|
||||
@@ -348,10 +357,10 @@
|
||||
return
|
||||
|
||||
var/amount_full = 0
|
||||
var/vol_part = min(reagents.total_volume, 30)
|
||||
var/vol_part = min(reagents.total_volume, 60)
|
||||
if(text2num(many))
|
||||
amount_full = round(reagents.total_volume / 30)
|
||||
vol_part = reagents.total_volume % 30
|
||||
amount_full = round(reagents.total_volume / 60)
|
||||
vol_part = reagents.total_volume % 60
|
||||
var/name = stripped_input(usr, "Name:","Name your hypovial!", (reagents.total_volume ? reagents.get_master_reagent_name() : " "), MAX_NAME_LEN)
|
||||
if(!name || !reagents.total_volume || !src || QDELETED(src) || !usr.canUseTopic(src, !issilicon(usr)))
|
||||
return
|
||||
@@ -361,7 +370,7 @@
|
||||
P = new/obj/item/reagent_containers/glass/bottle/vial/small(drop_location())
|
||||
P.name = trim("[name] hypovial")
|
||||
adjust_item_drop_location(P)
|
||||
reagents.trans_to(P, 30)
|
||||
reagents.trans_to(P, 60)
|
||||
|
||||
if(vol_part)
|
||||
P = new/obj/item/reagent_containers/glass/bottle/vial/small(drop_location())
|
||||
@@ -382,7 +391,14 @@
|
||||
state = "Gas"
|
||||
var/const/P = 3 //The number of seconds between life ticks
|
||||
var/T = initial(R.metabolization_rate) * (60 / P)
|
||||
analyzeVars = list("name" = initial(R.name), "state" = state, "color" = initial(R.color), "description" = initial(R.description), "metaRate" = T, "overD" = initial(R.overdose_threshold), "addicD" = initial(R.addiction_threshold))
|
||||
if(istype(R, /datum/reagent/fermi))
|
||||
fermianalyze = TRUE
|
||||
var/datum/chemical_reaction/Rcr = get_chemical_reaction(R.id)
|
||||
var/pHpeakCache = (Rcr.OptimalpHMin + Rcr.OptimalpHMax)/2
|
||||
analyzeVars = list("name" = initial(R.name), "state" = state, "color" = initial(R.color), "description" = initial(R.description), "metaRate" = T, "overD" = initial(R.overdose_threshold), "addicD" = initial(R.addiction_threshold), "purityF" = initial(R.purity), "inverseRatioF" = initial(R.InverseChemVal), "purityE" = initial(Rcr.PurityMin), "minTemp" = initial(Rcr.OptimalTempMin), "maxTemp" = initial(Rcr.OptimalTempMax), "eTemp" = initial(Rcr.ExplodeTemp), "pHpeak" = pHpeakCache)
|
||||
else
|
||||
fermianalyze = FALSE
|
||||
analyzeVars = list("name" = initial(R.name), "state" = state, "color" = initial(R.color), "description" = initial(R.description), "metaRate" = T, "overD" = initial(R.overdose_threshold), "addicD" = initial(R.addiction_threshold))
|
||||
screen = "analyze"
|
||||
return
|
||||
|
||||
@@ -392,6 +408,9 @@
|
||||
|
||||
|
||||
|
||||
/obj/machinery/chem_master/proc/end_fermi_reaction()//Ends any reactions upon moving.
|
||||
if(beaker.reagents.fermiIsReacting)
|
||||
beaker.reagents.fermiEnd()
|
||||
|
||||
/obj/machinery/chem_master/proc/isgoodnumber(num)
|
||||
if(isnum(num))
|
||||
@@ -432,4 +451,4 @@
|
||||
condi = TRUE
|
||||
|
||||
#undef PILL_STYLE_COUNT
|
||||
#undef RANDOM_PILL_STYLE
|
||||
#undef RANDOM_PILL_STYLE
|
||||
|
||||
@@ -33,10 +33,18 @@
|
||||
var/addiction_stage4_end = 40
|
||||
var/overdosed = 0 // You fucked up and this is now triggering its overdose effects, purge that shit quick.
|
||||
var/self_consuming = FALSE
|
||||
//Fermichem vars:
|
||||
var/purity = 1 //How pure a chemical is from 0 - 1.
|
||||
var/addProc = FALSE //If the chemical should force an on_new() call
|
||||
var/turf/loc = null //Should be the creation location!
|
||||
var/pH = 7 //pH of the specific reagent, used for calculating the sum pH of a holder.
|
||||
var/ImpureChem = "fermiTox"// What chemical is metabolised with an inpure reaction
|
||||
var/InverseChemVal = 0.25 // If the impurity is below 0.5, replace ALL of the chem with InverseChem upon metabolising
|
||||
var/InverseChem = "fermiTox"// What chem is metabolised when purity is below InverseChemVal, this shouldn't be made, but if it does, well, I guess I'll know about it.
|
||||
var/DoNotSplit = FALSE // If impurity is handled within the main chem itself
|
||||
var/OnMobMergeCheck = FALSE //Call on_mob_life proc when reagents are merging.
|
||||
var/metabolizing = FALSE
|
||||
|
||||
|
||||
|
||||
var/invisible = FALSE //Set to true if it doesn't appear on handheld health analyzers.
|
||||
|
||||
/datum/reagent/Destroy() // This should only be called by the holder, so it's already handled clearing its references
|
||||
. = ..()
|
||||
@@ -61,7 +69,8 @@
|
||||
|
||||
/datum/reagent/proc/on_mob_life(mob/living/carbon/M)
|
||||
current_cycle++
|
||||
holder.remove_reagent(src.id, metabolization_rate * M.metabolism_efficiency) //By default it slowly disappears.
|
||||
if(holder)
|
||||
holder.remove_reagent(src.id, metabolization_rate * M.metabolism_efficiency) //By default it slowly disappears.
|
||||
return
|
||||
|
||||
// Called when this reagent is first added to a mob
|
||||
|
||||
@@ -14,6 +14,7 @@
|
||||
nutriment_factor = 0
|
||||
taste_description = "alcohol"
|
||||
var/boozepwr = 65 //Higher numbers equal higher hardness, higher hardness equals more intense alcohol poisoning
|
||||
pH = 7.33
|
||||
|
||||
/*
|
||||
Boozepwr Chart
|
||||
@@ -86,6 +87,8 @@ All effects don't start immediately, but rather get worse over time; the rate is
|
||||
taste_description = "piss water"
|
||||
glass_name = "glass of beer"
|
||||
glass_desc = "A freezing pint of beer."
|
||||
pH = 4
|
||||
|
||||
|
||||
/datum/reagent/consumable/ethanol/beer/light
|
||||
name = "Light Beer"
|
||||
@@ -95,6 +98,7 @@ All effects don't start immediately, but rather get worse over time; the rate is
|
||||
taste_description = "dish water"
|
||||
glass_name = "glass of light beer"
|
||||
glass_desc = "A freezing pint of watery light beer."
|
||||
pH = 5
|
||||
|
||||
/datum/reagent/consumable/ethanol/beer/green
|
||||
name = "Green Beer"
|
||||
@@ -105,6 +109,7 @@ All effects don't start immediately, but rather get worse over time; the rate is
|
||||
glass_icon_state = "greenbeerglass"
|
||||
glass_name = "glass of green beer"
|
||||
glass_desc = "A freezing pint of green beer. Festive."
|
||||
pH = 6
|
||||
|
||||
/datum/reagent/consumable/ethanol/beer/green/on_mob_life(mob/living/carbon/M)
|
||||
if(M.color != color)
|
||||
@@ -124,6 +129,8 @@ All effects don't start immediately, but rather get worse over time; the rate is
|
||||
glass_name = "glass of RR coffee liquor"
|
||||
glass_desc = "DAMN, THIS THING LOOKS ROBUST!"
|
||||
shot_glass_icon_state = "shotglasscream"
|
||||
pH = 6
|
||||
|
||||
|
||||
/datum/reagent/consumable/ethanol/kahlua/on_mob_life(mob/living/carbon/M)
|
||||
M.dizziness = max(0,M.dizziness-5)
|
||||
@@ -145,6 +152,7 @@ All effects don't start immediately, but rather get worse over time; the rate is
|
||||
glass_name = "glass of whiskey"
|
||||
glass_desc = "The silky, smokey whiskey goodness inside the glass makes the drink look very classy."
|
||||
shot_glass_icon_state = "shotglassbrown"
|
||||
pH = 4.5
|
||||
|
||||
/datum/reagent/consumable/ethanol/thirteenloko
|
||||
name = "Thirteen Loko"
|
||||
@@ -161,6 +169,7 @@ All effects don't start immediately, but rather get worse over time; the rate is
|
||||
glass_name = "glass of Thirteen Loko"
|
||||
glass_desc = "This is a glass of Thirteen Loko, it appears to be of the highest quality. The drink, not the glass."
|
||||
|
||||
|
||||
/datum/reagent/consumable/ethanol/thirteenloko/on_mob_life(mob/living/carbon/M)
|
||||
M.drowsyness = max(0,M.drowsyness-7)
|
||||
M.AdjustSleeping(-40)
|
||||
@@ -221,6 +230,7 @@ All effects don't start immediately, but rather get worse over time; the rate is
|
||||
glass_name = "glass of vodka"
|
||||
glass_desc = "The glass contain wodka. Xynta."
|
||||
shot_glass_icon_state = "shotglassclear"
|
||||
pH = 8.1
|
||||
|
||||
/datum/reagent/consumable/ethanol/vodka/on_mob_life(mob/living/carbon/M)
|
||||
M.radiation = max(M.radiation-2,0)
|
||||
@@ -255,6 +265,7 @@ All effects don't start immediately, but rather get worse over time; the rate is
|
||||
glass_icon_state = "threemileislandglass"
|
||||
glass_name = "Three Mile Island Ice Tea"
|
||||
glass_desc = "A glass of this is sure to prevent a meltdown."
|
||||
pH = 3.5
|
||||
|
||||
/datum/reagent/consumable/ethanol/threemileisland/on_mob_life(mob/living/carbon/M)
|
||||
M.set_drugginess(50)
|
||||
@@ -270,6 +281,7 @@ All effects don't start immediately, but rather get worse over time; the rate is
|
||||
glass_icon_state = "ginvodkaglass"
|
||||
glass_name = "glass of gin"
|
||||
glass_desc = "A crystal clear glass of Griffeater gin."
|
||||
pH = 6.9
|
||||
|
||||
/datum/reagent/consumable/ethanol/rum
|
||||
name = "Rum"
|
||||
@@ -282,6 +294,7 @@ All effects don't start immediately, but rather get worse over time; the rate is
|
||||
glass_name = "glass of rum"
|
||||
glass_desc = "Now you want to Pray for a pirate suit, don't you?"
|
||||
shot_glass_icon_state = "shotglassbrown"
|
||||
pH = 6.5
|
||||
|
||||
/datum/reagent/consumable/ethanol/tequila
|
||||
name = "Tequila"
|
||||
@@ -294,6 +307,7 @@ All effects don't start immediately, but rather get worse over time; the rate is
|
||||
glass_name = "glass of tequila"
|
||||
glass_desc = "Now all that's missing is the weird colored shades!"
|
||||
shot_glass_icon_state = "shotglassgold"
|
||||
pH = 4
|
||||
|
||||
/datum/reagent/consumable/ethanol/vermouth
|
||||
name = "Vermouth"
|
||||
@@ -306,6 +320,7 @@ All effects don't start immediately, but rather get worse over time; the rate is
|
||||
glass_name = "glass of vermouth"
|
||||
glass_desc = "You wonder why you're even drinking this straight."
|
||||
shot_glass_icon_state = "shotglassclear"
|
||||
pH = 3.25
|
||||
|
||||
/datum/reagent/consumable/ethanol/wine
|
||||
name = "Wine"
|
||||
@@ -318,6 +333,7 @@ All effects don't start immediately, but rather get worse over time; the rate is
|
||||
glass_name = "glass of wine"
|
||||
glass_desc = "A very classy looking drink."
|
||||
shot_glass_icon_state = "shotglassred"
|
||||
pH = 3.45
|
||||
|
||||
/datum/reagent/consumable/ethanol/lizardwine
|
||||
name = "Lizard wine"
|
||||
@@ -327,6 +343,7 @@ All effects don't start immediately, but rather get worse over time; the rate is
|
||||
boozepwr = 45
|
||||
quality = DRINK_FANTASTIC
|
||||
taste_description = "scaley sweetness"
|
||||
pH = 3
|
||||
|
||||
/datum/reagent/consumable/ethanol/grappa
|
||||
name = "Grappa"
|
||||
@@ -338,6 +355,7 @@ All effects don't start immediately, but rather get worse over time; the rate is
|
||||
glass_icon_state = "grappa"
|
||||
glass_name = "glass of grappa"
|
||||
glass_desc = "A fine drink originally made to prevent waste by using the leftovers from winemaking."
|
||||
pH = 3.5
|
||||
|
||||
/datum/reagent/consumable/ethanol/cognac
|
||||
name = "Cognac"
|
||||
@@ -350,6 +368,7 @@ All effects don't start immediately, but rather get worse over time; the rate is
|
||||
glass_name = "glass of cognac"
|
||||
glass_desc = "Damn, you feel like some kind of French aristocrat just by holding this."
|
||||
shot_glass_icon_state = "shotglassbrown"
|
||||
pH = 3.5
|
||||
|
||||
/datum/reagent/consumable/ethanol/absinthe
|
||||
name = "Absinthe"
|
||||
@@ -395,6 +414,7 @@ All effects don't start immediately, but rather get worse over time; the rate is
|
||||
glass_icon_state = "aleglass"
|
||||
glass_name = "glass of ale"
|
||||
glass_desc = "A freezing pint of delicious Ale."
|
||||
pH = 4.5
|
||||
|
||||
/datum/reagent/consumable/ethanol/goldschlager
|
||||
name = "Goldschlager"
|
||||
@@ -421,6 +441,7 @@ All effects don't start immediately, but rather get worse over time; the rate is
|
||||
glass_name = "glass of patron"
|
||||
glass_desc = "Drinking patron in the bar, with all the subpar ladies."
|
||||
shot_glass_icon_state = "shotglassclear"
|
||||
pH = 4.5
|
||||
|
||||
/datum/reagent/consumable/ethanol/gintonic
|
||||
name = "Gin and Tonic"
|
||||
@@ -433,6 +454,7 @@ All effects don't start immediately, but rather get worse over time; the rate is
|
||||
glass_icon_state = "gintonicglass"
|
||||
glass_name = "Gin and Tonic"
|
||||
glass_desc = "A mild but still great cocktail. Drink up, like a true Englishman."
|
||||
pH = 3
|
||||
|
||||
/datum/reagent/consumable/ethanol/rum_coke
|
||||
name = "Rum and Coke"
|
||||
@@ -445,6 +467,7 @@ All effects don't start immediately, but rather get worse over time; the rate is
|
||||
glass_icon_state = "whiskeycolaglass"
|
||||
glass_name = "Rum and Coke"
|
||||
glass_desc = "The classic go-to of space-fratboys."
|
||||
pH = 4
|
||||
|
||||
/datum/reagent/consumable/ethanol/cuba_libre
|
||||
name = "Cuba Libre"
|
||||
@@ -458,6 +481,7 @@ All effects don't start immediately, but rather get worse over time; the rate is
|
||||
glass_name = "Cuba Libre"
|
||||
glass_desc = "A classic mix of rum, cola, and lime. A favorite of revolutionaries everywhere!"
|
||||
|
||||
|
||||
/datum/reagent/consumable/ethanol/cuba_libre/on_mob_life(mob/living/carbon/M)
|
||||
if(M.mind && M.mind.has_antag_datum(/datum/antagonist/rev)) //Cuba Libre, the traditional drink of revolutions! Heals revolutionaries.
|
||||
M.adjustBruteLoss(-1, 0)
|
||||
@@ -504,6 +528,7 @@ All effects don't start immediately, but rather get worse over time; the rate is
|
||||
glass_name = "Vodka martini"
|
||||
glass_desc ="A bastardisation of the classic martini. Still great."
|
||||
|
||||
|
||||
/datum/reagent/consumable/ethanol/white_russian
|
||||
name = "White Russian"
|
||||
id = "whiterussian"
|
||||
@@ -557,8 +582,8 @@ All effects don't start immediately, but rather get worse over time; the rate is
|
||||
glass_desc = "Tomato juice, mixed with Vodka and a lil' bit of lime. Tastes like liquid murder."
|
||||
|
||||
/datum/reagent/consumable/ethanol/bloody_mary/on_mob_life(mob/living/carbon/C)
|
||||
if(C.blood_volume < BLOOD_VOLUME_NORMAL)
|
||||
C.blood_volume = min(BLOOD_VOLUME_NORMAL, C.blood_volume + 3) //Bloody Mary quickly restores blood loss.
|
||||
if(C.blood_volume < (BLOOD_VOLUME_NORMAL*C.blood_ratio))
|
||||
C.blood_volume = min((BLOOD_VOLUME_NORMAL*C.blood_ratio), C.blood_volume + 3) //Bloody Mary quickly restores blood loss.
|
||||
..()
|
||||
|
||||
/datum/reagent/consumable/ethanol/brave_bull
|
||||
@@ -643,6 +668,7 @@ All effects don't start immediately, but rather get worse over time; the rate is
|
||||
glass_icon_state = "beepskysmashglass"
|
||||
glass_name = "Beepsky Smash"
|
||||
glass_desc = "Heavy, hot and strong. Just like the Iron fist of the LAW."
|
||||
pH = 2
|
||||
overdose_threshold = 40
|
||||
var/datum/brain_trauma/special/beepsky/B
|
||||
|
||||
@@ -1578,6 +1604,7 @@ All effects don't start immediately, but rather get worse over time; the rate is
|
||||
glass_name = "Bastion Bourbon"
|
||||
glass_desc = "If you're feeling low, count on the buttery flavor of our own bastion bourbon."
|
||||
shot_glass_icon_state = "shotglassgreen"
|
||||
pH = 4
|
||||
|
||||
/datum/reagent/consumable/ethanol/bastion_bourbon/on_mob_metabolize(mob/living/L)
|
||||
var/heal_points = 10
|
||||
@@ -2076,7 +2103,7 @@ All effects don't start immediately, but rather get worse over time; the rate is
|
||||
/datum/reagent/consumable/ethanol/blazaam/on_mob_life(mob/living/carbon/M)
|
||||
if(M.drunkenness > 40)
|
||||
if(stored_teleports)
|
||||
do_teleport(M, get_turf(M), rand(1,3))
|
||||
do_teleport(M, get_turf(M), rand(1,3), channel = TELEPORT_CHANNEL_WORMHOLE)
|
||||
stored_teleports--
|
||||
if(prob(10))
|
||||
stored_teleports += rand(2,6)
|
||||
@@ -2106,6 +2133,7 @@ All effects don't start immediately, but rather get worse over time; the rate is
|
||||
can_synth = FALSE
|
||||
var/list/names = list("null fruit" = 1) //Names of the fruits used. Associative list where name is key, value is the percentage of that fruit.
|
||||
var/list/tastes = list("bad coding" = 1) //List of tastes. See above.
|
||||
pH = 4
|
||||
|
||||
/datum/reagent/consumable/ethanol/fruit_wine/on_new(list/data)
|
||||
names = data["names"]
|
||||
|
||||
@@ -168,6 +168,7 @@
|
||||
|
||||
/datum/reagent/consumable/laughter/on_mob_life(mob/living/carbon/M)
|
||||
M.emote("laugh")
|
||||
SEND_SIGNAL(M, COMSIG_ADD_MOOD_EVENT, "chemical_laughter", /datum/mood_event/chemical_laughter)
|
||||
..()
|
||||
|
||||
/datum/reagent/consumable/superlaughter
|
||||
@@ -182,6 +183,7 @@
|
||||
if(prob(30))
|
||||
M.visible_message("<span class='danger'>[M] bursts out into a fit of uncontrollable laughter!</span>", "<span class='userdanger'>You burst out in a fit of uncontrollable laughter!</span>")
|
||||
M.Stun(5)
|
||||
SEND_SIGNAL(M, COMSIG_ADD_MOOD_EVENT, "chemical_laughter", /datum/mood_event/chemical_superlaughter)
|
||||
..()
|
||||
|
||||
/datum/reagent/consumable/potato_juice
|
||||
|
||||
@@ -15,6 +15,7 @@
|
||||
description = "An illegal chemical compound used as drug."
|
||||
color = "#60A584" // rgb: 96, 165, 132
|
||||
overdose_threshold = 30
|
||||
pH = 9
|
||||
|
||||
/datum/reagent/drug/space_drugs/on_mob_life(mob/living/carbon/M)
|
||||
M.set_drugginess(15)
|
||||
@@ -44,6 +45,7 @@
|
||||
addiction_threshold = 30
|
||||
taste_description = "smoke"
|
||||
trippy = FALSE
|
||||
pH = 8
|
||||
|
||||
/datum/reagent/drug/nicotine/on_mob_life(mob/living/carbon/M)
|
||||
if(prob(1))
|
||||
@@ -65,6 +67,7 @@
|
||||
color = "#FA00C8"
|
||||
overdose_threshold = 20
|
||||
addiction_threshold = 10
|
||||
pH = 10
|
||||
|
||||
/datum/reagent/drug/crank/on_mob_life(mob/living/carbon/M)
|
||||
if(prob(5))
|
||||
@@ -112,6 +115,7 @@
|
||||
color = "#0064B4"
|
||||
overdose_threshold = 20
|
||||
addiction_threshold = 15
|
||||
pH = 9
|
||||
|
||||
|
||||
/datum/reagent/drug/krokodil/on_mob_life(mob/living/carbon/M)
|
||||
@@ -167,6 +171,7 @@
|
||||
var/brain_damage = TRUE
|
||||
var/jitter = TRUE
|
||||
var/confusion = TRUE
|
||||
pH = 5
|
||||
|
||||
/datum/reagent/drug/methamphetamine/on_mob_metabolize(mob/living/L)
|
||||
..()
|
||||
@@ -261,6 +266,7 @@
|
||||
addiction_threshold = 10
|
||||
taste_description = "salt" // because they're bathsalts?
|
||||
var/datum/brain_trauma/special/psychotic_brawling/bath_salts/rage
|
||||
pH = 8.2
|
||||
|
||||
/datum/reagent/drug/bath_salts/on_mob_metabolize(mob/living/L)
|
||||
..()
|
||||
@@ -357,6 +363,7 @@
|
||||
description = "Amps you up and gets you going, fixes all stamina damage you might have but can cause toxin and oxygen damage."
|
||||
reagent_state = LIQUID
|
||||
color = "#78FFF0"
|
||||
pH = 9.2
|
||||
|
||||
/datum/reagent/drug/aranesp/on_mob_life(mob/living/carbon/M)
|
||||
var/high_message = pick("You feel amped up.", "You feel ready.", "You feel like you can push it to the limit.")
|
||||
@@ -370,6 +377,84 @@
|
||||
..()
|
||||
. = 1
|
||||
|
||||
/datum/reagent/drug/happiness
|
||||
name = "Happiness"
|
||||
id = "happiness"
|
||||
description = "Fills you with ecstasic numbness and causes minor brain damage. Highly addictive. If overdosed causes sudden mood swings."
|
||||
reagent_state = LIQUID
|
||||
color = "#FFF378"
|
||||
addiction_threshold = 10
|
||||
overdose_threshold = 20
|
||||
pH = 10.5
|
||||
|
||||
/datum/reagent/drug/happiness/on_mob_add(mob/living/L)
|
||||
..()
|
||||
ADD_TRAIT(L, TRAIT_FEARLESS, id)
|
||||
SEND_SIGNAL(L, COMSIG_ADD_MOOD_EVENT, "happiness_drug", /datum/mood_event/happiness_drug)
|
||||
|
||||
/datum/reagent/drug/happiness/on_mob_delete(mob/living/L)
|
||||
REMOVE_TRAIT(L, TRAIT_FEARLESS, id)
|
||||
SEND_SIGNAL(L, COMSIG_CLEAR_MOOD_EVENT, "happiness_drug")
|
||||
..()
|
||||
|
||||
/datum/reagent/drug/happiness/on_mob_life(mob/living/carbon/M)
|
||||
M.jitteriness = 0
|
||||
M.confused = 0
|
||||
M.disgust = 0
|
||||
M.adjustBrainLoss(0.2)
|
||||
..()
|
||||
. = 1
|
||||
|
||||
/datum/reagent/drug/happiness/overdose_process(mob/living/M)
|
||||
if(prob(30))
|
||||
var/reaction = rand(1,3)
|
||||
switch(reaction)
|
||||
if(1)
|
||||
M.emote("laugh")
|
||||
SEND_SIGNAL(M, COMSIG_ADD_MOOD_EVENT, "happiness_drug", /datum/mood_event/happiness_drug_good_od)
|
||||
if(2)
|
||||
M.emote("sway")
|
||||
M.Dizzy(25)
|
||||
if(3)
|
||||
M.emote("frown")
|
||||
SEND_SIGNAL(M, COMSIG_ADD_MOOD_EVENT, "happiness_drug", /datum/mood_event/happiness_drug_bad_od)
|
||||
M.adjustBrainLoss(0.5)
|
||||
..()
|
||||
. = 1
|
||||
|
||||
/datum/reagent/drug/happiness/addiction_act_stage1(mob/living/M)// all work and no play makes jack a dull boy
|
||||
GET_COMPONENT_FROM(mood, /datum/component/mood, M)
|
||||
mood.setSanity(min(mood.sanity, SANITY_DISTURBED))
|
||||
M.Jitter(5)
|
||||
if(prob(20))
|
||||
M.emote(pick("twitch","laugh","frown"))
|
||||
..()
|
||||
|
||||
/datum/reagent/drug/happiness/addiction_act_stage2(mob/living/M)
|
||||
GET_COMPONENT_FROM(mood, /datum/component/mood, M)
|
||||
mood.setSanity(min(mood.sanity, SANITY_UNSTABLE))
|
||||
M.Jitter(10)
|
||||
if(prob(30))
|
||||
M.emote(pick("twitch","laugh","frown"))
|
||||
..()
|
||||
|
||||
/datum/reagent/drug/happiness/addiction_act_stage3(mob/living/M)
|
||||
GET_COMPONENT_FROM(mood, /datum/component/mood, M)
|
||||
mood.setSanity(min(mood.sanity, SANITY_CRAZY))
|
||||
M.Jitter(15)
|
||||
if(prob(40))
|
||||
M.emote(pick("twitch","laugh","frown"))
|
||||
..()
|
||||
|
||||
/datum/reagent/drug/happiness/addiction_act_stage4(mob/living/carbon/human/M)
|
||||
GET_COMPONENT_FROM(mood, /datum/component/mood, M)
|
||||
mood.setSanity(SANITY_INSANE)
|
||||
M.Jitter(20)
|
||||
if(prob(50))
|
||||
M.emote(pick("twitch","laugh","frown"))
|
||||
..()
|
||||
. = 1
|
||||
|
||||
/datum/reagent/drug/skooma
|
||||
name = "Skooma"
|
||||
id = "skooma"
|
||||
@@ -380,6 +465,7 @@
|
||||
addiction_threshold = 1
|
||||
addiction_stage3_end = 40
|
||||
addiction_stage4_end = 240
|
||||
pH = 12.5
|
||||
|
||||
/datum/reagent/drug/skooma/on_mob_metabolize(mob/living/L)
|
||||
. = ..()
|
||||
@@ -440,4 +526,3 @@
|
||||
if(prob(40))
|
||||
M.emote(pick("twitch","drool","moan"))
|
||||
..()
|
||||
|
||||
|
||||
@@ -230,6 +230,7 @@
|
||||
description = "A special oil that noticably chills the body. Extracted from Icepeppers and slimes."
|
||||
color = "#8BA6E9" // rgb: 139, 166, 233
|
||||
taste_description = "mint"
|
||||
pH = 13 //HMM! I wonder
|
||||
|
||||
/datum/reagent/consumable/frostoil/on_mob_life(mob/living/carbon/M)
|
||||
var/cooling = 0
|
||||
@@ -275,6 +276,7 @@
|
||||
description = "A chemical agent used for self-defense and in police work."
|
||||
color = "#B31008" // rgb: 179, 16, 8
|
||||
taste_description = "scorching agony"
|
||||
pH = 7.4
|
||||
|
||||
/datum/reagent/consumable/condensedcapsaicin/reaction_mob(mob/living/M, method=TOUCH, reac_volume)
|
||||
if(!ishuman(M) && !ismonkey(M))
|
||||
@@ -321,7 +323,7 @@
|
||||
victim.blind_eyes(2)
|
||||
victim.confused = max(M.confused, 3)
|
||||
victim.damageoverlaytemp = 60
|
||||
victim.Knockdown(60, override_stamdmg = min(reac_volume * 3, 15))
|
||||
victim.Knockdown(80, override_hardstun = 0.1, override_stamdmg = min(reac_volume * 3, 15))
|
||||
return
|
||||
else if ( eyes_covered ) // Eye cover is better than mouth cover
|
||||
victim.blur_eyes(3)
|
||||
@@ -334,7 +336,7 @@
|
||||
victim.blind_eyes(3)
|
||||
victim.confused = max(M.confused, 6)
|
||||
victim.damageoverlaytemp = 75
|
||||
victim.Knockdown(100, override_stamdmg = min(reac_volume * 5, 25))
|
||||
victim.Knockdown(80, override_hardstun = 0.1, override_stamdmg = min(reac_volume * 5, 25))
|
||||
victim.update_damage_hud()
|
||||
|
||||
/datum/reagent/consumable/condensedcapsaicin/on_mob_life(mob/living/carbon/M)
|
||||
@@ -402,6 +404,7 @@
|
||||
color = "#E700E7" // rgb: 231, 0, 231
|
||||
metabolization_rate = 0.2 * REAGENTS_METABOLISM
|
||||
taste_description = "mushroom"
|
||||
pH = 11
|
||||
|
||||
/datum/reagent/drug/mushroomhallucinogen/on_mob_life(mob/living/carbon/M)
|
||||
M.slurring = max(M.slurring,50)
|
||||
@@ -618,6 +621,7 @@
|
||||
description = "A blinding substance extracted from certain onions."
|
||||
color = "#c0c9a0"
|
||||
taste_description = "bitterness"
|
||||
pH = 5
|
||||
|
||||
/datum/reagent/consumable/tearjuice/reaction_mob(mob/living/M, method=TOUCH, reac_volume)
|
||||
if(!istype(M))
|
||||
@@ -672,6 +676,7 @@
|
||||
description = "An ichor, derived from a certain mushroom, makes for a bad time."
|
||||
color = "#1d043d"
|
||||
taste_description = "bitter mushroom"
|
||||
pH = 12
|
||||
|
||||
/datum/reagent/consumable/entpoly/on_mob_life(mob/living/carbon/M)
|
||||
if(current_cycle >= 10)
|
||||
@@ -692,6 +697,7 @@
|
||||
description = "A stimulating ichor which causes luminescent fungi to grow on the skin. "
|
||||
color = "#b5a213"
|
||||
taste_description = "tingling mushroom"
|
||||
pH = 11.2
|
||||
|
||||
/datum/reagent/consumable/tinlux/reaction_mob(mob/living/M)
|
||||
M.set_light(2)
|
||||
@@ -706,6 +712,7 @@
|
||||
color = "#d3a308"
|
||||
nutriment_factor = 3 * REAGENTS_METABOLISM
|
||||
taste_description = "fruity mushroom"
|
||||
pH = 10.4
|
||||
|
||||
/datum/reagent/consumable/vitfro/on_mob_life(mob/living/carbon/M)
|
||||
if(prob(80))
|
||||
@@ -721,6 +728,7 @@
|
||||
nutriment_factor = 5 * REAGENTS_METABOLISM
|
||||
color = "#eef442" // rgb: 238, 244, 66
|
||||
taste_description = "mournful honking"
|
||||
pH = 9.2
|
||||
|
||||
/datum/reagent/consumable/astrotame
|
||||
name = "Astrotame"
|
||||
@@ -750,3 +758,4 @@
|
||||
quality = FOOD_AMAZING
|
||||
taste_mult = 100
|
||||
can_synth = FALSE
|
||||
pH = 6.1
|
||||
|
||||
@@ -18,6 +18,7 @@
|
||||
name = "Leporazine"
|
||||
id = "leporazine"
|
||||
description = "Leporazine will effectively regulate a patient's body temperature, ensuring it never leaves safe levels."
|
||||
pH = 8.4
|
||||
color = "#82b8aa"
|
||||
|
||||
/datum/reagent/medicine/leporazine/on_mob_life(mob/living/carbon/M)
|
||||
@@ -60,6 +61,9 @@
|
||||
M.SetSleeping(0, 0)
|
||||
M.jitteriness = 0
|
||||
M.cure_all_traumas(TRAUMA_RESILIENCE_MAGIC)
|
||||
if(M.blood_volume < (BLOOD_VOLUME_NORMAL*M.blood_ratio))
|
||||
M.blood_volume = (BLOOD_VOLUME_NORMAL*M.blood_ratio)
|
||||
|
||||
for(var/thing in M.diseases)
|
||||
var/datum/disease/D = thing
|
||||
if(D.severity == DISEASE_SEVERITY_POSITIVE)
|
||||
@@ -79,6 +83,7 @@
|
||||
id = "synaptizine"
|
||||
description = "Increases resistance to stuns as well as reducing drowsiness and hallucinations."
|
||||
color = "#FF00FF"
|
||||
pH = 4
|
||||
|
||||
/datum/reagent/medicine/synaptizine/on_mob_life(mob/living/carbon/M)
|
||||
M.drowsyness = max(M.drowsyness-5, 0)
|
||||
@@ -98,6 +103,7 @@
|
||||
id = "synaphydramine"
|
||||
description = "Reduces drowsiness, hallucinations, and Histamine from body."
|
||||
color = "#EC536D" // rgb: 236, 83, 109
|
||||
pH = 5.2
|
||||
|
||||
/datum/reagent/medicine/synaphydramine/on_mob_life(mob/living/carbon/M)
|
||||
M.drowsyness = max(M.drowsyness-5, 0)
|
||||
@@ -116,6 +122,7 @@
|
||||
id = "inacusiate"
|
||||
description = "Instantly restores all hearing to the patient, but does not cure deafness."
|
||||
color = "#6600FF" // rgb: 100, 165, 255
|
||||
pH = 2
|
||||
|
||||
/datum/reagent/medicine/inacusiate/on_mob_life(mob/living/carbon/M)
|
||||
M.restoreEars()
|
||||
@@ -127,6 +134,7 @@
|
||||
description = "A chemical mixture with almost magical healing powers. Its main limitation is that the patient's body temperature must be under 270K for it to metabolise correctly."
|
||||
color = "#0000C8"
|
||||
taste_description = "sludge"
|
||||
pH = 11
|
||||
|
||||
/datum/reagent/medicine/cryoxadone/on_mob_life(mob/living/carbon/M)
|
||||
var/power = -0.00003 * (M.bodytemperature ** 2) + 3
|
||||
@@ -148,6 +156,7 @@
|
||||
color = "#0000C8"
|
||||
taste_description = "muscle"
|
||||
metabolization_rate = 1.5 * REAGENTS_METABOLISM
|
||||
pH = 13
|
||||
|
||||
/datum/reagent/medicine/clonexadone/on_mob_life(mob/living/carbon/M)
|
||||
if(M.bodytemperature < T0C)
|
||||
@@ -163,6 +172,7 @@
|
||||
description = "A mixture of cryoxadone and slime jelly, that apparently inverses the requirement for its activation."
|
||||
color = "#f7832a"
|
||||
taste_description = "spicy jelly"
|
||||
pH = 12
|
||||
|
||||
/datum/reagent/medicine/pyroxadone/on_mob_life(mob/living/carbon/M)
|
||||
if(M.bodytemperature > BODYTEMP_HEAT_DAMAGE_LIMIT)
|
||||
@@ -194,6 +204,7 @@
|
||||
color = "#669900" // rgb: 102, 153, 0
|
||||
overdose_threshold = 30
|
||||
taste_description = "fish"
|
||||
pH = 12.2
|
||||
|
||||
/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.
|
||||
@@ -215,6 +226,7 @@
|
||||
description = "Spaceacillin will prevent a patient from conventionally spreading any diseases they are currently infected with."
|
||||
color = "#f2f2f2"
|
||||
metabolization_rate = 0.1 * REAGENTS_METABOLISM
|
||||
pH = 8.1
|
||||
|
||||
//Goon Chems. Ported mainly from Goonstation. Easily mixable (or not so easily) and provide a variety of effects.
|
||||
/datum/reagent/medicine/silver_sulfadiazine
|
||||
@@ -222,6 +234,7 @@
|
||||
id = "silver_sulfadiazine"
|
||||
description = "If used in touch-based applications, immediately restores burn wounds as well as restoring more over time. If ingested through other means, deals minor toxin damage."
|
||||
reagent_state = LIQUID
|
||||
pH = 7.2
|
||||
color = "#ffeac9"
|
||||
|
||||
/datum/reagent/medicine/silver_sulfadiazine/reaction_mob(mob/living/M, method=TOUCH, reac_volume, show_message = 1)
|
||||
@@ -235,6 +248,7 @@
|
||||
if(show_message)
|
||||
to_chat(M, "<span class='danger'>You feel your burns healing! It stings like hell!</span>")
|
||||
M.emote("scream")
|
||||
SEND_SIGNAL(M, COMSIG_ADD_MOOD_EVENT, "painful_medicine", /datum/mood_event/painful_medicine)
|
||||
..()
|
||||
|
||||
/datum/reagent/medicine/silver_sulfadiazine/on_mob_life(mob/living/carbon/M)
|
||||
@@ -250,6 +264,7 @@
|
||||
color = "#f7ffa5"
|
||||
metabolization_rate = 0.5 * REAGENTS_METABOLISM
|
||||
overdose_threshold = 25
|
||||
pH = 10.7
|
||||
|
||||
/datum/reagent/medicine/oxandrolone/on_mob_life(mob/living/carbon/M)
|
||||
if(M.getFireLoss() > 50)
|
||||
@@ -271,6 +286,7 @@
|
||||
description = "If used in touch-based applications, immediately restores bruising as well as restoring more over time. If ingested through other means, deals minor toxin damage."
|
||||
reagent_state = LIQUID
|
||||
color = "#FF9696"
|
||||
pH = 6.7
|
||||
|
||||
/datum/reagent/medicine/styptic_powder/reaction_mob(mob/living/M, method=TOUCH, reac_volume, show_message = 1)
|
||||
if(iscarbon(M) && M.stat != DEAD)
|
||||
@@ -283,6 +299,7 @@
|
||||
if(show_message)
|
||||
to_chat(M, "<span class='danger'>You feel your bruises healing! It stings like hell!</span>")
|
||||
M.emote("scream")
|
||||
SEND_SIGNAL(M, COMSIG_ADD_MOOD_EVENT, "painful_medicine", /datum/mood_event/painful_medicine)
|
||||
..()
|
||||
|
||||
|
||||
@@ -302,6 +319,7 @@
|
||||
taste_description = "sweetness and salt"
|
||||
var/last_added = 0
|
||||
var/maximum_reachable = BLOOD_VOLUME_NORMAL - 10 //So that normal blood regeneration can continue with salglu active
|
||||
pH = 5.5
|
||||
|
||||
/datum/reagent/medicine/salglu_solution/on_mob_life(mob/living/carbon/M)
|
||||
if(last_added)
|
||||
@@ -340,6 +358,7 @@
|
||||
reagent_state = LIQUID
|
||||
color = "#6D6374"
|
||||
metabolization_rate = 0.4 * REAGENTS_METABOLISM
|
||||
pH = 2.6
|
||||
|
||||
/datum/reagent/medicine/mine_salve/on_mob_life(mob/living/carbon/C)
|
||||
C.hal_screwyhud = SCREWYHUD_HEALTHY
|
||||
@@ -378,6 +397,7 @@
|
||||
description = "Has a 100% chance of instantly healing brute and burn damage. One unit of the chemical will heal one point of damage. Touch application only."
|
||||
reagent_state = LIQUID
|
||||
color = "#FFEBEB"
|
||||
pH = 11.5
|
||||
|
||||
/datum/reagent/medicine/synthflesh/reaction_mob(mob/living/M, method=TOUCH, reac_volume,show_message = 1)
|
||||
if(iscarbon(M))
|
||||
@@ -388,6 +408,7 @@
|
||||
M.adjustFireLoss(-1.25 * reac_volume)
|
||||
if(show_message)
|
||||
to_chat(M, "<span class='danger'>You feel your burns and bruises healing! It stings like hell!</span>")
|
||||
SEND_SIGNAL(M, COMSIG_ADD_MOOD_EVENT, "painful_medicine", /datum/mood_event/painful_medicine)
|
||||
..()
|
||||
|
||||
/datum/reagent/medicine/charcoal
|
||||
@@ -398,6 +419,7 @@
|
||||
color = "#000000"
|
||||
metabolization_rate = 0.5 * REAGENTS_METABOLISM
|
||||
taste_description = "ash"
|
||||
pH = 5
|
||||
|
||||
/datum/reagent/medicine/charcoal/on_mob_life(mob/living/carbon/M)
|
||||
M.adjustToxLoss(-2*REM, 0)
|
||||
@@ -415,6 +437,7 @@
|
||||
color = "#DCDCDC"
|
||||
metabolization_rate = 0.25 * REAGENTS_METABOLISM
|
||||
overdose_threshold = 30
|
||||
pH = 2
|
||||
|
||||
/datum/reagent/medicine/omnizine/on_mob_life(mob/living/carbon/M)
|
||||
M.adjustToxLoss(-0.5*REM, 0)
|
||||
@@ -440,6 +463,7 @@
|
||||
color = "#19C832"
|
||||
metabolization_rate = 0.5 * REAGENTS_METABOLISM
|
||||
taste_description = "acid"
|
||||
pH = 1.5
|
||||
|
||||
/datum/reagent/medicine/calomel/on_mob_life(mob/living/carbon/M)
|
||||
for(var/datum/reagent/R in M.reagents.reagent_list)
|
||||
@@ -457,6 +481,7 @@
|
||||
reagent_state = LIQUID
|
||||
color = "#14FF3C"
|
||||
metabolization_rate = 2 * REAGENTS_METABOLISM
|
||||
pH = 12 //It's a reducing agent
|
||||
|
||||
/datum/reagent/medicine/potass_iodide/on_mob_life(mob/living/carbon/M)
|
||||
if(M.radiation > 0)
|
||||
@@ -470,6 +495,7 @@
|
||||
reagent_state = LIQUID
|
||||
color = "#003153" // RGB 0, 49, 83
|
||||
metabolization_rate = 0.5 * REAGENTS_METABOLISM
|
||||
pH = 8.9
|
||||
|
||||
/datum/reagent/medicine/prussian_blue/on_mob_life(mob/living/carbon/M)
|
||||
if(M.radiation > 0)
|
||||
@@ -483,6 +509,7 @@
|
||||
reagent_state = LIQUID
|
||||
color = "#E6FFF0"
|
||||
metabolization_rate = 0.5 * REAGENTS_METABOLISM
|
||||
pH = 1 //One of the best buffers, NEVERMIND!
|
||||
var/healtoxinlover = FALSE
|
||||
|
||||
/datum/reagent/medicine/pen_acid/on_mob_life(mob/living/carbon/M)
|
||||
@@ -500,6 +527,7 @@
|
||||
description = "Reduces massive amounts of radiation and toxin damage while purging other chemicals from the body. Slimepeople friendly!"
|
||||
color = "#91D865"
|
||||
healtoxinlover = TRUE
|
||||
pH = 12//invert
|
||||
|
||||
/datum/reagent/medicine/sal_acid
|
||||
name = "Salicyclic Acid"
|
||||
@@ -509,6 +537,7 @@
|
||||
color = "#D2D2D2"
|
||||
metabolization_rate = 0.5 * REAGENTS_METABOLISM
|
||||
overdose_threshold = 25
|
||||
pH = 2.1
|
||||
|
||||
|
||||
/datum/reagent/medicine/sal_acid/on_mob_life(mob/living/carbon/M)
|
||||
@@ -532,6 +561,7 @@
|
||||
reagent_state = LIQUID
|
||||
color = "#00FFFF"
|
||||
metabolization_rate = 0.25 * REAGENTS_METABOLISM
|
||||
pH = 2
|
||||
|
||||
/datum/reagent/medicine/salbutamol/on_mob_life(mob/living/carbon/M)
|
||||
M.adjustOxyLoss(-3*REM, 0)
|
||||
@@ -547,6 +577,7 @@
|
||||
reagent_state = LIQUID
|
||||
color = "#FF6464"
|
||||
metabolization_rate = 0.25 * REAGENTS_METABOLISM
|
||||
pH = 11
|
||||
|
||||
/datum/reagent/medicine/perfluorodecalin/on_mob_life(mob/living/carbon/human/M)
|
||||
M.adjustOxyLoss(-12*REM, 0)
|
||||
@@ -566,6 +597,7 @@
|
||||
metabolization_rate = 0.5 * REAGENTS_METABOLISM
|
||||
overdose_threshold = 45
|
||||
addiction_threshold = 30
|
||||
pH = 12
|
||||
|
||||
/datum/reagent/medicine/ephedrine/on_mob_life(mob/living/carbon/M)
|
||||
M.AdjustStun(-20, 0)
|
||||
@@ -620,6 +652,7 @@
|
||||
reagent_state = LIQUID
|
||||
color = "#64FFE6"
|
||||
metabolization_rate = 0.5 * REAGENTS_METABOLISM
|
||||
pH = 11.5
|
||||
|
||||
/datum/reagent/medicine/diphenhydramine/on_mob_life(mob/living/carbon/M)
|
||||
if(prob(10))
|
||||
@@ -637,6 +670,7 @@
|
||||
metabolization_rate = 0.5 * REAGENTS_METABOLISM
|
||||
overdose_threshold = 30
|
||||
addiction_threshold = 25
|
||||
pH = 8.96
|
||||
|
||||
/datum/reagent/medicine/morphine/on_mob_metabolize(mob/living/L)
|
||||
..()
|
||||
@@ -705,6 +739,7 @@
|
||||
color = "#FFFFFF"
|
||||
metabolization_rate = 0.25 * REAGENTS_METABOLISM
|
||||
taste_description = "dull toxin"
|
||||
pH = 10
|
||||
|
||||
/datum/reagent/medicine/oculine/on_mob_life(mob/living/carbon/M)
|
||||
var/obj/item/organ/eyes/eyes = M.getorganslot(ORGAN_SLOT_EYES)
|
||||
@@ -736,6 +771,7 @@
|
||||
color = "#000000"
|
||||
metabolization_rate = 0.25 * REAGENTS_METABOLISM
|
||||
overdose_threshold = 35
|
||||
pH = 12
|
||||
|
||||
/datum/reagent/medicine/atropine/on_mob_life(mob/living/carbon/M)
|
||||
if(M.health < 0)
|
||||
@@ -765,6 +801,7 @@
|
||||
color = "#D2FFFA"
|
||||
metabolization_rate = 0.25 * REAGENTS_METABOLISM
|
||||
overdose_threshold = 30
|
||||
pH = 10.2
|
||||
|
||||
/datum/reagent/medicine/epinephrine/on_mob_life(mob/living/carbon/M)
|
||||
if(M.health < 0)
|
||||
@@ -801,6 +838,7 @@
|
||||
color = "#A0E85E"
|
||||
metabolization_rate = 0.5 * REAGENTS_METABOLISM
|
||||
taste_description = "magnets"
|
||||
pH = 0
|
||||
|
||||
/datum/reagent/medicine/strange_reagent/reaction_mob(mob/living/carbon/human/M, method=TOUCH, reac_volume)
|
||||
if(M.stat == DEAD)
|
||||
@@ -834,6 +872,7 @@
|
||||
id = "mannitol"
|
||||
description = "Efficiently restores brain damage."
|
||||
color = "#DCDCFF"
|
||||
pH = 10.4
|
||||
|
||||
/datum/reagent/medicine/mannitol/on_mob_life(mob/living/carbon/C)
|
||||
C.adjustBrainLoss(-2*REM)
|
||||
@@ -841,12 +880,26 @@
|
||||
C.cure_trauma_type(resilience = TRAUMA_RESILIENCE_BASIC)
|
||||
..()
|
||||
|
||||
/datum/reagent/medicine/neurine
|
||||
name = "Neurine"
|
||||
id = "neurine"
|
||||
description = "Reacts with neural tissue, helping reform damaged connections. Can cure minor traumas."
|
||||
color = "#EEFF8F"
|
||||
|
||||
/datum/reagent/medicine/neurine/on_mob_life(mob/living/carbon/C)
|
||||
if(holder.has_reagent("neurotoxin"))
|
||||
holder.remove_reagent("neurotoxin", 5)
|
||||
if(prob(15))
|
||||
C.cure_trauma_type(resilience = TRAUMA_RESILIENCE_BASIC)
|
||||
..()
|
||||
|
||||
/datum/reagent/medicine/mutadone
|
||||
name = "Mutadone"
|
||||
id = "mutadone"
|
||||
description = "Removes jitteriness and restores genetic defects."
|
||||
color = "#5096C8"
|
||||
taste_description = "acid"
|
||||
pH = 2
|
||||
|
||||
/datum/reagent/medicine/mutadone/on_mob_life(mob/living/carbon/M)
|
||||
M.jitteriness = 0
|
||||
@@ -861,6 +914,7 @@
|
||||
description = "Purges alcoholic substance from the patient's body and eliminates its side effects."
|
||||
color = "#00B4C8"
|
||||
taste_description = "raw egg"
|
||||
pH = 4
|
||||
|
||||
/datum/reagent/medicine/antihol/on_mob_life(mob/living/carbon/M)
|
||||
M.dizziness = 0
|
||||
@@ -882,6 +936,7 @@
|
||||
color = "#78008C"
|
||||
metabolization_rate = 0.5 * REAGENTS_METABOLISM
|
||||
overdose_threshold = 60
|
||||
pH = 8.7
|
||||
|
||||
/datum/reagent/medicine/stimulants/on_mob_metabolize(mob/living/L)
|
||||
..()
|
||||
@@ -919,6 +974,7 @@
|
||||
reagent_state = LIQUID
|
||||
color = "#FFFFF0"
|
||||
metabolization_rate = 0.5 * REAGENTS_METABOLISM
|
||||
pH = 6.7
|
||||
|
||||
/datum/reagent/medicine/insulin/on_mob_life(mob/living/carbon/M)
|
||||
if(M.AdjustSleeping(-20, FALSE))
|
||||
@@ -934,6 +990,7 @@
|
||||
reagent_state = LIQUID
|
||||
color = "#fc2626"
|
||||
overdose_threshold = 30
|
||||
pH = 5
|
||||
|
||||
/datum/reagent/medicine/bicaridine/on_mob_life(mob/living/carbon/M)
|
||||
M.adjustBruteLoss(-2*REM, 0)
|
||||
@@ -952,6 +1009,7 @@
|
||||
reagent_state = LIQUID
|
||||
color = "#13d2f0"
|
||||
overdose_threshold = 30
|
||||
pH = 9.7
|
||||
|
||||
/datum/reagent/medicine/dexalin/on_mob_life(mob/living/carbon/M)
|
||||
M.adjustOxyLoss(-2*REM, 0)
|
||||
@@ -970,6 +1028,7 @@
|
||||
reagent_state = LIQUID
|
||||
color = "#ffc400"
|
||||
overdose_threshold = 30
|
||||
pH = 9
|
||||
|
||||
/datum/reagent/medicine/kelotane/on_mob_life(mob/living/carbon/M)
|
||||
M.adjustFireLoss(-2*REM, 0)
|
||||
@@ -989,6 +1048,7 @@
|
||||
color = "#6aff00"
|
||||
overdose_threshold = 30
|
||||
taste_description = "a roll of gauze"
|
||||
pH = 10
|
||||
|
||||
/datum/reagent/medicine/antitoxin/on_mob_life(mob/living/carbon/M)
|
||||
M.adjustToxLoss(-2*REM, 0)
|
||||
@@ -1007,6 +1067,7 @@
|
||||
id = "inaprovaline"
|
||||
description = "Stabilizes the breathing of patients. Good for those in critical condition."
|
||||
reagent_state = LIQUID
|
||||
pH = 8.5
|
||||
color = "#5dc1f0"
|
||||
|
||||
/datum/reagent/medicine/inaprovaline/on_mob_life(mob/living/carbon/M)
|
||||
@@ -1062,6 +1123,7 @@
|
||||
description = "Miniature medical robots that swiftly restore bodily damage."
|
||||
reagent_state = SOLID
|
||||
color = "#555555"
|
||||
pH = 11
|
||||
|
||||
/datum/reagent/medicine/syndicate_nanites/on_mob_life(mob/living/carbon/M)
|
||||
M.adjustBruteLoss(-5*REM, 0) //A ton of healing - this is a 50 telecrystal investment.
|
||||
@@ -1075,14 +1137,15 @@
|
||||
. = 1
|
||||
|
||||
/datum/reagent/medicine/neo_jelly
|
||||
name = "Neo Jelly"
|
||||
id = "neo_jelly"
|
||||
description = "Gradually regenerates all types of damage, without harming slime anatomy.Can OD"
|
||||
reagent_state = LIQUID
|
||||
metabolization_rate = 1 * REAGENTS_METABOLISM
|
||||
color = "#91D865"
|
||||
overdose_threshold = 30
|
||||
taste_description = "jelly"
|
||||
name = "Neo Jelly"
|
||||
id = "neo_jelly"
|
||||
description = "Gradually regenerates all types of damage, without harming slime anatomy.Can OD"
|
||||
reagent_state = LIQUID
|
||||
metabolization_rate = 1 * REAGENTS_METABOLISM
|
||||
color = "#91D865"
|
||||
overdose_threshold = 30
|
||||
taste_description = "jelly"
|
||||
pH = 11.8
|
||||
|
||||
/datum/reagent/medicine/neo_jelly/on_mob_life(mob/living/carbon/M)
|
||||
M.adjustBruteLoss(-1.5*REM, 0)
|
||||
@@ -1105,6 +1168,7 @@
|
||||
description = "Ichor from an extremely powerful plant. Great for restoring wounds, but it's a little heavy on the brain."
|
||||
color = rgb(255, 175, 0)
|
||||
overdose_threshold = 25
|
||||
pH = 11
|
||||
|
||||
/datum/reagent/medicine/earthsblood/on_mob_life(mob/living/carbon/M)
|
||||
M.adjustBruteLoss(-3 * REM, 0)
|
||||
@@ -1132,6 +1196,7 @@
|
||||
reagent_state = LIQUID
|
||||
color = "#27870a"
|
||||
metabolization_rate = 0.4 * REAGENTS_METABOLISM
|
||||
pH = 4.3
|
||||
|
||||
/datum/reagent/medicine/haloperidol/on_mob_life(mob/living/carbon/M)
|
||||
for(var/datum/reagent/drug/R in M.reagents.reagent_list)
|
||||
@@ -1154,6 +1219,7 @@
|
||||
color = "#a1a1a1"
|
||||
overdose_threshold = 3 //To prevent people stacking massive amounts of a very strong healing reagent
|
||||
can_synth = FALSE
|
||||
pH = 14
|
||||
|
||||
/datum/reagent/medicine/lavaland_extract/on_mob_life(mob/living/carbon/M)
|
||||
M.heal_bodypart_damage(5,5)
|
||||
@@ -1217,6 +1283,7 @@
|
||||
description = "A medication used to treat pain, fever, and inflammation, along with heart attacks."
|
||||
color = "#F5F5F5"
|
||||
self_consuming = TRUE
|
||||
pH = 12.5
|
||||
|
||||
/datum/reagent/medicine/corazone/on_mob_metabolize(mob/living/M)
|
||||
..()
|
||||
@@ -1249,6 +1316,7 @@
|
||||
overdose_threshold = 20 // with the random effects this might be awesome or might kill you at less than 10u (extensively tested)
|
||||
taste_description = "salt" // it actually does taste salty
|
||||
var/overdose_progress = 0 // to track overdose progress
|
||||
pH = 7.89
|
||||
|
||||
/datum/reagent/medicine/modafinil/on_mob_metabolize(mob/living/M)
|
||||
ADD_TRAIT(M, TRAIT_SLEEPIMMUNE, id)
|
||||
@@ -1305,3 +1373,38 @@
|
||||
M.adjustStaminaLoss(1.5*REM, 0)
|
||||
..()
|
||||
return TRUE
|
||||
|
||||
/datum/reagent/medicine/psicodine
|
||||
name = "Psicodine"
|
||||
id = "psicodine"
|
||||
description = "Suppresses anxiety and other various forms of mental distress. Overdose causes hallucinations and minor toxin damage."
|
||||
reagent_state = LIQUID
|
||||
color = "#07E79E"
|
||||
metabolization_rate = 0.25 * REAGENTS_METABOLISM
|
||||
overdose_threshold = 30
|
||||
pH = 9.12
|
||||
|
||||
/datum/reagent/medicine/psicodine/on_mob_add(mob/living/L)
|
||||
..()
|
||||
ADD_TRAIT(L, TRAIT_FEARLESS, id)
|
||||
|
||||
/datum/reagent/medicine/psicodine/on_mob_delete(mob/living/L)
|
||||
REMOVE_TRAIT(L, TRAIT_FEARLESS, id)
|
||||
..()
|
||||
|
||||
/datum/reagent/medicine/psicodine/on_mob_life(mob/living/carbon/M)
|
||||
M.jitteriness = max(0, M.jitteriness-6)
|
||||
M.dizziness = max(0, M.dizziness-6)
|
||||
M.confused = max(0, M.confused-6)
|
||||
M.disgust = max(0, M.disgust-6)
|
||||
GET_COMPONENT_FROM(mood, /datum/component/mood, M)
|
||||
if(mood.sanity <= SANITY_NEUTRAL) // only take effect if in negative sanity and then...
|
||||
mood.setSanity(min(mood.sanity+5, SANITY_NEUTRAL)) // set minimum to prevent unwanted spiking over neutral
|
||||
..()
|
||||
. = 1
|
||||
|
||||
/datum/reagent/medicine/psicodine/overdose_process(mob/living/M)
|
||||
M.hallucination = min(max(0, M.hallucination + 5), 60)
|
||||
M.adjustToxLoss(1, 0)
|
||||
..()
|
||||
. = 1
|
||||
|
||||
@@ -10,6 +10,7 @@
|
||||
glass_name = "glass of tomato juice"
|
||||
glass_desc = "Are you sure this is tomato juice?"
|
||||
shot_glass_icon_state = "shotglassred"
|
||||
pH = 7.4
|
||||
|
||||
/datum/reagent/blood/reaction_mob(mob/living/L, method=TOUCH, reac_volume)
|
||||
if(data && data["viruses"])
|
||||
@@ -95,6 +96,7 @@
|
||||
description = "You don't even want to think about what's in here."
|
||||
taste_description = "gross iron"
|
||||
shot_glass_icon_state = "shotglassred"
|
||||
pH = 7.45
|
||||
|
||||
/datum/reagent/vaccine
|
||||
//data must contain virus type
|
||||
@@ -195,6 +197,7 @@
|
||||
glass_icon_state = "glass_clear"
|
||||
glass_name = "glass of holy water"
|
||||
glass_desc = "A glass of holy water."
|
||||
pH = 7.5 //God is alkaline
|
||||
|
||||
/datum/reagent/water/holywater/on_mob_metabolize(mob/living/L)
|
||||
..()
|
||||
@@ -271,6 +274,7 @@
|
||||
id = "unholywater"
|
||||
description = "Something that shouldn't exist on this plane of existence."
|
||||
taste_description = "suffering"
|
||||
pH = 6.5
|
||||
|
||||
/datum/reagent/fuel/unholywater/reaction_mob(mob/living/M, method=TOUCH, reac_volume)
|
||||
if(method == TOUCH || method == VAPOR)
|
||||
@@ -289,7 +293,7 @@
|
||||
M.adjustOxyLoss(-2, 0)
|
||||
M.adjustBruteLoss(-2, 0)
|
||||
M.adjustFireLoss(-2, 0)
|
||||
if(ishuman(M) && M.blood_volume < BLOOD_VOLUME_NORMAL)
|
||||
if(ishuman(M) && M.blood_volume < (BLOOD_VOLUME_NORMAL*M.blood_ratio))
|
||||
M.blood_volume += 3
|
||||
else // Will deal about 90 damage when 50 units are thrown
|
||||
M.adjustBrainLoss(3, 150)
|
||||
@@ -313,6 +317,7 @@
|
||||
M.adjustFireLoss(1, 0) //Hence the other damages... ain't I a bastard?
|
||||
M.adjustBrainLoss(5, 150)
|
||||
holder.remove_reagent(id, 1)
|
||||
pH = 0.1
|
||||
|
||||
/datum/reagent/fuel/holyoil //Its oil
|
||||
name = "Zelus Oil"
|
||||
@@ -346,7 +351,7 @@
|
||||
//We only get 30u to start with...
|
||||
|
||||
/datum/reagent/fuel/holyoil/reaction_obj(obj/O, reac_volume)
|
||||
. = ..()
|
||||
. = ..()
|
||||
if(istype(O, /obj/item/stack/sheet/metal))
|
||||
var/obj/item/stack/sheet/metal/M = O
|
||||
reac_volume = min(reac_volume, M.amount)
|
||||
@@ -380,6 +385,7 @@
|
||||
metabolization_rate = 10 * REAGENTS_METABOLISM // very fast, so it can be applied rapidly. But this changes on an overdose
|
||||
overdose_threshold = 11 //Slightly more than one un-nozzled spraybottle.
|
||||
taste_description = "sour oranges"
|
||||
pH = 5
|
||||
|
||||
/datum/reagent/spraytan/reaction_mob(mob/living/M, method=TOUCH, reac_volume, show_message = 1)
|
||||
if(ishuman(M))
|
||||
@@ -704,6 +710,7 @@
|
||||
color = "#202040" // rgb: 20, 20, 40
|
||||
metabolization_rate = 0.25 * REAGENTS_METABOLISM
|
||||
taste_description = "bitterness"
|
||||
pH = 10
|
||||
|
||||
/datum/reagent/serotrotium/on_mob_life(mob/living/carbon/M)
|
||||
if(ishuman(M))
|
||||
@@ -718,6 +725,7 @@
|
||||
reagent_state = GAS
|
||||
color = "#808080" // rgb: 128, 128, 128
|
||||
taste_mult = 0 // oderless and tasteless
|
||||
pH = 9.2//It's acutally a huge range and very dependant on the chemistry but pH is basically a made up var in it's implementation anyways
|
||||
|
||||
/datum/reagent/oxygen/reaction_obj(obj/O, reac_volume)
|
||||
if((!O) || (!reac_volume))
|
||||
@@ -738,6 +746,7 @@
|
||||
reagent_state = SOLID
|
||||
color = "#6E3B08" // rgb: 110, 59, 8
|
||||
taste_description = "metal"
|
||||
pH = 5.5
|
||||
|
||||
/datum/reagent/copper/reaction_obj(obj/O, reac_volume)
|
||||
if(istype(O, /obj/item/stack/sheet/metal))
|
||||
@@ -754,6 +763,7 @@
|
||||
color = "#808080" // rgb: 128, 128, 128
|
||||
taste_mult = 0
|
||||
|
||||
|
||||
/datum/reagent/nitrogen/reaction_obj(obj/O, reac_volume)
|
||||
if((!O) || (!reac_volume))
|
||||
return 0
|
||||
@@ -773,6 +783,7 @@
|
||||
reagent_state = GAS
|
||||
color = "#808080" // rgb: 128, 128, 128
|
||||
taste_mult = 0
|
||||
pH = 0.1//Now I'm stuck in a trap of my own design. Maybe I should make -ve pHes? (not 0 so I don't get div/0 errors)
|
||||
|
||||
/datum/reagent/potassium
|
||||
name = "Potassium"
|
||||
@@ -804,6 +815,7 @@
|
||||
reagent_state = SOLID
|
||||
color = "#BF8C00" // rgb: 191, 140, 0
|
||||
taste_description = "rotten eggs"
|
||||
pH = 4.5
|
||||
|
||||
/datum/reagent/carbon
|
||||
name = "Carbon"
|
||||
@@ -812,6 +824,7 @@
|
||||
reagent_state = SOLID
|
||||
color = "#1C1300" // rgb: 30, 20, 0
|
||||
taste_description = "sour chalk"
|
||||
pH = 5
|
||||
|
||||
/datum/reagent/carbon/reaction_turf(turf/T, reac_volume)
|
||||
if(!isspaceturf(T))
|
||||
@@ -826,6 +839,7 @@
|
||||
reagent_state = GAS
|
||||
color = "#808080" // rgb: 128, 128, 128
|
||||
taste_description = "chlorine"
|
||||
pH = 7.4
|
||||
|
||||
/datum/reagent/chlorine/on_mob_life(mob/living/carbon/M)
|
||||
M.take_bodypart_damage(1*REM, 0, 0, 0)
|
||||
@@ -839,6 +853,7 @@
|
||||
reagent_state = GAS
|
||||
color = "#808080" // rgb: 128, 128, 128
|
||||
taste_description = "acid"
|
||||
pH = 2
|
||||
|
||||
/datum/reagent/fluorine/on_mob_life(mob/living/carbon/M)
|
||||
M.adjustToxLoss(1*REM, 0)
|
||||
@@ -852,6 +867,7 @@
|
||||
reagent_state = SOLID
|
||||
color = "#808080" // rgb: 128, 128, 128
|
||||
taste_description = "salty metal"
|
||||
pH = 11.6
|
||||
|
||||
/datum/reagent/phosphorus
|
||||
name = "Phosphorus"
|
||||
@@ -860,6 +876,7 @@
|
||||
reagent_state = SOLID
|
||||
color = "#832828" // rgb: 131, 40, 40
|
||||
taste_description = "vinegar"
|
||||
pH = 6.5
|
||||
|
||||
/datum/reagent/lithium
|
||||
name = "Lithium"
|
||||
@@ -868,6 +885,7 @@
|
||||
reagent_state = SOLID
|
||||
color = "#808080" // rgb: 128, 128, 128
|
||||
taste_description = "metal"
|
||||
pH = 11.3
|
||||
|
||||
/datum/reagent/lithium/on_mob_life(mob/living/carbon/M)
|
||||
if(M.canmove && !isspaceturf(M.loc))
|
||||
@@ -882,6 +900,7 @@
|
||||
description = "Glycerol is a simple polyol compound. Glycerol is sweet-tasting and of low toxicity."
|
||||
color = "#808080" // rgb: 128, 128, 128
|
||||
taste_description = "sweetness"
|
||||
pH = 9
|
||||
|
||||
/datum/reagent/radium
|
||||
name = "Radium"
|
||||
@@ -890,6 +909,7 @@
|
||||
reagent_state = SOLID
|
||||
color = "#C7C7C7" // rgb: 199,199,199
|
||||
taste_description = "the colour blue and regret"
|
||||
pH = 10
|
||||
|
||||
/datum/reagent/radium/on_mob_life(mob/living/carbon/M)
|
||||
M.apply_effect(2*REM/M.metabolism_efficiency,EFFECT_IRRADIATE,0)
|
||||
@@ -909,6 +929,7 @@
|
||||
description = "Sterilizes wounds in preparation for surgery."
|
||||
color = "#e6f1f5" // rgb: 200, 165, 220
|
||||
taste_description = "bitterness"
|
||||
pH = 10.5
|
||||
|
||||
/datum/reagent/space_cleaner/sterilizine/reaction_mob(mob/living/carbon/C, method=TOUCH, reac_volume)
|
||||
if(method in list(TOUCH, VAPOR, PATCH))
|
||||
@@ -924,11 +945,12 @@
|
||||
description = "Pure iron is a metal."
|
||||
reagent_state = SOLID
|
||||
taste_description = "iron"
|
||||
pH = 6
|
||||
|
||||
color = "#c2391d"
|
||||
|
||||
/datum/reagent/iron/on_mob_life(mob/living/carbon/C)
|
||||
if(C.blood_volume < BLOOD_VOLUME_NORMAL)
|
||||
if(C.blood_volume < (BLOOD_VOLUME_NORMAL*C.blood_ratio))
|
||||
C.blood_volume += 0.5
|
||||
..()
|
||||
|
||||
@@ -966,6 +988,7 @@
|
||||
reagent_state = SOLID
|
||||
color = "#B8B8C0" // rgb: 184, 184, 192
|
||||
taste_description = "the inside of a reactor"
|
||||
pH = 4
|
||||
|
||||
/datum/reagent/uranium/on_mob_life(mob/living/carbon/M)
|
||||
M.apply_effect(1/M.metabolism_efficiency,EFFECT_IRRADIATE,0)
|
||||
@@ -986,10 +1009,11 @@
|
||||
reagent_state = SOLID
|
||||
color = "#0000CC"
|
||||
taste_description = "fizzling blue"
|
||||
pH = 12
|
||||
|
||||
/datum/reagent/bluespace/reaction_mob(mob/living/M, method=TOUCH, reac_volume)
|
||||
if(method == TOUCH || method == VAPOR)
|
||||
do_teleport(M, get_turf(M), (reac_volume / 5), asoundin = 'sound/effects/phasein.ogg') //4 tiles per crystal
|
||||
do_teleport(M, get_turf(M), (reac_volume / 5), asoundin = 'sound/effects/phasein.ogg', channel = TELEPORT_CHANNEL_BLUESPACE) //4 tiles per crystal
|
||||
..()
|
||||
|
||||
/datum/reagent/bluespace/on_mob_life(mob/living/carbon/M)
|
||||
@@ -1001,7 +1025,7 @@
|
||||
..()
|
||||
|
||||
/mob/living/proc/bluespace_shuffle()
|
||||
do_teleport(src, get_turf(src), 5, asoundin = 'sound/effects/phasein.ogg')
|
||||
do_teleport(src, get_turf(src), 5, asoundin = 'sound/effects/phasein.ogg', channel = TELEPORT_CHANNEL_BLUESPACE)
|
||||
|
||||
/datum/reagent/aluminium
|
||||
name = "Aluminium"
|
||||
@@ -1018,6 +1042,7 @@
|
||||
reagent_state = SOLID
|
||||
color = "#A8A8A8" // rgb: 168, 168, 168
|
||||
taste_mult = 0
|
||||
pH = 10
|
||||
|
||||
/datum/reagent/fuel
|
||||
name = "Welding fuel"
|
||||
@@ -1028,6 +1053,8 @@
|
||||
glass_icon_state = "dr_gibb_glass"
|
||||
glass_name = "glass of welder fuel"
|
||||
glass_desc = "Unless you're an industrial tool, this is probably not safe for consumption."
|
||||
pH = 4
|
||||
|
||||
|
||||
/datum/reagent/fuel/reaction_mob(mob/living/M, method=TOUCH, reac_volume)//Splashing people with welding fuel to make them easy to ignite!
|
||||
if(method == TOUCH || method == VAPOR)
|
||||
@@ -1046,6 +1073,7 @@
|
||||
description = "A compound used to clean things. Now with 50% more sodium hypochlorite!"
|
||||
color = "#A5F0EE" // rgb: 165, 240, 238
|
||||
taste_description = "sourness"
|
||||
pH = 5.5
|
||||
|
||||
/datum/reagent/space_cleaner/reaction_obj(obj/O, reac_volume)
|
||||
if(istype(O, /obj/effect/decal/cleanable))
|
||||
@@ -1103,6 +1131,7 @@
|
||||
description = "A powerful, acidic cleaner sold by Waffle Co. Affects organic matter while leaving other objects unaffected."
|
||||
metabolization_rate = 1.5 * REAGENTS_METABOLISM
|
||||
taste_description = "acid"
|
||||
pH = 2
|
||||
|
||||
/datum/reagent/space_cleaner/ez_clean/on_mob_life(mob/living/carbon/M)
|
||||
M.adjustBruteLoss(3.33)
|
||||
@@ -1123,6 +1152,7 @@
|
||||
color = "#7529b3" // rgb: 200, 165, 220
|
||||
metabolization_rate = 1.5 * REAGENTS_METABOLISM
|
||||
taste_description = "sourness"
|
||||
pH = 11.9
|
||||
|
||||
/datum/reagent/cryptobiolin/on_mob_life(mob/living/carbon/M)
|
||||
M.Dizzy(1)
|
||||
@@ -1137,6 +1167,7 @@
|
||||
description = "Impedrezene is a narcotic that impedes one's ability by slowing down the higher brain cell functions."
|
||||
color = "#587a31" // rgb: 200, 165, 220A
|
||||
taste_description = "numbness"
|
||||
pH = 9.1
|
||||
|
||||
/datum/reagent/impedrezene/on_mob_life(mob/living/carbon/M)
|
||||
M.jitteriness = max(M.jitteriness-5,0)
|
||||
@@ -1179,6 +1210,7 @@
|
||||
color = "#92D17D" // rgb: 146, 209, 125
|
||||
can_synth = FALSE
|
||||
taste_description = "slime"
|
||||
pH = 11
|
||||
|
||||
/datum/reagent/fungalspores/reaction_mob(mob/living/L, method=TOUCH, reac_volume, show_message = 1, touch_protection = 0)
|
||||
if(method==PATCH || method==INGEST || method==INJECT || (method == VAPOR && prob(min(reac_volume,100)*(1 - touch_protection))))
|
||||
@@ -1190,6 +1222,7 @@
|
||||
description = "A perfluoronated sulfonic acid that forms a foam when mixed with water."
|
||||
color = "#9E6B38" // rgb: 158, 107, 56
|
||||
taste_description = "metal"
|
||||
pH = 13
|
||||
|
||||
/datum/reagent/foaming_agent// Metal foaming agent. This is lithium hydride. Add other recipes (e.g. LiH + H2O -> LiOH + H2) eventually.
|
||||
name = "Foaming agent"
|
||||
@@ -1198,6 +1231,7 @@
|
||||
reagent_state = SOLID
|
||||
color = "#664B63" // rgb: 102, 75, 99
|
||||
taste_description = "metal"
|
||||
pH = 12.5
|
||||
|
||||
/datum/reagent/smart_foaming_agent //Smart foaming agent. Functions similarly to metal foam, but conforms to walls.
|
||||
name = "Smart foaming agent"
|
||||
@@ -1206,6 +1240,7 @@
|
||||
reagent_state = SOLID
|
||||
color = "#664B63" // rgb: 102, 75, 99
|
||||
taste_description = "metal"
|
||||
pH = 11.8
|
||||
|
||||
/datum/reagent/ammonia
|
||||
name = "Ammonia"
|
||||
@@ -1214,6 +1249,7 @@
|
||||
reagent_state = GAS
|
||||
color = "#404030" // rgb: 64, 64, 48
|
||||
taste_description = "mordant"
|
||||
pH = 11.6
|
||||
|
||||
/datum/reagent/diethylamine
|
||||
name = "Diethylamine"
|
||||
@@ -1221,6 +1257,7 @@
|
||||
description = "A secondary amine, mildly corrosive."
|
||||
color = "#604030" // rgb: 96, 64, 48
|
||||
taste_description = "iron"
|
||||
pH = 12
|
||||
|
||||
/datum/reagent/carbondioxide
|
||||
name = "Carbon Dioxide"
|
||||
@@ -1229,6 +1266,7 @@
|
||||
description = "A gas commonly produced by burning carbon fuels. You're constantly producing this in your lungs."
|
||||
color = "#B0B0B0" // rgb : 192, 192, 192
|
||||
taste_description = "something unknowable"
|
||||
pH = 6
|
||||
|
||||
/datum/reagent/carbondioxide/reaction_obj(obj/O, reac_volume)
|
||||
if((!O) || (!reac_volume))
|
||||
@@ -1250,6 +1288,7 @@
|
||||
metabolization_rate = 1.5 * REAGENTS_METABOLISM
|
||||
color = "#808080"
|
||||
taste_description = "sweetness"
|
||||
pH = 5.8
|
||||
|
||||
/datum/reagent/nitrous_oxide/reaction_obj(obj/O, reac_volume)
|
||||
if((!O) || (!reac_volume))
|
||||
@@ -1309,6 +1348,7 @@
|
||||
metabolization_rate = REAGENTS_METABOLISM
|
||||
color = "90560B"
|
||||
taste_description = "burning"
|
||||
pH = 2
|
||||
|
||||
/datum/reagent/nitryl/on_mob_metabolize(mob/living/L)
|
||||
..()
|
||||
@@ -1342,6 +1382,7 @@
|
||||
colorname = "red"
|
||||
color = "#DA0000" // red
|
||||
random_color_list = list("#DA0000")
|
||||
pH = 0.5
|
||||
|
||||
/datum/reagent/colorful_reagent/crayonpowder/orange
|
||||
name = "Orange Crayon Powder"
|
||||
@@ -1349,6 +1390,7 @@
|
||||
colorname = "orange"
|
||||
color = "#FF9300" // orange
|
||||
random_color_list = list("#FF9300")
|
||||
pH = 2
|
||||
|
||||
/datum/reagent/colorful_reagent/crayonpowder/yellow
|
||||
name = "Yellow Crayon Powder"
|
||||
@@ -1356,6 +1398,7 @@
|
||||
colorname = "yellow"
|
||||
color = "#FFF200" // yellow
|
||||
random_color_list = list("#FFF200")
|
||||
pH = 5
|
||||
|
||||
/datum/reagent/colorful_reagent/crayonpowder/green
|
||||
name = "Green Crayon Powder"
|
||||
@@ -1364,12 +1407,14 @@
|
||||
color = "#A8E61D" // green
|
||||
random_color_list = list("#A8E61D")
|
||||
|
||||
|
||||
/datum/reagent/colorful_reagent/crayonpowder/blue
|
||||
name = "Blue Crayon Powder"
|
||||
id = "bluecrayonpowder"
|
||||
colorname = "blue"
|
||||
color = "#00B7EF" // blue
|
||||
random_color_list = list("#00B7EF")
|
||||
pH = 10
|
||||
|
||||
/datum/reagent/colorful_reagent/crayonpowder/purple
|
||||
name = "Purple Crayon Powder"
|
||||
@@ -1377,6 +1422,7 @@
|
||||
colorname = "purple"
|
||||
color = "#DA00FF" // purple
|
||||
random_color_list = list("#DA00FF")
|
||||
pH = 13
|
||||
|
||||
/datum/reagent/colorful_reagent/crayonpowder/invisible
|
||||
name = "Invisible Crayon Powder"
|
||||
@@ -1411,6 +1457,7 @@
|
||||
color = "#000000" // RBG: 0, 0, 0
|
||||
var/tox_prob = 0
|
||||
taste_description = "plant food"
|
||||
pH = 3
|
||||
|
||||
/datum/reagent/plantnutriment/on_mob_life(mob/living/carbon/M)
|
||||
if(prob(tox_prob))
|
||||
@@ -1424,6 +1471,7 @@
|
||||
description = "Cheap and extremely common type of plant nutriment."
|
||||
color = "#376400" // RBG: 50, 100, 0
|
||||
tox_prob = 10
|
||||
pH = 2
|
||||
|
||||
/datum/reagent/plantnutriment/left4zednutriment
|
||||
name = "Left 4 Zed"
|
||||
@@ -1431,6 +1479,7 @@
|
||||
description = "Unstable nutriment that makes plants mutate more often than usual."
|
||||
color = "#1A1E4D" // RBG: 26, 30, 77
|
||||
tox_prob = 25
|
||||
pH = 1.5
|
||||
|
||||
/datum/reagent/plantnutriment/robustharvestnutriment
|
||||
name = "Robust Harvest"
|
||||
@@ -1438,6 +1487,7 @@
|
||||
description = "Very potent nutriment that prevents plants from mutating."
|
||||
color = "#9D9D00" // RBG: 157, 157, 0
|
||||
tox_prob = 15
|
||||
pH = 1
|
||||
|
||||
|
||||
|
||||
@@ -1465,6 +1515,7 @@
|
||||
color = "#6b008f"
|
||||
taste_description = "bitterness"
|
||||
taste_mult = 1.5
|
||||
pH = 1.5
|
||||
|
||||
/datum/reagent/stable_plasma/on_mob_life(mob/living/carbon/C)
|
||||
C.adjustPlasma(10)
|
||||
@@ -1477,6 +1528,7 @@
|
||||
reagent_state = LIQUID
|
||||
color = "#694600"
|
||||
taste_description = "metal"
|
||||
pH = 4.5
|
||||
|
||||
/datum/reagent/carpet
|
||||
name = "Carpet"
|
||||
@@ -1499,14 +1551,16 @@
|
||||
reagent_state = LIQUID
|
||||
color = "#b37740"
|
||||
taste_description = "chemicals"
|
||||
pH = 7.8
|
||||
|
||||
/datum/reagent/phenol
|
||||
name = "Phenol"
|
||||
id = "phenol"
|
||||
description = "An aromatic ring of carbon with a hydroxyl group. A useful precursor to some medicines, but has no healing properties on its own."
|
||||
reagent_state = LIQUID
|
||||
taste_description = "sweet and tarry" //Again, not a strong acid.
|
||||
pH = 5.5
|
||||
color = "#e6e8ff"
|
||||
taste_description = "acid"
|
||||
|
||||
/datum/reagent/ash
|
||||
name = "Ash"
|
||||
@@ -1515,14 +1569,15 @@
|
||||
reagent_state = LIQUID
|
||||
color = "#665c56"
|
||||
taste_description = "ash"
|
||||
pH = 6.5
|
||||
|
||||
/datum/reagent/acetone
|
||||
name = "Acetone"
|
||||
id = "acetone"
|
||||
description = "A slick, slightly carcinogenic liquid. Has a multitude of mundane uses in everyday life."
|
||||
reagent_state = LIQUID
|
||||
taste_description = "solvent"//It's neutral though..?
|
||||
color = "#e6e6e6"
|
||||
taste_description = "acid"
|
||||
|
||||
/datum/reagent/colorful_reagent
|
||||
name = "Colorful Reagent"
|
||||
@@ -1612,6 +1667,7 @@
|
||||
reagent_state = LIQUID
|
||||
color = "#60A584" // rgb: 96, 165, 132
|
||||
taste_description = "cool salt"
|
||||
pH = 11.2
|
||||
|
||||
/datum/reagent/lye
|
||||
name = "Lye"
|
||||
@@ -1619,7 +1675,8 @@
|
||||
description = "Also known as sodium hydroxide. As a profession making this is somewhat underwhelming."
|
||||
reagent_state = LIQUID
|
||||
color = "#FFFFD6" // very very light yellow
|
||||
taste_description = "acid"
|
||||
taste_description = "alkali" //who put ACID for NaOH ????
|
||||
pH = 13
|
||||
|
||||
/datum/reagent/drying_agent
|
||||
name = "Drying agent"
|
||||
@@ -1628,6 +1685,7 @@
|
||||
reagent_state = LIQUID
|
||||
color = "#A70FFF"
|
||||
taste_description = "dryness"
|
||||
pH = 10.7
|
||||
|
||||
/datum/reagent/drying_agent/reaction_turf(turf/open/T, reac_volume)
|
||||
if(istype(T))
|
||||
@@ -1699,6 +1757,7 @@
|
||||
description = "Royal Bee Jelly, if injected into a Queen Space Bee said bee will split into two bees."
|
||||
color = "#00ff80"
|
||||
taste_description = "strange honey"
|
||||
pH = 3
|
||||
|
||||
/datum/reagent/royal_bee_jelly/on_mob_life(mob/living/carbon/M)
|
||||
if(prob(2))
|
||||
@@ -1720,6 +1779,7 @@
|
||||
metabolization_rate = INFINITY
|
||||
can_synth = FALSE
|
||||
taste_description = "brains"
|
||||
pH = 0.5
|
||||
|
||||
/datum/reagent/romerol/reaction_mob(mob/living/carbon/human/H, method=TOUCH, reac_volume)
|
||||
// Silently add the zombie infection organ to be activated upon death
|
||||
@@ -1778,6 +1838,7 @@
|
||||
description = "the petroleum based components of plastic."
|
||||
color = "#f7eded"
|
||||
taste_description = "plastic"
|
||||
pH = 6
|
||||
|
||||
/datum/reagent/glitter
|
||||
name = "generic glitter"
|
||||
@@ -1820,6 +1881,7 @@
|
||||
color = "#AAAAAA55"
|
||||
taste_description = "water"
|
||||
metabolization_rate = 0.25 * REAGENTS_METABOLISM
|
||||
pH = 15
|
||||
|
||||
/datum/reagent/pax/on_mob_metabolize(mob/living/L)
|
||||
..()
|
||||
@@ -1908,6 +1970,13 @@
|
||||
color = "#FAEAFF"
|
||||
taste_description = "synthetic catnip"
|
||||
|
||||
/datum/reagent/moonsugar/on_mob_life(mob/living/carbon/M)
|
||||
if(prob(20))
|
||||
to_chat(M, "You find yourself unable to supress the desire to meow!")
|
||||
M.emote("nya")
|
||||
..()
|
||||
|
||||
//Kept for legacy, I think it will break everything if you enable it.
|
||||
/datum/reagent/penis_enlargement
|
||||
name = "Penis Enlargement"
|
||||
id = "penis_enlargement"
|
||||
@@ -1924,3 +1993,41 @@
|
||||
P.length += added_length
|
||||
P.update()
|
||||
..()
|
||||
|
||||
/datum/reagent/changeling_string
|
||||
name = "UNKNOWN"
|
||||
id = "changeling_sting_real"
|
||||
description = "404: Chemical not found."
|
||||
metabolization_rate = REAGENTS_METABOLISM
|
||||
color = "#0000FF"
|
||||
can_synth = FALSE
|
||||
var/datum/dna/original_dna
|
||||
var/reagent_ticks = 0
|
||||
invisible = TRUE
|
||||
|
||||
/datum/reagent/changeling_string/on_mob_metabolize(mob/living/carbon/C)
|
||||
if(C && C.dna && data["desired_dna"])
|
||||
original_dna = new C.dna.type
|
||||
C.dna.copy_dna(original_dna)
|
||||
var/datum/dna/new_dna = data["desired_dna"]
|
||||
new_dna.copy_dna(C.dna)
|
||||
C.real_name = new_dna.real_name
|
||||
C.updateappearance(mutcolor_update=1)
|
||||
C.update_body()
|
||||
C.domutcheck()
|
||||
C.regenerate_icons()
|
||||
..()
|
||||
|
||||
/datum/reagent/changeling_string/on_mob_end_metabolize(mob/living/carbon/C)
|
||||
if(original_dna)
|
||||
original_dna.copy_dna(C.dna)
|
||||
C.real_name = original_dna.real_name
|
||||
C.updateappearance(mutcolor_update=1)
|
||||
C.update_body()
|
||||
C.domutcheck()
|
||||
C.regenerate_icons()
|
||||
..()
|
||||
|
||||
/datum/reagent/changeling_string/Destroy()
|
||||
qdel(original_dna)
|
||||
return ..()
|
||||
|
||||
@@ -23,6 +23,7 @@
|
||||
color = "#792300" // rgb: 121, 35, 0
|
||||
toxpwr = 2.5
|
||||
taste_description = "mushroom"
|
||||
pH = 13
|
||||
|
||||
/datum/reagent/toxin/mutagen
|
||||
name = "Unstable mutagen"
|
||||
@@ -32,6 +33,7 @@
|
||||
toxpwr = 0
|
||||
taste_description = "slime"
|
||||
taste_mult = 0.9
|
||||
pH = 2
|
||||
|
||||
/datum/reagent/toxin/mutagen/reaction_mob(mob/living/carbon/M, method=TOUCH, reac_volume)
|
||||
if(!..())
|
||||
@@ -61,6 +63,7 @@
|
||||
taste_mult = 1.5
|
||||
color = "#8228A0"
|
||||
toxpwr = 3
|
||||
pH = 4
|
||||
|
||||
/datum/reagent/toxin/plasma/on_mob_life(mob/living/carbon/C)
|
||||
if(holder.has_reagent("epinephrine"))
|
||||
@@ -93,6 +96,7 @@
|
||||
color = "#7DC3A0"
|
||||
toxpwr = 0
|
||||
taste_description = "acid"
|
||||
pH = 1.2
|
||||
|
||||
/datum/reagent/toxin/lexorin/on_mob_life(mob/living/carbon/C)
|
||||
. = TRUE
|
||||
@@ -115,6 +119,7 @@
|
||||
toxpwr = 0
|
||||
taste_description = "slime"
|
||||
taste_mult = 1.3
|
||||
pH = 10
|
||||
|
||||
/datum/reagent/toxin/slimejelly/on_mob_life(mob/living/carbon/M)
|
||||
if(prob(10))
|
||||
@@ -133,6 +138,7 @@
|
||||
color = "#CF3600" // rgb: 207, 54, 0
|
||||
toxpwr = 0
|
||||
taste_description = "mint"
|
||||
pH = 8
|
||||
|
||||
/datum/reagent/toxin/minttoxin/on_mob_life(mob/living/carbon/M)
|
||||
if(HAS_TRAIT(M, TRAIT_FAT))
|
||||
@@ -146,6 +152,7 @@
|
||||
color = "#003333" // rgb: 0, 51, 51
|
||||
toxpwr = 2
|
||||
taste_description = "fish"
|
||||
pH = 12
|
||||
|
||||
/datum/reagent/toxin/zombiepowder
|
||||
name = "Zombie Powder"
|
||||
@@ -155,6 +162,7 @@
|
||||
color = "#669900" // rgb: 102, 153, 0
|
||||
toxpwr = 0.5
|
||||
taste_description = "death"
|
||||
pH = 13
|
||||
|
||||
/datum/reagent/toxin/zombiepowder/on_mob_metabolize(mob/living/L)
|
||||
..()
|
||||
@@ -177,6 +185,7 @@
|
||||
color = "#664700" // rgb: 102, 71, 0
|
||||
toxpwr = 0.8
|
||||
taste_description = "death"
|
||||
pH = 14.5
|
||||
|
||||
/datum/reagent/toxin/ghoulpowder/on_mob_metabolize(mob/living/L)
|
||||
..()
|
||||
@@ -198,6 +207,7 @@
|
||||
color = "#B31008" // rgb: 139, 166, 233
|
||||
toxpwr = 0
|
||||
taste_description = "sourness"
|
||||
pH = 11
|
||||
|
||||
/datum/reagent/toxin/mindbreaker/on_mob_life(mob/living/carbon/M)
|
||||
M.hallucination += 5
|
||||
@@ -210,6 +220,7 @@
|
||||
color = "#49002E" // rgb: 73, 0, 46
|
||||
toxpwr = 1
|
||||
taste_mult = 1
|
||||
pH = 2
|
||||
|
||||
/datum/reagent/toxin/plantbgone/reaction_obj(obj/O, reac_volume)
|
||||
if(istype(O, /obj/structure/alien/weeds))
|
||||
@@ -234,6 +245,7 @@
|
||||
id = "weedkiller"
|
||||
description = "A harmful toxic mixture to kill weeds. Do not ingest!"
|
||||
color = "#4B004B" // rgb: 75, 0, 75
|
||||
pH = 3
|
||||
|
||||
/datum/reagent/toxin/pestkiller
|
||||
name = "Pest Killer"
|
||||
@@ -241,6 +253,7 @@
|
||||
description = "A harmful toxic mixture to kill pests. Do not ingest!"
|
||||
color = "#4B004B" // rgb: 75, 0, 75
|
||||
toxpwr = 1
|
||||
pH = 3.2
|
||||
|
||||
/datum/reagent/toxin/pestkiller/reaction_mob(mob/living/M, method=TOUCH, reac_volume)
|
||||
..()
|
||||
@@ -254,6 +267,7 @@
|
||||
description = "A natural toxin produced by blob spores that inhibits vision when ingested."
|
||||
color = "#9ACD32"
|
||||
toxpwr = 1
|
||||
pH = 11
|
||||
|
||||
/datum/reagent/toxin/spore/on_mob_life(mob/living/carbon/C)
|
||||
C.damageoverlaytemp = 60
|
||||
@@ -268,6 +282,7 @@
|
||||
color = "#9ACD32"
|
||||
toxpwr = 0.5
|
||||
taste_description = "burning"
|
||||
pH = 13
|
||||
|
||||
/datum/reagent/toxin/spore_burning/on_mob_life(mob/living/carbon/M)
|
||||
M.adjust_fire_stacks(2)
|
||||
@@ -282,6 +297,7 @@
|
||||
color = "#000067" // rgb: 0, 0, 103
|
||||
toxpwr = 0
|
||||
metabolization_rate = 1.5 * REAGENTS_METABOLISM
|
||||
pH = 11
|
||||
|
||||
/datum/reagent/toxin/chloralhydrate/on_mob_life(mob/living/carbon/M)
|
||||
switch(current_cycle)
|
||||
@@ -326,6 +342,7 @@
|
||||
glass_icon_state = "beerglass"
|
||||
glass_name = "glass of beer"
|
||||
glass_desc = "A freezing pint of beer."
|
||||
pH = 2
|
||||
|
||||
/datum/reagent/toxin/fakebeer/on_mob_life(mob/living/carbon/M)
|
||||
switch(current_cycle)
|
||||
@@ -343,6 +360,7 @@
|
||||
reagent_state = SOLID
|
||||
color = "#5B2E0D" // rgb: 91, 46, 13
|
||||
toxpwr = 0.5
|
||||
pH = 4.2
|
||||
|
||||
/datum/reagent/toxin/teapowder
|
||||
name = "Ground Tea Leaves"
|
||||
@@ -351,6 +369,7 @@
|
||||
reagent_state = SOLID
|
||||
color = "#7F8400" // rgb: 127, 132, 0
|
||||
toxpwr = 0.5
|
||||
pH = 4.9
|
||||
|
||||
/datum/reagent/toxin/mutetoxin //the new zombie powder.
|
||||
name = "Mute Toxin"
|
||||
@@ -359,6 +378,7 @@
|
||||
color = "#F0F8FF" // rgb: 240, 248, 255
|
||||
toxpwr = 0
|
||||
taste_description = "silence"
|
||||
pH = 12.2
|
||||
|
||||
/datum/reagent/toxin/mutetoxin/on_mob_life(mob/living/carbon/M)
|
||||
M.silent = max(M.silent, 3)
|
||||
@@ -816,6 +836,7 @@
|
||||
var/acidpwr = 10 //the amount of protection removed from the armour
|
||||
taste_description = "acid"
|
||||
self_consuming = TRUE
|
||||
pH = 2.75
|
||||
|
||||
/datum/reagent/toxin/acid/reaction_mob(mob/living/carbon/C, method=TOUCH, reac_volume)
|
||||
if(!istype(C))
|
||||
|
||||
@@ -17,6 +17,24 @@
|
||||
var/mix_message = "The solution begins to bubble." //The message shown to nearby people upon mixing, if applicable
|
||||
var/mix_sound = 'sound/effects/bubbles.ogg' //The sound played upon mixing, if applicable
|
||||
|
||||
//FermiChem!
|
||||
var/OptimalTempMin = 200 // Lower area of bell curve for determining heat based rate reactions
|
||||
var/OptimalTempMax = 800 // Upper end for above
|
||||
var/ExplodeTemp = 900 // Temperature at which reaction explodes - If any reaction is this hot, it explodes!
|
||||
var/OptimalpHMin = 5 // Lowest value of pH determining pH a 1 value for pH based rate reactions (Plateu phase)
|
||||
var/OptimalpHMax = 10 // Higest value for above
|
||||
var/ReactpHLim = 3 // How far out pH wil react, giving impurity place (Exponential phase)
|
||||
var/CatalystFact = 0 // How much the catalyst affects the reaction (0 = no catalyst)//Not implemented yet
|
||||
var/CurveSharpT = 2 // How sharp the temperature exponential curve is (to the power of value)
|
||||
var/CurveSharppH = 2 // How sharp the pH exponential curve is (to the power of value)
|
||||
var/ThermicConstant = 1 // Temperature change per 1u produced
|
||||
var/HIonRelease = 0.1 // pH change per 1u reaction
|
||||
var/RateUpLim = 10 // Optimal/max rate possible if all conditions are perfect
|
||||
var/FermiChem = FALSE // If the chemical uses the Fermichem reaction mechanics//If the chemical uses the Fermichem reaction mechanics
|
||||
var/FermiExplode = FALSE // If the chemical explodes in a special way
|
||||
var/PurityMin = 0.15 //If purity is below 0.15, it explodes too. Set to 0 to disable this.
|
||||
|
||||
|
||||
/datum/chemical_reaction/proc/on_reaction(datum/reagents/holder, created_volume, specialreact)
|
||||
return
|
||||
//I recommend you set the result amount to the total volume of all components.
|
||||
|
||||
@@ -41,6 +41,13 @@
|
||||
results = list("aranesp" = 3)
|
||||
required_reagents = list("epinephrine" = 1, "atropine" = 1, "morphine" = 1)
|
||||
|
||||
/datum/chemical_reaction/happiness
|
||||
name = "Happiness"
|
||||
id = "happiness"
|
||||
results = list("happiness" = 4)
|
||||
required_reagents = list("nitrous_oxide" = 2, "epinephrine" = 1, "ethanol" = 1)
|
||||
required_catalysts = list("plasma" = 5)
|
||||
|
||||
/datum/chemical_reaction/skooma
|
||||
name = "skooma"
|
||||
id = "skooma"
|
||||
|
||||
@@ -178,6 +178,12 @@
|
||||
results = list("mutadone" = 3)
|
||||
required_reagents = list("mutagen" = 1, "acetone" = 1, "bromine" = 1)
|
||||
|
||||
/datum/chemical_reaction/neurine
|
||||
name = "Neurine"
|
||||
id = "neurine"
|
||||
results = list("neurine" = 3)
|
||||
required_reagents = list("mannitol" = 1, "acetone" = 1, "oxygen" = 1)
|
||||
|
||||
/datum/chemical_reaction/antihol
|
||||
name = "antihol"
|
||||
id = "antihol"
|
||||
@@ -258,3 +264,9 @@
|
||||
results = list("modafinil" = 5)
|
||||
required_reagents = list("diethylamine" = 1, "ammonia" = 1, "phenol" = 1, "acetone" = 1, "sacid" = 1)
|
||||
required_catalysts = list("bromine" = 1) // as close to the real world synthesis as possible
|
||||
|
||||
/datum/chemical_reaction/psicodine
|
||||
name = "Psicodine"
|
||||
id = "psicodine"
|
||||
results = list("psicodine" = 5)
|
||||
required_reagents = list( "mannitol" = 2, "water" = 2, "impedrezene" = 1)
|
||||
|
||||
@@ -528,6 +528,16 @@
|
||||
/datum/chemical_reaction/life/on_reaction(datum/reagents/holder, created_volume)
|
||||
chemical_mob_spawn(holder, rand(1, round(created_volume, 1)), "Life") // Lol.
|
||||
|
||||
//This is missing, I'm adding it back (see tgwiki). Not sure why we don't have it.
|
||||
/datum/chemical_reaction/life_friendly
|
||||
name = "Life (Friendly)"
|
||||
id = "life_friendly"
|
||||
required_reagents = list("strange_reagent" = 1, "synthflesh" = 1, "sugar" = 1)
|
||||
required_temp = 374
|
||||
|
||||
/datum/chemical_reaction/life_friendly/on_reaction(datum/reagents/holder, created_volume)
|
||||
chemical_mob_spawn(holder, rand(1, round(created_volume, 1)), "Life (friendly)", FRIENDLY_SPAWN) //Pray for cute cats
|
||||
|
||||
/datum/chemical_reaction/corgium
|
||||
name = "corgium"
|
||||
id = "corgium"
|
||||
|
||||
@@ -1,3 +1,6 @@
|
||||
#define PH_WEAK (1 << 0)
|
||||
#define TEMP_WEAK (1 << 1)
|
||||
|
||||
/obj/item/reagent_containers
|
||||
name = "Container"
|
||||
desc = "..."
|
||||
@@ -12,6 +15,8 @@
|
||||
var/spawned_disease = null
|
||||
var/disease_amount = 20
|
||||
var/spillable = FALSE
|
||||
var/beaker_weakness_bitflag = NONE//Bitflag!
|
||||
var/container_HP = 2
|
||||
|
||||
/obj/item/reagent_containers/Initialize(mapload, vol)
|
||||
. = ..()
|
||||
@@ -123,9 +128,50 @@
|
||||
|
||||
reagents.clear_reagents()
|
||||
|
||||
//melts plastic beakers
|
||||
/obj/item/reagent_containers/microwave_act(obj/machinery/microwave/M)
|
||||
reagents.expose_temperature(1000)
|
||||
if(beaker_weakness_bitflag & TEMP_WEAK)
|
||||
var/list/seen = viewers(5, get_turf(src))
|
||||
var/iconhtml = icon2html(src, seen)
|
||||
for(var/mob/H in seen)
|
||||
to_chat(H, "<span class='notice'>[iconhtml] \The [src]'s melts from the temperature!</span>")
|
||||
playsound(get_turf(src), 'sound/FermiChem/heatmelt.ogg', 80, 1)
|
||||
qdel(src)
|
||||
..()
|
||||
|
||||
//melts plastic beakers
|
||||
/obj/item/reagent_containers/temperature_expose(datum/gas_mixture/air, exposed_temperature, exposed_volume)
|
||||
reagents.expose_temperature(exposed_temperature)
|
||||
reagents.expose_temperature(exposed_temperature)
|
||||
temp_check()
|
||||
|
||||
/obj/item/reagent_containers/proc/temp_check()
|
||||
if(beaker_weakness_bitflag & TEMP_WEAK)
|
||||
if(reagents.chem_temp >= 444)//assuming polypropylene
|
||||
var/list/seen = viewers(5, get_turf(src))
|
||||
var/iconhtml = icon2html(src, seen)
|
||||
for(var/mob/M in seen)
|
||||
to_chat(M, "<span class='notice'>[iconhtml] \The [src]'s melts from the temperature!</span>")
|
||||
playsound(get_turf(src), 'sound/FermiChem/heatmelt.ogg', 80, 1)
|
||||
to_chat(M, "<span class='warning'><i>[iconhtml] Have you tried using glass or meta beakers for high temperature reactions? These are immune to temperature effects.</i></span>")
|
||||
SSblackbox.record_feedback("tally", "fermi_chem", 1, "Times beakers have melted from temperature")
|
||||
qdel(src)
|
||||
|
||||
//melts glass beakers
|
||||
/obj/item/reagent_containers/proc/pH_check()
|
||||
if(beaker_weakness_bitflag & PH_WEAK)
|
||||
if((reagents.pH < 0.5) || (reagents.pH > 13.5))
|
||||
var/list/seen = viewers(5, get_turf(src))
|
||||
var/iconhtml = icon2html(src, seen)
|
||||
container_HP--
|
||||
if(container_HP <= 0)
|
||||
for(var/mob/M in seen)
|
||||
to_chat(M, "<span class='notice'>[iconhtml] \The [src]'s melts from the extreme pH!</span>")
|
||||
playsound(get_turf(src), 'sound/FermiChem/acidmelt.ogg', 80, 1)
|
||||
SSblackbox.record_feedback("tally", "fermi_chem", 1, "Times beakers have melted from pH")
|
||||
qdel(src)
|
||||
else
|
||||
for(var/mob/M in seen)
|
||||
to_chat(M, "<span class='notice'>[iconhtml] \The [src]'s is damaged by the extreme pH and begins to deform!</span>")
|
||||
playsound(get_turf(src), 'sound/FermiChem/bufferadd.ogg', 50, 1)
|
||||
to_chat(M, "<span class='warning'><i>[iconhtml] Have you tried using plastic beakers (XL) or metabeakers for high pH reactions? These beakers are immune to pH effects.</i></span>")
|
||||
|
||||
@@ -240,7 +240,7 @@
|
||||
name = "Rhinovirus culture bottle"
|
||||
desc = "A small bottle. Contains XY-rhinovirus culture in synthblood medium."
|
||||
spawned_disease = /datum/disease/advance/cold
|
||||
|
||||
|
||||
/obj/item/reagent_containers/glass/bottle/flu_virion
|
||||
name = "Flu virion culture bottle"
|
||||
desc = "A small bottle. Contains H13N1 flu virion culture in synthblood medium."
|
||||
|
||||
@@ -6,6 +6,7 @@
|
||||
reagent_flags = OPENCONTAINER
|
||||
spillable = TRUE
|
||||
resistance_flags = ACID_PROOF
|
||||
container_HP = 3
|
||||
|
||||
|
||||
/obj/item/reagent_containers/glass/attack(mob/M, mob/user, obj/target)
|
||||
@@ -53,7 +54,7 @@
|
||||
|
||||
/obj/item/reagent_containers/glass/afterattack(obj/target, mob/user, proximity)
|
||||
. = ..()
|
||||
if((!proximity) || !spillable || !check_allowed_items(target,target_self=1))
|
||||
if((!proximity) || !check_allowed_items(target,target_self=1))
|
||||
return
|
||||
|
||||
if(target.is_refillable()) //Something like a glass. Player probably wants to transfer TO it.
|
||||
@@ -108,11 +109,13 @@
|
||||
|
||||
/obj/item/reagent_containers/glass/beaker
|
||||
name = "beaker"
|
||||
desc = "A beaker. It can hold up to 50 units."
|
||||
desc = "A beaker. It can hold up to 50 units. Unable to withstand extreme pHes"
|
||||
icon = 'icons/obj/chemical.dmi'
|
||||
icon_state = "beaker"
|
||||
item_state = "beaker"
|
||||
materials = list(MAT_GLASS=500)
|
||||
beaker_weakness_bitflag = PH_WEAK
|
||||
container_HP = 5
|
||||
|
||||
/obj/item/reagent_containers/glass/beaker/Initialize()
|
||||
. = ..()
|
||||
@@ -152,27 +155,33 @@
|
||||
|
||||
/obj/item/reagent_containers/glass/beaker/jar
|
||||
name = "honey jar"
|
||||
desc = "A jar for honey. It can hold up to 50 units of sweet delight."
|
||||
desc = "A jar for honey. It can hold up to 50 units of sweet delight. Unable to withstand reagents of an extreme pH."
|
||||
icon = 'icons/obj/chemical.dmi'
|
||||
icon_state = "vapour"
|
||||
|
||||
/obj/item/reagent_containers/glass/beaker/large
|
||||
name = "large beaker"
|
||||
desc = "A large beaker. Can hold up to 100 units."
|
||||
desc = "A large beaker. Can hold up to 100 units. Unable to withstand reagents of an extreme pH."
|
||||
icon_state = "beakerlarge"
|
||||
materials = list(MAT_GLASS=2500)
|
||||
volume = 100
|
||||
amount_per_transfer_from_this = 10
|
||||
possible_transfer_amounts = list(5,10,15,20,25,30,50,100)
|
||||
container_HP = 6
|
||||
|
||||
/obj/item/reagent_containers/glass/beaker/plastic
|
||||
name = "x-large beaker"
|
||||
desc = "An extra-large beaker. Can hold up to 120 units."
|
||||
desc = "An extra-large beaker. Can hold up to 150 units. Is able to resist acid and alkaline solutions, but melts at 444K"
|
||||
icon_state = "beakerwhite"
|
||||
materials = list(MAT_GLASS=2500, MAT_PLASTIC=3000)
|
||||
volume = 120
|
||||
volume = 150
|
||||
amount_per_transfer_from_this = 10
|
||||
possible_transfer_amounts = list(5,10,15,20,25,30,60,120)
|
||||
possible_transfer_amounts = list(5,10,15,20,25,30,50,100,150)
|
||||
|
||||
/obj/item/reagent_containers/glass/beaker/plastic/Initialize()
|
||||
beaker_weakness_bitflag &= ~PH_WEAK
|
||||
beaker_weakness_bitflag |= TEMP_WEAK
|
||||
. = ..()
|
||||
|
||||
/obj/item/reagent_containers/glass/beaker/plastic/update_icon()
|
||||
icon_state = "beakerlarge" // hack to lets us reuse the large beaker reagent fill states
|
||||
@@ -181,12 +190,16 @@
|
||||
|
||||
/obj/item/reagent_containers/glass/beaker/meta
|
||||
name = "metamaterial beaker"
|
||||
desc = "A large beaker. Can hold up to 180 units."
|
||||
desc = "A large beaker. Can hold up to 200 units. Is able to withstand all chemical situations."
|
||||
icon_state = "beakergold"
|
||||
materials = list(MAT_GLASS=2500, MAT_PLASTIC=3000, MAT_GOLD=1000, MAT_TITANIUM=1000)
|
||||
volume = 180
|
||||
volume = 200
|
||||
amount_per_transfer_from_this = 10
|
||||
possible_transfer_amounts = list(5,10,15,20,25,30,60,120,180)
|
||||
possible_transfer_amounts = list(5,10,15,20,25,30,50,100,200)
|
||||
|
||||
/obj/item/reagent_containers/glass/beaker/meta/Initialize()
|
||||
beaker_weakness_bitflag &= ~PH_WEAK
|
||||
. = ..()
|
||||
|
||||
/obj/item/reagent_containers/glass/beaker/noreact
|
||||
name = "cryostasis beaker"
|
||||
@@ -197,17 +210,24 @@
|
||||
reagent_flags = OPENCONTAINER | NO_REACT
|
||||
volume = 50
|
||||
amount_per_transfer_from_this = 10
|
||||
container_HP = 10//shouldn't be needed
|
||||
|
||||
/obj/item/reagent_containers/glass/beaker/noreact/Initialize()
|
||||
beaker_weakness_bitflag &= ~PH_WEAK
|
||||
. = ..()
|
||||
//reagents.set_reacting(FALSE) was this removed in a recent pr?
|
||||
|
||||
/obj/item/reagent_containers/glass/beaker/bluespace
|
||||
name = "bluespace beaker"
|
||||
desc = "A bluespace beaker, powered by experimental bluespace technology \
|
||||
and Element Cuban combined with the Compound Pete. Can hold up to \
|
||||
300 units."
|
||||
300 units. Unable to withstand reagents of an extreme pH."
|
||||
icon_state = "beakerbluespace"
|
||||
materials = list(MAT_GLASS=3000)
|
||||
volume = 300
|
||||
amount_per_transfer_from_this = 10
|
||||
possible_transfer_amounts = list(5,10,15,20,25,30,50,100,300)
|
||||
container_HP = 8
|
||||
|
||||
/obj/item/reagent_containers/glass/beaker/cryoxadone
|
||||
list_reagents = list("cryoxadone" = 30)
|
||||
@@ -264,6 +284,11 @@
|
||||
SLOT_L_STORE, SLOT_R_STORE,\
|
||||
SLOT_GENERC_DEXTROUS_STORAGE
|
||||
)
|
||||
container_HP = 2
|
||||
|
||||
/obj/item/reagent_containers/glass/bucket/Initialize()
|
||||
beaker_weakness_bitflag |= TEMP_WEAK
|
||||
. = ..()
|
||||
|
||||
/obj/item/reagent_containers/glass/bucket/attackby(obj/O, mob/user, params)
|
||||
if(istype(O, /obj/item/mop))
|
||||
@@ -313,6 +338,11 @@
|
||||
materials = list(MAT_GLASS=0)
|
||||
volume = 50
|
||||
amount_per_transfer_from_this = 10
|
||||
container_HP = 2
|
||||
|
||||
/obj/item/reagent_containers/glass/beaker/waterbottle/Initialize()
|
||||
beaker_weakness_bitflag |= TEMP_WEAK
|
||||
. = ..()
|
||||
|
||||
/obj/item/reagent_containers/glass/beaker/waterbottle/empty
|
||||
list_reagents = list()
|
||||
@@ -324,6 +354,7 @@
|
||||
list_reagents = list("water" = 100)
|
||||
volume = 100
|
||||
amount_per_transfer_from_this = 20
|
||||
container_HP = 2
|
||||
|
||||
/obj/item/reagent_containers/glass/beaker/waterbottle/large/empty
|
||||
list_reagents = list()
|
||||
|
||||
@@ -1,242 +1,259 @@
|
||||
/obj/item/reagent_containers/pill
|
||||
name = "pill"
|
||||
desc = "A tablet or capsule."
|
||||
icon = 'icons/obj/chemical.dmi'
|
||||
icon_state = "pill"
|
||||
item_state = "pill"
|
||||
lefthand_file = 'icons/mob/inhands/equipment/medical_lefthand.dmi'
|
||||
righthand_file = 'icons/mob/inhands/equipment/medical_righthand.dmi'
|
||||
possible_transfer_amounts = list()
|
||||
volume = 50
|
||||
grind_results = list()
|
||||
var/apply_type = INGEST
|
||||
var/apply_method = "swallow"
|
||||
var/roundstart = 0
|
||||
var/self_delay = 0 //pills are instant, this is because patches inheret their aplication from pills
|
||||
var/dissolvable = TRUE
|
||||
|
||||
/obj/item/reagent_containers/pill/Initialize()
|
||||
. = ..()
|
||||
if(!icon_state)
|
||||
icon_state = "pill[rand(1,20)]"
|
||||
if(reagents.total_volume && roundstart)
|
||||
name += " ([reagents.total_volume]u)"
|
||||
|
||||
|
||||
/obj/item/reagent_containers/pill/attack_self(mob/user)
|
||||
return
|
||||
|
||||
|
||||
/obj/item/reagent_containers/pill/attack(mob/M, mob/user, def_zone)
|
||||
if(!canconsume(M, user))
|
||||
return 0
|
||||
|
||||
if(M == user)
|
||||
M.visible_message("<span class='notice'>[user] attempts to [apply_method] [src].</span>")
|
||||
if(self_delay)
|
||||
if(!do_mob(user, M, self_delay))
|
||||
return 0
|
||||
to_chat(M, "<span class='notice'>You [apply_method] [src].</span>")
|
||||
|
||||
else
|
||||
M.visible_message("<span class='danger'>[user] attempts to force [M] to [apply_method] [src].</span>", \
|
||||
"<span class='userdanger'>[user] attempts to force [M] to [apply_method] [src].</span>")
|
||||
if(!do_mob(user, M))
|
||||
return 0
|
||||
M.visible_message("<span class='danger'>[user] forces [M] to [apply_method] [src].</span>", \
|
||||
"<span class='userdanger'>[user] forces [M] to [apply_method] [src].</span>")
|
||||
|
||||
var/makes_me_think = pick(strings("redpill.json", "redpill_questions"))
|
||||
if(icon_state == "pill4" && prob(5)) //you take the red pill - you stay in Wonderland, and I show you how deep the rabbit hole goes
|
||||
addtimer(CALLBACK(GLOBAL_PROC, /proc/to_chat, M, "<span class='notice'>[makes_me_think]</span>"), 50)
|
||||
|
||||
log_combat(user, M, "fed", reagents.log_list())
|
||||
if(reagents.total_volume)
|
||||
reagents.reaction(M, apply_type)
|
||||
reagents.trans_to(M, reagents.total_volume)
|
||||
qdel(src)
|
||||
return 1
|
||||
|
||||
|
||||
/obj/item/reagent_containers/pill/afterattack(obj/target, mob/user , proximity)
|
||||
. = ..()
|
||||
if(!proximity)
|
||||
return
|
||||
if(!dissolvable || !target.is_refillable())
|
||||
return
|
||||
if(target.is_drainable() && !target.reagents.total_volume)
|
||||
to_chat(user, "<span class='warning'>[target] is empty! There's nothing to dissolve [src] in.</span>")
|
||||
return
|
||||
|
||||
if(target.reagents.holder_full())
|
||||
to_chat(user, "<span class='warning'>[target] is full.</span>")
|
||||
return
|
||||
|
||||
to_chat(user, "<span class='notice'>You dissolve [src] in [target].</span>")
|
||||
for(var/mob/O in viewers(2, user)) //viewers is necessary here because of the small radius
|
||||
to_chat(O, "<span class='warning'>[user] slips something into [target]!</span>")
|
||||
reagents.trans_to(target, reagents.total_volume)
|
||||
qdel(src)
|
||||
|
||||
/obj/item/reagent_containers/pill/tox
|
||||
name = "toxins pill"
|
||||
desc = "Highly toxic."
|
||||
icon_state = "pill5"
|
||||
list_reagents = list("toxin" = 50)
|
||||
roundstart = 1
|
||||
|
||||
/obj/item/reagent_containers/pill/cyanide
|
||||
name = "cyanide pill"
|
||||
desc = "Don't swallow this."
|
||||
icon_state = "pill5"
|
||||
list_reagents = list("cyanide" = 50)
|
||||
roundstart = 1
|
||||
|
||||
/obj/item/reagent_containers/pill/adminordrazine
|
||||
name = "adminordrazine pill"
|
||||
desc = "It's magic. We don't have to explain it."
|
||||
icon_state = "pill16"
|
||||
list_reagents = list("adminordrazine" = 50)
|
||||
roundstart = 1
|
||||
|
||||
/obj/item/reagent_containers/pill/morphine
|
||||
name = "morphine pill"
|
||||
desc = "Commonly used to treat insomnia."
|
||||
icon_state = "pill8"
|
||||
list_reagents = list("morphine" = 30)
|
||||
roundstart = 1
|
||||
|
||||
/obj/item/reagent_containers/pill/stimulant
|
||||
name = "stimulant pill"
|
||||
desc = "Often taken by overworked employees, athletes, and the inebriated. You'll snap to attention immediately!"
|
||||
icon_state = "pill19"
|
||||
list_reagents = list("ephedrine" = 10, "antihol" = 10, "coffee" = 30)
|
||||
roundstart = 1
|
||||
|
||||
/obj/item/reagent_containers/pill/salbutamol
|
||||
name = "salbutamol pill"
|
||||
desc = "Used to treat oxygen deprivation."
|
||||
icon_state = "pill16"
|
||||
list_reagents = list("salbutamol" = 30)
|
||||
roundstart = 1
|
||||
|
||||
/obj/item/reagent_containers/pill/charcoal
|
||||
name = "charcoal pill"
|
||||
desc = "Neutralizes many common toxins."
|
||||
icon_state = "pill17"
|
||||
list_reagents = list("charcoal" = 10)
|
||||
roundstart = 1
|
||||
|
||||
/obj/item/reagent_containers/pill/epinephrine
|
||||
name = "epinephrine pill"
|
||||
desc = "Used to stabilize patients."
|
||||
icon_state = "pill5"
|
||||
list_reagents = list("epinephrine" = 15)
|
||||
roundstart = 1
|
||||
|
||||
/obj/item/reagent_containers/pill/mannitol
|
||||
name = "mannitol pill"
|
||||
desc = "Used to treat brain damage."
|
||||
icon_state = "pill17"
|
||||
list_reagents = list("mannitol" = 50)
|
||||
roundstart = 1
|
||||
|
||||
/obj/item/reagent_containers/pill/mutadone
|
||||
name = "mutadone pill"
|
||||
desc = "Used to treat genetic damage."
|
||||
icon_state = "pill20"
|
||||
list_reagents = list("mutadone" = 50)
|
||||
roundstart = 1
|
||||
|
||||
/obj/item/reagent_containers/pill/salicyclic
|
||||
name = "salicylic acid pill"
|
||||
desc = "Used to dull pain."
|
||||
icon_state = "pill9"
|
||||
list_reagents = list("sal_acid" = 24)
|
||||
roundstart = 1
|
||||
|
||||
/obj/item/reagent_containers/pill/oxandrolone
|
||||
name = "oxandrolone pill"
|
||||
desc = "Used to stimulate burn healing."
|
||||
icon_state = "pill11"
|
||||
list_reagents = list("oxandrolone" = 24)
|
||||
roundstart = 1
|
||||
|
||||
/obj/item/reagent_containers/pill/insulin
|
||||
name = "insulin pill"
|
||||
desc = "Handles hyperglycaemic coma."
|
||||
icon_state = "pill18"
|
||||
list_reagents = list("insulin" = 50)
|
||||
roundstart = 1
|
||||
|
||||
/obj/item/reagent_containers/pill/antirad
|
||||
name = "potassium iodide pill"
|
||||
desc = "Used to treat radition used to counter radiation poisoning."
|
||||
icon_state = "pill18"
|
||||
list_reagents = list("potass_iodide" = 50)
|
||||
roundstart = 1
|
||||
|
||||
/obj/item/reagent_containers/pill/antirad_plus
|
||||
name = "prussian blue pill"
|
||||
desc = "Used to treat heavy radition poisoning."
|
||||
icon = 'modular_citadel/icons/obj/modularpills.dmi'
|
||||
icon_state = "prussian_blue"
|
||||
list_reagents = list("prussian_blue" = 25, "water" = 10)
|
||||
roundstart = 1
|
||||
|
||||
/obj/item/reagent_containers/pill/mutarad
|
||||
name = "radiation treatment deluxe pill"
|
||||
desc = "Used to treat heavy radition poisoning and genetic defects."
|
||||
icon = 'modular_citadel/icons/obj/modularpills.dmi'
|
||||
icon_state = "anit_rad_fixgene"
|
||||
list_reagents = list("prussian_blue" = 15, "potass_iodide" = 15, "mutadone" = 15, "water" = 5)
|
||||
roundstart = 1
|
||||
|
||||
///////////////////////////////////////// this pill is used only in a legion mob drop
|
||||
/obj/item/reagent_containers/pill/shadowtoxin
|
||||
name = "black pill"
|
||||
desc = "I wouldn't eat this if I were you."
|
||||
icon_state = "pill9"
|
||||
color = "#454545"
|
||||
list_reagents = list("shadowmutationtoxin" = 1)
|
||||
//////////////////////////////////////// drugs
|
||||
/obj/item/reagent_containers/pill/zoom
|
||||
name = "zoom pill"
|
||||
list_reagents = list("synaptizine" = 10, "nicotine" = 10, "methamphetamine" = 1)
|
||||
|
||||
|
||||
/obj/item/reagent_containers/pill/happy
|
||||
name = "happy pill"
|
||||
list_reagents = list("sugar" = 10, "space_drugs" = 10)
|
||||
|
||||
|
||||
/obj/item/reagent_containers/pill/lsd
|
||||
name = "hallucinogen pill"
|
||||
list_reagents = list("mushroomhallucinogen" = 15, "mindbreaker" = 15)
|
||||
|
||||
|
||||
/obj/item/reagent_containers/pill/aranesp
|
||||
name = "speedy pill"
|
||||
list_reagents = list("aranesp" = 10)
|
||||
|
||||
/obj/item/reagent_containers/pill/floorpill
|
||||
name = "floorpill"
|
||||
desc = "A strange pill found in the depths of maintenance"
|
||||
icon_state = "pill21"
|
||||
var/static/list/names = list("maintenance pill","floorpill","mystery pill","suspicious pill","strange pill")
|
||||
var/static/list/descs = list("Your feeling is telling you no, but...","Drugs are expensive, you can't afford not to eat any pills that you find."\
|
||||
, "Surely, there's no way this could go bad.")
|
||||
|
||||
/obj/item/reagent_containers/pill/floorpill/Initialize()
|
||||
list_reagents = list(get_random_reagent_id() = rand(10,50))
|
||||
. = ..()
|
||||
name = pick(names)
|
||||
if(prob(20))
|
||||
desc = pick(descs)
|
||||
|
||||
/obj/item/reagent_containers/pill/get_belt_overlay()
|
||||
return mutable_appearance('icons/obj/clothing/belt_overlays.dmi', "pouch")
|
||||
|
||||
/obj/item/reagent_containers/pill/penis_enlargement
|
||||
name = "penis enlargement pill"
|
||||
list_reagents = list("penis_enlargement" = 30)
|
||||
/obj/item/reagent_containers/pill
|
||||
name = "pill"
|
||||
desc = "A tablet or capsule."
|
||||
icon = 'icons/obj/chemical.dmi'
|
||||
icon_state = "pill"
|
||||
item_state = "pill"
|
||||
lefthand_file = 'icons/mob/inhands/equipment/medical_lefthand.dmi'
|
||||
righthand_file = 'icons/mob/inhands/equipment/medical_righthand.dmi'
|
||||
possible_transfer_amounts = list()
|
||||
volume = 50
|
||||
grind_results = list()
|
||||
var/apply_type = INGEST
|
||||
var/apply_method = "swallow"
|
||||
var/roundstart = 0
|
||||
var/self_delay = 0 //pills are instant, this is because patches inheret their aplication from pills
|
||||
var/dissolvable = TRUE
|
||||
|
||||
/obj/item/reagent_containers/pill/Initialize()
|
||||
. = ..()
|
||||
if(!icon_state)
|
||||
icon_state = "pill[rand(1,20)]"
|
||||
if(reagents.total_volume && roundstart)
|
||||
name += " ([reagents.total_volume]u)"
|
||||
|
||||
|
||||
/obj/item/reagent_containers/pill/attack_self(mob/user)
|
||||
return
|
||||
|
||||
|
||||
/obj/item/reagent_containers/pill/attack(mob/M, mob/user, def_zone)
|
||||
if(!canconsume(M, user))
|
||||
return 0
|
||||
|
||||
if(M == user)
|
||||
M.visible_message("<span class='notice'>[user] attempts to [apply_method] [src].</span>")
|
||||
if(self_delay)
|
||||
if(!do_mob(user, M, self_delay))
|
||||
return 0
|
||||
to_chat(M, "<span class='notice'>You [apply_method] [src].</span>")
|
||||
|
||||
else
|
||||
M.visible_message("<span class='danger'>[user] attempts to force [M] to [apply_method] [src].</span>", \
|
||||
"<span class='userdanger'>[user] attempts to force [M] to [apply_method] [src].</span>")
|
||||
if(!do_mob(user, M))
|
||||
return 0
|
||||
M.visible_message("<span class='danger'>[user] forces [M] to [apply_method] [src].</span>", \
|
||||
"<span class='userdanger'>[user] forces [M] to [apply_method] [src].</span>")
|
||||
|
||||
var/makes_me_think = pick(strings("redpill.json", "redpill_questions"))
|
||||
if(icon_state == "pill4" && prob(5)) //you take the red pill - you stay in Wonderland, and I show you how deep the rabbit hole goes
|
||||
addtimer(CALLBACK(GLOBAL_PROC, /proc/to_chat, M, "<span class='notice'>[makes_me_think]</span>"), 50)
|
||||
|
||||
log_combat(user, M, "fed", reagents.log_list())
|
||||
if(reagents.total_volume)
|
||||
reagents.reaction(M, apply_type)
|
||||
reagents.trans_to(M, reagents.total_volume)
|
||||
qdel(src)
|
||||
return 1
|
||||
|
||||
|
||||
/obj/item/reagent_containers/pill/afterattack(obj/target, mob/user , proximity)
|
||||
. = ..()
|
||||
if(!proximity)
|
||||
return
|
||||
if(!dissolvable || !target.is_refillable())
|
||||
return
|
||||
if(target.is_drainable() && !target.reagents.total_volume)
|
||||
to_chat(user, "<span class='warning'>[target] is empty! There's nothing to dissolve [src] in.</span>")
|
||||
return
|
||||
|
||||
if(target.reagents.holder_full())
|
||||
to_chat(user, "<span class='warning'>[target] is full.</span>")
|
||||
return
|
||||
|
||||
to_chat(user, "<span class='notice'>You dissolve [src] in [target].</span>")
|
||||
for(var/mob/O in viewers(2, user)) //viewers is necessary here because of the small radius
|
||||
to_chat(O, "<span class='warning'>[user] slips something into [target]!</span>")
|
||||
reagents.trans_to(target, reagents.total_volume)
|
||||
qdel(src)
|
||||
|
||||
/obj/item/reagent_containers/pill/tox
|
||||
name = "toxins pill"
|
||||
desc = "Highly toxic."
|
||||
icon_state = "pill5"
|
||||
list_reagents = list("toxin" = 50)
|
||||
roundstart = 1
|
||||
|
||||
/obj/item/reagent_containers/pill/cyanide
|
||||
name = "cyanide pill"
|
||||
desc = "Don't swallow this."
|
||||
icon_state = "pill5"
|
||||
list_reagents = list("cyanide" = 50)
|
||||
roundstart = 1
|
||||
|
||||
/obj/item/reagent_containers/pill/adminordrazine
|
||||
name = "adminordrazine pill"
|
||||
desc = "It's magic. We don't have to explain it."
|
||||
icon_state = "pill16"
|
||||
list_reagents = list("adminordrazine" = 50)
|
||||
roundstart = 1
|
||||
|
||||
/obj/item/reagent_containers/pill/morphine
|
||||
name = "morphine pill"
|
||||
desc = "Commonly used to treat insomnia."
|
||||
icon_state = "pill8"
|
||||
list_reagents = list("morphine" = 30)
|
||||
roundstart = 1
|
||||
|
||||
/obj/item/reagent_containers/pill/stimulant
|
||||
name = "stimulant pill"
|
||||
desc = "Often taken by overworked employees, athletes, and the inebriated. You'll snap to attention immediately!"
|
||||
icon_state = "pill19"
|
||||
list_reagents = list("ephedrine" = 10, "antihol" = 10, "coffee" = 30)
|
||||
roundstart = 1
|
||||
|
||||
/obj/item/reagent_containers/pill/salbutamol
|
||||
name = "salbutamol pill"
|
||||
desc = "Used to treat oxygen deprivation."
|
||||
icon_state = "pill16"
|
||||
list_reagents = list("salbutamol" = 30)
|
||||
roundstart = 1
|
||||
|
||||
/obj/item/reagent_containers/pill/charcoal
|
||||
name = "charcoal pill"
|
||||
desc = "Neutralizes many common toxins."
|
||||
icon_state = "pill17"
|
||||
list_reagents = list("charcoal" = 10)
|
||||
roundstart = 1
|
||||
|
||||
/obj/item/reagent_containers/pill/epinephrine
|
||||
name = "epinephrine pill"
|
||||
desc = "Used to stabilize patients."
|
||||
icon_state = "pill5"
|
||||
list_reagents = list("epinephrine" = 15)
|
||||
roundstart = 1
|
||||
|
||||
/obj/item/reagent_containers/pill/mannitol
|
||||
name = "mannitol pill"
|
||||
desc = "Used to treat brain damage."
|
||||
icon_state = "pill17"
|
||||
list_reagents = list("mannitol" = 50)
|
||||
roundstart = 1
|
||||
|
||||
/obj/item/reagent_containers/pill/mutadone
|
||||
name = "mutadone pill"
|
||||
desc = "Used to treat genetic damage."
|
||||
icon_state = "pill20"
|
||||
list_reagents = list("mutadone" = 50)
|
||||
roundstart = 1
|
||||
|
||||
/obj/item/reagent_containers/pill/salicyclic
|
||||
name = "salicylic acid pill"
|
||||
desc = "Used to dull pain."
|
||||
icon_state = "pill9"
|
||||
list_reagents = list("sal_acid" = 24)
|
||||
roundstart = 1
|
||||
|
||||
/obj/item/reagent_containers/pill/oxandrolone
|
||||
name = "oxandrolone pill"
|
||||
desc = "Used to stimulate burn healing."
|
||||
icon_state = "pill11"
|
||||
list_reagents = list("oxandrolone" = 24)
|
||||
roundstart = 1
|
||||
|
||||
/obj/item/reagent_containers/pill/insulin
|
||||
name = "insulin pill"
|
||||
desc = "Handles hyperglycaemic coma."
|
||||
icon_state = "pill18"
|
||||
list_reagents = list("insulin" = 50)
|
||||
roundstart = 1
|
||||
|
||||
/obj/item/reagent_containers/pill/psicodine
|
||||
name = "psicodine pill"
|
||||
desc = "Used to treat mental instability and traumas."
|
||||
list_reagents = list("psicodine" = 10)
|
||||
icon_state = "pill22"
|
||||
roundstart = 1
|
||||
|
||||
/obj/item/reagent_containers/pill/antirad
|
||||
name = "potassium iodide pill"
|
||||
desc = "Used to treat radition used to counter radiation poisoning."
|
||||
icon_state = "pill18"
|
||||
list_reagents = list("potass_iodide" = 50)
|
||||
roundstart = 1
|
||||
|
||||
/obj/item/reagent_containers/pill/antirad_plus
|
||||
name = "prussian blue pill"
|
||||
desc = "Used to treat heavy radition poisoning."
|
||||
icon = 'modular_citadel/icons/obj/modularpills.dmi'
|
||||
icon_state = "prussian_blue"
|
||||
list_reagents = list("prussian_blue" = 25, "water" = 10)
|
||||
roundstart = 1
|
||||
|
||||
/obj/item/reagent_containers/pill/mutarad
|
||||
name = "radiation treatment deluxe pill"
|
||||
desc = "Used to treat heavy radition poisoning and genetic defects."
|
||||
icon = 'modular_citadel/icons/obj/modularpills.dmi'
|
||||
icon_state = "anit_rad_fixgene"
|
||||
list_reagents = list("prussian_blue" = 15, "potass_iodide" = 15, "mutadone" = 15, "water" = 5)
|
||||
roundstart = 1
|
||||
|
||||
///////////////////////////////////////// this pill is used only in a legion mob drop
|
||||
/obj/item/reagent_containers/pill/shadowtoxin
|
||||
name = "black pill"
|
||||
desc = "I wouldn't eat this if I were you."
|
||||
icon_state = "pill9"
|
||||
color = "#454545"
|
||||
list_reagents = list("shadowmutationtoxin" = 1)
|
||||
//////////////////////////////////////// drugs
|
||||
/obj/item/reagent_containers/pill/zoom
|
||||
name = "zoom pill"
|
||||
list_reagents = list("synaptizine" = 10, "nicotine" = 10, "methamphetamine" = 1)
|
||||
|
||||
|
||||
/obj/item/reagent_containers/pill/happy
|
||||
name = "happy pill"
|
||||
list_reagents = list("sugar" = 10, "space_drugs" = 10)
|
||||
|
||||
|
||||
/obj/item/reagent_containers/pill/lsd
|
||||
name = "hallucinogen pill"
|
||||
list_reagents = list("mushroomhallucinogen" = 15, "mindbreaker" = 15)
|
||||
|
||||
|
||||
/obj/item/reagent_containers/pill/aranesp
|
||||
name = "speedy pill"
|
||||
list_reagents = list("aranesp" = 10)
|
||||
|
||||
/obj/item/reagent_containers/pill/happiness
|
||||
name = "happiness pill"
|
||||
desc = "It has a creepy smiling face on it."
|
||||
icon_state = "pill_happy"
|
||||
list_reagents = list("happiness" = 10)
|
||||
|
||||
/obj/item/reagent_containers/pill/floorpill
|
||||
name = "floorpill"
|
||||
desc = "A strange pill found in the depths of maintenance"
|
||||
icon_state = "pill21"
|
||||
var/static/list/names = list("maintenance pill","floorpill","mystery pill","suspicious pill","strange pill")
|
||||
var/static/list/descs = list("Your feeling is telling you no, but...","Drugs are expensive, you can't afford not to eat any pills that you find."\
|
||||
, "Surely, there's no way this could go bad.")
|
||||
|
||||
/obj/item/reagent_containers/pill/floorpill/Initialize()
|
||||
list_reagents = list(get_random_reagent_id() = rand(10,50))
|
||||
. = ..()
|
||||
name = pick(names)
|
||||
if(prob(20))
|
||||
desc = pick(descs)
|
||||
|
||||
/obj/item/reagent_containers/pill/get_belt_overlay()
|
||||
return mutable_appearance('icons/obj/clothing/belt_overlays.dmi', "pouch")
|
||||
|
||||
/obj/item/reagent_containers/pill/penis_enlargement
|
||||
name = "penis enlargement pill"
|
||||
list_reagents = list("penis_enlarger" = 10)
|
||||
|
||||
/obj/item/reagent_containers/pill/breast_enlargement
|
||||
name = "breast enlargement pill"
|
||||
list_reagents = list("breast_enlarger" = 10)
|
||||
|
||||
@@ -0,0 +1,177 @@
|
||||
/obj/item/reagent_containers/rag
|
||||
name = "damp rag"
|
||||
desc = "For cleaning up messes, you suppose."
|
||||
w_class = WEIGHT_CLASS_TINY
|
||||
icon = 'icons/obj/toy.dmi'
|
||||
icon_state = "rag"
|
||||
item_flags = NOBLUDGEON
|
||||
reagent_flags = OPENCONTAINER
|
||||
amount_per_transfer_from_this = 5
|
||||
possible_transfer_amounts = list()
|
||||
volume = 5
|
||||
spillable = FALSE
|
||||
var/wipe_sound
|
||||
var/soak_efficiency = 1
|
||||
var/extinguish_efficiency = 0
|
||||
var/action_speed = 3 SECONDS
|
||||
var/damp_threshold = 0.5
|
||||
|
||||
/obj/item/reagent_containers/rag/suicide_act(mob/user)
|
||||
user.visible_message("<span class='suicide'>[user] is smothering [user.p_them()]self with [src]! It looks like [user.p_theyre()] trying to commit suicide!</span>")
|
||||
return (OXYLOSS)
|
||||
|
||||
/obj/item/reagent_containers/rag/examine(mob/user)
|
||||
. = ..()
|
||||
if(reagents.total_volume)
|
||||
to_chat(user, "<span class='notice'>Alt-Click to squeeze the liquids out of it.</span>")
|
||||
|
||||
/obj/item/reagent_containers/rag/afterattack(atom/A as obj|turf|area, mob/user,proximity)
|
||||
. = ..()
|
||||
if(!proximity)
|
||||
return
|
||||
if(iscarbon(A) && A.reagents && reagents.total_volume)
|
||||
var/mob/living/carbon/C = A
|
||||
var/reagentlist = pretty_string_from_reagent_list(reagents)
|
||||
var/log_object = "a damp rag containing [reagentlist]"
|
||||
if(user.a_intent == INTENT_HARM && !C.is_mouth_covered())
|
||||
reagents.reaction(C, INGEST)
|
||||
reagents.trans_to(C, 5)
|
||||
C.visible_message("<span class='danger'>[user] has smothered \the [C] with \the [src]!</span>", "<span class='userdanger'>[user] has smothered you with \the [src]!</span>", "<span class='italics'>You hear some struggling and muffled cries of surprise.</span>")
|
||||
log_combat(user, C, "smothered", log_object)
|
||||
else
|
||||
reagents.reaction(C, TOUCH)
|
||||
reagents.remove_all(5)
|
||||
C.visible_message("<span class='notice'>[user] has touched \the [C] with \the [src].</span>")
|
||||
log_combat(user, C, "touched", log_object)
|
||||
|
||||
else if(istype(A) && src in user)
|
||||
user.visible_message("[user] starts to wipe down [A] with [src]!", "<span class='notice'>You start to wipe down [A] with [src]...</span>")
|
||||
if(do_after(user, action_speed, target = A))
|
||||
user.visible_message("[user] finishes wiping off [A]!", "<span class='notice'>You finish wiping off [A].</span>")
|
||||
SEND_SIGNAL(A, COMSIG_COMPONENT_CLEAN_ACT, CLEAN_MEDIUM)
|
||||
return
|
||||
|
||||
/obj/item/reagent_containers/rag/pre_altattackby(mob/living/M, mob/living/user, params)
|
||||
if(istype(M) && user.a_intent == INTENT_HELP)
|
||||
user.changeNext_move(CLICK_CD_MELEE)
|
||||
if(M.on_fire)
|
||||
user.visible_message("<span class='warning'>\The [user] uses \the [src] to pat out [M == user ? "[user.p_their()]" : "\the [M]'s"] flames!</span>")
|
||||
if(hitsound)
|
||||
playsound(M, hitsound, 25, 1)
|
||||
M.adjust_fire_stacks(-min(extinguish_efficiency, M.fire_stacks))
|
||||
else
|
||||
if(reagents.total_volume > (volume * damp_threshold))
|
||||
to_chat(user, "<span class='warning'>\The [src] is too drenched to be used to dry [user == M ? "yourself" : "\the [M]"] off.</span>")
|
||||
return TRUE
|
||||
user.visible_message("<span class='notice'>\The [user] starts drying [M == user ? "[user.p_them()]self" : "\the [M]"] off with \the [src]...</span>")
|
||||
if(do_mob(user, M, action_speed))
|
||||
if(reagents.total_volume > (volume * damp_threshold))
|
||||
return
|
||||
user.visible_message("<span class='notice'>\The [user] dries [M == user ? "[user.p_them()]self" : "\the [M]"] off with \the [src].</span>")
|
||||
if(wipe_sound)
|
||||
playsound(M, wipe_sound, 25, 1)
|
||||
if(M.fire_stacks)
|
||||
var/minus_plus = M.fire_stacks < 0 ? 1 : -1
|
||||
var/amount = min(abs(M.fire_stacks), soak_efficiency)
|
||||
var/r_id = "fuel"
|
||||
if(M.fire_stacks < 0)
|
||||
r_id = "water"
|
||||
reagents.add_reagent(r_id, amount * 0.3)
|
||||
M.adjust_fire_stacks(minus_plus * amount)
|
||||
M.wash_cream()
|
||||
return TRUE
|
||||
return ..()
|
||||
|
||||
/obj/item/reagent_containers/rag/AltClick(mob/user)
|
||||
. = ..()
|
||||
if(reagents.total_volume && user.canUseTopic(src, BE_CLOSE))
|
||||
to_chat(user, "<span class='notice'>You start squeezing the liquids out of \the [src]...</span>")
|
||||
if(do_after(user, action_speed, TRUE, src))
|
||||
to_chat(user, "<span class='notice'>You squeeze \the [src] dry.</span>")
|
||||
var/atom/react_loc = get_turf(src)
|
||||
if(ismob(react_loc))
|
||||
react_loc = react_loc.loc
|
||||
if(react_loc)
|
||||
reagents.reaction(react_loc, TOUCH)
|
||||
reagents.clear_reagents()
|
||||
|
||||
/obj/item/reagent_containers/rag/towel
|
||||
name = "towel"
|
||||
desc = "A soft cotton towel."
|
||||
icon = 'icons/obj/items_and_weapons.dmi'
|
||||
icon_state = "towel"
|
||||
item_state = "towel"
|
||||
slot_flags = ITEM_SLOT_HEAD | ITEM_SLOT_BELT | ITEM_SLOT_OCLOTHING
|
||||
item_flags = NOBLUDGEON | NO_UNIFORM_REQUIRED //so it can be worn on the belt slot even with no uniform.
|
||||
force = 1
|
||||
w_class = WEIGHT_CLASS_NORMAL
|
||||
attack_verb = list("whipped")
|
||||
hitsound = 'sound/items/towelwhip.ogg'
|
||||
volume = 10
|
||||
total_mass = 2
|
||||
wipe_sound = 'sound/items/towelwipe.ogg'
|
||||
soak_efficiency = 4
|
||||
extinguish_efficiency = 3
|
||||
var/flat_icon = "towel_flat"
|
||||
var/folded_icon = "towel"
|
||||
var/list/possible_colors
|
||||
|
||||
/obj/item/reagent_containers/rag/towel/Initialize()
|
||||
. = ..()
|
||||
if(possible_colors)
|
||||
add_atom_colour(pick(possible_colors), FIXED_COLOUR_PRIORITY)
|
||||
|
||||
/obj/item/reagent_containers/rag/towel/attack(mob/living/M, mob/living/user)
|
||||
if(user.a_intent == INTENT_HARM)
|
||||
DISABLE_BITFIELD(item_flags, NOBLUDGEON)
|
||||
. = TRUE
|
||||
..()
|
||||
if(.)
|
||||
ENABLE_BITFIELD(item_flags, NOBLUDGEON)
|
||||
|
||||
/obj/item/reagent_containers/rag/towel/equipped(mob/living/user, slot)
|
||||
. = ..()
|
||||
switch(slot)
|
||||
if(SLOT_BELT)
|
||||
body_parts_covered = GROIN|LEGS
|
||||
if(SLOT_WEAR_SUIT)
|
||||
body_parts_covered = CHEST|GROIN|LEGS
|
||||
if(SLOT_HEAD)
|
||||
body_parts_covered = HEAD
|
||||
flags_inv = HIDEHAIR
|
||||
|
||||
/obj/item/reagent_containers/rag/towel/dropped(mob/user)
|
||||
. = ..()
|
||||
body_parts_covered = NONE
|
||||
flags_inv = NONE
|
||||
|
||||
/obj/item/reagent_containers/rag/towel/attack_self(mob/user)
|
||||
if(!user.CanReach(src) || !user.dropItemToGround(src))
|
||||
return
|
||||
to_chat(user, "<span class='notice'>You lay out \the [src] flat on the ground.</span>")
|
||||
icon_state = flat_icon
|
||||
layer = BELOW_OBJ_LAYER
|
||||
|
||||
/obj/item/reagent_containers/rag/towel/pickup(mob/living/user)
|
||||
. = ..()
|
||||
icon_state = folded_icon
|
||||
layer = initial(layer)
|
||||
|
||||
/obj/item/reagent_containers/rag/towel/on_reagent_change(changetype)
|
||||
force = initial(force) + round(reagents.total_volume * 0.5)
|
||||
|
||||
/obj/item/reagent_containers/rag/towel/random
|
||||
possible_colors = list("#FF0000","#FF7F00","#FFFF00","#00FF00","#0000FF","#4B0082","#8F00FF")
|
||||
|
||||
/obj/item/reagent_containers/rag/towel/syndicate
|
||||
name = "syndicate towel"
|
||||
desc = "Truly a weapon of mass destruction."
|
||||
possible_colors = list("#DD1A1A", "#DB4325", "#E02700")
|
||||
force = 4
|
||||
armour_penetration = 10
|
||||
volume = 20
|
||||
soak_efficiency = 6
|
||||
extinguish_efficiency = 5
|
||||
action_speed = 15
|
||||
damp_threshold = 0.8
|
||||
armor = list("melee" = 0, "bullet" = 0, "laser" = 0, "energy" = 0, "bomb" = 20, "bio" = 20, "rad" = 20, "fire" = 50, "acid" = 50) //items don't provide armor to wearers unlike clothing yet.
|
||||
Reference in New Issue
Block a user