mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-07-20 19:44:09 +01:00
Merge pull request #9562 from DesolateG/MUSHROOMMUSHROOM
Refactors the global reagents lists to use the global SS.
This commit is contained in:
@@ -1,9 +1,9 @@
|
||||
// Base chemicals
|
||||
var/list/base_chemicals = list("water","oxygen","nitrogen","hydrogen","potassium","mercury","carbon",
|
||||
GLOBAL_LIST_INIT(base_chemicals, list("water","oxygen","nitrogen","hydrogen","potassium","mercury","carbon",
|
||||
"chlorine","fluorine","phosphorus","lithium","sulfur","sacid","radium",
|
||||
"iron","aluminum","silicon","sugar","ethanol")
|
||||
"iron","aluminum","silicon","sugar","ethanol"))
|
||||
// Standard chemicals
|
||||
var/list/standard_chemicals = list("slimejelly","blood","water","lube","charcoal","toxin","cyanide",
|
||||
GLOBAL_LIST_INIT(standard_chemicals, list("slimejelly","blood","water","lube","charcoal","toxin","cyanide",
|
||||
"morphine","epinephrine","space_drugs","serotrotium","oxygen","copper",
|
||||
"nitrogen","hydrogen","potassium","mercury","sulfur","carbon","chlorine",
|
||||
"fluorine","sodium","phosphorus","lithium","sugar","sacid","facid",
|
||||
@@ -15,21 +15,21 @@ var/list/standard_chemicals = list("slimejelly","blood","water","lube","charcoal
|
||||
"cryoxadone","spaceacillin","carpotoxin","lsd","fluorosurfactant",
|
||||
"fluorosurfactant","ethanol","ammonia","diethylamine","antihol","pancuronium",
|
||||
"lipolicide","condensedcapsaicin","frostoil","amanitin","psilocybin",
|
||||
"enzyme","nothing","salglu_solution","antifreeze","neurotoxin")
|
||||
"enzyme","nothing","salglu_solution","antifreeze","neurotoxin"))
|
||||
// Rare chemicals
|
||||
var/list/rare_chemicals = list("minttoxin","syndicate_nanites", "xenomicrobes")
|
||||
GLOBAL_LIST_INIT(rare_chemicals, list("minttoxin","syndicate_nanites", "xenomicrobes"))
|
||||
// Standard medicines
|
||||
var/list/standard_medicines = list("charcoal","toxin","cyanide","morphine","epinephrine","space_drugs",
|
||||
GLOBAL_LIST_INIT(standard_medicines, list("charcoal","toxin","cyanide","morphine","epinephrine","space_drugs",
|
||||
"serotrotium","mutadone","mutagen","teporone","lexorin","silver_sulfadiazine",
|
||||
"salbutamol","perfluorodecalin","omnizine","synaptizine","haloperidol",
|
||||
"potass_iodide","pen_acid","mannitol","oculine","styptic_powder",
|
||||
"methamphetamine","spaceacillin","carpotoxin","lsd","ethanol","ammonia",
|
||||
"diethylamine","antihol","pancuronium","lipolicide","condensedcapsaicin",
|
||||
"frostoil","amanitin","psilocybin","nothing","salglu_solution","neurotoxin")
|
||||
"frostoil","amanitin","psilocybin","nothing","salglu_solution","neurotoxin"))
|
||||
// Rare medicines
|
||||
var/list/rare_medicines = list("syndicate_nanites","minttoxin","blood", "xenomicrobes")
|
||||
GLOBAL_LIST_INIT(rare_medicines, list("syndicate_nanites","minttoxin","blood", "xenomicrobes"))
|
||||
// Drinks
|
||||
var/list/drinks = list("beer2","hot_coco","orangejuice","tomatojuice","limejuice","carrotjuice",
|
||||
GLOBAL_LIST_INIT(drinks, list("beer2","hot_coco","orangejuice","tomatojuice","limejuice","carrotjuice",
|
||||
"berryjuice","poisonberryjuice","watermelonjuice","lemonjuice","banana",
|
||||
"nothing","potato","milk","soymilk","cream","coffee","tea","icecoffee",
|
||||
"icetea","cola","nuka_cola","spacemountainwind","thirteenloko","dr_gibb",
|
||||
@@ -44,10 +44,13 @@ var/list/drinks = list("beer2","hot_coco","orangejuice","tomatojuice","limejuice
|
||||
"vodkatonic","ginfizz","bahama_mama","singulo","sbiten","devilskiss","red_mead",
|
||||
"mead","iced_beer","grog","aloe","andalusia","alliescocktail","soy_latte",
|
||||
"cafe_latte","acidspit","amasec","neurotoxin","hippiesdelight","bananahonk",
|
||||
"silencer","changelingsting","irishcarbomb","syndicatebomb","erikasurprise","driestmartini", "flamingmoe")
|
||||
"silencer","changelingsting","irishcarbomb","syndicatebomb","erikasurprise","driestmartini", "flamingmoe"))
|
||||
|
||||
//Liver Toxins list
|
||||
GLOBAL_LIST_INIT(liver_toxins, list("toxin", "plasma", "sacid", "facid", "cyanide","amanitin", "carpotoxin"))
|
||||
|
||||
//Random chem blacklist
|
||||
var/global/list/blocked_chems = list("polonium", "initropidril", "concentrated_initro",
|
||||
GLOBAL_LIST_INIT(blocked_chems, list("polonium", "initropidril", "concentrated_initro",
|
||||
"sodium_thiopental", "ketamine", "coniine",
|
||||
"adminordrazine", "nanites", "hellwater",
|
||||
"mutationtoxin", "amutationtoxin", "venom",
|
||||
@@ -55,9 +58,9 @@ var/global/list/blocked_chems = list("polonium", "initropidril", "concentrated_i
|
||||
"syndicate_nanites", "ripping_tendrils", "boiling_oil",
|
||||
"envenomed_filaments", "lexorin_jelly", "kinetic",
|
||||
"cryogenic_liquid", "dark_matter", "b_sorium",
|
||||
"reagent", "life","dragonsbreath", "nanocalcium")
|
||||
"reagent", "life","dragonsbreath", "nanocalcium"))
|
||||
|
||||
var/global/list/safe_chem_list = list("antihol", "charcoal", "epinephrine", "insulin", "teporone","silver_sulfadiazine", "salbutamol",
|
||||
GLOBAL_LIST_INIT(safe_chem_list, list("antihol", "charcoal", "epinephrine", "insulin", "teporone","silver_sulfadiazine", "salbutamol",
|
||||
"omnizine", "stimulants", "synaptizine", "potass_iodide", "oculine", "mannitol", "styptic_powder",
|
||||
"spaceacillin", "salglu_solution", "sal_acid", "cryoxadone", "blood", "synthflesh", "hydrocodone",
|
||||
"mitocholide", "rezadone")
|
||||
"mitocholide", "rezadone"))
|
||||
@@ -51,9 +51,9 @@
|
||||
/obj/item/reagent_containers/glass/bottle/random_reagent/New()
|
||||
..()
|
||||
var/list/possible_chems = GLOB.chemical_reagents_list.Copy()
|
||||
possible_chems -= blocked_chems.Copy()
|
||||
possible_chems -= GLOB.blocked_chems.Copy()
|
||||
var/datum/reagent/R = pick(possible_chems)
|
||||
if(rare_chemicals.Find(R))
|
||||
if(GLOB.rare_chemicals.Find(R))
|
||||
reagents.add_reagent(R, 10)
|
||||
else
|
||||
reagents.add_reagent(R, rand(2, 3)*10)
|
||||
@@ -68,7 +68,7 @@
|
||||
/obj/item/reagent_containers/glass/bottle/random_chem/New()
|
||||
..()
|
||||
var/R = get_random_reagent_id()
|
||||
if(rare_chemicals.Find(R))
|
||||
if(GLOB.rare_chemicals.Find(R))
|
||||
reagents.add_reagent(R, 10)
|
||||
else
|
||||
reagents.add_reagent(R, rand(2, 3)*10)
|
||||
@@ -82,7 +82,7 @@
|
||||
|
||||
/obj/item/reagent_containers/glass/bottle/random_base_chem/New()
|
||||
..()
|
||||
var/datum/reagent/R = pick(base_chemicals)
|
||||
var/datum/reagent/R = pick(GLOB.base_chemicals)
|
||||
reagents.add_reagent(R, rand(2, 6)*5)
|
||||
name = "unlabelled bottle"
|
||||
pixel_x = rand(-10, 10)
|
||||
@@ -94,7 +94,7 @@
|
||||
|
||||
/obj/item/reagent_containers/food/drinks/bottle/random_drink/New()
|
||||
..()
|
||||
var/list/possible_drinks = drinks.Copy()
|
||||
var/list/possible_drinks = GLOB.drinks.Copy()
|
||||
if(prob(50))
|
||||
possible_drinks += list("pancuronium","lsd","omnizine","blood")
|
||||
|
||||
@@ -113,7 +113,7 @@
|
||||
..()
|
||||
|
||||
var/R = get_random_reagent_id()
|
||||
if(rare_chemicals.Find(R))
|
||||
if(GLOB.rare_chemicals.Find(R))
|
||||
reagents.add_reagent(R, 10)
|
||||
else
|
||||
reagents.add_reagent(R, rand(3, 10)*10)
|
||||
@@ -131,13 +131,13 @@
|
||||
/obj/item/storage/pill_bottle/random_meds/New()
|
||||
..()
|
||||
for(var/i in 1 to storage_slots)
|
||||
var/list/possible_medicines = standard_medicines.Copy()
|
||||
var/list/possible_medicines = GLOB.standard_medicines.Copy()
|
||||
if(prob(50))
|
||||
possible_medicines += rare_medicines.Copy()
|
||||
possible_medicines += GLOB.rare_medicines.Copy()
|
||||
var/datum/reagent/R = pick(possible_medicines)
|
||||
var/obj/item/reagent_containers/food/pill/P = new(src)
|
||||
|
||||
if(rare_medicines.Find(R))
|
||||
if(GLOB.rare_medicines.Find(R))
|
||||
P.reagents.add_reagent(R, 10)
|
||||
else
|
||||
P.reagents.add_reagent(R, rand(2, 5)*10)
|
||||
@@ -182,7 +182,7 @@
|
||||
|
||||
/obj/structure/closet/crate/secure/chemicals/New()
|
||||
..()
|
||||
for(var/chem in standard_chemicals)
|
||||
for(var/chem in GLOB.standard_chemicals)
|
||||
var/obj/item/reagent_containers/glass/bottle/B = new(src)
|
||||
B.reagents.add_reagent(chem, B.volume)
|
||||
if(prob(85))
|
||||
|
||||
@@ -35,7 +35,7 @@
|
||||
var/mob/living/silicon/robot/borg = user
|
||||
borg.cell.use(30)
|
||||
var/refill = reagents.get_master_reagent_id()
|
||||
if(refill in drinks) // Only synthesize drinks
|
||||
if(refill in GLOB.drinks) // Only synthesize drinks
|
||||
spawn(600)
|
||||
reagents.add_reagent(refill, bitesize)
|
||||
return 1
|
||||
@@ -99,7 +99,7 @@
|
||||
to_chat(user, "<span class='notice'> You transfer [trans] units of the solution to [target].</span>")
|
||||
|
||||
if(isrobot(user)) //Cyborg modules that include drinks automatically refill themselves, but drain the borg's cell
|
||||
if(refill in drinks) // Only synthesize drinks
|
||||
if(refill in GLOB.drinks) // Only synthesize drinks
|
||||
var/mob/living/silicon/robot/bro = user
|
||||
var/chargeAmount = max(30,4*trans)
|
||||
bro.cell.use(chargeAmount)
|
||||
|
||||
@@ -81,7 +81,7 @@
|
||||
/obj/item/reagent_containers/food/snacks/grown/mushroom/angel
|
||||
seed = /obj/item/seeds/angel
|
||||
name = "destroying angel"
|
||||
desc = "<I>Amanita Virosa</I>: Deadly poisonous basidiomycete fungus filled with alpha amatoxins."
|
||||
desc = "<I>Amanita Virosa</I>: Deadly poisonous basidiomycete fungus filled with alpha amanitin."
|
||||
icon_state = "angel"
|
||||
filling_color = "#C0C0C0"
|
||||
|
||||
|
||||
@@ -378,7 +378,7 @@
|
||||
/obj/machinery/chem_master/proc/chemical_safety_check(datum/reagents/R)
|
||||
var/all_safe = 1
|
||||
for(var/datum/reagent/A in R.reagent_list)
|
||||
if(!safe_chem_list.Find(A.id))
|
||||
if(!GLOB.safe_chem_list.Find(A.id))
|
||||
all_safe = 0
|
||||
return all_safe
|
||||
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
|
||||
/datum/reagent/toxin/on_mob_life(mob/living/M)
|
||||
var/update_flags = STATUS_UPDATE_NONE
|
||||
update_flags |= M.adjustToxLoss(2, FALSE)
|
||||
update_flags |= M.adjustToxLoss(2*REAGENTS_EFFECT_MULTIPLIER, FALSE)
|
||||
return ..() | update_flags
|
||||
|
||||
/datum/reagent/spider_venom
|
||||
|
||||
@@ -52,7 +52,7 @@
|
||||
if(safety_hypo && !emagged)
|
||||
var/found_forbidden_reagent = FALSE
|
||||
for(var/datum/reagent/R in reagents.reagent_list)
|
||||
if(!safe_chem_list.Find(R.id))
|
||||
if(!GLOB.safe_chem_list.Find(R.id))
|
||||
reagents.del_reagent(R.id)
|
||||
found_forbidden_reagent = TRUE
|
||||
if(found_forbidden_reagent)
|
||||
|
||||
@@ -46,7 +46,7 @@
|
||||
owner.adjustToxLoss(0.1 * PROCESS_ACCURACY)
|
||||
|
||||
// Can't cope with toxins at all
|
||||
for(var/toxin in list("toxin", "plasma", "sacid", "facid", "cyanide", "amanitin", "carpotoxin"))
|
||||
for(var/toxin in GLOB.liver_toxins)
|
||||
if(owner.reagents.has_reagent(toxin))
|
||||
owner.adjustToxLoss(0.3 * PROCESS_ACCURACY)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user