Merge branch 'master' of https://github.com/Citadel-Station-13/Citadel-Station-13 into proc-define-shit
This commit is contained in:
@@ -552,7 +552,7 @@
|
||||
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
|
||||
return FALSE
|
||||
|
||||
//This is just to calc the on_reaction multiplier, and is a candidate for removal.
|
||||
for(var/B in cached_required_reagents)
|
||||
@@ -561,11 +561,11 @@
|
||||
targetVol = cached_results[P]*multiplier
|
||||
|
||||
if(!((chem_temp <= C.ExplodeTemp) && (chem_temp >= C.OptimalTempMin)))
|
||||
return 0 //Not hot enough
|
||||
return FALSE //Not hot enough
|
||||
if(! ((pH >= (C.OptimalpHMin - C.ReactpHLim)) && (pH <= (C.OptimalpHMax + C.ReactpHLim)) ))//To prevent pointless reactions
|
||||
return 0
|
||||
return FALSE
|
||||
if (fermiIsReacting)
|
||||
return 0
|
||||
return FALSE
|
||||
else
|
||||
START_PROCESSING(SSprocessing, src)
|
||||
selected_reaction.on_reaction(src, my_atom, multiplier)
|
||||
@@ -581,7 +581,7 @@
|
||||
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
|
||||
return FALSE
|
||||
|
||||
for(var/B in cached_required_reagents) //
|
||||
multiplier = min(multiplier, round((get_reagent_amount(B) / cached_required_reagents[B]), CHEMICAL_QUANTISATION_LEVEL))
|
||||
@@ -621,7 +621,7 @@
|
||||
|
||||
while(reaction_occurred)
|
||||
update_total()
|
||||
return 0
|
||||
return FALSE
|
||||
|
||||
/datum/reagents/process()
|
||||
var/datum/chemical_reaction/C = fermiReactID
|
||||
@@ -838,7 +838,7 @@
|
||||
update_total()
|
||||
if(my_atom)
|
||||
my_atom.on_reagent_change(DEL_REAGENT)
|
||||
return 1
|
||||
return TRUE
|
||||
|
||||
/datum/reagents/proc/update_total()
|
||||
var/list/cached_reagents = reagent_list
|
||||
@@ -853,7 +853,7 @@
|
||||
total_volume += R.volume
|
||||
if(!reagent_list || !total_volume)
|
||||
pH = REAGENT_NORMAL_PH
|
||||
return 0
|
||||
return FALSE
|
||||
|
||||
/datum/reagents/proc/clear_reagents()
|
||||
var/list/cached_reagents = reagent_list
|
||||
@@ -861,7 +861,7 @@
|
||||
var/datum/reagent/R = reagent
|
||||
del_reagent(R.type)
|
||||
pH = REAGENT_NORMAL_PH
|
||||
return 0
|
||||
return FALSE
|
||||
|
||||
/datum/reagents/proc/reaction(atom/A, method = TOUCH, volume_modifier = 1, show_message = 1, from_gas = 0)
|
||||
var/react_type
|
||||
@@ -1075,9 +1075,9 @@
|
||||
if(round(R.volume, CHEMICAL_QUANTISATION_LEVEL) >= amount)
|
||||
return R
|
||||
else
|
||||
return 0
|
||||
return FALSE
|
||||
|
||||
return 0
|
||||
return FALSE
|
||||
|
||||
/datum/reagents/proc/get_reagent_amount(reagent)
|
||||
var/list/cached_reagents = reagent_list
|
||||
@@ -1086,7 +1086,7 @@
|
||||
if (R.type == reagent)
|
||||
return round(R.volume, CHEMICAL_QUANTISATION_LEVEL)
|
||||
|
||||
return 0
|
||||
return FALSE
|
||||
|
||||
/datum/reagents/proc/get_reagents()
|
||||
var/list/names = list()
|
||||
@@ -1099,7 +1099,7 @@
|
||||
|
||||
/datum/reagents/proc/remove_all_type(reagent_type, amount, strict = 0, safety = 1) // Removes all reagent of X type. @strict set to 1 determines whether the childs of the type are included.
|
||||
if(!isnum(amount))
|
||||
return 1
|
||||
return TRUE
|
||||
var/list/cached_reagents = reagent_list
|
||||
var/has_removed_reagent = 0
|
||||
|
||||
|
||||
@@ -94,16 +94,16 @@
|
||||
|
||||
/obj/machinery/chem_dispenser/Initialize(mapload)
|
||||
. = ..()
|
||||
dispensable_reagents = sortList(dispensable_reagents, GLOBAL_PROC_REF(cmp_reagents_asc))
|
||||
dispensable_reagents = sort_list(dispensable_reagents, GLOBAL_PROC_REF(cmp_reagents_asc))
|
||||
if(emagged_reagents)
|
||||
emagged_reagents = sortList(emagged_reagents, GLOBAL_PROC_REF(cmp_reagents_asc))
|
||||
emagged_reagents = sort_list(emagged_reagents, GLOBAL_PROC_REF(cmp_reagents_asc))
|
||||
if(upgrade_reagents)
|
||||
upgrade_reagents = sortList(upgrade_reagents, GLOBAL_PROC_REF(cmp_reagents_asc))
|
||||
upgrade_reagents = sort_list(upgrade_reagents, GLOBAL_PROC_REF(cmp_reagents_asc))
|
||||
if(upgrade_reagents2)
|
||||
upgrade_reagents2 = sortList(upgrade_reagents2, GLOBAL_PROC_REF(cmp_reagents_asc))
|
||||
upgrade_reagents2 = sort_list(upgrade_reagents2, GLOBAL_PROC_REF(cmp_reagents_asc))
|
||||
if(upgrade_reagents3)
|
||||
upgrade_reagents3 = sortList(upgrade_reagents3, GLOBAL_PROC_REF(cmp_reagents_asc))
|
||||
dispensable_reagents = sortList(dispensable_reagents, GLOBAL_PROC_REF(cmp_reagents_asc))
|
||||
upgrade_reagents3 = sort_list(upgrade_reagents3, GLOBAL_PROC_REF(cmp_reagents_asc))
|
||||
dispensable_reagents = sort_list(dispensable_reagents, GLOBAL_PROC_REF(cmp_reagents_asc))
|
||||
create_reagents(200, NO_REACT)
|
||||
update_icon()
|
||||
|
||||
|
||||
@@ -440,7 +440,7 @@
|
||||
num = round(num)
|
||||
return num
|
||||
else
|
||||
return 0
|
||||
return FALSE
|
||||
|
||||
|
||||
/obj/machinery/chem_master/adjust_item_drop_location(atom/movable/AM) // Special version for chemmasters and condimasters
|
||||
|
||||
@@ -71,14 +71,14 @@ GLOBAL_LIST_INIT(name2reagent, build_name2reagent())
|
||||
|
||||
/datum/reagent/proc/reaction_mob(mob/living/M, method=TOUCH, reac_volume, show_message = 1, touch_protection = 0)
|
||||
if(!istype(M))
|
||||
return 0
|
||||
return FALSE
|
||||
if(method == VAPOR) //smoke, foam, spray
|
||||
if(M.reagents)
|
||||
var/modifier = clamp((1 - touch_protection), 0, 1)
|
||||
var/amount = round(reac_volume*modifier, 0.1)
|
||||
if(amount >= 0.5)
|
||||
M.reagents.add_reagent(type, amount)
|
||||
return 1
|
||||
return TRUE
|
||||
|
||||
/datum/reagent/proc/reaction_obj(obj/O, volume)
|
||||
if(O && volume && boiling_point)
|
||||
|
||||
@@ -1479,15 +1479,15 @@ All effects don't start immediately, but rather get worse over time; the rate is
|
||||
..()
|
||||
|
||||
/datum/reagent/consumable/ethanol/eggnog
|
||||
name = "Eggnog"
|
||||
name = "Spiked Eggnog"
|
||||
description = "The traditional way to get absolutely hammered at a Christmas party."
|
||||
color = "#fcfdc6" // rgb: 252, 253, 198
|
||||
nutriment_factor = 2 * REAGENTS_METABOLISM
|
||||
boozepwr = 1
|
||||
boozepwr = 20
|
||||
quality = DRINK_VERYGOOD
|
||||
taste_description = "custard and alcohol"
|
||||
glass_icon_state = "nog3"
|
||||
glass_name = "eggnog"
|
||||
glass_name = "spiked eggnog"
|
||||
glass_desc = "The traditional way to get absolutely hammered at a Christmas party."
|
||||
|
||||
/datum/reagent/consumable/ethanol/narsour
|
||||
|
||||
@@ -1146,3 +1146,14 @@
|
||||
taste_description = "bitter powder"
|
||||
glass_name = "glass of banana peel powder"
|
||||
description = "You took a banana peel... pulped it... baked it... Where are you going with this?"
|
||||
|
||||
/datum/reagent/consumable/eggnog
|
||||
name = "Eggnog"
|
||||
description = "A creamy, rich beverage made out of whisked eggs, milk and sugar, for when you feel like celebrating the winter holidays."
|
||||
color = "#fcfdc6" // rgb: 252, 253, 198
|
||||
nutriment_factor = 2 * REAGENTS_METABOLISM
|
||||
quality = DRINK_VERYGOOD
|
||||
taste_description = "custard"
|
||||
glass_icon_state = "nog3"
|
||||
glass_name = "eggnog"
|
||||
glass_desc = "You can't egg-nore the holiday cheer all around you"
|
||||
|
||||
@@ -86,7 +86,7 @@
|
||||
|
||||
/datum/reagent/toxin/plasma/reaction_obj(obj/O, reac_volume)
|
||||
if((!O) || (!reac_volume))
|
||||
return 0
|
||||
return FALSE
|
||||
var/temp = holder ? holder.chem_temp : T20C
|
||||
O.atmos_spawn_air("plasma=[reac_volume];TEMP=[temp]")
|
||||
|
||||
|
||||
Reference in New Issue
Block a user