This commit is contained in:
EmeraldSundisk
2020-07-04 21:33:29 -07:00
parent 99168e3ed0
commit c6b5bac0d8
871 changed files with 411113 additions and 96055 deletions
@@ -32,7 +32,7 @@
for (var/x in 1 to PILL_STYLE_COUNT)
var/list/SL = list()
SL["id"] = x
SL["className"] = assets.icon_class_name("pill[x]")
SL["htmltag"] = assets.icon_class_name("pill[x]")
pillStyles += list(SL)
. = ..()
@@ -154,11 +154,6 @@
bottle?.forceMove(A)
return ..()
//Insert our custom spritesheet css link into the html
/obj/machinery/chem_master/ui_base_html(html)
var/datum/asset/spritesheet/assets = get_asset_datum(/datum/asset/spritesheet/simple/pills)
. = replacetext(html, "<!--customheadhtml-->", assets.css_tag())
/obj/machinery/chem_master/ui_interact(mob/user, ui_key = "main", datum/tgui/ui = null, force_open = FALSE, \
datum/tgui/master_ui = null, datum/ui_state/state = GLOB.default_state)
ui = SStgui.try_update_ui(user, src, ui_key, ui, force_open)
@@ -168,6 +163,11 @@
ui = new(user, src, ui_key, "chem_master", name, 500, 550, master_ui, state)
ui.open()
//Insert our custom spritesheet css link into the html
/obj/machinery/chem_master/ui_base_html(html)
var/datum/asset/spritesheet/simple/assets = get_asset_datum(/datum/asset/spritesheet/simple/pills)
. = replacetext(html, "<!--customheadhtml-->", assets.css_tag())
/obj/machinery/chem_master/ui_data(mob/user)
var/list/data = list()
data["isBeakerLoaded"] = beaker ? 1 : 0
@@ -386,8 +386,7 @@
return FALSE
if("analyze")
var/reagent = GLOB.name2reagent[params["id"]]
var/datum/reagent/R = GLOB.chemical_reagents_list[reagent]
var/datum/reagent/R = GLOB.name2reagent[params["id"]]
if(R)
var/state = "Unknown"
if(initial(R.reagent_state) == 1)
@@ -400,9 +399,13 @@
var/T = initial(R.metabolization_rate) * (60 / P)
if(istype(R, /datum/reagent/fermi))
fermianalyze = TRUE
var/datum/chemical_reaction/Rcr = get_chemical_reaction(reagent)
var/datum/chemical_reaction/Rcr = get_chemical_reaction(R)
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" = R.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)
var/datum/reagent/targetReagent = reagents.has_reagent(R)
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))
@@ -2291,7 +2291,7 @@ All effects don't start immediately, but rather get worse over time; the rate is
/datum/reagent/consumable/ethanol/oil_drum
name = "Oil Drum"
color = "#000000" //(0, 0, 0)
description = "Industrial grade oil mixed with some ethanol to make it a drink. Somehow not known to be toxic."
description = "Industeral grade oil mixed with some ethanol to make it a drink. Somehow not known to be toxic."
boozepwr = 45
taste_description = "oil spill"
glass_icon_state = "oil_drum"
@@ -2308,7 +2308,7 @@ All effects don't start immediately, but rather get worse over time; the rate is
/datum/reagent/consumable/ethanol/nord_king
name = "Nord King"
color = "#EB1010" //(235, 16, 16)
description = "Strong mead mixed with more honey and ethanol. Beloved by its human patrons."
description = "Strong mead mixed with more honey and ethanol. Known to beloved by most palettes."
boozepwr = 50 //strong!
taste_description = "honey and red wine"
glass_icon_state = "nord_king"
@@ -2347,7 +2347,7 @@ All effects don't start immediately, but rather get worse over time; the rate is
taste_description = "grass and lime"
glass_icon_state = "abduction_fruit"
glass_name = "glass of Abduction Fruit"
glass_desc = "Mixed fruits that were never meant to be mixed..."
glass_desc = "Mixed fruits that were never ment to be mixed..."
/datum/reagent/consumable/ethanol/abduction_fruit/on_mob_life(mob/living/carbon/M)
if(isabductor(M) || isxenoperson(M))
@@ -2359,7 +2359,7 @@ All effects don't start immediately, but rather get worse over time; the rate is
/datum/reagent/consumable/ethanol/bug_zapper
name = "Bug Zapper"
color = "#F5882A" //(222, 250, 205)
description = "Copper and lemon juice. Hardly even a drink."
description = "Metals and lemon juice. Hardly even a drink."
boozepwr = 5 //No booze really
taste_description = "copper and AC power"
glass_icon_state = "bug_zapper"
@@ -2381,7 +2381,7 @@ All effects don't start immediately, but rather get worse over time; the rate is
taste_description = "dirt and iron"
glass_icon_state = "mush_crush"
glass_name = "glass of Mush Crush"
glass_desc = "Popular among people that want to grow their own food rather than drink the soil."
glass_desc = "Popular among people that want to grow their own food rather then drink the soil."
/datum/reagent/consumable/ethanol/mush_crush/on_mob_life(mob/living/carbon/M)
if(ispodperson(M) || ismush(M))
@@ -2456,7 +2456,7 @@ All effects don't start immediately, but rather get worse over time; the rate is
quality = RACE_DRINK
else
M.adjust_disgust(25)
M.adjustToxLoss(1, 0) //Low tox due to being carp + jell toxins.
M.adjustToxLoss(1, 0) //Low tox do to being carp + jell toxins.
return ..()
/datum/reagent/consumable/ethanol/laval_spit //Yes Laval
@@ -132,8 +132,8 @@
"<span class='userdanger'>You're covered in boiling oil!</span>")
M.emote("scream")
playsound(M, 'sound/machines/fryer/deep_fryer_emerge.ogg', 25, TRUE)
var/oil_damage = max((holder.chem_temp / fry_temperature) * 0.33,1) //Damage taken per unit
M.adjustFireLoss(oil_damage * max(reac_volume,20)) //Damage caps at 20
var/oil_damage = (holder.chem_temp / fry_temperature) * 0.33 //Damage taken per unit
M.adjustFireLoss(min(35, oil_damage * reac_volume)) //Damage caps at 35
else
..()
return TRUE
@@ -857,13 +857,3 @@
taste_mult = 2.5 //sugar's 1.5, capsacin's 1.5, so a good middle ground.
taste_description = "smokey sweetness"
value = REAGENT_VALUE_COMMON
/datum/reagent/consumable/laughsyrup
name = "Laughin' Syrup"
description = "The product of juicing Laughin' Peas. Fizzy, and seems to change flavour based on what it's used with!"
nutriment_factor = 5 * REAGENTS_METABOLISM
color = "#803280"
taste_mult = 2
taste_description = "fizzy sweetness"
value = REAGENT_VALUE_COMMON
@@ -250,7 +250,7 @@
if(istype(O, /obj/item/stack/medical/gauze))
var/obj/item/stack/medical/gauze/G = O
reac_volume = min((reac_volume / 10), G.amount)
new/obj/item/stack/medical/mesh(get_turf(G), reac_volume)
new/obj/item/stack/medical/ointment(get_turf(G), reac_volume)
G.use(reac_volume)
/datum/reagent/medicine/silver_sulfadiazine/reaction_mob(mob/living/M, method=TOUCH, reac_volume, show_message = 1)
@@ -336,7 +336,7 @@
if(istype(O, /obj/item/stack/medical/gauze))
var/obj/item/stack/medical/gauze/G = O
reac_volume = min((reac_volume / 10), G.amount)
new/obj/item/stack/medical/suture(get_turf(G), reac_volume)
new/obj/item/stack/medical/bruise_pack(get_turf(G), reac_volume)
G.use(reac_volume)
/datum/reagent/medicine/styptic_powder/on_mob_life(mob/living/carbon/M)
@@ -1563,20 +1563,3 @@
M.adjustOrganLoss(ORGAN_SLOT_LUNGS, 0.5)
..()
. = 1
/datum/reagent/medicine/liquid_wisdom
name = "liquid wisdom"
description = "the physical representation of wisdom, in liquid form"
taste_mult = 4
can_synth = FALSE
overdose_threshold = 30
value = REAGENT_VALUE_UNCOMMON // while it's 'rare', it can be milked from the wisdom cow
/datum/reagent/medicine/liquid_wisdom/on_mob_life(mob/living/carbon/C) //slightly stronger mannitol, from the wisdom cow
C.adjustOrganLoss(ORGAN_SLOT_BRAIN, -3*REM)
if(prob(20))
C.cure_trauma_type(resilience = TRAUMA_RESILIENCE_BASIC)
if(prob(3))
to_chat(C, "[pick(GLOB.wisdoms)]") //give them a random wisdom
..()
@@ -70,10 +70,6 @@
B = new(T)
if(data["blood_DNA"])
B.blood_DNA[data["blood_DNA"]] = data["blood_type"]
if(!B.blood_DNA["color"])
B.blood_DNA["color"] = data["bloodcolor"]
else
B.blood_DNA["color"] = BlendRGB(B.blood_DNA["color"], data["bloodcolor"])
if(B.reagents)
B.reagents.add_reagent(type, reac_volume)
B.update_icon()
@@ -81,7 +77,7 @@
/datum/reagent/blood/on_new(list/data)
if(istype(data))
SetViruses(src, data)
color = data["bloodcolor"]
color = bloodtype_to_color(data["blood_type"])
if(data["blood_type"] == "SY")
name = "Synthetic Blood"
taste_description = "oil"
@@ -2288,4 +2284,3 @@
S = new(T)
if(data["blood_DNA"])
S.add_blood_DNA(list(data["blood_DNA"] = data["blood_type"]))
@@ -87,7 +87,7 @@
new /obj/item/stack/sheet/mineral/uranium(location)
/datum/chemical_reaction/bluespacecrystalifaction
name = "Crystallized Bluespace"
name = "Crystal Bluespace"
id = "crystalbluespace"
required_reagents = list(/datum/reagent/consumable/frostoil = 5, /datum/reagent/bluespace = 20, /datum/reagent/iron = 1)
mob_react = FALSE
@@ -13,7 +13,7 @@
/obj/item/reagent_containers/blood/Initialize()
. = ..()
if(blood_type != null)
reagents.add_reagent(/datum/reagent/blood, 200, list("donor"=null,"viruses"=null,"blood_DNA"=null,"bloodcolor"=bloodtype_to_color(blood_type), "blood_type"=blood_type,"resistances"=null,"trace_chem"=null))
reagents.add_reagent(/datum/reagent/blood, 200, list("donor"=null,"viruses"=null,"blood_DNA"=null,"blood_colour"=color, "blood_type"=blood_type,"resistances"=null,"trace_chem"=null))
update_icon()
/obj/item/reagent_containers/blood/on_reagent_change(changetype)
@@ -1,51 +0,0 @@
/obj/item/reagent_containers/chem_pack
name = "intravenous medicine bag"
desc = "A plastic pressure bag, or 'chem pack', for IV administration of drugs. It is fitted with a thermosealing strip."
icon = 'icons/obj/bloodpack.dmi'
icon_state = "chempack"
volume = 100
reagent_flags = OPENCONTAINER
spillable = TRUE
obj_flags = UNIQUE_RENAME
resistance_flags = ACID_PROOF
var/sealed = FALSE
/obj/item/reagent_containers/chem_pack/on_reagent_change(changetype)
update_icon()
/obj/item/reagent_containers/chem_pack/update_icon()
cut_overlays()
var/v = min(round(reagents.total_volume / volume * 10), 10)
if(v > 0)
var/mutable_appearance/filling = mutable_appearance('icons/obj/reagentfillings.dmi', "chempack1")
filling.icon_state = "chempack[v]"
filling.color = mix_color_from_reagents(reagents.reagent_list)
add_overlay(filling)
/obj/item/reagent_containers/chem_pack/AltClick(mob/living/user)
if(user.canUseTopic(src, BE_CLOSE, NO_DEXTERY) && !sealed)
if(iscarbon(user) && (HAS_TRAIT(user, TRAIT_CLUMSY) && prob(50)))
to_chat(user, "<span class='warning'>Uh... whoops! You accidentally spill the content of the bag onto yourself.</span>")
SplashReagents(user)
return
else
DISABLE_BITFIELD(reagents.reagents_holder_flags, OPENCONTAINER)
ENABLE_BITFIELD(reagents.reagents_holder_flags, DRAWABLE |INJECTABLE )
spillable = FALSE
sealed = TRUE
to_chat(user, "<span class='notice'>You seal the bag.</span>")
/obj/item/reagent_containers/chem_pack/examine()
. = ..()
if(sealed)
. += "<span class='notice'>The bag is sealed shut.</span>"
else
. += "<span class='notice'>Alt-click to seal it.</span>"
obj/item/reagent_containers/chem_pack/attack_self(mob/user)
if(sealed)
return
..()
@@ -386,20 +386,6 @@
/obj/item/reagent_containers/glass/beaker/waterbottle/large/empty
list_reagents = list()
/obj/item/reagent_containers/glass/beaker/waterbottle/wataur
name = "Bottled Wataur"
desc = "Finally, a bottle as proportionate as you."
icon = 'icons/obj/drinks.dmi'
icon_state = "wataur"
custom_materials = list(/datum/material/plastic=0)
list_reagents = list(/datum/reagent/water = 100)
volume = 100
amount_per_transfer_from_this = 20
possible_transfer_amounts = list(5,10,15,20,25,30,50, 100)
container_flags = TEMP_WEAK|APTFT_ALTCLICK|APTFT_VERB
container_HP = 1
cached_icon = "wataur"
/obj/item/reagent_containers/glass/get_belt_overlay()
return mutable_appearance('icons/obj/clothing/belt_overlays.dmi', "bottle")
@@ -11,8 +11,8 @@
grind_results = list()
var/apply_type = INGEST
var/apply_method = "swallow"
var/roundstart = FALSE
var/self_delay = FALSE //pills are instant, this is because patches inheret their aplication from pills
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()
@@ -83,126 +83,119 @@
desc = "Highly toxic."
icon_state = "pill5"
list_reagents = list(/datum/reagent/toxin = 50)
roundstart = TRUE
roundstart = 1
/obj/item/reagent_containers/pill/cyanide
name = "cyanide pill"
desc = "Don't swallow this."
icon_state = "pill5"
list_reagents = list(/datum/reagent/toxin/cyanide = 50)
roundstart = TRUE
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(/datum/reagent/medicine/adminordrazine = 50)
roundstart = TRUE
roundstart = 1
/obj/item/reagent_containers/pill/morphine
name = "morphine pill"
desc = "Commonly used to treat insomnia."
icon_state = "pill8"
list_reagents = list(/datum/reagent/medicine/morphine = 30)
roundstart = TRUE
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(/datum/reagent/medicine/ephedrine = 10, /datum/reagent/medicine/antihol = 10, /datum/reagent/consumable/coffee = 30)
roundstart = TRUE
roundstart = 1
/obj/item/reagent_containers/pill/salbutamol
name = "salbutamol pill"
desc = "Used to treat oxygen deprivation."
icon_state = "pill16"
list_reagents = list(/datum/reagent/medicine/salbutamol = 30)
roundstart = TRUE
roundstart = 1
/obj/item/reagent_containers/pill/charcoal
name = "charcoal pill"
desc = "Neutralizes many common toxins."
icon_state = "pill17"
list_reagents = list(/datum/reagent/medicine/charcoal = 10)
roundstart = TRUE
roundstart = 1
/obj/item/reagent_containers/pill/epinephrine
name = "epinephrine pill"
desc = "Used to stabilize patients."
icon_state = "pill5"
list_reagents = list(/datum/reagent/medicine/epinephrine = 15)
roundstart = TRUE
roundstart = 1
/obj/item/reagent_containers/pill/mannitol
name = "mannitol pill"
desc = "Used to treat brain damage."
icon_state = "pill17"
list_reagents = list(/datum/reagent/medicine/mannitol = 25)
roundstart = TRUE
roundstart = 1
/obj/item/reagent_containers/pill/mutadone
name = "mutadone pill"
desc = "Used to treat genetic damage."
icon_state = "pill20"
list_reagents = list(/datum/reagent/medicine/mutadone = 25)
roundstart = TRUE
roundstart = 1
/obj/item/reagent_containers/pill/salicyclic
name = "salicylic acid pill"
desc = "Used to dull pain."
icon_state = "pill9"
list_reagents = list(/datum/reagent/medicine/sal_acid = 24)
roundstart = TRUE
roundstart = 1
/obj/item/reagent_containers/pill/oxandrolone
name = "oxandrolone pill"
desc = "Used to stimulate burn healing."
icon_state = "pill11"
list_reagents = list(/datum/reagent/medicine/oxandrolone = 24)
roundstart = TRUE
roundstart = 1
/obj/item/reagent_containers/pill/insulin
name = "insulin pill"
desc = "Handles hyperglycaemic coma."
icon_state = "pill18"
list_reagents = list(/datum/reagent/medicine/insulin = 50)
roundstart = TRUE
roundstart = 1
/obj/item/reagent_containers/pill/psicodine
name = "psicodine pill"
desc = "Used to treat mental instability and phobias."
desc = "Used to treat mental instability and traumas."
list_reagents = list(/datum/reagent/medicine/psicodine = 10)
icon_state = "pill22"
roundstart = TRUE
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(/datum/reagent/medicine/potass_iodide = 50)
roundstart = TRUE
roundstart = 1
/obj/item/reagent_containers/pill/antirad_plus
name = "prussian blue pill"
desc = "Used to treat heavy radition poisoning."
icon_state = "prussian_blue"
list_reagents = list(/datum/reagent/medicine/prussian_blue = 25)
roundstart = TRUE
roundstart = 1
/obj/item/reagent_containers/pill/mutarad
name = "radiation treatment deluxe pill"
desc = "Used to treat heavy radition poisoning and genetic defects."
icon_state = "anit_rad_fixgene"
list_reagents = list(/datum/reagent/medicine/prussian_blue = 10, /datum/reagent/medicine/potass_iodide = 10, /datum/reagent/medicine/mutadone = 5)
roundstart = TRUE
/obj/item/reagent_containers/pill/neurine
name = "neurine pill"
desc = "Used to treat non-severe mental traumas."
list_reagents = list("neurine" = 10)
icon_state = "pill22"
roundstart = TRUE
roundstart = 1
///////////////////////////////////////// this pill is used only in a legion mob drop
/obj/item/reagent_containers/pill/shadowtoxin