Merge remote-tracking branch 'citadel/master' into unarmed_parry
This commit is contained in:
@@ -463,17 +463,10 @@
|
||||
if(total_matching_reagents == total_required_reagents && total_matching_catalysts == total_required_catalysts && matching_container && matching_other && meets_temp_requirement && can_special_react)
|
||||
possible_reactions += C
|
||||
|
||||
sortTim(possible_reactions, /proc/cmp_chemical_reactions_default, FALSE)
|
||||
|
||||
if(possible_reactions.len)
|
||||
var/datum/chemical_reaction/selected_reaction = possible_reactions[1]
|
||||
//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(competitor.required_temp <= selected_reaction.required_temp)
|
||||
selected_reaction = competitor
|
||||
else
|
||||
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//update reagents list
|
||||
var/list/cached_results = selected_reaction.results//resultant chemical list
|
||||
var/special_react_result = selected_reaction.check_special_react(src)
|
||||
|
||||
@@ -32,7 +32,6 @@
|
||||
var/nopower_state = "dispenser_nopower"
|
||||
var/has_panel_overlay = TRUE
|
||||
var/obj/item/reagent_containers/beaker = null
|
||||
//dispensable_reagents is copypasted in plumbing synthesizers. Please update accordingly. (I didn't make it global because that would limit custom chem dispensers)
|
||||
var/list/dispensable_reagents = list(
|
||||
/datum/reagent/hydrogen,
|
||||
/datum/reagent/lithium,
|
||||
@@ -182,7 +181,7 @@
|
||||
datum/tgui/master_ui = null, datum/ui_state/state = GLOB.default_state)
|
||||
ui = SStgui.try_update_ui(user, src, ui_key, ui, force_open)
|
||||
if(!ui)
|
||||
ui = new(user, src, ui_key, "chem_dispenser", name, 565, 550, master_ui, state)
|
||||
ui = new(user, src, ui_key, "ChemDispenser", name, 565, 550, master_ui, state)
|
||||
if(user.hallucinating())
|
||||
ui.set_autoupdate(FALSE) //to not ruin the immersion by constantly changing the fake chemicals
|
||||
ui.open()
|
||||
|
||||
@@ -103,7 +103,7 @@
|
||||
datum/tgui/master_ui = null, datum/ui_state/state = GLOB.default_state)
|
||||
ui = SStgui.try_update_ui(user, src, ui_key, ui, force_open)
|
||||
if(!ui)
|
||||
ui = new(user, src, ui_key, "chem_heater", name, 275, 400, master_ui, state)
|
||||
ui = new(user, src, ui_key, "ChemHeater", name, 300, 400, master_ui, state)
|
||||
ui.open()
|
||||
|
||||
/obj/machinery/chem_heater/ui_data()
|
||||
@@ -155,4 +155,4 @@
|
||||
if("eject")
|
||||
on = FALSE
|
||||
replace_beaker(usr)
|
||||
. = TRUE
|
||||
. = TRUE
|
||||
|
||||
@@ -165,7 +165,8 @@
|
||||
if(!ui)
|
||||
var/datum/asset/assets = get_asset_datum(/datum/asset/spritesheet/simple/pills)
|
||||
assets.send(user)
|
||||
ui = new(user, src, ui_key, "chem_master", name, 500, 550, master_ui, state)
|
||||
|
||||
ui = new(user, src, ui_key, "ChemMaster", name, 520, 550, master_ui, state)
|
||||
ui.open()
|
||||
|
||||
/obj/machinery/chem_master/ui_data(mob/user)
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
datum/tgui/master_ui = null, datum/ui_state/state = GLOB.default_state)
|
||||
ui = SStgui.try_update_ui(user, src, ui_key, ui, force_open)
|
||||
if(!ui)
|
||||
ui = new(user, src, ui_key, "chem_synthesizer", name, 390, 330, master_ui, state)
|
||||
ui = new(user, src, ui_key, "ChemDebugSynthesizer", name, 390, 330, master_ui, state)
|
||||
ui.open()
|
||||
|
||||
/obj/machinery/chem_dispenser/chem_synthesizer/ui_act(action, params)
|
||||
|
||||
@@ -123,7 +123,7 @@
|
||||
/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)
|
||||
ui = new(user, src, ui_key, "pandemic", name, 520, 550, master_ui, state)
|
||||
ui = new(user, src, ui_key, "Pandemic", name, 520, 550, master_ui, state)
|
||||
ui.open()
|
||||
|
||||
/obj/machinery/computer/pandemic/ui_data(mob/user)
|
||||
|
||||
@@ -104,7 +104,7 @@
|
||||
datum/tgui/master_ui = null, datum/ui_state/state = GLOB.default_state)
|
||||
ui = SStgui.try_update_ui(user, src, ui_key, ui, force_open)
|
||||
if(!ui)
|
||||
ui = new(user, src, ui_key, "smoke_machine", name, 350, 350, master_ui, state)
|
||||
ui = new(user, src, ui_key, "SmokeMachine", name, 350, 350, master_ui, state)
|
||||
ui.open()
|
||||
|
||||
/obj/machinery/smoke_machine/ui_data(mob/user)
|
||||
|
||||
@@ -271,7 +271,7 @@
|
||||
if(isopenturf(T))
|
||||
var/turf/open/OT = T
|
||||
OT.MakeSlippery(wet_setting=TURF_WET_ICE, min_wet_time=100, wet_time_to_add=reac_volume SECONDS) // Is less effective in high pressure/high heat capacity environments. More effective in low pressure.
|
||||
OT.air.temperature -= MOLES_CELLSTANDARD*100*reac_volume/OT.air.heat_capacity() // reduces environment temperature by 5K per unit.
|
||||
OT.air.set_temperature(OT.air.return_temperature() - MOLES_CELLSTANDARD*100*reac_volume/OT.air.heat_capacity()) // reduces environment temperature by 5K per unit.
|
||||
|
||||
/datum/reagent/consumable/condensedcapsaicin
|
||||
name = "Condensed Capsaicin"
|
||||
@@ -506,7 +506,7 @@
|
||||
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())
|
||||
lowertemp.temperature = max( min(lowertemp.temperature-2000,lowertemp.temperature / 2) ,0)
|
||||
lowertemp.set_temperature(max( min(lowertemp.return_temperature()-2000,lowertemp.return_temperature() / 2) ,0))
|
||||
lowertemp.react(src)
|
||||
T.assume_air(lowertemp)
|
||||
qdel(hotspot)
|
||||
|
||||
@@ -928,10 +928,18 @@
|
||||
M.adjustOxyLoss(-20, 0)
|
||||
M.adjustToxLoss(-20, 0)
|
||||
M.updatehealth()
|
||||
var/tplus = world.time - M.timeofdeath
|
||||
if(M.revive())
|
||||
M.grab_ghost()
|
||||
M.emote("gasp")
|
||||
log_combat(M, M, "revived", src)
|
||||
var/list/policies = CONFIG_GET(keyed_list/policyconfig)
|
||||
var/timelimit = CONFIG_GET(number/defib_cmd_time_limit)
|
||||
var/late = timelimit && (tplus > timelimit)
|
||||
var/policy = late? policies[POLICYCONFIG_ON_DEFIB_LATE] : policies[POLICYCONFIG_ON_DEFIB_INTACT]
|
||||
if(policy)
|
||||
to_chat(M, policy)
|
||||
M.log_message("revived using strange reagent, [tplus] deciseconds from time of death, considered [late? "late" : "memory-intact"] revival under configured policy limits.", LOG_GAME)
|
||||
..()
|
||||
|
||||
|
||||
|
||||
@@ -263,7 +263,7 @@
|
||||
if(hotspot && !isspaceturf(T))
|
||||
if(T.air)
|
||||
var/datum/gas_mixture/G = T.air
|
||||
G.temperature = max(min(G.temperature-(CT*1000),G.temperature/CT),TCMB)
|
||||
G.set_temperature(max(min(G.return_temperature()-(CT*1000),G.return_temperature()/CT),TCMB))
|
||||
G.react(src)
|
||||
qdel(hotspot)
|
||||
var/obj/effect/acid/A = (locate(/obj/effect/acid) in T)
|
||||
@@ -1154,6 +1154,13 @@
|
||||
/mob/living/proc/bluespace_shuffle()
|
||||
do_teleport(src, get_turf(src), 5, asoundin = 'sound/effects/phasein.ogg', channel = TELEPORT_CHANNEL_BLUESPACE)
|
||||
|
||||
/datum/reagent/telecrystal
|
||||
name = "Telecrystal Dust"
|
||||
description = "A blood-red dust comprised of something that was much more useful when it was intact."
|
||||
reagent_state = SOLID
|
||||
color = "#660000" // rgb: 102, 0, 0.
|
||||
taste_description = "contraband"
|
||||
|
||||
/datum/reagent/aluminium
|
||||
name = "Aluminium"
|
||||
description = "A silvery white and ductile member of the boron group of chemical elements."
|
||||
|
||||
@@ -281,8 +281,8 @@
|
||||
if(hotspot && !isspaceturf(T))
|
||||
if(T.air)
|
||||
var/datum/gas_mixture/G = T.air
|
||||
if(G.temperature > T20C)
|
||||
G.temperature = max(G.temperature/2,T20C)
|
||||
if(G.return_temperature() > T20C)
|
||||
G.set_temperature(max(G.return_temperature()/2,T20C))
|
||||
G.react(src)
|
||||
qdel(hotspot)
|
||||
|
||||
|
||||
@@ -5,6 +5,9 @@
|
||||
var/list/required_reagents = new/list()
|
||||
var/list/required_catalysts = new/list()
|
||||
|
||||
/// Higher is higher priority, determines which order reactions are checked.
|
||||
var/priority = CHEMICAL_REACTION_PRIORITY_DEFAULT
|
||||
|
||||
// Both of these variables are mostly going to be used with slime cores - but if you want to, you can use them for other things
|
||||
var/required_container = null // the exact container path required for the reaction to happen
|
||||
var/required_other = 0 // an integer required for the reaction to happen
|
||||
|
||||
@@ -280,6 +280,7 @@
|
||||
/datum/chemical_reaction/smoke_powder
|
||||
name = "smoke_powder"
|
||||
id = /datum/reagent/smoke_powder
|
||||
priority = CHEMICAL_REACTION_PRIORITY_SMOKE
|
||||
results = list(/datum/reagent/smoke_powder = 3)
|
||||
required_reagents = list(/datum/reagent/potassium = 1, /datum/reagent/consumable/sugar = 1, /datum/reagent/phosphorus = 1)
|
||||
|
||||
|
||||
@@ -247,3 +247,42 @@
|
||||
icon_state = "bluekeg"
|
||||
reagent_id = /datum/reagent/consumable/ethanol/gargle_blaster
|
||||
tank_volume = 100
|
||||
|
||||
//kegs given by the travelling trader's bartender subtype
|
||||
|
||||
/obj/structure/reagent_dispensers/keg/quintuple_sec
|
||||
name = "keg of quintuple sec"
|
||||
desc = "A keg of pure justice."
|
||||
icon_state = "redkeg"
|
||||
reagent_id = /datum/reagent/consumable/ethanol/quintuple_sec
|
||||
tank_volume = 250
|
||||
|
||||
/obj/structure/reagent_dispensers/keg/narsour
|
||||
name = "keg of narsour"
|
||||
desc = "A keg of eldritch terrors."
|
||||
icon_state = "redkeg"
|
||||
reagent_id = /datum/reagent/consumable/ethanol/narsour
|
||||
tank_volume = 250
|
||||
|
||||
/obj/structure/reagent_dispensers/keg/red_queen
|
||||
name = "keg of red queen"
|
||||
desc = "A strange keg, filled with a kind of tea."
|
||||
icon_state = "redkeg"
|
||||
reagent_id = /datum/reagent/consumable/red_queen
|
||||
tank_volume = 250
|
||||
|
||||
/obj/structure/reagent_dispensers/keg/hearty_punch
|
||||
name = "keg of hearty punch"
|
||||
desc = "A keg that will get you right back on your feet."
|
||||
icon_state = "redkeg"
|
||||
reagent_id = /datum/reagent/consumable/ethanol/hearty_punch
|
||||
tank_volume = 100 //this usually has a 15:1 ratio when being made, so we provide less of it
|
||||
|
||||
/obj/structure/reagent_dispensers/keg/neurotoxin
|
||||
name = "keg of neurotoxin"
|
||||
desc = "A keg of the sickly substance known as 'neurotoxin'."
|
||||
icon_state = "bluekeg"
|
||||
reagent_id = /datum/reagent/consumable/ethanol/neurotoxin
|
||||
tank_volume = 100 //2.5x less than the other kegs because it's harder to get
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user