Merge branch 'master' into upstream-merge-29747
This commit is contained in:
@@ -370,9 +370,8 @@
|
||||
else
|
||||
if(cached_my_atom.type == C.required_container)
|
||||
matching_container = 1
|
||||
if (isliving(cached_my_atom)) //Makes it so certain chemical reactions don't occur in mobs
|
||||
if (C.mob_react)
|
||||
return
|
||||
if (isliving(cached_my_atom) && !C.mob_react) //Makes it so certain chemical reactions don't occur in mobs
|
||||
return
|
||||
if(!C.required_other)
|
||||
matching_other = 1
|
||||
|
||||
@@ -401,19 +400,21 @@
|
||||
add_reagent(P, cached_results[P]*multiplier, null, chem_temp)
|
||||
|
||||
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(C.mix_sound)
|
||||
playsound(get_turf(cached_my_atom), C.mix_sound, 80, 1)
|
||||
|
||||
for(var/mob/M in seen)
|
||||
to_chat(M, "<span class='notice'>[bicon(my_atom)] [C.mix_message]</span>")
|
||||
to_chat(M, "<span class='notice'>[iconhtml] [C.mix_message]</span>")
|
||||
|
||||
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'>[bicon(my_atom)] \The [my_atom]'s power is consumed in the reaction.</span>")
|
||||
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."
|
||||
|
||||
|
||||
@@ -101,9 +101,11 @@
|
||||
ui = SStgui.try_update_ui(user, src, ui_key, ui, force_open)
|
||||
if(!ui)
|
||||
ui = new(user, src, ui_key, "chem_dispenser", name, 550, 550, master_ui, state)
|
||||
if(user.hallucinating())
|
||||
ui.set_autoupdate(FALSE) //to not ruin the immersion by constantly changing the fake chemicals
|
||||
ui.open()
|
||||
|
||||
/obj/machinery/chem_dispenser/ui_data()
|
||||
/obj/machinery/chem_dispenser/ui_data(mob/user)
|
||||
var/data = list()
|
||||
data["amount"] = amount
|
||||
data["energy"] = cell.charge ? cell.charge * powerefficiency : "0" //To prevent NaN in the UI.
|
||||
@@ -128,10 +130,16 @@
|
||||
data["beakerTransferAmounts"] = null
|
||||
|
||||
var chemicals[0]
|
||||
var/is_hallucinating = FALSE
|
||||
if(user.hallucinating())
|
||||
is_hallucinating = TRUE
|
||||
for(var/re in dispensable_reagents)
|
||||
var/datum/reagent/temp = GLOB.chemical_reagents_list[re]
|
||||
if(temp)
|
||||
chemicals.Add(list(list("title" = temp.name, "id" = temp.id)))
|
||||
var/chemname = temp.name
|
||||
if(is_hallucinating && prob(5))
|
||||
chemname = "[pick_list_replacements("hallucination.json", "chemicals")]"
|
||||
chemicals.Add(list(list("title" = chemname, "id" = temp.id)))
|
||||
data["chemicals"] = chemicals
|
||||
return data
|
||||
|
||||
|
||||
@@ -390,7 +390,7 @@
|
||||
T.MakeSlippery(min_wet_time = 10, wet_time_to_add = reac_volume*2)
|
||||
var/obj/effect/hotspot/hotspot = (locate(/obj/effect/hotspot) in T)
|
||||
if(hotspot)
|
||||
var/datum/gas_mixture/lowertemp = T.remove_air( T:air:total_moles() )
|
||||
var/datum/gas_mixture/lowertemp = T.remove_air(T.air.total_moles())
|
||||
lowertemp.temperature = max( min(lowertemp.temperature-2000,lowertemp.temperature / 2) ,0)
|
||||
lowertemp.react()
|
||||
T.assume_air(lowertemp)
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
var/required_other = 0 // an integer required for the reaction to happen
|
||||
|
||||
var/secondary = 0 // set to nonzero if secondary reaction
|
||||
var/mob_react = 0 //Determines if a chemical reaction can occur inside a mob
|
||||
var/mob_react = TRUE //Determines if a chemical reaction can occur inside a mob
|
||||
|
||||
var/required_temp = 0
|
||||
var/is_cold_recipe = 0 // Set to 1 if you want the recipe to only react when it's BELOW the required temp.
|
||||
|
||||
@@ -51,7 +51,7 @@
|
||||
name = "Solid Plasma"
|
||||
id = "solidplasma"
|
||||
required_reagents = list("iron" = 5, "frostoil" = 5, "plasma" = 20)
|
||||
mob_react = 1
|
||||
mob_react = FALSE
|
||||
|
||||
/datum/chemical_reaction/plasmasolidification/on_reaction(datum/reagents/holder, created_volume)
|
||||
var/location = get_turf(holder.my_atom)
|
||||
@@ -62,7 +62,7 @@
|
||||
name = "Solid Gold"
|
||||
id = "solidgold"
|
||||
required_reagents = list("frostoil" = 5, "gold" = 20, "iron" = 1)
|
||||
mob_react = 1
|
||||
mob_react = FALSE
|
||||
|
||||
/datum/chemical_reaction/goldsolidification/on_reaction(datum/reagents/holder, created_volume)
|
||||
var/location = get_turf(holder.my_atom)
|
||||
@@ -80,7 +80,7 @@
|
||||
id = "soapification"
|
||||
required_reagents = list("liquidgibs" = 10, "lye" = 10) // requires two scooped gib tiles
|
||||
required_temp = 374
|
||||
mob_react = 1
|
||||
mob_react = FALSE
|
||||
|
||||
/datum/chemical_reaction/soapification/on_reaction(datum/reagents/holder, created_volume)
|
||||
var/location = get_turf(holder.my_atom)
|
||||
@@ -92,7 +92,7 @@
|
||||
id = "candlefication"
|
||||
required_reagents = list("liquidgibs" = 5, "oxygen" = 5) //
|
||||
required_temp = 374
|
||||
mob_react = 1
|
||||
mob_react = FALSE
|
||||
|
||||
/datum/chemical_reaction/candlefication/on_reaction(datum/reagents/holder, created_volume)
|
||||
var/location = get_turf(holder.my_atom)
|
||||
@@ -103,7 +103,7 @@
|
||||
name = "Meatification"
|
||||
id = "meatification"
|
||||
required_reagents = list("liquidgibs" = 10, "nutriment" = 10, "carbon" = 10)
|
||||
mob_react = 1
|
||||
mob_react = FALSE
|
||||
|
||||
/datum/chemical_reaction/meatification/on_reaction(datum/reagents/holder, created_volume)
|
||||
var/location = get_turf(holder.my_atom)
|
||||
@@ -436,7 +436,7 @@
|
||||
name = "Foam"
|
||||
id = "foam"
|
||||
required_reagents = list("fluorosurfactant" = 1, "water" = 1)
|
||||
mob_react = 1
|
||||
mob_react = FALSE
|
||||
|
||||
/datum/chemical_reaction/foam/on_reaction(datum/reagents/holder, created_volume)
|
||||
var/location = get_turf(holder.my_atom)
|
||||
@@ -453,7 +453,7 @@
|
||||
name = "Metal Foam"
|
||||
id = "metalfoam"
|
||||
required_reagents = list("aluminium" = 3, "foaming_agent" = 1, "facid" = 1)
|
||||
mob_react = 1
|
||||
mob_react = FALSE
|
||||
|
||||
/datum/chemical_reaction/metalfoam/on_reaction(datum/reagents/holder, created_volume)
|
||||
var/location = get_turf(holder.my_atom)
|
||||
@@ -470,7 +470,7 @@
|
||||
name = "Iron Foam"
|
||||
id = "ironlfoam"
|
||||
required_reagents = list("iron" = 3, "foaming_agent" = 1, "facid" = 1)
|
||||
mob_react = 1
|
||||
mob_react = FALSE
|
||||
|
||||
/datum/chemical_reaction/ironfoam/on_reaction(datum/reagents/holder, created_volume)
|
||||
var/location = get_turf(holder.my_atom)
|
||||
|
||||
@@ -144,6 +144,7 @@
|
||||
required_reagents = list("methamphetamine" = 1)
|
||||
strengthdiv = 6
|
||||
modifier = 1
|
||||
mob_react = FALSE
|
||||
|
||||
/datum/chemical_reaction/reagent_explosion/methsplosion/on_reaction(datum/reagents/holder, created_volume)
|
||||
var/turf/T = get_turf(holder.my_atom)
|
||||
@@ -154,7 +155,7 @@
|
||||
|
||||
/datum/chemical_reaction/reagent_explosion/methsplosion/methboom2
|
||||
required_reagents = list("diethylamine" = 1, "iodine" = 1, "phosphorus" = 1, "hydrogen" = 1) //diethylamine is often left over from mixing the ephedrine.
|
||||
required_temp = 300 //room temperature, chilling it even a little will prevent the explosion
|
||||
required_temp = 300 //room temperature, chilling it even a little will prevent the explosion
|
||||
results = list("methboom1" = 4) // this is ugly. Sorry goof.
|
||||
|
||||
/datum/chemical_reaction/sorium
|
||||
@@ -269,7 +270,7 @@
|
||||
required_reagents = list("smoke_powder" = 1)
|
||||
required_temp = 374
|
||||
secondary = 1
|
||||
mob_react = 1
|
||||
mob_react = FALSE
|
||||
|
||||
/datum/chemical_reaction/smoke_powder_smoke/on_reaction(datum/reagents/holder, created_volume)
|
||||
var/location = get_turf(holder.my_atom)
|
||||
|
||||
Reference in New Issue
Block a user