mirror of
https://github.com/KabKebab/GS13.git
synced 2026-07-14 09:28:26 +01:00
Merge remote-tracking branch 'upstream/master'
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
#define CHEMICAL_QUANTISATION_LEVEL 0.0001
|
||||
#define CHEMICAL_QUANTISATION_LEVEL 0.001
|
||||
|
||||
/proc/build_chemical_reagent_list()
|
||||
//Chemical Reagents - Initialises all /datum/reagent into a list indexed by reagent id
|
||||
@@ -466,7 +466,7 @@
|
||||
|
||||
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
|
||||
var/datum/chemical_reaction/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)
|
||||
@@ -496,7 +496,12 @@
|
||||
|
||||
//Standard reaction mechanics:
|
||||
else
|
||||
if (C.FermiChem == TRUE)//Just to make sure
|
||||
if (C.FermiChem == TRUE)//Just to make sure, should only proc when grenades are combining.
|
||||
if (chem_temp > C.ExplodeTemp) //To allow fermigrenades
|
||||
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
|
||||
|
||||
for(var/B in cached_required_reagents) //
|
||||
@@ -539,7 +544,7 @@
|
||||
return 0
|
||||
|
||||
/datum/reagents/process()
|
||||
var/datum/chemical_reaction/fermi/C = fermiReactID
|
||||
var/datum/chemical_reaction/C = fermiReactID
|
||||
|
||||
var/list/cached_required_reagents = C.required_reagents//update reagents list
|
||||
var/list/cached_results = C.results//resultant chemical list
|
||||
@@ -575,16 +580,16 @@
|
||||
return
|
||||
|
||||
/datum/reagents/proc/fermiEnd()
|
||||
var/datum/chemical_reaction/fermi/C = fermiReactID
|
||||
var/datum/chemical_reaction/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)
|
||||
C.FermiFinish(src, my_atom, reactedVol)
|
||||
reactedVol = 0
|
||||
targetVol = 0
|
||||
handle_reactions()
|
||||
update_total()
|
||||
//Reaction sounds and words
|
||||
@@ -595,7 +600,7 @@
|
||||
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/datum/chemical_reaction/C = selected_reaction
|
||||
var/deltaT = 0
|
||||
var/deltapH = 0
|
||||
var/stepChemAmmount = 0
|
||||
@@ -704,7 +709,7 @@
|
||||
return (reactedVol)
|
||||
|
||||
//Currently calculates it irrespective of required reagents at the start
|
||||
/datum/reagents/proc/reactant_purity(var/datum/chemical_reaction/fermi/C, holder)
|
||||
/datum/reagents/proc/reactant_purity(var/datum/chemical_reaction/C, holder)
|
||||
var/list/cached_reagents = reagent_list
|
||||
var/i = 0
|
||||
var/cachedPurity
|
||||
@@ -714,6 +719,14 @@
|
||||
i++
|
||||
return cachedPurity/i
|
||||
|
||||
/datum/reagents/proc/uncache_purity(id)
|
||||
var/datum/reagent/R = has_reagent("[id]")
|
||||
if(!R)
|
||||
return
|
||||
if(R.cached_purity == 1)
|
||||
return
|
||||
R.purity = R.cached_purity
|
||||
|
||||
/datum/reagents/proc/isolate_reagent(reagent)
|
||||
var/list/cached_reagents = reagent_list
|
||||
for(var/_reagent in cached_reagents)
|
||||
@@ -745,11 +758,14 @@
|
||||
total_volume = 0
|
||||
for(var/reagent in cached_reagents)
|
||||
var/datum/reagent/R = reagent
|
||||
if(R.volume < CHEMICAL_QUANTISATION_LEVEL)
|
||||
if(R.volume == 0)
|
||||
del_reagent(R.id)
|
||||
if((R.volume < 0.01) && !fermiIsReacting)
|
||||
del_reagent(R.id)
|
||||
else
|
||||
total_volume += R.volume
|
||||
|
||||
if(!reagent_list)
|
||||
pH = 7
|
||||
return 0
|
||||
|
||||
/datum/reagents/proc/clear_reagents()
|
||||
@@ -878,17 +894,15 @@
|
||||
var/datum/reagent/R = A
|
||||
if (R.id == reagent) //IF MERGING
|
||||
//Add amount and equalize purity
|
||||
R.volume += amount
|
||||
R.volume += round(amount, CHEMICAL_QUANTISATION_LEVEL)
|
||||
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)
|
||||
if(isliving(my_atom))
|
||||
if(R.OnMobMergeCheck == TRUE)//Forces on_mob_add proc when a chem is merged
|
||||
if(R.chemical_flags & REAGENT_ONMOBMERGE)//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()
|
||||
@@ -900,13 +914,13 @@
|
||||
var/datum/reagent/R = new D.type(data)
|
||||
cached_reagents += R
|
||||
R.holder = src
|
||||
R.volume = amount
|
||||
R.volume = round(amount, CHEMICAL_QUANTISATION_LEVEL)
|
||||
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.
|
||||
if(R.chemical_flags & REAGENT_FORCEONNEW)//Allows on new without data overhead.
|
||||
R.on_new(pH) //Add more as desired.
|
||||
|
||||
|
||||
@@ -1134,4 +1148,4 @@
|
||||
if(initial(R.can_synth))
|
||||
random_reagents += initial(R.id)
|
||||
var/picked_reagent = pick(random_reagents)
|
||||
return picked_reagent
|
||||
return picked_reagent
|
||||
@@ -488,6 +488,7 @@
|
||||
"pwr_game",
|
||||
"shamblers",
|
||||
"sugar",
|
||||
"pineapplejuice",
|
||||
"orangejuice",
|
||||
"grenadine",
|
||||
"limejuice",
|
||||
@@ -502,7 +503,8 @@
|
||||
)
|
||||
upgrade_reagents2 = list(
|
||||
"banana",
|
||||
"berryjuice"
|
||||
"berryjuice",
|
||||
"strawberryjuice"
|
||||
)
|
||||
upgrade_reagents3 = null
|
||||
emagged_reagents = list(
|
||||
@@ -554,6 +556,7 @@
|
||||
"hcider",
|
||||
"creme_de_menthe",
|
||||
"creme_de_cacao",
|
||||
"creme_de_coconut",
|
||||
"triple_sec",
|
||||
"sake",
|
||||
"applejack"
|
||||
|
||||
@@ -79,6 +79,15 @@
|
||||
return
|
||||
return ..()
|
||||
|
||||
if(beaker)
|
||||
if(istype(I, /obj/item/reagent_containers/dropper))
|
||||
var/obj/item/reagent_containers/dropper/D = I
|
||||
D.afterattack(beaker, user, 1)
|
||||
|
||||
if(istype(I, /obj/item/reagent_containers/syringe))
|
||||
var/obj/item/reagent_containers/syringe/S = I
|
||||
S.afterattack(beaker, user, 1)
|
||||
|
||||
/obj/machinery/chem_heater/on_deconstruction()
|
||||
replace_beaker()
|
||||
return ..()
|
||||
|
||||
@@ -233,6 +233,12 @@
|
||||
else
|
||||
reagents.remove_reagent(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()
|
||||
reagents.trans_id_to(beaker, id, useramount)
|
||||
. = TRUE
|
||||
|
||||
if("toggleMode")
|
||||
mode = !mode
|
||||
@@ -332,7 +338,7 @@
|
||||
var/vol_part = min(reagents.total_volume, 30)
|
||||
if(text2num(many))
|
||||
amount_full = round(reagents.total_volume / 30)
|
||||
vol_part = reagents.total_volume % 30
|
||||
vol_part = ((reagents.total_volume*1000) % 30000) / 1000 //% operator doesn't support decimals.
|
||||
var/name = stripped_input(usr, "Name:","Name your bottle!", (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
|
||||
@@ -379,7 +385,34 @@
|
||||
reagents.trans_to(P, vol_part)
|
||||
. = TRUE
|
||||
//END CITADEL ADDITIONS
|
||||
if("analyze")
|
||||
if("analyzeBeak")
|
||||
var/datum/reagent/R = GLOB.chemical_reagents_list[params["id"]]
|
||||
if(R)
|
||||
var/state = "Unknown"
|
||||
if(initial(R.reagent_state) == 1)
|
||||
state = "Solid"
|
||||
else if(initial(R.reagent_state) == 2)
|
||||
state = "Liquid"
|
||||
else if(initial(R.reagent_state) == 3)
|
||||
state = "Gas"
|
||||
var/const/P = 3 //The number of seconds between life ticks
|
||||
var/T = initial(R.metabolization_rate) * (60 / P)
|
||||
var/datum/chemical_reaction/Rcr = get_chemical_reaction(R.id)
|
||||
if(Rcr && Rcr.FermiChem)
|
||||
fermianalyze = TRUE
|
||||
var/pHpeakCache = (Rcr.OptimalpHMin + Rcr.OptimalpHMax)/2
|
||||
var/datum/reagent/targetReagent = beaker.reagents.has_reagent("[R.id]")
|
||||
|
||||
if(!targetReagent)
|
||||
CRASH("Tried to find a reagent that doesn't exist in the chem_master!")
|
||||
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" = targetReagent.purity, "inverseRatioF" = initial(R.inverse_chem_val), "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
|
||||
|
||||
if("analyzeBuff")
|
||||
var/datum/reagent/R = GLOB.chemical_reagents_list[params["id"]]
|
||||
if(R)
|
||||
var/state = "Unknown"
|
||||
@@ -395,7 +428,11 @@
|
||||
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)
|
||||
var/datum/reagent/targetReagent = reagents.has_reagent("[R.id]")
|
||||
|
||||
if(!targetReagent)
|
||||
CRASH("Tried to find a reagent that doesn't exist in the chem_master!")
|
||||
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" = targetReagent.purity, "inverseRatioF" = initial(R.inverse_chem_val), "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))
|
||||
@@ -451,4 +488,4 @@
|
||||
condi = TRUE
|
||||
|
||||
#undef PILL_STYLE_COUNT
|
||||
#undef RANDOM_PILL_STYLE
|
||||
#undef RANDOM_PILL_STYLE
|
||||
@@ -125,12 +125,6 @@
|
||||
else
|
||||
cut_overlays()
|
||||
|
||||
/obj/machinery/computer/pandemic/proc/eject_beaker()
|
||||
if(beaker)
|
||||
beaker.forceMove(drop_location())
|
||||
beaker = null
|
||||
update_icon()
|
||||
|
||||
/obj/machinery/computer/pandemic/ui_interact(mob/user, ui_key = "main", datum/tgui/ui, force_open = FALSE, datum/tgui/master_ui, datum/ui_state/state = GLOB.default_state)
|
||||
ui = SStgui.try_update_ui(user, src, ui_key, ui, force_open)
|
||||
if(!ui)
|
||||
@@ -165,7 +159,7 @@
|
||||
return
|
||||
switch(action)
|
||||
if("eject_beaker")
|
||||
eject_beaker()
|
||||
replace_beaker(usr)
|
||||
. = TRUE
|
||||
if("empty_beaker")
|
||||
if(beaker)
|
||||
@@ -174,7 +168,7 @@
|
||||
if("empty_eject_beaker")
|
||||
if(beaker)
|
||||
beaker.reagents.clear_reagents()
|
||||
eject_beaker()
|
||||
replace_beaker(usr)
|
||||
. = TRUE
|
||||
if("rename_disease")
|
||||
var/id = get_virus_id_by_index(text2num(params["index"]))
|
||||
@@ -232,18 +226,32 @@
|
||||
. = TRUE //no afterattack
|
||||
if(stat & (NOPOWER|BROKEN))
|
||||
return
|
||||
if(beaker)
|
||||
to_chat(user, "<span class='warning'>A container is already loaded into [src]!</span>")
|
||||
var/obj/item/reagent_containers/B = I
|
||||
if(!user.transferItemToLoc(B, src))
|
||||
return
|
||||
if(!user.transferItemToLoc(I, src))
|
||||
return
|
||||
|
||||
beaker = I
|
||||
replace_beaker(user, B)
|
||||
to_chat(user, "<span class='notice'>You insert [I] into [src].</span>")
|
||||
update_icon()
|
||||
else
|
||||
return ..()
|
||||
|
||||
/obj/machinery/computer/pandemic/AltClick(mob/living/user)
|
||||
if(!istype(user) || !user.canUseTopic(src, BE_CLOSE, FALSE, NO_TK))
|
||||
return
|
||||
replace_beaker(user)
|
||||
return
|
||||
|
||||
/obj/machinery/computer/pandemic/proc/replace_beaker(mob/living/user, obj/item/reagent_containers/new_beaker)
|
||||
if(beaker)
|
||||
beaker.forceMove(drop_location())
|
||||
if(user && Adjacent(user) && !issiliconoradminghost(user))
|
||||
user.put_in_hands(beaker)
|
||||
if(new_beaker)
|
||||
beaker = new_beaker
|
||||
else
|
||||
beaker = null
|
||||
update_icon()
|
||||
return TRUE
|
||||
|
||||
/obj/machinery/computer/pandemic/on_deconstruction()
|
||||
eject_beaker()
|
||||
replace_beaker(usr)
|
||||
. = ..()
|
||||
|
||||
@@ -32,19 +32,19 @@
|
||||
var/addiction_stage3_end = 30
|
||||
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
|
||||
var/self_consuming = FALSE //I think this uhhh, makes weird stuff happen when metabolising, but... doesn't seem to do what I think, so I'm gonna leave it.
|
||||
//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/purity = 1 //How pure a chemical is from 0 - 1.
|
||||
var/cached_purity = 1
|
||||
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/SplitChem = FALSE //If the chem splits on metabolism
|
||||
var/impure_chem // What chemical is metabolised with an inpure reaction
|
||||
var/inverse_chem_val = 0 // If the impurity is below 0.5, replace ALL of the chem with inverse_chemupon metabolising
|
||||
var/inverse_chem // What chem is metabolised when purity is below inverse_chem_val, this shouldn't be made, but if it does, well, I guess I'll know about it.
|
||||
var/metabolizing = FALSE
|
||||
var/invisible = FALSE //Set to true if it doesn't appear on handheld health analyzers.
|
||||
var/chemical_flags // See fermi/readme.dm REAGENT_DEAD_PROCESS, REAGENT_DONOTSPLIT, REAGENT_ONLYINVERSE, REAGENT_ONMOBMERGE, REAGENT_INVISIBLE, REAGENT_FORCEONNEW, REAGENT_SNEAKYNAME
|
||||
|
||||
|
||||
/datum/reagent/Destroy() // This should only be called by the holder, so it's already handled clearing its references
|
||||
. = ..()
|
||||
@@ -73,8 +73,47 @@
|
||||
holder.remove_reagent(src.id, metabolization_rate * M.metabolism_efficiency) //By default it slowly disappears.
|
||||
return
|
||||
|
||||
//called when a mob processes chems when dead.
|
||||
/datum/reagent/proc/on_mob_dead(mob/living/carbon/M)
|
||||
if(!(chemical_flags & REAGENT_DEAD_PROCESS)) //justincase
|
||||
return
|
||||
current_cycle++
|
||||
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
|
||||
/datum/reagent/proc/on_mob_add(mob/living/L)
|
||||
/datum/reagent/proc/on_mob_add(mob/living/L, amount)
|
||||
if(!iscarbon(L))
|
||||
return
|
||||
var/mob/living/carbon/M = L
|
||||
if (purity == 1)
|
||||
log_game("CHEM: [L] ckey: [L.key] has ingested [volume]u of [id]")
|
||||
return
|
||||
if(cached_purity == 1)
|
||||
cached_purity = purity
|
||||
else if(purity < 0)
|
||||
CRASH("Purity below 0 for chem: [id], Please let Fermis Know!")
|
||||
if(chemical_flags & REAGENT_DONOTSPLIT)
|
||||
return
|
||||
|
||||
if ((inverse_chem_val > purity) && (inverse_chem))//Turns all of a added reagent into the inverse chem
|
||||
M.reagents.remove_reagent(id, amount, FALSE)
|
||||
M.reagents.add_reagent(inverse_chem, amount, FALSE, other_purity = 1-cached_purity)
|
||||
var/datum/reagent/R = M.reagents.has_reagent("[inverse_chem]")
|
||||
if(R.chemical_flags & REAGENT_SNEAKYNAME)
|
||||
R.name = name//Negative effects are hidden
|
||||
if(R.chemical_flags & REAGENT_INVISIBLE)
|
||||
R.chemical_flags |= (REAGENT_INVISIBLE)
|
||||
log_game("FERMICHEM: [M] ckey: [M.key] has ingested [volume]u of [inverse_chem]")
|
||||
return
|
||||
else if (impure_chem)
|
||||
var/impureVol = amount * (1 - purity) //turns impure ratio into impure chem
|
||||
if(!(chemical_flags & REAGENT_SPLITRETAINVOL))
|
||||
M.reagents.remove_reagent(id, (impureVol), FALSE)
|
||||
M.reagents.add_reagent(impure_chem, impureVol, FALSE, other_purity = 1-cached_purity)
|
||||
log_game("FERMICHEM: [M] ckey: [M.key] has ingested [volume - impureVol]u of [id]")
|
||||
log_game("FERMICHEM: [M] ckey: [M.key] has ingested [volume]u of [impure_chem]")
|
||||
return
|
||||
|
||||
// Called when this reagent is removed while inside a mob
|
||||
@@ -97,7 +136,35 @@
|
||||
return
|
||||
|
||||
// Called when two reagents of the same are mixing.
|
||||
/datum/reagent/proc/on_merge(data)
|
||||
/datum/reagent/proc/on_merge(data, amount, mob/living/carbon/M, purity)
|
||||
if(!iscarbon(M))
|
||||
return
|
||||
if (purity == 1)
|
||||
log_game("FERMICHEM: [M] ckey: [M.key] has ingested [volume]u of [id]")
|
||||
return
|
||||
cached_purity = purity //purity SHOULD be precalculated from the add_reagent, update cache.
|
||||
if (purity < 0)
|
||||
CRASH("Purity below 0 for chem: [id], Please let Fermis Know!")
|
||||
if(chemical_flags & REAGENT_DONOTSPLIT)
|
||||
return
|
||||
|
||||
if ((inverse_chem_val > purity) && (inverse_chem)) //INVERT
|
||||
M.reagents.remove_reagent(id, amount, FALSE)
|
||||
M.reagents.add_reagent(inverse_chem, amount, FALSE, other_purity = 1-cached_purity)
|
||||
var/datum/reagent/R = M.reagents.has_reagent("[inverse_chem]")
|
||||
if(R.chemical_flags & REAGENT_SNEAKYNAME)
|
||||
R.name = name//Negative effects are hidden
|
||||
if(R.chemical_flags & REAGENT_INVISIBLE)
|
||||
R.chemical_flags |= (REAGENT_INVISIBLE)
|
||||
log_game("FERMICHEM: [M] ckey: [M.key] has merged [volume]u of [inverse_chem]")
|
||||
return
|
||||
else if (impure_chem) //SPLIT
|
||||
var/impureVol = amount * (1 - purity)
|
||||
if(!(chemical_flags & REAGENT_SPLITRETAINVOL))
|
||||
M.reagents.remove_reagent(id, impureVol, FALSE)
|
||||
M.reagents.add_reagent(impure_chem, impureVol, FALSE, other_purity = 1-cached_purity)
|
||||
log_game("FERMICHEM: [M] ckey: [M.key] has merged [volume - impureVol]u of [id]")
|
||||
log_game("FERMICHEM: [M] ckey: [M.key] has merged [volume]u of [impure_chem]")
|
||||
return
|
||||
|
||||
/datum/reagent/proc/on_update(atom/A)
|
||||
@@ -146,4 +213,4 @@
|
||||
for (var/datum/reagent/R in reagent_list)
|
||||
rs += "[R.name], [R.volume]"
|
||||
|
||||
return rs.Join(" | ")
|
||||
return rs.Join(" | ")
|
||||
@@ -959,14 +959,14 @@ All effects don't start immediately, but rather get worse over time; the rate is
|
||||
/datum/reagent/consumable/ethanol/bahama_mama
|
||||
name = "Bahama Mama"
|
||||
id = "bahama_mama"
|
||||
description = "Tropical cocktail."
|
||||
description = "A tropical cocktail with a complex blend of flavors."
|
||||
color = "#FF7F3B" // rgb: 255, 127, 59
|
||||
boozepwr = 35
|
||||
quality = DRINK_GOOD
|
||||
taste_description = "lime and orange"
|
||||
taste_description = "pineapple, coconut, and a hint of coffee"
|
||||
glass_icon_state = "bahama_mama"
|
||||
glass_name = "Bahama Mama"
|
||||
glass_desc = "Tropical cocktail."
|
||||
glass_desc = "A tropical cocktail with a complex blend of flavors."
|
||||
|
||||
/datum/reagent/consumable/ethanol/singulo
|
||||
name = "Singulo"
|
||||
@@ -1373,6 +1373,7 @@ All effects don't start immediately, but rather get worse over time; the rate is
|
||||
|
||||
/datum/reagent/consumable/ethanol/neurotoxin
|
||||
name = "Neurotoxin"
|
||||
id = "neurotoxin"
|
||||
description = "A strong neurotoxin that puts the subject into a death-like state."
|
||||
color = "#2E2E61" // rgb: 46, 46, 97
|
||||
boozepwr = 50
|
||||
@@ -1382,6 +1383,11 @@ All effects don't start immediately, but rather get worse over time; the rate is
|
||||
glass_icon_state = "neurotoxinglass"
|
||||
glass_name = "Neurotoxin"
|
||||
glass_desc = "A drink that is guaranteed to knock you silly."
|
||||
pH = 4.3
|
||||
//SplitChem = TRUE
|
||||
impure_chem = "neuroweak"
|
||||
inverse_chem_val = 0.5 //Clear conversion
|
||||
inverse_chem = "neuroweak"
|
||||
|
||||
/datum/reagent/consumable/ethanol/neurotoxin/proc/pickt()
|
||||
return (pick(TRAIT_PARALYSIS_L_ARM,TRAIT_PARALYSIS_R_ARM,TRAIT_PARALYSIS_R_LEG,TRAIT_PARALYSIS_L_LEG))
|
||||
@@ -1417,6 +1423,26 @@ All effects don't start immediately, but rather get worse over time; the rate is
|
||||
M.adjustStaminaLoss(10)
|
||||
..()
|
||||
|
||||
/datum/reagent/consumable/ethanol/neurosmash
|
||||
name = "Neurosmash"
|
||||
id = "neurosmash"
|
||||
description = "A mostly safe alcoholic drink for the true daredevils. Do not mix with Neurotoxin."
|
||||
color = "#2E2E61" // rgb: 46, 46, 97
|
||||
boozepwr = 60
|
||||
quality = DRINK_VERYGOOD
|
||||
taste_description = "a numbing sensation"
|
||||
glass_icon_state = "neurosmashglass"
|
||||
glass_name = "Neurosmash"
|
||||
glass_desc = "A mostly safe alcoholic drink for the true daredevils. Do not mix with Neurotoxin."
|
||||
|
||||
/datum/reagent/consumable/ethanol/neurosmash/on_mob_life(mob/living/carbon/M)
|
||||
if(holder.has_reagent("neurotoxin"))
|
||||
M.adjustOrganLoss(ORGAN_SLOT_BRAIN, 0.5*REM, 150)
|
||||
else
|
||||
M.adjustOrganLoss(ORGAN_SLOT_BRAIN, -1.0*REM, 150)
|
||||
M.dizziness +=2
|
||||
..()
|
||||
|
||||
/datum/reagent/consumable/ethanol/hippies_delight
|
||||
name = "Hippie's Delight"
|
||||
id = "hippiesdelight"
|
||||
@@ -1526,6 +1552,17 @@ All effects don't start immediately, but rather get worse over time; the rate is
|
||||
glass_name = "Creme de Cacao"
|
||||
glass_desc = "A million hazing lawsuits and alcohol poisonings have started with this humble ingredient."
|
||||
|
||||
datum/reagent/consumable/ethanol/creme_de_coconut
|
||||
name = "Creme de Coconut"
|
||||
id = "creme_de_coconut"
|
||||
description = "A coconut liqueur for smooth, creamy, tropical drinks."
|
||||
color = "#F7F0D0"
|
||||
boozepwr = 20
|
||||
taste_description = "a sweet milky flavor with notes of toasted sugar"
|
||||
glass_icon_state = "glass_white"
|
||||
glass_name = "Creme de Coconut"
|
||||
glass_desc = "An unintimidating glass of coconut liqueur."
|
||||
|
||||
/datum/reagent/consumable/ethanol/quadruple_sec
|
||||
name = "Quadruple Sec"
|
||||
id = "quadruple_sec"
|
||||
@@ -2240,7 +2277,7 @@ All effects don't start immediately, but rather get worse over time; the rate is
|
||||
glass_name = "Gunfire"
|
||||
glass_desc = "It pops constantly as you look at it, giving off tiny sparks."
|
||||
|
||||
/datum/reagent/consumable/ethanol/hellfire/on_mob_life(mob/living/carbon/M)
|
||||
/datum/reagent/consumable/ethanol/gunfire/on_mob_life(mob/living/carbon/M)
|
||||
if (prob(3))
|
||||
to_chat(M,"<span class='notice'>You feel the gunfire pop in your mouth.</span>")
|
||||
return ..()
|
||||
@@ -2272,3 +2309,91 @@ All effects don't start immediately, but rather get worse over time; the rate is
|
||||
glass_icon_state = "sins_delight"
|
||||
glass_name = "Sin's Delight"
|
||||
glass_desc = "You can smell the seven sins rolling off the top of the glass."
|
||||
|
||||
/datum/reagent/consumable/ethanol/painkiller
|
||||
name = "Painkiller"
|
||||
id = "painkiller"
|
||||
description = "Dulls your pain. Your emotional pain, that is."
|
||||
boozepwr = 20
|
||||
color = "#EAD677"
|
||||
quality = DRINK_NICE
|
||||
taste_description = "sugary tartness"
|
||||
glass_icon_state = "painkiller"
|
||||
glass_name = "Painkiller"
|
||||
glass_desc = "A combination of tropical juices and rum. Surely this will make you feel better."
|
||||
|
||||
/datum/reagent/consumable/ethanol/pina_colada
|
||||
name = "Pina Colada"
|
||||
id = "pina_colada"
|
||||
description = "A fresh pineapple drink with coconut rum. Yum."
|
||||
boozepwr = 40
|
||||
color = "#FFF1B2"
|
||||
quality = DRINK_NICE
|
||||
taste_description = "pineapple, coconut, and a hint of the ocean"
|
||||
glass_icon_state = "pina_colada"
|
||||
glass_name = "Pina Colada"
|
||||
glass_desc = "If you like pina coladas, and getting caught in the rain... well, you'll like this drink."
|
||||
|
||||
/datum/reagent/consumable/ethanol/strawberry_daiquiri
|
||||
name = "Strawberry Daiquiri"
|
||||
id = "strawberry_daiquiri"
|
||||
description = "Pink looking alcoholic drink."
|
||||
boozepwr = 20
|
||||
color = "#FF4A74"
|
||||
quality = DRINK_NICE
|
||||
taste_description = "sweet strawberry, lime and the ocean breeze"
|
||||
glass_icon_state = "strawberry_daiquiri"
|
||||
glass_name = "Strawberry Daiquiri"
|
||||
glass_desc = "Pink looking drink with flowers and a big straw to sip it. Looks sweet and refreshing, perfect for warm days."
|
||||
|
||||
/datum/reagent/consumable/ethanol/liz_fizz
|
||||
name = "Liz Fizz"
|
||||
id = "liz_fizz"
|
||||
description = "Triple citrus layered with some ice and cream."
|
||||
boozepwr = 0
|
||||
color = "#D8FF59"
|
||||
taste_description = "brain freezing sourness"
|
||||
glass_icon_state = "liz_fizz"
|
||||
glass_name = "Liz Fizz"
|
||||
glass_desc = "Looks like a citrus sherbet seperated in layers? Why would anyone want that is beyond you."
|
||||
|
||||
/datum/reagent/consumable/ethanol/miami_vice
|
||||
name = "Miami Vice"
|
||||
id = "miami_vice"
|
||||
description = "A drink layering Pina Colada and Strawberry Daiquiri"
|
||||
boozepwr = 30
|
||||
color = "#D8FF59"
|
||||
quality = DRINK_FANTASTIC
|
||||
taste_description = "sweet and refreshing flavor, complemented with strawberries and coconut, and hints of citrus"
|
||||
glass_icon_state = "miami_vice"
|
||||
glass_name = "Miami Vice"
|
||||
glass_desc = "Strawberries and coconut, like yin and yang."
|
||||
|
||||
/datum/reagent/consumable/ethanol/malibu_sunset
|
||||
name = "Malibu Sunset"
|
||||
id = "malibu_sunset"
|
||||
description = "A drink consisting of creme de coconut and tropical juices"
|
||||
boozepwr = 20
|
||||
color = "#FF9473"
|
||||
quality = DRINK_NICE
|
||||
taste_description = "coconut, with orange and grenadine accents"
|
||||
glass_icon_state = "malibu_sunset"
|
||||
glass_name = "Malibu Sunset"
|
||||
glass_desc = "Tropical looking drinks, with ice cubes hovering on the surface and grenadine coloring the bottom."
|
||||
|
||||
/datum/reagent/consumable/ethanol/hotlime_miami
|
||||
name = "Hotlime Miami"
|
||||
id = "hotlime_miami"
|
||||
description = "The essence of the 90's, if they were a bloody mess that is."
|
||||
boozepwr = 40
|
||||
color = "#A7FAE8"
|
||||
quality = DRINK_FANTASTIC
|
||||
taste_description = "coconut and aesthetic violence"
|
||||
glass_icon_state = "hotlime_miami"
|
||||
glass_name = "Hotlime Miami"
|
||||
glass_desc = "This looks very aesthetically pleasing."
|
||||
|
||||
/datum/reagent/consumable/ethanol/hotlime_miami/on_mob_life(mob/living/carbon/M)
|
||||
M.set_drugginess(50)
|
||||
M.adjustStaminaLoss(-2)
|
||||
return ..()
|
||||
@@ -126,6 +126,15 @@
|
||||
glass_name = "glass of lemon juice"
|
||||
glass_desc = "Sour..."
|
||||
|
||||
/datum/reagent/consumable/strawberryjuice
|
||||
name = "Strawberry Juice"
|
||||
id = "strawberryjuice"
|
||||
description = "Refreshing seasonal summer drink."
|
||||
color = "#F2163A"
|
||||
taste_description = "strawberry"
|
||||
glass_name = "glass of strawberry juice"
|
||||
glass_desc = "Refreshing seasonal summer drink."
|
||||
|
||||
/datum/reagent/consumable/banana
|
||||
name = "Banana Juice"
|
||||
id = "banana"
|
||||
@@ -210,8 +219,8 @@
|
||||
description = "An opaque white liquid produced by the mammary glands of mammals."
|
||||
color = "#DFDFDF" // rgb: 223, 223, 223
|
||||
taste_description = "milk"
|
||||
glass_icon_state = "glass_white"
|
||||
glass_name = "glass of milk"
|
||||
glass_icon_state = "milkglass"
|
||||
glass_name = "milk drum"
|
||||
glass_desc = "White and nutritious goodness!"
|
||||
|
||||
/datum/reagent/consumable/milk/on_mob_life(mob/living/carbon/M)
|
||||
@@ -816,6 +825,15 @@
|
||||
taste_description = "parsnip"
|
||||
glass_name = "glass of parsnip juice"
|
||||
|
||||
/datum/reagent/consumable/pineapplejuice
|
||||
name = "Pineapple Juice"
|
||||
id = "pineapplejuice"
|
||||
description = "Tart, tropical, and hotly debated."
|
||||
color = "#F7D435"
|
||||
taste_description = "pineapple"
|
||||
glass_name = "glass of pineapple juice"
|
||||
glass_desc = "Tart, tropical, and hotly debated."
|
||||
|
||||
/datum/reagent/consumable/peachjuice //Intended to be extremely rare due to being the limiting ingredients in the blazaam drink
|
||||
name = "Peach Juice"
|
||||
id = "peachjuice"
|
||||
|
||||
@@ -604,21 +604,23 @@
|
||||
..()
|
||||
|
||||
/datum/reagent/consumable/honey
|
||||
name = "honey"
|
||||
name = "Honey"
|
||||
id = "honey"
|
||||
description = "Sweet sweet honey that decays into sugar. Has antibacterial and natural healing properties."
|
||||
color = "#d3a308"
|
||||
nutriment_factor = 15 * REAGENTS_METABOLISM
|
||||
metabolization_rate = 1 * REAGENTS_METABOLISM
|
||||
taste_description = "sweetness"
|
||||
var/power = 0
|
||||
|
||||
/datum/reagent/consumable/honey/on_mob_life(mob/living/carbon/M)
|
||||
M.reagents.add_reagent("sugar",3)
|
||||
if(power == 0)
|
||||
M.reagents.add_reagent(/datum/reagent/consumable/sugar,3)
|
||||
if(prob(55))
|
||||
M.adjustBruteLoss(-1*REM, 0)
|
||||
M.adjustFireLoss(-1*REM, 0)
|
||||
M.adjustOxyLoss(-1*REM, 0)
|
||||
M.adjustToxLoss(-1*REM, 0)
|
||||
M.adjustBruteLoss(-1*REM+power, 0)
|
||||
M.adjustFireLoss(-1*REM+power, 0)
|
||||
M.adjustOxyLoss(-1*REM+power, 0)
|
||||
M.adjustToxLoss(-1*REM+power, 0)
|
||||
..()
|
||||
|
||||
/datum/reagent/consumable/honey/reaction_mob(mob/living/M, method=TOUCH, reac_volume)
|
||||
@@ -629,6 +631,12 @@
|
||||
S.success_multiplier = max(0.6, S.success_multiplier) // +60% success probability on each step, compared to bacchus' blessing's ~46%
|
||||
..()
|
||||
|
||||
/datum/reagent/consumable/honey/special
|
||||
name = "Royal Honey"
|
||||
id = "royalhoney"
|
||||
description = "A special honey which heals the imbiber far faster than normal honey"
|
||||
power = 1
|
||||
|
||||
/datum/reagent/consumable/mayonnaise
|
||||
name = "Mayonnaise"
|
||||
id = "mayonnaise"
|
||||
|
||||
@@ -0,0 +1,26 @@
|
||||
//Reagents produced by metabolising/reacting fermichems inoptimally, i.e. inverse_chems or impure_chems
|
||||
//Inverse = Splitting
|
||||
//Invert = Whole conversion
|
||||
|
||||
/datum/reagent/impure
|
||||
chemical_flags = REAGENT_INVISIBLE | REAGENT_SNEAKYNAME //by default, it will stay hidden on splitting, but take the name of the source on inverting
|
||||
|
||||
|
||||
/datum/reagent/impure/fermiTox
|
||||
name = "Chemical Isomers"
|
||||
id = "fermiTox"
|
||||
description = "Toxic chemical isomers made from impure reactions. At low volumes will cause light toxin damage, but as the volume increases, it deals larger amounts, damages the liver, then eventually the heart."
|
||||
data = "merge"
|
||||
color = "FFFFFF"
|
||||
can_synth = FALSE
|
||||
var/potency = 1 //potency multiplies the volume when added.
|
||||
|
||||
|
||||
//I'm concerned this is too weak, but I also don't want deathmixes.
|
||||
//TODO: liver damage, 100+ heart
|
||||
/datum/reagent/impure/fermiTox/on_mob_life(mob/living/carbon/C, method)
|
||||
if(C.dna && istype(C.dna.species, /datum/species/jelly))
|
||||
C.adjustToxLoss(-2)
|
||||
else
|
||||
C.adjustToxLoss(2)
|
||||
..()
|
||||
@@ -236,10 +236,12 @@
|
||||
/datum/reagent/medicine/silver_sulfadiazine
|
||||
name = "Silver Sulfadiazine"
|
||||
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."
|
||||
description = "If used in touch-based applications, immediately restores burn wounds as well as restoring more over time. It is mildly poisonous taken orally or by injection. If overdosed, deals brute and minor liver damage."
|
||||
reagent_state = LIQUID
|
||||
pH = 7.2
|
||||
color = "#ffeac9"
|
||||
metabolization_rate = 5 * REAGENTS_METABOLISM
|
||||
overdose_threshold = 50
|
||||
|
||||
/datum/reagent/medicine/silver_sulfadiazine/reaction_mob(mob/living/M, method=TOUCH, reac_volume, show_message = 1)
|
||||
if(iscarbon(M) && M.stat != DEAD)
|
||||
@@ -260,6 +262,15 @@
|
||||
..()
|
||||
. = 1
|
||||
|
||||
/datum/reagent/medicine/silver_sulfadiazine/overdose_start(mob/living/M)
|
||||
metabolization_rate = 15 * REAGENTS_METABOLISM
|
||||
M.adjustBruteLoss(2*REM, 0)
|
||||
if(iscarbon(M))
|
||||
var/mob/living/carbon/C = M
|
||||
C.applyLiverDamage(1)
|
||||
..()
|
||||
. = 1
|
||||
|
||||
/datum/reagent/medicine/oxandrolone
|
||||
name = "Oxandrolone"
|
||||
id = "oxandrolone"
|
||||
@@ -287,10 +298,12 @@
|
||||
/datum/reagent/medicine/styptic_powder
|
||||
name = "Styptic Powder"
|
||||
id = "styptic_powder"
|
||||
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."
|
||||
description = "If used in touch-based applications, immediately restores bruising as well as restoring more over time. It is poisonous if taken orally or by injection. If overdosed, deals brute and minor liver damage."
|
||||
reagent_state = LIQUID
|
||||
color = "#FF9696"
|
||||
pH = 6.7
|
||||
metabolization_rate = 5 * REAGENTS_METABOLISM
|
||||
overdose_threshold = 50
|
||||
|
||||
/datum/reagent/medicine/styptic_powder/reaction_mob(mob/living/M, method=TOUCH, reac_volume, show_message = 1)
|
||||
if(iscarbon(M) && M.stat != DEAD)
|
||||
@@ -312,6 +325,15 @@
|
||||
..()
|
||||
. = 1
|
||||
|
||||
datum/reagent/medicine/styptic_powder/overdose_start(mob/living/M)
|
||||
metabolization_rate = 15 * REAGENTS_METABOLISM
|
||||
M.adjustBruteLoss(2*REM, 0)
|
||||
if(iscarbon(M))
|
||||
var/mob/living/carbon/C = M
|
||||
C.applyLiverDamage(1)
|
||||
..()
|
||||
. = 1
|
||||
|
||||
/datum/reagent/medicine/salglu_solution
|
||||
name = "Saline-Glucose Solution"
|
||||
id = "salglu_solution"
|
||||
@@ -398,23 +420,35 @@
|
||||
/datum/reagent/medicine/synthflesh
|
||||
name = "Synthflesh"
|
||||
id = "synthflesh"
|
||||
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."
|
||||
description = "Has a 100% chance of healing large amounts of brute and burn damage very quickly. One unit of the chemical will heal one point of damage. Touch application only."
|
||||
reagent_state = LIQUID
|
||||
color = "#FFEBEB"
|
||||
pH = 11.5
|
||||
metabolization_rate = 5 * REAGENTS_METABOLISM
|
||||
overdose_threshold = 40
|
||||
|
||||
/datum/reagent/medicine/synthflesh/reaction_mob(mob/living/M, method=TOUCH, reac_volume,show_message = 1)
|
||||
if(iscarbon(M))
|
||||
if (M.stat == DEAD)
|
||||
show_message = 0
|
||||
if(method in list(PATCH, TOUCH))
|
||||
M.adjustBruteLoss(-1.25 * reac_volume)
|
||||
M.adjustFireLoss(-1.25 * reac_volume)
|
||||
if(method in list(INGEST, VAPOR))
|
||||
var/mob/living/carbon/C = M
|
||||
C.losebreath++
|
||||
C.emote("cough")
|
||||
to_chat(M, "<span class='danger'>You feel your throat closing up!</span>")
|
||||
else if(method == INJECT)
|
||||
return
|
||||
else if(method in list(PATCH, TOUCH))
|
||||
M.adjustBruteLoss(-1 * reac_volume)
|
||||
M.adjustFireLoss(-1 * 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/synthflesh/overdose_start(mob/living/M)
|
||||
metabolization_rate = 15 * REAGENTS_METABOLISM
|
||||
|
||||
/datum/reagent/medicine/charcoal
|
||||
name = "Charcoal"
|
||||
id = "charcoal"
|
||||
|
||||
@@ -1586,17 +1586,20 @@
|
||||
name = "anomolous virus food"
|
||||
color = "#ffa6ff" //rgb: 255,166,255
|
||||
taste_description = "a bad idea"
|
||||
|
||||
id = "laughtervirusfood"
|
||||
|
||||
/datum/reagent/consumable/virus_food/advvirusfood
|
||||
name = "highly unstable virus food"
|
||||
color = "#ffffff" //rgb: 255,255,255 ITS PURE WHITE CMON
|
||||
taste_description = "an EXTREMELY bad idea"
|
||||
id = "advvirusfood"
|
||||
|
||||
/datum/reagent/consumable/virus_food/viralbase
|
||||
name = "Experimental viral base"
|
||||
description = "Recently discovered by Nanotrasen's top scientists after years of research, this substance can be used as the base for extremely rare and extremely dangerous viruses once exposed to uranium."
|
||||
color = "#fff0da"
|
||||
taste_description = "tears of scientists"
|
||||
id = "viralbase"
|
||||
|
||||
/datum/reagent/colorful_reagent/on_mob_life(mob/living/carbon/M)
|
||||
if(!no_mob_color)
|
||||
@@ -2148,7 +2151,7 @@
|
||||
can_synth = FALSE
|
||||
var/datum/dna/original_dna
|
||||
var/reagent_ticks = 0
|
||||
invisible = TRUE
|
||||
chemical_flags = REAGENT_INVISIBLE
|
||||
|
||||
/datum/reagent/changeling_string/on_mob_metabolize(mob/living/carbon/C)
|
||||
if(C && C.dna && data["desired_dna"])
|
||||
|
||||
@@ -32,6 +32,7 @@
|
||||
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/clear_conversion //bitflags for clear conversions; REACTION_CLEAR_IMPURE or REACTION_CLEAR_INVERSE
|
||||
var/PurityMin = 0.15 //If purity is below 0.15, it explodes too. Set to 0 to disable this.
|
||||
|
||||
|
||||
|
||||
@@ -234,7 +234,7 @@
|
||||
name = "Anomolous virus food"
|
||||
id = "virusfood_laughter"
|
||||
results = list("laughtervirusfood" = 1)
|
||||
required_reagents = list("laughter" = 5, "virus_food" = 1)
|
||||
required_reagents = list("laughter" = 5, "virusfood" = 1)
|
||||
|
||||
/datum/chemical_reaction/virus_food_admin
|
||||
name = "Highly unstable virus Food"
|
||||
|
||||
@@ -17,6 +17,7 @@
|
||||
var/spillable = FALSE
|
||||
var/beaker_weakness_bitflag = NONE//Bitflag!
|
||||
var/container_HP = 2
|
||||
var/cached_icon
|
||||
var/splashable = FALSE
|
||||
|
||||
/obj/item/reagent_containers/Initialize(mapload, vol)
|
||||
@@ -83,11 +84,11 @@
|
||||
SplashReagents(target, TRUE)
|
||||
|
||||
/obj/item/reagent_containers/proc/bartender_check(atom/target)
|
||||
. = FALSE
|
||||
if(target.CanPass(src, get_turf(src)) && thrownby && thrownby.actions)
|
||||
for(var/datum/action/innate/drink_fling/D in thrownby.actions)
|
||||
if(D.active)
|
||||
return TRUE
|
||||
return FALSE
|
||||
|
||||
/obj/item/reagent_containers/proc/ForceResetRotation()
|
||||
transform = initial(transform)
|
||||
@@ -149,30 +150,71 @@
|
||||
/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)
|
||||
START_PROCESSING(SSobj, 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)
|
||||
if((reagents.pH < 1.5) || (reagents.pH > 12.5))
|
||||
START_PROCESSING(SSobj, src)
|
||||
|
||||
|
||||
/obj/item/reagent_containers/process()
|
||||
if(!cached_icon)
|
||||
cached_icon = icon_state
|
||||
var/damage
|
||||
var/cause
|
||||
if(beaker_weakness_bitflag & PH_WEAK)
|
||||
if(reagents.pH < 2)
|
||||
damage = (2 - reagents.pH)/20
|
||||
cause = "from the extreme pH"
|
||||
playsound(get_turf(src), 'sound/FermiChem/bufferadd.ogg', 50, 1)
|
||||
|
||||
if(reagents.pH > 12)
|
||||
damage = (reagents.pH - 12)/20
|
||||
cause = "from the extreme pH"
|
||||
playsound(get_turf(src), 'sound/FermiChem/bufferadd.ogg', 50, 1)
|
||||
|
||||
if(beaker_weakness_bitflag & TEMP_WEAK)
|
||||
if(reagents.chem_temp >= 444)
|
||||
if(damage)
|
||||
damage += (reagents.chem_temp/444)/5
|
||||
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>")
|
||||
damage = (reagents.chem_temp/444)/5
|
||||
if(cause)
|
||||
cause += " and "
|
||||
cause += "from the high temperature"
|
||||
playsound(get_turf(src), 'sound/FermiChem/heatdam.ogg', 50, 1)
|
||||
|
||||
if(!damage || damage <= 0)
|
||||
STOP_PROCESSING(SSobj, src)
|
||||
|
||||
container_HP -= damage
|
||||
|
||||
var/list/seen = viewers(5, get_turf(src))
|
||||
var/iconhtml = icon2html(src, seen)
|
||||
|
||||
var/damage_percent = ((container_HP / initial(container_HP)*100))
|
||||
switch(damage_percent)
|
||||
if(-INFINITY to 0)
|
||||
for(var/mob/M in seen)
|
||||
to_chat(M, "<span class='notice'>[iconhtml] \The [src]'s melts [cause]!</span>")
|
||||
playsound(get_turf(src), 'sound/FermiChem/acidmelt.ogg', 80, 1)
|
||||
SSblackbox.record_feedback("tally", "fermi_chem", 1, "Times beakers have melted")
|
||||
STOP_PROCESSING(SSobj, src)
|
||||
qdel(src)
|
||||
return
|
||||
if(0 to 35)
|
||||
icon_state = "[cached_icon]_m3"
|
||||
desc = "[initial(desc)] It is severely deformed."
|
||||
if(35 to 70)
|
||||
icon_state = "[cached_icon]_m2"
|
||||
desc = "[initial(desc)] It is deformed."
|
||||
if(70 to 85)
|
||||
desc = "[initial(desc)] It is mildly deformed."
|
||||
icon_state = "[cached_icon]_m1"
|
||||
|
||||
update_icon()
|
||||
if(prob(25))
|
||||
for(var/mob/M in seen)
|
||||
to_chat(M, "<span class='notice'>[iconhtml] \The [src]'s is damaged by [cause] and begins to deform!</span>")
|
||||
@@ -90,3 +90,9 @@
|
||||
update_pack_name()
|
||||
else
|
||||
return ..()
|
||||
|
||||
/obj/item/reagent_containers/blood/bluespace
|
||||
name = "bluespace blood pack"
|
||||
desc = "Contains blood used for transfusion, this one has been made with bluespace technology to hold much more blood. Must be attached to an IV drip."
|
||||
icon_state = "bsbloodpack"
|
||||
volume = 600 //its a blood bath!
|
||||
@@ -6,7 +6,7 @@
|
||||
reagent_flags = OPENCONTAINER
|
||||
spillable = TRUE
|
||||
resistance_flags = ACID_PROOF
|
||||
container_HP = 3
|
||||
container_HP = 2
|
||||
|
||||
|
||||
/obj/item/reagent_containers/glass/attack(mob/M, mob/user, obj/target)
|
||||
@@ -115,7 +115,6 @@
|
||||
item_state = "beaker"
|
||||
materials = list(MAT_GLASS=500)
|
||||
beaker_weakness_bitflag = PH_WEAK
|
||||
container_HP = 5
|
||||
|
||||
/obj/item/reagent_containers/glass/beaker/Initialize()
|
||||
. = ..()
|
||||
@@ -133,27 +132,29 @@
|
||||
list_reagents = list("viralbase" = 1)
|
||||
|
||||
/obj/item/reagent_containers/glass/beaker/update_icon()
|
||||
if(!cached_icon)
|
||||
cached_icon = icon_state
|
||||
cut_overlays()
|
||||
|
||||
if(reagents.total_volume)
|
||||
var/mutable_appearance/filling = mutable_appearance('icons/obj/reagentfillings.dmi', "[icon_state]10")
|
||||
var/mutable_appearance/filling = mutable_appearance('icons/obj/reagentfillings.dmi', "[cached_icon]10")
|
||||
|
||||
var/percent = round((reagents.total_volume / volume) * 100)
|
||||
switch(percent)
|
||||
if(0 to 9)
|
||||
filling.icon_state = "[icon_state]-10"
|
||||
filling.icon_state = "[cached_icon]-10"
|
||||
if(10 to 24)
|
||||
filling.icon_state = "[icon_state]10"
|
||||
filling.icon_state = "[cached_icon]10"
|
||||
if(25 to 49)
|
||||
filling.icon_state = "[icon_state]25"
|
||||
filling.icon_state = "[cached_icon]25"
|
||||
if(50 to 74)
|
||||
filling.icon_state = "[icon_state]50"
|
||||
filling.icon_state = "[cached_icon]50"
|
||||
if(75 to 79)
|
||||
filling.icon_state = "[icon_state]75"
|
||||
filling.icon_state = "[cached_icon]75"
|
||||
if(80 to 90)
|
||||
filling.icon_state = "[icon_state]80"
|
||||
filling.icon_state = "[cached_icon]80"
|
||||
if(91 to INFINITY)
|
||||
filling.icon_state = "[icon_state]100"
|
||||
filling.icon_state = "[cached_icon]100"
|
||||
|
||||
filling.color = mix_color_from_reagents(reagents.reagent_list)
|
||||
add_overlay(filling)
|
||||
@@ -172,7 +173,7 @@
|
||||
volume = 100
|
||||
amount_per_transfer_from_this = 10
|
||||
possible_transfer_amounts = list(5,10,15,20,25,30,50,100)
|
||||
container_HP = 6
|
||||
container_HP = 3
|
||||
|
||||
/obj/item/reagent_containers/glass/beaker/plastic
|
||||
name = "x-large beaker"
|
||||
@@ -232,7 +233,7 @@
|
||||
volume = 300
|
||||
amount_per_transfer_from_this = 10
|
||||
possible_transfer_amounts = list(5,10,15,20,25,30,50,100,300)
|
||||
container_HP = 8
|
||||
container_HP = 4
|
||||
|
||||
/obj/item/reagent_containers/glass/beaker/cryoxadone
|
||||
list_reagents = list("cryoxadone" = 30)
|
||||
@@ -289,7 +290,7 @@
|
||||
SLOT_L_STORE, SLOT_R_STORE,\
|
||||
SLOT_GENERC_DEXTROUS_STORAGE
|
||||
)
|
||||
container_HP = 2
|
||||
container_HP = 1
|
||||
|
||||
/obj/item/reagent_containers/glass/bucket/Initialize()
|
||||
beaker_weakness_bitflag |= TEMP_WEAK
|
||||
@@ -343,7 +344,7 @@
|
||||
materials = list(MAT_GLASS=0)
|
||||
volume = 50
|
||||
amount_per_transfer_from_this = 10
|
||||
container_HP = 2
|
||||
container_HP = 1
|
||||
|
||||
/obj/item/reagent_containers/glass/beaker/waterbottle/Initialize()
|
||||
beaker_weakness_bitflag |= TEMP_WEAK
|
||||
@@ -359,7 +360,7 @@
|
||||
list_reagents = list("water" = 100)
|
||||
volume = 100
|
||||
amount_per_transfer_from_this = 20
|
||||
container_HP = 2
|
||||
container_HP = 1
|
||||
|
||||
/obj/item/reagent_containers/glass/beaker/waterbottle/large/empty
|
||||
list_reagents = list()
|
||||
|
||||
@@ -19,8 +19,8 @@
|
||||
var/can_fill_from_container = TRUE
|
||||
var/apply_type = PATCH
|
||||
var/apply_method = "spray"
|
||||
var/self_delay = 30
|
||||
var/squirt_mode = 0
|
||||
var/self_delay = 3 SECONDS
|
||||
var/squirt_mode = FALSE
|
||||
var/squirt_amount = 5
|
||||
|
||||
/obj/item/reagent_containers/medspray/attack_self(mob/user)
|
||||
@@ -31,40 +31,51 @@
|
||||
amount_per_transfer_from_this = initial(amount_per_transfer_from_this)
|
||||
to_chat(user, "<span class='notice'>You will now apply the medspray's contents in [squirt_mode ? "short bursts":"extended sprays"]. You'll now use [amount_per_transfer_from_this] units per use.</span>")
|
||||
|
||||
/obj/item/reagent_containers/medspray/attack(mob/M, mob/user, def_zone)
|
||||
/obj/item/reagent_containers/medspray/attack(mob/living/L, mob/user, def_zone)
|
||||
if(!reagents || !reagents.total_volume)
|
||||
to_chat(user, "<span class='warning'>[src] is empty!</span>")
|
||||
return
|
||||
|
||||
if(M == user)
|
||||
M.visible_message("<span class='notice'>[user] attempts to [apply_method] [src] on [user.p_them()]self.</span>")
|
||||
if(ishuman(L))
|
||||
var/obj/item/bodypart/affecting = L.get_bodypart(check_zone(user.zone_selected))
|
||||
if(!affecting)
|
||||
to_chat(user, "<span class='warning'>The limb is missing!</span>")
|
||||
return
|
||||
if(!L.can_inject(user, TRUE, user.zone_selected, FALSE, TRUE)) //stopped by clothing, like patches
|
||||
return
|
||||
if(affecting.status != BODYPART_ORGANIC)
|
||||
to_chat(user, "<span class='notice'>Medicine won't work on a robotic limb!</span>")
|
||||
return
|
||||
|
||||
if(L == user)
|
||||
L.visible_message("<span class='notice'>[user] attempts to [apply_method] [src] on [user.p_them()]self.</span>")
|
||||
if(self_delay)
|
||||
if(!do_mob(user, M, self_delay))
|
||||
if(!do_mob(user, L, self_delay))
|
||||
return
|
||||
if(!reagents || !reagents.total_volume)
|
||||
return
|
||||
to_chat(M, "<span class='notice'>You [apply_method] yourself with [src].</span>")
|
||||
to_chat(L, "<span class='notice'>You [apply_method] yourself with [src].</span>")
|
||||
|
||||
else
|
||||
log_combat(user, M, "attempted to apply", src, reagents.log_list())
|
||||
M.visible_message("<span class='danger'>[user] attempts to [apply_method] [src] on [M].</span>", \
|
||||
"<span class='userdanger'>[user] attempts to [apply_method] [src] on [M].</span>")
|
||||
if(!do_mob(user, M))
|
||||
log_combat(user, L, "attempted to apply", src, reagents.log_list())
|
||||
L.visible_message("<span class='danger'>[user] attempts to [apply_method] [src] on [L].</span>", \
|
||||
"<span class='userdanger'>[user] attempts to [apply_method] [src] on [L].</span>")
|
||||
if(!do_mob(user, L))
|
||||
return
|
||||
if(!reagents || !reagents.total_volume)
|
||||
return
|
||||
M.visible_message("<span class='danger'>[user] [apply_method]s [M] down with [src].</span>", \
|
||||
"<span class='userdanger'>[user] [apply_method]s [M] down with [src].</span>")
|
||||
L.visible_message("<span class='danger'>[user] [apply_method]s [L] down with [src].</span>", \
|
||||
"<span class='userdanger'>[user] [apply_method]s [L] down with [src].</span>")
|
||||
|
||||
if(!reagents || !reagents.total_volume)
|
||||
return
|
||||
|
||||
else
|
||||
log_combat(user, M, "applied", src, reagents.log_list())
|
||||
log_combat(user, L, "applied", src, reagents.log_list())
|
||||
playsound(src, 'sound/effects/spray2.ogg', 50, 1, -6)
|
||||
var/fraction = min(amount_per_transfer_from_this/reagents.total_volume, 1)
|
||||
reagents.reaction(M, apply_type, fraction)
|
||||
reagents.trans_to(M, amount_per_transfer_from_this)
|
||||
reagents.reaction(L, apply_type, fraction)
|
||||
reagents.trans_to(L, amount_per_transfer_from_this)
|
||||
return
|
||||
|
||||
/obj/item/reagent_containers/medspray/styptic
|
||||
|
||||
@@ -115,6 +115,8 @@
|
||||
var/flat_icon = "towel_flat"
|
||||
var/folded_icon = "towel"
|
||||
var/list/possible_colors
|
||||
//Hyper Change
|
||||
var/roomy = 1 //To cover XL bits
|
||||
|
||||
/obj/item/reagent_containers/rag/towel/Initialize()
|
||||
. = ..()
|
||||
|
||||
Reference in New Issue
Block a user